<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Blog of Felix021]]></title> 
<link>http://19880711.com/blog/index.php</link> 
<description><![CDATA[如果方向错了，停下来就是前进]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Blog of Felix021]]></copyright>
<ttl>10</ttl>
<item>
    <title><![CDATA[韩(和谐)寒：我只是在猜想]]></title> 
    <link>http://19880711.com/blog/read.php?0</link>
    <description>
<![CDATA[ 
	zz from <a href="http://blog.sina.com.cn/s/blog_4701280b0100gmcy.html" target="_blank">http://blog.sina.com.cn/s/blog_4701280b0100gmcy.html</a> （原文已被和谐，贴链接没啥意义了）<br/><br/>p.s. 注意标题，恭喜韩(和谐)寒进入关键字列表。<br/><br/><img src="http://19880711.com/blog/template/whuacm/images/viewimage.gif" alt=""/><a href="http://19880711.com/blog/attachment.php?fid=387" target="_blank">点击在新窗口中浏览此图片</a><br/><a href="http://19880711.com/blog/attachment.php?fid=387" target="_blank">http://19880711.com/blog/attachment.php?fid=387</a><br/><br/><br/>2010年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 中国开展互联网整治活动，活动口号为“三天不打，上房揭瓦”。<br/><br/>2010年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 相关部门扩大屏蔽词词库，汉字“档”和英文字母“D”在大陆消失。当当网和豆瓣网被迫改名为肮肮网和藕瓣网。<br/><br/>2010年6月&nbsp;&nbsp;&nbsp;&nbsp;政府启动“保护儿童”项目，儿童节被提到和国庆节相同的位置，并且宣布，严格限制一切不利于少年儿童健康成长的资讯。同时，上海世博会提出“世博会，世博会，捉奸在床一万对”的口号，线上线下同时启动扫黄项目，政府明确表示，一切和黄色有关的东西，都将被屏蔽，黄色代表色情和封建。小学生们都被发动了起来，纷纷走上街头，表示不放过一切黄色的东西。<br/><br/>2010年7月&nbsp;&nbsp;&nbsp;&nbsp;小学生爱国委员会发现，因为五星红旗上的5个五角星为黄色，不符合时代的进步思想。该提议经过研究，相关部门决定将五个五角星改为红色。<br/><br/>2010年8月&nbsp;&nbsp;&nbsp;&nbsp;政府发现，将五角星改为红色以后，和国旗原背景色一样，导致分辨困难，经过小学生代表的提议，国旗上五角星被改为绿色，代表着绿领巾和绿霸。<br/><br/>2010年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 根据小学生爱护委员会和小学生代表的提议，政府收紧图片审查标准，并提出“激凸等于露点”的战略指导思想。<br/><br/>2010年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 所有论坛的版主被收编为公务员。<br/><br/>2010年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 政府推出全新网络长城，该长城系统汇聚了无数中国各行各业专家的智慧，他们在一个军事基地中集中工作，他们工作的卫星照片一度被海内外误读为中国在制造航母。<br/><br/>2011年1月&nbsp;&nbsp; 政府新一轮经济刺激计划中拨款1000亿用于网络评论员，网络评论员的薪水由每条五毛涨为每条一元，2011年的目标是有1000亿条正面评论，坚守在评论征地的五毛党们黯然落泪，苦撑多年，被骂无数，终于等来了大部队。从此，在各大互联网评论中，网评员和正常人类的比例达到5比5。<br/><br/>2011年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GOOGLE，YOUTUBE，FACEBOOK，TWITTER等网站宣布重返中国并开放注册。<br/>同时&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 所有上述网站在美国宣布并未在中国开展任何业务。<br/>马上&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 这条消息被全新长城系统屏蔽，在国内无人知晓。<br/><br/>2011年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 在上述网站注册的用户被长城系统追踪，他们的电脑被锁定，综合类网站只能打开人民网，新华网，论坛类网站只能打开强国论坛和铁血论坛，视频类网站只能打开央视一套。经过系统重装，都不能破解锁定。<br/><br/>2011年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 电脑涨价一倍，出现卖电脑的黄牛。但用户买回新电脑以后发现还是只能打开上述规定网站。<br/><br/>2011年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 房地产涨价一倍，在房地产交易网上，房源必须标明是上网房和限网房。<br/><br/>2011年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 南方都市报，南方周末被改名为男方都市报和男方周末，被重新转型为婚姻介绍类报纸。同时，网评员和正常人类的比例达到9比1。<br/><br/>2011年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 某市领导被人肉搜索。<br/><br/>2011年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 互联网第二轮整治，所有搜索网站被关闭，各大门户网站和报纸发表“搜索，让我们变成懒人”、“网络搜索严重影响小学生的动脑动手能力”等文章，领导们表示，我们从来不用网络搜索，也到了今天的地位，说明网络搜索百害而无一利。<br/><br/>2011年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 百度被百事收购，成为饮料官方网站。<br/><br/>2012年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 新浪网曝光某村领导收受贿赂500元，该新闻被评为2012中国年度新闻，该新闻点击量达到5000亿，很多人反复点击，经过删除后留言量高达一百万条，很多人认为，这是舆论监督重新开始的一个新起点。但是网络投票中，九成网友认为该新闻不应该发表，因为破坏了社会的稳定，甚至可能导致民族的分裂。<br/><br/>2012年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 新浪网被小学生举报搜索到有人激凸。新浪网被停业整治。<br/><br/>2013年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 所有论坛停止注册和发帖功能，中国作家协会和中国文联接收互联网，成为互联网内容提供商。互联网从WEB 3.0退回到WEB 0.3，网络模式改为只能浏览资讯，不能发帖。<br/><br/>2013年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;小学生健康成长委员会举报新浪网又出现激凸。<br/><br/>2014年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;新浪被激浪收购，成为饮料官方网站。<br/><br/>2014年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;小学生健康成长委员会举报，有人在QQ上向他们发送露点照片，导致该学生看到以后上街强奸了数十人。<br/><br/>2014年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;QQ，MSN等聊天工具被禁止，个人博克和微博被禁止，但是屡屡有不法分子通过各种技术手段上传一些私人的想法和信息。政府非常头疼。<br/><br/>2015年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;政府部门将网络全部切断，并统一推出上网专用电脑，只有用该电脑才能上网，没有键盘的接口，只给你一个鼠标。改专项整治活动的口号为“只给你丫一鼠标，看你还能怎<br/>么着”。<br/><br/>2016年&nbsp;&nbsp; 　中国网民下降到100万，所有网站合并为一个网站，输入任何网址都将链接入该网站。该网址更新内容以当天人民日报为准。同年，中国的互联网产业消失，直接导致近500万<br/>互联网相关产业从业人员失业，除了因电子邮件被取消后重新兴起的邮政行业接纳了十万人以外，490万人面临再就业困难。同时，近100万五毛党失业。五毛党感叹道，做牛做马做狗了半辈子，连退休金都没有。<br/><br/>2016年&nbsp;&nbsp; 人民日报发文：牺牲了一个产业，换来了国家的稳定，值。<br/><br/>2016年&nbsp;&nbsp; 新闻联播评论，互联网产业发展下去，国家将面临分裂的危险，国外反华势力和国内分裂势力借助着互联网煽动群众，幸亏有关部门采取强硬手段，避免了事态的扩大。<br/><br/>2016年&nbsp;&nbsp; 周久耕平反。周出狱后任命信息产业部部长。余秋雨被任命为文化部部长。<br/><br/>2016年&nbsp;&nbsp; 100万失业的五毛党因为根本没有其他技能，一直找不到工作，没有生活保障，数万五毛党开始向北京聚集，该年儿童节，十万五毛党在政府门前静坐绝食，要求政府安排工作或者买断工龄，并追加公务员称号。人民日报发文表示，政府从来没有过网络评论员这个职业，所有的网络评论均为五毛党自发评论。五毛党们拿不出任何劳动合同来证明其和政府之间的劳动关系。<br/>五毛党的发言人表示，他们当年是地下工作者，为国家的稳定立下了汗马功劳。<br/>政府表示，限五毛党三日内离京，否则将予以逮捕。人民日报发文表示，赞美政府就不应该向政府施加压力。赞美政府不能作为换取钱财的条件。赞美都应该是无偿的。<br/><br/>2016年&nbsp;&nbsp;&nbsp;&nbsp;五毛党继续绝食，市民们表示，支持五毛党绝食，绝不向五毛党提供食物，并且监督五毛党绝食，切断一切五毛党可以获得食物的途径。<br/>第二天，文化部部长余秋雨在绝食现场发表“含泪劝五毛书”。五毛党们纷纷表示，讲的太深奥，听不懂啥意思。<br/><br/>2016年&nbsp;&nbsp;&nbsp;&nbsp;五毛党的罪名包括非法集党，非法游行，非法示威，攻击政府，暴力抗法，诽谤政府，危害公共安全，扰乱社会秩序，随地吐痰等。组织者被逮捕，但政府表示，宽容对待不明真相的盲从者，给他们一个改过自新的机会，给绝食者每人发五毛用于充饥。新闻联播评论这一场景：五毛见五毛，两眼泪汪汪。<br/><br/>2016年&nbsp;&nbsp;&nbsp;&nbsp;五毛危机平安解决，再现党和政府稳定局面的能力。为首的五毛党面对央视记者的采访，说了三个字，悔当初。<br/><br/>2017年&nbsp;&nbsp;&nbsp;&nbsp;失业人数剧增，互联网产业的崩溃导致经济严重衰退，政府表示，制造业将再一次作为国家支柱产业，中国应当利用一切自然的资源，以低价的优势向海外出口。<br/><br/>2017年&nbsp;&nbsp;&nbsp;&nbsp;海外反华势力勾结起来，狼狈为奸，蛊惑联合国以及各国，通过了关于各国家禁止向中国进口任何商品的法案，以反对中国对互联网进行封锁。中国政府强烈谴责，表示中国的互联网管理是中国的内政，其他国家无权干涉。其他国家表示不向中国进口商品是该国的内政，中国政府无权干涉。<br/><br/>2019年&nbsp;&nbsp;&nbsp;&nbsp; 国庆70周年大阅兵，在阅兵当天，政府表示，闭关锁国，苦练内功，让一切反动势力在我们面前颤抖吧。当天，中国向全世界发出电文，电文内容共八个字：三天不打，上房揭瓦。很多国家表示难以翻译。<br/><br/>2020年&nbsp;&nbsp;&nbsp;&nbsp; ……<br/><br/>2020年&nbsp;&nbsp;&nbsp;&nbsp; 地球毁灭，玛雅人的后代表示，前后十年内的误差是正常的。
]]>
    </description>
    <pubDate>Sun, 17 Jan 2010 08:52:19 +0000</pubDate> 
    <category><![CDATA[杂文-未分类]]></category>
    <author>felix021 &lt;i&lt;at&gt;felix021.com&gt;</author>
    <guid>http://19880711.com/blog/read.php?0</guid> 
</item>
<item>
    <title><![CDATA[百度十年 年会 上PP]]></title> 
    <link>http://19880711.com/blog/read.php?1820</link>
    <description>
<![CDATA[ 
	就贴3张吧<br/><br/>北大，一塔湖图，第一次见到全都是冰的湖面。<br/><br/><a href="http://19880711.com/blog/attachment.php?fid=384" target="_blank"><img src="http://19880711.com/blog/attachment.php?fid=384" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/><br/>现场气氛非常热烈，非常开心<br/><br/><a href="http://19880711.com/blog/attachment.php?fid=385" target="_blank"><img src="http://19880711.com/blog/attachment.php?fid=385" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/><br/>非常精彩的沙画，模仿网上“用沙子展现进化史”这个视频的表现形式<br/><br/><a href="http://19880711.com/blog/attachment.php?fid=386" target="_blank"><img src="http://19880711.com/blog/attachment.php?fid=386" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/><br/>
]]>
    </description>
    <pubDate>Sat, 16 Jan 2010 15:15:31 +0000</pubDate> 
    <category><![CDATA[贴图]]></category>
    <author>felix021 &lt;i&lt;at&gt;felix021.com&gt;</author>
    <guid>http://19880711.com/blog/read.php?1820</guid> 
</item>
<item>
    <title><![CDATA[百度十年，小老虎]]></title> 
    <link>http://19880711.com/blog/read.php?1819</link>
    <description>
<![CDATA[ 
	能在离职前参加年会 真是很幸运~~哇哈哈。<br/>下面这张照片是公司给每个员工发的小老虎，大红色的围巾，还有一瓶Duc DE BREUX的香槟（搜了一下，市价80+呢~）<br/><br/>很cute的小老虎吧～～<br/>p.s. 那张是百度十年年会入场券~<br/><br/><img src="http://19880711.com/blog/template/whuacm/images/viewimage.gif" alt=""/><a href="http://19880711.com/blog/attachment.php?fid=383" target="_blank">点击在新窗口中浏览此图片</a><br/><a href="http://19880711.com/blog/attachment.php?fid=383" target="_blank">http://19880711.com/blog/attachment.php?fid=383</a><br/>
]]>
    </description>
    <pubDate>Fri, 15 Jan 2010 11:41:32 +0000</pubDate> 
    <category><![CDATA[贴图]]></category>
    <author>felix021 &lt;i&lt;at&gt;felix021.com&gt;</author>
    <guid>http://19880711.com/blog/read.php?1819</guid> 
</item>
<item>
    <title><![CDATA[SmartQ V7折腾记 第四篇 交换分区，键位映射，快捷键，虚拟键盘..]]></title> 
    <link>http://19880711.com/blog/read.php?1818</link>
    <description>
<![CDATA[ 
	从标题就可以看出来，这篇的内容是大杂烩，主要是这几天玩的东西，一并说一下<br/><br/>总共5个东西<br/><br/>1. 交换分区<br/>第三篇说的重新分区太危险了，万一SmartQ升级固件的程序不认，那就挂了。所以决定把那128MB拿来做交换分区。具体做法如下<br/><br/>建立一个100MB的文件<br/># dd if=/dev/zero of=/media/ndda2/swapfile bs=1MB count=100<br/><br/>格式化成swap所需的格式<br/>#&nbsp;&nbsp;mkswap /media/ndda2/swapfile<br/><br/># swapon /media/ndda2/swapfile<br/><br/>如果不需要了，可以这样<br/># swapoff /media/ndda2/swapfile<br/><br/>可以把这个写入rc.local.<br/><br/><br/>2. 键位映射<br/>其实主要是xmodmap和xev这2个东西<br/><br/>先讲xev吧：<br/>$ xev &#124; grep keycode<br/>然后按现有的几个键，可以看到，屏幕左边的三个分别是(112)Prior, (117)Next, (64)Alt，上面的三个(从左到右)分别是(124)XF86PowerOff(关机), (9)Esc, (36)Return(回车)。所以实际上可以用ALT+ESC来切换程序。<br/><br/>$ xmodmap -pke<br/>可以看到现在的keycode被映射成什么东西<br/><br/>$ xmodmap -e &#039;keycode 112 = Up&#039;<br/>$ xmodmap -e &#039;keycode 117 = Down&#039;<br/>这样就可以把那两个按键变成上下，而不是翻页了。<br/><br/>$ xmodmap -e &#039;keycode 112 = Prior&#039;<br/>$ xmodmap -e &#039;keycode 117 = Next&#039;<br/>这样还原。<br/><br/><br/>3. 快捷键<br/>主要是修改 /home/user/.config/openbox/lxde-rc.xml<br/>找到Keybinding这一节，按照格式修改即可。<br/><br/>比如默认的A-XF86PowerOff(Alt+Power组合键)是运行ts_calibrate，就是校正屏幕的，但是其实这个基本用不到，所以可以改成其他的，比如改成vlc，或者fbreader；默认的XF86PowerOff是打开那个系统设置(coman)程序，很容易被误按，我也改掉了。这样就多了2个可以自定义的快捷键，很爽。有兴趣的话还可以研究一下怎么增加其他组合按键，比如Alt+Enter :)<br/>p.s. 需要运行一次首选项-&gt;窗口设置 才可以生效。<br/><br/><br/>4. 虚拟键盘<br/>系统自带的虚拟键盘是matchbox-keyboard， Nokia的N770什么的也在用。键盘的布局文件是存放在/usr/share/matchbox-keyboard这个目录下的，标准键盘用的就是keyboard.xml这个文件了。可以修改这个文件来实现自己想要的键位布局。昨天整了一个接近标准PC键盘的键位布局，效果见图：<a href="attachment.php?fid=382">点击这里下载文件</a><br/><br/><img src="http://19880711.com/blog/template/whuacm/images/viewimage.gif" alt=""/><a href="http://19880711.com/blog/attachment.php?fid=380" target="_blank">点击在新窗口中浏览此图片</a><br/><a href="http://19880711.com/blog/attachment.php?fid=380" target="_blank">http://19880711.com/blog/attachment.php?fid=380</a><br/><br/><br/><img src="http://19880711.com/blog/template/whuacm/images/viewimage.gif" alt=""/><a href="http://19880711.com/blog/attachment.php?fid=381" target="_blank">点击在新窗口中浏览此图片</a><br/><a href="http://19880711.com/blog/attachment.php?fid=381" target="_blank">http://19880711.com/blog/attachment.php?fid=381</a><br/><br/><br/><br/><br/>5. 一个脚本，我存放在/usr/bin/run_app，然后XF86PowerOff映射为运行这个脚本，效果就是，按一下启动vlc，再按一下结束vlc。<br/><div class="code">#!/bin/bash<br/>dir=$HOME/tmp<br/>tmp=$dir/run_app.pid<br/><br/>if &#91; ! -d $dir &#93;; then<br/>&nbsp;&nbsp;&nbsp;&nbsp;mkdir -p $dir<br/>fi<br/><br/>if &#91; -f $tmp &#93;; then<br/>&nbsp;&nbsp;&nbsp;&nbsp;kill `cat $tmp`<br/>&nbsp;&nbsp;&nbsp;&nbsp;rm $tmp -rf<br/>else <br/>&nbsp;&nbsp;&nbsp;&nbsp;setsid vlc &amp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;echo $! &gt; $tmp<br/>fi</div>
]]>
    </description>
    <pubDate>Thu, 14 Jan 2010 18:08:02 +0000</pubDate> 
    <category><![CDATA[硬件]]></category>
    <author>felix021 &lt;i&lt;at&gt;felix021.com&gt;</author>
    <guid>http://19880711.com/blog/read.php?1818</guid> 
</item>
<item>
    <title><![CDATA[百度地图的搞笑广告 很赞~~]]></title> 
    <link>http://19880711.com/blog/read.php?1817</link>
    <description>
<![CDATA[ 
	<embed allowscriptaccess="never" allowFullScreen="false" allowNetworking="internal" style="WIDTH: 640px; HEIGHT: 480px" src=http://i.baidu.com/yule/r/yule/feidian/map.swf type=application/x-shockwave-flash quality="high">
]]>
    </description>
    <pubDate>Thu, 14 Jan 2010 09:15:22 +0000</pubDate> 
    <category><![CDATA[视频]]></category>
    <author>felix021 &lt;i&lt;at&gt;felix021.com&gt;</author>
    <guid>http://19880711.com/blog/read.php?1817</guid> 
</item>
<item>
    <title><![CDATA[收藏: PHP的hash函数]]></title> 
    <link>http://19880711.com/blog/read.php?1816</link>
    <description>
<![CDATA[ 
	更多内容，参见laruence大牛的这篇： <a href="http://www.laruence.com/2009/07/23/994.html" target="_blank">http://www.laruence.com/2009/07/23/994.html</a><br/><br/>这么短一段代码，有这么多考究的地方，很值得学习：<br/>1. 5381<br/>2. hash &lt;&lt; 5 + hash&nbsp;&nbsp;--&gt; hash * 33 (times 33算法)<br/>3. -= 8<br/>4. switch, break<br/>...<br/><br/><div class="code">static inline ulong zend_inline_hash_func(char *arKey, uint nKeyLength)<br/>&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;register ulong hash = 5381;<br/> <br/>&nbsp;&nbsp;&nbsp;&nbsp;/* variant with the hash unrolled eight times */<br/>&nbsp;&nbsp;&nbsp;&nbsp;for (; nKeyLength &gt;= 8; nKeyLength -= 8) &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash = ((hash &lt;&lt; 5) + hash) + *arKey++;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash = ((hash &lt;&lt; 5) + hash) + *arKey++;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash = ((hash &lt;&lt; 5) + hash) + *arKey++;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash = ((hash &lt;&lt; 5) + hash) + *arKey++;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash = ((hash &lt;&lt; 5) + hash) + *arKey++;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash = ((hash &lt;&lt; 5) + hash) + *arKey++;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash = ((hash &lt;&lt; 5) + hash) + *arKey++;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash = ((hash &lt;&lt; 5) + hash) + *arKey++;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;switch (nKeyLength) &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 7: hash = ((hash &lt;&lt; 5) + hash) + *arKey++; /* fallthrough... */<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 6: hash = ((hash &lt;&lt; 5) + hash) + *arKey++; /* fallthrough... */<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 5: hash = ((hash &lt;&lt; 5) + hash) + *arKey++; /* fallthrough... */<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 4: hash = ((hash &lt;&lt; 5) + hash) + *arKey++; /* fallthrough... */<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 3: hash = ((hash &lt;&lt; 5) + hash) + *arKey++; /* fallthrough... */<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 2: hash = ((hash &lt;&lt; 5) + hash) + *arKey++; /* fallthrough... */<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 1: hash = ((hash &lt;&lt; 5) + hash) + *arKey++; break;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 0: break;<br/>EMPTY_SWITCH_DEFAULT_CASE()<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;return hash;<br/>&#125;</div>
]]>
    </description>
    <pubDate>Mon, 11 Jan 2010 09:31:24 +0000</pubDate> 
    <category><![CDATA[程序设计]]></category>
    <author>felix021 &lt;i&lt;at&gt;felix021.com&gt;</author>
    <guid>http://19880711.com/blog/read.php?1816</guid> 
</item>
<item>
    <title><![CDATA[ SmartQ V7折腾记 第三篇 扩容]]></title> 
    <link>http://19880711.com/blog/read.php?1815</link>
    <description>
<![CDATA[ 
	第二篇把所有分区的大小都列出来了，不过还是漏了一点：<br/>所有分区加起来，总共是1795，但是2G，用硬件厂商的单位换算，就是2,000,000,000B = 1907.35MB，而fdisk显示的是1883 MB，至少还应该有88MB的空间。<br/><br/>fdisk -l /dev/ndda没有看到另外的分区，根据block的数量来算，也没有找到这么大的地方，看起来应该是被隐藏了。不过还是可以大概估计出来这这88MB的用处——那就是用于WinCE的固件。当然，也可能是用于Android的固件，但是2个都用上空间不够大。而且WinCE的那个分区只用了2M多，说明固件肯定另外存了一份；而ndda4下面的4个逻辑分区都是Linux分区，所以肯定不会存在这里。综合一下，我觉得这88MB就是用来刷WinCE的固件了，而Andoid的，都放在ndda4里头。<br/><br/>由于我对Andoid没什么兴趣，决定把那467的空间搞出来。<br/><br/><span style="font-size: 18px;"><strong>注意：以下操作具有危险性，不熟悉Linux的同学，最好小心点儿，出了问题我可不负责，嗯。</strong></span><br/><br/>具体的操作为:<br/>1. 删除ndda4原有的分区<br/>2. 建立一个新的分区<br/>3. 格式化<br/>4. 其他<br/><br/>第一步，用fdisk。说实话这是我第一次用linux下的fdisk=。= 不过还是挺简单的，如果有一些主分区、扩展分区、逻辑分区的知识的话。<br/>V7里头这个Ubuntu它貌似是不支持卡上的逻辑分区的，ls /dev没能看到ndda5~ndda8就说明了问题。<br/>所以应该把45678都给删掉，然后重新建立ndda4<br/>具体操作:<br/><br/>root@SmartQ:/media# fdisk /dev/ndda<br/><br/>The number of cylinders for this disk is set to 57472.<br/>There is nothing wrong with that, but this is larger than 1024,<br/>and could in certain setups cause problems with:<br/>1) software that runs at boot time (e.g., old versions of LILO)<br/>2) booting and partitioning software from other OSs<br/>&nbsp;&nbsp; (e.g., DOS FDISK, OS/2 FDISK)<br/><br/>Command (m for help): <br/><br/>这里可以输入m看看有哪些命令，输入d是删除分区：<br/><br/>Command (m for help): d<br/>Partition number (1-8): 8<br/><br/>Command (m for help): d<br/>Partition number (1-7): 7<br/><br/>Command (m for help): d<br/>Partition number (1-6): 6<br/><br/>Command (m for help): d<br/>Partition number (1-5): 5<br/><br/>Command (m for help): d<br/>Partition number (1-4): 4<br/><br/>至此不需要的分区全都删掉了。然后看看现在的分区，命令是p，显示大致是这样的:<br/><br/><br/>Disk /dev/ndda: 1883 MB, 1883242496 bytes<br/>1 heads, 64 sectors/track, 57472 cylinders<br/>Units = cylinders of 64 * 512 = 32768 bytes<br/>Disk identifier: 0x3079ae40<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;Device Boot&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Start&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Blocks&nbsp;&nbsp; Id&nbsp;&nbsp;System<br/>/dev/ndda1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;33&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 35232&nbsp;&nbsp;&nbsp;&nbsp; 1126400&nbsp;&nbsp;&nbsp;&nbsp;b&nbsp;&nbsp;W95 FAT32<br/>Partition 1 does not end on cylinder boundary.<br/>/dev/ndda2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 35233&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 39328&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;131072&nbsp;&nbsp;&nbsp;&nbsp;6&nbsp;&nbsp;FAT16<br/>Partition 2 does not end on cylinder boundary.<br/>/dev/ndda3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 39329&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>42528</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;102400&nbsp;&nbsp;&nbsp;&nbsp;6&nbsp;&nbsp;FAT16<br/>Partition 3 does not end on cylinder boundary.<br/><br/>注意这个42528，是分区3的末尾，我们接下来需要创建一个分区4，从42529开始，命令是n<br/>Command (m for help): n<br/>Command action<br/>&nbsp;&nbsp; e&nbsp;&nbsp; extended<br/>&nbsp;&nbsp; p&nbsp;&nbsp; primary partition (1-4)<br/>p&nbsp;&nbsp; #需要创建一个主分区，输入，这里输入p<br/><br/>Selected partition 4<br/>First cylinder (2-57472, default 2): 42529&nbsp;&nbsp; #这里输入开始<br/>Last cylinder, +cylinders or +size&#123;K,M,G&#125; (42529-57472, default 57472):&nbsp;&nbsp; #直接回车，默认是到末尾<br/>Using default value 57472<br/><br/>Command (m for help): p #再看一下，已经创建好了。<br/><br/>Disk /dev/ndda: 1883 MB, 1883242496 bytes<br/>1 heads, 64 sectors/track, 57472 cylinders<br/>Units = cylinders of 64 * 512 = 32768 bytes<br/>Disk identifier: 0x3079ae40<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;Device Boot&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Start&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Blocks&nbsp;&nbsp; Id&nbsp;&nbsp;System<br/>/dev/ndda1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;33&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 35232&nbsp;&nbsp;&nbsp;&nbsp; 1126400&nbsp;&nbsp;&nbsp;&nbsp;b&nbsp;&nbsp;W95 FAT32<br/>Partition 1 does not end on cylinder boundary.<br/>/dev/ndda2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 35233&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 39328&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;131072&nbsp;&nbsp;&nbsp;&nbsp;6&nbsp;&nbsp;FAT16<br/>Partition 2 does not end on cylinder boundary.<br/>/dev/ndda3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 39329&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 42528&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;102400&nbsp;&nbsp;&nbsp;&nbsp;6&nbsp;&nbsp;FAT16<br/>Partition 3 does not end on cylinder boundary.<br/>/dev/ndda4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 42529&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 57472&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;478208&nbsp;&nbsp; 83&nbsp;&nbsp;Linux<br/>Partition 4 does not end on cylinder boundary.<br/><br/>#接下来这里一定要慎重！！如果不确定，可以输入q退出，前面所有的都不算数<br/>Command (m for help): w&nbsp;&nbsp;#存盘<br/>完了以后<br/>#sync<br/>#init 6 #重启命令<br/><br/>等到重启好了，格式化，挂载：<br/># mkfs.ext3 /dev/ndda4<br/># mkdir /media/ndda4<br/># mount -t ext3 /dev/ndda4 /media/ndda4<br/><br/>如果不想每次启动都这么弄，可以加入fstab<br/># vi /etc/fstab<br/>增加一行<br/>/dev/ndda4&nbsp;&nbsp;&nbsp;&nbsp; /media/ndda4&nbsp;&nbsp;&nbsp;&nbsp;ext3&nbsp;&nbsp;&nbsp;&nbsp;defaults&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br/>:wq存盘退出，然后<br/># mount -a<br/>在/media/ndda4下面就可以访问这个分区了。<br/><br/>到这里，手头的V7就多了一个可用的467MB的分区，爽！经过测试，Android已经不能启动了，而CE仍然没有问题 :)<br/><br/>-------------华丽的分割线--------------<br/><br/>接下来再做一些小改造：<br/><br/>1. 把ndda4挂载到/home分区，而不是只有128MB的ndda2<br/>2. 把ndda2格式化成fat32，给WinCE用（后来发现一个问题，不建议这么整，详情见后文）<br/><br/>具体操作:<br/><br/># mkdir /media/ndda2<br/># vi /home/fstab<br/>原先home那一行和ndda4的那一行注释掉（就是前面加一个#就可以了），然后加上这两行：<br/>/dev/ndda4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/home&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ext3&nbsp;&nbsp;&nbsp;&nbsp;noatime&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2<br/>/dev/ndda2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/media/ndda2&nbsp;&nbsp;&nbsp;&nbsp;vfat&nbsp;&nbsp;&nbsp;&nbsp;defaults&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br/>:wq存盘退出<br/><br/>然后<br/># cp -r /home/user /media/ndda4<br/># sync<br/># init 6&nbsp;&nbsp;(重启命令)<br/>重启以后，挂载在/home的就是/dev/ndda4了，空间大多了吧 哇哈哈<br/><br/>然后<br/># apt-get install dosfstools<br/>安装好以后就有mkfs.vfat和mkfs.msdos了。<br/><br/># mkfs.vfat /dev/ndda2<br/>格式化成fat32文件系统<br/><br/># mount -a<br/>这样就挂上去了。<br/><br/>重启到WinCE下面，你会发现，怎么什么设置都没有了，先校准一下屏幕，打开“我的设备”，会发现一个新的NAND分区，里面是原先CE下的设置和文件。也就是说，WinCE在引导的时候，会在找到的第一个可用分区建立自己的目录结构，把那里当作自己的家。。。所以如果你不想把WinCE重新设置一边的话，建议还是不要这么搞了。此外，这样做可能还有一个问题：如果重新刷Ubuntu，可能会导致ndda2被重新格式化成linux分区，然后WinCE就会在NAND(也就是ndda3)上面再搞他自己的帝国了。<br/><br/>同时这也给我们一个启示：要将WinCE恢复原状，根本不需要重新刷机，只要在Ubuntu下挂载ndda3分区，把它全部清空，然后重启进入WinCE，就是全新的了。<br/><br/>OVER。<br/><br/>第四篇预告：重新划分所有分区。这个还真的有点危险了，我要仔细考虑一下是否有需要这么做。其实我是想把UBuntu的根分区扩容。
]]>
    </description>
    <pubDate>Sun, 10 Jan 2010 07:51:40 +0000</pubDate> 
    <category><![CDATA[硬件]]></category>
    <author>felix021 &lt;i&lt;at&gt;felix021.com&gt;</author>
    <guid>http://19880711.com/blog/read.php?1815</guid> 
</item>
<item>
    <title><![CDATA[SmartQ V7折腾记 第二篇 所谓的128M用户可用空间 ]]></title> 
    <link>http://19880711.com/blog/read.php?1814</link>
    <description>
<![CDATA[ 
	(这篇文章已经在bbs.zhiqi.com.cn发出去了，在这里润色一下再贴出来)<br/><br/>前面已经把openssh-server搞定了，接下来看看里头的东西。智器官方的介绍说的是2G的空间，其中用户可用128MB，听起来太少了。那其他的空间都哪里去了呢，看看先。<br/><br/>#df -lh 可以看到 <br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>Filesystem Size Used Avail Use% Mounted on <br/>/dev/ndda1 1.1G 579M 450M 57% / #这个是Ubuntu的根分区，用了579M，还有450M可用 <br/>/dev/ndda2 124M 13M 106M 11% /home #这个是用户分区，124（其实是128M，其中4M文件系统用了吧） <br/>/dev/ndda3 99M 2.1M 97M 3% /media/tmp/ndda3 #这个是我自己挂载的，里面有Windows等内容，可以判断出来是WinCE的分区<br/>/dev/mmcblk1p1 3.8G 2.7G 1.2G 71% <br/>/media/MY FLASH DI #这个是SD卡 /dev/sda4 3.8G 2.5G 1.4G 66% <br/>/media/WIN7 #这个是额外插上去的U盘，之所以识别成4，我想是因为前面已经有了123。 <br/></div></div><br/>另外, # ls /dev 可以看到有个ndda，再 #fdisk -l /dev/ndda，可以看到 <br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">root@SmartQ:/media/tmp# fdisk -l /dev/ndda Disk <br/>/dev/ndda: 1883 MB, 1883242496 bytes <br/>1 heads, 64 sectors/track, 57472 cylinders <br/>Units = cylinders of 64 * 512 = 32768 bytes <br/>Disk identifier: 0x3079ae40<br/> Device Boot Start End Blocks Id System <br/>/dev/ndda1 33 35232 1126400 b W95 FAT32 (Ubuntu /) <br/>Partition 1 does not end on cylinder boundary. <br/>/dev/ndda2 35233 39328 131072 6 FAT16 (Ubuntu /home) <br/>Partition 2 does not end on cylinder boundary. <br/>/dev/ndda3 39329 42528 102400 6 FAT16 (WinCE) <br/>Partition 3 does not end on cylinder boundary. <br/>/dev/ndda4 42529 57472 478208 5 Extended (扩展分区，肯定是Andoid的了) <br/>Partition 4 does not end on cylinder boundary. <br/>/dev/ndda5 42530 46436 125024 83 Linux <br/>/dev/ndda6 46438 51321 156288 83 Linux <br/>/dev/ndda7 51323 53154 58624 83 Linux <br/>/dev/ndda8 53156 57472 138144 83 Linux <br/></div></div><br/>每个Block的大小是1024B，也就是1K，换算过来，从1~8共8个分区的大小是(MB) <br/>1126400/1024=1100 <br/>131072/1024=128 <br/>102400/1024=100 <br/>478208/1024=467 <br/>125024/1024=122 <br/>156288/1024=152 <br/>58624/1024=57.25 <br/>138144/1024=134.91 <br/>其中第四个是扩展分区，其实就是后面四个逻辑分区的&quot;合体&quot;，<br/>很明显可以看出来各个分区的作用，已经标注在上面的引用里面了。 <br/><br/>结论： <br/>1. 第一个分区是Ubuntu的根分区，有450MB可用空间，多安一点软件其实没问题 <br/>2. 第二个分区是Ubuntu的/home分区，其实就是桌面上的我的文档，可用空间124MB，这就是官方宣称的128MB可用空间了 <br/>3. 第三个分区是Windows分区，有97MB的可用空间 <br/>4. 第四个分区的Andoid的，有467MB, 鉴于我觉得那个Andoid很鸡肋，完全可以拿来玩。 <br/>5. 综上所述，各个系统之间的可用空间是独立的。 <br/><br/>下一步，准备拿/dev/ndda4开刀。
]]>
    </description>
    <pubDate>Sun, 10 Jan 2010 06:57:38 +0000</pubDate> 
    <category><![CDATA[硬件]]></category>
    <author>felix021 &lt;i&lt;at&gt;felix021.com&gt;</author>
    <guid>http://19880711.com/blog/read.php?1814</guid> 
</item>
<item>
    <title><![CDATA[SmartQ V7折腾记 第一篇 openssh-server不完全攻略]]></title> 
    <link>http://19880711.com/blog/read.php?1813</link>
    <description>
<![CDATA[ 
	因为在那个触摸屏上打字太痛苦了，于是决定安装一个openssh-server。<br/>查看了一下/etc/apt/sources.list，内容只有一行<div class="quote"><div class="quote-title">引用</div><div class="quote-content">deb <a href="http://ports.ubuntu.com/" target="_blank">http://ports.ubuntu.com/</a> karmic main universe restricted multiverse</div></div>原来是karmic，9.10了哇，真是与时俱进。直接用的官方源。<br/># sudo passwd root 随便给root设置一个简单的password<br/># su - 切换用户为root<br/>#apt-get update 发现住处那个ooxx的长城宽带，连上去的速度大约是100B/s以内。很爽。<br/><br/># apt-get update 带到公司再来，这已经是今天了=。=<br/># apt-get install openssh-server<br/>openssh-server 已经是最新的版本了。<br/>共升级了 0 个软件包，新安装了 0 个软件包， 要卸载 0 个软件包，有 80 个软件未被升级。<br/><br/>&amp;*@$ 居然已经安装了，抑郁。<br/># /etc/init.d/ssh start<br/> * Starting OpenBSD Secure Shell server sshd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [ OK ]<br/><br/>然后在台式机上打开SecureCRT连上去，用户名密码就用root的那个，然后看到这个提示符，表示登录成功啦<br/>root@SmartQ:~#<br/><br/>于是就不用忍受终端下用触摸屏打字的痛苦了..<br/><br/>p.s. 顺便安装了一些东西：gcc g++ build-essential vim ctags cscope，然后写了个hello smartq，没问题，嗯。以后应该会有用的，哇哈哈。另外，发现机器上已经有perl和python了，真是好东西哇好东西。<br/>再p.s. apt安装的时候会先下载安装包，会放在/etc/cache/apt/archieves，如果确定不会删了再装，可以把它们都删掉 #apt-get clean，或者可以备份到卡上，免得下次下载很痛苦。<br/><br/><br/>update 1 @ 2010-01-17<br/><br/>1. 更新源用国内的这个，速度很快<br/>deb <a href="http://ubuntu.srt.cn/ubuntu-ports/" target="_blank">http://ubuntu.srt.cn/ubuntu-ports/</a> karmic main restricted universe multiverse<br/><br/>2. 安装个lrzsz，然后用SecureCRT连上去以后就很方便了<br/># sudo apt-get install lrzsz<br/># sz 文件名<br/>可以下载到电脑上<br/># rz -e 回车<br/>在电脑上选择文件，传输上去
]]>
    </description>
    <pubDate>Sun, 10 Jan 2010 06:41:21 +0000</pubDate> 
    <category><![CDATA[随手记下]]></category>
    <author>felix021 &lt;i&lt;at&gt;felix021.com&gt;</author>
    <guid>http://19880711.com/blog/read.php?1813</guid> 
</item>
<item>
    <title><![CDATA[入手智器SmartQ V7]]></title> 
    <link>http://19880711.com/blog/read.php?1812</link>
    <description>
<![CDATA[ 
	昨天到中关村去，鼎好A2574试用了3个小时的SmartQ V7，然后终于决定买下来，一个V7，一个布袋，送一个烂耳机，一共1530。其间还有些纠结，反正没有买到可用的USB网卡，也没有买到想买的USB充电线，小抑郁。回来后在当当上买了一个KingMax的SDHC, 16GB, class6, 230。也就是总共花了接近1800。<br/><br/>折腾了很久，Ubuntu很慢，除去这个问题的话 用起来还算比较happy，此外就是屏幕不够大，那个键盘就占了好大的空间，很囧。之后试着看能不能把它转过来。WinCE软件不少，折腾起来阻力，而且全是玩软件，太无聊了。Android一点都不好玩。<br/><br/>后面慢慢贴一些“研究成果”出来
]]>
    </description>
    <pubDate>Sun, 10 Jan 2010 06:31:14 +0000</pubDate> 
    <category><![CDATA[硬件]]></category>
    <author>felix021 &lt;i&lt;at&gt;felix021.com&gt;</author>
    <guid>http://19880711.com/blog/read.php?1812</guid> 
</item>

</channel>
</rss>