<?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/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>skill note</title>
	<atom:link href="http://y2-space.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://y2-space.com/blog</link>
	<description>身に着けたスキルをひたすらにアウトぷっと</description>
	<lastBuildDate>Mon, 13 Dec 2010 16:21:55 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://y2-space.com/blog/feed/" />
		<item>
		<title>【CodeIgniter】BCCバッチモード使えるやん</title>
		<link>http://y2-space.com/blog/it-skil/framework/codeigniter/314/</link>
		<comments>http://y2-space.com/blog/it-skil/framework/codeigniter/314/#comments</comments>
		<pubDate>Mon, 13 Dec 2010 16:21:55 +0000</pubDate>
		<dc:creator>yosuke</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>

		<guid isPermaLink="false">http://y2-space.com/blog/?p=314</guid>
		<description><![CDATA[CodeIgniterにはバッチモードなるものが存在するらしい。 マニュアルには詳しく載っていなかったので、実際にEmailクラスを探索してみた。 該当箇所はここ &#160;&#60;?php &#160; function bcc($bcc, $limit = '') &#160; { &#160; if ($limit != '' &#38;&#38; is_numeric($limit)) &#160; { &#160; $this-&#62;bcc_batch_mode = TRUE; &#160; $this-&#62;bcc_batch_size = $limit; &#160; } &#160; &#160; $bcc = $this-&#62;_str_to_array($bcc); &#160; $bcc = $this-&#62;clean_email($bcc); &#160; &#160; if ($this-&#62;validate) &#160; { &#160; $this-&#62;validate_email($bcc); &#160; } &#160; &#160; if (($this-&#62;_get_protocol() == [...]]]></description>
			<content:encoded><![CDATA[<p>CodeIgniterにはバッチモードなるものが存在するらしい。<br />
マニュアルには詳しく載っていなかったので、実際にEmailクラスを探索してみた。</p>
<p>該当箇所はここ</p>
<div class="hl-surround" style="height:280px;"><ol class="hl-main" start=1><li>&nbsp;<span class="hl-inlinetags">&lt;?php</span></li>
<li>&nbsp;<span class="hl-inlinetags">	</span><span class="hl-reserved">function </span><span class="hl-identifier">bcc</span><span class="hl-brackets">(</span><span class="hl-var">$bcc</span><span class="hl-code">, </span><span class="hl-var">$limit</span><span class="hl-code"> = </span><span class="hl-quotes">''</span><span class="hl-brackets">)</span></li>
<li>&nbsp;<span class="hl-brackets">	{</span></li>
<li>&nbsp;<span class="hl-brackets">		</span><span class="hl-reserved">if </span><span class="hl-brackets">(</span><span class="hl-var">$limit</span><span class="hl-code"> != </span><span class="hl-quotes">''</span><span class="hl-code"> &amp;&amp; </span><span class="hl-identifier">is_numeric</span><span class="hl-brackets">(</span><span class="hl-var">$limit</span><span class="hl-brackets">))</span></li>
<li>&nbsp;<span class="hl-brackets">		{</span></li>
<li>&nbsp;<span class="hl-brackets">			</span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">bcc_batch_mode</span><span class="hl-code"> = </span><span class="hl-reserved">TRUE</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code">			</span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">bcc_batch_size</span><span class="hl-code"> = </span><span class="hl-var">$limit</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code">		</span><span class="hl-brackets">}</span></li>
<li>&nbsp;<span class="hl-brackets"></span></li>
<li>&nbsp;<span class="hl-brackets">		</span><span class="hl-var">$bcc</span><span class="hl-code"> = </span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">_str_to_array</span><span class="hl-brackets">(</span><span class="hl-var">$bcc</span><span class="hl-brackets">)</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code">		</span><span class="hl-var">$bcc</span><span class="hl-code"> = </span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">clean_email</span><span class="hl-brackets">(</span><span class="hl-var">$bcc</span><span class="hl-brackets">)</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code"></span></li>
<li>&nbsp;<span class="hl-code">		</span><span class="hl-reserved">if </span><span class="hl-brackets">(</span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">validate</span><span class="hl-brackets">)</span></li>
<li>&nbsp;<span class="hl-brackets">		{</span></li>
<li>&nbsp;<span class="hl-brackets">			</span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">validate_email</span><span class="hl-brackets">(</span><span class="hl-var">$bcc</span><span class="hl-brackets">)</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code">		</span><span class="hl-brackets">}</span></li>
<li>&nbsp;<span class="hl-brackets"></span></li>
<li>&nbsp;<span class="hl-brackets">		</span><span class="hl-reserved">if </span><span class="hl-brackets">((</span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">_get_protocol</span><span class="hl-brackets">()</span><span class="hl-code"> == </span><span class="hl-quotes">&quot;</span><span class="hl-string">smtp</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">) </span><span class="hl-reserved">OR </span><span class="hl-brackets">(</span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">bcc_batch_mode</span><span class="hl-code"> &amp;&amp; </span><span class="hl-identifier">count</span><span class="hl-brackets">(</span><span class="hl-var">$bcc</span><span class="hl-brackets">)</span><span class="hl-code"> &gt; </span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">bcc_batch_size</span><span class="hl-brackets">))</span></li>
<li>&nbsp;<span class="hl-brackets">		{</span></li>
<li>&nbsp;<span class="hl-brackets">			</span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">_bcc_array</span><span class="hl-code"> = </span><span class="hl-var">$bcc</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code">		</span><span class="hl-brackets">}</span></li>
<li>&nbsp;<span class="hl-brackets">		</span><span class="hl-reserved">else</span></li>
<li>&nbsp;<span class="hl-reserved">		</span><span class="hl-brackets">{</span></li>
<li>&nbsp;<span class="hl-brackets">			</span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">_set_header</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">Bcc</span><span class="hl-quotes">'</span><span class="hl-code">, </span><span class="hl-identifier">implode</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">, </span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-var">$bcc</span><span class="hl-brackets">))</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code">		</span><span class="hl-brackets">}</span></li>
<li>&nbsp;<span class="hl-brackets">	}</span></li>
<li>&nbsp;<span class="hl-brackets"></span><span class="hl-inlinetags">?&gt;</span></li></ol></div>
<p>引数を見てもわかるように<br />
$bcc：カンマ区切りのメールアドレス<br />
$limit：一度に送信するメールアドレス<br />
を引数として渡せば、何か以下繰り返して送ってくれるっぽい。</p>
<p>ちょっとテストしてみた。</p>
<div class="hl-surround" ><ol class="hl-main" start=1><li>&nbsp;<span class="hl-inlinetags">&lt;?php</span></li>
<li>&nbsp;<span class="hl-inlinetags"></span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">load</span><span class="hl-code">-&gt;</span><span class="hl-identifier">library</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">email</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code"></span></li>
<li>&nbsp;<span class="hl-code"></span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">email</span><span class="hl-code">-&gt;</span><span class="hl-identifier">from</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">your@example.com</span><span class="hl-quotes">'</span><span class="hl-code">, </span><span class="hl-quotes">'</span><span class="hl-string">Your Name</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code"></span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">email</span><span class="hl-code">-&gt;</span><span class="hl-identifier">to</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">someone@example.com</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">; </span></li>
<li>&nbsp;<span class="hl-code"></span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">email</span><span class="hl-code">-&gt;</span><span class="hl-identifier">bcc</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">test@hoge.com,uhouho@hoge.com,megaitai@hoge.com</span><span class="hl-quotes">'</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-brackets">)</span><span class="hl-code">; </span></li>
<li>&nbsp;<span class="hl-code"></span></li>
<li>&nbsp;<span class="hl-code"></span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">email</span><span class="hl-code">-&gt;</span><span class="hl-identifier">subject</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">Email Test</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code"></span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">email</span><span class="hl-code">-&gt;</span><span class="hl-identifier">message</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">Testing the email class.</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;	</span></li>
<li>&nbsp;<span class="hl-code"></span></li>
<li>&nbsp;<span class="hl-code"></span><span class="hl-var">$this</span><span class="hl-code">-&gt;</span><span class="hl-identifier">email</span><span class="hl-code">-&gt;</span><span class="hl-identifier">send</span><span class="hl-brackets">()</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code"></span><span class="hl-inlinetags">?&gt;</span></li></ol></div>
<p>bccに指定した3つのアドレスには問題なく送信されたが、<br />
分割して送られたのかが判断不可能だった。<br />
（やってみて気づいたが当たり前といえば当たり前だった）</p>
<p>まぁ多分いけそうですね。</p>
]]></content:encoded>
			<wfw:commentRss>http://y2-space.com/blog/it-skil/framework/codeigniter/314/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://y2-space.com/blog/it-skil/framework/codeigniter/314/" />
	</item>
		<item>
		<title>【CodeIgniter】さくらでForm_Validationが動かない・・・・</title>
		<link>http://y2-space.com/blog/it-skil/framework/codeigniter/310/</link>
		<comments>http://y2-space.com/blog/it-skil/framework/codeigniter/310/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 18:26:05 +0000</pubDate>
		<dc:creator>yosuke</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>

		<guid isPermaLink="false">http://y2-space.com/blog/?p=310</guid>
		<description><![CDATA[前回さくらのビジネスプロにCodeIgniterをインストールし、順調に開発を進めてた矢先、問題にぶつかった。 バリデーションが動かない・・・・ バリデーションにはじかれて入力画面にもどっても画面が真っ白な状態。 何故だ！とりあえず思い当たることころを再確認。 ・セットしたルールに間違いはないか？ ・form,urlヘルパーをロードしているか？ ・phpにミスはないか？ 　etc・・・・ 何もねー。ただ気になったのは$this->form_valiadtion->set_rulesに何もセットしないと動くことは動くということ。 いやーこうなったら根本を確認するしかないと思い、system/library/Form_Validation.phpを直接見て調査。 原因を発見・・・ここでした。 ・ ・ $this-&#62;CI-&#62;lang-&#62;load('form_validation'); ・ ・ この瞬間ピンときてsystem/language/japanese/form_valiadtion_lang.phpを確認。 記述はあっていたので、とりあえず文字コードをUTF8に変更。 動きました。文字コードの問題だったらしいです。 はずかしー。2hの稼働返せ。]]></description>
			<content:encoded><![CDATA[<p>前回さくらのビジネスプロにCodeIgniterをインストールし、順調に開発を進めてた矢先、問題にぶつかった。</p>
<p>バリデーションが動かない・・・・<br />
バリデーションにはじかれて入力画面にもどっても画面が真っ白な状態。</p>
<p>何故だ！とりあえず思い当たることころを再確認。<br />
・セットしたルールに間違いはないか？<br />
・form,urlヘルパーをロードしているか？<br />
・phpにミスはないか？<br />
　etc・・・・</p>
<p>何もねー。ただ気になったのは$this->form_valiadtion->set_rulesに何もセットしないと動くことは動くということ。<br />
いやーこうなったら根本を確認するしかないと思い、system/library/Form_Validation.phpを直接見て調査。</p>
<p>原因を発見・・・ここでした。</p>
<div class="hl-surround" ><div class="hl-main"><pre>・
・
$this-&gt;CI-&gt;lang-&gt;load('form_validation');
・
・</pre></div></div>
<p>
この瞬間ピンときてsystem/language/japanese/form_valiadtion_lang.phpを確認。<br />
記述はあっていたので、とりあえず文字コードをUTF8に変更。</p>
<p>動きました。文字コードの問題だったらしいです。</p>
<p>はずかしー。2hの稼働返せ。</p>
]]></content:encoded>
			<wfw:commentRss>http://y2-space.com/blog/it-skil/framework/codeigniter/310/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://y2-space.com/blog/it-skil/framework/codeigniter/310/" />
	</item>
		<item>
		<title>【CodeIgniter】さくらのレンタルサーバにCodeIgniterを入れてみた</title>
		<link>http://y2-space.com/blog/it-skil/programing/php/301/</link>
		<comments>http://y2-space.com/blog/it-skil/programing/php/301/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 18:10:02 +0000</pubDate>
		<dc:creator>yosuke</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://y2-space.com/blog/?p=301</guid>
		<description><![CDATA[最近CodeIgniterでとある団体のホームページを作ることになりました。 サーバはどうしようかな～と考えましたが、今後も大きくなりそうなのでさくらのビジネスプロに決定！ ってなわけでまずはさくらのレンタルサーバにCodeIgniterをぶち込むことから始めます。 １．CodeIgniterダウンロード まずは下記のリンクからCodeIgniterをダウンロード(2010/11/26現在のversionは1.7.2)して解凍します。 http://codeigniter.com/downloads/ ２．FTPでアップロード さくらのレンタルサーバへ解凍したフォルダごと/home/xxxxx/www直下にアップロード。 ３．Teratermでログイン cshが使いにくすぎるのでとりあえずbashにしました。 参考：http://www.hazama.nu/t2o2/archives/002697.shtml 落ち着いたらzsh入れます。 ４．Config直下のファイルを編集 さくらの環境に合わせてデータベース等の設定ファイルを編集します。 ５．vimインストール なんと（いや普通か）vimが入ってなかったので、インストールしました。 参考：http://dameninngenn.sblo.jp/article/35264757.html ※上記のサイトだとパスを通していないため、.bashrcに下記を追記。 PATH=&#34;$PATH&#34;&#34;:$HOME/local/bin ６．.htaccess設定 さくらのレンタルサーバだとURLルーティングに癖があるらしいので下記のサイトを参考に.htaccessを設定 参考：http://d.hatena.ne.jp/mcatm/20090415/1239807899 ちなみにこんな感じです。 RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond $1 !^(index\.php&#124;css&#124;robots\.txt&#124;js&#124;images) RewriteRule ^(.*)$ /index.php?/$1 [L] ７．動作確認 適当なcontrollerとviewを用意して動作確認。 おお！普通にいけた。 Symfonyのときはさくらに随分泣かされたのでちょっと感動。 これで開発できる環境が整ったので、一気に仕上げるぞ～]]></description>
			<content:encoded><![CDATA[<p>最近CodeIgniterでとある団体のホームページを作ることになりました。<br />
サーバはどうしようかな～と考えましたが、今後も大きくなりそうなのでさくらのビジネスプロに決定！</p>
<p>ってなわけでまずはさくらのレンタルサーバにCodeIgniterをぶち込むことから始めます。</p>
<p><strong>１．CodeIgniterダウンロード</strong><br />
まずは下記のリンクからCodeIgniterをダウンロード(2010/11/26現在のversionは1.7.2)して解凍します。<br />
<a href="http://codeigniter.com/downloads/">http://codeigniter.com/downloads/</a></p>
<p><strong>２．FTPでアップロード</strong><br />
さくらのレンタルサーバへ解凍したフォルダごと/home/xxxxx/www直下にアップロード。</p>
<p><strong>３．Teratermでログイン</strong><br />
cshが使いにくすぎるのでとりあえずbashにしました。<br />
参考：<a href="http://www.hazama.nu/t2o2/archives/002697.shtml">http://www.hazama.nu/t2o2/archives/002697.shtml</a><br />
落ち着いたらzsh入れます。</p>
<p><strong>４．Config直下のファイルを編集</strong><br />
さくらの環境に合わせてデータベース等の設定ファイルを編集します。</p>
<p><strong>５．vimインストール</strong><br />
なんと（いや普通か）vimが入ってなかったので、インストールしました。<br />
参考：<a href="http://dameninngenn.sblo.jp/article/35264757.html">http://dameninngenn.sblo.jp/article/35264757.html</a></p>
<p>※上記のサイトだとパスを通していないため、.bashrcに下記を追記。</p>
<div class="hl-surround" style="height:16.8px;"><div class="hl-main"><pre><span class="hl-default">PATH=&quot;$PATH&quot;&quot;:$HOME/local/bin</span></pre></div></div>
<p><strong>６．.htaccess設定</strong><br />
さくらのレンタルサーバだとURLルーティングに癖があるらしいので下記のサイトを参考に.htaccessを設定<br />
参考：<a href="http://d.hatena.ne.jp/mcatm/20090415/1239807899">http://d.hatena.ne.jp/mcatm/20090415/1239807899</a></p>
<p>ちなみにこんな感じです。</p>
<div class="hl-surround" ><div class="hl-main"><pre><span class="hl-default">RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(index\.php|css|robots\.txt|js|images)
RewriteRule ^(.*)$ /index.php?/$1 [L]</span></pre></div></div>
<p>７．動作確認<br />
適当なcontrollerとviewを用意して動作確認。<br />
おお！普通にいけた。<br />
Symfonyのときはさくらに随分泣かされたのでちょっと感動。</p>
<p>これで開発できる環境が整ったので、一気に仕上げるぞ～</p>
]]></content:encoded>
			<wfw:commentRss>http://y2-space.com/blog/it-skil/programing/php/301/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://y2-space.com/blog/it-skil/programing/php/301/" />
	</item>
		<item>
		<title>[CodeIgniter]URLのindex.phpを消す</title>
		<link>http://y2-space.com/blog/it-skil/programing/php/295/</link>
		<comments>http://y2-space.com/blog/it-skil/programing/php/295/#comments</comments>
		<pubDate>Sun, 12 Sep 2010 01:48:10 +0000</pubDate>
		<dc:creator>yosuke</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://y2-space.com/blog/?p=295</guid>
		<description><![CDATA[CodeIgniterにおいてURLにデフォルトで含まれるindex.phpを消すには、以下の内容を.htaccessに記述し、ドキュメントルート直下に配置すればOKです。 &#160;RewriteEngine on &#160;RewriteCond $1 !^(index\.php&#124;css&#124;js&#124;images) &#160;RewriteRule ^(.*)$ /index.php/$1 [L] RewriteCondの値は必要に応じて適時追加してください。]]></description>
			<content:encoded><![CDATA[<p>CodeIgniterにおいてURLにデフォルトで含まれるindex.phpを消すには、以下の内容を.htaccessに記述し、ドキュメントルート直下に配置すればOKです。</p>
<div class="hl-surround" ><ol class="hl-main" start=1><li>&nbsp;<span class="hl-default">RewriteEngine on</span></li>
<li>&nbsp;<span class="hl-default">RewriteCond $1 !^(index\.php|css|js|images)</span></li>
<li>&nbsp;<span class="hl-default">RewriteRule ^(.*)$ /index.php/$1 [L]</span></li></ol></div>
<p>RewriteCondの値は必要に応じて適時追加してください。</p>
]]></content:encoded>
			<wfw:commentRss>http://y2-space.com/blog/it-skil/programing/php/295/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://y2-space.com/blog/it-skil/programing/php/295/" />
	</item>
		<item>
		<title>【車】アクセルやハンドル不要、脳波で運転するメルセデスの近未来コンセプトカー</title>
		<link>http://y2-space.com/blog/car/293/</link>
		<comments>http://y2-space.com/blog/car/293/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 06:29:40 +0000</pubDate>
		<dc:creator>yosuke</dc:creator>
				<category><![CDATA[車]]></category>

		<guid isPermaLink="false">http://y2-space.com/blog/?p=293</guid>
		<description><![CDATA[趣味の自動車のニュースを見ていたら次のような記事を発見。 Mercedes Future 2040 Model &#124; No Rolling Wheels? Mercedes&#8217; Cyborg Sensation Concept – A futuristic vehicle driven by the power of mind 非常にカッコいいですね。 ただ居眠りや他のことに気を奪われると一発で終わる気が・・・ｗ オート運転はITと自動車の観点から見ても非常に興味があります。]]></description>
			<content:encoded><![CDATA[<p>趣味の自動車のニュースを見ていたら次のような記事を発見。</p>
<p><a href="http://www.bitrebels.com/technology/mercedez-future-2040-model-no-rolling-wheels/">Mercedes Future 2040 Model | No Rolling Wheels?</a><br />
<a href="http://www.automotto.org/entry/mercedes-f400-concept-a-futuristic-vehicle-that-drives-with-the-power-of-mind/">Mercedes&#8217; Cyborg Sensation Concept – A futuristic vehicle driven by the power of mind </a></p>
<p>非常にカッコいいですね。<br />
<a href="http://y2-space.com/wordpress/wp-content/uploads/mercedes-2040-mode_TX7le_3868.jpg"><img src="http://y2-space.com/wordpress/wp-content/uploads/mercedes-2040-mode_TX7le_3868.jpg" alt="" title="mercedes-2040-mode_TX7le_3868" width="300" height="181" class="aligncenter size-medium wp-image-298" /></a></p>
<p>ただ居眠りや他のことに気を奪われると一発で終わる気が・・・ｗ</p>
<p>オート運転はITと自動車の観点から見ても非常に興味があります。</p>
]]></content:encoded>
			<wfw:commentRss>http://y2-space.com/blog/car/293/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://y2-space.com/blog/car/293/" />
	</item>
		<item>
		<title>[MySQL]auto_incrementの値をリセットする</title>
		<link>http://y2-space.com/blog/it-skil/mysql/280/</link>
		<comments>http://y2-space.com/blog/it-skil/mysql/280/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 10:48:43 +0000</pubDate>
		<dc:creator>yosuke</dc:creator>
				<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://y2-space.com/blog/?p=280</guid>
		<description><![CDATA[auto_incrementをリセットするには以下のコマンドで出来ることがわかった。 ALTER TABLE `テーブル名` PACK_KEYS =0 CHECKSUM =0 DELAY_KEY_WRITE =0 AUTO_INCREMENT =1 もっと早く知りたかった・・・・・]]></description>
			<content:encoded><![CDATA[<p>auto_incrementをリセットするには以下のコマンドで出来ることがわかった。</p>
<div class="box">ALTER TABLE `テーブル名` PACK_KEYS =0 CHECKSUM =0 DELAY_KEY_WRITE =0 AUTO_INCREMENT =1</div>
<p>もっと早く知りたかった・・・・・</p>
]]></content:encoded>
			<wfw:commentRss>http://y2-space.com/blog/it-skil/mysql/280/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://y2-space.com/blog/it-skil/mysql/280/" />
	</item>
		<item>
		<title>[Raphael]javascriptライブラリRaphaelを使ってみた</title>
		<link>http://y2-space.com/blog/it-skil/programing/javascript/267/</link>
		<comments>http://y2-space.com/blog/it-skil/programing/javascript/267/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 01:33:40 +0000</pubDate>
		<dc:creator>yosuke</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://y2-space.com/blog/?p=267</guid>
		<description><![CDATA[今回はjavascriptのベクターグラフィックライブラリであるRaphaelを紹介。 前回紹介したdojoライブラリでは細かいところまでいじれなかったため、Raphaelを使ってみることにした。 ・使用方法 ・Raphaelをダウンロードする ここのページの右上からダウンロードできる。 ・htmlファイルを作成する 上記でダウンロードしたjsファイルをインクルードする &#160;&#60;script src=&#34;../js/raphael/raphael.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62; &#160; &#60;script src=&#34;../js/raphael/sample.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62; &#160; &#160;&#60;!-- body {&#160; background: #fff;&#160; color: #000; } #holder {&#160; height: 700;&#160; margin: auto;&#160; margin-top: 50px;&#160; width: 600px; } --&#62; ・jsファイルを作成する 実際に描画する処理を書く &#160;window.onload = function () { &#160;// キャンバスを指定 &#160;var paper = Raphael(&#34;holder&#34;, 400, 400); &#160;// 円を書く (x座標,y座標,半径) &#160;var circle [...]]]></description>
			<content:encoded><![CDATA[<p>今回はjavascriptのベクターグラフィックライブラリである<a href="http://raphaeljs.com/">Raphael</a>を紹介。</p>
<p><a href="http://y2-space.com/blog/javascript/259.html">前回</a>紹介したdojoライブラリでは細かいところまでいじれなかったため、Raphaelを使ってみることにした。</p>
<div class="section">・使用方法</div>
<p><strong>・Raphaelをダウンロードする</strong><br />
<a href="http://raphaeljs.com/">ここ</a>のページの右上からダウンロードできる。</p>
<p><strong>・htmlファイルを作成する</strong><br />
上記でダウンロードしたjsファイルをインクルードする</p>
<div class="hl-surround" ><ol class="hl-main" start=1><li>&nbsp;<span class="hl-brackets">&lt;</span><span class="hl-reserved">script </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../js/raphael/raphael.js</span><span class="hl-quotes">&quot; </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/javascript</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></li>
<li>&nbsp;<span class="hl-brackets"> &lt;</span><span class="hl-reserved">script </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../js/raphael/sample.js</span><span class="hl-quotes">&quot; </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/javascript</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></li>
<li>&nbsp;<span class="hl-brackets"></span></li>
<li>&nbsp;<span class="hl-brackets"></span><span class="hl-comment">&lt;!-- body {&nbsp;  background: #fff;&nbsp;  color: #000; } #holder {&nbsp;  height: 700;&nbsp;  margin: auto;&nbsp;  margin-top: 50px;&nbsp;  width: 600px; } --&gt;</span></li></ol></div>
<p><strong>・jsファイルを作成する</strong><br />
実際に描画する処理を書く</p>
<div class="hl-surround" ><ol class="hl-main" start=1><li>&nbsp;<span class="hl-builtin">window</span><span class="hl-default">.</span><span class="hl-identifier">onload</span><span class="hl-default"> = </span><span class="hl-reserved">function </span><span class="hl-brackets">() {</span></li>
<li>&nbsp;<span class="hl-brackets"></span><span class="hl-comment">// キャンバスを指定</span></li>
<li>&nbsp;<span class="hl-comment"></span><span class="hl-reserved">var </span><span class="hl-identifier">paper</span><span class="hl-code"> = </span><span class="hl-identifier">Raphael</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">holder</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">400</span><span class="hl-code">, </span><span class="hl-number">400</span><span class="hl-brackets">)</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code"></span><span class="hl-comment">// 円を書く (x座標,y座標,半径)</span></li>
<li>&nbsp;<span class="hl-comment"></span><span class="hl-reserved">var </span><span class="hl-identifier">circle</span><span class="hl-code"> = </span><span class="hl-identifier">paper</span><span class="hl-code">.</span><span class="hl-identifier">circle</span><span class="hl-brackets">(</span><span class="hl-number">200</span><span class="hl-code">, </span><span class="hl-number">200</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-brackets">)</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code"></span><span class="hl-comment">// 円の属性を指定する (fill:塗りつぶす色, stroke:ふちの色, storke-width:ふちの太さ)</span></li>
<li>&nbsp;<span class="hl-comment"></span><span class="hl-identifier">circle</span><span class="hl-code">.</span><span class="hl-identifier">attr</span><span class="hl-brackets">({</span><span class="hl-quotes">&quot;</span><span class="hl-string">fill</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">skyblue</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">stroke</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">#000</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">stroke-width</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-number">4</span><span class="hl-brackets">})</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code"></span><span class="hl-comment">// 四角を書く (左上のx座標, 左上のy座標, width, height)</span></li>
<li>&nbsp;<span class="hl-comment"></span><span class="hl-reserved">var </span><span class="hl-identifier">rect</span><span class="hl-code"> = </span><span class="hl-identifier">paper</span><span class="hl-code">.</span><span class="hl-identifier">rect</span><span class="hl-brackets">(</span><span class="hl-number">220</span><span class="hl-code">, </span><span class="hl-number">240</span><span class="hl-code">, </span><span class="hl-number">30</span><span class="hl-code">, </span><span class="hl-number">30</span><span class="hl-brackets">)</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code"></span><span class="hl-comment">// 四角の属性を指定する</span></li>
<li>&nbsp;<span class="hl-comment"></span><span class="hl-identifier">rect</span><span class="hl-code">.</span><span class="hl-identifier">attr</span><span class="hl-brackets">({</span><span class="hl-quotes">&quot;</span><span class="hl-string">fill</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">red</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">})</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code"></span><span class="hl-comment">// 楕円を書く (x座標, y座標, x軸半径, y軸半径)</span></li>
<li>&nbsp;<span class="hl-comment"></span><span class="hl-reserved">var </span><span class="hl-identifier">ellipse</span><span class="hl-code"> = </span><span class="hl-identifier">paper</span><span class="hl-code">.</span><span class="hl-identifier">ellipse</span><span class="hl-brackets">(</span><span class="hl-number">200</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-code">, </span><span class="hl-number">30</span><span class="hl-code">, </span><span class="hl-number">40</span><span class="hl-brackets">)</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code"></span><span class="hl-brackets">}</span><span class="hl-default">;</span></li></ol></div>
<p>ちなみにサンプルは<a href="http://y2-space.com/program/sample.html">こちら</a></p>
<p>【参考】<br />
<a href="http://www.skuare.net/test/raphael_1.html">http://www.skuare.net/test/raphael_1.html</a><br />
<a href="http://raphaeljs.com/reference.html">http://raphaeljs.com/reference.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://y2-space.com/blog/it-skil/programing/javascript/267/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://y2-space.com/blog/it-skil/programing/javascript/267/" />
	</item>
		<item>
		<title>[JavaScript]dojox.chartingで円グラフを作ってみた</title>
		<link>http://y2-space.com/blog/it-skil/programing/javascript/259/</link>
		<comments>http://y2-space.com/blog/it-skil/programing/javascript/259/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 13:26:10 +0000</pubDate>
		<dc:creator>yosuke</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://y2-space.com/blog/?p=259</guid>
		<description><![CDATA[今回はdojo1.3を使ってグラフを作ってみたのでメモ。 javascriptでグラフを作成できるライブラリは他にもあったが、 ・javascriptで記述している（画像を吐き出すわけではない） ・フリー（タダ） ・円グラフでonclickイベントが拾える（実装も簡単） の理由からdojoを採用した。 時間が無かったので、ドキュメントのサンプルを参考に作成し、 データ項目をクリックした際にonclickイベントを取得できるようにした。 サンプル：http://y2-space.com/program/dojotest.html 【参考】 dojo:http://www.dojotoolkit.org/ リファレンス:http://api.dojotoolkit.org/jsdoc/1.3.2/dojox.charting dojo.chartingリファレンス：http://docs.dojocampus.org/dojox/charting]]></description>
			<content:encoded><![CDATA[<p>今回はdojo1.3を使ってグラフを作ってみたのでメモ。</p>
<p>javascriptでグラフを作成できるライブラリは他にもあったが、<br />
・javascriptで記述している（画像を吐き出すわけではない）<br />
・フリー（タダ）<br />
・円グラフでonclickイベントが拾える（実装も簡単）<br />
の理由からdojoを採用した。</p>
<p>時間が無かったので、ドキュメントのサンプルを参考に作成し、<br />
データ項目をクリックした際にonclickイベントを取得できるようにした。</p>
<p>サンプル：<a href="http://y2-space.com/program/dojotest.html">http://y2-space.com/program/dojotest.html<br />
</a><br />
【参考】<br />
dojo:<a href="http://www.dojotoolkit.org/">http://www.dojotoolkit.org/</a><br />
リファレンス:<a href="http://www.dojotoolkit.org/">http://api.dojotoolkit.org/jsdoc/1.3.2/dojox.charting</a><br />
dojo.chartingリファレンス：<a href="http://docs.dojocampus.org/dojox/charting">http://docs.dojocampus.org/dojox/charting</a></p>
]]></content:encoded>
			<wfw:commentRss>http://y2-space.com/blog/it-skil/programing/javascript/259/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://y2-space.com/blog/it-skil/programing/javascript/259/" />
	</item>
		<item>
		<title>[symfony]sfPropelPagerのgetNbResultsがおかしい</title>
		<link>http://y2-space.com/blog/it-skil/framework/symfony/255/</link>
		<comments>http://y2-space.com/blog/it-skil/framework/symfony/255/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 13:20:17 +0000</pubDate>
		<dc:creator>yosuke</dc:creator>
				<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://y2-space.com/blog/?p=255</guid>
		<description><![CDATA[sfPropelPagerはsymfonyのデフォルトORMであるpropelを用いたページャー機能だが、ちょっとおかしなところがあったのでメモ。 getNbResults()は取得した全レコード数を返す関数だが、group byを指定するとおかしくなることが判明。 group byすると何故かgroup byしていない全レコード数がセットされてしまう。 色々調べたところ、原因はsfPropelPager の中でdoCount した時にgroup by の項目をクリアしてからdoCountしているらしい。 参考：http://u2k772.blog95.fc2.com/blog-entry-15.html ってなわけでここに書いてある通り &#160;&#60;?php &#160;$criteria = new Criteria(); &#160;$criteria-&#62;setDistinct(); &#160;・・・ &#160;・・・ &#160;$criteria-&#62;addGroupByColumn(...); &#160;?&#62; としたらきちんと取得できた。 あざっす！！]]></description>
			<content:encoded><![CDATA[<p>sfPropelPagerはsymfonyのデフォルトORMであるpropelを用いたページャー機能だが、ちょっとおかしなところがあったのでメモ。</p>
<p>getNbResults()は取得した全レコード数を返す関数だが、group byを指定するとおかしくなることが判明。<br />
group byすると何故かgroup byしていない全レコード数がセットされてしまう。</p>
<p>色々調べたところ、原因はsfPropelPager の中でdoCount した時にgroup by の項目をクリアしてからdoCountしているらしい。<br />
参考：<a href="http://u2k772.blog95.fc2.com/blog-entry-15.html">http://u2k772.blog95.fc2.com/blog-entry-15.html</a></p>
<p>ってなわけでここに書いてある通り</p>
<div class="hl-surround" ><ol class="hl-main" start=1><li>&nbsp;<span class="hl-inlinetags">&lt;?php</span></li>
<li>&nbsp;<span class="hl-inlinetags"></span><span class="hl-var">$criteria</span><span class="hl-code"> = </span><span class="hl-reserved">new </span><span class="hl-identifier">Criteria</span><span class="hl-brackets">()</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code"></span><span class="hl-var">$criteria</span><span class="hl-code">-&gt;</span><span class="hl-identifier">setDistinct</span><span class="hl-brackets">()</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code">・・・</span></li>
<li>&nbsp;<span class="hl-code">・・・</span></li>
<li>&nbsp;<span class="hl-code"></span><span class="hl-var">$criteria</span><span class="hl-code">-&gt;</span><span class="hl-identifier">addGroupByColumn</span><span class="hl-brackets">(</span><span class="hl-code">...</span><span class="hl-brackets">)</span><span class="hl-code">;</span></li>
<li>&nbsp;<span class="hl-code"></span><span class="hl-inlinetags">?&gt;</span></li></ol></div>
<p>としたらきちんと取得できた。</p>
<p>あざっす！！</p>
]]></content:encoded>
			<wfw:commentRss>http://y2-space.com/blog/it-skil/framework/symfony/255/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://y2-space.com/blog/it-skil/framework/symfony/255/" />
	</item>
		<item>
		<title>[symfony]IEだとドラッグできない？</title>
		<link>http://y2-space.com/blog/it-skil/framework/symfony/246/</link>
		<comments>http://y2-space.com/blog/it-skil/framework/symfony/246/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 16:20:04 +0000</pubDate>
		<dc:creator>yosuke</dc:creator>
				<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://y2-space.com/blog/?p=246</guid>
		<description><![CDATA[前回でsymfony(prototype)のヘルパーを用いて、ドラッグ&#038;ドロップする機能を実装した。 あれこれ試しているうちにはまったことがあったので以下にメモ。 1.draggable_element、drop_reciving_elementは指定したい要素よりも後ろに記述しなければならない。 2.IEの場合、書き換える要素に ・drop_reciving_elementで指定している要素 　・drop_reciving_element自体 　を指定することは出来ない。これらを指定すると2回目以降ドラッグできなくなる。 中でも2はfirefoxとchromeでは動くのにIEだけ動かなかったのでかなりイライラしたｗ 要はdrop_reciving_elementで指定している要素は変更するなということらしい。]]></description>
			<content:encoded><![CDATA[<p><a href="http://y2-space.com/blog/javascript/223.html">前回</a>でsymfony(prototype)のヘルパーを用いて、ドラッグ&#038;ドロップする機能を実装した。</p>
<p>あれこれ試しているうちにはまったことがあったので以下にメモ。<br />
1.draggable_element、drop_reciving_elementは指定したい要素よりも後ろに記述しなければならない。<br />
2.IEの場合、書き換える要素に<br />
  ・drop_reciving_elementで指定している要素<br />
　・drop_reciving_element自体<br />
　を指定することは出来ない。これらを指定すると2回目以降ドラッグできなくなる。</p>
<p>中でも2はfirefoxとchromeでは動くのにIEだけ動かなかったのでかなりイライラしたｗ</p>
<p>要はdrop_reciving_elementで指定している要素は変更するなということらしい。</p>
]]></content:encoded>
			<wfw:commentRss>http://y2-space.com/blog/it-skil/framework/symfony/246/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://y2-space.com/blog/it-skil/framework/symfony/246/" />
	</item>
	</channel>
</rss>

