<?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, 26 Jan 2012 03:33:59 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<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>
<p>何かご質問等ありましたらお気軽にコメント頂ければと思います。</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 21.342 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.680 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/2008/11/actionscript-flash-load-server-image-file.html" rel="bookmark" title="2008年11月21日">ActionScript: 画像ファイルをダウンロードして表示 &#8211; Loaderクラス</a></li>
</ul>
<p><!-- Similar Posts took 7.944 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.847 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>
		<item>
		<title>Linux: RedmineとSubversionのインストール・設定例</title>
		<link>http://www.yukun.info/blog/2011/12/linux-redmine-subversion-install.html</link>
		<comments>http://www.yukun.info/blog/2011/12/linux-redmine-subversion-install.html#comments</comments>
		<pubDate>Mon, 05 Dec 2011 15:00:09 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Redmine]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Setting]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://www.yukun.info/?p=2041</guid>
		<description><![CDATA[Linux(ここではCentOS)にプロジェクト管理ソフトウェアであるRedmineとバージョン管理システムであるSubversionのインストール方法と設定例を以下に紹介。想定としては、WebサーバやDB以外は何も設定 &#8230; <a href="http://www.yukun.info/blog/2011/12/linux-redmine-subversion-install.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2011/12/linux-redmine-subversion-install.html">Linux: RedmineとSubversionのインストール・設定例</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Linux(ここではCentOS)にプロジェクト管理ソフトウェアであるRedmineとバージョン管理システムであるSubversionのインストール方法と設定例を以下に紹介。想定としては、WebサーバやDB以外は何も設定されていないサーバ環境を対象とした手順。すでにインストールしているものや設定済みのものは適時読み飛ばし下さい。<br />
※参考サイトは記事の末尾をご参照。</p>
<p><span id="more-2041"></span></p>
<h3>1. 開発環境のインストール</h3>
<p>RubyやPassengerのインストールに必要なコンパイラをインストールする。</p>
<pre>
# yum groupinstall "Development Tools"
# yum install openssl-devel readline-devel zlib-devel curl-devel
</pre>
<h3>2. Rubyのインストール</h3>
<p>Redmineを動作させる上でパフォーマンスの良いruby-enterpriseを以下のサイトよりダウンロード。<br />
<a href="http://www.rubyenterpriseedition.com/download.html" target="_blank">Ruby Enterprise Edition</a></p>
<pre>
# tar xzvf ruby-enterprise-1.8.7-2011.03.tar.gz
# ruby-enterprise-1.8.7-2011.03/installer --dont-install-useful-gems --no-dev-docs
# ruby -v
ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2011.03
</pre>
<h3>3. rubygemsのインストール</h3>
<p>下記のサイトよりダウンロードする。<br />
<a href="http://rubyforge.org/frs/?group_id=126" target="_blank">RubyForge: RubyGems: Project Filelist</a></p>
<pre>
# tar zxvf rubygems-1.5.2.tgz
# cd rubygems-1.5.2
# ruby setup.rb config
# ruby setup.rb setup
# ruby setup.rb install
</pre>
<h3>4. gemで必要コンポーネントのインストール</h3>
<pre>
# gem install rack -v=1.1.1 --no-rdoc --no-ri
# gem install rake -v=0.8.7 --no-rdoc --no-ri
# gem install i18n -v=0.4.2 --no-rdoc --no-ri
# gem install mysql -- --with-mysql-lib=/usr/lib/mysql --no-rdoc --no-ri
</pre>
<p>仮に以下のエラーが発生した場合。。。</p>
<pre>
Fetching: mysql-2.8.1.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
        ERROR: Failed to build gem native extension.

        /usr/local/bin/ruby extconf.rb
checking for mysql_ssl_set()... no
checking for rb_str_set_len()... no
checking for rb_thread_start_timer()... no
checking for mysql.h... no
checking for mysql/mysql.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.
</pre>
<p>パッケージのインストール不足の為、yumでmysql-server mysql-develを依存含めてインストールする。<br />
MySQLのインストールリポジトリをremiやeplpとしている場合はbaseと競合しないように以下のように設定する。</p>
<pre>
# vi /etc/yum.repos.d/CentOS-Base.repo
[base]
priority=1
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&#038;arch=$basearch&#038;repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
exclude=mysql*　←mysqlで始まるものは除外(複数指定したいときはカンマ「,」で区切る)
# yum --enablerepo=remi,eplp install mysql-server mysql-devel
</pre>
<p>その上で、再度以下のコマンドを実行する。</p>
<pre>
# gem install mysql -- --with-mysql-lib=/usr/lib/mysql --no-rdoc --no-ri
</pre>
<h3>5. Webサーバ(Apache)のインストール</h3>
<p>とは言いつつも、ここは既にインストール＆設定されている前提で進める。</p>
<pre>
# yum install httpd httpd-devel
</pre>
<h3>6. MySQLのDB作成・設定</h3>
<p>MySQLも基本的な文字コードなどのmy.cnf設定は済んでいる前提で進める。</p>
<pre>
# mysql -u root -p
mysql> show variables like 'character_set%';　←為念の確認
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8                       |
| character_set_connection | utf8                       |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | utf8                       |
| character_set_server     | utf8                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
mysql> create database ＜DB名＞ default character set utf8;
mysql> grant all on ＜DB名＞.* to ＜DBユーザー名＞ identified by '＜DBパスワード＞';
mysql> flush privileges;
mysql> exit;
</pre>
<h3>7. Redmineのインストール</h3>
<p>以下のサイトからRedmineをダウンロードする。</p>
<p><a href="http://rubyforge.org/frs/?group_id=1850" target="_blank">RubyForge: Redmine: ファイルリスト</a></p>
<pre>
# tar xzvf redmine-1.2.2.tar.gz
# mv redmine-1.2.2 /var/lib/redmine
# cd /var/lib/redmine
# vi config/database.yml
production:
  adapter: mysql
  database: ＜DB名＞
  host: localhost
  username: ＜DBユーザー名＞
  password: ＜DBパスワード＞
  encoding: utf8

# cp config/configuration.yml.example config/configuration.yml
# vi config/configuration.yml
production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: "localhost"
      port: 25
      domain: 'example.com'
</pre>
<p>DBやメールの設定をファイルに書き込んだ後は、セッションキーの作成および、DBテーブルの作成・初期化を以下のコマンドで実施する。</p>
<pre>
# rake generate_session_store
# rake db:migrate RAILS_ENV=production
</pre>
<h3>8. Passengerをインストール</h3>
<p>Apache上でrailsを使用する為にPassengerをインストール・設定する。</p>
<pre>
# gem install passenger --no-rdoc --no-ri
# passenger-install-apache2-module
</pre>
<p>コマンド実行後最後に出力される下記のパスをメモ帳などに控えておく。<br />
(LoadModule passenger_module、PassengerRoot、PassengerRuby )</p>
<blockquote><p>
Please edit your Apache configuration file, and add these lines:</p>
<p>   LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.9/ext/apache2/mod_passenger.so<br />
   PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.9<br />
   PassengerRuby /usr/local/bin/ruby</p>
<p>After you restart Apache, you are ready to deploy any number of Ruby on Rails<br />
applications on Apache, without any further Ruby on Rails-specific<br />
configuration!
</p></blockquote>
<h3>9. Apacheの設定(サブディレクトリ配置の場合)</h3>
<p>例としてwww.example.comドメインの配下www.example.com/redmine_top/がredmineのトップページとする設定例を紹介する。</p>
<pre>
# vi /etc/httpd/conf.d/passenger.conf ←Passenger用の設定ファイルを作成
#（上述で表示されたパスを記述する）
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.9/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.9
PassengerRuby /usr/local/bin/ruby

RailsBaseURI /redmine_top

Header always unset "X-Powered-By"
Header always unset "X-Rack-Cache"
Header always unset "X-Content-Digest"
Header always unset "X-Runtime"

PassengerMaxPoolSize 20
PassengerMaxInstancesPerApp 4
PassengerPoolIdleTime 3600
PassengerUseGlobalQueue on
PassengerHighPerformance on
PassengerStatThrottleRate 10
RailsSpawnMethod smart
RailsAppSpawnerIdleTime 86400
RailsFrameworkSpawnerIdleTime 0
</pre>
<p>最後に権限・パス設定後、それらを反映する。</p>
<pre>
# chown -R apache:apache /var/lib/redmine
# ln -s /var/lib/redmine/public /var/www/html/redmine_top
# /etc/init.d/httpd configtest
# /etc/init.d/httpd graceful
</pre>
<h3>10. Redmineへアクセス</h3>
<p>www.example.com/redmine_top/にアクセスするとredmineのトップページが表示されればOK。まずはユーザー名、パスワードをadmin, adminで入りユーザ名、パスワードを任意の文字列に変更の上、各種設定を確認していく。</p>
<h3>11. Subversionのインストールとリポジトリの作成</h3>
<p>先ずは、インストールとリポジトリの作成を実施。</p>
<pre>
# yum install subversion
# mkdir /var/lib/svn
# svnadmin create /var/lib/svn/＜リポジトリ名＞
# chown -R apache:apache /var/lib/svn/＜リポジトリ名＞
</pre>
<p>続いてWeb経由でリポジトリにアクセスかつBasic認証機能で閲覧者を制限するには、</p>
<pre>
# yum install mod_dav_svn
# touch /etc/httpd/conf/svn_auth_file
# htpasswd /etc/httpd/conf/svn_auth_file ＜任意のユーザー名＞
New password: ＜タイプ＞
Re-type new password: ＜もう一度タイプ＞
Adding password for user ＜任意のユーザー名＞
</pre>
<pre>
# vi /etc/httpd/conf/httpd.conf
</pre>
<p>↓下記の設定をファイル末尾に追加</p>
<pre>
&lt;Location /svn&gt;
        DAV svn
        SVNParentPath /var/lib/svn
        AuthType Basic
        AuthName &quot;svn repository&quot;
        AuthUserFile /etc/httpd/conf/svn_auth_file
        Require valid-user
&lt;/Location&gt;
</pre>
<p>www.example.com/svn/＜リポジトリ名＞ でアクセス可能となる。Basic認証を用いてredmineと連携する場合は、redmine用の認証ユーザーを別途作成しredmineに設定すればOK。</p>
<p>何かご質問などありましたら、ご連絡下さい。</p>
<h3>参考サイト</h3>
<ul>
<li><a href="http://blog.redmine.jp/articles/redmine-1_2-installation_centos/" target="_blank">Redmine 1.2をCentOS5.6にインストールする手順</a>
</li>
</ul>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2008/12/how-to-write-apache-conf.html" rel="bookmark" title="2008年12月25日">Apacheでよく使うコマンドと設定項目</a></li>
<li><a href="http://www.yukun.info/blog/2010/03/java-install-sen-windows.html" rel="bookmark" title="2010年3月25日">Java: 形態素解析Senをインストール(Windows編)</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>
<li><a href="http://www.yukun.info/blog/2008/01/cygwin-cron.html" rel="bookmark" title="2008年1月8日">Cygwinでcronをインストール</a></li>
<li><a href="http://www.yukun.info/blog/2008/09/fedora-yum-install-gnome.html" rel="bookmark" title="2008年9月15日">FedoraにGUI環境GNOMEをyumでインストール</a></li>
</ul>
<p><!-- Similar Posts took 10.825 ms --></p>
<p><a href="http://www.yukun.info/blog/2011/12/linux-redmine-subversion-install.html">Linux: RedmineとSubversionのインストール・設定例</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/2011/12/linux-redmine-subversion-install.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>携帯メールが自動受信できない原因・対処法</title>
		<link>http://www.yukun.info/blog/2011/10/mail-auto-receive.html</link>
		<comments>http://www.yukun.info/blog/2011/10/mail-auto-receive.html#comments</comments>
		<pubDate>Sun, 23 Oct 2011 13:15:09 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.yukun.info/?p=2033</guid>
		<description><![CDATA[先日保有している携帯電話(005SH [Android2.3])のメールが自動的に受信できなくなったので、以下の方法試みたが一向に改善しなかった。 メール設定を全文受信 迷惑メールフィルタを切る 携帯電話の初期化 USI &#8230; <a href="http://www.yukun.info/blog/2011/10/mail-auto-receive.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2011/10/mail-auto-receive.html">携帯メールが自動受信できない原因・対処法</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>先日保有している携帯電話(005SH [Android2.3])のメールが自動的に受信できなくなったので、以下の方法試みたが一向に改善しなかった。</p>
<ol>
<li>メール設定を全文受信
</li>
<li>迷惑メールフィルタを切る
</li>
<li>携帯電話の初期化
</li>
<li>USIMの取り外し・取り付け
</li>
</ol>
<p>ショップに相談したところ代替機を貸与されたのだが代替機でも同様の事象が発生した為、USIMデータが破損していると推定し、USIMの交換を実施頂く。交換後は正常にメールが自動受信できるようになった。</p>
<p>スタッフにUSIMの破損原因を伺ったところ、磁気の影響で壊れることもあるとのこと。携帯をPASMOと同じポケットに入れていたのが不味かったのかな。</p>
<p>端末本体に原因がない事象の為、うかつにメーカー修理に出すと2週間は代替機を使わなければならないので、修理前にはUSIMの検証もしておくとベター。<br />
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2009/06/white-list-fiters-spam-mail.html" rel="bookmark" title="2009年6月28日">携帯の迷惑メールフィルタのホワイトリスト（ドメイン）設定例</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/2008/05/out-of-memory-error.html" rel="bookmark" title="2008年5月8日">java.lang.OutOfMemoryErrorが発生する原因とその解決法の一例</a></li>
<li><a href="http://www.yukun.info/blog/2010/03/android-mksdcard-could-not-create-file-aborting.html" rel="bookmark" title="2010年3月14日">Android: mksdcardコマンドのabortingの解決法 &#8211; could not create file &#8216;&#8230;&#8217;, aborting&#8230;</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 8.738 ms --></p>
<p><a href="http://www.yukun.info/blog/2011/10/mail-auto-receive.html">携帯メールが自動受信できない原因・対処法</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/2011/10/mail-auto-receive.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android: 005SHをデバッグモードで認識させる</title>
		<link>http://www.yukun.info/blog/2011/09/android-005sh-debug.html</link>
		<comments>http://www.yukun.info/blog/2011/09/android-005sh-debug.html#comments</comments>
		<pubDate>Sun, 11 Sep 2011 12:20:59 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Setting]]></category>

		<guid isPermaLink="false">http://www.yukun.info/?p=1996</guid>
		<description><![CDATA[Androidのデバックはこれまでお古X06HTで実施していましたが、やはりいつも使う携帯(SHARP 005SH)でデバック・テストをしたい為、その環境準備を以下に記載。 手順 USBドライバのインストール SHARP &#8230; <a href="http://www.yukun.info/blog/2011/09/android-005sh-debug.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2011/09/android-005sh-debug.html">Android: 005SHをデバッグモードで認識させる</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Androidのデバックはこれまでお古X06HTで実施していましたが、やはりいつも使う携帯(SHARP 005SH)でデバック・テストをしたい為、その環境準備を以下に記載。</p>
<p><span id="more-1996"></span></p>
<h3>手順</h3>
<ol>
<li><a href="https://sh-dev.sharp.co.jp/android/modules/driver/list.php" target="_blank">USBドライバのインストール</a>
</li>
<li><a href="https://sh-dev.sharp.co.jp/android/modules/driver/" target="_blank">SHARP共通 ADB USBドライバのダウンロード</a></li>
<li>端末設定の“USBデバッグ”にチェックを入れ、有効</li>
<li>携帯をPCに接続する。ここでドライバのインストール画面が起動した場合は、ダウンロードしたADB USBドライバのフォルダを選択。<br />
インストール画面が起動しなかった場合は、デバイスマネージャからインストールする。</p>
<p><a href="http://www.yukun.info/wp-content/uploads/android_ADB_interface.png"><img src="http://www.yukun.info/wp-content/uploads/android_ADB_interface.png" alt="" title="android_ADB_interface" width="400" height="449" class="alignnone size-full wp-image-1999" /></a></p>
</li>
</ol>
<p>インストール後Eclipseを確認するとデバイスが認識されていることが確認できる。</p>
<p><a href="http://www.yukun.info/wp-content/uploads/android_device_list.png"><img src="http://www.yukun.info/wp-content/uploads/android_device_list.png" alt="" title="android_device_list" width="400" height="190" class="alignnone size-full wp-image-2000" /></a></p>
<p>試しに現在開発中の英単語学習アプリのキャプチャを取得したので以下に紹介します。</p>
<p><iframe src="http://rcm-jp.amazon.co.jp/e/cm?lt1=_blank&#038;bc1=F8F8F8&#038;IS2=1&#038;bg1=F8F8F8&#038;fc1=000000&#038;lc1=0000FF&#038;t=ref22-22&#038;o=9&#038;p=8&#038;l=as4&#038;m=amazon&#038;f=ifr&#038;ref=ss_til&#038;asins=B005BYXWW8" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" align="right"></iframe></p>
<p><a href="http://www.yukun.info/wp-content/uploads/device-2011-09-11-205138.png"><img src="http://www.yukun.info/wp-content/uploads/device-2011-09-11-205138.png" alt="" title="device-2011-09-11-205138" width="250" height="416" class="alignnone size-full wp-image-2001" /></a></p>
<p>尚、アプリの開発進捗は今後Twitterでつぶやいていくかも。</p>
<p>余談ですが、先日買った携帯カバーが優秀。つけると携帯の電池熱のじんわりやテカテカツルツルの指紋汚れが合わせて解消します。お試しあれ。</p>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<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/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/2011/02/vmware-player-centos.html" rel="bookmark" title="2011年2月23日">VMware PlayerでCentOSをインストール</a></li>
<li><a href="http://www.yukun.info/blog/2010/03/java-install-sen-windows.html" rel="bookmark" title="2010年3月25日">Java: 形態素解析Senをインストール(Windows編)</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 9.912 ms --></p>
<p><a href="http://www.yukun.info/blog/2011/09/android-005sh-debug.html">Android: 005SHをデバッグモードで認識させる</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/2011/09/android-005sh-debug.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: 解決策→「要求されたアクションを実行するには、WordPress が Web サーバーにアクセスする必要があります。」</title>
		<link>http://www.yukun.info/blog/2011/08/wordpress-file-access.html</link>
		<comments>http://www.yukun.info/blog/2011/08/wordpress-file-access.html#comments</comments>
		<pubDate>Tue, 09 Aug 2011 11:11:46 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.yukun.info/?p=1971</guid>
		<description><![CDATA[事象 WordPressのプラグイン、テーマの自動更新をWebから実施する際に以下のメッセージが発生し、自動更新が中断。 メッセージ 要求されたアクションを実行するには、WordPress が Web サーバーにアクセス &#8230; <a href="http://www.yukun.info/blog/2011/08/wordpress-file-access.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2011/08/wordpress-file-access.html">WordPress: 解決策→「要求されたアクションを実行するには、WordPress が Web サーバーにアクセスする必要があります。」</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<h4>事象</h4>
<p>WordPressのプラグイン、テーマの自動更新をWebから実施する際に以下のメッセージが発生し、自動更新が中断。</p>
<h4>メッセージ</h4>
<blockquote><p>
要求されたアクションを実行するには、WordPress が Web サーバーにアクセスする必要があります。<br />
次に進むには FTP の接続情報を入力してください。 接続情報が思い出せない場合は、ホスティング担当者に問い合わせてください。
</p></blockquote>
<h4>原因・対処法</h4>
<p>apacheユーザーにpluginディレクトリへの追加や更新権限が無い為。解決策としてはwordpressの最上位フォルダ上でchown -R apache <em>＜フォルダパス＞</em>を実行しapacheの権限を付与することでOK。</p>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2008/12/how-to-write-apache-conf.html" rel="bookmark" title="2008年12月25日">Apacheでよく使うコマンドと設定項目</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/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/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/2008/10/wordpress-plugin-similar-posts.html" rel="bookmark" title="2008年10月12日">WordPress: Similar Posts の紹介と設定例 &#8211; 関連記事[投稿|エントリ]を表示するプラグイン</a></li>
</ul>
<p><!-- Similar Posts took 8.804 ms --></p>
<p><a href="http://www.yukun.info/blog/2011/08/wordpress-file-access.html">WordPress: 解決策→「要求されたアクションを実行するには、WordPress が Web サーバーにアクセスする必要があります。」</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/2011/08/wordpress-file-access.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux: シェル(Bash)の機能の概要 &#8211; 復習のための覚書(前編)</title>
		<link>http://www.yukun.info/blog/2011/08/linux-bash.html</link>
		<comments>http://www.yukun.info/blog/2011/08/linux-bash.html#comments</comments>
		<pubDate>Mon, 08 Aug 2011 13:10:19 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://www.yukun.info/?p=1949</guid>
		<description><![CDATA[シェルとは ユーザーとカーネルの間のインターフェイス。ユーザーが入力したコマンドや文字列のメタキャラクタを解釈するインタープリタ。 ログインシェル ユーザーがシステムへログインしたときに起動するシェル。ログインするシェル &#8230; <a href="http://www.yukun.info/blog/2011/08/linux-bash.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2011/08/linux-bash.html">Linux: シェル(Bash)の機能の概要 &#8211; 復習のための覚書(前編)</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<h4>シェルとは</h4>
<ul>
<li>ユーザーとカーネルの間のインターフェイス。ユーザーが入力したコマンドや文字列のメタキャラクタを解釈するインタープリタ。
</li>
</ul>
<p><span id="more-1949"></span></p>
<h4>ログインシェル</h4>
<ul>
<li>ユーザーがシステムへログインしたときに起動するシェル。ログインするシェルを変更する場合はchshコマンドを使用。
</li>
<li>ログインシェル上でさらに別のシェルを起動することができるが、ユーザーが使用することができるのは最後に起動したシェルのみ。
</li>
<li>ログインシェルと後に起動したシェルの見分け方はps -f。最初にハイフン「-」がついているシェルがログインシェルのプロセス。
</li>
</ul>
<pre>
$ ps -f
UID        PID  PPID  C STIME TTY          TIME CMD
xxx      13450 13449  0 21:26 pts/1    00:00:00 -bash
xxx     13476 13450  0 21:26 pts/1    00:00:00 bash
xxx      13499 13476  0 21:27 pts/1    00:00:00 ksh
xxx      13501 13499  0 21:27 pts/1    00:00:00 ps –f
</pre>
<h4>シェルの種類</h4>
<ul>
<li>古いものから順にBourneシェル、Cシェル、Kornシェル、Bashとなる。
</li>
<li>BashはUNIX上のBourneシェル互換としてGUNより開発されたLinux標準シェル。
</li>
<li>LinuxでのBashの起動は$ shで(LinuxではBourneシェルはライセンス上使用できない為)。
</li>
<li>↓確かにリンクがbashへと張られている(CentOSで実行)
</li>
</ul>
<pre>
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4  7月  9 15:06 /bin/sh -> bash
</pre>
<h4>シェルスクリプトの使いどころ</h4>
<ul>
<li>Linuxコマンドの組み合わせで実現できる処理(grep, sort, sed, awk, etc…)であればシェルスクリプトを使用。特にテキスト行の処理など。
</li>
<li>数値や文字列ごとの処理を使用する場合は型変換等の負荷のため実行速度が低下するため、C言語等の高級言語を使用するのが望ましい。
</li>
</ul>
<h4>シェルスクリプトの作成と実行方法</h4>
<ul>
<li>vi, vim等のテキストエディタで作成。対象のスクリプトファイルに実行権限を付与。
</li>
<li>chmod u+x xxxxxx.sh か、
</li>
<li>chmod 744 xxxxxx.sh でOK.
</li>
<li>実行は ./xxxxxx.sh　ただし、カレントディレクトリにpathが通っている場合は先頭の./は不要となる。
</li>
<li>スクリプトの1行目のシェルの指定(絶対パス)は、#!/bin/sh, #!/bin/bashのどちらを用いてもLinux上ではBashで実行される。
</li>
<li>1行目を省略した場合は、LinuxではBashで実行される。
</li>
<li>#のみを記述すると、現在起動中のシェルと同じシェルで実行される。
</li>
</ul>
<h4>コマンドの種類</h4>
<ul>
<li>組み込みコマンド：シェル内部のコマンド(cd, exitなど)
</li>
<li>一般コマンド：実行形式ファイルのコマンド(cp, lsなど)。/binや/usr/binディレクトリ以下に実行ファイルが存在する。
</li>
<li>組み込み・一般の判別にはtypeコマンドを使用する。
</li>
<li>以下にtypeコマンドの実行例。
</li>
</ul>
<pre>
$ type cp
cp is /bin/cp
$ type cd
cd is a shell builtin
</pre>
<ul>
<li>一般コマンドがシェルで実行されると、子プロセス上で実行される。
</li>
<li>実行順序としては、一般コマンド実行時→親プロセスのforkシステムコールによる子プロセスの生成→親プロセスのwaitシステムコールによる子プロセスの処理実行待ち→子プロセスのexecシステムコールによりコマンドのロード→コマンドプログラムのexitシステムコールにより子プロセスの終了→親プロセスの後続の処理を実行…。
</li>
<li>基本的にシェルスクリプトも実行時に特に指定がなければ子プロセスを生成し実行される。
</li>
<li>シェルの変数定義のスコープはプロセス毎。
</li>
</ul>
<h4>入出力リダイレクション</h4>
<ul>
<li>標準入力(0)、標準出力(1)、標準エラー出力(2)。リダイレクト記号はそれぞれ<, 1>, 2>であるが、標準出力の1は省略可能のため、>で可能。
</li>
<li> 2>&#038;1の場合は、コマンド実行時のエラーを標準出力(1)に割り当て。
</li>
<li> $ find / -name help > findlist 2>&#038;1
</li>
</ul>
<h4>パイプによるコマンドの連携</h4>
<ul>
<li>パイプ「|」は→とみた方が直感的にわかりやすい。|の左で実行されたコマンドの出力をパイプの後に指定したコマンドの入力として使用。
</li>
<li># grep Invalid /var/log/secure | wc –l
</li>
</ul>
<h4>その他のシェルのメタキャラクタ</h4>
<ul>
<li>連続実行：１行内でのコマンドの連続実行をする場合はコマンド間にセミコロンを挿入「;」。(C言語のステートメント終了みたいだぁ)
</li>
<li>グループ化：()のコマンドを子プロセスを生成して実行。cd /; pwd ; lsの三種コマンドに括弧をつけるとカレントディレクトリを変更せずに実行結果を取得できる。
</li>
<li>親プロセスの環境の変更したくない場合や複数コマンドの実行結果を出力したい場合に利用。
</li>
</ul>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2011/02/shell-for-wordlist-command.html" rel="bookmark" title="2011年2月6日">Shell Script: for文 &#8211; ワードリストに変数、コマンドを使用</a></li>
<li><a href="http://www.yukun.info/blog/2011/02/shell-script-test.html" rel="bookmark" title="2011年2月13日">Shell Script: testコマンドによる条件判定 (数値、文字列)</a></li>
<li><a href="http://www.yukun.info/blog/2008/01/shell-script-kill-process-2.html" rel="bookmark" title="2008年1月10日">プロセスの監視＆自動復旧(簡易版)</a></li>
<li><a href="http://www.yukun.info/blog/2008/01/shell-script-kill-process.html" rel="bookmark" title="2008年1月7日">シェルスクリプトでプロセスを監視し自動実行＆自動kill</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.694 ms --></p>
<p><a href="http://www.yukun.info/blog/2011/08/linux-bash.html">Linux: シェル(Bash)の機能の概要 &#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/2011/08/linux-bash.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash: 数値と文字列の判別</title>
		<link>http://www.yukun.info/blog/2011/08/bash-if-num-str.html</link>
		<comments>http://www.yukun.info/blog/2011/08/bash-if-num-str.html#comments</comments>
		<pubDate>Fri, 05 Aug 2011 12:40:06 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[RegExp]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://www.yukun.info/?p=1944</guid>
		<description><![CDATA[手っ取り早く数字文字列とそれ以外の文字列を判別する条件式は以下のとおり。 コード #!/bin/sh if expr "$1" : '[0-9]*' > /dev/null ; then echo "数値です" else &#8230; <a href="http://www.yukun.info/blog/2011/08/bash-if-num-str.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2011/08/bash-if-num-str.html">Bash: 数値と文字列の判別</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>手っ取り早く数字文字列とそれ以外の文字列を判別する条件式は以下のとおり。</p>
<h3>コード</h3>
<pre>
#!/bin/sh

if expr "$1" : '[0-9]*' > /dev/null ; then
  echo "数値です"
else
  echo "数値以外です"
fi
</pre>
<h3>実行結果</h3>
<pre>
$ ./if_numstr.sh 123
数値です
$ ./if_numstr.sh abc
数値以外です
</pre>
<h3>解説</h3>
<p>exprで正規表現を用いて数値を判定。exprは内部コード以外にも標準出力にも結果を返すので、不要なそれは/dev/nullへリダイレクトする。<br />
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2011/08/linux-bash.html" rel="bookmark" title="2011年8月8日">Linux: シェル(Bash)の機能の概要 &#8211; 復習のための覚書(前編)</a></li>
<li><a href="http://www.yukun.info/blog/2011/02/shell-script-test.html" rel="bookmark" title="2011年2月13日">Shell Script: testコマンドによる条件判定 (数値、文字列)</a></li>
<li><a href="http://www.yukun.info/blog/2011/02/shell-for-wordlist-command.html" rel="bookmark" title="2011年2月6日">Shell Script: for文 &#8211; ワードリストに変数、コマンドを使用</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>
<li><a href="http://www.yukun.info/blog/2008/01/shell-script-kill-process-2.html" rel="bookmark" title="2008年1月10日">プロセスの監視＆自動復旧(簡易版)</a></li>
</ul>
<p><!-- Similar Posts took 8.296 ms --></p>
<p><a href="http://www.yukun.info/blog/2011/08/bash-if-num-str.html">Bash: 数値と文字列の判別</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/2011/08/bash-if-num-str.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

