<?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>macaroni-works notes</title>
	<atom:link href="http://blog.macaroniworks.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.macaroniworks.net</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 02 Sep 2010 05:37:52 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Photoshop　ショートカット</title>
		<link>http://blog.macaroniworks.net/2010/09/photoshop%e3%80%80%e3%82%b7%e3%83%a7%e3%83%bc%e3%83%88%e3%82%ab%e3%83%83%e3%83%88/</link>
		<comments>http://blog.macaroniworks.net/2010/09/photoshop%e3%80%80%e3%82%b7%e3%83%a7%e3%83%bc%e3%83%88%e3%82%ab%e3%83%83%e3%83%88/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 05:37:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Photoshop]]></category>

		<guid isPermaLink="false">http://blog.macaroniworks.net/?p=1407</guid>
		<description><![CDATA[ショートカットキーをたくさん使っているつもりなのですが まだまだいけそうなので、細かいものも見てみます。 キーボードが小さくなって使えるキーは少なくなりました。 http://help.adobe.com/ja_JP/AfterEffects/9.0/WS3878526689cb91655866c1103a9d3c597-7987a.html]]></description>
			<content:encoded><![CDATA[<p>ショートカットキーをたくさん使っているつもりなのですが<br />
まだまだいけそうなので、細かいものも見てみます。<br />
キーボードが小さくなって使えるキーは少なくなりました。</p>
<p><a href="http://help.adobe.com/ja_JP/AfterEffects/9.0/WS3878526689cb91655866c1103a9d3c597-7987a.html">http://help.adobe.com/ja_JP/AfterEffects/9.0/WS3878526689cb91655866c1103a9d3c597-7987a.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.macaroniworks.net/2010/09/photoshop%e3%80%80%e3%82%b7%e3%83%a7%e3%83%bc%e3%83%88%e3%82%ab%e3%83%83%e3%83%88/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP splitの代わりにexplodeを使う</title>
		<link>http://blog.macaroniworks.net/2010/08/php-split%e3%81%ae%e4%bb%a3%e3%82%8f%e3%82%8a%e3%81%abexplode%e3%82%92%e4%bd%bf%e3%81%86/</link>
		<comments>http://blog.macaroniworks.net/2010/08/php-split%e3%81%ae%e4%bb%a3%e3%82%8f%e3%82%8a%e3%81%abexplode%e3%82%92%e4%bd%bf%e3%81%86/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 09:43:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[カテゴリなし]]></category>

		<guid isPermaLink="false">http://blog.macaroniworks.net/?p=1404</guid>
		<description><![CDATA[なんやかんやでずっと使ってました、split(); explode()がいいんですね。さようならsplit(); $str = 'one&#124;two&#124;three&#124;four'; // 正の値を持つ limit print_r(explode('&#124;', $str, 2)); // 負の値を持つ limit (PHP 5.1 以降) print_r(explode('&#124;', $str, -1));]]></description>
			<content:encoded><![CDATA[<p>なんやかんやでずっと使ってました、split();</p>
<p>explode()がいいんですね。さようならsplit();</p>
<pre class="brush:php">

$str = 'one|two|three|four';

// 正の値を持つ limit
print_r(explode('|', $str, 2));

// 負の値を持つ limit (PHP 5.1 以降)
print_r(explode('|', $str, -1));
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.macaroniworks.net/2010/08/php-split%e3%81%ae%e4%bb%a3%e3%82%8f%e3%82%8a%e3%81%abexplode%e3%82%92%e4%bd%bf%e3%81%86/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 数値の桁数をsprintf()であわせていましたがstr_pad()の方がよさそう</title>
		<link>http://blog.macaroniworks.net/2010/08/php-%e6%95%b0%e5%80%a4%e3%81%ae%e6%a1%81%e6%95%b0%e3%82%92sprintf%e3%81%a7%e3%81%82%e3%82%8f%e3%81%9b%e3%81%a6%e3%81%84%e3%81%be%e3%81%97%e3%81%9f%e3%81%8cstr_pad%e3%81%ae%e6%96%b9%e3%81%8c/</link>
		<comments>http://blog.macaroniworks.net/2010/08/php-%e6%95%b0%e5%80%a4%e3%81%ae%e6%a1%81%e6%95%b0%e3%82%92sprintf%e3%81%a7%e3%81%82%e3%82%8f%e3%81%9b%e3%81%a6%e3%81%84%e3%81%be%e3%81%97%e3%81%9f%e3%81%8cstr_pad%e3%81%ae%e6%96%b9%e3%81%8c/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 09:22:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[sprintf]]></category>
		<category><![CDATA[str_pad]]></category>

		<guid isPermaLink="false">http://blog.macaroniworks.net/?p=1400</guid>
		<description><![CDATA[PHP 数値の桁数をsprintfであわせていましたが、 str_pad()という関数を使う方が早いそうです。 for($i=1;$i]]></description>
			<content:encoded><![CDATA[<p>PHP 数値の桁数をsprintfであわせていましたが、<br />
str_pad()という関数を使う方が早いそうです。</p>
<pre class="brush:php">
for($i=1;$i<=$photo_num;$i++){
        //$iを,２桁にして,"0"で埋める。左に。
	$num=str_pad($i,2,'0',STR_PAD_LEFT);
        print $num;
}
</pre>
<p>これは覚えておきます。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.macaroniworks.net/2010/08/php-%e6%95%b0%e5%80%a4%e3%81%ae%e6%a1%81%e6%95%b0%e3%82%92sprintf%e3%81%a7%e3%81%82%e3%82%8f%e3%81%9b%e3%81%a6%e3%81%84%e3%81%be%e3%81%97%e3%81%9f%e3%81%8cstr_pad%e3%81%ae%e6%96%b9%e3%81%8c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQueryのWYSIWYGエディタ</title>
		<link>http://blog.macaroniworks.net/2010/08/jquery%e3%81%aewysiwyg%e3%82%a8%e3%83%87%e3%82%a3%e3%82%bf/</link>
		<comments>http://blog.macaroniworks.net/2010/08/jquery%e3%81%aewysiwyg%e3%82%a8%e3%83%87%e3%82%a3%e3%82%bf/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 03:43:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://blog.macaroniworks.net/?p=1396</guid>
		<description><![CDATA[WYSIWYG（ウィジウィグ）エディタ探していましたが jQueryで動くモノがあったのでメモっときます。 http://jhtmlarea.codeplex.com/]]></description>
			<content:encoded><![CDATA[<p>WYSIWYG（ウィジウィグ）エディタ探していましたが<br />
jQueryで動くモノがあったのでメモっときます。</p>
<p><a href="http://jhtmlarea.codeplex.com/">http://jhtmlarea.codeplex.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.macaroniworks.net/2010/08/jquery%e3%81%aewysiwyg%e3%82%a8%e3%83%87%e3%82%a3%e3%82%bf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQueryUIをgoogle.loadで</title>
		<link>http://blog.macaroniworks.net/2010/08/jqueryui%e3%82%92google-load%e3%81%a7/</link>
		<comments>http://blog.macaroniworks.net/2010/08/jqueryui%e3%82%92google-load%e3%81%a7/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 03:07:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[カテゴリなし]]></category>

		<guid isPermaLink="false">http://blog.macaroniworks.net/?p=1392</guid>
		<description><![CDATA[jQueryUIはあまりつかうことはないのですが、一応これもメモっておきます。 google.load("jqueryui", "1.8.4"); google.load("jqueryui", "1.8.4", {uncompressed:true}); 一応全部まとめると google.load("jquery", "1.3"); google.load("swfobject", "2.1"); google.load("jqueryui", "1.8.4");]]></description>
			<content:encoded><![CDATA[<p>jQueryUIはあまりつかうことはないのですが、一応これもメモっておきます。</p>
<pre class="brush:js">
google.load("jqueryui", "1.8.4");
google.load("jqueryui", "1.8.4", {uncompressed:true});
</pre>
<p>一応全部まとめると</p>
<pre class="brush:js">
<script src="http://www.google.com/jsapi" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">google.load("jquery", "1.3");</script>
<script type="text/javascript">google.load("swfobject", "2.1"); </script>
<script type="text/javascript">google.load("jqueryui", "1.8.4"); </script>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.macaroniworks.net/2010/08/jqueryui%e3%82%92google-load%e3%81%a7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP メールを送る</title>
		<link>http://blog.macaroniworks.net/2010/08/php-%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%92%e9%80%81%e3%82%8b/</link>
		<comments>http://blog.macaroniworks.net/2010/08/php-%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%92%e9%80%81%e3%82%8b/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 05:46:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mb_convert_encoding]]></category>
		<category><![CDATA[mb_encode_mimeheader]]></category>
		<category><![CDATA[sendmail]]></category>
		<category><![CDATA[メール]]></category>

		<guid isPermaLink="false">http://blog.macaroniworks.net/?p=1387</guid>
		<description><![CDATA[クラスにするまでもないのですが。 使い回しがききそうなので。 class SendMail{ /*インスタンス作成時の引数は配列 $option=array( "to"=>test@test.com, "subject"=>"タイトル", "body"=>"本文", "from_name"=>"送信者", "from_email"=>"form@test.com" ); */ function __construct($option){ $this->encoding="utf-8"; mb_language("ja"); mb_internal_encoding($this->encoding); $this->option=$option; } function mimeHeader($str){ return mb_encode_mimeheader (mb_convert_encoding($str,"ISO-2022-JP",$this->encoding)); } function send(){ extract($this->option); $f_from_name=$this->mimeHeader($from_name); $headers = "MIME-Version: 1.0 \n From: {$f_from_name} \n"; if($reply=="true") $headers .= "Reply-To: {$f_from_name} \n"; $headers .= "Content-Type: text/plain;charset=ISO-2022-JP \n"; $subject =$this->mimeHeader($subject); $body = mb_convert_encoding($body, "ISO-2022-JP", [...]]]></description>
			<content:encoded><![CDATA[<p>クラスにするまでもないのですが。<br />
使い回しがききそうなので。</p>
<pre class="brush:php">
class SendMail{

	/*インスタンス作成時の引数は配列
	$option=array(
			"to"=>test@test.com,
			"subject"=>"タイトル",
			"body"=>"本文",
			"from_name"=>"送信者",
			"from_email"=>"form@test.com"
	);
	*/

	function __construct($option){
		$this->encoding="utf-8";
		mb_language("ja");
		mb_internal_encoding($this->encoding);
		$this->option=$option;
	}

	function mimeHeader($str){
		return mb_encode_mimeheader (mb_convert_encoding($str,"ISO-2022-JP",$this->encoding));
	}

	function send(){
		extract($this->option);
		$f_from_name=$this->mimeHeader($from_name);
		$headers  = "MIME-Version: 1.0 \n From: {$f_from_name}<{$from_email}> \n";
		if($reply=="true") $headers .= "Reply-To: {$f_from_name} <{$from_email}> \n";
		$headers .= "Content-Type: text/plain;charset=ISO-2022-JP \n";

		$subject =$this->mimeHeader($subject);
		$body = mb_convert_encoding($body, "ISO-2022-JP",	$this->encoding);

		$sendmail_params  = "-f$from_email";
		$result = mail($to, $subject, $body, $headers, $sendmail_params);
		return $result;
	}
｝
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.macaroniworks.net/2010/08/php-%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%92%e9%80%81%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache htaccess mod_rewriteHTTPステータスコードの301</title>
		<link>http://blog.macaroniworks.net/2010/08/apache-htaccess-mod_rewritehttp%e3%82%b9%e3%83%86%e3%83%bc%e3%82%bf%e3%82%b9%e3%82%b3%e3%83%bc%e3%83%89%e3%81%ae301/</link>
		<comments>http://blog.macaroniworks.net/2010/08/apache-htaccess-mod_rewritehttp%e3%82%b9%e3%83%86%e3%83%bc%e3%82%bf%e3%82%b9%e3%82%b3%e3%83%bc%e3%83%89%e3%81%ae301/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 10:38:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod_rewrite]]></category>

		<guid isPermaLink="false">http://blog.macaroniworks.net/?p=1380</guid>
		<description><![CDATA[よく忘れるので Rってなんだっけと。 HTTPステータスコードを返すってことですね。 R=301 だと301でMoved Permanentlyを返すのでURLが変わったよって 伝えれるんですね。 ちなみに[L]は最終行だそうです。 RewriteEngine on RewriteRule ^/(.*)$ http://www.newserver.com/$1 [R=301,L]]]></description>
			<content:encoded><![CDATA[<p>よく忘れるので<br />
Rってなんだっけと。<br />
HTTPステータスコードを返すってことですね。<br />
R=301 だと301でMoved Permanentlyを返すのでURLが変わったよって<br />
伝えれるんですね。</p>
<p>ちなみに[L]は最終行だそうです。</p>
<pre class="brush:php">
RewriteEngine on
RewriteRule ^/(.*)$ http://www.newserver.com/$1 [R=301,L]
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.macaroniworks.net/2010/08/apache-htaccess-mod_rewritehttp%e3%82%b9%e3%83%86%e3%83%bc%e3%82%bf%e3%82%b9%e3%82%b3%e3%83%bc%e3%83%89%e3%81%ae301/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML CSS イメージ要素の隙間について</title>
		<link>http://blog.macaroniworks.net/2010/08/html-css-%e3%82%a4%e3%83%a1%e3%83%bc%e3%82%b8%e8%a6%81%e7%b4%a0%e3%81%ae%e9%9a%99%e9%96%93%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6/</link>
		<comments>http://blog.macaroniworks.net/2010/08/html-css-%e3%82%a4%e3%83%a1%e3%83%bc%e3%82%b8%e8%a6%81%e7%b4%a0%e3%81%ae%e9%9a%99%e9%96%93%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 04:45:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[img]]></category>
		<category><![CDATA[隙間]]></category>

		<guid isPermaLink="false">http://blog.macaroniworks.net/?p=1377</guid>
		<description><![CDATA[イメージ要素の隙間についてはいつも #sample img { display:block; } として回避していましたが、 #saple img { vertical-align:bottom; height:100px; } とするやり方もあるようです。 heightは無理にいれなくてもよさそうです。 imgを強引にblock要素にするよりは素直っぽいです。 これからはvertical-align:bottom;を使っていきます。 勉強になりました。]]></description>
			<content:encoded><![CDATA[<p>イメージ要素の隙間についてはいつも</p>
<pre class="brush:css">
#sample img {
 display:block;
}
</pre>
<p>として回避していましたが、</p>
<pre class="brush:css">
#saple img {
  vertical-align:bottom;
  height:100px;
}
</pre>
<p>とするやり方もあるようです。</p>
<p>heightは無理にいれなくてもよさそうです。<br />
imgを強引にblock要素にするよりは素直っぽいです。</p>
<p>これからはvertical-align:bottom;を使っていきます。</p>
<p>勉強になりました。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.macaroniworks.net/2010/08/html-css-%e3%82%a4%e3%83%a1%e3%83%bc%e3%82%b8%e8%a6%81%e7%b4%a0%e3%81%ae%e9%9a%99%e9%96%93%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 文字列から拡張子を取得したい</title>
		<link>http://blog.macaroniworks.net/2010/08/php-%e6%96%87%e5%ad%97%e5%88%97%e3%81%8b%e3%82%89%e6%8b%a1%e5%bc%b5%e5%ad%90%e3%82%92%e5%8f%96%e5%be%97%e3%81%97%e3%81%9f%e3%81%84/</link>
		<comments>http://blog.macaroniworks.net/2010/08/php-%e6%96%87%e5%ad%97%e5%88%97%e3%81%8b%e3%82%89%e6%8b%a1%e5%bc%b5%e5%ad%90%e3%82%92%e5%8f%96%e5%be%97%e3%81%97%e3%81%9f%e3%81%84/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 13:22:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[拡張子]]></category>

		<guid isPermaLink="false">http://blog.macaroniworks.net/?p=1374</guid>
		<description><![CDATA[PHPで文字列から拡張子を取得したいなと思うことは よくあります。 $name=$_FILES['Filedata']['name']; $extension = pathinfo($name, PATHINFO_EXTENSION); こんな方法でいけるんですね。一行で書けるとは驚きでした。]]></description>
			<content:encoded><![CDATA[<p>PHPで文字列から拡張子を取得したいなと思うことは<br />
よくあります。</p>
<pre class="brush:php">
$name=$_FILES['Filedata']['name'];
$extension = pathinfo($name, PATHINFO_EXTENSION);
</pre>
<p>こんな方法でいけるんですね。一行で書けるとは驚きでした。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.macaroniworks.net/2010/08/php-%e6%96%87%e5%ad%97%e5%88%97%e3%81%8b%e3%82%89%e6%8b%a1%e5%bc%b5%e5%ad%90%e3%82%92%e5%8f%96%e5%be%97%e3%81%97%e3%81%9f%e3%81%84/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP　引数があったらそっち使うかな。</title>
		<link>http://blog.macaroniworks.net/2010/07/php%e3%80%80%e5%bc%95%e6%95%b0%e3%81%8c%e3%81%82%e3%81%a3%e3%81%9f%e3%82%89%e3%81%9d%e3%81%a3%e3%81%a1%e4%bd%bf%e3%81%86%e3%81%8b%e3%81%aa%e3%80%82/</link>
		<comments>http://blog.macaroniworks.net/2010/07/php%e3%80%80%e5%bc%95%e6%95%b0%e3%81%8c%e3%81%82%e3%81%a3%e3%81%9f%e3%82%89%e3%81%9d%e3%81%a3%e3%81%a1%e4%bd%bf%e3%81%86%e3%81%8b%e3%81%aa%e3%80%82/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 11:13:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[func_num_args]]></category>
		<category><![CDATA[可変長引数]]></category>

		<guid isPermaLink="false">http://blog.macaroniworks.net/?p=1370</guid>
		<description><![CDATA[よくこのシチュエーションに出くわすのですが なにか一般的な方法があるんでしょうか？ function test(){ $args=func_num_args(); $test_var='戻る'; if(isset($args[0])) $test_var=$args[0]; }]]></description>
			<content:encoded><![CDATA[<p>よくこのシチュエーションに出くわすのですが<br />
なにか一般的な方法があるんでしょうか？</p>
<pre class="brush:php">
function test(){
  $args=func_num_args();
  $test_var='戻る';
  if(isset($args[0])) $test_var=$args[0];
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.macaroniworks.net/2010/07/php%e3%80%80%e5%bc%95%e6%95%b0%e3%81%8c%e3%81%82%e3%81%a3%e3%81%9f%e3%82%89%e3%81%9d%e3%81%a3%e3%81%a1%e4%bd%bf%e3%81%86%e3%81%8b%e3%81%aa%e3%80%82/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
