<?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>蓝色的华 &#187; 我火星</title>
	<atom:link href="http://bluehua.org/category/%e6%88%91%e7%81%ab%e6%98%9f/feed" rel="self" type="application/rss+xml" />
	<link>http://bluehua.org</link>
	<description>分享所学,backup一切~</description>
	<lastBuildDate>Fri, 27 Aug 2010 08:41:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ubuntu 32bit 使用 4G内存&#8230;</title>
		<link>http://bluehua.org/2010/04/18/1129.html</link>
		<comments>http://bluehua.org/2010/04/18/1129.html#comments</comments>
		<pubDate>Sun, 18 Apr 2010 09:42:18 +0000</pubDate>
		<dc:creator>小鹿</dc:creator>
				<category><![CDATA[bookmark]]></category>
		<category><![CDATA[我火星]]></category>
		<category><![CDATA[pae]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://bluehua.org/?p=1129</guid>
		<description><![CDATA[一直用着识别出来的2.9G内存,从未想过32位系统上用全我这4G的内存&#8230;.
今天偶尔发现我又火星了,使用开启pae的内核就可以了

#确定一下当前内核版本
uname -r
#我的是 2.6.31-21-generic
#安装相同版本的开启pae的内核
sudo apt-get install linux-headers-2.6.31-21-generic-pae linux-image-2.6.31-21-generic-pae
#重启
sudo reboot

什么是pae(物理地址扩展)
http://en.wikipedia.org/wiki/Physical_Address_Extension
http://baike.baidu.com/view/151009.html
pae是否比普通模式的性能差
Ubuntu 32位、32位PAE、64位内核性能对比
]]></description>
			<content:encoded><![CDATA[<p>一直用着识别出来的2.9G内存,从未想过32位系统上用全我这4G的内存&#8230;.</p>
<p>今天偶尔发现我又火星了,使用开启pae的内核就可以了</p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#确定一下当前内核版本</span>
<span style="color: #c20cb9; font-weight: bold;">uname</span> <span style="color: #660033;">-r</span>
<span style="color: #666666; font-style: italic;">#我的是 2.6.31-21-generic</span>
<span style="color: #666666; font-style: italic;">#安装相同版本的开启pae的内核</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> linux-headers-2.6.31-<span style="color: #000000;">21</span>-generic-pae linux-image-2.6.31-<span style="color: #000000;">21</span>-generic-pae
<span style="color: #666666; font-style: italic;">#重启</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> reboot</pre></div></div>

<p>什么是pae(物理地址扩展)</p>
<p><a href="http://en.wikipedia.org/wiki/Physical_Address_Extension">http://en.wikipedia.org/wiki/Physical_Address_Extension</a></p>
<p><a href="http://baike.baidu.com/view/151009.html">http://baike.baidu.com/view/151009.html</a></p>
<p>pae是否比普通模式的性能差</p>
<p><a href="http://www.linux-cn.com/html/news/hot/20091231/59678.shtml">Ubuntu 32位、32位PAE、64位内核性能对比</a></p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2010/04/18/1129.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>google工具栏牛x的分享按钮</title>
		<link>http://bluehua.org/2010/01/16/842.html</link>
		<comments>http://bluehua.org/2010/01/16/842.html#comments</comments>
		<pubDate>Sat, 16 Jan 2010 13:21:23 +0000</pubDate>
		<dc:creator>小鹿</dc:creator>
				<category><![CDATA[soft]]></category>
		<category><![CDATA[我火星]]></category>
		<category><![CDATA[google toolbar]]></category>
		<category><![CDATA[share button]]></category>

		<guid isPermaLink="false">http://bluehua.org/?p=842</guid>
		<description><![CDATA[偶火星了，更新了google的工具栏到7.0.20091216Lb1,发现多了一个牛x的分享功能。许多网站（包括renren）都提供了一个可以分享站外内容的书签，但是已经安装了google的工具栏，再开一个书签栏就太占地方了。这个按钮终于解决了这个问题，而且可以分享到n个站点。


列表里的人人网是我后来添进去的，默认列表里是没有的，一水的e文网站。工具栏还没有提供一个直接添加的方法，但是可以直接修改列表文件。列表文件位于：
~/.mozilla/firefox/这个目录名因人而异/GoogleToolbarData/components/share_providers.json

&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-
补充：或直接找

cd ~/.mozilla
find ./ -name &#34;share_providers.json&#34;
#你会找到两个，覆盖我给的那个路径就可以

&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-
可以直接下载偶修改好的文件：share_providers.json
曾经的分享按钮一直被冷落在菜单里：

]]></description>
			<content:encoded><![CDATA[<p>偶火星了，更新了google的工具栏到7.0.20091216Lb1,发现多了一个牛x的分享功能。许多网站（包括renren）都提供了一个可以分享站外内容的书签，但是已经安装了google的工具栏，再开一个书签栏就太占地方了。这个按钮终于解决了这个问题，而且可以分享到n个站点。</p>
<p><a href="http://bluehua.org/wp-content/uploads/2010/01/screenshot_035.png"><img class="alignnone size-full wp-image-843" title="screenshot_035" src="http://bluehua.org/wp-content/uploads/2010/01/screenshot_035.png" alt="google toolbar的牛逼分享按钮" width="607" height="526" /></a></p>
<p><a href="http://bluehua.org/wp-content/uploads/2010/01/screenshot_034.png"><img class="alignnone size-full wp-image-845" title="screenshot_034" src="http://bluehua.org/wp-content/uploads/2010/01/screenshot_034.png" alt="google toolbar的分享按钮" width="310" height="113" /></a><br />
列表里的人人网是我后来添进去的，默认列表里是没有的，一水的e文网站。工具栏还没有提供一个直接添加的方法，但是可以直接修改列表文件。列表文件位于：</p>
<pre>~/.mozilla/firefox/这个目录名因人而异/GoogleToolbarData/components/share_providers.json
</pre>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
补充：或直接找</p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>.mozilla
<span style="color: #c20cb9; font-weight: bold;">find</span> .<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;share_providers.json&quot;</span>
<span style="color: #666666; font-style: italic;">#你会找到两个，覆盖我给的那个路径就可以</span></pre></div></div>

<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
可以直接下载偶修改好的文件：<a href="http://bluehua.org/wp-content/uploads/2010/01/share_providers.json_.zip">share_providers.json</a></p>
<p>曾经的分享按钮一直被冷落在菜单里：</p>
<p><a href="http://bluehua.org/wp-content/uploads/2010/01/screenshot_036.png"><img class="alignnone size-full wp-image-852" title="screenshot_036" src="http://bluehua.org/wp-content/uploads/2010/01/screenshot_036.png" alt="" width="389" height="456" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2010/01/16/842.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>I18N and L10N</title>
		<link>http://bluehua.org/2009/12/13/736.html</link>
		<comments>http://bluehua.org/2009/12/13/736.html#comments</comments>
		<pubDate>Sun, 13 Dec 2009 04:41:51 +0000</pubDate>
		<dc:creator>小鹿</dc:creator>
				<category><![CDATA[我火星]]></category>
		<category><![CDATA[i18n]]></category>

		<guid isPermaLink="false">http://bluehua.org/?p=736</guid>
		<description><![CDATA[有趣的缩写I18N,L10N及延伸知识 &#124; EricBess WebHome.
牛x的缩写。。
话说国际化还是挺重要的，应该做好准备，说不定哪天人人网会出个英文版。。。
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ericbess.com/ericblog/2008/02/05/i18n-l10n/">有趣的缩写I18N,L10N及延伸知识 | EricBess WebHome</a>.</p>
<p>牛x的缩写。。</p>
<p>话说国际化还是挺重要的，应该做好准备，说不定哪天人人网会出个英文版。。。</p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2009/12/13/736.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>usb冰箱使用的制冷原理</title>
		<link>http://bluehua.org/2009/04/05/263.html</link>
		<comments>http://bluehua.org/2009/04/05/263.html#comments</comments>
		<pubDate>Sun, 05 Apr 2009 10:30:02 +0000</pubDate>
		<dc:creator>小鹿</dc:creator>
				<category><![CDATA[我火星]]></category>

		<guid isPermaLink="false">http://bluehua.org/?p=263</guid>
		<description><![CDATA[第一感觉肯定不会装个泵，g了一下是下面的这个东西
半导体制冷
原来半导体还能一头冷一头热的。。。
]]></description>
			<content:encoded><![CDATA[<p>第一感觉肯定不会装个泵，g了一下是下面的这个东西</p>
<p><a href="http://www.google.cn/search?hl=zh-CN&amp;rlz=1B5GGGL_zh-CNCN314CN314&amp;newwindow=1&amp;q=%E5%8D%8A%E5%AF%BC%E4%BD%93%E5%88%B6%E5%86%B7&amp;btnG=Google+%E6%90%9C%E7%B4%A2&amp;meta=&amp;aq=f&amp;oq=" target="_blank">半导体制冷</a></p>
<p>原来半导体还能一头冷一头热的。。。</p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2009/04/05/263.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>//g.test()</title>
		<link>http://bluehua.org/2009/03/12/241.html</link>
		<comments>http://bluehua.org/2009/03/12/241.html#comments</comments>
		<pubDate>Thu, 12 Mar 2009 10:35:07 +0000</pubDate>
		<dc:creator>小鹿</dc:creator>
				<category><![CDATA[web dev]]></category>
		<category><![CDATA[我火星]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://bluehua.org/?p=241</guid>
		<description><![CDATA[又火星了~

&#60;html&#62;
&#60;script&#62;
function log&#40; str &#41;
&#123;
    if &#40; window.console &#41;
    &#123;
        console.log&#40; str &#41;; 
    &#125;
    else
    &#123;
        alert&#40; str &#41;;
    &#125;
&#125;
&#160;
var reg = /^\s*$/g;
log&#40; [...]]]></description>
			<content:encoded><![CDATA[<p>又火星了~</p>

<div class="wp_syntax"><div class="code overflow"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>html<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #003366; font-weight: bold;">function</span> log<span style="color: #009900;">&#40;</span> str <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> window.<span style="color: #660066;">console</span> <span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span> str <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066; font-weight: bold;">else</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span> str <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> reg <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/^\s*$/g</span><span style="color: #339933;">;</span>
log<span style="color: #009900;">&#40;</span> reg.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">' '</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
log<span style="color: #009900;">&#40;</span> reg.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">' '</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> reg <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/^\s*$/</span><span style="color: #339933;">;</span>
log<span style="color: #009900;">&#40;</span> reg.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">' '</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
log<span style="color: #009900;">&#40;</span> reg.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">' '</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>html<span style="color: #339933;">&gt;</span></pre></div></div>

<p>加了g参数后test的行为类似exec了<br />
<a href="http://www.w3school.com.cn/js/jsref_obj_regexp.asp">http://www.w3school.com.cn/js/jsref_obj_regexp.asp</a></p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2009/03/12/241.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>js动态加载简记</title>
		<link>http://bluehua.org/2009/03/08/222.html</link>
		<comments>http://bluehua.org/2009/03/08/222.html#comments</comments>
		<pubDate>Sun, 08 Mar 2009 07:00:38 +0000</pubDate>
		<dc:creator>小鹿</dc:creator>
				<category><![CDATA[web dev]]></category>
		<category><![CDATA[我火星]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://bluehua.org/?p=222</guid>
		<description><![CDATA[适用：页面使用大量的js做交互和ajax，然而又不像gmail，一次加载之后不会刷新页面，所以如果引入大量js就会拖慢页面的加载速度。这时如果只加载每个页面都需要初始化的js，其他js只有当需要时才动态加载进来，就会大大提高页面加载速度。
动态加载的方法：

//示例代码
dynamicLoad = function&#40; file &#41;
&#123;
    each&#40; file.funcs , function&#40; i , func &#41;
    &#123;
        //为可能用到的函数声明一个同名的代理函数
        window&#91; func &#93; = function&#40;&#41;
        &#123;
        [...]]]></description>
			<content:encoded><![CDATA[<p>适用：页面使用大量的js做交互和ajax，然而又不像gmail，一次加载之后不会刷新页面，所以如果引入大量js就会拖慢页面的加载速度。这时如果只加载每个页面都需要初始化的js，其他js只有当需要时才动态加载进来，就会大大提高页面加载速度。</p>
<p>动态加载的方法：</p>

<div class="wp_syntax"><div class="code overflow"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">//示例代码</span>
dynamicLoad <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> file <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    each<span style="color: #009900;">&#40;</span> file.<span style="color: #660066;">funcs</span> <span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> i <span style="color: #339933;">,</span> func <span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #006600; font-style: italic;">//为可能用到的函数声明一个同名的代理函数</span>
        window<span style="color: #009900;">&#91;</span> func <span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> ars <span style="color: #339933;">=</span> arguments<span style="color: #339933;">;</span>
            <span style="color: #006600; font-style: italic;">//当页面中调用到此函数时，会首先把自己注销</span>
            window<span style="color: #009900;">&#91;</span> func <span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
            <span style="color: #006600; font-style: italic;">//加载相应的js文件</span>
            loadFile<span style="color: #009900;">&#40;</span> file.<span style="color: #660066;">file</span> <span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#123;</span>
                <span style="color: #006600; font-style: italic;">//js加载完成之后，调用js中声明的同名函数，完成动态加载</span>
                window<span style="color: #009900;">&#91;</span> func <span style="color: #009900;">&#93;</span>.<span style="color: #660066;">apply</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">null</span> <span style="color: #339933;">,</span> ars <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
dynamicLoad<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
    file <span style="color: #339933;">:</span> <span style="color: #3366CC;">'http://xxx.com/xxx.js'</span><span style="color: #339933;">,</span>
    funcs <span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span> <span style="color: #3366CC;">'chatWith'</span> <span style="color: #339933;">,</span> <span style="color: #3366CC;">'showProfile'</span> <span style="color: #009900;">&#93;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>通过dynamicLoad方法注册了一个需要动态加载的函数，参数的file为需要动态加载的文件，funcs为js中实现的函数，当页面中触发调用此函数时，将动态加载对应文件。</p>
<p>需要解决的问题：</p>
<p>1  避免重复加载</p>
<p>这个问题很好解决，只需要做一个数组来存储已经加载的脚本，页面onload的时标记页面中已经加载的js，动态加载时判断某一脚本是否已加载，没有则加载此文件并标记为已加载。</p>
<p>2 在一个js中加载另一js时如何解决版本号问题</p>
<p>开发时写在页面里的脚本可能是xxx.js?ver=$$$,更新之后$$$会替换成对应的svn版本号，然而在js中动态加载另一文件时如何获知该js的版本号呢？</p>
<p>我想到的一种方法：</p>

<div class="wp_syntax"><div class="code overflow"><pre class="html" style="font-family:monospace;">&lt;script vsrc=&quot;xxx.js?ver=$$$&quot;&gt;&lt;/script&gt;</pre></div></div>

<p>把页面中需要动态加载的js的src属性改成vsrc，这样就可以得到该文件的版本号</p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2009/03/08/222.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>我火星之:AMOLED</title>
		<link>http://bluehua.org/2009/01/08/190.html</link>
		<comments>http://bluehua.org/2009/01/08/190.html#comments</comments>
		<pubDate>Thu, 08 Jan 2009 10:54:13 +0000</pubDate>
		<dc:creator>小鹿</dc:creator>
				<category><![CDATA[我火星]]></category>
		<category><![CDATA[dig]]></category>

		<guid isPermaLink="false">http://bluehua.org/?p=190</guid>
		<description><![CDATA[难怪iriver那么贵,人家用屏幕用火星产品~

主动矩阵有机发光二极体面板（AMOLED）
google search AMOLED
]]></description>
			<content:encoded><![CDATA[<p>难怪iriver那么贵,人家用屏幕用火星产品~</p>
<p><a href="http://www.irivershop.com.cn/goods_detail.asp?GoodsID=251&amp;show=spec#show"><img class="alignnone" src="http://image.iriverchina.com/product/spinn/spinn_preview.jpg" alt="" width="300" height="300" /></a></p>
<p>主动矩阵有机发光二极体面板（AMOLED）</p>
<p>google search <a href="http://www.google.cn/search?hl=zh-CN&amp;q=amoled&amp;btnG=Google+%E6%90%9C%E7%B4%A2&amp;meta=&amp;aq=f&amp;oq=" target="_blank">AMOLED</a></p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2009/01/08/190.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.203 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-09-07 10:58:26 -->
