<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Yukun&#039;s Blog</title>
	<atom:link href="http://www.yukun.info/feed" rel="self" type="application/rss+xml" />
	<link>http://www.yukun.info</link>
	<description>難しいことは分かりやすく、簡単なことは面白く紹介</description>
	<lastBuildDate>Thu, 17 May 2012 15:00:23 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>I&#8217;ll continue to write the technical blog</title>
		<link>http://www.yukun.info/blog/2012/05/continue-write-technical-blog.html</link>
		<comments>http://www.yukun.info/blog/2012/05/continue-write-technical-blog.html#comments</comments>
		<pubDate>Thu, 17 May 2012 15:00:23 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Days]]></category>

		<guid isPermaLink="false">http://www.yukun.info/?p=2221</guid>
		<description><![CDATA[When I was a university student, I wrote the technical blog in this site to improve my skill and further my st &#8230; <a href="http://www.yukun.info/blog/2012/05/continue-write-technical-blog.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2012/05/continue-write-technical-blog.html">I&#8217;ll continue to write the technical blog</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>When I was a university student, I wrote the technical blog in this site to improve my skill and further my studies in programming, network, software design but recently, I can&#8217;t write it constantly because I&#8217;m busy with work.</p>
<p>Writing blog to study is effective for studying because you need certain stills to write a blog such as:</p>
<p>1. Gathering knowledge about a theme<br />
2. Logical thinking and writing</p>
<p>Now that I work for a system engineer in a bank and need to learn new skill, it is hard to take the free time after work. So I usually write articles in advance on Saturday or Sunday for three or four days as a buffer.</p>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2006/11/write-in-blog.html" rel="bookmark" title="2006年11月3日">What&#8217;s the mean to continue to write in blog ?</a></li>
<li><a href="http://www.yukun.info/blog/2006/07/that-and-this.html" rel="bookmark" title="2006年7月12日">I want to do that and this</a></li>
<li><a href="http://www.yukun.info/blog/2006/07/start-blog.html" rel="bookmark" title="2006年7月9日">I will start writing Blog</a></li>
<li><a href="http://www.yukun.info/blog/2006/07/run-over.html" rel="bookmark" title="2006年7月10日">Run over anything of what I&#8217;ve done</a></li>
<li><a href="http://www.yukun.info/blog/2007/03/review.html" rel="bookmark" title="2007年3月2日">Starting to Review This Week, Maybe</a></li>
</ul>
<p><!-- Similar Posts took 9.589 ms --></p>
<p><a href="http://www.yukun.info/blog/2012/05/continue-write-technical-blog.html">I&#8217;ll continue to write the technical blog</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yukun.info/blog/2012/05/continue-write-technical-blog.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to put off many books</title>
		<link>http://www.yukun.info/blog/2012/05/how-to-put-off-many-books.html</link>
		<comments>http://www.yukun.info/blog/2012/05/how-to-put-off-many-books.html#comments</comments>
		<pubDate>Wed, 16 May 2012 15:00:07 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Days]]></category>

		<guid isPermaLink="false">http://www.yukun.info/?p=2213</guid>
		<description><![CDATA[I continue to clean up my room after I&#8217;ve moved to new house. I worry about how to put off many books th &#8230; <a href="http://www.yukun.info/blog/2012/05/how-to-put-off-many-books.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2012/05/how-to-put-off-many-books.html">How to put off many books</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I continue to clean up my room after I&#8217;ve moved to new house. I worry about how to put off many books that I brought from family home and I can&#8217;t store in new house such as technical books and novels. It is &#8220;MOTTAINAI&#8221; to put off as dust so at first I&#8217;m planing to sell in Amazon market place but I recognize it is troublesome and low margin task with respect to spend much time to register the book, respond to buyer, send book, inform them. So I&#8217;ll request to cutting vendors to cut books and after that I&#8217;ll scan them as PDF or JPG data to read by some devices and I can save the space in my house.</p>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2007/03/explained-book.html" rel="bookmark" title="2007年3月3日">I Explained the Book in English</a></li>
<li><a href="http://www.yukun.info/blog/2007/02/trajectory.html" rel="bookmark" title="2007年2月23日">Books, the Trajectory of Having Traced Life</a></li>
<li><a href="http://www.yukun.info/blog/2006/07/that-and-this.html" rel="bookmark" title="2006年7月12日">I want to do that and this</a></li>
<li><a href="http://www.yukun.info/blog/2007/03/overstuffed-schedule.html" rel="bookmark" title="2007年3月6日">The Overstuffed Schedule is Doing Badly</a></li>
<li><a href="http://www.yukun.info/blog/2007/08/invest-myself.html" rel="bookmark" title="2007年8月24日">Invest myself</a></li>
</ul>
<p><!-- Similar Posts took 8.192 ms --></p>
<p><a href="http://www.yukun.info/blog/2012/05/how-to-put-off-many-books.html">How to put off many books</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yukun.info/blog/2012/05/how-to-put-off-many-books.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python: ソースコード中でのUTF-8文字(日本語等)のエンコーディング指定</title>
		<link>http://www.yukun.info/blog/2012/05/python-utf8-encode.html</link>
		<comments>http://www.yukun.info/blog/2012/05/python-utf8-encode.html#comments</comments>
		<pubDate>Tue, 15 May 2012 15:00:31 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.yukun.info/?p=2202</guid>
		<description><![CDATA[Pythonスクリプトの実行(コンパイル→実行)の際に下記のエラーが発生した場合、 SyntaxError: Non-ASCII character '\ABC' in file C:\XXX\YYY\ZZZ.py on &#8230; <a href="http://www.yukun.info/blog/2012/05/python-utf8-encode.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2012/05/python-utf8-encode.html">Python: ソースコード中でのUTF-8文字(日本語等)のエンコーディング指定</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Pythonスクリプトの実行(コンパイル→実行)の際に下記のエラーが発生した場合、</p>
<pre>
SyntaxError: Non-ASCII character '\ABC' in file C:\XXX\YYY\ZZZ.py on line MM,
but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
</pre>
<p>ソースコード中にASCII以外の文字(日本語など)が含まれているがエンコードの指定が無いことが原因となる。<br />
対処法はスクリプトの先頭行に下記の何れかの1行記述することでUTF-8文字の使用を宣言する。</p>
<pre>
# coding: utf-8
</pre>
<pre>
# -*- coding: utf-8 -*-
</pre>
<h3>参考サイト</h3>
<ul>
<li><a href="http://www.python.org/dev/peps/pep-0263/">PEP 0263 &#8212; Defining Python Source Code Encodings</a></li>
</ul>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2008/09/python-add-line-number-to-text-file.html" rel="bookmark" title="2008年9月8日">Python: テキストファイルの行頭に行番号を追加</a></li>
<li><a href="http://www.yukun.info/blog/2008/07/python-command-line-arguments.html" rel="bookmark" title="2008年7月26日">Python: コマンドライン引数の取得 &#8211; sys.argv変数</a></li>
<li><a href="http://www.yukun.info/blog/2008/06/python-random2.html" rel="bookmark" title="2008年6月11日">Python: モジュールにテスト関数を定義 &#8211; 重複のない乱数(整数MIN以上MAX以下)の生成</a></li>
<li><a href="http://www.yukun.info/blog/2012/05/python-word-to-text-convert.html" rel="bookmark" title="2012年5月14日">Python: MS Word ファイルからテキストファイルへ変換</a></li>
<li><a href="http://www.yukun.info/blog/2011/01/shell-for-wordlist.html" rel="bookmark" title="2011年1月30日">Shell Script: for文 &#8211; ワードリストを順に出力</a></li>
</ul>
<p><!-- Similar Posts took 9.310 ms --></p>
<p><a href="http://www.yukun.info/blog/2012/05/python-utf8-encode.html">Python: ソースコード中でのUTF-8文字(日本語等)のエンコーディング指定</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yukun.info/blog/2012/05/python-utf8-encode.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python: win32comモジュールのインストール方法</title>
		<link>http://www.yukun.info/blog/2012/05/python-win32com-module-install.html</link>
		<comments>http://www.yukun.info/blog/2012/05/python-win32com-module-install.html#comments</comments>
		<pubDate>Mon, 14 May 2012 15:00:29 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.yukun.info/?p=2206</guid>
		<description><![CDATA[PythonでWindowsのアプリ・ファイルを扱う際に必要なwin32comモジュールのインストール方法を以下の通り。 配布元へアクセス：Win32 Extensions for Python ダウンロードエリアに移動 &#8230; <a href="http://www.yukun.info/blog/2012/05/python-win32com-module-install.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2012/05/python-win32com-module-install.html">Python: win32comモジュールのインストール方法</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>PythonでWindowsのアプリ・ファイルを扱う際に必要なwin32comモジュールのインストール方法を以下の通り。</p>
<ol>
<li>配布元へアクセス：<a href="http://starship.python.net/~skippy/win32/Downloads.html">Win32 Extensions for Python</a></li>
<li>ダウンロードエリアに移動：<a href="http://sourceforge.net/projects/pywin32/files/">Python for Windows extensions &#8211; Browse Files at SourceForge.net</a></li>
<li>ページ中のpywin32のリンクを開き、最新ビルドリンクを開く</li>
<li>Pythonの使用環境に合わせてダウンロードパッケージを選択(32bit or 64bitはpythonのプロンプト実行時に確認できる)<br />
32bitの例：</p>
<pre>
C:\Users\yukun>python
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
</pre>
<p>この場合は、pywin32-XXX.win32-py2.7.exeを選択</li>
<li>ダウンロードしたexeファイルを実行しインストールする</li>
<li>インストール後”C:\&#8230;\Lib\site-packages”ディレクトリにwin32comモジュールのファイル群が作成されていることを確認</li>
<li>import文が正常に実行できることを確認
<pre>
C:\Users\yukun>python
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import win32com
>>>
</pre>
</li>
</ol>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2012/05/python-word-to-text-convert.html" rel="bookmark" title="2012年5月14日">Python: MS Word ファイルからテキストファイルへ変換</a></li>
<li><a href="http://www.yukun.info/blog/2008/06/install-lxml.html" rel="bookmark" title="2008年6月13日">Python: lxmlのインストール方法</a></li>
<li><a href="http://www.yukun.info/blog/2010/06/windows7-speed-up-tips.html" rel="bookmark" title="2010年6月15日">Windows7高速化・軽量化Tips</a></li>
<li><a href="http://www.yukun.info/blog/2011/03/python-twitter-install.html" rel="bookmark" title="2011年3月5日">Python Twitter のインストール</a></li>
<li><a href="http://www.yukun.info/blog/2011/02/vmware-player-centos.html" rel="bookmark" title="2011年2月23日">VMware PlayerでCentOSをインストール</a></li>
</ul>
<p><!-- Similar Posts took 8.019 ms --></p>
<p><a href="http://www.yukun.info/blog/2012/05/python-win32com-module-install.html">Python: win32comモジュールのインストール方法</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yukun.info/blog/2012/05/python-win32com-module-install.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python: MS Word ファイルからテキストファイルへ変換</title>
		<link>http://www.yukun.info/blog/2012/05/python-word-to-text-convert.html</link>
		<comments>http://www.yukun.info/blog/2012/05/python-word-to-text-convert.html#comments</comments>
		<pubDate>Sun, 13 May 2012 15:00:15 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.yukun.info/?p=2193</guid>
		<description><![CDATA[COM(Component Object Model)を使用してWordファイル内のテキストをテキストファイルへ抽出・変換するスクリプト。 ソースコード # coding: utf-8 import fnmatch, o &#8230; <a href="http://www.yukun.info/blog/2012/05/python-word-to-text-convert.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2012/05/python-word-to-text-convert.html">Python: MS Word ファイルからテキストファイルへ変換</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>COM(Component Object Model)を使用してWordファイル内のテキストをテキストファイルへ抽出・変換するスクリプト。</p>
<h3>ソースコード</h3>
<pre>
# coding: utf-8

import fnmatch, os, sys, win32com.client

if __name__ == '__main__':
	wa = win32com.client.gencache.EnsureDispatch("Word.Application")
	try:
		for path, dirs, files in os.walk(sys.argv[1]): # コマンドラインより探索ディレクトリpathを取得
			for filename in files:
				if not fnmatch.fnmatch(filename, "*.doc"): continue # wordファイルの拡張子かをパターン・マッチング
				doc = os.path.abspath(os.path.join(path, filename)) # wordファイルへの絶対パスを作成
				print "processing %s in %s" % (doc, path)
				wa.Documents.Open(doc)
				txt = doc[:-3] + 'txt' # 変換保管するテキストファイル名
				wa.ActiveDocument.SaveAs(txt, FileFormat=win32com.client.constants.wdFormatText)
				wa.ActiveDocument.Close()
	finally:
		wa.Quit() # Wordの終了
</pre>
<p><span id="more-2193"></span></p>
<h3>実行結果</h3>
<p>上記のソースコードをwordtotext.pyで保管し実行。ここでは当方環境でWordファイルが保管されているディレクトリを指定し、実行する。</p>
<pre>
>python wordtotext.py "C:\Users\yukun\Google Drive\E-mail_Writing_Text"
processing C:\Users\yukun\Google Drive\E-mail_Writing_Text\Yukun Homework Package 1.doc in C:\Users\yukun\Google Drive\E-mail_Writing_Text
processing C:\Users\yukun\Google Drive\E-mail_Writing_Text\Yukun Homework Package 2.doc in C:\Users\yukun\Google Drive\E-mail_Writing_Text
processing C:\Users\yukun\Google Drive\E-mail_Writing_Text\Yukun Homework Package 3.doc in C:\Users\yukun\Google Drive\E-mail_Writing_Text
processing C:\Users\yukun\Google Drive\E-mail_Writing_Text\Yukun Homework Package 4.doc in C:\Users\yukun\Google Drive\E-mail_Writing_Text
processing C:\Users\yukun\Google Drive\E-mail_Writing_Text\Yukun Homework Package 5.doc in C:\Users\yukun\Google Drive\E-mail_Writing_Text
processing C:\Users\yukun\Google Drive\E-mail_Writing_Text\Yukun Homework Package 6.doc in C:\Users\yukun\Google Drive\E-mail_Writing_Text
</pre>
<p>◯実行前ディレクトリ<br />
<a href="http://www.yukun.info/wp-content/uploads/pytnon_wordtotxt_before.png"><img src="http://www.yukun.info/wp-content/uploads/pytnon_wordtotxt_before.png" alt="pytnon_wordtotxt_before" title="pytnon_wordtotxt_before" width="536" height="437" class="alignnone size-full wp-image-2195" /></a></p>
<p>◯実行後ディレクトリ<br />
<a href="http://www.yukun.info/wp-content/uploads/pytnon_wordtotxt_after.png"><img src="http://www.yukun.info/wp-content/uploads/pytnon_wordtotxt_after.png" alt="pytnon_wordtotxt_after" title="pytnon_wordtotxt_after" width="536" height="437" class="alignnone size-full wp-image-2196" /></a></p>
<h3>参考サイト</h3>
<ul>
<li><a href="http://www.python.jp/doc/release/library/fnmatch.html">10.8. fnmatch — Unix ファイル名のパターンマッチ — Python 2.7ja1 documentation</a></li>
<li><a href="http://docs.python.org/library/os.html">15.1. os — Miscellaneous operating system interfaces — Python v2.7.3 documentation</a></li>
</ul>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2012/05/python-win32com-module-install.html" rel="bookmark" title="2012年5月15日">Python: win32comモジュールのインストール方法</a></li>
<li><a href="http://www.yukun.info/blog/2008/08/python-directory-listdir-glob.html" rel="bookmark" title="2008年8月9日">Python: 指定したパスのディレクトリ中のファイル一覧を出力</a></li>
<li><a href="http://www.yukun.info/blog/2008/06/linux-users.html" rel="bookmark" title="2008年6月26日">ユーザー管理に関するLinuxコマンド</a></li>
<li><a href="http://www.yukun.info/blog/2008/09/r-set-work-directory.html" rel="bookmark" title="2008年9月3日">Rで統計: 作業ディレクトリの設定と確認 &#8211; setwd()、getwd()関数</a></li>
<li><a href="http://www.yukun.info/blog/2008/09/python-file-write-writelines.html" rel="bookmark" title="2008年9月6日">Python: テキストファイルに書き込み &#8211; write()、writelines()メソッド</a></li>
</ul>
<p><!-- Similar Posts took 8.449 ms --></p>
<p><a href="http://www.yukun.info/blog/2012/05/python-word-to-text-convert.html">Python: MS Word ファイルからテキストファイルへ変換</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yukun.info/blog/2012/05/python-word-to-text-convert.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>We start to share our study progress</title>
		<link>http://www.yukun.info/blog/2012/05/we-start-to-share-our-study-progress.html</link>
		<comments>http://www.yukun.info/blog/2012/05/we-start-to-share-our-study-progress.html#comments</comments>
		<pubDate>Sun, 13 May 2012 14:55:32 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Days]]></category>

		<guid isPermaLink="false">http://www.yukun.info/?p=2211</guid>
		<description><![CDATA[From today, my sister and I have started to share our study progress in order to maintain our motivation to co &#8230; <a href="http://www.yukun.info/blog/2012/05/we-start-to-share-our-study-progress.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2012/05/we-start-to-share-our-study-progress.html">We start to share our study progress</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>From today, my sister and I have started to share our study progress in order to maintain our motivation to continue to study. Because we consider that it is difficult for us to maintain it after daily work by oneself. We choose Facebook groups as the tool to confirm our progress because it is convenient to share our daily progress such as &#8220;Today I&#8217;ve studied AAA&#8221; and &#8220;How to start to study is BBB&#8221;. At first, we will try to use it whether it is an effective or not. After that, We&#8217;ll rule about how to report our daily progress with trial and error.</p>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2010/05/many-interrupted-jobs.html" rel="bookmark" title="2010年5月6日">Many interrupted jobs</a></li>
<li><a href="http://www.yukun.info/blog/2006/07/studying-programming.html" rel="bookmark" title="2006年7月25日">The plan of studying Programming in this vacation</a></li>
<li><a href="http://www.yukun.info/blog/2006/07/that-and-this.html" rel="bookmark" title="2006年7月12日">I want to do that and this</a></li>
<li><a href="http://www.yukun.info/blog/2006/07/run-over.html" rel="bookmark" title="2006年7月10日">Run over anything of what I&#8217;ve done</a></li>
<li><a href="http://www.yukun.info/blog/2012/05/continue-write-technical-blog.html" rel="bookmark" title="2012年5月18日">I&#8217;ll continue to write the technical blog</a></li>
</ul>
<p><!-- Similar Posts took 6.160 ms --></p>
<p><a href="http://www.yukun.info/blog/2012/05/we-start-to-share-our-study-progress.html">We start to share our study progress</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yukun.info/blog/2012/05/we-start-to-share-our-study-progress.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android: Eclipseビルドエラーの対処例 &#8211; Error generating final archive</title>
		<link>http://www.yukun.info/blog/2012/01/android-eclipse-build-error.html</link>
		<comments>http://www.yukun.info/blog/2012/01/android-eclipse-build-error.html#comments</comments>
		<pubDate>Thu, 05 Jan 2012 15:00:23 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Eclipse]]></category>

		<guid isPermaLink="false">http://www.yukun.info/?p=2165</guid>
		<description><![CDATA[久々にAndroid プロジェクトを新規作成→ビルドしたところ、上図のエラーが出力された。 詳細原因は深く調査していないが、以下の操作を以て解決したので、ご参考まで。 0. (事象)アプリのデバッグ/実行時に下記のエラー &#8230; <a href="http://www.yukun.info/blog/2012/01/android-eclipse-build-error.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2012/01/android-eclipse-build-error.html">Android: Eclipseビルドエラーの対処例 &#8211; Error generating final archive</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.yukun.info/wp-content/uploads/eclipse_android_project_error.png"><img src="http://www.yukun.info/wp-content/uploads/eclipse_android_project_error.png" alt="eclipse_android_project_error" title="eclipse_android_project_error" width="942" height="200" class="alignnone size-full wp-image-2171" /></a></p>
<p>久々にAndroid プロジェクトを新規作成→ビルドしたところ、上図のエラーが出力された。<br />
詳細原因は深く調査していないが、以下の操作を以て解決したので、ご参考まで。</p>
<p><span id="more-2165"></span></p>
<p>0. (事象)アプリのデバッグ/実行時に下記のエラーが発生しデバッグ/実行処理が開始しない。</p>
<pre>
Error generating final archive: java.io.FileNotFoundException:
C:\eclipse64\workspace\sample\bin\resources.ap_ does not exist	XXXXXXX
不明	Android Packaging Problem
</pre>
<p>1. Eclipseメニュー→「プロジェクト」→「クリーン」を実行。</p>
<p>2. デバッグ→Androidアプリケーションを実行するも以下のエラーメッセージが発生(>_<)</p>
<pre>
エラー: Unknown command &#8216;crunch&#8217;
</pre>
<p>3. Eclipseメニュー→「ウィンドウ」→「Android SDK Manager」から、SDKのUpdateし再実行。</p>
<p>4. 正常にアプリが実行されるものの、Logcatビューで以下のメッセージが表示され、ログを参照できない(>_<)</p>
<pre>
Unable to create view ID com.android.ide.eclipse.ddms.views.LogCatView:
com.android.ddmuilib.logcat.LogCatPanel$13.<init>
(Lcom/android/ddmuilib/logcat/LogCatPanel;)V
</pre>
<p>5. Eclipseを「eclipse.exe -clean」オプション付きで起動し直す。(pleiadesを使用している場合はeclipse.exe -clean.cmdファイルをダブルクリックしても良い)</p>
<p>6. 再度ADV諸々実行し直し、正常にアプリがデバッグ/実行されることを確認。</p>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2010/06/android-unable-to-open-sync-connection.html" rel="bookmark" title="2010年6月5日">Android: &#8220;Unable to open sync connection!&#8221; の対処例</a></li>
<li><a href="http://www.yukun.info/blog/2010/04/setup-eclipse-64bit-android.html" rel="bookmark" title="2010年4月25日">Windows7 64bitにEclipseでAndroid開発環境をセットアップ</a></li>
<li><a href="http://www.yukun.info/blog/2008/01/eclipse-cdt.html" rel="bookmark" title="2008年1月11日">Eclipse+CDTを用いてプロジェクトを作成する際の注意点</a></li>
<li><a href="http://www.yukun.info/blog/2011/09/android-005sh-debug.html" rel="bookmark" title="2011年9月11日">Android: 005SHをデバッグモードで認識させる</a></li>
<li><a href="http://www.yukun.info/blog/2010/01/android-draw-image-resources.html" rel="bookmark" title="2010年1月2日">Android: リソースの画像ファイルの拡大・縮小描画 &#8211; drawBitmap()</a></li>
</ul>
<p><!-- Similar Posts took 7.166 ms --></p>
<p><a href="http://www.yukun.info/blog/2012/01/android-eclipse-build-error.html">Android: Eclipseビルドエラーの対処例 &#8211; Error generating final archive</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yukun.info/blog/2012/01/android-eclipse-build-error.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex: State、Transitionによる画面遷移 &#8211; ログイン画面</title>
		<link>http://www.yukun.info/blog/2012/01/flex-state-login-register.html</link>
		<comments>http://www.yukun.info/blog/2012/01/flex-state-login-register.html#comments</comments>
		<pubDate>Wed, 04 Jan 2012 15:00:19 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.yukun.info/?p=2117</guid>
		<description><![CDATA[FlexのStateの遷移によって表示するUIを変更することで、簡潔に画面遷移を実現する。その際のTransition効果(フェード)を付与する。今回はログインフォームを例に採り、ユーザーのログイン画面と新規登録画面の2 &#8230; <a href="http://www.yukun.info/blog/2012/01/flex-state-login-register.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2012/01/flex-state-login-register.html">Flex: State、Transitionによる画面遷移 &#8211; ログイン画面</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.yukun.info/wp-content/uploads/flex_login_state.png"><img src="http://www.yukun.info/wp-content/uploads/flex_login_state.png" alt="Flex: State、Transitionによる画面遷移 - ログイン画面" title="flex_login_state" width="267" height="177" class="alignnone size-full wp-image-2136" /></a></p>
<p>FlexのStateの遷移によって表示するUIを変更することで、簡潔に画面遷移を実現する。その際のTransition効果(フェード)を付与する。今回はログインフォームを例に採り、ユーザーのログイン画面と新規登録画面の2つの状態をStateによって切り替えるmxmlソースを下記に紹介する。</p>
<p><span id="more-2117"></span></p>
<h3>実行結果</h3>
<p>下記のリンクをご参照。</p>
<p><a href="http://www.yukun.info/labs/flex/login-sys/">ログイン・登録フォーム</a></p>
<h3>ソースコード</h3>
<pre>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:Application xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
			   xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;
			   xmlns:mx=&quot;library://ns.adobe.com/flex/mx&quot;
			   currentState=&quot;Login&quot;&gt;
	&lt;!-- 初期状態は&quot;Login&quot; --&gt;

	&lt;!-- 状態遷移エフェクト --&gt;
	&lt;s:transitions&gt;
		&lt;s:Transition fromState=&quot;*&quot; toState=&quot;*&quot;&gt;
			&lt;s:effect&gt;
				&lt;s:Parallel targets=&quot;{[registerLink, registerButton, loginLink, loginButton, confirm, email]}&quot;&gt;
					&lt;s:children&gt;
						&lt;s:Fade alphaFrom=&quot;0&quot; alphaTo=&quot;1&quot;/&gt;
					&lt;/s:children&gt;
				&lt;/s:Parallel&gt;
			&lt;/s:effect&gt;
		&lt;/s:Transition&gt;
	&lt;/s:transitions&gt;

	&lt;!-- 状態 --&gt;
	&lt;s:states&gt;
		&lt;s:State name=&quot;Login&quot;/&gt;
		&lt;s:State name=&quot;Register&quot;/&gt;
	&lt;/s:states&gt;
	&lt;fx:Declarations&gt;
		&lt;!-- 非ビジュアルエレメント (サービス、値オブジェクトなど) をここに配置 --&gt;
	&lt;/fx:Declarations&gt;

	&lt;!-- ログイン用パネル --&gt;
	&lt;s:Panel title=&quot;Login&quot; id=&quot;loginPanel&quot; includeIn=&quot;Login&quot; horizontalCenter=&quot;0&quot; verticalCenter=&quot;-2&quot;&gt;
		&lt;mx:Form id=&quot;loginForm&quot;&gt;
			&lt;mx:FormItem label=&quot;Username:&quot;&gt;
				&lt;s:TextInput/&gt;
			&lt;/mx:FormItem&gt;
			&lt;mx:FormItem label=&quot;Password:&quot;&gt;
				&lt;s:TextInput/&gt;
			&lt;/mx:FormItem&gt;
		&lt;/mx:Form&gt;
		&lt;s:controlBarContent&gt;
			&lt;mx:LinkButton label=&quot;Need to Register?&quot; id=&quot;registerLink&quot;
						   click=&quot;currentState=&#039;Register&#039;&quot;/&gt;
			&lt;mx:Spacer width=&quot;100%&quot; id=&quot;spacer1&quot;/&gt;
			&lt;s:Button label=&quot;Login&quot; id=&quot;loginButton&quot;/&gt;
		&lt;/s:controlBarContent&gt;
	&lt;/s:Panel&gt;

	&lt;!-- 新規登録用パネル --&gt;
	&lt;s:Panel title=&quot;Register&quot; id=&quot;registerPanel&quot; includeIn=&quot;Register&quot; horizontalCenter=&quot;0&quot; verticalCenter=&quot;-2&quot;&gt;
		&lt;mx:Form id=&quot;registerForm&quot;&gt;
			&lt;mx:FormItem label=&quot;Username:&quot;&gt;
				&lt;s:TextInput/&gt;
			&lt;/mx:FormItem&gt;
			&lt;mx:FormItem label=&quot;Password:&quot;&gt;
				&lt;s:TextInput/&gt;
			&lt;/mx:FormItem&gt;
			&lt;mx:FormItem id=&quot;confirm&quot; label=&quot;Confirm:&quot;&gt;
				&lt;s:TextInput/&gt;
			&lt;/mx:FormItem&gt;
			&lt;mx:FormItem id=&quot;email&quot; label=&quot;E-Mail:&quot;&gt;
				&lt;s:TextInput/&gt;
			&lt;/mx:FormItem&gt;
		&lt;/mx:Form&gt;
		&lt;s:controlBarContent&gt;
			&lt;mx:LinkButton label=&quot;Return to Login&quot; id=&quot;loginLink&quot;
						   click=&quot;currentState=&#039;Login&#039;&quot;/&gt;
			&lt;mx:Spacer width=&quot;100%&quot; id=&quot;spacer2&quot;/&gt;
			&lt;s:Button label=&quot;Register&quot; id=&quot;registerButton&quot;/&gt;
		&lt;/s:controlBarContent&gt;
	&lt;/s:Panel&gt;
&lt;/s:Application&gt;
</pre>
<p>※余談：<br />
フォルダを整理していたら古いFlexコードが出てきたので、この度当サイトに転記したもの。基本Tips系のコードはブログに載せてローカルには保存しないようにする予定。どうせその類のコードは一週間後には読まなくなるし、それ以降はソースの保管場所さえ忘れてしまう恐れもある為。</p>
<p>何かご質問等ありましたら、お気軽にコメントを頂ければと思います。</p>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2008/12/actionscript-air-async-read-text.html" rel="bookmark" title="2008年12月17日">AIR: テキストファイルを非同期に読み込む &#8211; openAsync()、readMultiByte()</a></li>
<li><a href="http://www.yukun.info/blog/2008/10/actionscript-paint-flash-flex-button.html" rel="bookmark" title="2008年10月14日">AS3でお絵かきFlashを作る (2)ボタン作成 &#8211; Flexコンポーネントの導入</a></li>
<li><a href="http://www.yukun.info/blog/2008/12/actionscript-air-async-write-text.html" rel="bookmark" title="2008年12月18日">AIR: テキストファイルに書き込み &#8211; openAsync()、writeMultiByte()</a></li>
<li><a href="http://www.yukun.info/blog/2010/07/error-require-once-autoloader-php.html" rel="bookmark" title="2010年7月25日">解決例: 「ファイルから操作とエンティティを取得できません」 &#8211; Autoloader.php</a></li>
<li><a href="http://www.yukun.info/blog/2008/12/amazocluster-bata-uncompleted.html" rel="bookmark" title="2008年12月15日">AmazoCluster: 一発で納得のいくものができればいいけれどね・・・</a></li>
</ul>
<p><!-- Similar Posts took 8.560 ms --></p>
<p><a href="http://www.yukun.info/blog/2012/01/flex-state-login-register.html">Flex: State、Transitionによる画面遷移 &#8211; ログイン画面</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yukun.info/blog/2012/01/flex-state-login-register.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: 本文・コメント中のURLの自動リンクを抑制する &#8211; make_clickable</title>
		<link>http://www.yukun.info/blog/2012/01/wordpress-remove-filter-url-link.html</link>
		<comments>http://www.yukun.info/blog/2012/01/wordpress-remove-filter-url-link.html#comments</comments>
		<pubDate>Tue, 03 Jan 2012 15:00:42 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.yukun.info/?p=2145</guid>
		<description><![CDATA[最近のWordPressは本文・コメント内のURL(http:～、ftp:～)に自動的にリンクを貼る機能があるのだが、ソースコード中の文字列にまでリンクを貼られるとコードそのものが崩れる為、それを抑制するよう使用テーマの &#8230; <a href="http://www.yukun.info/blog/2012/01/wordpress-remove-filter-url-link.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2012/01/wordpress-remove-filter-url-link.html">WordPress: 本文・コメント中のURLの自動リンクを抑制する &#8211; make_clickable</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>最近のWordPressは本文・コメント内のURL(http:～、ftp:～)に自動的にリンクを貼る機能があるのだが、ソースコード中の文字列にまでリンクを貼られるとコードそのものが崩れる為、それを抑制するよう使用テーマのfunctions.phpに以下のコードを追記する。</p>
<p><span id="more-2145"></span></p>
<pre>
/* 自動リンク除去 */
remove_filter('comment_text', 'make_clickable');
remove_filter('the_content', 'make_clickable');
</pre>
<p>※余談：<br />
上記の設定をしてもリンクが解除されなかったので、他の原因を探ってみたら、chromeブラウザで拡張機能Text URL Linkeを使用していると、記事中のhttp:～リンクを自動的にタグで囲んでしまうので、これも無効化する必要があった(^_^;)</p>
<h3>参考サイト</h3>
<ol>
<li><a href="http://codex.wordpress.org/Function_Reference/make_clickable">Function Reference/make clickable « WordPress Codex</a></li>
<li><a href="http://codex.wordpress.org/Function_Reference/remove_filter">Function Reference/remove filter « WordPress Codex</a></li>
<li><a href="http://www.clickonf5.org/10159/remove-links-in-comments/">Remove Auto Links In WordPress Comments Content Without Plugin</a></li>
<li><a href="http://ja.forums.wordpress.org/topic/4927">WordPress › フォーラム » 投稿記事の自動置換処理をカスタマイズしたい</a></li>
</ol>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2012/01/wordpress-facebook-ogp-plugins.html" rel="bookmark" title="2012年1月1日">WordPress: Facebook OGP Social Plugins(Like、コメント)の設置方法</a></li>
<li><a href="http://www.yukun.info/blog/2011/08/wordpress-file-access.html" rel="bookmark" title="2011年8月9日">WordPress: 解決策→「要求されたアクションを実行するには、WordPress が Web サーバーにアクセスする必要があります。」</a></li>
<li><a href="http://www.yukun.info/blog/2008/10/recommend-wordpress-popular-posts-plugin-for-shosira.html" rel="bookmark" title="2008年10月13日">shosira さんへのお勧めプラグイン「Popular Posts」</a></li>
<li><a href="http://www.yukun.info/blog/2008/10/wordpress-plugin-similar-posts.html" rel="bookmark" title="2008年10月12日">WordPress: Similar Posts の紹介と設定例 &#8211; 関連記事[投稿|エントリ]を表示するプラグイン</a></li>
<li><a href="http://www.yukun.info/blog/2012/05/python-win32com-module-install.html" rel="bookmark" title="2012年5月15日">Python: win32comモジュールのインストール方法</a></li>
</ul>
<p><!-- Similar Posts took 8.233 ms --></p>
<p><a href="http://www.yukun.info/blog/2012/01/wordpress-remove-filter-url-link.html">WordPress: 本文・コメント中のURLの自動リンクを抑制する &#8211; make_clickable</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yukun.info/blog/2012/01/wordpress-remove-filter-url-link.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Facebook OGP Social Plugins(Like、コメント)の設置方法</title>
		<link>http://www.yukun.info/blog/2012/01/wordpress-facebook-ogp-plugins.html</link>
		<comments>http://www.yukun.info/blog/2012/01/wordpress-facebook-ogp-plugins.html#comments</comments>
		<pubDate>Sun, 01 Jan 2012 06:00:41 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://www.yukun.info/?p=2070</guid>
		<description><![CDATA[FacebookのOGP pluginについては、結構な頻度で仕様変更があるので、Webにある過去の記事を参考にさせて頂くものの、なかなか上手くいかないこともあり、今回設置には手間取ったので、その作業経過をまとめておきま &#8230; <a href="http://www.yukun.info/blog/2012/01/wordpress-facebook-ogp-plugins.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2012/01/wordpress-facebook-ogp-plugins.html">WordPress: Facebook OGP Social Plugins(Like、コメント)の設置方法</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>FacebookのOGP pluginについては、結構な頻度で仕様変更があるので、Webにある過去の記事を参考にさせて頂くものの、なかなか上手くいかないこともあり、今回設置には手間取ったので、その作業経過をまとめておきます。結論から言うと設置にはWordPressのプラグインは使用せず、テーマファイルを直接編集する方法を採り、無事FacebookのDebugツールで認識できました。</p>
<p><span id="more-2070"></span></p>
<h3>設定手順</h3>
<ol>
<li>Facebookアプリの作成</li>
<li>Social Pluginsコードを取得</li>
<li>WordPressのテーマ編集(Pluginsコードの埋め込み)</li>
<li>Debugツールで設定内容確認</li>
</ol>
<h3>1. Facebookアプリの作成</h3>
<p>下記のリンクより、Facebookアプリを作成し「App ID/API Key」を取得する。<br />
<a href="https://developers.facebook.com/apps">Facebook開発者</a><br />
併せてユーザーIDも以下のURLにアクセスし控えておく(&#8220;id&#8221;部分)。</p>
<p>https://graph.facebook.com/＜ユーザー名＞</p>
<p>例：私の場合はyu.sskがユーザーのURLなので以下のアドレスを入力することとなる。</p>
<p>https://graph.facebook.com/yu.ssk</p>
<h3>2. Social Pluginsコードを取得</h3>
<p>下記のサイトから、Like Button, Commentsのコードを取得する。<br />
<a href="https://developers.facebook.com/docs/plugins/">Social Plugins &#8211; Facebook開発者</a><br />
- <a href="https://developers.facebook.com/docs/reference/plugins/like/">Like Button &#8211; Facebook開発者</a><br />
- <a href="https://developers.facebook.com/docs/reference/plugins/comments/">Comments &#8211; Facebook開発者</a></p>
<h3>3. WordPressのテーマ編集(Pluginsコードの埋め込み)</h3>
<p>私の場合、テーマの修正箇所は以下のタグ・要素となった。<br />
※使用テーマはデフォルトのTwenty Ten。</p>
<ol>
<li>ヘッダー(header.php)</li>
<li>コメント(comments.php)</li>
</ol>
<h4>ヘッダー(header.php)</h4>
<p>先ずhtmlタグ内の要素を以下のように修正し、OGPとFacebookの名前空間の定義、prefixを追加する。</p>
<pre>
&lt;html &lt;?php language_attributes(); ?&gt;
xmlns:og=&rdquo;http://ogp.me/ns#&rdquo;
xmlns:fb=&rdquo;http://www.facebook.com/2008/fbml&rdquo;
prefix=&quot;og: http://ogp.me/ns# fb: http://www.facebook.com/2008/fbml&quot; &gt;
</pre>
<p>次にheadタグ内に取得したPluginコードを埋め込む。</p>
<pre>
&lt;head&gt;
&lt;meta charset=&quot;&lt;?php bloginfo( &#039;charset&#039; ); ?&gt;&quot; /&gt;

&lt;meta property=&quot;og:site_name&quot; content=&quot;Yukun&#039;s Blog&quot; /&gt;
&lt;meta property=&quot;og:title&quot; content=&quot;&lt;?php if (get_the_title() === &#039;Home&#039;) { echo &quot;Yukun&#039;s Blog&quot;; } else { the_title(); } ?&gt;&quot; /&gt;
&lt;meta property=&quot;og:type&quot; content=&quot;&lt;?php if (get_permalink() === &#039;http://www.yukun.info/&#039;) { echo &#039;website&#039;; } else { echo &#039;article&#039;; } ?&gt;&quot; /&gt;
&lt;meta property=&quot;og:url&quot; content=&quot;&lt;?php the_permalink(); ?&gt;&quot; /&gt;
&lt;meta property=&quot;og:image&quot; content=&quot;http://www.yukun.info/wp-content/uploads/EXA-i.jpg&quot; /&gt;
&lt;meta property=&quot;og:locale&quot; content=&quot;ja_JP&quot; /&gt;
&lt;meta property=&quot;og:description&quot; content=&quot;&lt;?php echo mb_substr(strip_tags($post-&gt;post_content), 0, 100, &#039;UTF-8&#039;) . &#039;...&#039;; ?&gt;&quot; /&gt;
&lt;meta property=&quot;fb:app_id&quot; content=&quot;108593135872970&quot; /&gt;
&lt;meta property=&quot;fb:admins&quot; content=&quot;100001238982542&quot; /&gt;

＜後略＞
</pre>
<p>工夫したところは、私のブログの構成上はトップページでget_the_title()を実行すると&#8221;Home&#8221;になるので、その場合はブログ名に置換することや、ブログの個別ページを表示する場合はog:typeを&#8221;article&#8221;とし、トップページは&#8221;blog&#8221;とするよう、条件式を挿入したところかな。og:descriptionタグについては文字数調整＋タグを除去の上格納する。</p>
<p>また、bodyタグ直下にPluginページで取得した以下のコードを埋め込む。</p>
<pre>
&lt;div id=&quot;fb-root&quot;&gt;&lt;/div&gt;
&lt;script&gt;(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = &quot;//connect.facebook.net/ja_JP/all.js#xfbml=1&amp;appId=108593135872970&quot;;
  fjs.parentNode.insertBefore(js, fjs);
}(document, &#039;script&#039;, &#039;facebook-jssdk&#039;));&lt;/script&gt;
</pre>
<h4>コメント(comments.php)</h4>
<p>次に実際にLikeボタンやcommentボックスのコードを埋め込むが、私のブログではcomments.phpの頭にコードを挿入することで、デザイン上収まった。</p>
<pre>
&lt;h3 id=&quot;reply-title&quot;&gt;Facebook comments:&lt;/h3&gt;
&lt;div class=&quot;fb-like&quot;
data-href=&quot;&lt;?php the_permalink(); ?&gt;&quot;
data-send=&quot;true&quot;
data-width=&quot;550&quot;
data-show-faces=&quot;true&quot;
data-font=&quot;arial&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;fb-comments&quot;
data-href=&quot;&lt;?php the_permalink(); ?&gt;&quot;
data-num-posts=&quot;5&quot;
data-width=&quot;550&quot;&gt;
&lt;/div&gt;
</pre>
<h3>4. Debugツールで設定内容確認</h3>
<p>以下のリンク先ページでブログ記事のURLを入力するとそのページの設定内容が確認できる。<br />
<a href="https://developers.facebook.com/tools/debug">Debugger &#8211; Facebook開発者</a><br />
仮に問題があった場合は Warning で対処メッセージが表示される為、愚直に対応する(^_^;)</p>
<h4>実行例</h4>
<p><a href="http://www.yukun.info/wp-content/uploads/facebook_object_debugger_result.png"><img src="http://www.yukun.info/wp-content/uploads/facebook_object_debugger_result.png" alt="WordPress: Facebook OGP Social Plugins(Like、コメント)の設置方法" title="facebook_object_debugger_result" width="400" height="475" class="alignnone size-full wp-image-2103" /></a></p>
<p>何かご質問があればお気軽にコメント頂ければと思います。</p>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2008/10/wordpress-plugin-similar-posts.html" rel="bookmark" title="2008年10月12日">WordPress: Similar Posts の紹介と設定例 &#8211; 関連記事[投稿|エントリ]を表示するプラグイン</a></li>
<li><a href="http://www.yukun.info/blog/2008/10/recommend-wordpress-popular-posts-plugin-for-shosira.html" rel="bookmark" title="2008年10月13日">shosira さんへのお勧めプラグイン「Popular Posts」</a></li>
<li><a href="http://www.yukun.info/blog/2012/01/wordpress-remove-filter-url-link.html" rel="bookmark" title="2012年1月4日">WordPress: 本文・コメント中のURLの自動リンクを抑制する &#8211; make_clickable</a></li>
<li><a href="http://www.yukun.info/blog/2011/08/wordpress-file-access.html" rel="bookmark" title="2011年8月9日">WordPress: 解決策→「要求されたアクションを実行するには、WordPress が Web サーバーにアクセスする必要があります。」</a></li>
<li><a href="http://www.yukun.info/blog/2012/01/android-eclipse-build-error.html" rel="bookmark" title="2012年1月6日">Android: Eclipseビルドエラーの対処例 &#8211; Error generating final archive</a></li>
</ul>
<p><!-- Similar Posts took 10.463 ms --></p>
<p><a href="http://www.yukun.info/blog/2012/01/wordpress-facebook-ogp-plugins.html">WordPress: Facebook OGP Social Plugins(Like、コメント)の設置方法</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yukun.info/blog/2012/01/wordpress-facebook-ogp-plugins.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

