<?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>Web Sytem &#124; AIDREAM</title>
	<atom:link href="http://blog.aidream.jp/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.aidream.jp</link>
	<description>CodeIgniter / CakePHP / jQuery によるWebシステム開発、PhoneGap / jQueryMobile / HTML5 / CSS3 によるスマートフォンアプリ開発</description>
	<lastBuildDate>Wed, 04 Jan 2012 07:22:26 +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>chrome: 検索の時間短縮</title>
		<link>http://blog.aidream.jp/google-chrome/chrome-short-cut-1767.html</link>
		<comments>http://blog.aidream.jp/google-chrome/chrome-short-cut-1767.html#comments</comments>
		<pubDate>Wed, 04 Jan 2012 07:22:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Google Chrome]]></category>

		<guid isPermaLink="false">http://blog.aidream.jp/?p=1767</guid>
		<description><![CDATA[Chrome の環境設定（ Cmd+「,」 ） 検索の欄の「検索エンジンの管理」をクリック。 「その他の検索エンジン」の最下部に「ブックマーク名　キーワード　URL」を入力。 （キーワードの欄にアドレスバーで使用するショ [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Chrome の環境設定（ Cmd+「,」 ）</li>
<li>検索の欄の「検索エンジンの管理」をクリック。</li>
<li>「その他の検索エンジン」の最下部に「ブックマーク名　キーワード　URL」を入力。<br />
（キーワードの欄にアドレスバーで使用するショートカットの文字を入力すること。<br />
検索キーワードにあたるクエリのパラメータの箇所に「%s」を入れる。）</li>
<li>ex URL の欄に http://example.com/?s=%s</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.aidream.jp/google-chrome/chrome-short-cut-1767.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[MySQL] MySQL のユーザ追加</title>
		<link>http://blog.aidream.jp/mysql/mysql-add-user1764-1764.html</link>
		<comments>http://blog.aidream.jp/mysql/mysql-add-user1764-1764.html#comments</comments>
		<pubDate>Wed, 07 Dec 2011 01:44:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.aidream.jp/?p=1764</guid>
		<description><![CDATA[構文 GRANT ALL PRIVILEGES ON *.* TO ユーザ名@"%" IDENTIFIED BY "パスワード"; 具体例 $ mysql -u root -p（★ MySQLにログイン） （★myadm [...]]]></description>
			<content:encoded><![CDATA[<p>構文</p>
<pre class="brush:sql;">
GRANT ALL PRIVILEGES ON *.* TO ユーザ名@"%" IDENTIFIED BY "パスワード";
</pre>
<p>具体例</p>
<pre class="brush:sql">
$ mysql -u root -p（★ MySQLにログイン）
（★myadminユーザを追加 パスワードは password、許可するネットワークは XXX.XXX.XXX.XXX のみ）
mysql> GRANT ALL PRIVILEGES ON *.* TO myadmin@"XXX.XXX.XXX.XXX" IDENTIFIED BY "password";
mysql> FLUSH PRIVILEGES;（★反映させる）
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.aidream.jp/mysql/mysql-add-user1764-1764.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Linux] vi の操作方法</title>
		<link>http://blog.aidream.jp/linux/linux-vi-1756.html</link>
		<comments>http://blog.aidream.jp/linux/linux-vi-1756.html#comments</comments>
		<pubDate>Mon, 07 Nov 2011 03:47:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.aidream.jp/?p=1756</guid>
		<description><![CDATA[vi（ヴイアイ。ヴィジュアル・エディター）の操作方法 $ vi ファイルのパス 【 モードの切り替え 】 i 入力モード（画面下に「– INSERT –」と表示される） 「esc」入力モードを解除 【 カーソルの移動や検 [...]]]></description>
			<content:encoded><![CDATA[<p>vi（ヴイアイ。ヴィジュアル・エディター）の操作方法</p>
<pre class="”brush:text;”">$ vi ファイルのパス</pre>
<p>【 モードの切り替え 】<br />
i 入力モード（画面下に「– INSERT –」と表示される）<br />
「esc」入力モードを解除</p>
<p>【 カーソルの移動や検索 】<br />
:$ ファイルの最後に移動<br />
:数字 指定した行数に移動（:1 で先頭）<br />
$ 行末<br />
0 行頭<br />
/文字列 指定した文字列を検索（nで次の候補）</p>
<p>【 置換 】<br />
:$s/文字列1/文字列2/cg 文字列1を文字列2に置換（y or n の確認あり）<br />
:$s/文字列1/文字列2/g 文字列1を文字列2に置換（確認なし）</p>
<p>【 操作 】<br />
u 直前の操作のキャンセル<br />
. 直前の操作の繰り返し</p>
<p>【 ファイルの保存と終了 】<br />
:q vi の終了<br />
:q! ファイルを保存しないで終了<br />
:wq ファイルを上書き保存して終了<br />
:w ファイルの上書き保存<br />
:w! 強制的に上書き保存</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aidream.jp/linux/linux-vi-1756.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP] 特定の範囲の整数から指定した数だけ重複のない乱数を生成する</title>
		<link>http://blog.aidream.jp/php/php-random-integer-1751.html</link>
		<comments>http://blog.aidream.jp/php/php-random-integer-1751.html#comments</comments>
		<pubDate>Tue, 01 Nov 2011 08:01:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.aidream.jp/?p=1751</guid>
		<description><![CDATA[1から100までの整数から30の乱数を取得 &#60;?php /* 設定項目 ------------------------------------*/ $min = 1; $max = 100; $total = 3 [...]]]></description>
			<content:encoded><![CDATA[<p>1から100までの整数から30の乱数を取得</p>
<pre class="brush:php">&lt;?php

/* 設定項目
------------------------------------*/
$min = 1;
$max = 100;
$total = 30;

/* 初期化
------------------------------------*/
$random = '';
$randoms = array();

// 乱数ジェネレータを初期化
mt_srand(microtime() * 100000);

for ($i=1;$i&lt;=$total;$i++) {
    $random = mt_rand($min, $max);
    
    // 重複がある場合、再度、処理をやり直し乱数を生成
    if (in_array($random, $randoms)) {
        $i--;
        continue;
    }
    // 乱数を配列に格納
    $randoms[$i] = $random;
}

/* 結果を出力
------------------------------------*/
echo '&lt;pre&gt;';
print_r($randoms);
echo '&lt;/pre&gt;';</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.aidream.jp/php/php-random-integer-1751.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[MySQL] 外部のSQLファイルをコマンドで実行</title>
		<link>http://blog.aidream.jp/mysql/mysql-sql-file-linux-comand-1736.html</link>
		<comments>http://blog.aidream.jp/mysql/mysql-sql-file-linux-comand-1736.html#comments</comments>
		<pubDate>Thu, 22 Sep 2011 01:51:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.aidream.jp/?p=1736</guid>
		<description><![CDATA[構文 $ mysql データベース名 < SQLファイル -u root -p 例） $ mysql database_name < hoge.sql -u root -p]]></description>
			<content:encoded><![CDATA[<p>構文</p>
<pre class="brush:sql">
$ mysql データベース名 < SQLファイル -u root -p
</pre>
<p>例）</p>
<pre class="brush:sql">
$ mysql database_name < hoge.sql -u root -p
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.aidream.jp/mysql/mysql-sql-file-linux-comand-1736.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP] ファイルの文字コードと改行コードを変換する関数</title>
		<link>http://blog.aidream.jp/php/php-convert-file-encoding-1732.html</link>
		<comments>http://blog.aidream.jp/php/php-convert-file-encoding-1732.html#comments</comments>
		<pubDate>Fri, 16 Sep 2011 09:34:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.aidream.jp/?p=1732</guid>
		<description><![CDATA[&#60;?php /**  * ファイルの文字コードを変換する関数  * @access public  * @param string $file1  * @param string $encoding1  * @pa [...]]]></description>
			<content:encoded><![CDATA[<pre class="brush:php">&lt;?php

/**
 * ファイルの文字コードを変換する関数
 * @access public
 * @param string $file1
 * @param string $encoding1
 * @param string $file2
 * @param string $encoding2
 * @param string $newline
 */
function convert_file_encoding($file1, $encoding1, $file2, $encoding2, $newline = '')
{
    if ( ! file_exists($file1) OR ! is_file($file1))
    {
        return 'ファイルが存在しません。';
    }
    
    $data1 = file_get_contents($file1);
    
    if ($data1 === FALSE)
    {
        return 'データの取得に失敗しました。';
    }
    
    $data2 = mb_convert_encoding($data1, $encoding2, $encoding1);
    $data2 = str_replace(array("\r\n", "\n", "\r"), $newline, $data2);
    $handle = fopen($file2, 'wb');
    
    if ($handle === FALSE)
    {
        return 'ファイルへの書き込みに失敗しました。';
    }
    
    fwrite($handle, $data2);
    fclose($handle);
    
    return "{$file1} の文字コードを {$encoding2} に変換し {$file2} に出力しました。";
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.aidream.jp/php/php-convert-file-encoding-1732.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Linux] ディレクトリ内の不要なファイルやディレクトリを一括で削除</title>
		<link>http://blog.aidream.jp/linux/delete-unnecessary-files-directories-1728.html</link>
		<comments>http://blog.aidream.jp/linux/delete-unnecessary-files-directories-1728.html#comments</comments>
		<pubDate>Thu, 08 Sep 2011 03:07:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.aidream.jp/?p=1728</guid>
		<description><![CDATA[Dreamweaver の「_notes」や Mac 「.DS_Store」「._」などの不要なファイルやディレクトリを一括で削除するコマンド find /var/www/html/hoge/ -name _notes  [...]]]></description>
			<content:encoded><![CDATA[<p>Dreamweaver の「_notes」や Mac 「.DS_Store」「._」などの不要なファイルやディレクトリを一括で削除するコマンド</p>
<pre class="brush:text">
find /var/www/html/hoge/ -name _notes -exec rm -rf {} \;
find /var/www/html/hoge/ -name .DS_Store -exec rm -rf {} \;
find /var/www/html/hoge/ -name ._* -exec rm -rf {} \;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.aidream.jp/linux/delete-unnecessary-files-directories-1728.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[MySQL] 文字列の一括置換</title>
		<link>http://blog.aidream.jp/mysql/mysql-string-replace-all-1724.html</link>
		<comments>http://blog.aidream.jp/mysql/mysql-string-replace-all-1724.html#comments</comments>
		<pubDate>Thu, 25 Aug 2011 03:29:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.aidream.jp/?p=1724</guid>
		<description><![CDATA[UPDATE `テーブル名` SET `カラム1` = REPLACE (`カラム1`, '置換前の文字列', '置換後の文字列')]]></description>
			<content:encoded><![CDATA[<pre class="brush:sql">UPDATE `テーブル名` SET `カラム1` = REPLACE (`カラム1`, '置換前の文字列', '置換後の文字列')</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.aidream.jp/mysql/mysql-string-replace-all-1724.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[JavaScript] 本文のコピー防止</title>
		<link>http://blog.aidream.jp/javascript/javascript-document-copy-prevention-1718.html</link>
		<comments>http://blog.aidream.jp/javascript/javascript-document-copy-prevention-1718.html#comments</comments>
		<pubDate>Thu, 25 Aug 2011 03:15:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.aidream.jp/?p=1718</guid>
		<description><![CDATA[一般的なユーザーがブラウザ上からのコピーするのを防止。 （JavaScriptを解除したり、ソースコードを開けばコピーは可能です。） &#60;body oncopy="alert('&#38;copy; 著作権者名'); [...]]]></description>
			<content:encoded><![CDATA[<p>一般的なユーザーがブラウザ上からのコピーするのを防止。<br />
（JavaScriptを解除したり、ソースコードを開けばコピーは可能です。）</p>
<pre class="brush:js">&lt;body oncopy="alert('&amp;copy; 著作権者名');return false;"&gt;
省略
&lt;/body&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.aidream.jp/javascript/javascript-document-copy-prevention-1718.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP] PHPで「RFC3986に基づいたURLエンコード」をしたものを JavaScriptで復元</title>
		<link>http://blog.aidream.jp/php/php-urlencode-javascript-decode-1713.html</link>
		<comments>http://blog.aidream.jp/php/php-urlencode-javascript-decode-1713.html#comments</comments>
		<pubDate>Fri, 19 Aug 2011 10:52:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.aidream.jp/?p=1713</guid>
		<description><![CDATA[&#60;?php $str = '対象となる文字列'; ?&#62; &#60;script type="text/javascript" charset="UTF-8"&#62; function decode(str) { [...]]]></description>
			<content:encoded><![CDATA[<pre class="brush:php">&lt;?php

$str = '対象となる文字列';

?&gt;

&lt;script type="text/javascript" charset="UTF-8"&gt;
function decode(str) {
    str = decodeURIComponent(str);
    document.write(str);
}
&lt;/script&gt;

&lt;script type="text/javascript" charset="UTF-8"&gt;
    decode('&lt;?php echo rawurlencode($str) ?&gt;');
&lt;/script&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.aidream.jp/php/php-urlencode-javascript-decode-1713.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP] 複数の区切り文字で 文字列をランダムに区切る</title>
		<link>http://blog.aidream.jp/php/php-strings-random-split-multi-delimiters-1710.html</link>
		<comments>http://blog.aidream.jp/php/php-strings-random-split-multi-delimiters-1710.html#comments</comments>
		<pubDate>Fri, 19 Aug 2011 10:40:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.aidream.jp/?p=1710</guid>
		<description><![CDATA[&#60;?php /**  * 複数の区切り文字で文字列をランダムに分割  * @access public  * @prama string 対象となる文字列  * @param string 分割後の文字列  */  [...]]]></description>
			<content:encoded><![CDATA[<pre class="brush:php">&lt;?php
/**
 * 複数の区切り文字で文字列をランダムに分割
 * @access public
 * @prama string 対象となる文字列
 * @param string 分割後の文字列
 */
if ( ! function_exists('split_str'))
{
    function split_str($str1)
    {

        $delimiters = array('&gt;', '@', ']', '&lt;', '$', '[', '(', '*', ')');; // 区切り文字の配列
        $delimiters_sum = count($delimiters); // 上記配列の要素数
        $len1 = mb_strlen($str1, 'UTF-8'); // 分割前の文字数
        $maxlen = 2; // 分割した各文字列の最大文字数
        $str2 = ''; // 分割後 結合した文字列
        $len2 = 0; //　分割後 結合した文字列の文字数

        // while文の場合 負荷が高いので for文を採用
        for ($i = 0; $i &lt; $len1; $i++)
        {
            // ランダムな整数を取得
            $random = rand(1, $maxlen);

            // 2回目以降のループの場合
            if ($i != 0)
            {
                // 分割後 結合した文字列から区切り文字を除外した文字数を取得
                $len2 = mb_strlen($str2, 'UTF-8') - $i;
            }
            // 分割後 区切り文字をもちいて結合した文字列
            $str2 .= mb_substr($str1, $len2, $random, 'UTF-8');

            //
            if ($len1 &lt;= $len2)
            {
                break;
            }
            else
            {
                // 区切り文字を交互に付与
                $str2 .= $delimiters[$i % $delimiters_sum];
            }
        }
        // 文字列の末尾の区切り文字を除外して返す
        return mb_substr($str2, 0, ($len2+$i-1), 'UTF-8');
    }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.aidream.jp/php/php-strings-random-split-multi-delimiters-1710.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Linux] ディレクトリ内のファイルやディレクトリの容量を大きい順に出力</title>
		<link>http://blog.aidream.jp/linux/linux-directory-file-usage-sort-1707.html</link>
		<comments>http://blog.aidream.jp/linux/linux-directory-file-usage-sort-1707.html#comments</comments>
		<pubDate>Tue, 09 Aug 2011 06:33:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://blog.aidream.jp/?p=1707</guid>
		<description><![CDATA[hogeディレクトリ内のファイルやディレクトリをMB単位で 容量の大きい順に出力し、テキストファイルに記録。 du -m hoge &#124; sort -rn > hoge_volume_ranking.txt]]></description>
			<content:encoded><![CDATA[<p>hogeディレクトリ内のファイルやディレクトリをMB単位で<br />
容量の大きい順に出力し、テキストファイルに記録。</p>
<pre class="brush:text">
du -m hoge | sort -rn > hoge_volume_ranking.txt
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.aidream.jp/linux/linux-directory-file-usage-sort-1707.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

