<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2595309773216235436</id><updated>2011-11-27T16:36:06.028-08:00</updated><category term='数据库'/><category term='生活'/><category term='Coding'/><category term='Python'/><category term='电影'/><category term='学习'/><category term='MySQL'/><category term='网络'/><category term='Debian'/><category term='NTT'/><category term='Framework'/><category term='Linux'/><category term='听歌儿'/><category term='Scrum'/><category term='设计模式'/><category term='FreeBSD'/><category term='Java'/><category term='Android'/><category term='J2EE'/><category term='操作系统'/><category term='Ajax'/><category term='Google'/><category term='Open Source'/><category term='NASM'/><title type='text'>CodeConer</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default?start-index=101&amp;max-results=100'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>215</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-5437284236758821532</id><published>2010-12-23T06:48:00.001-08:00</published><updated>2010-12-23T06:48:29.925-08:00</updated><title type='text'>lighttpd.conf</title><content type='html'>避免哪天又误删了conf文件，特bakup一份&lt;p&gt;debian:/home/tom# cat /etc/lighttpd/lighttpd.conf&lt;br&gt;server.document-root       = &amp;quot;/home/tom/www&amp;quot;&lt;br&gt;server.port                = 80&lt;br&gt;server.username            = &amp;quot;tom&amp;quot;&lt;br&gt;server.groupname           = &amp;quot;tom&amp;quot;&lt;br&gt;server.bind                = &amp;quot;localhost&amp;quot;&lt;br&gt;server.tag =&amp;quot;lighttpd&amp;quot;&lt;p&gt;server.errorlog            = &amp;quot;/home/tom/www/log/error.log&amp;quot;&lt;br&gt;accesslog.filename         = &amp;quot;/home/tom/www/log/access.log&amp;quot;&lt;p&gt;server.modules             = (&lt;br&gt;    &amp;quot;mod_access&amp;quot;,&lt;br&gt;    &amp;quot;mod_accesslog&amp;quot;,&lt;br&gt;    &amp;quot;mod_fastcgi&amp;quot;,&lt;br&gt;    &amp;quot;mod_rewrite&amp;quot;,&lt;br&gt;    &amp;quot;mod_auth&amp;quot;,&lt;br&gt;    &amp;quot;mod_compress&amp;quot;&lt;br&gt;)&lt;p&gt;# mimetype mapping&lt;br&gt;mimetype.assign            = (&lt;br&gt;  &amp;quot;.pdf&amp;quot;          =&amp;gt;      &amp;quot;application/pdf&amp;quot;,&lt;br&gt;  &amp;quot;.sig&amp;quot;          =&amp;gt;      &amp;quot;application/pgp-signature&amp;quot;,&lt;br&gt;  &amp;quot;.spl&amp;quot;          =&amp;gt;      &amp;quot;application/futuresplash&amp;quot;,&lt;br&gt;  &amp;quot;.class&amp;quot;        =&amp;gt;      &amp;quot;application/octet-stream&amp;quot;,&lt;br&gt;  &amp;quot;.ps&amp;quot;           =&amp;gt;      &amp;quot;application/postscript&amp;quot;,&lt;br&gt;  &amp;quot;.torrent&amp;quot;      =&amp;gt;      &amp;quot;application/x-bittorrent&amp;quot;,&lt;br&gt;  &amp;quot;.dvi&amp;quot;          =&amp;gt;      &amp;quot;application/x-dvi&amp;quot;,&lt;br&gt;  &amp;quot;.gz&amp;quot;           =&amp;gt;      &amp;quot;application/x-gzip&amp;quot;,&lt;br&gt;  &amp;quot;.pac&amp;quot;          =&amp;gt;      &amp;quot;application/x-ns-proxy-autoconfig&amp;quot;,&lt;br&gt;  &amp;quot;.swf&amp;quot;          =&amp;gt;      &amp;quot;application/x-shockwave-flash&amp;quot;,&lt;br&gt;  &amp;quot;.tar.gz&amp;quot;       =&amp;gt;      &amp;quot;application/x-tgz&amp;quot;,&lt;br&gt;  &amp;quot;.tgz&amp;quot;          =&amp;gt;      &amp;quot;application/x-tgz&amp;quot;,&lt;br&gt;  &amp;quot;.tar&amp;quot;          =&amp;gt;      &amp;quot;application/x-tar&amp;quot;,&lt;br&gt;  &amp;quot;.zip&amp;quot;          =&amp;gt;      &amp;quot;application/zip&amp;quot;,&lt;br&gt;  &amp;quot;.mp3&amp;quot;          =&amp;gt;      &amp;quot;audio/mpeg&amp;quot;,&lt;br&gt;  &amp;quot;.m3u&amp;quot;          =&amp;gt;      &amp;quot;audio/x-mpegurl&amp;quot;,&lt;br&gt;  &amp;quot;.wma&amp;quot;          =&amp;gt;      &amp;quot;audio/x-ms-wma&amp;quot;,&lt;br&gt;  &amp;quot;.wax&amp;quot;          =&amp;gt;      &amp;quot;audio/x-ms-wax&amp;quot;,&lt;br&gt;  &amp;quot;.ogg&amp;quot;          =&amp;gt;      &amp;quot;audio/x-wav&amp;quot;,&lt;br&gt;  &amp;quot;.wav&amp;quot;          =&amp;gt;      &amp;quot;audio/x-wav&amp;quot;,&lt;br&gt;  &amp;quot;.gif&amp;quot;          =&amp;gt;      &amp;quot;image/gif&amp;quot;,&lt;br&gt;  &amp;quot;.jpg&amp;quot;          =&amp;gt;      &amp;quot;image/jpeg&amp;quot;,&lt;br&gt;  &amp;quot;.jpeg&amp;quot;         =&amp;gt;      &amp;quot;image/jpeg&amp;quot;,&lt;br&gt;  &amp;quot;.png&amp;quot;          =&amp;gt;      &amp;quot;image/png&amp;quot;,&lt;br&gt;  &amp;quot;.xbm&amp;quot;          =&amp;gt;      &amp;quot;image/x-xbitmap&amp;quot;,&lt;br&gt;  &amp;quot;.xpm&amp;quot;          =&amp;gt;      &amp;quot;image/x-xpixmap&amp;quot;,&lt;br&gt;  &amp;quot;.xwd&amp;quot;          =&amp;gt;      &amp;quot;image/x-xwindowdump&amp;quot;,&lt;br&gt;  &amp;quot;.css&amp;quot;          =&amp;gt;      &amp;quot;text/css&amp;quot;,&lt;br&gt;  &amp;quot;.html&amp;quot;         =&amp;gt;      &amp;quot;text/html&amp;quot;,&lt;br&gt;  &amp;quot;.htm&amp;quot;          =&amp;gt;      &amp;quot;text/html&amp;quot;,&lt;br&gt;  &amp;quot;.js&amp;quot;           =&amp;gt;      &amp;quot;text/javascript&amp;quot;,&lt;br&gt;  &amp;quot;.asc&amp;quot;          =&amp;gt;      &amp;quot;text/plain&amp;quot;,&lt;br&gt;  &amp;quot;.c&amp;quot;            =&amp;gt;      &amp;quot;text/plain&amp;quot;,&lt;br&gt;  &amp;quot;.conf&amp;quot;         =&amp;gt;      &amp;quot;text/plain&amp;quot;,&lt;br&gt;  &amp;quot;.text&amp;quot;         =&amp;gt;      &amp;quot;text/plain&amp;quot;,&lt;br&gt;  &amp;quot;.txt&amp;quot;          =&amp;gt;      &amp;quot;text/plain&amp;quot;,&lt;br&gt;  &amp;quot;.dtd&amp;quot;          =&amp;gt;      &amp;quot;text/xml&amp;quot;,&lt;br&gt;  &amp;quot;.xml&amp;quot;          =&amp;gt;      &amp;quot;text/xml&amp;quot;,&lt;br&gt;  &amp;quot;.mpeg&amp;quot;         =&amp;gt;      &amp;quot;video/mpeg&amp;quot;,&lt;br&gt;  &amp;quot;.mpg&amp;quot;          =&amp;gt;      &amp;quot;video/mpeg&amp;quot;,&lt;br&gt;  &amp;quot;.mov&amp;quot;          =&amp;gt;      &amp;quot;video/quicktime&amp;quot;,&lt;br&gt;  &amp;quot;.qt&amp;quot;           =&amp;gt;      &amp;quot;video/quicktime&amp;quot;,&lt;br&gt;  &amp;quot;.avi&amp;quot;          =&amp;gt;      &amp;quot;video/x-msvideo&amp;quot;,&lt;br&gt;  &amp;quot;.asf&amp;quot;          =&amp;gt;      &amp;quot;video/x-ms-asf&amp;quot;,&lt;br&gt;  &amp;quot;.asx&amp;quot;          =&amp;gt;      &amp;quot;video/x-ms-asf&amp;quot;,&lt;br&gt;  &amp;quot;.wmv&amp;quot;          =&amp;gt;      &amp;quot;video/x-ms-wmv&amp;quot;,&lt;br&gt;  &amp;quot;.bz2&amp;quot;          =&amp;gt;      &amp;quot;application/x-bzip&amp;quot;,&lt;br&gt;  &amp;quot;.tbz&amp;quot;          =&amp;gt;      &amp;quot;application/x-bzip-compressed-tar&amp;quot;,&lt;br&gt;  &amp;quot;.tar.bz2&amp;quot;      =&amp;gt;      &amp;quot;application/x-bzip-compressed-tar&amp;quot;&lt;br&gt; )&lt;p&gt;fastcgi.server=(&amp;quot;.php&amp;quot;=&amp;gt;&lt;br&gt;    (&amp;quot;localhost&amp;quot;=&amp;gt;&lt;br&gt;        (&lt;br&gt;        &amp;quot;bin-path&amp;quot;=&amp;gt;&amp;quot;/usr/bin/php5-cgi&amp;quot;,&lt;br&gt;        &amp;quot;socket&amp;quot;=&amp;gt;&amp;quot;/tmp/php.socket&amp;quot;&lt;br&gt;        )&lt;br&gt;    )&lt;br&gt;)&lt;p&gt;index-file.names = ( &amp;quot;index.html&amp;quot;, &amp;quot;index.php&amp;quot; )&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-5437284236758821532?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/5437284236758821532/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=5437284236758821532&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5437284236758821532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5437284236758821532'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/12/lighttpdconf.html' title='lighttpd.conf'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-6510656357471823767</id><published>2010-12-21T00:04:00.001-08:00</published><updated>2010-12-21T00:04:25.392-08:00</updated><title type='text'>Uninstall oracle easy from linux</title><content type='html'>It sure is easier to remove oracle products than to add them....&lt;p&gt;The method suggested, using Oracle Universal installer to remove the&lt;br&gt;product, is the safest method, and the only reliable means if you have&lt;br&gt;several different ORACLE-HOMEs on you server.&lt;p&gt;However, if you want to remove all oracle software from your server,&lt;br&gt;the following method will work:&lt;br&gt;1. Stop all oracle processes (shutdown, kill or reboot - you are goeng&lt;br&gt;to ditch the installation anyway)&lt;br&gt;2. Remove the $ORACLE_HOME(s) using rm -rf&lt;br&gt;3. Check the file /etc/oraInst.loc and remove the oraInventory&lt;br&gt;directory structure.&lt;br&gt;3. Remove the files that remain scattered around your system:&lt;br&gt;/etc/oraInst.loc&lt;br&gt;/etc/oratab&lt;br&gt;/var/tmp/.oracle (directory)&lt;br&gt;/usr/local/bin/coraenv&lt;br&gt;/usr/local/bin/dbhome&lt;br&gt;/usr/local/bin/oraenv&lt;p&gt;If you remove these files, you will have a fresh system, in an Oracle&lt;br&gt;point of view.&lt;br&gt;Regards Lars&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-6510656357471823767?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/6510656357471823767/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=6510656357471823767&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/6510656357471823767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/6510656357471823767'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/12/uninstall-oracle-easy-from-linux.html' title='Uninstall oracle easy from linux'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-1682229326511232733</id><published>2010-11-22T07:16:00.000-08:00</published><updated>2010-12-10T22:16:31.893-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='NTT'/><title type='text'>NTT DATA开源系列 - Maskat</title><content type='html'>主站 &lt;a href="http://maskat.sourceforge.jp" target="_blank"&gt;http://maskat.sourceforge.jp&lt;/a&gt;&lt;br /&gt;&lt;img src="http://maskat.sourceforge.jp/image/maskat_logo.jpg" alt="" /&gt;&lt;br /&gt;Maskat是NTT DATA针对富客户端Ajax做的一套综合开发环境，属于NTT DATA Group Open Source Square系列。&lt;br /&gt;主要由三个主要部分组成：&lt;br /&gt;&lt;ul&gt; &lt;li&gt;客户端JavaScript框架&lt;/li&gt; &lt;li&gt;服务端Terasoluna for Rich版（参见&lt;a href="../2010/10/31/200001"&gt;NTT DATA开源系列 - Terasoluna&lt;/a&gt;）&lt;/li&gt; &lt;li&gt;Maskat IDE for Eclipse&lt;/li&gt;&lt;/ul&gt;以上内容的Source、例子和文档（日文）均可从顶端的URL地址下载到。&lt;br /&gt;由于客户端的JS框架与服务端以XML方式交互，所以服务端可以选用任意开发语言，比如官网给出的PHP、Ruby等&lt;br /&gt;优点：&lt;br /&gt;&lt;ol&gt; &lt;li&gt;JavaScript框架部分可根据需要灵活的将Google/Dojo等JS框架以插件部分注入进来，扩展性极强，还很美观哦；&lt;/li&gt; &lt;li&gt;服务端借助Terasoluna的成熟框架体系，达到开发效率和质量的双重保障；&lt;/li&gt; &lt;li&gt;在IDE的帮助下，可由需求和UE人员直接生产出HTML样式及Layout定义，开发者只要配合Event定义及服务端开发即可完成项目，优化并缩短开发流程；&lt;/li&gt; &lt;li&gt;避免写大量JS，降低学习成本，降低Bug发生几率，缩短开发时间&lt;/li&gt; &lt;li&gt;更多内容，试了就知道 :-)&lt;/li&gt;&lt;/ol&gt;&lt;strong&gt;运行原理&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/ADUp2Wrm/VWzJP.png" alt="" /&gt;&lt;br /&gt;&lt;ol&gt; &lt;li&gt;画面自动生成 - 客户端首次访问页面时，加载静态资源文件HTML、布局及事件定义XML，通过maskat的js框架在客户端构建UI元素&lt;/li&gt; &lt;li&gt;Event事件管理 - 用户触发事件，根据事件定义XML中的配置，进行本地js或远程服务器调用；根据XML所配置，将画面相应数据元素发往服务端&lt;/li&gt; &lt;li&gt;服务端根据接收到请求信息，使用&lt;a href="http://www.castor.org/" target="_blank"&gt;Castor&lt;/a&gt;将XML映射成JavaBean做业务逻辑处理，并将结果同样以XML方式发回。（我已用&lt;a href="http://jackson.codehaus.org/" target="_blank"&gt;Jackson&lt;/a&gt;做了个适配器，实现了JSON格式的收发 :-)&lt;/li&gt; &lt;li&gt;客户端的JS框架根据Event定义XML中的配置，将服务响应数据更新到页面指定元素&lt;/li&gt;&lt;/ol&gt;并且，客户端提供输入值有效性检查，远端调用时是否同步等设置。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Maskat应用的主要构成文件&lt;/strong&gt;&lt;br /&gt;&lt;ol&gt; &lt;li&gt;Container HTML页面&lt;/li&gt;通常页面中只有一个div标签&lt;pre class="brush: xml;fontsize: 100; first-line: 1; "&gt;&amp;lt;html&amp;gt;&lt;br /&gt;  &amp;lt;head&amp;gt;&lt;br /&gt;    &amp;lt;title&amp;gt;Maskat | 四则运算应用&amp;lt;/title&amp;gt;&lt;br /&gt;    &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&amp;gt;&lt;br /&gt;    &amp;lt;script type="text/javascript" src="../../maskat/core/maskat.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;  &amp;lt;/head&amp;gt;&lt;br /&gt;  &amp;lt;body&amp;gt;&lt;br /&gt;    &amp;lt;div id="divMaskat"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;  &amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt; &lt;li&gt;画面迁移定义XML&lt;/li&gt;主要处理画面初始化时的资源加载、验证规则设定、JS/CSS设定以及画面结束时的资源释放等内容&lt;pre class="brush: xml;fontsize: 100; first-line: 1; "&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;transitionDef&amp;gt;&lt;br /&gt;  &amp;lt;init&amp;gt;&lt;br /&gt;    &amp;lt;loadJS fileName="calculation" /&amp;gt;&lt;br /&gt;    &amp;lt;loadLayout xmlFile="layout.xml" target="divMaskat" show="true" /&amp;gt;&lt;br /&gt;  &amp;lt;/init&amp;gt;&lt;br /&gt;&amp;lt;/transitionDef&amp;gt;&lt;/pre&gt; &lt;li&gt;Layout定义文件&lt;/li&gt;画面GUI布局定义&lt;pre class="brush: xml;fontsize: 100; first-line: 1; "&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;layoutDef&amp;gt;&lt;br /&gt;  &amp;lt;layout name="calculation"&amp;gt;&lt;br /&gt;    &amp;lt;frame name="calculationFrame" left="12" top="24" width="577" height="157" title="四则运算应用"&amp;gt;&lt;br /&gt;      &amp;lt;text name="leftOperandText" left="23" top="23" width="85" tabIndex="1" datatype="N"/&amp;gt;&lt;br /&gt;      &amp;lt;combo name="operatorCombo" left="119" top="23" width="50" tabIndex="2"&amp;gt;&lt;br /&gt;        &amp;lt;comboItem text="+" value="+"/&amp;gt;&lt;br /&gt;        &amp;lt;comboItem text="-" value="-"/&amp;gt;&lt;br /&gt;        &amp;lt;comboItem text="*" value="*"/&amp;gt;&lt;br /&gt;        &amp;lt;comboItem text="/" value="/"/&amp;gt;&lt;br /&gt;      &amp;lt;/combo&amp;gt;&lt;br /&gt;      &amp;lt;text name="rightOperandText" left="179" top="23" width="85" tabIndex="3" datatype="N"/&amp;gt;&lt;br /&gt;      &amp;lt;label name="equalLabel" left="275" top="23" text="="/&amp;gt;&lt;br /&gt;      &amp;lt;text name="resultText" left="299" top="23" width="85" tabIndex="4" datatype="N" disable="true"/&amp;gt;&lt;br /&gt;      &amp;lt;button name="localCalculateButton" left="23" top="83" title="本地调用"/&amp;gt;&lt;br /&gt;      &amp;lt;button name="remoteCalculateButton" left="23" top="107" title="远程调用"/&amp;gt;&lt;br /&gt;    &amp;lt;/frame&amp;gt;&lt;br /&gt;  &amp;lt;/layout&amp;gt;&lt;br /&gt;&amp;lt;/layoutDef&amp;gt;&lt;/pre&gt; &lt;li&gt;Event定义XML&lt;/li&gt;事件定义文件，事件分为两种：本地JS调用，直接在浏览器运行；远程服务器调用，则通过发送请求XML与服务器进行交互&lt;pre class="brush: xml;fontsize: 100; first-line: 1; "&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;eventDef&amp;gt;&lt;br /&gt;  &amp;lt;component id="localCalculateButton"&amp;gt;&lt;br /&gt;    &amp;lt;event id="onclick" finish="calculate" type="local"/&amp;gt;&lt;br /&gt;  &amp;lt;/component&amp;gt;&lt;br /&gt;  &amp;lt;component id="remoteCalculateButton"&amp;gt;&lt;br /&gt;    &amp;lt;event id="onclick" remoteUrl="./calculate.php" async="false"&amp;gt;&lt;br /&gt;      &amp;lt;param rootNode="request"&amp;gt;&lt;br /&gt;        &amp;lt;source obj="leftOperandText" node="leftOperand" type="byte" desc="参数1"/&amp;gt;&lt;br /&gt;        &amp;lt;source obj="rightOperandText" node="rightOperand" type="byte" desc="参数2"/&amp;gt;&lt;br /&gt;        &amp;lt;source obj="operatorCombo" node="operator"/&amp;gt;&lt;br /&gt;      &amp;lt;/param&amp;gt;&lt;br /&gt;      &amp;lt;result rootNode="response"&amp;gt;&lt;br /&gt;        &amp;lt;target out="resultText" in="result"/&amp;gt;&lt;br /&gt;      &amp;lt;/result&amp;gt;&lt;br /&gt;    &amp;lt;/event&amp;gt;&lt;br /&gt;  &amp;lt;/component&amp;gt;&lt;br /&gt;&amp;lt;/eventDef&amp;gt;&lt;/pre&gt; &lt;li&gt;JavaScript文件&lt;/li&gt;上面说到，事件调用分为本地和远程调用。当为本地事件调用时，则将所要执行的内容写成本地JavaScript函数，在画面初始化时通过在【画面迁移定义XML】中的配置，使用LoadJS方式加载；当执行远程调用时，服务端需要根据需要使用J2EE、PHP、.NET或者Ruby等语言，对请求XML进行解析，然后执行相应的业务逻辑即可。&lt;pre class="brush: jscript;fontsize: 100; first-line: 1; "&gt;function calculate(){&lt;br /&gt; var left = Number(leftOperandText.getValue());&lt;br /&gt; var right = Number(rightOperandText.getValue());&lt;br /&gt; var result = NaN;&lt;br /&gt;&lt;br /&gt; switch (operatorCombo.getValue()) {&lt;br /&gt; case "+":&lt;br /&gt;  result = left + right;&lt;br /&gt;  break;&lt;br /&gt; case "-":&lt;br /&gt;  result = left - right;&lt;br /&gt;  break;&lt;br /&gt; case "*":&lt;br /&gt;  result = left * right;&lt;br /&gt;  break;&lt;br /&gt; case "/":&lt;br /&gt;  result = left / right;&lt;br /&gt;  break;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; resultText.setValue(result);&lt;br /&gt;}&lt;/pre&gt;&lt;/ol&gt;这里有几个Demo &lt;a href="&amp;ldquo;http:/maskat.sourceforge.jp/index.php?Demo" target="_blank"&gt;http://maskat.sourceforge.jp/index.php?Demo&lt;/a&gt;&lt;br /&gt;&lt;a href="http://maskat.sourceforge.jp/index.php?Demo/Calculation" target="_blank"&gt;计算器&lt;/a&gt;&lt;br /&gt;展示最基本原理，本地事件及远端事件调用&lt;br /&gt;&lt;a href="http://maskat.sourceforge.jp/index.php?Demo%2FFruitShop" target="_blank"&gt;水果商店&lt;/a&gt;&lt;br /&gt;展示复杂页面布局，列表，数据提交验证等&lt;br /&gt;&lt;a href="http://maskat.sourceforge.jp/index.php?Demo/PetStore" target="_blank"&gt;宠物商店&lt;/a&gt;&lt;br /&gt;宠物商店应用的Maskat实现，展示富客户端的交互性&lt;br /&gt;&lt;a href="http://maskat.sourceforge.jp/index.php?Demo%2FGourmet" target="_blank"&gt;商店查询&lt;/a&gt;&lt;br /&gt;展示使用插件机制注入GoogleMap的地图应用&lt;br /&gt;&lt;br /&gt;关于更详细的内容，可以去&lt;a href="http://maskat.sourceforge.jp/index.php?Download" target="_blank"&gt;官网下载&lt;/a&gt;Source和案例把玩一番&lt;br /&gt;如果语言有障碍，记得Google翻译XD&lt;br /&gt;Note: 示例中的Java案例使用的是Jaxb做的XML解析和绑定，并未使用Terasoluna for RICH。有关Terasoluna RICH内容，可参考地址http://sourceforge.jp/projects/terasoluna/releases/46867/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-1682229326511232733?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/1682229326511232733/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=1682229326511232733&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1682229326511232733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1682229326511232733'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/12/ntt-data-maskat.html' title='NTT DATA开源系列 - Maskat'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-3004741112678711540</id><published>2010-11-16T07:22:00.000-08:00</published><updated>2010-12-10T07:23:39.452-08:00</updated><title type='text'>Coding Style</title><content type='html'>前几日关于代码规范做的PPT，拿出来分享&lt;br /&gt;&lt;div id="__ss_5795633" style="width: 640px;"&gt;&lt;br /&gt;&lt;object id="__sse5795633" width="640" height="480" data="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=random-101116060837-phpapp01&amp;amp;stripped_title=ss-5795633&amp;amp;userName=lanyueniao" type="application/x-shockwave-flash"&gt;&lt;param name="data" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=random-101116060837-phpapp01&amp;amp;stripped_title=ss-5795633&amp;amp;userName=lanyueniao" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=random-101116060837-phpapp01&amp;amp;stripped_title=ss-5795633&amp;amp;userName=lanyueniao" /&gt;&lt;param name="name" value="__sse5795633" /&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;/object&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-3004741112678711540?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/3004741112678711540/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=3004741112678711540&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3004741112678711540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3004741112678711540'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/11/coding-style.html' title='Coding Style'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-5381822234921085572</id><published>2010-11-14T07:24:00.000-08:00</published><updated>2010-12-10T07:24:47.830-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><title type='text'>MySQL和C编程</title><content type='html'>&lt;pre class="brush: bash;fontsize: 100; first-line: 1; "&gt;tom@debian:~$ apt-get install mysql-server libmysqlclient15-dev&lt;br /&gt;tom@debian:~$ mysql -u root -p&lt;br /&gt;Enter password:&lt;br /&gt;Welcome to the MySQL monitor. Commands end with ; or \g.&lt;br /&gt;Your MySQL connection id is 42&lt;br /&gt;Server version: 5.0.51a-24+lenny4 (Debian)&lt;br /&gt;&lt;br /&gt;Type 'help;' or '\h' for help. Type '\c' to clear the buffer.&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; create databases test;&lt;br /&gt;mysql&amp;gt; grant all on test to test identified by 'test';&lt;br /&gt;mysql&amp;gt; exit;&lt;br /&gt;Bye&lt;/pre&gt;&lt;br /&gt;&lt;pre class="brush: sql;fontsize: 100; first-line: 1; "&gt;CREATE TABLE `test`.`user` (&lt;br /&gt;  `id` int(11)  NOT NULL AUTO_INCREMENT,&lt;br /&gt;  `name` varchar(20)  NOT NULL,&lt;br /&gt;  `age` int  NOT NULL,&lt;br /&gt;  PRIMARY KEY (`id`)&lt;br /&gt;)&lt;br /&gt;ENGINE = InnoDB;&lt;/pre&gt;&lt;br /&gt;mysql.c&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include "mysql.h"&lt;br /&gt;&lt;br /&gt;int main(void) {&lt;br /&gt; MYSQL *connection;&lt;br /&gt; int res;&lt;br /&gt;&lt;br /&gt; /*&lt;br /&gt;  * MYSQL *mysql_init(MYSQL *);&lt;br /&gt;  */&lt;br /&gt; connection = mysql_init(NULL);&lt;br /&gt; if (!connection) {&lt;br /&gt;  fprintf(stderr, "mysql_init failed\n");&lt;br /&gt;  exit(EXIT_FAILURE);&lt;br /&gt; }&lt;br /&gt; /*&lt;br /&gt;  * MYSQL *mysql_real_connect(MYSQL *connection,&lt;br /&gt;  * const char *server_hsot,&lt;br /&gt;  * const char *sql_user_name,&lt;br /&gt;  * const char *sql_password,&lt;br /&gt;  * const char *db_name,&lt;br /&gt;  * unsigned int port_number,&lt;br /&gt;  * const char *unix_socket_name,&lt;br /&gt;  * unsigned int flags);&lt;br /&gt;  */&lt;br /&gt; connection = mysql_real_connect(connection, "localhost", "test", "test", "test", 0, NULL, 0);&lt;br /&gt;&lt;br /&gt; if (connection) {&lt;br /&gt;  printf("connect success\n");&lt;br /&gt;  /*&lt;br /&gt;   * int mysql_query(MYSQL *connection,&lt;br /&gt;   * const char *query);&lt;br /&gt;   */&lt;br /&gt;  res = mysql_query(connection, "INSERT INTO user(name, age) VALUES('Ada', 3)");&lt;br /&gt;  if (!res) {&lt;br /&gt;   /*&lt;br /&gt;    * my_ulonglong mysql_affected_rows(MYSQL *connection);&lt;br /&gt;    */&lt;br /&gt;   printf("Insert %lu rows\n", (unsigned long) mysql_affected_rows(connection));&lt;br /&gt;  } else {&lt;br /&gt;   /*&lt;br /&gt;    * unsigned int mysql_errno(MYSQL *connection);&lt;br /&gt;    * char *mysql_error(MYSQL *connection);&lt;br /&gt;    */&lt;br /&gt;   fprintf(stderr, "Insert error %d: %s\n", mysql_errno(connection), mysql_error(connection));&lt;br /&gt;  }&lt;br /&gt; } else {&lt;br /&gt;  printf("connect failed\n");&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /*&lt;br /&gt;  * void mysql_close(MYSQL *connection);&lt;br /&gt;  */&lt;br /&gt; mysql_close(connection);&lt;br /&gt;&lt;br /&gt; return EXIT_SUCCESS;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;pre class="brush: bash;fontsize: 100; first-line: 1; "&gt;tom@debian:~/workspace/mysql/src$ gcc -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient mysql.c -o mysql&lt;br /&gt;tom@debian:~/workspace/mysql/src$ ll&lt;br /&gt;总计 16&lt;br /&gt;-rwxr-xr-x 1 tom tom 8289 11-14 23:00 mysql&lt;br /&gt;-rw-r--r-- 1 tom tom 1666 11-14 22:58 mysql.c&lt;br /&gt;tom@debian:~/workspace/mysql/src$ ./mysql&lt;br /&gt;connect success&lt;br /&gt;Insert 1 rows&lt;br /&gt;tom@debian:~/workspace/mysql/src$&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-5381822234921085572?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/5381822234921085572/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=5381822234921085572&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5381822234921085572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5381822234921085572'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/11/mysqlc.html' title='MySQL和C编程'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-7982972328852534803</id><published>2010-11-10T20:37:00.000-08:00</published><updated>2010-12-10T20:39:05.299-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>构建移动应用的几个步骤</title><content type='html'>&lt;img src="http://pic.yupoo.com/lanyueniao/ACiywxlc/1ZLfb.png" alt="" /&gt;&lt;br /&gt;1、功能定义&lt;br /&gt;分析应用使用场景及目标，是游戏、播放器、编辑器、图像还是浏览器、网络？&lt;br /&gt;根据分析特性，提取应用所涉及的数据内容、协议等数据模型；&lt;br /&gt;现实的所有系统对于人类来说都是数据的I/O操作，所以，数据模型是所有系统的根本！比如，对于一款游戏来说，角色状态、游戏进度、地图数据；对于互联网应用来说，本地缓存、用户设定等数据；相册的缩微图、图片索引等等。&lt;br /&gt;&lt;br /&gt;2、交互分析&lt;br /&gt;UI布局及样式风格 - 即UE设计，交互设计师使用一些工具画界面。&lt;br /&gt;屏幕交互及迁移 - 每个屏内部按键响应、背景服务状态分析，屏幕之间的相互叠加和迁移图等；&lt;br /&gt;定义每个事件触发时所要进行的数据操作（保存哪些数据？修改哪些数据等等）&lt;br /&gt;分出哪些是交互的、哪些是背景服务的、哪些是临时数据、哪些是持久化数据、网络交互定义、各组件的生命周期状态；&lt;br /&gt;&lt;br /&gt;3、垒码实现&lt;br /&gt;根据UI定义做layout，完成每一个屏的布局及屏内事件操作（一个MIDlet或Activity等）几个步骤，最后根据屏幕状态迁移时的数据操作（前人埋银后人挖）&lt;br /&gt;&lt;br /&gt;4、测试及优化&lt;br /&gt;保证每个功能是正确的；&lt;br /&gt;保证每个事件的函数是正确的、高效的、快速响应的；&lt;br /&gt;保证所用资源的最大化压缩；越精简越好，越刻薄越好；&lt;br /&gt;发现问题时做修正或优化；&lt;br /&gt;在多种目标平台测验；&lt;br /&gt;&lt;br /&gt;5、打包发布&lt;br /&gt;混淆发布、获取反馈并作为下一个期的目标定义。&lt;br /&gt;&lt;br /&gt;Coding准则：基本不用接口与继承/尽量的final/手动设null甚至gc/把Java当C使.. 虽然source不怎么美观，一切为了效率、能耗，多试验、多拿捏.&lt;br /&gt;&lt;br /&gt;-EOF&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-7982972328852534803?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/7982972328852534803/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=7982972328852534803&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7982972328852534803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7982972328852534803'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/11/blog-post.html' title='构建移动应用的几个步骤'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-1177941094722696444</id><published>2010-11-09T20:39:00.000-08:00</published><updated>2010-12-10T20:39:42.580-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Android Application Architecture</title><content type='html'>Android's architecture encourages the concept of component reuse, allowing you to publish and share activities, services, and data with other applications with access managed by the security restrictions you put in place. The following application services are the architectural cornerstones of all Android applications, providing the framework you&amp;rsquo;ll be using for your own software:&lt;br /&gt;&lt;strong&gt;Activity Manager&lt;/strong&gt;&lt;br /&gt;Controls the life cycle of your activities, including management of the activity stack.&lt;br /&gt;&lt;strong&gt;Views&lt;/strong&gt;&lt;br /&gt;Are used to construct the user interfaces for your activities&lt;br /&gt;&lt;strong&gt;Notification Manager &lt;/strong&gt;&lt;br /&gt;Provides a consistent and non-intrusive mechanism for signaling your users&lt;br /&gt;&lt;strong&gt;Content Providers&lt;/strong&gt;&lt;br /&gt;Lets your applications share data between applications&lt;br /&gt;&lt;strong&gt;Resource Manager&lt;/strong&gt;&lt;br /&gt;Supports non-code resources like strings and graphics to be externalized.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Android System Architecture&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/ABZ1jie4/Fh3qK.png" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Android Process&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/ABZ1k9KA/eqUOl.png" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Main thread/handlers/messages&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/ABZ3IvJZ/PEeek.png" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Android Activity Lifecycle&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/ABZlvxdE/DLIwL.png" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Android Audio Architecture&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/ABZ1jNL9/E019R.jpg" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Power Manager Service&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/ABZ1kmcH/sS0fh.jpg" alt="" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-1177941094722696444?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/1177941094722696444/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=1177941094722696444&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1177941094722696444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1177941094722696444'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/11/android-application-architecture.html' title='Android Application Architecture'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-9209921043037969729</id><published>2010-11-08T20:39:00.000-08:00</published><updated>2010-12-13T04:07:41.788-08:00</updated><title type='text'>Unix philosophy</title><content type='html'>&lt;img src="http://www.unix.org/images/unix-plate2.jpg" alt="" /&gt;&lt;br /&gt;1. Rule of Modularity: Write simple parts connected by clean interfaces.&lt;br /&gt;&lt;br /&gt;2. Rule of Composition: Design programs to be connected to other programs.&lt;br /&gt;&lt;br /&gt;3. Rule of Clarity: Clarity is better than cleverness.&lt;br /&gt;&lt;br /&gt;4. Rule of Simplicity: Design for simplicity; add complexity only where you must.&lt;br /&gt;&lt;br /&gt;5. Rule of Transparency: Design for visibility to make inspection and debugging easier.&lt;br /&gt;&lt;br /&gt;6. Rule of Robustness: Robustness is the child of transparency and simplicity.&lt;br /&gt;&lt;br /&gt;7. Rule of Least Surprise: In interface design, always do the least surprising thing.&lt;br /&gt;&lt;br /&gt;8. Rule of Repair: When you must fail, fail noisily and as soon as possible.&lt;br /&gt;&lt;br /&gt;9. Rule of Economy: Programmer time is expensive; conserve it in preference to machine time.&lt;br /&gt;&lt;br /&gt;10. Rule of Generation: Avoid hand-hacking; write programs to write programs when you can.&lt;br /&gt;&lt;br /&gt;11. Rule of Representation: Use smart data so program logic can be stupid and robust.&lt;br /&gt;&lt;br /&gt;12. Rule of Separation: Separate policy from mechanism; separate interfaces from engines.&lt;br /&gt;&lt;br /&gt;13. Rule of Optimization: Prototype before polishing. Get it working before you optimize it.&lt;br /&gt;&lt;br /&gt;14. Rule of Diversity: Distrust all claims for "one true way"&lt;br /&gt;&lt;br /&gt;15. Rule of Extensibility: Design for the future, because it will be here sooner than you think.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-9209921043037969729?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/9209921043037969729/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=9209921043037969729&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/9209921043037969729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/9209921043037969729'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/11/unix-philosophy.html' title='Unix philosophy'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-1072125887242223898</id><published>2010-11-05T20:40:00.000-07:00</published><updated>2010-12-10T20:41:14.422-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='操作系统'/><title type='text'>Writing a Simple File System</title><content type='html'>Author:&amp;nbsp;&lt;a href="mailto:uvsravikiran@gmail.com"&gt;Ravi Kiran UVS&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. Objective&lt;/strong&gt;&lt;br /&gt;We will write a file system with very basic functionality. This is to understand the working of certain kernel code paths of the Virtual File System (VFS). This filesystem has only one file 'hello.txt'. We can read/write into it.&lt;br /&gt;&lt;strong&gt;2. Introduction&lt;/strong&gt;&lt;br /&gt;The Linux VFS supports multiple file systems. The kernel does most of the work while the file system specific tasks are delegated to the individual file systems through the handlers. Instead of calling the functions directly the kernel uses various Operation Tables, which are a collection of handlers for each operation (these are actually structures of function pointers for each handlers/callbacks). The kernel calls the handler present in the table for the operation. This enables different file systems to register different handlers. This also enables the common tasks to be done before calling the handlers. This reduces the burden on the handlers which can then focus on the operation specific to that file system.&lt;br /&gt;File systems are identified by their names. The supported file systems can be seen using 'cat /proc/filesystems'. The first step is to register the file system with the kernel. Since we are using a kernel module, the file system registration is done during the module initialization. This registers handlers which will be called to fill the super block structure while mounting, a handler to do the cleanup during unmounting the file system. There are other handlers but these two are essential.&lt;br /&gt;The super block operations are set at the time of mounting. The operation tables for inodes and files are set when the inode is opened. The first step before opening an inode is lookup. The inode of a file is looked up by calling the lookup handler of the parent inode. But what about the root-most inode of the new file system? This has to be allocated at the time of mounting i.e., during the super block initialization.&lt;br /&gt;Once the operation tables are set on the data structures, the kernel calls the handlers depending on the operation.&lt;br /&gt;&lt;strong&gt;3. Data Structures&lt;/strong&gt;&lt;br /&gt;This is a brief description about the data structures used in implementing our file system.&lt;br /&gt;&lt;strong&gt;a. File System Type&lt;/strong&gt; (struct file_system_type)&lt;br /&gt;Definition found in &lt;em&gt;include/linux/fs.h&lt;/em&gt;&lt;br /&gt;This structure is used to register the filesystem with the kernel. This data structure is used by the kernel at the time of mounting a file system. We have to fill the 'name' field with the name of our file system (example "rkfs") and the handlers get_sb and kill_sb to allocate and release the super block objects.&lt;br /&gt;&lt;strong&gt;b. Super Block&lt;/strong&gt; (struct super_block)&lt;br /&gt;Definition found in &lt;em&gt;include/linux/fs.h&lt;/em&gt;&lt;br /&gt;This stores the information about the mounted file system. The important fields to be filled are the operation table (s_ops field) and the root dentry (s_root). At the time of mounting a file system, the kernel calls the get_sb field of the file_system_type object (it identifies the correct file_system_type object based on the file system name) to get a super block object.&lt;br /&gt;&lt;strong&gt;c. Super Block Operations&lt;/strong&gt; (struct super_operations)&lt;br /&gt;Definition found in &lt;em&gt;include/linux/fs.h&lt;/em&gt;&lt;br /&gt;Super block operations table.&lt;br /&gt;&lt;strong&gt;d. Inode&lt;/strong&gt; (struct inode)&lt;br /&gt;Definition found in &lt;em&gt;include/linux/fs.h&lt;/em&gt;&lt;br /&gt;Inode object is the kernel representation of the low level file. We return the dentry of the root of our file system. We have to attach a proper inode also to the dentry.&lt;br /&gt;This structure has two operation tables i_op, i_fop i.e., inode operations and file operations respectively. We will implement one operation in the inode_operations - lookup.&lt;br /&gt;This is called when the kernel is resolving a path. The kernel starts from the ancestor (this can be the current working directory for relative paths or the root most directory for the absolute paths) and gets the dentry (also the inode) of a name component of the path from its parent. This is achieved by calling inode_operations.lookup on the inode of the parent entry.&lt;br /&gt;For example, when the kernel is resolving /parentdir/subdir, the lookup operation reaches the root most inode of the file system. This was already allocated during the super block initialization and stored in the s_root field. To resolve the 'parentdir' under the root most inode, the kernel creates a new dentry object, sets the name as 'parentdir' and calls lookup handler on inode of the root most inode. The handler is supposed to attach the inode to the dentry using d_add and return NULL if it was successful or an error code otherwise. Similarly, the lookup for 'subdir' is done by the parentdir inode. The dentry cache and the inode cache saves repeated lookups and boosts the performance.&lt;br /&gt;It is important for us to implement the lookup callback. This will be called by the open system call.&lt;br /&gt;&lt;strong&gt;e. Inode Operations&lt;/strong&gt; (struct inode_operations)&lt;br /&gt;Definition found in &lt;em&gt;include/linux/fs.h&lt;/em&gt;&lt;br /&gt;This is the inode operations table with each field corresponding to a function pointer to handle the task. It has fields like mkdir, lookup etc. We are interested in lookup.&lt;br /&gt;&lt;strong&gt;f. Address Space Operations&lt;/strong&gt; (struct address_space_operations)&lt;br /&gt;Definition found in &lt;em&gt;include/linux/fs.h&lt;/em&gt;&lt;br /&gt;Address space operations table.&lt;br /&gt;&lt;strong&gt;g. DEntry&lt;/strong&gt; (struct dentry)&lt;br /&gt;Definition found in &lt;em&gt;include/linux/dcache.h&lt;/em&gt;&lt;br /&gt;The kernel uses dentries to represent the file system structure. dentries point to inode objects. This has pointers to store the parent-child relationship of the files. Inodes and files do not store any information about the hierarchy.&lt;br /&gt;&lt;strong&gt;h. File&lt;/strong&gt; (struct file)&lt;br /&gt;Definition found in &lt;em&gt;include/linux/fs.h&lt;/em&gt;&lt;br /&gt;File object is used to store the process's information about the file. We dont have to fill any fields of the files directly. The kernel takes care of filling the proper fields but we have to implement the file operation callbacks. We register the file operation table when we return the inode object during lookup. The file operations are copied from the i_fop field of the inode object to the file object by the kernel.&lt;br /&gt;We will implement readdir in case of directories (while returning the inode, we have to set the file operation table based on the type of the file) and read/write in the case of regular files. We will have two file operation tables one for directories and the other for regular files.&lt;br /&gt;The relationship between files, dentries and objects is like this:&lt;br /&gt;&lt;blockquote&gt;File ---&amp;gt; DEntry ---&amp;gt; Inode&lt;/blockquote&gt;The following figure shows the important relationships between various VFS data structures. It does not show all the relationships though. Note that super block structure has a list of all open file objects, a list of dirty inodes and another list of locked inodes of the file system. Also the lists used for cache, lru and free lists are not shown.&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/ABe4o4qu/EyUYh.png" alt="" /&gt;&lt;br /&gt;&lt;strong&gt;i. File Operations&lt;/strong&gt; (struct file_operations)&lt;br /&gt;Definition found in &lt;em&gt;include/linux/fs.h&lt;/em&gt;&lt;br /&gt;This is the file operations table with each field corresponding to a function pointer to handle the task. It has fields like read, write, readdir, llseek etc.&lt;br /&gt;All these structures have fields used by the kernel in maintaining internal data structures like lists and hash tables etc. So, we cannot use local/global obects. Kernel allocates the object and passes it to our functions so that we can fill the required fields. If we have to allocate the objects, we need to use the corresponding allocator functions.&lt;br /&gt;&lt;strong&gt;3. Implementation&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;File System Type&lt;/strong&gt;&lt;br /&gt;The filesystem is registered with the kernel during the module initialization. During this step, two handlers get_sb and kill_sb. get_sb is called at the time of mounting the file system. kill_sb is called at the time of unmounting the file system. The get_sb handler uses the kernel helper function get_sb_single to allocate the super block. We pass a callback, rkfs_fill_super, to this function which will be called to fill the super block structure. Since we dont have any specific task to do in the the kill_sb handler, we can use the kernel helper function kill_anon_super.&lt;br /&gt;&lt;strong&gt;Super Block Operations&lt;/strong&gt;&lt;br /&gt;We'll register the read_inode and write_inode callbacks in the super operations table. read_inode will be called when the inode object is newly allocated. Inodes are identified by the inode numbers. Based on the inode number, the file system will have to resolve the inode object on the storage and fill the fields of the inode with the contents on the storage. In our case it is simple as we are implementing a memory based file system. File systems like ext2 will have to read the inode from the disk using the inode number. Depending on the file type, different handlers can be registered for the file operations table.&lt;br /&gt;write_inode handler will be called to sync the inode contents to the storage. In our case, we will update the file size variable in memory.&lt;br /&gt;&lt;strong&gt;Inode Operations&lt;/strong&gt;&lt;br /&gt;We'll register the lookup callback in the inode operations table. A dentry object will be allocated by the kernel and passed to the handler. The name component is set on the dentry by the kernel. In the handler, we have to check whether an entry by that name exists under the parent inode. If an entry exists, the inode object is obtained by passing the super block object and the inode number to the function iget. This uses the inode cache and will allocate a new inode if it is not avaiable in the inode cache. (Note that when the inode is newly allocated, the read_inode handler of the super block is called to fill the inode). This inode is added to the dentry object using d_add. The return value should be a NULL on successful lookup or an error code otherwise.&lt;br /&gt;&lt;strong&gt;File Operations&lt;/strong&gt;&lt;br /&gt;We'll register read, write and readdir handlers in the file operations table. read and write handlers are called to read and write data into the file. readdir is called to read the contents of a directory.&lt;br /&gt;The following table shows the fields we need to fill in the above data structures.&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/ABe91MxJ/tjorq.png" alt="" /&gt;&lt;br /&gt;The following table shows the operation tables and the handlers used.&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/ABe924tz/2rnX.png" alt="" /&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/ABe9Kg0n/DdqN7.png" alt="" /&gt;&lt;br /&gt;&lt;strong&gt;4. Entry points&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;a. init_module&lt;/strong&gt;&lt;br /&gt;This is called when the module is loaded. We have to register our file system here. Fill the file_system_type strucure with name and read_super fields and call register_filesystem with the structure. For example,&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;static struct file_system_type rkfs = {&lt;br /&gt;    name:    "rkfs",&lt;br /&gt;    get_sb:  rkfs_get_sb,&lt;br /&gt;    kill_sb:   rkfs_kill_sb,&lt;br /&gt;    owner:   THIS_MODULE&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;int init_module(void) {&lt;br /&gt;    int err;&lt;br /&gt;    err = register_filesystem( &amp;amp;rkfs );&lt;br /&gt;    return err;&lt;br /&gt;}&lt;/pre&gt;&lt;strong&gt;b. file_system_type.get_sb&lt;/strong&gt;&lt;br /&gt;This will be called when the file system is mounted. We have to return a super block. We use the helper function get_sb_simple to do the super block allocation and also passing rkfs_fill_super callback to fill the super block object. The s_op field is set with the address of the super block operations table rkfs_sops. The root most inode of the file system has to be allocated at this stage. The dentry for it should be set on the s_root field of the super block. As mentioned earlier, this is the entry point of lookup operations into the file system.&lt;br /&gt;The inode object is allocated using the function iget. After initializing the inode, the dentry is allocated using the function d_alloc_root. This dentry is set to the s_root field of the super block.&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;static int rkfs_fill_super(struct super_block *sb, void *data, int silent) {&lt;br /&gt;    sb-&amp;gt;s_blocksize = 1024;&lt;br /&gt;    sb-&amp;gt;s_blocksize_bits = 10;&lt;br /&gt;    sb-&amp;gt;s_magic = RKFS_MAGIC;&lt;br /&gt;    sb-&amp;gt;s_op = &amp;amp;rkfs_sops; // super block operations&lt;br /&gt;    sb-&amp;gt;s_type = &amp;amp;rkfs; // file_system_type&lt;br /&gt;&lt;br /&gt;    rkfs_root_inode = iget(sb, 1); // allocate an inode&lt;br /&gt;    rkfs_root_inode-&amp;gt;i_op = &amp;amp;rkfs_iops; // set the inode ops&lt;br /&gt;    rkfs_root_inode-&amp;gt;i_mode = S_IFDIR|S_IRWXU;&lt;br /&gt;    rkfs_root_inode-&amp;gt;i_fop = &amp;amp;rkfs_fops;&lt;br /&gt;&lt;br /&gt;    if(!(sb-&amp;gt;s_root = d_alloc_root(rkfs_root_inode))) {&lt;br /&gt;        iput(rkfs_root_inode);&lt;br /&gt;        return -ENOMEM;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;static struct super_block * rkfs_get_sb(struct file_system_type *fs_type, int flags, const char *devname, void *data) {&lt;br /&gt;     /* rkfs_fill_super this will be called to fill the superblock */&lt;br /&gt;    return get_sb_single(fs_type, flags, data, &amp;amp;rkfs_fill_super);&lt;br /&gt;}&lt;/pre&gt;Let us assume that our file system is mounted under /mnt/rkfs.&lt;br /&gt;&lt;strong&gt;c. file_system_type.kill_sb&lt;/strong&gt;&lt;br /&gt;This is called at the time of unmounting the file system. We use the helper function kill_anon_super for this.&lt;br /&gt;&lt;strong&gt;d. super_operations.read_inode&lt;/strong&gt;&lt;br /&gt;Inodes objects should be allocated using the iget function. This uses the inode cache, adjusts the relationships of the inode with various data structures, updates the count etc. If the inode is not cached, it allocates a new inode and calls the read_inode handler of the super block if present. Inodes are identified by the inode numbers. The handler is expected to initialize the inode with the contents of the inode on the backend.&lt;br /&gt;&lt;strong&gt;e. super_operations.write_inode&lt;/strong&gt;&lt;br /&gt;This will be called when the dirty inodes are flushed. The handler has to sync the inode contents to the backend.&lt;br /&gt;&lt;strong&gt;f. inode_operations.lookup&lt;/strong&gt;&lt;br /&gt;This will be called when the kernel is resolving a path. The lookup handler of the inode operation table of the parent inode is called to resolve a child. Remember that the dentry for the root most inode is already available in s_root field of the super block.&lt;br /&gt;For example, after mounting the file system under '/mnt/rkfs' if we want to see the contents using 'ls /mnt/rkfs', the kernel has to create a file object for the inode '/mnt/rkfs'. The kernel will create a file object with the dentry of the root most inode of the file system. For the command 'ls -l /mnt/rkfs/hello.txt', the kernel name lookup reaches the root most inode and the lookup handler will be called to set the inode of 'hello.txt'. The kernel allocates the dentry object and passes to the handler. If an inode exists for the name component, the inode has to be added to the dentry using d_add and NULL should be returned. If there is some problem, a suitable error code has to be returned.&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;static struct dentry *rkfs_inode_lookup(struct inode *parent_inode, struct dentry *dentry, struct nameidata *nameidata) {&lt;br /&gt;    struct inode *file_inode;&lt;br /&gt;    if(parent_inode-&amp;gt;i_ino != rkfs_root_inode-&amp;gt;i_ino)&lt;br /&gt;        return ERR_PTR(-ENOENT);&lt;br /&gt;    if(dentry-&amp;gt;d_name.len != strlen("hello.txt") ||&lt;br /&gt;       strncmp(dentry-&amp;gt;d_name.name, "hello.txt", dentry-&amp;gt;d_name.len))&lt;br /&gt;      return ERR_PTR(-ENOENT);&lt;br /&gt;&lt;br /&gt;    file_inode = iget(parent_inode-&amp;gt;i_sb, FILE_INODE_NUMBER);&lt;br /&gt;    if(!file_inode)&lt;br /&gt;        return ERR_PTR(-EACCES);&lt;br /&gt;    file_inode-&amp;gt;i_size = file_size;&lt;br /&gt;    file_inode-&amp;gt;i_mode = S_IFREG|S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH;&lt;br /&gt;    file_inode-&amp;gt;i_fop = &amp;amp;rkfs_fops;&lt;br /&gt;    //  file_inode-&amp;gt;i_fop&lt;br /&gt;    d_add(dentry, file_inode);&lt;br /&gt;    return NULL;&lt;br /&gt;}&lt;/pre&gt;&lt;strong&gt;g. file_operations.readdir&lt;/strong&gt;&lt;br /&gt;This will be called when the kernel wants to read the contents of a directory. The readdir handler of the file operations table of the file will be called to show the contents of the directory. The kernel passes the file object, the dirent structure and a callback to fill the dirent structure with the values of the contents of the directory. The values are added to the dirent structure using the 'filldir' callback. Since we support one hardcoded file 'hello.txt', we just have to return the values, '.', '..' and 'hello.txt'. File systems like ext2 will have to fetch the contents from the disk.&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;int rkfs_f_readdir( struct file *file, void *dirent, filldir_t filldir ) {&lt;br /&gt;    int err;&lt;br /&gt;    struct dentry *de = file-&amp;gt;f_dentry;&lt;br /&gt;&lt;br /&gt;    printk( "rkfs: file_operations.readdir called\n" );&lt;br /&gt;    if(file-&amp;gt;f_pos &amp;gt; 0 )&lt;br /&gt;        return 1;&lt;br /&gt;    if(filldir(dirent, ".", 1, file-&amp;gt;f_pos++, de-&amp;gt;d_inode-&amp;gt;i_ino, DT_DIR)||&lt;br /&gt;       (filldir(dirent, "..", 2, file-&amp;gt;f_pos++, de-&amp;gt;d_parent-&amp;gt;d_inode-&amp;gt;i_ino, DT_DIR)))&lt;br /&gt;        return 0;&lt;br /&gt;    if(filldir(dirent, "hello.txt", 9, file-&amp;gt;f_pos++, FILE_INODE_NUMBER, DT_REG ))&lt;br /&gt;        return 0;&lt;br /&gt;    return 1;&lt;br /&gt;}&lt;/pre&gt;In our file system, we are supporting only one file i.e., hello.txt. So, the result of 'ls /mnt/rkfs' will be&lt;br /&gt;&lt;strong&gt;. .. hello.txt&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;h. file_operations.read&lt;/strong&gt;&lt;br /&gt;This will be called when the kernel gets a read request for a file in our file system. The file object of the file to be read, the user-space buffer address, the maximum size of the buffer and the address of the offset (which contains the current offset and which has to be updated after successful read operation) are passed. The contents of the file have to be written to the buffer. Note that this is in the user-space. The data is copied to the user-space buffer using the function copy_to_user.&lt;br /&gt;There are two ways of supporting this operation. One way is to provide a read handler which writes the data to the buffer. But the drawback is that we cannot take advantage of the page cache. Files can also be read/written using the mmap (memory mapping). With this approach, we cannot support the mmap way of accessing the file (or it is very difficult to provide transparency i.e., file written after mapping and read with 'read' system call).&lt;br /&gt;The second way is to provide a unified way to read/write to the file for both the approaches i.e., calling the system calls directly or by mapping the file and reading/writing the contents in memory). This takes the advantage of page cache also. This is applicable to the write operation also.&lt;br /&gt;Let us take the second approach (the code for the first approach is also provided later). The approach is slightly different in this case. The contents of an inode are seen as chunks of pages and represented by addess_space object. This 'mapping' between the inode and the address space object is stored in the i_mapping field of the inode. To read some data from the page, the corresponding chunks/pages which holds the data are loaded into memory.&lt;br /&gt;Address Space Operations table is used to perform different operations on the address space object (a_ops field). The readpage handler of the table is used to read the contents of a page of the inode into memory. For example, if the page size is 4096, the data from 5000 to 6000 bytes is present in the 2nd page of the inode (similarly, the data from 4000 to 5000 is present in the pages 1 and 2).&lt;br /&gt;Since the actual work of reading the data is moved to address_space_operations.readpage handler, we can use the generic_file_read helper function as the read handler. This function get the pages of the data and copies to the user-space buffer. If the pages are not in the cache, it waits till the pages are loaded with the data using the 'readpage' handler.&lt;br /&gt;&lt;strong&gt;i. address_space_operations.readpage&lt;/strong&gt;&lt;br /&gt;The readpage handler has to fill the page with the contents of the inode. The index of the page is obtained from the 'index' field of the page structure.&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;static int rkfs_readpage(struct file *file, struct page *page) {&lt;br /&gt;    printk("RKFS: readpage called for page index=[%d]\n", (int)page-&amp;gt;index);&lt;br /&gt;    if(page-&amp;gt;index &amp;gt; 0) {&lt;br /&gt;        return -ENOSPC;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    SetPageUptodate(page);&lt;br /&gt;    memcpy(page_address(page), file_buf, PAGE_SIZE);&lt;br /&gt;    if(PageLocked(page))&lt;br /&gt;        unlock_page(page);&lt;br /&gt;    return 0;&lt;br /&gt;}&lt;/pre&gt;&lt;strong&gt;j. file_operations.write&lt;/strong&gt;&lt;br /&gt;We register generic_file_write as the write handler. This allocates pages and calls prepare_write handler on the address space object so that buffer head objects can be allocated for the page to perform the I/O to the device later. It copies the data from the user-space to the pages and calls commit_write on the address space object.&lt;br /&gt;File systems like ext2 generally have a specific implementation of prepare_write. The allocation of buffer head objects for the write operation will be same for most of the file systems except for the location of the buffer heads (buffer head is the kernel's copy of a disk block). In this case, they use the helper/wrapper function block_prepare_write and passing a callback (in case of ext2, it is ext2_get_block) which will give the block number for the file offset.&lt;br /&gt;Since writing the buffers associated with the pages to the device is similar to most of the file systems, they normally use generic_commit_write helper function. This marks the buffer as dirty so that it will be flushed later to the device by the block device layer.&lt;br /&gt;This writes the data from user-space to the pages. The pages are synced later. Note that the read/write happens on the cached pages.&lt;br /&gt;&lt;strong&gt;k. address_space_operations.commit_write&lt;/strong&gt;&lt;br /&gt;The generic_commit_write helper function sets up the buffers to be written to the disk. Since we are not using any device, this has been modified to write into the memory buffer of the file.&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;static int rkfs_commit_write(struct file *file, struct page *page,&lt;br /&gt;             unsigned from, unsigned to) {&lt;br /&gt;    struct inode *inode = page-&amp;gt;mapping-&amp;gt;host;&lt;br /&gt;    loff_t pos = ((loff_t)page-&amp;gt;index &amp;lt;&amp;lt; PAGE_CACHE_SHIFT) + to;&lt;br /&gt;&lt;br /&gt;   if(page-&amp;gt;index == 0) {&lt;br /&gt;        memcpy(file_buf, page_address(page), PAGE_SIZE);&lt;br /&gt;        ClearPageDirty(page);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /*&lt;br /&gt;     * No need to use i_size_read() here, the i_size&lt;br /&gt;     * cannot change under us because we hold i_sem.&lt;br /&gt;     */&lt;br /&gt;    if (pos &amp;gt; inode-&amp;gt;i_size) {&lt;br /&gt;        i_size_write(inode, pos);&lt;br /&gt;        mark_inode_dirty(inode);&lt;br /&gt;    }&lt;br /&gt;    SetPageUptodate(page);&lt;br /&gt;    return 0;&lt;br /&gt;}&lt;/pre&gt;&lt;strong&gt;l. address_space_operations.writepage&lt;/strong&gt;&lt;br /&gt;This will be called when the dirty pages are flushed.&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;static int rkfs_writepage(struct page *page, struct writeback_control *wbc) {&lt;br /&gt;    printk("[RKFS] offset = %d\n", (int)page-&amp;gt;index);&lt;br /&gt;    memcpy(file_buf, page_address(page), PAGE_SIZE);&lt;br /&gt;    ClearPageDirty(page);&lt;br /&gt;    if(PageLocked(page))&lt;br /&gt;      unlock_page(page);&lt;br /&gt;    return 0;&lt;br /&gt;}&lt;/pre&gt;&lt;strong&gt;m. cleanup_module&lt;/strong&gt;&lt;br /&gt;This will be called when the module is removed. We have to unregister our file system at this point. The module count will be incremented and decremented by the file system calls. So the module will not be removed if the module use count is not zero. The kernel takes care of this, so we need not do anything to check if our file system is in use.&lt;br /&gt;&lt;strong&gt;5. code&lt;/strong&gt;&lt;br /&gt;Note: this has some debugging messages... you can remove all the 'printk's.&lt;br /&gt;&lt;strong&gt;6. Instructions to use the code&lt;/strong&gt;&lt;br /&gt;This code works on the 2.6 kernels. I haven't tested it on 2.4 kernels.&lt;br /&gt;Compile using the 2.6 build system. Create a Makefile like this: (or you can download the code here)&lt;br /&gt;&lt;blockquote&gt;ifneq (${KERNELRELEASE},)&lt;br /&gt;obj-m += rkfs.o&lt;br /&gt;else&lt;br /&gt;KERNEL_SOURCE := /lib/modules/$(shell uname -r)/build&lt;br /&gt;PWD := $(shell pwd)&lt;br /&gt;&lt;br /&gt;default:&lt;br /&gt;$(MAKE) -C ${KERNEL_SOURCE} SUBDIRS=$(PWD) modules&lt;br /&gt;clean :&lt;br /&gt;rm *.o *.ko&lt;br /&gt;endif&lt;/blockquote&gt;&lt;strong&gt;make&lt;/strong&gt;&lt;br /&gt;This generates a file rkfs.o. Load the module as root using&lt;br /&gt;&lt;strong&gt;insmod rkfs.ko&lt;/strong&gt;&lt;br /&gt;Mount the file system using&lt;br /&gt;&lt;strong&gt;mount -t rkfs none /mnt/rkfs&lt;/strong&gt;&lt;br /&gt;Unmount using&lt;br /&gt;&lt;strong&gt;umount /mnt/rkfs&lt;/strong&gt;&lt;br /&gt;Unload the module using&lt;br /&gt;&lt;strong&gt;rmmod rkfs&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Note:&lt;br /&gt;There have been some changes to the file system API recently (i'm not sure from which version exactly... i'm trying to figure out but i'd be glad if somebody can point it to me). The generic_file_read and generic_file_write have are not available any more. The same task is achieved by using do_sync_read and do_sync_write which uses the async i/o handlers. The modified code can be found here.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://fuse.sourceforge.net/helloworld.html" target="_blank"&gt;hellofs&lt;/a&gt; - a small, extremely limited filesystem in less than 100 lines of C code&lt;br /&gt;&lt;a href="http://fuse.sourceforge.net/" target="_blank"&gt;FUSE&lt;/a&gt; - a fully functional filesystem in a userspace program.&lt;br /&gt;&lt;a href="http://books.google.com/books?id=zj9E4_6zsHgC&amp;amp;dq=UNIX+Filesystems&amp;amp;printsec=frontcover&amp;amp;source=bl&amp;amp;ots=uEm6bcaEJb&amp;amp;sig=RbcRpDk1c0aEzC0qQZkR0x6yRaE&amp;amp;hl=en&amp;amp;ei=PLVlSsKRKNSi_Abgm_VR&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=1" target="_blank"&gt;《UNIX filesystems:evolution, design, and implementation》&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-1072125887242223898?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/1072125887242223898/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=1072125887242223898&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1072125887242223898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1072125887242223898'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/11/writing-simple-file-system.html' title='Writing a Simple File System'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-483137747569675890</id><published>2010-10-31T20:42:00.000-07:00</published><updated>2010-12-10T20:42:33.875-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Advanced Linux Programming 5</title><content type='html'>5 types of interprocess communication&lt;br /&gt;&lt;ul&gt; &lt;li&gt;Shared memory permits processes to communicate by simply reading and writing to a specified memory location.&lt;/li&gt; &lt;li&gt;Mapped memory is similar to shared memory, except that it is associated with a file in the filesystem.&lt;/li&gt; &lt;li&gt;Pipes permit sequential communication from one process to a related process.&lt;/li&gt; &lt;li&gt;FIFOs are similar to pipes, except that unrelated processes can communicate, because the pipe is given a name in the filesystem.&lt;/li&gt; &lt;li&gt;Sockets support communication between unrelated processes even on different computers.&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;Shared memory - Fast local communication&lt;/strong&gt;&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include &amp;lt;sys/shm.h&amp;gt;&lt;br /&gt;#include &amp;lt;sys/stat.h&amp;gt;&lt;br /&gt;&lt;br /&gt;int main(void) {&lt;br /&gt; int segment_id;&lt;br /&gt; char* shared_memory;&lt;br /&gt; struct shmid_ds shmbuf;&lt;br /&gt; size_t segment_size;&lt;br /&gt; const int shared_seg_size = 0x6400;&lt;br /&gt;&lt;br /&gt; /** Allocate */&lt;br /&gt; segment_id = shmget(IPC_PRIVATE, shared_seg_size, IPC_CREAT|IPC_EXCL|S_IRUSR|S_IWUSR);&lt;br /&gt;&lt;br /&gt; /** Attach */&lt;br /&gt; shared_memory = (char*) shmat(segment_id, 0, 0);&lt;br /&gt; printf("Shared memory address: %p\n", shared_memory);&lt;br /&gt; /** Determine size. */&lt;br /&gt; shmctl(segment_id, IPC_STAT, &amp;amp;shmbuf);&lt;br /&gt; segment_size = shmbuf.shm_segsz;&lt;br /&gt; printf("Shared memory size: %d\n", segment_size);&lt;br /&gt; /** Write data to shared memory */&lt;br /&gt; sprintf(shared_memory, "Hello, Shared memory!");&lt;br /&gt; /** Detach */&lt;br /&gt; shmdt(shared_memory);&lt;br /&gt;&lt;br /&gt; /** Reattach shared memory at a different address. */&lt;br /&gt; shared_memory = (char*) shmat(segment_id, (void*)0x5000000, 0);&lt;br /&gt; printf("Shared memory address: %p\n", shared_memory);&lt;br /&gt; printf("Read data: %s\n", shared_memory);&lt;br /&gt; shmdt(shared_memory);&lt;br /&gt;&lt;br /&gt; /** Dellocate */&lt;br /&gt; shmctl(segment_id, IPC_RMID, 0);&lt;br /&gt;&lt;br /&gt; return 0;&lt;br /&gt;}&lt;/pre&gt;&lt;strong&gt;Mapped Memory - Fast access to files&lt;/strong&gt;&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include &amp;lt;fcntl.h&amp;gt;&lt;br /&gt;#include &amp;lt;sys/mman.h&amp;gt;&lt;br /&gt;#include &amp;lt;sys/stat.h&amp;gt;&lt;br /&gt;&lt;br /&gt;#define FILE_LENGTH 0x100&lt;br /&gt;&lt;br /&gt;void mmap_write(const char* file_name, const size_t size, void* data) {&lt;br /&gt;&lt;br /&gt; int fd;&lt;br /&gt; void* file_memory;&lt;br /&gt;&lt;br /&gt; /** Prepare a file */&lt;br /&gt; fd = open(file_name, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);&lt;br /&gt; lseek(fd, size+1,SEEK_SET);&lt;br /&gt; write(fd, "", 1);&lt;br /&gt; lseek(fd, 0, SEEK_SET);&lt;br /&gt;&lt;br /&gt; /** Create memory mapping. */&lt;br /&gt; file_memory = mmap(0, size, PROT_WRITE, MAP_SHARED, fd, 0);&lt;br /&gt; close(fd);&lt;br /&gt; /** Write data */&lt;br /&gt; sprintf((char*) file_memory, "%s\n", (char*) data);&lt;br /&gt; /** Release the memory */&lt;br /&gt; munmap(file_memory, size);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void mmap_read(const char* file_name, const size_t size) {&lt;br /&gt;&lt;br /&gt; int fd;&lt;br /&gt; void* file_memory;&lt;br /&gt; char buffer[size];&lt;br /&gt;&lt;br /&gt; /** Prepare a file */&lt;br /&gt; fd = open(file_name, O_RDWR, S_IRUSR|S_IWUSR);&lt;br /&gt;&lt;br /&gt; /** Create memory mapping. */&lt;br /&gt; file_memory = mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);&lt;br /&gt; close(fd);&lt;br /&gt; /** Output to console */&lt;br /&gt; sprintf(buffer, "%s", (char*)file_memory);&lt;br /&gt; printf(buffer);&lt;br /&gt; /** Release the memory */&lt;br /&gt; munmap(file_memory, size);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/** Just a test */&lt;br /&gt;int main(int argc, char* argv[]) {&lt;br /&gt;&lt;br /&gt; mmap_write(argv[1], FILE_LENGTH, argv[2]);&lt;br /&gt; mmap_read(argv[1], FILE_LENGTH);&lt;br /&gt;&lt;br /&gt; return 0;&lt;br /&gt;}&lt;/pre&gt;&lt;blockquote&gt;tom@debian:~/workspace/adl/Debug$ ./adl t.txt SomethingReallyFun&lt;br /&gt;SomethingReallyFun&lt;br /&gt;tom@debian:~/workspace/adl/Debug$ cat t.txt&lt;br /&gt;SomethingReallyFun&lt;br /&gt;&lt;br /&gt;tom@debian:~/workspace/adl/Debug$&lt;/blockquote&gt;&lt;strong&gt;Pipes - unidirectional communication device and automatically synchronize&lt;/strong&gt;&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;int pipe_fds[2];&lt;br /&gt;int read_fd;&lt;br /&gt;int write_fd;&lt;br /&gt;pipe (pipe_fds);&lt;br /&gt;read_fd = pipe_fds[0];&lt;br /&gt;write_fd = pipe_fds[1];&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-483137747569675890?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/483137747569675890/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=483137747569675890&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/483137747569675890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/483137747569675890'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/10/advanced-linux-programming-5.html' title='Advanced Linux Programming 5'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-1215366249456803865</id><published>2010-10-31T20:41:00.000-07:00</published><updated>2010-12-10T20:41:54.431-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='NTT'/><title type='text'>NTT DATA开源系列 - Terasoluna</title><content type='html'>开源主站: &lt;a href="http://sourceforge.jp/projects/nttdatagroup-oss-square/" target="_blank"&gt;NTT DATA Group Open Source Software Square&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Terasoluna&lt;/strong&gt;&lt;br /&gt;基于对Spring/Struts/iBatis之类开源框架的包装和改造，将针对业务的开发接口完全规范化，业务之间的数据及关系可配置。&lt;a href="http://sourceforge.jp/projects/terasoluna/" target="_blank"&gt;V2已开源&lt;/a&gt;，内部用V4。&lt;br /&gt;主要构成部分为：&lt;br /&gt;&lt;ul&gt; &lt;li&gt;Batch Framework for Java&lt;/li&gt;针对Batch的解决方案，如银行数据批处理、打印任务等。 &lt;li&gt;Server Client Framwork for .NET&lt;/li&gt;面向.Net平台的框架 &lt;li&gt;Server Framework for Java RICH&lt;/li&gt;即&lt;a href="http://maskat.sourceforge.jp/"&gt;Maskat&lt;/a&gt;针对富客户端的js框架，将layout/event等数据以xml方式存储，画面加载时，根据以上数据在客户端构建窗口，与服务器之间以xml/json格式进行数据交换，具体的业务模块靠埋在HTTP协议头指定的模块名称 &lt;li&gt;Server Framework for Java WEB&lt;/li&gt;主要体系部分，主要基于对Spring/Struts/iBatis的扩展；扩展和改造Struts，并使用OXM方式将UI层与下层的交互自动实现数据转换（如上述的maskat）；主结构使用Spring，并加入诸多针对资源及业务的扩展模块；DAO层以适配器方式调入iBatis&lt;/ul&gt;另有基于eclipse的开发工具Terasoluna IDE及部分基于Selenium的自动化测试框架及品质收集工具。&lt;br /&gt;最终结果是：开发人员只面向针对每个业务的BLogic(如SpringMVC中的Controller一样的体验，类Command模式)；而数据交互格式、绑定规则、业务模块关系、验证规则等内容全部由具体的xml进行配置。&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/AAuGo5K3/pp0Vx.jpg" alt="" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-1215366249456803865?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/1215366249456803865/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=1215366249456803865&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1215366249456803865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1215366249456803865'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/10/ntt-data-terasoluna.html' title='NTT DATA开源系列 - Terasoluna'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-5535242453676936714</id><published>2010-10-25T20:42:00.000-07:00</published><updated>2010-12-13T04:01:56.703-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='操作系统'/><title type='text'>The MINIX 3 Microkernel Architecture</title><content type='html'>&lt;img src="http://pic.yupoo.com/lanyueniao/AzD2Gkbp/uNaL4.png" alt="" /&gt;&lt;br /&gt;&lt;strong&gt;内核(kernel)&lt;/strong&gt;最低层进行进程调度，并负责进程的就绪态、运行态和阻塞态间的转换。内核还负责处理所有进程间的消息。消息处理需要核实目标的合法性，定位内存中的发送和接受缓存，把消息从发送缓存复制到接受缓存。内核的令一部分支持对I/O端口和中断访问，现代处理器中这需要使用特权内核模式(kernel mode)指令，这些指令在用户进程中是没有的。&lt;br /&gt;&lt;strong&gt; 第一层&lt;/strong&gt;主要功能是为上层驱动程序和服务器提供一组特权内核调用。这包括读写I/O端口、跨地址空间复制数据等。这些调用有系统任务(system task)实现。&lt;br /&gt;内核以上的三层可视为一层，因为内核从根本上同样对待他们。每一层只限于使用用户模式(user mode)指令。&lt;br /&gt;&lt;strong&gt; 第二层&lt;/strong&gt;主要由设备驱动程序组成，驱动程序可能发出其他内核调用。&lt;br /&gt;&lt;strong&gt; 第三层&lt;/strong&gt;包含了服务器，即向用户进程提供有用服务的进程。两个必要的服务器：进程管理器(Process Manager)执行所有涉及启动和终止进程的系统调用 fork, exec, wait, alarm, kill, brk...；文件系统(File System)负责执行文件系统的调用 read, mount, chdir.. 此外还有Information Server、Reincarnation Server、Network Server等。服务器不直接进行I/O操作，而是通过驱动程序来请求I/O。&lt;br /&gt;内核调用是由系统服务提供的以使驱动程序和服务器完成工作的底层函数，如读硬件I/O端口。而，POSIX系统调用是由POSIX规范定义的高层调用，以供第四层的用户程序使用。用户程序包含了许多POSIX调用，但不包含内核调用。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-5535242453676936714?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/5535242453676936714/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=5535242453676936714&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5535242453676936714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5535242453676936714'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/10/minix-3-microkernel-architecture.html' title='The MINIX 3 Microkernel Architecture'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-2091134593905070187</id><published>2010-10-21T20:44:00.000-07:00</published><updated>2010-12-13T04:05:49.187-08:00</updated><title type='text'>When to draw diagrams, and when to stop.</title><content type='html'>Don&amp;rsquo;t make a rule that everything must be diagrammed. Such rules are worse than useless. Enormous amounts of project time and energy can be wasted in pursuit of diagrams that no one will ever read.&lt;br /&gt;&lt;br /&gt;When to draw diagrams:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Draw diagrams when several people need to understand the structure of a particular part of the design because they are all going to be working on it simultaneously. Stop when everyone agrees that they understand.&lt;/li&gt;&lt;li&gt;Draw diagrams when two or more people disagree on how a particular element should be designed, and you want team consensus. Put the discussion into a timebox choose a means for deciding, like a vote, or an impartial judge. Stop at the end of the timebox, or when the decision can be made. Then erase the diagram.&lt;/li&gt;&lt;li&gt;Draw diagrams when you just want to play with a design idea, and the diagrams can help you think it through. Stop when you&amp;rsquo;ve gotten to the point that you can finish your thinking in code. Discard the diagrams.&lt;/li&gt;&lt;li&gt;Draw diagrams when you need to explain the structure of some part of the code to someone else, or to yourself. Stop when the explanation would be better done by looking at code.&lt;/li&gt;&lt;li&gt;Draw diagrams when it&amp;rsquo;s close to the end of the project and your customer has requested them as part of a documentation stream for others.&lt;/li&gt;&lt;/ul&gt;When &lt;strong&gt;not&lt;/strong&gt; to draw diagrams:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Don&amp;rsquo;t draw diagrams because the process tells you to.&lt;/li&gt;&lt;li&gt;Don&amp;rsquo;t draw diagrams because you feel guilty not drawing them or because you think that&amp;rsquo;s what good designers do. Good designers write code and draw diagrams only when necessary.&lt;/li&gt;&lt;li&gt;Don&amp;rsquo;t draw diagrams to create comprehensive documetation of the design phase prior to coding. Such documents are almost never worth anything and consume immense amounts of time.&lt;/li&gt;&lt;li&gt;Don&amp;rsquo;t draw diagrams for other people to code. True software architects participate in the coding of their designs, so that they can lay in the bed they have made.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-2091134593905070187?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/2091134593905070187/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=2091134593905070187&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2091134593905070187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2091134593905070187'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/10/when-to-draw-diagrams-and-when-to-stop.html' title='When to draw diagrams, and when to stop.'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-1234203294945473122</id><published>2010-10-21T20:43:00.000-07:00</published><updated>2010-12-10T20:44:02.421-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Framework'/><title type='text'>Think in framework</title><content type='html'>几日前，关于框架化程序设计做的PPT，也算是对过去做的几个框架后的认识和部分总结，拿出来分享&lt;br /&gt;&lt;div id="__ss_5515736" style="width: 640px;"&gt;&lt;object id="__sse5515736" width="640" height="480" data="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=thinkinframework-101021064631-phpapp01&amp;amp;stripped_title=think-in-framework&amp;amp;userName=lanyueniao" type="application/x-shockwave-flash"&gt;&lt;param name="data" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=thinkinframework-101021064631-phpapp01&amp;amp;stripped_title=think-in-framework&amp;amp;userName=lanyueniao" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=thinkinframework-101021064631-phpapp01&amp;amp;stripped_title=think-in-framework&amp;amp;userName=lanyueniao" /&gt;&lt;param name="name" value="__sse5515736" /&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;/object&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-1234203294945473122?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/1234203294945473122/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=1234203294945473122&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1234203294945473122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1234203294945473122'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/10/think-in-framework.html' title='Think in framework'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-3194344103949503501</id><published>2010-10-19T20:44:00.000-07:00</published><updated>2010-12-13T04:07:49.313-08:00</updated><title type='text'>Cloud era - Hello, Pro Hadoop</title><content type='html'>&lt;strong&gt;1. Map Reduce Mode&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/AyJu4XWa/7Ziu8.png" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Web Crawler Samples&lt;/strong&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Ingest the URLs and their associated metadata.&lt;/li&gt;&lt;li&gt;Normalize the URLs.&lt;/li&gt;&lt;li&gt;Eliminate duplicate URLs.&lt;/li&gt;&lt;li&gt;Filter the URLs against a set of exclusion and inclusion filters.&lt;/li&gt;&lt;li&gt;Filter the URLs against a do not fetch list.&lt;/li&gt;&lt;li&gt;Filter the URLs against a recently seen set.&lt;/li&gt;&lt;li&gt;Fetch the URLs.&lt;/li&gt;&lt;li&gt;Fingerprint the content items.&lt;/li&gt;&lt;li&gt;Update the recently seen set.&lt;/li&gt;&lt;li&gt;Prepare the work list for the next application.&lt;/li&gt;&lt;/ol&gt;&lt;strong&gt;3. Web Crawler Samples In Hadoop Arch&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/AyJvZZNk/M5bcV.png" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4. Map Reduce Framework Need to Know&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The location(s) in the distributed file system of the job input&lt;/li&gt;&lt;li&gt;The location(s) in the distributed file system for the job output&lt;/li&gt;&lt;li&gt;The input format&lt;/li&gt;&lt;li&gt;The output format&lt;/li&gt;&lt;li&gt;The class containing the map function&lt;/li&gt;&lt;li&gt;Optionally. the class containing the reduce function&lt;/li&gt;&lt;li&gt;The JAR file(s) containing the map and reduce functions and any support classes&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;5. Hadoop Examples&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/AyJDqIcA/iCWre.png" alt="" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-3194344103949503501?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/3194344103949503501/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=3194344103949503501&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3194344103949503501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3194344103949503501'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/10/cloud-era-hello-pro-hadoop.html' title='Cloud era - Hello, Pro Hadoop'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-2859314621121034636</id><published>2010-10-16T20:45:00.000-07:00</published><updated>2010-12-10T20:45:35.623-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Advanced Linux Programming 4</title><content type='html'>&lt;strong&gt;Thread&lt;/strong&gt;&lt;br /&gt;The &lt;code&gt;pthread_create&lt;/code&gt; function creates a new thread.You provide it with the following:&lt;br /&gt;&lt;ul&gt; &lt;li&gt;A pointer to a pthread_t variable, in which the thread ID of the new thread is stored.&lt;/li&gt; &lt;li&gt;A pointer to a thread attribute object.This object controls details of how the thread interacts with the rest of the program. If you pass NULL as the thread attribute, a thread will be created with the default thread attributes&lt;/li&gt; &lt;li&gt;A pointer to the thread function.This is an ordinary function pointer, of this type:&lt;code&gt;void* (*) (void*)&lt;/code&gt;&lt;/li&gt; &lt;li&gt;A thread argument value of type void*. Whatever you pass is simply passed as the argument to the thread function when the thread begins executing.&lt;/li&gt;&lt;/ul&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;#include &amp;lt;pthread.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;&lt;br /&gt;/** Print 'x' to stderr. */&lt;br /&gt;void* print_xs(void* unused)&lt;br /&gt;{&lt;br /&gt;    while(1)&lt;br /&gt;    {&lt;br /&gt;        fputc('A', stderr);&lt;br /&gt;    }&lt;br /&gt;    return NULL;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/** Main program. */&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;    pthread_t thread_id;&lt;br /&gt;    pthread_create(&amp;amp;thread_id, NULL, &amp;amp;print_xs, NULL);&lt;br /&gt;&lt;br /&gt;    while(1)&lt;br /&gt;    {&lt;br /&gt;        fputc('B', stderr);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    return 0;&lt;br /&gt;}&lt;/pre&gt;That function is &lt;a href="http://opengroup.org/onlinepubs/007908799/xsh/pthread_join.html" target="_blank"&gt; pthread_join&lt;/a&gt;, which takes two arguments: the thread ID of the thread to wait for, and a pointer to a void* variable that will receive the finished thread&amp;rsquo;s return value. If you don&amp;rsquo;t care about the thread return value, pass NULL as the second argument.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-2859314621121034636?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/2859314621121034636/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=2859314621121034636&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2859314621121034636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2859314621121034636'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/10/advanced-linux-programming-4.html' title='Advanced Linux Programming 4'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-7014898247214118370</id><published>2010-10-14T20:45:00.000-07:00</published><updated>2010-12-10T20:46:03.598-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Advanced Linux Programming 3</title><content type='html'>&lt;strong&gt;Process&lt;/strong&gt;&lt;br /&gt;1, Looking at his eyes&lt;br /&gt;print-pid.c&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt; printf("Process ID: %d\n", getpid());&lt;br /&gt; printf("Parent PID: %d\n", getppid());&lt;br /&gt;&lt;br /&gt; return 0;&lt;br /&gt;}&lt;/pre&gt;2, Ways to Roman and Creating Process&lt;br /&gt;&lt;br /&gt;Using system&lt;br /&gt;&lt;pre&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;int system(const char *command);&lt;/pre&gt;Fork &amp;amp; exec families&lt;br /&gt;&lt;ul&gt; &lt;li&gt;Functions that contain the letter p in their names (execvp and execlp) accept a program name and search for a program by that name in the current execution path; functions that don&amp;rsquo;t contain the p must be given the full path of the program to be executed.&lt;/li&gt; &lt;li&gt;Functions that contain the letter v in their names (execv, execvp, and execve) accept the argument list for the new program as a NULL-terminated array of pointers to strings. Functions that contain the letter l (execl, execlp, and execle) accept the argument list using the C language&amp;rsquo;s varargs mechanism.&lt;/li&gt; &lt;li&gt;Functions that contain the letter e in their names (execve and execle) accept an additional argument, an array of environment variables.The argument should be a NULL-terminated array of pointers to character strings. Each character string should be of the form &amp;ldquo;VARIABLE=value&amp;rdquo;.&lt;/li&gt;&lt;/ul&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;  Spawn a child process running a new program.&lt;br /&gt;  PROGRAM  - the name of the program to run; path will be searched.&lt;br /&gt;  ARG_LIST  - NULL-terminated list of character strings. */&lt;br /&gt;int spawn(char* program, char** arg_list)&lt;br /&gt;{&lt;br /&gt; pid_t child_pid;&lt;br /&gt;&lt;br /&gt; child_pid = fork();&lt;br /&gt; if(child_pid != 0) {&lt;br /&gt;  return;&lt;br /&gt; } else {&lt;br /&gt;  execvp(program, arg_list);&lt;br /&gt;  /** The execvp function return only if an error occurs. */&lt;br /&gt;  fprintf(stderr, "error occured in execvp\n");&lt;br /&gt;  abort();&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt; char* arg_list[] = {&lt;br /&gt;  "ls", /* argv[0], the name of the program. */&lt;br /&gt;  "-l",&lt;br /&gt;  "/",&lt;br /&gt;  NULL /* NULL-terminated. */&lt;br /&gt; };&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;   Spawn a child process running the "ls" command. */&lt;br /&gt; spawn("ls", arg_list);&lt;br /&gt;&lt;br /&gt; printf("main program done\n");&lt;br /&gt;&lt;br /&gt; return 0;&lt;br /&gt;}&lt;/pre&gt;3, Mask signals, Do Never Wanna Kill Me!!&lt;br /&gt;The &lt;code&gt;sigaction&lt;/code&gt; function can be used to set a signal disposition.The first parameter is the signal number.The next two parameters are pointers to sigaction structures; the first of these contains the desired disposition for that signal number, while the second receives the previous disposition.The most important field in the first or second sigaction structure is sa_handler. It can take one of three values:&lt;br /&gt;&lt;ul&gt; &lt;li&gt;SIG_DFL, which specifies the default disposition for the signal.&lt;/li&gt; &lt;li&gt;SIG_IGN, which specifies that the signal should be ignored.&lt;/li&gt; &lt;li&gt;A pointer to a signal-handler function.The function should take one parameter, the signal number, and return &lt;code&gt;void&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;#include &amp;lt;signal.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;string.h&amp;gt;&lt;br /&gt;#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;&lt;br /&gt;sig_atomic_t signal_cnt = 0;&lt;br /&gt;&lt;br /&gt;void handler(int signal_num)&lt;br /&gt;{&lt;br /&gt; ++signal_cnt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt; struct sigaction sa;&lt;br /&gt; memset(&amp;amp;sa, 0, sizeof(sa));&lt;br /&gt; sa.sa_handler = &amp;amp;handler;&lt;br /&gt; sigaction(SIGTERM, &amp;amp;sa, NULL);&lt;br /&gt;&lt;br /&gt; /** Do some lengthy stuff here. */&lt;br /&gt; /** ... */&lt;br /&gt; printf("KILL me! KILL me!\n");&lt;br /&gt; sleep(60);&lt;br /&gt;&lt;br /&gt; printf("U want to KILL me %d times\n", signal_cnt);&lt;br /&gt; return 0;&lt;br /&gt;}&lt;/pre&gt;&lt;pre class="brush: bash;fontsize: 100; first-line: 1; "&gt;tom@debian:~/project/linuxc/ch03$ ./signal&lt;br /&gt;KILL me! KILL me!&lt;br /&gt;U want to KILL me 0 times&lt;/pre&gt;&lt;pre class="brush: bash;fontsize: 100; first-line: 1; "&gt;tom@debian:~/project/linuxc/ch03$ ./signal&lt;br /&gt;KILL me! KILL me!&lt;/pre&gt;Open another console and input:&lt;br /&gt;&lt;pre class="brush: bash;fontsize: 100; first-line: 1; "&gt;tom@debian:~/project/linuxc/ch03$ ps -aux|grep signal&lt;br /&gt;Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html&lt;br /&gt;tom       3889  0.0  0.0   1616   328 pts/1    S+   22:11   0:00 ./signal&lt;br /&gt;tom       3891  0.0  0.0   3328   716 pts/0    S+   22:11   0:00 grep signal&lt;br /&gt;tom@debian:~/project/linuxc/ch03$ kill 3889&lt;/pre&gt;Then, recieved:&lt;br /&gt;&lt;pre class="brush: bash;fontsize: 100; first-line: 1; "&gt;tom@debian:~/project/linuxc/ch03$ ./signal&lt;br /&gt;KILL me! KILL me!&lt;br /&gt;U want to KILL me 1 times&lt;br /&gt;tom@debian:~/project/linuxc/ch03$&lt;/pre&gt;4, @Zombie Do U know I'm waiting?&lt;br /&gt;A zombie process is a process that has terminated but has not been cleaned up yet. It is the responsibility of the parent process to clean up its zombie children.The wait functions do this, too, so it&amp;rsquo;s not necessary to track whether your child process is still executing before waiting for it. Suppose, for instance, that a program forks a child process, performs some other computations, and then calls wait. If the child process has not terminated at that point, the parent process will block in the wait call until the child process finishes. If the child process finishes before the parent process calls wait, the child process becomes a zombie.When the parent process calls wait, the zombie child&amp;rsquo;s termination status is extracted, the child process is deleted, and the wait call returns immediately.&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt; pid_t child_pid;&lt;br /&gt;&lt;br /&gt; child_pid = fork();&lt;br /&gt; if(child_pid &amp;gt; 0) {&lt;br /&gt;  /** Daddy sleep. */&lt;br /&gt;  printf("Daddy sleeping\n");&lt;br /&gt;  sleep(10);&lt;br /&gt;  printf("Daddy wake up\n");&lt;br /&gt; } else {&lt;br /&gt;  /** Child exit immediately. */&lt;br /&gt;  printf("OK, I gone, daddy.\n");&lt;br /&gt;  exit(0);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; return 0;&lt;br /&gt;}&lt;/pre&gt;&lt;pre class="brush: bash;fontsize: 100; first-line: 1; "&gt;tom@debian:~/project/linuxc/ch03$ ./zombie&lt;br /&gt;tom@debian:~/project/linuxc/ch03$ ps -e -o pid,ppid,stat,cmd|grep zombie&lt;br /&gt; 3785  3539 S+   ./zombie&lt;br /&gt; 3786  3785 Z+   [zombie] &amp;lt;defunct&amp;gt;&lt;br /&gt; 3788  3392 S+   grep zombie&lt;br /&gt;tom@debian:~/project/linuxc/ch03$ ps -e -o pid,ppid,stat,cmd|grep zombie&lt;br /&gt; 3790  3392 S+   grep zombie&lt;br /&gt;tom@debian:~/project/linuxc/ch03$&lt;/pre&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;#include &amp;lt;signal.h&amp;gt;&lt;br /&gt;#include &amp;lt;string.h&amp;gt;&lt;br /&gt;#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;#include &amp;lt;sys/wait.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;&lt;br /&gt;sig_atomic_t child_exit_status;&lt;br /&gt;&lt;br /&gt;void clean_up_child_process(int signal_num)&lt;br /&gt;{&lt;br /&gt; /** Clean up the child process. */&lt;br /&gt; int status;&lt;br /&gt; wait(&amp;amp;status);&lt;br /&gt; /* Store its exit status in a global variable. */&lt;br /&gt; child_exit_status = status;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt; pid_t child_pid;&lt;br /&gt; struct sigaction sigchild_action;&lt;br /&gt; memset(&amp;amp;sigchild_action, 0, sizeof(sigchild_action));&lt;br /&gt; sigchild_action.sa_handler = &amp;amp;clean_up_child_process;&lt;br /&gt; sigaction(SIGCHLD, &amp;amp;sigchild_action, NULL);&lt;br /&gt;&lt;br /&gt; child_pid = fork();&lt;br /&gt; if(child_pid &amp;gt; 0) {&lt;br /&gt;  /** Daddy sleep. */&lt;br /&gt;  printf("Daddy sleeping\n");&lt;br /&gt;  sleep(10); /* Won't sleep. */&lt;br /&gt;  printf("Daddy wake up, child status:%d\n", child_exit_status);&lt;br /&gt; } else {&lt;br /&gt;  /** Child exit immediately. */&lt;br /&gt;  printf("OK, I gone, daddy.\n");&lt;br /&gt;  return 1;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; return 0;&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-7014898247214118370?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/7014898247214118370/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=7014898247214118370&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7014898247214118370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7014898247214118370'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/10/advanced-linux-programming-3.html' title='Advanced Linux Programming 3'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-8889303509263922315</id><published>2010-10-12T20:46:00.001-07:00</published><updated>2010-12-10T20:47:12.277-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>秋</title><content type='html'>&lt;strong&gt;&lt;span style="color: #009900;"&gt;我在风中&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #009900;"&gt;站成一棵树&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #009900;"&gt;只为&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #800000;"&gt;等你&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/AxEsSz4I/KfSuY.jpg" alt="秋树" width="500" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-8889303509263922315?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/8889303509263922315/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=8889303509263922315&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8889303509263922315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8889303509263922315'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/10/blog-post.html' title='秋'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-1960585581780296085</id><published>2010-10-12T20:46:00.000-07:00</published><updated>2010-12-10T20:46:38.518-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Advanced Linux Programming 2</title><content type='html'>&lt;strong&gt;Writing Good GNU/Linux Software&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1, Interaction With the Parameters&lt;br /&gt;getopt_long.c&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;#include &amp;lt;getopt.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;&lt;br /&gt;void print_usage(FILE *stream, int exit_code)&lt;br /&gt;{&lt;br /&gt;    fprintf(stream, "Usage:..\n");&lt;br /&gt;    exit(exit_code);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int main(int argc, char* argv[])&lt;br /&gt;{&lt;br /&gt;    int next_option;&lt;br /&gt;    /** A string listing valid short options letters. */&lt;br /&gt;    const char* const short_options = "ho:v";&lt;br /&gt;    /** A array describing valid long options. */&lt;br /&gt;    const struct option long_options[] = {&lt;br /&gt;        { "help",       0, NULL, 'h' },&lt;br /&gt;        { "output",     1, NULL, 'o' },&lt;br /&gt;        { "verbose",    0, NULL, 'v' },&lt;br /&gt;        {  NULL,        0, NULL,  0  }&lt;br /&gt;    };&lt;br /&gt;&lt;br /&gt;    const char* output_filename = NULL;&lt;br /&gt;&lt;br /&gt;    do {&lt;br /&gt;        next_option = getopt_long(argc, argv, short_options,&lt;br /&gt;                long_options, NULL);&lt;br /&gt;        switch(next_option)&lt;br /&gt;        {&lt;br /&gt;            case 'h':  /* -h or --help */&lt;br /&gt;                print_usage(stdout, 0);&lt;br /&gt;            case 'o':  /* -o or --output */&lt;br /&gt;                output_filename = optarg;&lt;br /&gt;                printf("output file=%s\n", output_filename);&lt;br /&gt;                break;&lt;br /&gt;            case 'v':  /* -v or --verbose */&lt;br /&gt;                /* do something */&lt;br /&gt;                break;&lt;br /&gt;            case '?':  /* Invalid option */&lt;br /&gt;                print_usage(stderr, 1);&lt;br /&gt;            case -1:   /* Done with options */&lt;br /&gt;                break;&lt;br /&gt;            default:&lt;br /&gt;                abort();&lt;br /&gt;        }&lt;br /&gt;    } while(next_option != -1);&lt;br /&gt;&lt;br /&gt;    return 0;&lt;br /&gt;}&lt;/pre&gt;&lt;pre class="brush: bash;fontsize: 100; first-line: 1; "&gt;tom@debian:~/project/linuxc/ch02$ ./getopt_long&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ ./getopt_long -h&lt;br /&gt;Usage:..&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ ./getopt_long -o log.txt&lt;br /&gt;output file=log.txt&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ ./getopt_long --verbose&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ ./getopt_long -?&lt;br /&gt;./getopt_long: invalid option -- ?&lt;br /&gt;Usage:..&lt;br /&gt;tom@debian:~/project/linuxc/ch02$&lt;/pre&gt;2, Printing the Execution Environment&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;&lt;br /&gt;/** The ENVIRON variable contains the environment. */&lt;br /&gt;extern char** environ;&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt; char** var;&lt;br /&gt; for(var=environ; *var!=NULL; ++var)&lt;br /&gt;    {&lt;br /&gt;  printf("%s\n", *var);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; return 0;&lt;br /&gt;}&lt;/pre&gt;3, Interact with environ variables&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt; char* server_name = getenv("SERVER_NAME");&lt;br /&gt; if(server_name == NULL)&lt;br /&gt;    {&lt;br /&gt;  server_name = "localhost";&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; printf("SERVER_NAME: %s\n", server_name);&lt;br /&gt;&lt;br /&gt; return 0;&lt;br /&gt;}&lt;/pre&gt;&lt;pre class="brush: bash;fontsize: 100; first-line: 1; "&gt;tom@debian:~/project/linuxc/ch02$ ./client&lt;br /&gt;SERVER_NAME: localhost&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ export SERVER_NAME="sina.com"&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ ./client&lt;br /&gt;SERVER_NAME: sina.com&lt;br /&gt;tom@debian:~/project/linuxc/ch02$&lt;/pre&gt;4, Do as the kernel does&lt;br /&gt;&lt;blockquote&gt;1. Allocate the buffer.&lt;br /&gt;&lt;br /&gt;2. Open the file.&lt;br /&gt;&lt;br /&gt;3. Read from the file into the buffer.&lt;br /&gt;&lt;br /&gt;4. Close the file.&lt;br /&gt;&lt;br /&gt;5. Return the buffer.&lt;/blockquote&gt;5, Writing and Using libraries&lt;br /&gt;&lt;pre class="brush: bash;fontsize: 100; first-line: 1; "&gt;tom@debian:~/project/linuxc/ch02$ echo "int f(){return 3;}" &amp;gt; test.c&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ echo "int main() {return f();}" &amp;gt; app.c&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ gcc -c test.c&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ ar cr libtest.a test.o&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ gcc -c app.c&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ gcc -o app app.o -L. -ltest&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ ./app&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ echo $?&lt;br /&gt;3&lt;/pre&gt;&lt;pre class="brush: bash;fontsize: 100; first-line: 1; "&gt;tom@debian:~/project/linuxc/ch02$ gcc -c -fPIC test.c&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ gcc -shared -fPIC -o libtest.so test.o&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ gcc -o app app.c -L. -ltest&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ sudo cp libtest.so /usr/lib/&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ ldd app&lt;br /&gt; linux-gate.so.1 =&amp;gt;  (0xb77c3000)&lt;br /&gt; libtest.so =&amp;gt; /usr/lib/libtest.so (0xb77a5000)&lt;br /&gt; libc.so.6 =&amp;gt; /lib/i686/cmov/libc.so.6 (0xb764a000)&lt;br /&gt; /lib/ld-linux.so.2 (0xb77c4000)&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ ./app&lt;br /&gt;tom@debian:~/project/linuxc/ch02$ echo $?&lt;br /&gt;3&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-1960585581780296085?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/1960585581780296085/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=1960585581780296085&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1960585581780296085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1960585581780296085'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/10/advanced-linux-programming-2.html' title='Advanced Linux Programming 2'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-3888236107876235691</id><published>2010-10-11T20:47:00.000-07:00</published><updated>2010-12-10T20:47:42.196-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Advanced Linux Programming 1</title><content type='html'>&lt;strong&gt;Advanced UNIX Programming with Linux&lt;/strong&gt;&lt;br /&gt;文件清单&lt;br /&gt;main.c&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include "reciprocal.hpp"&lt;br /&gt;&lt;br /&gt;int main(int argc, char** argv)&lt;br /&gt;{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;int i;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;i = atoi(argv[1]);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;printf("Reciprocal value of %d is %d", i, reciprocal(i));&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;return 0;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;reciprocal.cpp&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;#include &amp;lt;cassert&amp;gt;&lt;br /&gt;#include "reciprocal.hpp"&lt;br /&gt;&lt;br /&gt;double reciprocal(int i)&lt;br /&gt;{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;assert (i != 0);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;return 1.0/i;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;reciprocal.hpp&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: cpp;fontsize: 100; first-line: 1; "&gt;#ifdef __cplusplus&lt;br /&gt;extern "C" {&lt;br /&gt;#endif&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;extern double reciprocal(int i);&lt;br /&gt;&lt;br /&gt;#ifdef _cplusplus&lt;br /&gt;}&lt;br /&gt;#endif&lt;/pre&gt;&lt;br /&gt;使用GCC进行编译编译单个文件&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;gcc -c main.c&lt;br /&gt;g++ -c reciprocal.cpp&lt;/blockquote&gt;&lt;br /&gt;连接Object文件&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;g++ -o reciprocal main.o reciprocal.o&lt;/blockquote&gt;&lt;br /&gt;makefile&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: plain;fontsize: 100; first-line: 1; "&gt;reciprocal: main.o reciprocal.o&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;g++ $(CFLAGS) -o reciprocal main.o reciprocal.o&lt;br /&gt;&lt;br /&gt;main.o: main.c reciprocal.hpp&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;gcc $(CFLAGS) -c main.c&lt;br /&gt;&lt;br /&gt;reciprocal.o: reciprocal.cpp reciprocal.hpp&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;g++ $(CFLAGS) -c reciprocal.cpp&lt;br /&gt;&lt;br /&gt;clean:&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;rm -f *.o reciprocal&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-3888236107876235691?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/3888236107876235691/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=3888236107876235691&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3888236107876235691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3888236107876235691'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/10/advanced-linux-programming-1.html' title='Advanced Linux Programming 1'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-112905357394165997</id><published>2010-09-11T20:47:00.000-07:00</published><updated>2010-12-10T20:48:15.881-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><title type='text'>Debian R400 wireless driver</title><content type='html'>http://wiki.debian.org/InstallingDebianOn/Thinkpad/T400/lenny&lt;br /&gt;&lt;br /&gt;1、Add the &lt;a href="http://wiki.debian.org/Backports" target="_blank"&gt;Debian Backports&lt;/a&gt; repository to /etc/apt/sources.list, also including the "non-free" component. For example:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;# Backported packages for Debian Lenny&lt;br /&gt;deb http://backports.debian.org/debian-backports lenny-backports main contrib non-free&lt;/blockquote&gt;&lt;br /&gt;2、Update the list of available packages:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;aptitude update&lt;/blockquote&gt;&lt;br /&gt;3、Install a 2.6.32 kernel image appropriate for your system, along with the lenny-backports/firmware-iwlwifi and wireless-tools packages. For example:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;aptitude -t lenny-backports install linux-image-2.6-$(uname -r | sed 's,.*-,,') firmware-iwlwifi wireless-tools&lt;/blockquote&gt;&lt;br /&gt;4、Restart your system and boot with the newly installed kernel.&lt;br /&gt;&lt;br /&gt;5、The necessary kernel module should be &lt;a href="http://wiki.debian.org/Modules" target="_blank"&gt;automatically loaded&lt;/a&gt;. If necessary, it can be manually loaded via:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;$ su&lt;br /&gt;modprobe iwlagn&lt;/blockquote&gt;&lt;br /&gt;6、Verify your device has an available interface:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;iwconfig&lt;/blockquote&gt;&lt;br /&gt;7、Raise the interface to activate the radio, for example:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;ifconfig wlan0 up&lt;/blockquote&gt;&lt;br /&gt;8、&lt;a href="http://wiki.debian.org/WiFi/HowToUse" target="_blank"&gt;Configure&lt;/a&gt; your wireless interface as appropriate.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-112905357394165997?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/112905357394165997/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=112905357394165997&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/112905357394165997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/112905357394165997'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/09/debian-r400-wireless-driver.html' title='Debian R400 wireless driver'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-665626064099622359</id><published>2010-08-20T20:48:00.000-07:00</published><updated>2010-12-10T20:48:55.189-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='操作系统'/><title type='text'>FAT12格式化的1.44M引导软盘镜像</title><content type='html'>&lt;strong&gt;1、GAS's "Hello, OS world!" with BPB(BIOS Parameter Block)&lt;/strong&gt;&lt;br /&gt;boot.S&lt;br /&gt;&lt;pre&gt;.code16&lt;br /&gt;.text&lt;br /&gt;/* Floppy head of FAT12 */&lt;br /&gt; jmp  LABEL_START   /* Start to boot */&lt;br /&gt; nop      /* nop required */&lt;br /&gt;BS_OEMName:  .ascii "WB. TOMZ"  /* OEM String, 8 bytes required */&lt;br /&gt;BPB_BytsPerSec:  .2byte 512   /* Bytes per sector */&lt;br /&gt;BPB_SecPerCluster: .byte 1   /* Sector per cluster */&lt;br /&gt;BPB_ResvdSecCnt: .2byte 1   /* Reserved sector count */&lt;br /&gt;BPB_NumFATs:  .byte 2   /* Number of FATs */&lt;br /&gt;BPB_RootEntCnt:  .2byte 224   /* Root entries count */&lt;br /&gt;BPB_TotSec16:  .2byte 2880   /* Toltal sector number */&lt;br /&gt;BPB_Media:  .byte 0xf0   /* Media descriptor */&lt;br /&gt;BPB_FATz16:  .2byte 9   /* FAT size(sectors) */&lt;br /&gt;BPB_SecPerTrk:  .2byte 18   /* Sector per track */&lt;br /&gt;BPB_NumHeads:  .2byte 2   /* Number ofmagnetic heads */&lt;br /&gt;BPB_HiddSec:  .4byte 0   /* Number of hidden sectors */&lt;br /&gt;BPB_TotSec32:  .4byte 0   /* If TotSec16 equal 0, this works */&lt;br /&gt;BS_DrvNum:  .byte 0   /* Driver number of interrupt 13 */&lt;br /&gt;BS_Reserved1:  .byte 0   /* Reserved */&lt;br /&gt;BS_BootSig:  .byte 0x29   /* Boot signal */&lt;br /&gt;BS_VolID:  .4byte 0   /* Volumn ID*/&lt;br /&gt;BS_VolLab:  .ascii "Memox 0.0.1"  /* Volumn label, 11 bytes required */&lt;br /&gt;BS_FileSysType:  .ascii "FAT12   "  /* File system type, 8bytes required */&lt;br /&gt;&lt;br /&gt;/* Initial registeres. */&lt;br /&gt;LABEL_START:&lt;br /&gt; mov  %cs,%ax&lt;br /&gt; mov  %ax,%ds&lt;br /&gt; mov  %ax,%es&lt;br /&gt; call  DispStr&lt;br /&gt; jmp  .&lt;br /&gt;DispStr:&lt;br /&gt; mov  $BootMessage, %ax&lt;br /&gt; mov  %ax, %bp&lt;br /&gt; mov  $16, %cx&lt;br /&gt; mov  $0x1301, %ax&lt;br /&gt; mov  $0x00c, %bx&lt;br /&gt; mov  $0, %dl&lt;br /&gt; int  $0x10&lt;br /&gt; ret&lt;br /&gt;BootMessage: .ascii "Hello, OS world!"&lt;br /&gt;.org 510&lt;br /&gt;.word 0xaa55&lt;/pre&gt;&lt;strong&gt;2、Link Script&lt;/strong&gt;&lt;br /&gt;boot.ld&lt;br /&gt;&lt;pre&gt;SECTIONS&lt;br /&gt;{&lt;br /&gt; . = 0x7c00;&lt;br /&gt; .text :&lt;br /&gt; {&lt;br /&gt;  _ftext = .;&lt;br /&gt; } = 0&lt;br /&gt;}&lt;/pre&gt;&lt;strong&gt;3、Makefile&lt;/strong&gt;&lt;br /&gt;makefile&lt;br /&gt;&lt;pre&gt;CC=gcc&lt;br /&gt;LD=ld&lt;br /&gt;LDFILE=boot.ld&lt;br /&gt;OBJCOPY=objcopy&lt;br /&gt;&lt;br /&gt;all: boot.img&lt;br /&gt;&lt;br /&gt;boot.o: boot.S&lt;br /&gt; $(CC) -c boot.S&lt;br /&gt;&lt;br /&gt;boot.elf: boot.o&lt;br /&gt; $(LD) boot.o -o boot.elf -T $(LDFILE)&lt;br /&gt;&lt;br /&gt;boot.bin: boot.elf&lt;br /&gt; @$(OBJCOPY) -R .pdr -R .comment -R .note -S -O binary boot.elf boot.bin&lt;br /&gt;&lt;br /&gt;boot.img: boot.bin&lt;br /&gt; @dd if=boot.bin of=boot.img bs=512 count=1&lt;br /&gt; @dd if=/dev/zero of=boot.img skip=1 seek=1 bs=512 count=2879&lt;br /&gt;&lt;br /&gt;clean:&lt;br /&gt; @rm -rf boot.o boot.elf boot.bin boot.img&lt;/pre&gt;&lt;strong&gt;4、Command&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;tom@localhost:~/sdk/memox$ la&lt;br /&gt;boot.S     .bochsrc      boot.ld   makefile&lt;br /&gt;tom@localhost:~/sdk/memox$ make&lt;br /&gt;gcc -c boot.S&lt;br /&gt;ld boot.o -o boot.elf -T boot.ld&lt;br /&gt;1+0 records in&lt;br /&gt;1+0 records out&lt;br /&gt;512 bytes (512 B) copied，8.786e-05 秒，5.8 MB/秒&lt;br /&gt;2879+0 records in&lt;br /&gt;2879+0 records out&lt;br /&gt;1474048 bytes (1.5 MB) copied，0.0247653 秒，59.5 MB/秒&lt;br /&gt;tom@localhost:~/sdk/memox$ la&lt;br /&gt;boot.elf  boot.ld  boot.S     .bochsrc      boot.bin  boot.img  boot.o   makefile&lt;br /&gt;tom@localhost:/home/tom/sdk/memox# bochs&lt;br /&gt;00000000000i[APIC?] local apic in  initializing&lt;br /&gt;========================================================================&lt;br /&gt;                       Bochs x86 Emulator 2.3.7&lt;br /&gt;               Build from CVS snapshot, on June 3, 2008&lt;br /&gt;========================================================================&lt;br /&gt;00000000000i[     ] LTDL_LIBRARY_PATH not set. using compile time default '/usr/lib/bochs/plugins'&lt;br /&gt;00000000000i[     ] BXSHARE not set. using compile time default '/usr/share/bochs'&lt;br /&gt;00000000000i[     ] reading configuration from .bochsrc&lt;br /&gt;00000000000i[     ] lt_dlhandle is 0x8d66130&lt;br /&gt;00000000000i[PLGIN] loaded plugin libbx_x.la&lt;br /&gt;00000000000i[     ] installing x module as the Bochs GUI&lt;br /&gt;00000000000i[     ] using log file bochsout.txt&lt;br /&gt;tom@localhost:/home/tom/sdk/memox# sudo mount boot.img /mnt/ -o loop&lt;br /&gt;tom@localhost:/home/tom/sdk/memox# sudo echo "This is a FAT12" &amp;gt; /mnt/readme&lt;br /&gt;tom@localhost:/home/tom/sdk/memox# ls /mnt/&lt;br /&gt;readme&lt;br /&gt;tom@localhost:/home/tom/sdk/memox#&lt;/pre&gt;&lt;strong&gt;引导扇区的格式化信息、打印程序&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/ApAUF1W1/wcrwG.png" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;引导扇区结束(55AA)、第一个FAT表(F0FF)&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/ApAUFNr4/SydoT.png" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;掠过第二个FAT表，抵达根目录区，README文件的条目信息&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/ApAUGx2C/ohzDm.png" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;抵达README存储部分&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/ApAUHJcP/P9Lz6.png" alt="" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-665626064099622359?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/665626064099622359/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=665626064099622359&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/665626064099622359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/665626064099622359'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/08/fat12144m.html' title='FAT12格式化的1.44M引导软盘镜像'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-868913965699232692</id><published>2010-08-19T20:49:00.000-07:00</published><updated>2010-12-10T20:49:46.296-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='操作系统'/><title type='text'>Hello, OS</title><content type='html'>&lt;strong&gt;1、Debian&lt;/strong&gt;&lt;br /&gt;&lt;blockquote&gt;tom@localhost:~/sdk/memox$ uname -a&lt;br /&gt;Linux localhost 2.6.26-2-686 #1 SMP Mon Jun 21 05:58:44 UTC 2010 i686 GNU/Linux&lt;br /&gt;tom@localhost:~/sdk/memox$ nasm -v&lt;br /&gt;NASM version 2.03.01 compiled on Jun 18 2008&lt;/blockquote&gt;&lt;strong&gt;2、Bochs&lt;/strong&gt;&lt;br /&gt;apt-get install bochs bochs-x bochsbios&lt;br /&gt;&lt;br /&gt;.bochsrc&lt;br /&gt;&lt;blockquote&gt;###############################################################&lt;br /&gt;# Configuration file for Bochs&lt;br /&gt;###############################################################&lt;br /&gt;&lt;br /&gt;# how much memory the emulated machine will have&lt;br /&gt;megs: 32&lt;br /&gt;&lt;br /&gt;# filename of ROM images&lt;br /&gt;romimage: file=/usr/share/bochs/BIOS-bochs-latest&lt;br /&gt;vgaromimage: file=/usr/share/vgabios/vgabios.bin&lt;br /&gt;&lt;br /&gt;# what disk images will be used&lt;br /&gt;floppya: 1_44=a.img, status=inserted&lt;br /&gt;&lt;br /&gt;# choose the boot disk.&lt;br /&gt;boot: a&lt;br /&gt;&lt;br /&gt;# where do we send log messages?&lt;br /&gt;log: bochsout.txt&lt;br /&gt;&lt;br /&gt;# disable the mouse&lt;br /&gt;mouse: enabled=0&lt;br /&gt;&lt;br /&gt;# enable key mapping, using US layout as default.&lt;br /&gt;keyboard_mapping: enabled=1, map=/usr/share/bochs/keymaps/x11-pc-us.map&lt;/blockquote&gt;&lt;strong&gt;3、boot.img&lt;/strong&gt;&lt;br /&gt;&lt;pre class="brush: ruby;fontsize: 100; first-line: 1; "&gt;org  07c00h&lt;br /&gt; mov  ax, cs&lt;br /&gt; mov  ds, ax&lt;br /&gt; mov  es, ax&lt;br /&gt; call DispStr&lt;br /&gt; jmp  $&lt;br /&gt;DispStr:&lt;br /&gt; mov  ax, BootMessage&lt;br /&gt; mov  bp, ax&lt;br /&gt; mov  cx, 16&lt;br /&gt; mov  ax, 01301h&lt;br /&gt; mov  bx, 000ch&lt;br /&gt; mov  dl, 0&lt;br /&gt; int  10h&lt;br /&gt; ret&lt;br /&gt;BootMessage:  db  "Hello, OS world!"&lt;br /&gt;times 510-($-$) db  0&lt;br /&gt;dw 0xaa55&lt;/pre&gt;&lt;blockquote&gt;tom@localhost:~/sdk/memox$ nasm boot.asm -o a.img&lt;br /&gt;tom@localhost:~/sdk/memox$ la&lt;br /&gt;a.img  .bochsrc  boot.asm&lt;br /&gt;tom@localhost:~/sdk/memox$ bochs&lt;br /&gt;00000000000i[APIC?] local apic in  initializing&lt;br /&gt;========================================================================&lt;br /&gt;Bochs x86 Emulator 2.3.7&lt;br /&gt;Build from CVS snapshot, on June 3, 2008&lt;br /&gt;========================================================================&lt;br /&gt;00000000000i[     ] LTDL_LIBRARY_PATH not set. using compile time default '/usr/lib/bochs/plugins'&lt;br /&gt;00000000000i[     ] BXSHARE not set. using compile time default '/usr/share/bochs'&lt;br /&gt;00000000000i[     ] reading configuration from .bochsrc&lt;br /&gt;00000000000i[     ] lt_dlhandle is 0x8d66140&lt;br /&gt;00000000000i[PLGIN] loaded plugin libbx_x.la&lt;br /&gt;00000000000i[     ] installing x module as the Bochs GUI&lt;br /&gt;00000000000i[     ] using log file bochsout.txt&lt;/blockquote&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/AprjBuTk/WYJWe.png" alt="" /&gt;&lt;br /&gt;&lt;ul&gt; &lt;li&gt;&lt;a href="http://code.google.com/p/writeos/" target="_blank"&gt;WriteOS on GoogleCode&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://bochs.sourceforge.net/" target="_blank"&gt;Bochs&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="../?p=8001" target="_blank"&gt;Get Started with Bochs&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.wangcong.org/articles/bochs.html" target="_blank"&gt;如何在Linux上使用Bochs&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-868913965699232692?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/868913965699232692/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=868913965699232692&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/868913965699232692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/868913965699232692'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/08/hello-os.html' title='Hello, OS'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-7639685782804116856</id><published>2010-08-16T20:49:00.000-07:00</published><updated>2010-12-10T20:50:18.543-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='操作系统'/><title type='text'>Hello, Nasm</title><content type='html'>&lt;pre class="brush: ruby;fontsize: 100; first-line: 1;"&gt;section .text    ;section declaration&lt;br /&gt;&lt;br /&gt;   ;we must export the entry point to the ELF linker or&lt;br /&gt;    global _start ;loader. They conventionally recognize _start as their&lt;br /&gt;   ;entry point. Use ld -e foo to override the default.&lt;br /&gt;&lt;br /&gt;_start:&lt;br /&gt;&lt;br /&gt;;write our string to stdout&lt;br /&gt;&lt;br /&gt;        mov     edx,len ;third argument: message length&lt;br /&gt;        mov     ecx,msg ;second argument: pointer to message to write&lt;br /&gt;        mov     ebx,1   ;first argument: file handle (stdout)&lt;br /&gt;        mov     eax,4   ;system call number (sys_write)&lt;br /&gt;        int     0x80 ;call kernel&lt;br /&gt;&lt;br /&gt;;and exit&lt;br /&gt;&lt;br /&gt; mov ebx,0 ;first syscall argument: exit code&lt;br /&gt;        mov     eax,1   ;system call number (sys_exit)&lt;br /&gt;        int     0x80 ;call kernel&lt;br /&gt;&lt;br /&gt;section .data    ;section declaration&lt;br /&gt;&lt;br /&gt;msg     db      "Hello, world!",0xa ;our dear string&lt;br /&gt;len     equ     $ - msg                 ;length of our dear string&lt;/pre&gt;&lt;blockquote&gt;tom@localhost:~/source/asm$ ll&lt;br /&gt;总计 4&lt;br /&gt;-rw-r--r-- 1 tom tom 187 08-16 23:03 hello.asm&lt;br /&gt;tom@localhost:~/source/asm$ nasm -f elf hello.asm&lt;br /&gt;tom@localhost:~/source/asm$ ll&lt;br /&gt;总计 8&lt;br /&gt;-rw-r--r-- 1 tom tom 187 08-16 23:03 hello.asm&lt;br /&gt;-rw-r--r-- 1 tom tom 704 08-20 00:23 hello.o&lt;br /&gt;tom@localhost:~/source/asm$ ld -s hello.o -o hello&lt;br /&gt;tom@localhost:~/source/asm$ ll&lt;br /&gt;总计 12&lt;br /&gt;-rwxr-xr-x 1 tom tom 440 08-20 00:23 hello&lt;br /&gt;-rw-r--r-- 1 tom tom 187 08-16 23:03 hello.asm&lt;br /&gt;-rw-r--r-- 1 tom tom 704 08-20 00:23 hello.o&lt;br /&gt;tom@localhost:~/source/asm$ ./hello&lt;br /&gt;Hello world&lt;br /&gt;tom@localhost:~/source/asm$&lt;/blockquote&gt;&lt;ul&gt; &lt;li&gt;&lt;a href="http://homepage.mac.com/randyhyde" target="_blank"&gt;The Place on the Internet to Learn Assembly&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://asm.sourceforge.net" target="_blank"&gt;linuxassembly.org&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://home.comcast.net/~fbkotler/" target="_blank"&gt;A beginner's nasm page&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-7639685782804116856?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/7639685782804116856/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=7639685782804116856&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7639685782804116856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7639685782804116856'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/08/hello-nasm.html' title='Hello, Nasm'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-986471032761500786</id><published>2010-07-30T20:50:00.000-07:00</published><updated>2010-12-13T04:06:02.478-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>CXF之Web Service</title><content type='html'>模型类&lt;br /&gt;&lt;pre class="brush: java;light: true; fontsize: 100; first-line: 1; "&gt;package demo.cxf.model;&lt;br /&gt;public class User {&lt;br /&gt;    private String name;&lt;br /&gt;    private String email;&lt;br /&gt;    public String getName() {&lt;br /&gt;        return name;&lt;br /&gt;    }&lt;br /&gt;    public void setName(String name) {&lt;br /&gt;        this.name = name;&lt;br /&gt;    }&lt;br /&gt;    public String getEmail() {&lt;br /&gt;        return email;&lt;br /&gt;    }&lt;br /&gt;    public void setEmail(String email) {&lt;br /&gt;        this.email = email;&lt;br /&gt;    }&lt;br /&gt;    public String toString() {&lt;br /&gt;        return "name:" + name + "\t email:" + email;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;接口类&lt;br /&gt;&lt;pre class="brush: java;light: true; fontsize: 100; first-line: 1; "&gt;package demo.cxf.service;&lt;br /&gt;import javax.jws.WebService;&lt;br /&gt;import demo.cxf.model.User;&lt;br /&gt;@WebService&lt;br /&gt;public interface UserService {&lt;br /&gt;    void add(User user);&lt;br /&gt;    User[] findAllUsers();&lt;br /&gt;}&lt;/pre&gt;实现类&lt;br /&gt;&lt;pre class="brush: java;light: true; fontsize: 100; first-line: 1; "&gt;package demo.cxf.service;&lt;br /&gt;import java.util.ArrayList;&lt;br /&gt;import java.util.List;&lt;br /&gt;import javax.jws.WebService;&lt;br /&gt;import javax.xml.ws.Endpoint;&lt;br /&gt;import demo.cxf.model.User;&lt;br /&gt;@WebService(endpointInterface = "demo.cxf.service.UserService", serviceName = "UserService", portName = "UserServicePort")&lt;br /&gt;public class UserServiceImpl implements UserService {&lt;br /&gt;    List&amp;lt;User&amp;gt; list = new ArrayList&amp;lt;User&amp;gt;();&lt;br /&gt;    public void add(User user) {&lt;br /&gt;        list.add(user);&lt;br /&gt;    }&lt;br /&gt;    public User[] findAllUsers() {&lt;br /&gt;        User[] users = new User[list.size()];&lt;br /&gt;        list.toArray(users);&lt;br /&gt;        return users;&lt;br /&gt;    }&lt;br /&gt;    public static void main(String[] args) {&lt;br /&gt;        UserService service = new UserServiceImpl();&lt;br /&gt;        Endpoint.publish("http://localhost:9000/userService", service);&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;测试端&lt;br /&gt;&lt;pre class="brush: java;light: true; fontsize: 100; first-line: 1; "&gt;package demo.cxf;&lt;br /&gt;import javax.xml.namespace.QName;&lt;br /&gt;import javax.xml.ws.Service;&lt;br /&gt;import javax.xml.ws.soap.SOAPBinding;&lt;br /&gt;import demo.cxf.model.User;&lt;br /&gt;import demo.cxf.service.UserService;&lt;br /&gt;public class CxfClient {&lt;br /&gt;    public static void main(String[] arg) {&lt;br /&gt;        // 这里的QName的url是Service的package名的倒序&lt;br /&gt;        Service service = Service.create(new QName("http://service.cxf.demo/", "UserService"));&lt;br /&gt;        service.addPort(new QName("http://service.cxf.demo/", "UserServicePort"), SOAPBinding.SOAP11HTTP_BINDING,&lt;br /&gt;                "http://localhost:9000/userService");&lt;br /&gt;        UserService userService = service.getPort(UserService.class);&lt;br /&gt;        User user = new User();&lt;br /&gt;        user.setName("Tom");&lt;br /&gt;        user.setEmail("tom@tom.com");&lt;br /&gt;        userService.add(user);&lt;br /&gt;        User[] users = userService.findAllUsers();&lt;br /&gt;        for (User u : users) {&lt;br /&gt;            System.out.println(u);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;至于需要的那些jar包，像我等懒人怎么会一个个去找呢，把下面的贴到pom.xml里算了&lt;br /&gt;&lt;pre class="brush: xml;light: true; fontsize: 100; first-line: 1; "&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt; &amp;lt;groupId&amp;gt;org.apache.cxf&amp;lt;/groupId&amp;gt;&lt;br /&gt; &amp;lt;artifactId&amp;gt;cxf-rt-frontend-jaxws&amp;lt;/artifactId&amp;gt;&lt;br /&gt; &amp;lt;version&amp;gt;2.2.9&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt; &amp;lt;groupId&amp;gt;org.apache.cxf&amp;lt;/groupId&amp;gt;&lt;br /&gt; &amp;lt;artifactId&amp;gt;cxf-rt-transports-http&amp;lt;/artifactId&amp;gt;&lt;br /&gt; &amp;lt;version&amp;gt;2.2.9&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;!-- Jetty is needed if you're are not using the CXFServlet --&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt; &amp;lt;groupId&amp;gt;org.apache.cxf&amp;lt;/groupId&amp;gt;&lt;br /&gt; &amp;lt;artifactId&amp;gt;cxf-rt-transports-http-jetty&amp;lt;/artifactId&amp;gt;&lt;br /&gt; &amp;lt;version&amp;gt;2.2.9&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-986471032761500786?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/986471032761500786/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=986471032761500786&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/986471032761500786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/986471032761500786'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/07/cxfweb-service.html' title='CXF之Web Service'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-7693724826016101970</id><published>2010-07-26T20:51:00.000-07:00</published><updated>2010-12-13T04:08:24.832-08:00</updated><title type='text'>lighttpd &amp; php5</title><content type='html'>需lighttpd/php5&lt;br /&gt;&lt;pre&gt;server.modules = (&lt;br /&gt;            "mod_access",&lt;br /&gt;            "mod_fastcgi",&lt;br /&gt;            "mod_alias",&lt;br /&gt;            "mod_accesslog",&lt;br /&gt;            "mod_compress",&lt;br /&gt;)&lt;/pre&gt;FastCGI请求转发&lt;br /&gt;&lt;pre&gt;fastcgi.server=(".php"=&amp;gt;&lt;br /&gt;    ("localhost"=&amp;gt;&lt;br /&gt;        (&lt;br /&gt;        "bin-path"=&amp;gt;"/usr/bin/php5-cgi",&lt;br /&gt;        "socket"=&amp;gt;"/tmp/php.socket"&lt;br /&gt;        )&lt;br /&gt;    )&lt;br /&gt;)&lt;/pre&gt;代理下转发Tomcat为&lt;br /&gt;&lt;pre&gt;proxy.server(".jsp"=&amp;gt;&lt;br /&gt;    ("localhost"=&amp;gt;&lt;br /&gt;        ("host"=&amp;gt;"localhost",&lt;br /&gt;         "port"=&amp;gt;"8080"&lt;br /&gt;        )&lt;br /&gt;    )&lt;br /&gt;)&lt;/pre&gt;/usr/sbin/下可用命令&lt;br /&gt;&lt;pre&gt;lighttpd              lighttpd-disable-mod  lighty-disable-mod&lt;br /&gt;lighttpd-angel        lighttpd-enable-mod   lighty-enable-mod&lt;/pre&gt;eg: lighty-enable-mod mod_cgi  ps: /etc/lighttpd/lighttpd.conf /etc/init.d/lighttpd [start|stop|restart|..]&lt;br /&gt;&lt;br /&gt;围观地址&lt;br /&gt;&lt;a href="http://redmine.lighttpd.net/projects/lighttpd/wiki"&gt;http://redmine.lighttpd.net/projects/lighttpd/wiki&lt;/a&gt;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-7693724826016101970?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/7693724826016101970/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=7693724826016101970&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7693724826016101970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7693724826016101970'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/07/lighttpd-php5.html' title='lighttpd &amp; php5'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-5836219298507642391</id><published>2010-07-17T20:52:00.000-07:00</published><updated>2010-12-10T20:52:27.296-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>Django to build a blog</title><content type='html'>&lt;a href="http://www.informit.com/articles/article.aspx?p=1273658"&gt;Django for the Impatient: Building a Blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;django-admin.py startproject mysite&lt;br /&gt;cd mysite/&lt;br /&gt;./manage.py startapp blog&lt;br /&gt;vim settings.py&lt;br /&gt;&lt;blockquote&gt;DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql',    'mysql', 'sqlite3' or 'oracle'.&lt;br /&gt;DATABASE_NAME = 'django.db'             # Or path to database file if using     sqlite3.&lt;br /&gt;.........&lt;br /&gt;INSTALLED_APPS = (&lt;br /&gt;'django.contrib.auth',&lt;br /&gt;'django.contrib.contenttypes',&lt;br /&gt;'django.contrib.sessions',&lt;br /&gt;'django.contrib.sites',&lt;br /&gt;'django.contrib.admin',&lt;br /&gt;'mysite.blog'&lt;br /&gt;)&lt;/blockquote&gt;vim urls.py&lt;br /&gt;&lt;blockquote&gt;from django.contrib import admin&lt;br /&gt;admin.autodiscover()&lt;br /&gt;......&lt;br /&gt;(r'^admin/(.*)', admin.site.root),&lt;br /&gt;(r'^blog/', include('mysite.blog.urls')),&lt;/blockquote&gt;vim blog/models.py&lt;br /&gt;&lt;blockquote&gt;from django.contrib import admin&lt;br /&gt;&lt;br /&gt;class Post(models.Model):&lt;br /&gt;title = models.CharField(max_length=150)&lt;br /&gt;body = models.TextField()&lt;br /&gt;timestamp = models.DateTimeField()&lt;br /&gt;&lt;br /&gt;admin.site.register(Post)&lt;/blockquote&gt;vim blog/urls.py&lt;br /&gt;&lt;blockquote&gt;from django.conf.urls.defaults import *&lt;br /&gt;from mysite.blog.views import archive&lt;br /&gt;&lt;br /&gt;urlpatterns = patterns('',&lt;br /&gt;url(r'^$', archive),&lt;br /&gt;)&lt;/blockquote&gt;vim blog/views.py&lt;br /&gt;&lt;blockquote&gt;from django.template import loader, Context&lt;br /&gt;from django.http import HttpResponse&lt;br /&gt;from mysite.blog.models import Post&lt;br /&gt;&lt;br /&gt;def archive(request):&lt;br /&gt;posts = Post.objects.all()&lt;br /&gt;t = loader.get_template("archive.html")&lt;br /&gt;c = Context({'posts':posts})&lt;br /&gt;return HttpResponse(t.render(c))&lt;/blockquote&gt;mkdir blog/templates&lt;br /&gt;vim blog/templates/base.html&lt;br /&gt;&lt;blockquote&gt;&amp;nbsp;&lt;br /&gt;{% block content%}&lt;br /&gt;{% endblock %}&lt;/blockquote&gt;vim blog/tempaltes/archive.html&lt;br /&gt;&lt;blockquote&gt;{% extends 'base.html' %}&lt;br /&gt;{% block content %}&lt;br /&gt;{% for post in posts %}&lt;br /&gt;&amp;lt;h2&amp;gt;{{ post.title }}&amp;lt;/h2&amp;gt;&lt;br /&gt;{{ post.timestamp|date:"l, F jS" }}&lt;br /&gt;&lt;br /&gt;{{ post.body }}&lt;br /&gt;&lt;br /&gt;{% endfor %}&lt;br /&gt;{% endblock %}&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-5836219298507642391?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/5836219298507642391/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=5836219298507642391&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5836219298507642391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5836219298507642391'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/07/django-to-build-blog.html' title='Django to build a blog'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-5005835926690484812</id><published>2010-07-12T20:52:00.000-07:00</published><updated>2010-12-10T20:52:53.848-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Framework'/><title type='text'>20 Application Framework Elements</title><content type='html'>&lt;ol&gt; &lt;li&gt;持久化存储（Persistence）&lt;/li&gt;RDB/XmlDB/Key-Value/DataNucleus... &lt;li&gt;键值生成（Key Generation）&lt;/li&gt;Sequence（DB依赖）/ Table / 分布系统情况 &lt;li&gt;数据访问（Database Access）&lt;/li&gt;JDBC/ibatis/XXXDao/ &lt;li&gt;资源访问（Resource Access）&lt;/li&gt;Resources/WebResource/Context/多国语言 &lt;li&gt;内层沟通（Inter-tier communication）&lt;/li&gt;SOAP/EJB/RMI/HTTP/Socket &lt;li&gt;同步（Concurrency）&lt;/li&gt;Cache刷新 / 部署中的Master-Slave &lt;li&gt;日志（Logging）&lt;/li&gt;Log4J / 分布式Log / 定制输出 &lt;li&gt;审计验证（Auditing）&lt;/li&gt;Role/Group... &lt;li&gt;事务（Transactions）&lt;/li&gt;分布式事务OLTP &lt;li&gt;错误处理（Error Handling）&lt;/li&gt;消息 / 日志 / 资源 / 异常分层分类 &lt;li&gt;用户消息（User Messages）&lt;/li&gt;消息框架供后续开发使用 / MessageCache / MessageManager &lt;li&gt;格式化规则（Formatting Rules）&lt;/li&gt;常用数据类型String/Integer/BigDecimal/Calendar &lt;li&gt;数据验证（Data Validation）&lt;/li&gt;数据验证 / Plugin / XML &lt;li&gt;安全（Security）&lt;/li&gt;SSL/OpenID/Kerbose... &lt;li&gt;用户管理（User Management）&lt;/li&gt;用户/用户组 &lt;li&gt;工作流程（Scheduling &amp;amp; Workflow）&lt;/li&gt;工作流框架 &lt;li&gt;报表（Reporting）&lt;/li&gt;PDF/Excel &lt;li&gt;系统安装（System Setup）&lt;/li&gt; &lt;li&gt;应用集成（Application Integration）&lt;/li&gt;ESB / SOAP / &lt;li&gt;静态数据（Static Data）&lt;/li&gt;Class / Resources&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-5005835926690484812?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/5005835926690484812/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=5005835926690484812&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5005835926690484812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5005835926690484812'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/07/20-application-framework-elements.html' title='20 Application Framework Elements'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-3585468063717803154</id><published>2010-07-11T20:53:00.000-07:00</published><updated>2010-12-10T20:53:46.927-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Scrum'/><title type='text'>Scrum Sprint1结束</title><content type='html'>&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sprint1结束，那本《scrum轻松之旅》也正好读到sprint回顾，感觉我们在走着与关毅相同的路，遇到相同的问题，相同的探索。这种知识共享，策略重现的模式，很赞。它可用于开放课程，结合sns的旅游资讯，点评推荐...&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;相对传统模式，目前感到Scrum中几个亮点：1、Team成员各自挑卡片，调动每个人的积极性，People good at what they love. 2、沟通和拥抱变化，其中几乎所有的活动都是针对发现问题、解决问题而存在的。早上的15分钟会议，Sprint评审、回顾和总结等等。 软件开发是&amp;ldquo;人&amp;rdquo;的有效活动。 想起《人月神话》&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Backlog的优先级分类，让我们集中20％的时间突击80％的需求，即便以后的20％部分没有很好的完成，那前面的80％可以做得很精致，最大程度的满足实际需求。这个世界上不存在完美，只有最好，80％的绝对成功已经是一个Not bad的结果了。&lt;br /&gt;&lt;a href="http://t.sina.com.cn/n/北京的201个蓝天"&gt;@北京的201个蓝天&lt;/a&gt;&lt;br /&gt;&lt;blockquote&gt;关键你需求必须是业务导向，否则80%等需求如果没有商业价值也无法被用户接受，另外需要配合CI, 自动构建很测试保证完成等需求经过及时等测试。&amp;nbsp;&amp;nbsp;&lt;/blockquote&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Sprint的开始评审，确定我们将要进展的，正是实际所需要的。跟目标画一条直线，前进！ 有时候backlog也有分析错误的时候，不过没关系，反正是一个小sprint，即便是路线错误了，也只是很小部分的成本代价（相对于传统模式），风险和可能出现的错误成本输出降到最低&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Team成员的Task自选，发挥每个人的主观能动性，调动积极性，人们乐于做他们喜欢的事情，并且会把它做的很好，这里面略微带了点Opensource人里的那种荣誉感，&amp;ldquo;看，我能做到这么Cool东东&amp;rdquo; 兴趣是成功的一个重要因素。&lt;br /&gt;&lt;a href="http://t.sina.com.cn/n/北京的201个蓝天9"&gt;@北京的201个蓝天&lt;/a&gt;&lt;br /&gt;&lt;blockquote&gt;这里还有一个承诺等问题，自选任务意味着主动承担责任，可以对开发人员产生良性等压力，保证任务按时按质量万成&amp;nbsp;&amp;nbsp;&lt;/blockquote&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;每天早上的15分钟会议，最好的发现问题，了解进度的方式，Team之间的沟通本该是N对N的网状模型，而不应是拓扑模型。你能找到比网状模型更好的沟通方式吗？&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;ldquo;闪光弹&amp;rdquo;激励机制，传统模式在项目初期通常会纠集一小撮人做一个portal开发，借此完成需求的某个小模块、并做技术验证等等，有点类似先遣队、侦察兵之类的角色。&amp;ldquo;闪光弹&amp;rdquo;跟这个有点类似，不过也有不同的一点&amp;ldquo;我们没有后备军&amp;rdquo;，如同霍去病率八百精锐骑兵追击匈奴，每个人都发挥着以一敌百的作用。&lt;br /&gt;Sprint回顾，总结错误教训、批评与自我批评，常犯错误的相互周知。 你在同一个地方跌倒100次，和另外一个人在不同的地方跌倒50次。即便你的100次比那50次多，就能说明你很有经验吗？ 你会在101次跌倒在同样的地方。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-3585468063717803154?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/3585468063717803154/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=3585468063717803154&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3585468063717803154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3585468063717803154'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/07/scrum-sprint1.html' title='Scrum Sprint1结束'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-1149419888267007112</id><published>2010-06-30T20:53:00.000-07:00</published><updated>2010-12-10T20:54:20.741-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Google'/><title type='text'>Google Wave Commands Cheat Sheet</title><content type='html'>&lt;span style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 17px; font-size: 12px;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Google Wave Command Cheat Sheet&lt;br /&gt;&lt;br /&gt;Search Cheat Sheet&lt;br /&gt;This is a quick guide to the operators and restricts supported by wave search.&lt;br /&gt;Keywords&lt;br /&gt;about:[keyword] &amp;mdash; finds waves which have [keyword] occurring anywhere. Same as [keyword].&lt;br /&gt;title:[keyword] &amp;mdash; finds waves which have [keyword] in the title.&lt;br /&gt;caption:[keyword] &amp;mdash; finds waves which have an attachment where [keyword] occurs in the caption.&lt;br /&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&lt;br /&gt;Status&lt;br /&gt;is:read &amp;mdash; finds all read waves.&lt;br /&gt;is:unread &amp;mdash; finds all unread waves.&lt;br /&gt;Note: you cannot currently do a search like &amp;ldquo;-is:read&amp;rdquo; by itself and get reliable results due to an outstanding restriction on megastore queries&lt;br /&gt;is:mute &amp;mdash; finds all muted waves.&lt;br /&gt;is:unmute &amp;mdash; finds all waves not muted&lt;br /&gt;is:active &amp;mdash; currently the same as is:unread.&lt;br /&gt;is:note &amp;mdash; finds all waves which have you as the only participant and contributor&lt;br /&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&lt;br /&gt;Participants&lt;br /&gt;from:[address] &amp;mdash; finds waves from the participant identified by the address. Special case of from:me identifying waves from yourself.&lt;br /&gt;by:[address] &amp;mdash; same as from:[address].&lt;br /&gt;to:[address] &amp;mdash; find waves which are a dialogue between you and the participant identified by the address.&lt;br /&gt;with:[address] &amp;mdash; find waves that have the participant identified by the given address explicitly listed.&lt;br /&gt;owner:[address] &amp;mdash; find waves by person, that they created.&lt;br /&gt;only:[address] &amp;mdash; finds waves to which only the participant specified by the given address contributed.&lt;br /&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&lt;br /&gt;Date Search&lt;br /&gt;Currently, there are a few restricts:&lt;br /&gt;past:[date term] &amp;mdash; finds all waves in the last period.&lt;br /&gt;previous:[date term] &amp;mdash; finds all waves in the period before the last period.&lt;br /&gt;before:[date term] &amp;mdash; finds all waves before a certain period.&lt;br /&gt;after:[date term] &amp;mdash; finds all waves after a certain period.&lt;br /&gt;which can be combined with date terms:&lt;br /&gt;day&lt;br /&gt;week&lt;br /&gt;month&lt;br /&gt;year&lt;br /&gt;So you can have past:week, past:year. There is also support for&lt;br /&gt;past:N[date term] where N &amp;gt; 0. So you can have past:3days (today, yesterday, the day before yesterday).&lt;br /&gt;Also you can have&lt;br /&gt;past:Ndays&lt;br /&gt;past:Nweeks&lt;br /&gt;past:Nmonths&lt;br /&gt;past:Nyears&lt;br /&gt;Finally, you can abbreviate days, weeks, months and years to a single letter (d, w, m, y). Thus you can write&lt;br /&gt;past:3d&lt;br /&gt;past:2w&lt;br /&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&lt;br /&gt;Folders&lt;br /&gt;in:[folder name] &amp;mdash; find waves in the folder with the given name. For example, in:inbox.&lt;br /&gt;in:[search name] &amp;mdash; find waves in the saved search with the given name.&lt;br /&gt;is:unfiled &amp;mdash; find waves which have not been moved to a user folder.&lt;br /&gt;is:filed &amp;mdash; find waves which belong to some user folder.&lt;br /&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&lt;br /&gt;Attachments&lt;br /&gt;has:attachment &amp;mdash; finds waves with an attachment. This changed from &amp;ldquo;is:image&amp;rdquo;.&lt;br /&gt;has:document &amp;mdash; finds waves with an attachment which is a document. (coming soon)&lt;br /&gt;has:image &amp;mdash; finds waves with an attachments which is an image. (coming soon)&lt;br /&gt;caption:[keyword] &amp;mdash; finds waves with an attachment with caption containing [keyword].&lt;br /&gt;filename:[keyword] &amp;mdash; finds waves with an attachment with filename containing [keyword]. (coming soon)&lt;br /&gt;mimetype:[keyword] &amp;mdash; finds waves with an attachment with mimetype containing [keyword]. (coming soon)&lt;br /&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&lt;br /&gt;Tags&lt;br /&gt;tag:[tag name] &amp;mdash; finds waves with the tag [tag name].&lt;br /&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&lt;br /&gt;Gadgets&lt;br /&gt;has:gadget &amp;mdash; finds waves which contain a gadget.&lt;br /&gt;gadget:[keyword] &amp;mdash; finds waves which contain a gadget with name containing keywords. e.g. chess, fridge, map, risk, sokoban.&lt;br /&gt;gadgeturl:[keyword] &amp;mdash; finds waves which contain a gadget with urls containing keyword.&lt;br /&gt;gadgettitle:[keyword] &amp;mdash; finds waves which contain a gadget with a title containing keywords.&lt;br /&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&lt;br /&gt;Expressions&lt;br /&gt;foo &amp;amp; bar &amp;mdash; match waves with foo and bar.&lt;br /&gt;You can use AND, or skip the operator altogether, as the logical and is the default.&lt;br /&gt;foo | bar &amp;mdash; match waves with foo or bar (or both).&lt;br /&gt;foo OR bar &amp;mdash; match waves with foo or bar (or both).&lt;br /&gt;-foo &amp;mdash; match waves that do not contain foo. (There is an outstanding bug that causes searches with only negative terms to fail. To get around it, use to:me -foo)&lt;br /&gt;&amp;ldquo;foo &amp;hellip; bar&amp;rdquo; &amp;mdash; matches waves that contain the exact phrase &amp;ldquo;foo &amp;hellip; bar&amp;rdquo; (There is an outstanding bug for live search not working with phrases)&lt;br /&gt;foo &amp;amp; (bar | -baz) &amp;mdash; matches waves that contain foo and either bar or do not contain baz.&lt;br /&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&lt;br /&gt;Phrases&lt;br /&gt;&amp;ldquo;[multiple terms]&amp;rdquo; &amp;mdash; match waves with one or more terms in sequence:&lt;br /&gt;&amp;ldquo;hot dog&amp;rdquo; catches waves with the terms hot and dog in sequence. This is also required for other operators such as in:&amp;rdquo;new inbox&amp;rdquo; where say &amp;ldquo;new inbox&amp;rdquo; is a saved search.&lt;br /&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&lt;br /&gt;XML Search&lt;br /&gt;tags:subtag &amp;mdash; find all waves which have this combination.&lt;br /&gt;tag:[tag] &amp;mdash; find all waves which have this .&lt;br /&gt;attribute:[value keyword] &amp;mdash; finds all waves which have &amp;lt; &amp;hellip;. attribute=value &amp;hellip;&amp;gt; where keyword is a token in value.&lt;br /&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&lt;br /&gt;Wave ID&lt;br /&gt;id:&amp;rdquo;&amp;rdquo; &amp;mdash; find a wave with a specific wave id.&lt;br /&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&lt;br /&gt;Zero Inbox&lt;br /&gt;If you want to zero inbox, you can hack this temporarily by saving a search &amp;ldquo;my inbox&amp;rdquo; with the query:&lt;br /&gt;in:inbox is:unread this:week. You can then use the menu option &amp;ldquo;Mark as read&amp;rdquo; in the wave panel.&lt;br /&gt;Alternative zero inbox: in:inbox is:unread past:7days -is:mail&lt;br /&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&lt;br /&gt;Saved Searches&lt;br /&gt;A search can be saved using one of two methods:&lt;br /&gt;Create a search in the search box and then press the Save search button at the bottom of the Digest panel.&lt;br /&gt;Add a search using the searches Add button on the Navigation panel. Then add the search query and name of the search in the Saved Search popup panel.&lt;br /&gt;Saved searches can be edited and managed using the pop-up menu which shows when hovering over the saved search in the searches section of the Navigation panel.&lt;br /&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&lt;br /&gt;Filters&lt;br /&gt;Filters are saved searches which also have an action to apply to all waves which match the saved search. The actions supported are&lt;br /&gt;skip inbox &amp;ndash; removes the wave from inbox. Whilst this wave continues to match the search, it will continue to stay out of the inbox. Skip inbox will shortly be renamed archive.&lt;br /&gt;mark as read &amp;ndash; Whilst the wave continues to match the search, it will be marked as read.&lt;br /&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&lt;br /&gt;Folders&lt;br /&gt;You can add a folder by using the Add button on the folders section of the Navigation panel. A folder is added by typing the folder name in the text box given and hitting enter.&lt;br /&gt;Folders can be managed using the pop-up menu that shows when hovering over the folder on the Navigation panel.&lt;br /&gt;Add folder &amp;ndash; A subfolder can be added under the current folder.&lt;br /&gt;Rename &amp;ndash; rename the current folder.&lt;br /&gt;Delete &amp;ndash; delete the current folder.&lt;br /&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-1149419888267007112?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/1149419888267007112/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=1149419888267007112&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1149419888267007112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1149419888267007112'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/06/google-wave-commands-cheat-sheet.html' title='Google Wave Commands Cheat Sheet'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-8350331225425605532</id><published>2010-06-27T20:54:00.000-07:00</published><updated>2010-12-13T04:05:31.150-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>How To Install Django On Debian</title><content type='html'>FROM: &lt;a href="http://www.howtoforge.com/installing-django-on-debian-etch-apache2-mod_python"&gt;http://www.howtoforge.com/installing-django-on-debian-etch-apache2-mod_python&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This tutorial explains how to install &lt;a href="http://www.djangoproject.com/"&gt;Django&lt;/a&gt; on a Debian Etch server. Django is a web framework that allows to develop Python web applications quickly with as much automation as possible. I will use it with Apache2 and mod_python in this guide.&lt;br /&gt;&lt;br /&gt;This howto is meant as a practical guide; it does not cover the theoretical backgrounds. They are treated in a lot of other documents in the web.&lt;br /&gt;&lt;br /&gt;This document comes without warranty of any kind! I want to say that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!&lt;br /&gt;&lt;strong&gt;1 Install MySQL&lt;/strong&gt;&lt;br /&gt;Django can use multiple database backends, e.g. PostgreSQL, MySQL, SQLite, etc. If you want to use MySQL, you can install it as follows:&lt;br /&gt;&lt;blockquote&gt;apt-get install mysql-server mysql-client&lt;/blockquote&gt;We want MySQL to listen on all interfaces, not just localhost, therefore we edit /etc/mysql/my.cnf and comment out the line bind-address = 127.0.0.1:&lt;br /&gt;&lt;blockquote&gt;vi /etc/mysql/my.cnf&lt;/blockquote&gt;&lt;blockquote&gt;[...]&lt;br /&gt;# Instead of skip-networking the default is now to listen only on&lt;br /&gt;# localhost which is more compatible and is not less secure.&lt;br /&gt;#bind-address           = 127.0.0.1&lt;br /&gt;[...]&lt;/blockquote&gt;Then we restart MySQL:&lt;br /&gt;&lt;blockquote&gt;/etc/init.d/mysql restart&lt;/blockquote&gt;Now check that networking is enabled. Run&lt;br /&gt;&lt;blockquote&gt;netstat -tap | grep mysql&lt;/blockquote&gt;The output should look like this:&lt;br /&gt;&lt;blockquote&gt;server1:~# netstat -tap | grep mysql&lt;br /&gt;tcp        0      0 *:mysql                 *:*                     LISTEN     3085/mysqld&lt;br /&gt;server1:~#&lt;/blockquote&gt;Run&lt;br /&gt;&lt;blockquote&gt;mysqladmin -u root password yourrootsqlpassword&lt;br /&gt;mysqladmin -h server1.example.com -u root password yourrootsqlpassword&lt;/blockquote&gt;to set a password for the user root (otherwise anybody can access your MySQL database!).&lt;br /&gt;&lt;strong&gt;2 Install Apache And mod_python&lt;/strong&gt;&lt;br /&gt;If Apache2 and mod_python aren't already installed on your system, you can install them as follows:&lt;br /&gt;&lt;blockquote&gt;apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-python&lt;/blockquote&gt;&lt;strong&gt;3 Install Django&lt;/strong&gt;&lt;br /&gt;In order to install Django and the Python MySQL bindings, we run:&lt;br /&gt;&lt;blockquote&gt;apt-get install python-django python-mysqldb&lt;/blockquote&gt;&lt;strong&gt;4 Configure Apache&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I will use /var/www here as the document root of my virtual host and /etc/apache2/sites-available/default as the file containing the configuration of my virtual host. Adjust this to your circumstances.&lt;br /&gt;&lt;br /&gt;Before we configure Apache, we must create a Django project (e.g. called mysite) (see http://www.djangoproject.com/documentation/tutorial01/). For security reasons I create that project outside my document root /var/www (e.g. in /home/mycode):&lt;br /&gt;&lt;blockquote&gt;mkdir /home/mycode&lt;br /&gt;cd /home/mycode&lt;br /&gt;/usr/share/python-support/python-django/django/bin/django-admin.py startproject mysite&lt;/blockquote&gt;This will create the directory /home/mycode/mysite with some Python files in it.&lt;br /&gt;Now with the project mysite created, we can configure Apache. I open my vhost configuration in /etc/apache2/sites-available/default and place the following lines between the ... container:&lt;br /&gt;&lt;blockquote&gt;vi /etc/apache2/sites-available/default&lt;/blockquote&gt;&lt;blockquote&gt;[...]&lt;br /&gt;&amp;lt;Location "/mysite"&amp;gt;&lt;br /&gt;SetHandler python-program&lt;br /&gt;PythonHandler django.core.handlers.modpython&lt;br /&gt;SetEnv DJANGO_SETTINGS_MODULE mysite.settings&lt;br /&gt;PythonDebug On&lt;br /&gt;PythonPath "['/home/mycode'] + sys.path"&lt;br /&gt;&amp;lt;/Location&amp;gt;&lt;br /&gt;[...]&lt;/blockquote&gt;The path in the first line () refers to the URL - meaning this configuration will be used if you use /mysite in the URL (e.g. http://www.example.com/mysite). You can change this to your likings. Please adjust the other values (SetEnv DJANGO_SETTINGS_MODULE mysite.settings and PythonPath "['/home/mycode'] + sys.path") to the name of your project and the path where it is located.&lt;br /&gt;&lt;br /&gt;Restart Apache afterwards:&lt;br /&gt;&lt;blockquote&gt;/etc/init.d/apache2 restart&lt;/blockquote&gt;Now you can access http://www.example.com/mysite in a browser. If everything went well, you should see something like this:&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/6850998a3ba5/0xtn96ie.png" alt="" /&gt;&lt;br /&gt;This means Django has been successfully installed, and you can now use it to develop your Python web applications (please refer to http://www.djangoproject.com/documentation/ to learn how to develop web applications with Django).&lt;br /&gt;&lt;strong&gt;5 Connect To A MySQL Database From A Django Project&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;If you want to use a MySQL database in your Django project, you should first create that database (e.g. mysite) and a database user (e.g. mysiteadmin) for that database:&lt;br /&gt;&lt;blockquote&gt;mysql -u root -p&lt;br /&gt;CREATE DATABASE mysite;&lt;br /&gt;GRANT ALL ON mysite.* TO 'mysiteadmin'@'localhost' IDENTIFIED BY 'mysiteadmin_password';&lt;br /&gt;GRANT ALL ON mysite.* TO 'mysiteadmin'@'localhost.localdomain' IDENTIFIED BY 'mysiteadmin_password';&lt;br /&gt;FLUSH PRIVILEGES;&lt;br /&gt;quit;&lt;/blockquote&gt;Then open the settings.py file in the project folder (e.g. /home/mycode/mysite) and modify the database settings, e.g. as follows:&lt;br /&gt;&lt;blockquote&gt;vi /home/mycode/mysite/settings.py&lt;/blockquote&gt;&lt;blockquote&gt;[...]&lt;br /&gt;DATABASE_ENGINE = 'mysql'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.&lt;br /&gt;DATABASE_NAME = 'mysite'             # Or path to database file if using sqlite3.&lt;br /&gt;DATABASE_USER = 'mysiteadmin'             # Not used with sqlite3.&lt;br /&gt;DATABASE_PASSWORD = 'mysiteadmin_password'         # Not used with sqlite3.&lt;br /&gt;DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.&lt;br /&gt;DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.&lt;br /&gt;[...]&lt;/blockquote&gt;&lt;strong&gt;6 Links&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;* Django: &lt;a href="http://www.djangoproject.com"&gt;http://www.djangoproject.com&lt;/a&gt;&lt;br /&gt;* Python: &lt;a href="http://www.python.org"&gt;http://www.python.org&lt;/a&gt;&lt;br /&gt;* Debian: &lt;a href="http://www.debian.org"&gt;http://www.debian.org&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-8350331225425605532?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/8350331225425605532/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=8350331225425605532&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8350331225425605532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8350331225425605532'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/06/how-to-install-django-on-debian.html' title='How To Install Django On Debian'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-1242068922679968107</id><published>2010-06-15T20:55:00.000-07:00</published><updated>2010-12-13T04:04:36.153-08:00</updated><title type='text'>TODO</title><content type='html'>GuideLine(Word)&lt;br /&gt;--&amp;gt; Outer Design(Excel) Module/Basic UI/DB&lt;br /&gt;--&amp;gt; Inner Design(Excel) Understand/Module Implement Detail/CRUD Grid/Portal&lt;br /&gt;--&amp;gt; Program Design (Excel) MID Review/Class/M -&amp;gt; UT -&amp;gt; Coverage -&amp;gt; Bug analysis -&amp;gt; SI plan&lt;br /&gt;--&amp;gt; SI (Excel) Test data/script/Screenshot&lt;br /&gt;--&amp;gt; PT&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;XML闲言碎语&lt;/strong&gt;&lt;br /&gt;1.XML&lt;br /&gt;&lt;br /&gt;2.iBatis XQuery&lt;br /&gt;CRUD / Order / Join / Group&lt;br /&gt;SQL Optimized&lt;br /&gt;&lt;br /&gt;3.Marklogic Sample&lt;br /&gt;xcc.jar&lt;br /&gt;oxm.jar  XML &amp;amp;  POJO/UI&lt;br /&gt;&lt;br /&gt;4.XML/JSON Compare. The suit is the best.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Tool &amp;amp; Rule&lt;/strong&gt;&lt;br /&gt;UI  JTag/Flex/Maskat/jQuery/Imart JS framework&lt;br /&gt;Blogic  Action(for Web/RICH/Batch/.Net)&lt;br /&gt;DAO  iBatis/QueryRunner/Cabinet&lt;br /&gt;DB  Oracle/Postgrel&lt;br /&gt;&lt;br /&gt;Tools: CheckStyle/dJunit/PMD/&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Doc&lt;/strong&gt;&lt;br /&gt;软件开发过程中，文档的重要性。从需求、设计、制造、测试、计划、质量追踪等各个阶段都用，这也是重要的证据。&lt;br /&gt;有人说京剧是中国的国粹（个人觉得这真TMD的扯淡）&lt;br /&gt;而Excel是日本人的国粹。&lt;br /&gt;A、需求阶段&lt;br /&gt;PPT/PDF概要展示，用于思路展示/问题讨论/技术培训&lt;br /&gt;Word 功能定义，记录永久性归档内容，最终将形成纸张&lt;br /&gt;&lt;br /&gt;B、基本设计（外部设计）&lt;br /&gt;Word/Excel 系统结构、模块设计分析，包含数据定义、模块设计、流程设计&lt;br /&gt;&lt;br /&gt;C、详细设计1&lt;br /&gt;Excel （模块详细设计、数据库设计）&lt;br /&gt;D、详细设计2&lt;br /&gt;Excel （内部评审、设计组开发组Review、规模估算）&lt;br /&gt;&lt;br /&gt;E、PD/M/UT&lt;br /&gt;设计组 CRUD分析，SI文档&lt;br /&gt;制造组 Excel/SQL -&amp;gt; Code() -&amp;gt; UT -&amp;gt; Bug记录/软件质量分析/开发能力分析&lt;br /&gt;&lt;br /&gt;F、SI测试&lt;br /&gt;SI环境启用&lt;br /&gt;SI文档-&amp;gt;测试脚本-政绩&lt;br /&gt;&lt;br /&gt;G、PT上线试运行 有问题Rollback&lt;br /&gt;&lt;br /&gt;穿插其中的&lt;br /&gt;wiki 异地问题讨论，具有可追溯性，证据&lt;br /&gt;email 邮件组，周知事项资料，资料加密，OA协同，证据，会议安排&lt;br /&gt;quality CheckStyle/dJunit/PMD/BTS(PMWD)质量--&amp;gt;souce量/UT量/bug数 原因分析&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Platform Transfer&lt;/strong&gt;&lt;br /&gt;Platform1: CtrlObject/Service --&amp;gt; Event/Listener --&amp;gt; DAO --&amp;gt; DB&lt;br /&gt;Platform2: Struts/Spring/iBatis&lt;br /&gt;&lt;br /&gt;1. UI --&amp;gt; JTag(label/select/codelist/submit/link) --&amp;gt; Common / Paging(PagingCondition)&lt;br /&gt;2. Blogic --&amp;gt; BlogicAction(log/transaction) extends Action&lt;br /&gt;3. DAO/Multi data source (in BlogicAction/PagingBlogicAction)&lt;br /&gt;4. Cache Message&lt;br /&gt;5. Grid / EJB &amp;lt;---&amp;gt; Blogic&lt;br /&gt;6. Logger&lt;br /&gt;7. RequestProcessorTX&lt;br /&gt;8. Exception&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-1242068922679968107?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/1242068922679968107/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=1242068922679968107&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1242068922679968107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1242068922679968107'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/06/todo.html' title='TODO'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-7426657878932022286</id><published>2010-06-14T20:56:00.000-07:00</published><updated>2010-12-13T04:07:20.242-08:00</updated><title type='text'>HL7-API剖析</title><content type='html'>&lt;strong&gt;Architecture&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/710539793663/mpv9w766.jpg" alt="" /&gt;&lt;br /&gt;&lt;strong&gt; ca.uhn.hl7v2.app.HL7Service&lt;/strong&gt;&lt;br /&gt;An HL7 service.&lt;br /&gt;Accepts incoming TCP/IP connections and creates Connection objects.&lt;br /&gt;Uses a single MessageTypeRouter object (for all Connections) to define the Applications to which message are sent.&lt;br /&gt;To configure, use registerApplication() or loadApplicationsFromFile().&lt;br /&gt;A separate thread looks for Connections that have been closed (locally or remotely) and discards them.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ca.uhn.hl7v2.app.Connection&lt;/strong&gt;&lt;br /&gt;A TCP/IP connection to a remote HL7 server&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ca.uhn.hl7v2.app.ConnectionListener&lt;/strong&gt;&lt;br /&gt;An object that wants to be notified of new remote connections.&lt;br /&gt;ConnectionListeners can be registered with an HL7Service in order to receive these notifications.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ca.uhn.hl7v2.parser.Parser&lt;/strong&gt;&lt;br /&gt;Parses HL7 message Strings into HL7 Message objects and encodes HL7 Message objects into HL7 message Strings.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ca.uhn.hl7v2.app.Receiver&lt;/strong&gt;&lt;br /&gt;Listens for incoming messages on a certain input stream, and sends them to the appropriate location.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ca.uhn.hl7v2.app.Responder&lt;/strong&gt;&lt;br /&gt;Performs the responding role in a message exchange (i.e receiver of the first message, sender of the response; analagous to the server in a client-server interaction), according to HL7's original mode&lt;br /&gt;processing rules.&lt;br /&gt;At the time of writing, enhanced mode, two-phase reply, continuation messages, and batch processing are unsupported.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ca.uhn.hl7v2.app.MessageTypeRouter&lt;/strong&gt;&lt;br /&gt;Routes messages to various Applications based on message type and trigger event.&lt;br /&gt;The router is told which Application to which to route various messages by calling the method registerApplication(...).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ca.uhn.hl7v2.llp.LowerLayerProtocol&lt;/strong&gt;&lt;br /&gt;Represents a particular "lower layer protocol" over which HL7 messages can be sent.&lt;br /&gt;An example is the "minimal lower layer protocol" defines in the HL7 implementation guide (appendix C) - this is implemented by the class MinLowerLayerProtocol.&lt;br /&gt;Implementations should call the static method logCharacterReceived() when a character is read from a remote system. This method may or may not log receipt, as configured (see docs for this method).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ca.uhn.hl7v2.app.Application&lt;/strong&gt;&lt;br /&gt;From an HL7 messaging perspective, an Application is a consumer of a messages.&lt;br /&gt;Once a parser parses an incoming message, the message would normally be forwarded to an Application of some sort (e.g. a lab system) which would process the message in some way meaningful&lt;br /&gt;for it, and then return a response.&lt;br /&gt;If you are wondering how to integrate HAPI into an existing server application, this is probably the place. Create a class that implements Application, then look at Responder and SimpleServer to see&lt;br /&gt;how to get HAPI to listen for messages on a socket and pass them to your Application.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Simple Server&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/3302597a84f6/6lvh2u3d.jpg" alt="" /&gt;&lt;br /&gt;An HL7 service.&lt;br /&gt;Accepts incoming TCP/IP connections and creates Connection objects.&lt;br /&gt;Uses a single MessageTypeRouter object (for all Connections) to define the Applications to which message are sent.&lt;br /&gt;To configure, use registerApplication() or loadApplicationsFromFile().&lt;br /&gt;A separate thread looks for Connections that have been closed (locally or remotely) and discards them.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Connection&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/8022397a84f7/hkqfpntj.jpg" alt="" /&gt;&lt;br /&gt;A TCP/IP connection to a remote HL7 server&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Parser&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/4347197a84f7/ndp47cne.jpg" alt="" /&gt;&lt;br /&gt;&lt;strong&gt; ca.uhn.hl7v2.parser.Parser&lt;/strong&gt;&lt;br /&gt;Parses HL7 message Strings into HL7 Message objects and encodes HL7 Message objects into HL7 message Strings.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ca.uhn.hl7v2.parser.ModelClassFactory&lt;/strong&gt;&lt;br /&gt;Looks up classes for message model components (e.g. concrete implementations of Message, Group, Segment). A custom factory can be used to point to custom model components.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ca.uhn.hl7v2.validation.ValidationContext&lt;/strong&gt;&lt;br /&gt;A set of rules for message validation&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ca.uhn.hl7v2.validation.MessageValidator&lt;/strong&gt;&lt;br /&gt;Validation utilities for parsed and encoded messages.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-7426657878932022286?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/7426657878932022286/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=7426657878932022286&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7426657878932022286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7426657878932022286'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/06/hl7-api.html' title='HL7-API剖析'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-8423699627855583627</id><published>2010-06-07T20:57:00.000-07:00</published><updated>2010-12-10T20:57:36.556-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>2010二环第一季</title><content type='html'>话说，前天晚上打游戏到凌晨4点，12点接到王老大的电话，谈谈人生，谈谈理想。如此，不吃不喝，宅着耗到下午5点。洗个澡，冲到迪亚天天买了包牛肉冲上120，于18:30分左右抵达建国门。诸同学已准备就绪，都背着小包！好温暖~&lt;br /&gt;&lt;br /&gt;就这样，故事发生了。&lt;br /&gt;走啊走啊走啊走啊走啊走啊~~&lt;br /&gt;天，越走天越黑；尾气，也越来越少；肚子，越走越饿~~(╯﹏╰)b&lt;br /&gt;话说这二环大老远找不到一家卖食品或者卖水的小店，一丁点都不繁华。&lt;br /&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/000379706cde/medium.jpg" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;直到华灯初上，直到永定门天空上一排排挂着闪闪红灯的风筝在飘；与其说那像灰机，还不如说城市人对星空的憧憬。&lt;br /&gt;我有个同学，小时候对星空十分的痴迷，以至于凡是有关于宇宙的资料片、科普片必搜必看。&lt;br /&gt;前几天他高高兴兴的买了看星星的大桶，可高兴了。&lt;br /&gt;可没过几天，他QQ签名变了：北京的夜晚没有星星。&lt;br /&gt;这莫大的悲剧哇&lt;br /&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/645429705839/medium.jpg" border="0" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;之后天黑了，不记得有什么印象深刻的了，唯有永定门旁一个地下通道睡了很多无家可归的老人。&lt;br /&gt;这让我很不解，代表最先进思想最先进生产力的社会主义的国家的帝都的心腹之地，却出现这一幕，让马克思、列宁情何以堪，情何以堪！&lt;br /&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/10419970583c/medium.jpg" border="0" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;终于，开饭了，22点27分，我的早饭，我需要麦芽糖、葡萄糖。之后，卢小卢出现、消失一姑娘、出现一新姑娘==》 team.count++&lt;br /&gt;&lt;br /&gt;之后，在各种监视器的强势围观下，横过马路并穿越几个护栏，路边有很多月季，花开正艳，让人爱不释手。还有树上那一个个纸做的菱形物&lt;br /&gt;&lt;br /&gt;到西直门做了很长时间的休整，橘黄的灯光，温暖的让人困意十足。&lt;br /&gt;一路向东，过中轴线，躺在德胜门路边一片小树林里的凉凉的水泥地上，小小的冷风吹过，another deep image~&lt;br /&gt;&lt;br /&gt;东直门，天蒙蒙发亮，黏糊糊的树、黏糊糊的地。&lt;br /&gt;&lt;br /&gt;小朋友排排坐，安静下来了，心情、意识、冲动，小卢音响里传来《我想有个家》，凄婉而又真实。想起鬼哥的2010虎年备忘录了&lt;br /&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/48022970582e/medium.jpg" border="0" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;之后脱离队伍，向三元桥方向进发，一路上手机gprs抽风，最后赌一把，凭感觉走回来。&lt;br /&gt;&lt;br /&gt;6月6日凌晨4:40分左右给蜗牛发了条短信"达"，之后，爬上了我那久违的床~&lt;br /&gt;&lt;br /&gt;另， 6月是一个事件多发的月份：儿童节、某21周年（freemoren@twitter做了历史模拟直播）、某校90th校庆、高考、某中堂到南方的一个海边开始写日记、当然还有此次暴走..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-8423699627855583627?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/8423699627855583627/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=8423699627855583627&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8423699627855583627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8423699627855583627'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/06/2010.html' title='2010二环第一季'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-5359121923569259179</id><published>2010-06-01T20:57:00.000-07:00</published><updated>2010-12-10T20:58:09.918-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='数据库'/><title type='text'>SQL备忘录</title><content type='html'>SQL 全名是结构化&lt;span style="color: #ff0000;"&gt;『查询语言』&amp;larr;_&amp;larr;&lt;/span&gt;（Structured Query Language）&lt;br /&gt;&lt;strong&gt;真相&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/92676969e93c/g7jcdu0r.png" alt="" /&gt;&lt;br /&gt;ps：同学们，拜托，不要再把性别写成sex了&lt;br /&gt;&lt;pre class="brush: sql;fontsize: 100; first-line: 1; "&gt;-- -----------------------------------------------------&lt;br /&gt;-- Table `student`&lt;br /&gt;-- -----------------------------------------------------&lt;br /&gt;DROP TABLE IF EXISTS `student` ;&lt;br /&gt;&lt;br /&gt;CREATE  TABLE IF NOT EXISTS `student` (&lt;br /&gt;  `sid` VARCHAR(6) NOT NULL ,&lt;br /&gt;  `sname` VARCHAR(8) NOT NULL ,&lt;br /&gt;  `age` SMALLINT UNSIGNED NOT NULL ,&lt;br /&gt;  `gender` CHAR(1) NOT NULL ,&lt;br /&gt;  PRIMARY KEY (`sid`) )&lt;br /&gt;ENGINE = InnoDB;&lt;br /&gt;&lt;br /&gt;-- -----------------------------------------------------&lt;br /&gt;-- Table `course`&lt;br /&gt;-- -----------------------------------------------------&lt;br /&gt;DROP TABLE IF EXISTS `course` ;&lt;br /&gt;&lt;br /&gt;CREATE  TABLE IF NOT EXISTS `course` (&lt;br /&gt;  `cid` VARCHAR(6) NOT NULL ,&lt;br /&gt;  `cname` VARCHAR(45) NOT NULL ,&lt;br /&gt;  `teacher` VARCHAR(8) NOT NULL ,&lt;br /&gt;  PRIMARY KEY (`cid`) )&lt;br /&gt;ENGINE = InnoDB;&lt;br /&gt;&lt;br /&gt;-- -----------------------------------------------------&lt;br /&gt;-- Table `sc`&lt;br /&gt;-- -----------------------------------------------------&lt;br /&gt;DROP TABLE IF EXISTS `sc` ;&lt;br /&gt;&lt;br /&gt;CREATE  TABLE IF NOT EXISTS `sc` (&lt;br /&gt;  `sid` VARCHAR(6) NOT NULL ,&lt;br /&gt;  `cid` VARCHAR(6) NOT NULL ,&lt;br /&gt;  `grade` SMALLINT UNSIGNED ZEROFILL NULL ,&lt;br /&gt;  PRIMARY KEY (`sid`, `cid`) ,&lt;br /&gt;  CONSTRAINT `fk_sid`&lt;br /&gt;    FOREIGN KEY (`sid` )&lt;br /&gt;    REFERENCES `mydb`.`student` (`sid` )&lt;br /&gt;    ON DELETE NO ACTION&lt;br /&gt;    ON UPDATE NO ACTION,&lt;br /&gt;  CONSTRAINT `fk_cid`&lt;br /&gt;    FOREIGN KEY (`cid` )&lt;br /&gt;    REFERENCES `mydb`.`course` (`cid` )&lt;br /&gt;    ON DELETE NO ACTION&lt;br /&gt;    ON UPDATE NO ACTION)&lt;br /&gt;ENGINE = InnoDB;&lt;br /&gt;&lt;br /&gt;CREATE INDEX `fk_sid` ON `sc` (`sid` ASC) ;&lt;br /&gt;CREATE INDEX `fk_cid` ON `sc` (`cid` ASC) ;&lt;/pre&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;关系代数五个基本操作&lt;/strong&gt;&lt;br /&gt;并&amp;mdash;&amp;mdash;R&amp;cup;S ={t|t&amp;isin;R&amp;or;t&amp;isin;S}，t是元组变量，R和S的元数相同&lt;br /&gt;差&amp;mdash;&amp;mdash;R-S ={t|t&amp;isin;R&amp;and;t!&amp;isin;S}，R和S的元数相同&lt;br /&gt;笛卡尔积&amp;mdash;&amp;mdash;RxS{t|t=〈t^r, t^s〉&amp;and; t^r&amp;isin;R &amp;and; t^s&amp;isin;S}&lt;br /&gt;投影&amp;mdash;&amp;mdash;&amp;pi;1...n(R)={t|t=〈t1...m〉&amp;and;〈t1...k〉&amp;isin;R}&lt;br /&gt;选择&amp;mdash;&amp;mdash;&amp;sigma;F(R)={t|t&amp;isin;R&amp;and;F(t)=true}&lt;br /&gt;&lt;strong&gt;关系代数四个组合操作&lt;/strong&gt;&lt;br /&gt;交（Intersection）&lt;br /&gt;连接（Join）&lt;br /&gt;自然连接（Natural Join）&lt;br /&gt;除法（Division）&lt;br /&gt;&lt;strong&gt;关系代数七个扩充操作&lt;/strong&gt;&lt;br /&gt;改名&lt;br /&gt;广义投影&lt;br /&gt;赋值&lt;br /&gt;外部并&lt;br /&gt;半连接&lt;br /&gt;聚集操作&lt;br /&gt;&lt;strong&gt;SELECT&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;SELECT [ ALL|DISTINCT ] 目标表的列名或列表达式序列|* AS 别名&lt;br /&gt;FROM 基本表名和（或）视图序列&lt;br /&gt;[ WHERE 行条件表达式 ]&lt;br /&gt;[ GROUP BY 列名序列&lt;br /&gt;    [ HAVING 组条件表达式 ]]&lt;br /&gt;[ ORDER BY 列名[ ASC|DESC ], ... ]&lt;/pre&gt;&lt;ol&gt; &lt;li&gt;读取FROM子句中基本表、视图的数据，执行笛卡尔积操作&lt;/li&gt; &lt;li&gt;选取满足WHERE子句中给出的条件表达式的元组&lt;/li&gt; &lt;li&gt;按GROUP子句中指定列的值分组，同时提取满足HAVING子句中租条件表达式的那些组&lt;/li&gt; &lt;li&gt;按SELECT子句中给出的列名或列表表达式求值输出&lt;/li&gt; &lt;li&gt;ORDER子句对输出的目标表进行排序，按附加说明ASC升序排列，或按DESC降序排列&lt;/li&gt;&lt;/ol&gt;&lt;blockquote&gt;WHERE - 行条件子句&lt;br /&gt;GROUP - 分组子句&lt;br /&gt;HAVING - 组条件子句&lt;br /&gt;ORDER - 排序子句&lt;br /&gt;&lt;br /&gt;COUNT(*)&lt;br /&gt;COUNT(列名)&lt;br /&gt;SUM(列名)&lt;br /&gt;AVG(列名)&lt;br /&gt;MAX(列名)&lt;br /&gt;MIN(列名)&lt;br /&gt;AND / OR&lt;br /&gt;&lt;br /&gt;&amp;lt;, &amp;lt;=, &amp;gt;, &amp;gt;=, =, !=,&amp;nbsp;[NOT] BEWTEEN ... AND ...&lt;br /&gt;LIKE %, _&lt;br /&gt;(查询语句1) UNION [ALL] (查询语句2)&lt;br /&gt;(查询语句1) INTERSECT [ALL] (查询语句2)&lt;br /&gt;(查询语句1) EXCEPT [ALL] (查询语句2)&lt;br /&gt;&lt;br /&gt;IS [NOT] NULL&lt;br /&gt;&lt;br /&gt;[NOT] IN&lt;br /&gt;=|&amp;lt;&amp;gt; SOME&lt;br /&gt;&lt;br /&gt;[NOT] EXIST&lt;/blockquote&gt;&lt;strong&gt;CREATE&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;INSERT INTO 基本表名 [(列名表)]&lt;br /&gt;    VALUES (元组值)&lt;br /&gt;INSERT INTO 基本表名 [(列名表)]&lt;br /&gt;    VALUES (元组值), (元组值), (元组值)...&lt;br /&gt;INSERT INTO 基本表名 [(列名表)]&lt;br /&gt;    &amp;lt;SELECT 查询语句&amp;gt;&lt;/pre&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;UPDATE 基本表名&lt;br /&gt;SET 列名=值表达式[, 列名=值表达式, ...]|ROW = (元组)&lt;br /&gt;[ WHERE 条件表达式 ]&lt;/pre&gt;&lt;strong&gt;DELETE&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;DELETE FROM 基本表名&lt;br /&gt;[ WHERE 条件表达式 ]&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-5359121923569259179?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/5359121923569259179/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=5359121923569259179&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5359121923569259179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5359121923569259179'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/06/sql.html' title='SQL备忘录'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-3733335385004077733</id><published>2010-05-30T20:58:00.000-07:00</published><updated>2010-12-10T20:58:40.931-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><title type='text'>Open ESB</title><content type='html'>SOA(Service-Oriented Architecture)已经成为业界最流行的新一代企业应用集成框架。松散耦合、协议独立、位置透明是SOA的三个主要特征，加上Web Services等技术的出现，使得构建一个全球参与的服务协作平台成为可能。ESB是SOA架构中最为重要的概念，它为实现一个SOA架构需要满足的松散耦合、协议独立、位置透明、服务组合、服务管理等要求提供了必要的支持。本文将介绍一个开源ESB的实现，即Open ESB。Open ESB是在Sun公司支持下的一个开源项目，其核心是基于JBI(Java Business Integration)规范实现的，目前已经被集成到Sun公司的Sun Java System Application Server的9.1版本中。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;关于Open ESB&lt;/strong&gt;&lt;br /&gt;Open Enterprise Service Bus(Open ESB)是基于JPC-208规范实现的一个开源企业服务总线。Open ESB提出了可插拔组建容器(Pluggable Component Containers)的概念中，所有的服务被放到了不同的组建容器当中，这些容器集成了不同类型的企业IT资源。容器之间通过一条快速、可靠、位于内存(in-memory)的消息总线进行相互通信，这条消息总线被称为规范化消息路由器(Normalized Message Router)，也被称为JBI总线。服务容器通过一个基于WSDL的标准消息交换模式(Standardized Message Exchange Pattern)来集成IT资源，消息采用XML格式。这种方式提高了不同容器中不同服务的互操作性，同时也保证了同来自不同软件供应商的采用不同技术实现的服务之间的兼容性。&lt;br /&gt;&lt;br /&gt;概念&lt;br /&gt;下面对在Open ESB中常用的几个概念进行了说明。&lt;br /&gt;&lt;ul&gt; &lt;li&gt;服务引擎：向JBI环境内部的其他组件提供服务或者请求其他组件包含的服务的程序单元；&lt;/li&gt; &lt;li&gt;绑定组件：通过特定的通信协议与JBI容器外部的服务或者客户端进行通信的程序单元；&lt;/li&gt; &lt;li&gt;服务单元：被用来配置JBI环境中组件，使得组件可以需要提供或者请求服务；&lt;/li&gt; &lt;li&gt;服务集合：服务单元的集合，其中包含了构成一个服务集合的每个服务单元应该如何被部署到不同JBI组件中的配置信息；&lt;/li&gt;&lt;/ul&gt;下图简要说明了Open ESB中的各个组件之间以及外部服务或者客户端之间是如何通过规范化消息路由器(NMR)进行消息交换的。&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/555379660c7a/2tqztjhp.gif" alt="" /&gt;&lt;br /&gt;每个JBI组件都使用适合于自己的通信协议与NRM通信，而不管别的组件是如何与NRM通信的，而组建之间的通信是通过NRM进行。这里，服务引擎提供JBI环境内部的组件之间的服务访问，而绑定组件提供JBI环境与外部服务之间的服务访问。所有的来自JBI环境外部的服务访问请求都首先被发送到特定的绑定组件，绑定组件再将请求转换为内部的规范化消息，再通过NMR调用相应的服务。对于每一种不同的通信协议，例如SOAP、SMTP、HTTP、FTP等，都会有一个绑定服务与之对应，使得服务引擎中的服务可以通过任何的通信协议与JBI环境外部的服务或者客户端进行通信。&lt;br /&gt;&lt;strong&gt;目标&lt;/strong&gt;&lt;br /&gt;Open ESB的目标是创建一个开源的，基于被广泛接受的标准的技术集合，使得企业或组织可以创建服务或者参与到全球的服务协作当中。参与全球服务写作是所有走信息化道路的组织一个基本的需要，这样不仅可以缩短他们的信息系统开发时间，也可以更快的响应市场的 变化。SOA极其相关技术也正是在需求下产生的。&lt;br /&gt;Open ESB作为商业ESB或者SOA产品的良好替代品，不仅符合各种相关标准，而且在架构上分离了在服务的创建、服务的访问中的不变的部分和可变的部分，这种分离导致了全球服务写作当中创建和参与两个不同关注的分离。开发人员可以通过工具和运行时环境将注意力放在创建服务上，而安全和网络管理人员可以通过创建和应用不同的规则或策略来限制对服务的访问。&lt;br /&gt;&lt;strong&gt;Open ESB架构&lt;/strong&gt;&lt;br /&gt;下图是Open ESB的架构图，下面章节将对其中的每个部分进行单独介绍。&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/408579660c7a/p0ap6sp7.jpg" alt="" /&gt;&lt;br /&gt;&lt;strong&gt; 应用服务器&lt;/strong&gt;&lt;br /&gt;Open ESB需要一个应用服务器作为其载体，Open ESB可以被用来平衡应用服务器提供的许多功能(服务)，例如可靠性，可扩展性，部署支持以及管理等。目前Open ESB已经被集成到GlassFish中(一个开源Java EE application Server)，被用来平衡GlassFish的事物和集群功能，为开发人员提供一个健壮的部署解决方案。通过使用JBI的Java EE服务引擎，可以将现有的EJB和Web服务注册到Open ESB运行时中，使得其他的服务可以与之进行通信，从而达到重用现有功能的目的，并且这种集成是透明并且无缝的。&lt;br /&gt;&lt;strong&gt;&amp;nbsp;组合应用&lt;/strong&gt;&lt;br /&gt;一个组合应用是一个自包含(Self-contained)的功能单元，它由一些包含业务逻辑服务和相应的配置信息组成。使用Open ESB提供的组合应用设计工具，开发和设计人员可以用来实现如下的功能：&lt;br /&gt;&lt;ul&gt; &lt;li&gt;创建组合应用来重定位或者重新组合现有的ERP或者遗留服务，这些服务与新创建的服务使用面向服务的设计模式进行重组，得到新的业务流程，再通过Web2.0中的表示技术提供给用户使用；&lt;/li&gt; &lt;li&gt;使用业务流程执行语言(Business Process Executing Language)来描述由遗留服务、新建服务、Java应用、EJB组件和Web应用构成的组合服务的执行流程和协作行为；&lt;/li&gt; &lt;li&gt;使用转换服务来实现已有功能组件和新创建的服务之间的通信；&lt;/li&gt; &lt;li&gt;平衡业务活动管理工具(Business Activity Manager)和关键性能指标(Key Performance Indicator)，使用智能事件流程(Intelligent Event Processing)来处理复杂事件；&lt;/li&gt; &lt;li&gt;使用负责的提取、转换和加载模式来创建数据仓库和企业数据转换；&lt;/li&gt; &lt;li&gt;通过HTTP、SOAP、REST、File、FTP、SMTP、SNMP、JMS等协议和多种不同的通信连接器组件(如JCA)来与&amp;rsquo;Silos&amp;rsquo;和其他不同的应用进行协作；&lt;/li&gt; &lt;li&gt;为不同的应用领域，如保健行业、电信行业、财务、保险，创建协作服务(这些行业有自己数据格式，数据语义)；&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;组合应用编辑器&lt;/strong&gt;&lt;br /&gt;组合应用编辑器是随Open ESB一起提供的综合应用编辑工具，帮助开发人员或设计人员创建和连接组合应用。它帮助开发人员或者设计人员重定向不同服务的功能，通过重组应用逻辑并控制组合到一起的各个服务之间的交互方式来得到新的功能。组合服务可以包含丰富的元素，从独立的Web服务或者其他应用中的一个功能，到整个遗留系统。组合应用编辑器通过提供丰富的图形用户接口简化了组合应用的创建过程。这使得开发人员或者设计人员可以专注于业务逻辑的开发。&lt;br /&gt;&lt;strong&gt;JBI总线&lt;/strong&gt;&lt;br /&gt;JBI总线持有一组可插拔的组件，这些组件集成了不同类型的IT资源。容器之间通过一条快速、可靠、位于内存(in-memory)的消息总线进行相互通信，这条消息总线被称为规范化消息路由器(Normalized Message Router)，也被称为JBI总线。服务容器通过一个基于WSDL的标准消息交换模式(Standardized Message Exchange Pattern)来集成IT资源，消息采用XML格式。这种方式提高了不同容器中不同服务的互操作性，同时也保证了同来自不同软件供应商的采用不同技术实现的服务之间的兼容性。&lt;br /&gt;另外，JBI定义了一个标准的方法来支持插入第三方组件到Open ESB中，组件以动态的方式被插入到组件容器当中。这个功能将J2EE的功能提升了一个阶段，通过集成不同供应商提供的可插拔组件，服务开发商可以选择最方便的方式来部署自己的服务，而无需关心不同供应商提供的容器之间的具体交互细节。&lt;br /&gt;&lt;strong&gt;服务引擎和绑定组件&lt;/strong&gt;&lt;br /&gt;Open ESB支持两种类型的组件。服务引擎向Open ES环境内部提供服务，同时请求JBI环境内部的服务。绑定组件向Open ESB环境外部的客户端提供服务，或者调用外部服务。服务引擎和绑定组件可以作为服务提供者，也可以作为服务消费者，或者同时担任这两个角色。服务引擎和绑定组件之间的差别从他们的命名就可以看出。将业务逻辑和通信逻辑分离提供了协议独立性，降低了实现的复杂性，提高了灵活性。&lt;br /&gt;&lt;strong&gt;业务逻辑单元&lt;/strong&gt;&lt;br /&gt;业务逻辑单元是实现了全球服务协作(Global Services Collabration)某一方面的简单功能元素。一个业务逻辑单元的例子是一个实现了电子商务中某个事务的BPEL业务流程。这个业务流程可能会调用内部或者外部的服务。业务逻辑单元可以在多个全球服务协作中被重用。&lt;br /&gt;&lt;strong&gt;全球协作服务网络&lt;/strong&gt;&lt;br /&gt;SOA和ESB供应商提供的一个服务基础架构或者一个服务总线拓扑，用来创建不同的应用。这些架构方式非常适合于企业内部的应用集成，但是并不能被用来实现全球服务协作。全球服务协作中，所有的服务形成了一个网络。Open ESB针对全球协作服务网络已经或者即将进行两个方面的改进：&lt;br /&gt;l         Internet和Intranet通信的协作标准已经被建立，主要是http协议之上的XML技术，这样服务之间的通信将不再依赖于某个特定的协议；&lt;br /&gt;l         高吞吐量的消息处理引擎，即服务网关，允许各个域将它们的服务访问规则实现同业务逻辑实现相分离。服务网关作为一个域中所有服务的代理，负责避免域协作威胁，实现同其他域的协作并且应用域规则。&lt;br /&gt;&lt;strong&gt;监听器&lt;/strong&gt;&lt;br /&gt;Open ESB提供集中式的监听器功能，用来管理和配置分布式的运行时系统。通过配置工具，可以非常容易地安装和卸载新的组件容器以及管理他们的生命周期。配置工具同时还提供部署组合应用以及管理组合应用生命周期的功能。对组合应用和组件容器的配置及可以在单独的单一的应用服务器上完成也可以在集群环境中完成。消息交换的统计数据可以通过配置工具得到，使得用户对他的企业应用有一个大致的了解。通过这些管理工具用户可以查询和了解到Open ESB中各个部分的统计信息，报警信息以及错误信息。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-3733335385004077733?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/3733335385004077733/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=3733335385004077733&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3733335385004077733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3733335385004077733'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/05/open-esb.html' title='Open ESB'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-680789302822058291</id><published>2010-05-18T20:58:00.000-07:00</published><updated>2010-12-10T20:59:16.626-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>刷G2至Android2.1</title><content type='html'>原系统因天气小插件出现问题，导致系统无限重启，无耐，刷之&lt;br /&gt;&lt;strong&gt; 基本要求&lt;/strong&gt;&lt;br /&gt;返回键+开机 --&amp;gt; Fast Boot&lt;br /&gt;小房子+开机 --&amp;gt; Recovery Mode&lt;br /&gt;HTC驱动 &lt;a href="http://www.hiapk.com/bbs/viewthread.php?tid=6426&amp;amp;highlight=%CD%A8%B3%D4" target="_blank"&gt;Download&lt;/a&gt;&lt;br /&gt;&lt;strong&gt; 刷Recovery&lt;/strong&gt;&lt;br /&gt;从&lt;a href="http://forum.xda-developers.com/showthread.php?t=530492" target="_blank"&gt;这里&lt;/a&gt;下载recovery-RA-sapphire-v1.6.2H.img，扔到sd卡中&lt;br /&gt;开机进入命令行&lt;br /&gt;&lt;blockquote&gt;su&lt;br /&gt;flash_image recovery /sdcard/recovery-RA-sapphire-v1.6.2H.img&lt;br /&gt;reboot recovery&lt;/blockquote&gt;或FastBoot下&lt;br /&gt;fastboot flash recovery recovery-RA-sapphire-v1.6.2H.img&lt;br /&gt;&lt;strong&gt; 刷ROM&lt;/strong&gt;&lt;br /&gt;下ROM，重命名为update.zip放到sd卡根目录&lt;br /&gt;小房子+开机进入RecoveryMode&lt;br /&gt;第一步，备份！！！（可选 = =）&lt;br /&gt;第二步，从Flash拿update.zip刷之&lt;br /&gt;刷完后Reboot&lt;br /&gt;&lt;strong&gt; 刷Splash屏&lt;/strong&gt;&lt;br /&gt;就是开机第一屏，生产商的logo看着不舒服&lt;br /&gt;1、&lt;a href="http://www.hiapk.com/bbs/thread-82182-1-1.html" target="_blank"&gt;这里&lt;/a&gt;下载工具&lt;br /&gt;2、找一个320*480的图，双击步骤1压缩包中的"开机画面制作工具.exe"-&amp;gt;"open"图片-&amp;gt;convert，之后产生一个mysplash.rgb565文件&lt;br /&gt;3、关机，入fastboot模式，运行&lt;br /&gt;&lt;blockquote&gt;fastboot flash splash1 mysplash.rgb565&lt;br /&gt;fastboot reboot&lt;/blockquote&gt;Enjoy~&lt;br /&gt;&lt;br /&gt;&lt;strong&gt; Fastboot Usage&lt;/strong&gt;&lt;br /&gt;&lt;blockquote&gt;usage: fastboot [  ]&lt;br /&gt;&lt;br /&gt;commands:&lt;br /&gt;update                        reflash device from update.zip&lt;br /&gt;flashall                        'flash boot' + 'flash system'&lt;br /&gt;flash                [  ]       write a file to a flash partition&lt;br /&gt;erase                          erase a flash partition&lt;br /&gt;getvar                         display a bootloader variable&lt;br /&gt;boot                [  ]       download and boot kernel&lt;br /&gt;flash:raw boot   [  ]       create bootimage and flash it&lt;br /&gt;devices                        list all connected devices&lt;br /&gt;reboot                         reboot device normally&lt;br /&gt;reboot-bootloader          reboot device into bootloader&lt;br /&gt;&lt;br /&gt;options:&lt;br /&gt;-w                        erase userdata and cache&lt;br /&gt;-s                        specify device serial number&lt;br /&gt;-p                        specify product name&lt;br /&gt;-c                        override kernel commandline&lt;/blockquote&gt;参阅文献&lt;br /&gt;&lt;a href="http://www.danielbody.info/my-g2/207.html" target="_blank"&gt;《G2假砖修复开机无限重启修复指南》&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.danielbody.info/my-g2/134.html" target="_blank"&gt;《G2（HTC MAGIC）刷机之Recovery教程》&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.hiapk.com/bbs/thread-229648-1-1.html" target="_blank"&gt;《[32A][3.22]提前感受JIT的魅力CM5.0.7-t5-with-JIT》&lt;/a&gt;&lt;br /&gt;&lt;blockquote&gt;SAPPHIRE PVT 32A ENG S-OFF H&lt;br /&gt;HBOOT-1.33.2010(SAPP10000)&lt;br /&gt;CPLD-12&lt;br /&gt;RADIO-3.22.20.17&lt;br /&gt;Jun 2 2009,17:27:03&lt;br /&gt;---------------------------------------------&lt;br /&gt;SN :HT96WKF00904&lt;br /&gt;IMEI :354059024501841&lt;br /&gt;Part Number :99HFU016-00&lt;br /&gt;Part Description :SKU,HTC,English-WWE,IND,Regional ID High,Sophisticate Black,HSUPA enable,w/o SIM Lock,SAPPHIRE-C9#ASIA&lt;br /&gt;Customer Name :&lt;br /&gt;Customer Model :&lt;br /&gt;HTC Model :SAPPHIRE-C9&lt;br /&gt;Error Message :&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-680789302822058291?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/680789302822058291/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=680789302822058291&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/680789302822058291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/680789302822058291'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/05/g2android21.html' title='刷G2至Android2.1'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-7050314616542765215</id><published>2010-05-17T20:59:00.000-07:00</published><updated>2010-12-10T20:59:42.364-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>用Python写Web</title><content type='html'>首先，请理解&lt;a href="http://www.hudong.com/wiki/CGI" target="_blank"&gt;CGI&lt;/a&gt;，说白了，就是我们通过HTTP向某个机器的某个端口发送一个请求之后，对方返回一段byte数据的交互。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Apache + C + CGI&lt;/strong&gt;&lt;br /&gt;喜欢C不需要理由，首先写一个hello.c&lt;br /&gt;&lt;pre class="brush: java;light: true; fontsize: 100; first-line: 1;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;&lt;br /&gt;int main(int argc, char* argv)&lt;br /&gt;{&lt;br /&gt; printf("Content-Type: text/plain\n\n");&lt;br /&gt; printf("%s\n", "Hello world");&lt;br /&gt; return 0;&lt;br /&gt;}&lt;/pre&gt;&lt;blockquote&gt;root@compaq:/usr/lib/cgi-bin# gcc hello.c -o hello&lt;br /&gt;root@compaq:/usr/lib/cgi-bin# ls&lt;br /&gt;hello&amp;nbsp; hello.c&lt;br /&gt;root@compaq:/usr/lib/cgi-bin# ./hello&lt;br /&gt;Content-Type: text/plain&lt;br /&gt;&lt;br /&gt;Hello world&lt;br /&gt;root@compaq:/usr/lib/cgi-bin#&lt;/blockquote&gt;至于问为什么执行./hello要打印出Content-Type云云的同学，请参阅&lt;a href="http://www.hudong.com/wiki/HTTP" target="_blank"&gt;HTTP协议&lt;/a&gt;，也就是两台机器互相沟通交流所用的鸟语。将编译好的hello二进制文件放到cgi-bin的目录中，启用apache&lt;br /&gt;&lt;blockquote&gt;/etc/init.d/apache2 start&lt;/blockquote&gt;另开一个命令行执行如下命令&lt;br /&gt;&lt;blockquote&gt;tom@compaq:~$ telnet localhost 80&lt;br /&gt;Trying ::1...&lt;br /&gt;Connected to localhost.&lt;br /&gt;Escape character is '^]'.&lt;br /&gt;GET /cgi-bin/hello HTTP 1.1&lt;br /&gt;&lt;br /&gt;HTTP/1.1 200 OK&lt;br /&gt;Date: Mon, 17 May 2010 18:10:35 GMT&lt;br /&gt;Server: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny4 with Suhosin-Patch&lt;br /&gt;Vary: Accept-Encoding&lt;br /&gt;Content-Length: 12&lt;br /&gt;Connection: close&lt;br /&gt;Content-Type: text/plain&lt;br /&gt;&lt;br /&gt;Hello world&lt;br /&gt;Connection closed by foreign host.&lt;br /&gt;tom@compaq:~$&lt;/blockquote&gt;输入内容为telnet localhost 80 和 GET /cgi-bin/hello HTTP 1.1这两行，其余返回结果中Content-Type和Hello world这两行我们知道，是hello程序执行结果，那么剩余的字符就是所谓的HTTP协议咯。不明白？不要紧。打开浏览器，输入http://localhost/cgi-bin/hello，结果为Hello world，查看源代码也为Hello world，而那些Content-Type和其余的HTTP协议部分被浏览器理解后，执行相应的动作去了。&lt;br /&gt;好了，现在我们已经知道怎么把C语言的命令行的输出行为转给HTTP请求了，那么现在要做的就是用Python的命令行执行输出来替换掉这个C语言的编译文件&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Apache + Python + CGI&lt;/strong&gt;&lt;br /&gt;写一个hello.py，内容如下&lt;br /&gt;&lt;pre class="brush: python;light: true; fontsize: 100; first-line: 1;"&gt;#!/usr/bin/env python&lt;br /&gt;print "Content-Type: text/html"&lt;br /&gt;print&lt;br /&gt;print """\&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;h2&amp;gt;Hello world&amp;lt;/h2&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;"""&lt;/pre&gt;这里面，用text/html替换掉上面的text/plain，这样输出的html,body等文本标签就可以给浏览器理解为html语言并渲染成相应的显示格式了。如果使用text/plain，即便是html格式的文本，浏览器也只是当作纯文本流直接输出而不进行任何渲染行为。执行python hello.py&lt;br /&gt;&lt;blockquote&gt;root@compaq:/usr/lib/cgi-bin# python hello.py&lt;br /&gt;Content-Type: text/html&lt;br /&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;h2&amp;gt;Hello world&amp;lt;/h2&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;root@compaq:/usr/lib/cgi-bin#&lt;/blockquote&gt;打开浏览器输入http://localhost/cgi-bin/hello.py可见，一个使用2标题字体的Hello world呈现在你的面前，源码内容为&lt;br /&gt;&lt;blockquote&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;h2&amp;gt;Hello world&amp;lt;/h2&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/blockquote&gt;这里，我们已经可以写一些简单的python小程序来实现一些动态的数据显示了。比如显示系统时间，磁盘使用率，或者像verycd的首页标题一样，随即选择一个哲理语句集合中的某一句话进行显示...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-7050314616542765215?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/7050314616542765215/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=7050314616542765215&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7050314616542765215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7050314616542765215'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/05/pythonweb.html' title='用Python写Web'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-4469938757946722514</id><published>2010-05-11T21:00:00.000-07:00</published><updated>2010-12-10T21:00:41.795-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='设计模式'/><title type='text'>S.O.L.I.D原则</title><content type='html'>from &lt;a href="http://www.jdon.com/jivejdon/thread/38090"&gt;http://www.jdon.com/jivejdon/thread/38090&lt;/a&gt;&lt;br /&gt;由 Robert Martin提出的S.O.L.I.D  原则，用来更好编写面向对象程序，更灵活应对变化。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;S - Single Responsibility Principle  单一职责，简称SRP&lt;/strong&gt;&lt;br /&gt;这个我前面几篇文章刚刚写：&lt;a href="http://www.jdon.com/jivejdon/thread/38045"&gt;对象的责任 与职责&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.jdon.com/jivejdon/thread/38071"&gt;如何从职责和协作中发现丰富对象？&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;比如：报表的内容和报表的格式都会变化改变，但是这两种 变化的性质不同，一个是实质内在，一个是表面上的，SRP认为这是问题的两个方面，其实代表不同的职责，应该将它们分离放入不同的类或模块中，而不应该放 在一起，否则的话，因为不同原因发生变化，导致对方变动，比如报表格式变新的样式，这个变化是不应该涉及到内容的。&lt;br /&gt;&lt;br /&gt;这个模式和GoF模式 中职责链模式Chain-of-responsibility pattern类似，体现了职责分离，分散关注Separation of  concerns等&lt;a id="id_http://www.jdon.com/jivejdon/tags/246" class="hotkeys  ajax_query=OO" href="http://www.jdon.com/jivejdon/tags/246"&gt;&lt;strong&gt;OO&lt;/strong&gt;&lt;/a&gt;思 想。当然，也只有认识到事物高凝聚Cohesion本质，才能发现耦合。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;O - Open/Closed  Principle 开闭原则&lt;/strong&gt;&lt;br /&gt;我一直使用变化和不变来说明，封装不变部分，开放变化部分，一般使用接口继承实现方式来实现&amp;ldquo;开放&amp;rdquo;应对变 化，说大白话就是：你不是要变化吗？，那么我就让你继承实现一个对象，用一个接口来抽象你的职责，你变化越多，继承实现的子类就越多。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;L  - Liskov Substitution Principle 里氏替换原则 简称LSP&lt;/strong&gt;&lt;br /&gt;这是一个针对行为职责可替代的原则，如果 S是T的子类型，那么S对象就应该在不改变任何抽象属性情况下替换所有T对象。这里的抽象属性是指对象的字段属性。&lt;br /&gt;&lt;br /&gt;我们使用接口时经常碰 到一个问题，需要使用接口子类中的方法，而接口中没有这个方法，那么只能要么修改接口，要么将接口downcast为具体子类。为什么会出现这个尴尬现 象？有几种情况导致，其中一种情况是是将当前的类重构到接口时，没有将类中所有方法extract到接口中，可能因为这些被你漏掉的方法不属于当前接口， 那么，它又违背了单一职责原理，说明你当前这个类的方法设计得又不合理。&lt;br /&gt;&lt;br /&gt;所以，如果单一职责设计的足够好，那么LSP原则则是检验的方 法。LSP原则是对对象职责和协作的一种检验约束方法，此外还有&lt;a class="body_href" href="http://www.jdon.com/jivejdon/thread/36303"&gt;DBC(design  by contract)原则&lt;/a&gt;，为了保证实现接口的子类职责行为的约束，DBC三要素都必须被重视满足：&lt;br /&gt;1.Preconditions 前置条件不能在子类中被强化。&lt;br /&gt;2.Postconditions后置条件不能在子类中被弱化。&lt;br /&gt;3.子类自身不变性Invariants必 须在子类自己中封装满足。这也是前面&amp;ldquo;不改变任何抽象属性&amp;rdquo;的意思。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;I - Interface Segregation  Principle接口分离 简称ISP原则&lt;/strong&gt;&lt;br /&gt;这类似General Responsibility Assignment  Software Patterns中高凝聚原则 High Cohesion Principle  ，这是解决胖接口，接口很大很丰富，就要进行解耦切分，把一个接口切分为多个接口，把一个大的职责切分为小职责以及这些职责之间的协作交互。&lt;br /&gt;&lt;br /&gt;切 分时必须依据高凝聚原则，单一职责进行切分。&lt;br /&gt;&lt;br /&gt;这个原则起源于施乐公司，他们需要建立了一个新的打印机系统，可以执行诸如装订的印刷品一 套，传真多种任务。此系统软件创建从底层开始编制，并实现了这些任务功能，但是不断增长的软件功能却使软件本身越来越难适应变化和维护。每一次改变，即使 是最小的变化，有人可能需要近一个小时的重新编译和重新部署。这是几乎不可能再继续发展，所以他们聘请罗伯特Robert帮助他们。&lt;br /&gt;&lt;br /&gt;他们 首先设计了一个主要类Job,几乎能够用于实现所有任务功能.  只要调用Job类的一个方法就可以实现一个功能，Job类就变动非常大，是一个胖模型啊，对于客户端如果只需要一个打印功能，但是其他无关打印的方法功能 也和其耦合，ISP原则建议在客户端和Job类之间增加一个接口层，对于不同功能有不同接口，比如打印功能就是Print接口，然后将大的Job类切分为 继承不同接口的子类，这样有一个Print Job类，等等。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;D - Dependency Inversion  Principle 依赖反转原则 DIP&lt;/strong&gt;&lt;br /&gt;a.高级别模块不应依赖于低层次的模块。双方应依赖于抽象。&lt;br /&gt;b.抽象不应当取决于细 节。细节应该依赖抽象。&lt;br /&gt;&lt;br /&gt;&lt;a class="body_href" href="http://www.jdon.com/AOPdesign/Ioc.htm"&gt;Dependency Injection 依赖注入&lt;/a&gt;模式也是属于这种类型变种，GoF设计模式中适配器模 式中，高层次类只依赖于adapter接口. 而被适配者低层次也只依赖adapter接口。&lt;br /&gt;&lt;br /&gt;SOLID原则如今在&lt;a class="body_href" href="http://www.jdon.com/jivejdon/thread/37976"&gt;DCI架构&lt;/a&gt;中 能够得到真正实现和发展。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-4469938757946722514?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/4469938757946722514/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=4469938757946722514&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4469938757946722514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4469938757946722514'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/05/solid.html' title='S.O.L.I.D原则'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-4750196229603415661</id><published>2010-05-11T20:59:00.000-07:00</published><updated>2010-12-13T04:08:08.835-08:00</updated><title type='text'>RPG网游&amp;SNS</title><content type='html'>很多年过去了,从传奇开始,RPG网游模式几乎没有太大变化,多数是围绕在原有模型的基础上做一些小特效,美工改改模型, 策划改改故事脚本, 打包上线,新游戏诞生 = =&lt;br /&gt;&lt;img style="border: 0px; padding: 0px;" src="http://pic.yupoo.com/lanyueniao/4340694cfbea/bt9w9dag.png" alt="RPG网游结构图" /&gt;&lt;br /&gt;&lt;strong&gt;角色系统&lt;/strong&gt;&lt;br /&gt;属性成长(角色分类,经验值, 红/蓝/气/攻/防/暴击和命中率/移动速度/攻击速度/血液魔法恢复速度....)&lt;br /&gt;技能树(攻法/物品合成法)&lt;br /&gt;装备和物品&lt;br /&gt;游戏币&lt;br /&gt;一般游戏开始,玩家会被要求在出生地各个店铺获取自己的初级套装(武器, 衣服, 药等)&lt;br /&gt;装备套装&lt;br /&gt;宠物坐骑&lt;br /&gt;&lt;strong&gt;任务系统&lt;/strong&gt;&lt;br /&gt;通常,一款游戏都是围绕着一定故事背景而产生的. 这也是评价一款游戏是否好的重要指标,典型案例,如:仙剑系列.故事情节大都为历史, 童话, 魔幻, 科幻等系列, 此外就是Second Life(模拟人生)类型的虚拟现实.&lt;br /&gt;通常在这个大的故事背景下,玩家扮演其中的某个角色,根据成长经历或环境变化触发相应的任务.&lt;br /&gt;....&lt;br /&gt;协作快速完成任务&lt;br /&gt;获取经验,游戏币,装备和任务道具&lt;br /&gt;&lt;strong&gt;交易系统&lt;/strong&gt;&lt;br /&gt;所有玩家最关心的,装备,物品,游戏币..&lt;br /&gt;与NPC交易分免费和收费型, 如N级以前城内所有店铺免费, 免费求医&lt;br /&gt;物品的合成属于交易的一种,但玩家可以靠某些技能书发展自己的物品合成技能,参考角色系统&lt;br /&gt;&lt;br /&gt;玩家可开店兜售自己的装备或物品&lt;br /&gt;&lt;strong&gt;交友系统&lt;/strong&gt;&lt;br /&gt;早期QQ雏形,目前还未涉及到关系网络的分析&lt;br /&gt;衍生出结婚等概念&lt;br /&gt;好友之间发密函&lt;br /&gt;&lt;strong&gt;帮派系统&lt;/strong&gt;&lt;br /&gt;在交友系统基础上的延伸, 如到达30级后可以加入帮派,50级可创建帮派.&lt;br /&gt;帮派排名(总资产, 任务经验数, PK大战胜率)&lt;br /&gt;帮派威望(向帮派捐助, 帮派内成员协作完成任务),想起火影忍者中的各种国&lt;br /&gt;帮派长老给成员下达命令&lt;br /&gt;&lt;strong&gt;世界环境&lt;/strong&gt;&lt;br /&gt;玩家,怪物属性随时间和气候的变化而变化(韦诺之战);&lt;br /&gt;时间变化: 有白天夜间区分;任务Boss的定期刷新&lt;br /&gt;气候变化: 风,雨,高山,草原,荒漠,冰源,沼泽,森林,大洋&lt;br /&gt;&lt;strong&gt;关于消息的传递&lt;/strong&gt;&lt;br /&gt;区域性 &amp;lt; 任务小组 &amp;lt; 好友间密函 &amp;lt; 帮派 &amp;lt; 全区域&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-4750196229603415661?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/4750196229603415661/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=4750196229603415661&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4750196229603415661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4750196229603415661'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/05/rpg.html' title='RPG网游&amp;SNS'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-3058660894519468881</id><published>2010-05-10T21:00:00.000-07:00</published><updated>2010-12-10T21:01:10.227-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java内存模型</title><content type='html'>&lt;img style="border: 0px; padding: 0px;" src="http://pic.yupoo.com/lanyueniao/3871794ba487/cbn17rq5.png" alt="" /&gt;&lt;br /&gt;jvm系统中存在一个主内存(main memory或java heap memory)，java中所有变量都储存在主存中，对于所有线程都是共享的。&lt;br /&gt;&lt;br /&gt;每条线程都有自己的工作内存(working memory)，工作内存中保存的是主存中某些变量的拷贝，线程对所有变量的操作都是在工作内存中进行，线程之间无法相互直接访问，变量传递均需要通过主存完成。&lt;br /&gt;&lt;h3&gt;缓存一致性（cache coherency）&lt;/h3&gt;什么是缓存一致性?&lt;br /&gt;它是一种管理多处理器系统的高速缓存区结构，其可以保证数据在高速缓存区到内存的传输中不会丢失或重复。(来自wikipedia)&lt;br /&gt;&lt;br /&gt;解决缓存一致性的方法?&lt;br /&gt;a, 顺序一致性模型:&lt;br /&gt;要求某处理器对所改变的变量值立即进行传播, 并确保该值被所有处理器接受后, 才能继续执行其他指令.&lt;br /&gt;&lt;br /&gt;b, 释放一致性模型: (类似jmm cache coherency)&lt;br /&gt;允许处理器将改变的变量值延迟到释放锁时才进行传播.&lt;br /&gt;&lt;h3&gt;happens-before ordering( 先行发生排序)&lt;/h3&gt;如何避免这种情况?&lt;br /&gt;排序原则已经做到:&lt;br /&gt;a, 在程序顺序中, 线程中的每一个操作, 发生在当前操作后面将要出现的每一个操作之前.&lt;br /&gt;b, 对象监视器的解锁发生在等待获取对象锁的线程之前.&lt;br /&gt;c, 对volitile关键字修饰的变量写入操作, 发生在对该变量的读取之前.&lt;br /&gt;d, 对一个线程的 Thread.start() 调用 发生在启动的线程中的所有操作之前.&lt;br /&gt;e, 线程中的所有操作 发生在从这个线程的 Thread.join()成功返回的所有其他线程之前.&lt;br /&gt;&lt;br /&gt;为了实现 happends-before ordering原则, java及jdk提供的工具:&lt;br /&gt;a, synchronized关键字&lt;br /&gt;b, volatile关键字&lt;br /&gt;c, final变量&lt;br /&gt;d, java.util.concurrent.locks包(since jdk 1.5)&lt;br /&gt;e, java.util.concurrent.atmoic包(since jdk 1.5)&lt;br /&gt;&lt;br /&gt;(1) 获取对象监视器的锁(lock)&lt;br /&gt;(2) 清空工作内存数据, 从主存复制变量到当前工作内存, 即同步数据 (read and load)&lt;br /&gt;(3) 执行代码，改变共享变量值 (use and assign)&lt;br /&gt;(4) 将工作内存数据刷回主存 (store and write)&lt;br /&gt;(5) 释放对象监视器的锁 (unlock)&lt;br /&gt;&lt;ol&gt; &lt;li&gt;&lt;a href="http://java.sun.com/docs/books/jls/" target="_blank"&gt;Java Language Specification&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.cs.umd.edu/~pugh/java/memoryModel/" target="_blank"&gt;The Java Memory Module&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://java.sun.com/docs/books/jvms/" target="_blank"&gt;The Java Virtual Machine Specification&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-3058660894519468881?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/3058660894519468881/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=3058660894519468881&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3058660894519468881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3058660894519468881'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/05/java.html' title='Java内存模型'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-3588688304590083066</id><published>2010-05-08T21:01:00.000-07:00</published><updated>2010-12-10T21:01:40.905-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='数据库'/><title type='text'>《MySQL性能调优与架构设计》概要</title><content type='html'>&lt;img src="http://pic.yupoo.com/lanyueniao/7158094a751f/2pa25s9f.png" alt="MySQL系统架构" /&gt;&lt;br /&gt;&lt;strong&gt;权限机制&lt;/strong&gt;&lt;br /&gt;相关表mysql.User, mysql.db, mysql.Host, mysql.table_priv, mysql.column_priv&lt;br /&gt;由于数据量小,访问频繁,MySQL启动时会将所有权限信息加载到内存Cache住,所以修改完权限信息后要FLUSH PRIVILEGES使其生效, 通过GRANT, REVOKE和DROP USER情况除外. 5.0.2版本后增加了CREATE USER命令.&lt;br /&gt;权限等级 Global Level &amp;gt; Database Level &amp;gt; Table Level &amp;gt; Column Level &amp;gt; Routine Level&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/1960994cf67f/sltxxjxw.png" alt="" /&gt;&lt;br /&gt;&lt;em&gt;用户管理&lt;/em&gt;&lt;br /&gt;访问控制&lt;br /&gt;&lt;blockquote&gt;GRANT SELECT, INSERT, UPDATE, DELETE ON test.table TO 'user'@'localhost'&lt;/blockquote&gt;原则: 越苛刻越好,越紧束越好&lt;br /&gt;&lt;strong&gt;备份和恢复&lt;/strong&gt;&lt;br /&gt;&lt;blockquote&gt;mysqldump, mysqlimport, LOAD DATA INFILE&lt;/blockquote&gt;&lt;strong&gt;锁机制&lt;/strong&gt;&lt;br /&gt;表、行 S、X、IS、IX&lt;br /&gt;&lt;strong&gt;Query优化&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;Query语句优化基本思路和原则&lt;/em&gt;&lt;br /&gt;&lt;ol&gt; &lt;li&gt;优化需要优化的Query&lt;/li&gt; &lt;li&gt;定位优化对象的性能瓶颈&lt;/li&gt; &lt;li&gt;明确优化目标&lt;/li&gt; &lt;li&gt;从Explain入手&lt;/li&gt; &lt;li&gt;多使用Profile&lt;/li&gt; &lt;li&gt;永远用小结果集驱动大的结果集&lt;/li&gt; &lt;li&gt;尽可能在索引中完成排序&lt;/li&gt; &lt;li&gt;只取自己需要的Columns&lt;/li&gt; &lt;li&gt;仅仅使用最有效的过滤条件&lt;/li&gt; &lt;li&gt;尽可能避免复杂的Join和子查询&lt;/li&gt;&lt;/ol&gt;OO思想在于设计系统时，考虑其易变性和扩展性，但在性能方面有所欠缺；此时需要OP进行辅佐矫正&lt;br /&gt;&lt;blockquote&gt;select/where/order by/group by/having&lt;/blockquote&gt;.......&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-3588688304590083066?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/3588688304590083066/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=3588688304590083066&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3588688304590083066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3588688304590083066'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/05/mysql.html' title='《MySQL性能调优与架构设计》概要'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-6829720701699713998</id><published>2010-04-26T21:01:00.000-07:00</published><updated>2010-12-13T04:07:16.629-08:00</updated><title type='text'>3-layer体系架构</title><content type='html'>&lt;strong&gt;UI层&lt;/strong&gt;&lt;br /&gt;对于互联网用户，多数情况下是网页形式；对于收银员，是POS机；所谓UI，是指有效数据的某种呈现方式，以方便进行人机交互。&lt;br /&gt;&lt;strong&gt;html&lt;/strong&gt;&lt;br /&gt;最原始，也是最标准的，有W3C强有力的后盾。近期火热的&lt;a href="http://html5.org/" target="_blank"&gt;HTML5&lt;/a&gt;又与时俱进的推出canvas, video, audio等一系列令人兴奋的标签，跟着标准走，没错的。&lt;br /&gt;早期浏览器混战时期的互联网还是很朴素的，连在页面上播放一小段动画都让人大伤脑筋，更不要说是RIA交互了，而且也没有一个特定的规范，于是乎，各厂家便打造自己的解决方案。&lt;br /&gt;&lt;strong&gt;applet&lt;/strong&gt;&lt;br /&gt;路人皆知，java是依托互联网浪潮发展壮大起来的语言，并且sun针对不同应用场景打造了三大let(applet, servlet, midlet)，兵来将挡，水来土掩。依托于SE平台的awt包针对浏览器端而诞生的一组支持applet的类。可以使用&amp;lt;applet&amp;gt;标签将.class嵌入到浏览器中执行，但本地需装有jre环境。后来applet有点力不从心的时候，Sun又相继推出了JavaWebStart和JavaFX。但结果都同EJB那样的命运，没人愿意用；&lt;br /&gt;&lt;blockquote&gt;需要JRE(为了运行一个简单的小程序，人们还要另外安装一个几十m的环境？)&lt;br /&gt;做学术研究的人多数对产品营销有所欠缺(一些技术研讨会上，SUN工程师们也自我承认这一点)&lt;/blockquote&gt;就像强大的EJB，当初也算是企业级开发中解决某些极端情况的最好办法，但学术派人士经常只考虑问题能不能解决，却很少站在开发者的角度考虑这个东西好不好用。三大let目前只剩下J2EE体系中的servlet还活着，这大概也印证了"企业应用生命周期为10年，互联网应用5年，移动应用3年"及"任何产品和技术要么选择不断成长，要么选择灭亡"的说法。&lt;br /&gt;&lt;strong&gt;flash&lt;/strong&gt;&lt;br /&gt;互联网混战，打的不仅是技术标准，还有开发工具。Macromedia推出"网页三剑客"，虽微软也放出Frontpage，但对比集成套装的Macromedia成员来说，也只能是用来把玩一下。当初还新生出"闪客"一词，指那些整天没事儿造flash玩的人，还有风靡的闪客帝国、闪客吧等各种闪客集中地。从制作简单的特效动画、到动漫影片集、再到一些娱乐时尚的网站全站用纯flash打造、甚至是用来构建一些桌面级应用。Macromedia真正把互联网带入了丰富多彩的多媒体互动时代。可是，突然又一天它消失了，纳入Adobe麾下。Fireworks死，其本身就与Adobe嫡系的Photoshop冲突；至于Dreamweaver，现在的页面制作人员要求纯手工写html，再也不是拖拖拽拽的了，更何况还有很多Open的工具；唯一还在风靡的是经过几代变迁的Flash，Adobe还给它起了个新名字Flex。不过html5出来以后它也是前景堪忧。因为，下一步我们要进入的是移动互联网时代。当我们评价一个终端设备的好坏时，续航力和性能是很重要的一个指标；执行as脚本的flash，相当于给浏览器加了一层套，这无疑加大系统开销。而目前霸占美国移动互联网的苹果系列机器，打开Flash的时候，你会明显感觉CPU兴奋了，温度上去了。或许乔帮主前段时间抛出的"flash将死"的理论有所偏激，但鄙人赞同这一点。此外，这里有一篇更为确切的评价&lt;a href="http://liut.cc/blog/2010/04/about-flash-1.html" target="_blank"&gt;《关于Flash的闲言碎语》&lt;/a&gt;&lt;br /&gt;&lt;blockquote&gt;Flash是一个在特殊时期，仓促诞生的网页多媒体呈现技术；&lt;br /&gt;Flash是个封闭的技术，并且Adobe收购MacroMedia之后继续封闭和拒绝开放；&lt;br /&gt;Flash对客户端的CPU和资源占用较多，这一点饱受用户抱怨，以始终未有较明显改善；&lt;br /&gt;Flash网页组件不是一个遵循Web标准的组件，在网页交互上，它不具有开放性和标准性；&lt;br /&gt;Flash试图通过自有平台扩展向整个Web交互平台发展，且自创一套封闭标准以维持其垄断性，这会威胁到众多终端厂商的利益；&lt;br /&gt;Adobe不是一家受人景仰的公司，有野心，无实力，在开放的大趋势下，它一点儿让人尊敬的进步也没有。它或许想走微软的老路，但是条已经被证明并不好走的路&lt;/blockquote&gt;&lt;strong&gt;silverlight&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;ajax&lt;/strong&gt;&lt;br /&gt;javascript / xml / json&lt;br /&gt;&lt;strong&gt;国际化&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;控制层&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Filter&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Validator&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;RBAC权限控制 / pipe  / linux/mySQL权限思想&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Control &amp;amp; Dispatch&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Messages properties&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;业务层&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;ESB&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;SOAP&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Message-Queue/JTA&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Batch&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;异常处理&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;日志&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/662839392bcd/wzrq5e8w.png" alt="" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-6829720701699713998?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/6829720701699713998/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=6829720701699713998&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/6829720701699713998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/6829720701699713998'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/04/3-layer.html' title='3-layer体系架构'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-347898825767191260</id><published>2010-04-25T21:02:00.000-07:00</published><updated>2010-12-13T04:05:11.886-08:00</updated><title type='text'>What Happen构思</title><content type='html'>&lt;h2&gt;&lt;strong&gt;事件&lt;/strong&gt;&lt;/h2&gt;1、Google在搜索过程中加入地理因素&lt;br /&gt;2、微软推出一个旅游网站&lt;br /&gt;3、Foursquare火的不可开交&lt;br /&gt;4、未来的发展趋势为LBS、SNS、实时资讯&lt;br /&gt;&lt;h2&gt;&lt;strong&gt;因素&lt;/strong&gt;&lt;/h2&gt;&lt;strong&gt;虚拟与现实&lt;/strong&gt;&lt;br /&gt;这一切都要从2000年开始的一个叫作《&lt;a href="http://secondlife.com/"&gt;模拟人生&lt;/a&gt;(Second Life)》的游戏说起，现在称"Internet's largest user-created, 3D virtual world community." 这是虚拟现实技术发展到一定阶段的必然产物，也可称作YY。&lt;br /&gt;&lt;br /&gt;后来Google推出Earth和Map系列产品，提供人们清晰精准的地图服务，称作现实世界的2D虚拟化记录；&lt;br /&gt;而StreetView及3d Sketchup旨在将2D的地图3D化，结果将能虚拟化整个现实世界的。&lt;br /&gt;虚拟中的物品和现实物品实现一对一的映射。如宇宙、相对论那些人常说的异次元空间，即存在另一个世界与现实一一对应。&lt;br /&gt;&lt;br /&gt;模拟游戏是个好玩的东西，他可以让你尝试做现实中中你不曾做过的事情；然生活在虚拟世界中是不真实的，病态的，最终都要回归现实。虚虚实实，假到真时真亦假。所谓真实，不过是人们自我意识上对某件事物的认同。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;When？Where？Who？What（何时何地何人做何事）&lt;/strong&gt;&lt;br /&gt;现实世界主要由时间和空间这两个维度组成，而关系到人类社会群体的又有人物和事件这两个维度。如果对这四个维度的现实数据做记录，我们就不用写什么记录、日志、文档，只要根据时间、地点定位到历史的某一时刻找到我们需要的人物和事件即可，很酷，但目前做不到；我们只能选择一种折中的方法，给我们的生活一点一点的添加更多便利。&lt;br /&gt;关于When，爱因斯坦说，时间是宇宙大爆炸的产物；对于人们来说，时间是一个Calendar&lt;br /&gt;关于Where，我们已经拥有现实中的数据拷贝了，GoogleMap, StreetView用于了解周边环境。&lt;br /&gt;关于Who，近几年火热火热的SNS做的就是这方面的事情，如Facebook、校内；目前大多数是通过曾经隶属组织(学校、公司)之类的数据做关联引用的，&lt;a href="http://www.zeuux.com/" target="_blank"&gt;哲思社区&lt;/a&gt;用的是人物关联，似乎IBM前几年有个项目也是分析客户人与人之间关系的。&lt;br /&gt;关于What，典型的应该是Twitter这类应用，记录某时刻的事件、思维、点子之类数据&lt;br /&gt;&lt;br /&gt;那么，如果将以上应用做个整合会出现什么？&lt;br /&gt;于是，Foursquare诞生了，火了；侧重点在于Where和Who，也有部分的When和What数据，但营养度不高。我们也不能仅仅停留在这一层面，还有更多更酷更炫的点子没有加进来呢。&lt;br /&gt;&lt;blockquote&gt;记得几年前有家公司推出这样的一种服务：一个人在街道的某个地方用终端(手机)发布一条语音信息，其他人在未来的某一天来到这个地点，可以通过某种终端收听到这条语音数据，环境数据的实时记录，犹如《阿凡达》里的知识树。这需要精准的定位、大规模存储计算、网络读写速度等方面技术的突破。&lt;/blockquote&gt;设想，如果我们把Twitter/微博、Youtube/优酷嵌入到GoogleMap中，然后以时间和地点做维度区分，就可以记录何时何地发生何事，再附加人物信息（Friend Connect），酷！同时，还可以分析某个人的活动轨迹，获取一个人的需求对于商品营销是很重要的数据。参考《&lt;a href="http://www.sciam.com.cn/html/diqiugushi/dongzhiwu/2009/1230/8225.html" target="_blank"&gt;美科学家用卫星定位绘制北极狼活动轨迹图&lt;/a&gt;》&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/198729374864/vge7nzt9.jpg" alt="" /&gt;&lt;br /&gt;&lt;h2&gt;&lt;strong&gt;设想&lt;/strong&gt;&lt;/h2&gt;鄙人宅男一枚，但不宅就不知道找谁去哪里玩，于是一个朋友一个朋友的电话或QQ联系组织，低效。我们需要改变！&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;如果我能够了解到朋友们的计划，然后来进行自己的安排&lt;/strong&gt;&lt;br /&gt;Google Calendar是一个很酷的应用，而真实用的人很少，大概商务性太强了或者是习惯问题。通常一些OpenSource组织举办活动的时候会用到。假设，我和我的朋友们都有这么一个计划表，我自己可以查看一张日程表，上面列出我的所有朋友们的活动安排，然后挑自己感兴趣的去参与，这样就不必每次自己想出去玩的时候打电话遭遇一个个推脱。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;如果我能够查看到周边世界都在发生或将要发生什么，然后自己根据喜好去参与&lt;/strong&gt;&lt;br /&gt;Foursquare只是侧重地记录地点信息；而新闻视频（如优酷）用于真实记录现实事件，地理信息模糊。而且前面两个都是记录过去发生的事情，我不喜欢马后炮。联系上面提到的朋友日程表，我如果可以实时的发现我的周边都将要发生什么事情，自己根据喜好去参与，这起码可以减小宅的可能性，在明媚的阳光下同大批有着同样兴趣的人交流，爽哉..&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;如果我能够根据别人的活动记录来安排自己的活动，并召集朋友们一起去玩&lt;/strong&gt;&lt;br /&gt;每当我想出门旅行的时候，都要现Google一大批相关资料或者到专业的咨询论坛里取经，交通、酒店、行程等等，通常耗费很多的时间和精力。实际上，我们想做的大多数事情别人都已经做过了，而别人的整个经验性的数据却很少有记录下来；"再现某个事件的经过，对后来想做同样事情的人是很有价值的参考数据"。&lt;br /&gt;比如&lt;a href="http://www.douban.com/group/baozouBJ/" target="_blank"&gt;豆瓣暴走小组&lt;/a&gt;举办活动的模式&lt;br /&gt;&lt;blockquote&gt;1、某人发起一个活动（Twitter + Calendar）&lt;br /&gt;2、感兴趣的朋友们联系我 （SNS + FriendConnect + QQ）&lt;br /&gt;3、整合地图、路线、票务、天气、酒店等数据 （Map + Weather + Qunar）&lt;br /&gt;4、小组出发，去驴友推荐的景点，餐馆，紧急情况下需要药店、加油站等（大众点评 + Map）&lt;br /&gt;5、回来后写作业，我们去了哪里，做了什么，怎么做的 （？+ Picasa + Flickr + Youtube + 优酷 + ？）&lt;br /&gt;6、未来的某人想重复到某个地点做同样的事，重复1&lt;/blockquote&gt;这里有几个地方可以改善&lt;br /&gt;&lt;blockquote&gt;1、发起的活动可以按时间归为一个日程表，选具体的活动可以看到文字、图片及视频介绍&lt;br /&gt;2、当我发起活动的同时，可以被follow me的朋友们接收到，不用我到处贴：我要做什么，我要做什么...&lt;br /&gt;3、可以把这些信息整合，做成一站式服务，直接把内容推送到自己面前&lt;br /&gt;4、对Foursquare和大众点评的整合改进&lt;br /&gt;5、直接把信息放到地图上，通过时间和地点维度，查找某一时刻、地点发生了什么，可以针对特定人群（朋友）开放，以供别人参考。&lt;br /&gt;6、避免别人重复的Google大量资料，重复的地图、路线、票务等信息搜罗&lt;/blockquote&gt;&lt;h2&gt;&lt;strong&gt;设想图&lt;/strong&gt;&lt;/h2&gt;这样，我们可以避免宅、避免迷路、还可以避免《向左走向右走》....&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/4146793755fc/wuqmr8y7.png" alt="" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-347898825767191260?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/347898825767191260/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=347898825767191260&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/347898825767191260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/347898825767191260'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/04/what-happen.html' title='What Happen构思'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-8356182552355906947</id><published>2010-04-24T21:03:00.000-07:00</published><updated>2010-12-10T21:03:32.638-08:00</updated><title type='text'>对于Map/Reduce的一点鸟语</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/MapReduce" target="_blank"&gt;Map/Reduce&lt;/a&gt;起源于Google的一篇文章&lt;a href="http://labs.google.com/papers/mapreduce.html" target="_blank"&gt;《MapReduce: Simplified Data Processing on Large Clusters》&lt;/a&gt;，前些年在Cloud概念刚出来的时候很火（现在应该属于常识系列），多用于对大型大量数据做处理的实施策略。根据它的起源，首先关联到的是搜索引擎的某一部分机能：&lt;strong&gt;倒排索引&lt;/strong&gt;的建立过程。&lt;br /&gt;&lt;br /&gt;我们的正常理解认知：这篇文档中都出现了那些词？&lt;br /&gt;实际搜索的目的在于：这个词都出现在哪些文档中？&lt;br /&gt;&lt;br /&gt;比如Web上有以下两个文档&lt;br /&gt;Doc A: A smart fox jump over the lazy dog.&lt;br /&gt;Doc B: Tom's cat is smart like a fox.&lt;br /&gt;&lt;br /&gt;我们希望在输入与输出对应为&lt;br /&gt;dog -&amp;gt; Doc A&lt;br /&gt;fox -&amp;gt; Doc A, Doc B&lt;br /&gt;cat -&amp;gt; Doc B&lt;br /&gt;&lt;br /&gt;建立索引范例（某做搜索的公司就是拿这种小测验面试的）&lt;br /&gt;&lt;pre class="brush: java;light: true; fontsize: 100; first-line: 1;"&gt;public class Indexer {&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;  Map docs = new HashMap();&lt;br /&gt;  docs.put("DocA", "A smart fox jump over the lazy dog");&lt;br /&gt;  docs.put("DocB", "Tom's cat is smart like a fox");&lt;br /&gt;&lt;br /&gt;  Map index = new HashMap();&lt;br /&gt;&lt;br /&gt;  Iterator docIter = docs.keySet().iterator();&lt;br /&gt;  while(docIter.hasNext()) {&lt;br /&gt;   String docKey = docIter.next();&lt;br /&gt;   String docContent = docs.get(docKey);&lt;br /&gt;   String[] docContentArr = docContent.split(" ");&lt;br /&gt;   for(int i=0; i&amp;amp;lt; docContentArr.length; i++) {&lt;br /&gt;    LinkedList value = index.get(docContentArr[i]);&lt;br /&gt;    if(null == value) {&lt;br /&gt;     value=new LinkedList();&lt;br /&gt;    }&lt;br /&gt;    value.add(docKey);&lt;br /&gt;    index.put(docContentArr[i], value);&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  Iterator iterator = index.keySet().iterator();&lt;br /&gt;  while(iterator.hasNext()) {&lt;br /&gt;   String keyString = iterator.next();&lt;br /&gt;   System.out.print(keyString + "\t--&amp;amp;gt;\t");&lt;br /&gt;   LinkedList linkedList = index.get(keyString);&lt;br /&gt;   for(int i=0; i&amp;amp;lt; linkedList.size(); i++) {&lt;br /&gt;    System.out.print(linkedList.get(i) + ",");&lt;br /&gt;   }&lt;br /&gt;   System.out.println("");&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;/pre&gt;输出结果&lt;br /&gt;&lt;pre&gt;cat --&amp;gt; DocB,&lt;br /&gt;is --&amp;gt; DocB,&lt;br /&gt;fox --&amp;gt; DocA,DocB,&lt;br /&gt;A --&amp;gt; DocA,&lt;br /&gt;a --&amp;gt; DocB,&lt;br /&gt;the --&amp;gt; DocA,&lt;br /&gt;Tom's --&amp;gt; DocB,&lt;br /&gt;like --&amp;gt; DocB,&lt;br /&gt;jump --&amp;gt; DocA,&lt;br /&gt;over --&amp;gt; DocA,&lt;br /&gt;lazy --&amp;gt; DocA,&lt;br /&gt;dog --&amp;gt; DocA,&lt;br /&gt;smart --&amp;gt; DocA,DocB,&lt;/pre&gt;目前，索引已经建立好了。但这只是针对小数据量的测验，当需要建立索引的文档数目为百万、千万、甚至是亿的时候，机器就被噎死了。所以我们需要每次小消化一些，或者多找些其他机器来一起消化掉。比如，每个机器负责一万条数据（这是绰绰有余的），搞来100多台机器一起消化就好了。对，这就是Map，这～就是Map。每个机器消化完的结果也是一个个键值对，然后把100个这种结果做归并，也就得到了所有数据的索引数据，如图：&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/04732936b878/mwb8etkj.png" alt="" /&gt;&lt;br /&gt;如此的结果就是：不管出现的问题P有多大，只要有足够数量多的机器，总能P/n使问题可解&lt;br /&gt;这只是最基础的理论思想，在此之上根据集群管理、少写多读、节点压力自调节等情况等衍生出的Master/Slave等架构思想属于统一体系策略&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-8356182552355906947?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/8356182552355906947/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=8356182552355906947&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8356182552355906947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8356182552355906947'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/04/mapreduce.html' title='对于Map/Reduce的一点鸟语'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-7014548219987884641</id><published>2010-04-18T21:04:00.000-07:00</published><updated>2010-12-10T22:24:07.781-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='操作系统'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Getting started with Bochs</title><content type='html'>&lt;a href="http://www.linux.com/archive/feed/40825?page=1" target="_blank"&gt;http://www.linux.com/archive/feed/40825?page=1&lt;/a&gt;&lt;br /&gt;What if you need to run your legacy Windows application on a Linux box, a Mac, or a Solaris-based workstation? To make the equation even more interesting throw in a few requirements -- add transferring old legacy accounting data over the network, or using the backed-up data from a CD-ROM. And yes, you want to keep the costs to a minimum. An open source project called Bochs may be your best option.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.vmware.com/"&gt;VMware&lt;/a&gt; is a (costly) commercial application that lets you run a guest operating system on a Windows or a Linux installation. &lt;a href="http://www.winehq.com/"&gt;Wine&lt;/a&gt;, on the other hand, though free, supports a very limited number of applications, and the same can be said about &lt;a href="http://www.codeweavers.com/products/crossover/"&gt;CrossOver Office&lt;/a&gt;. &lt;a href="http://www.netraverse.com/products/win4lin50/"&gt;WinLin&lt;/a&gt; does a little better, but it doesn't support Windows NT, 2000, or XP.&lt;br /&gt;And none of these alternatives run on Macintosh or SPARC-based hardware.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bochs.sourceforge.net/"&gt;Bochs&lt;/a&gt;, an open source project, may be a better answer. It emulates 286, 386, 486, Pentium, Pentium Pro, and AMD 64-bit CPUs, fooling the guest OS into thinking that it's running on real hardware. Bochs (pronounced "box") provides I/O emulation for a computer's standard parallel port, serial port, VGA card, disk, CD-ROM, timer chip, and network card, along with a custom BIOS.&lt;br /&gt;&lt;br /&gt;Emulating the x86 hardware is Bochs's strongest point. Bochs enables you to install Windows on a SPARC workstation or Debian on a Mac. However, hardware emulation deals a massive blow to the performance of the non-native operating systems.&lt;br /&gt;&lt;br /&gt;The Bochs Web site says that Bochs is an ideal operating system and application testing environment. Unfortunately, you need high-performance top-of-the-line hardware to use the emulated&lt;br /&gt;environment productively. But Bochs is an ideal teaching tool for operating system classes.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Installing Bochs&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://bochs.sourceforge.net/cgi-bin/topper.pl?name=Project+Page&amp;amp;url=http://sourceforge.net/projects/bochs"&gt;download&lt;/a&gt; the latest release of Bochs, 2.1.1, in various packages for various environment. For Linux, you can download either the source package (.tar.gz) or the RPM. The source package is a better option, as it allows you to specify various options during install.&lt;br /&gt;Change to the directory which houses the tarball, untar it, and run the configure script:&lt;br /&gt;&lt;blockquote&gt;tar zxvf bochs-2.1.1.tar.gz&lt;br /&gt;./configure --enable-ne2000 --enable-cdrom&lt;/blockquote&gt;The configure command tells Bochs to prepare the make files,&lt;br /&gt;enabling the network card and the CD-ROM. After configure has finished&lt;br /&gt;checking and generating the make files, issue the &lt;code&gt;make&lt;/code&gt; command. Then change to the super user (&lt;code&gt;su&lt;/code&gt;) and issue the &lt;code&gt;make install&lt;/code&gt; command.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Configuring Bochs&lt;/strong&gt;&lt;br /&gt;The Bochs operating environment is regulated by a single file, .bochsrc, which resides in the base directory.&lt;br /&gt;&lt;br /&gt;Before you can install an operating system using the new emulated hardware, you need to create a virtual hard disk. From the base directory issue the following command:&lt;br /&gt;&lt;blockquote&gt;$ bximage&lt;br /&gt;&lt;br /&gt;================================================================&lt;br /&gt;bximage&lt;br /&gt;Disk Image Creation Tool for Bochs&lt;br /&gt;$Id: bximage.c,v 1.19 2003/08/01 01:20:00 cbothamy Exp $&lt;br /&gt;================================================================&lt;br /&gt;&lt;br /&gt;Do you want to create a floppy disk image or a hard disk image?&lt;br /&gt;Please type hd or fd. [hd] hd&lt;br /&gt;&lt;br /&gt;What kind of image should I create?&lt;br /&gt;Please type flat, sparse or growing. [flat] flat&lt;br /&gt;&lt;br /&gt;Enter the hard disk size in megabytes, between 1 and 32255&lt;br /&gt;[10] 500&lt;br /&gt;&lt;br /&gt;I will create a 'flat' hard disk image with&lt;br /&gt;cyl=1015&lt;br /&gt;heads=16&lt;br /&gt;sectors per track=63&lt;br /&gt;total sectors=1023120&lt;br /&gt;total size=499.57 megabytes&lt;br /&gt;&lt;br /&gt;What should I name the image?&lt;br /&gt;[c.img]&lt;br /&gt;&lt;br /&gt;Writing: [] Done.&lt;br /&gt;&lt;br /&gt;I wrote 523837440 bytes to c.img.&lt;/blockquote&gt;The following line should appear in your .bochsrc:&lt;br /&gt;&lt;blockquote&gt;ata0-master: type=disk, path="c.img", mode=flat, cylinders=1015, heads=16, spt=63&lt;/blockquote&gt;In the session above I used bximage to create a 500MB drive named c.img.&lt;br /&gt;&lt;br /&gt;Now edit the .bochsrc file in your favorite text editor. Scroll down to the &lt;code&gt;ATA[0-3]-MASTER, ATA[0-3]-SLAVE&lt;/code&gt; section. Comment out everything below the example section by adding a # character in front of each line, then add the line as suggested by bximage above. Save the file, but don't close it yet.&lt;br /&gt;&lt;br /&gt;Starting from the top of the file under the section &lt;code&gt;ROMIMAGE&lt;/code&gt;, verify the location of the BIOS-bochs-latest file. This file resides in the bios/ directory which is under the installation directory.&lt;br /&gt;&lt;br /&gt;Next, specify the MEGS (the amount of memory the virtual system should emulate) you want. The default is 32. If you want to run DOS that should be enough. In the section &lt;code&gt;FLOPPYA:&lt;/code&gt; make sure floppya: points to the real diskette device. It's probably /dev/fd0, but check your /etc/fstab file if you're not sure. In the boot section specify the device you want to boot from. The default is floppy.&lt;br /&gt;Save and exit the file. Now you're ready to run the new virtual machine.&lt;br /&gt;What if you need to run your legacy Windows application on a Linux box, a Mac, or a Solaris-based workstation? To make the equation even more interesting throw in a few requirements --add transferring old legacy accounting data over the network, or using the backed-up data from a CD-ROM. And yes, you want to keep the costs to a minimum. An open source project called Bochs may be your best option.&lt;br /&gt;To start Bochs, issue this command from the command line:&lt;br /&gt;&lt;blockquote&gt;$ bochs&lt;br /&gt;&lt;br /&gt;================================================&lt;br /&gt;Bochs x86 Emulator 2.1.1&lt;br /&gt;February 08, 2004&lt;br /&gt;================================================&lt;br /&gt;00000000000i[     ] reading configuration from .bochsrc&lt;br /&gt;------------------------------&lt;br /&gt;Bochs Configuration: Main Menu&lt;br /&gt;------------------------------&lt;/blockquote&gt;This is the Bochs Configuration Interface, where you can describe the machine that you want to simulate.  Bochs has already searched for a configuration file (typically called bochsrc.txt) and loaded it if it could be found.  When you are satisfied with the configuration, go ahead and start the simulation.&lt;br /&gt;&lt;br /&gt;You can also start bochs with the &lt;code&gt;-q&lt;/code&gt; option to skip these menus.&lt;br /&gt;&lt;blockquote&gt;1. Restore factory default configuration&lt;br /&gt;2. Read options from...&lt;br /&gt;3. Edit options&lt;br /&gt;4. Save options to...&lt;br /&gt;5. Begin simulation&lt;br /&gt;6. Quit now&lt;br /&gt;&lt;br /&gt;Please choose one: [5]&lt;/blockquote&gt;You can begin the simulation by pressing Enter. After a lot of messages scroll across the screen, you'll see the emulation window, which is like the monitor of your new machine. But since the drive the isn't formatted, you will get an error. Time to get a disk image.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Installing a disk image&lt;/strong&gt;&lt;br /&gt;To format and partition the disk you just created, you need &lt;a href="http://www.freedos.org/freedos/files/"&gt;FreeDOS&lt;/a&gt;, which is a free version of DOS. The latest version of FreeDOS is beta9.&lt;br /&gt;&lt;br /&gt;Edit the .bochsrc file and scroll down to the section where you specified the hard disk image. The c.img file is the ata0-master device. Add the following line:&lt;br /&gt;&lt;blockquote&gt;ata0-slave: type=cdrom, path="/home/bodhi/freedos/fdbootcd.iso", status=inserted&lt;/blockquote&gt;Change the path to point to the location where the FreeDOS ISO resides. Save the file and exit.&lt;br /&gt;&lt;br /&gt;Run Bochs. From the main menu press 3 to edit the options, then press 8 to change disk options. Finally press 16 to change the boot device. Typing &lt;code&gt;cdrom&lt;/code&gt; will change the boot device for this session to CD-ROM. Press enter three times to return to the main menu and start the emulation. This time you'll see Bochs boot into DOS. Use fdisk to create partitions and format to format them.&lt;br /&gt;&lt;br /&gt;After you have formatted your disk, you need to re-edit your .bochsrc. Go to the disk section and comment out the &lt;code&gt;ata0-slave&lt;/code&gt; line you added earlier. In its place add this line:&lt;br /&gt;&lt;blockquote&gt;ata0-slave: type=cdrom, path=/dev/hdb, status=inserted&lt;/blockquote&gt;You can find the path to your CD-ROM drive from the /etc/fstab file.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Installing Windows&lt;/strong&gt;&lt;br /&gt;Now that your disk is partitioned it's time to install an operating system on it. I installed a licensed copy of Windows 98 Second Edition.&lt;br /&gt;&lt;br /&gt;Put the CD in the drive. Start bochs. Edit the Disk options to boot from the CD. Start the emulation. Windows will scan the disk first and then you'll be taken to the GUI installation. Once you are done, start Bochs by pressing Enter on the main menu. Voila! There's Windows right on your Linux desktop.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Mayank Sharma is a freelance technology writer and FLOSS migration consultant in New Delhi, India.&lt;/em&gt;&lt;br /&gt;&lt;blockquote&gt;tom@compaq:~$ cat sdk/bochs/bochsrc&lt;br /&gt;###############################################################&lt;br /&gt;# Configuration file for Bochs&lt;br /&gt;###############################################################&lt;br /&gt;&lt;br /&gt;# how much memory the emulated machine will have&lt;br /&gt;megs: 32&lt;br /&gt;&lt;br /&gt;# filename of ROM images&lt;br /&gt;romimage: file=/usr/share/bochs/BIOS-bochs-latest&lt;br /&gt;vgaromimage: file=/usr/share/vgabios/vgabios.bin&lt;br /&gt;&lt;br /&gt;# what disk images will be used&lt;br /&gt;floppya: 1_44=a.img, status=inserted&lt;br /&gt;&lt;br /&gt;# ata0-master&lt;br /&gt;ata0-master: type=disk, path="c.img", mode=flat, cylinders=1040, heads=16, spt=63&lt;br /&gt;&lt;br /&gt;# ata0-slave&lt;br /&gt;ata0-slave: type=cdrom, path="/home/tom/minix_R3.1.5-r5612.iso", status=inserted&lt;br /&gt;&lt;br /&gt;# choose the boot disk.&lt;br /&gt;boot: cdrom&lt;br /&gt;&lt;br /&gt;# where do we send log messages?&lt;br /&gt;log: bochsout.txt&lt;br /&gt;&lt;br /&gt;# disable the mouse&lt;br /&gt;mouse: enabled=0&lt;br /&gt;&lt;br /&gt;# enable key mapping, using US layout as default.&lt;br /&gt;keyboard_mapping: enabled=1, map=/usr/share/bochs/keymaps/x11-pc-us.map&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-7014548219987884641?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/7014548219987884641/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=7014548219987884641&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7014548219987884641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7014548219987884641'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/04/getting-started-with-bochs.html' title='Getting started with Bochs'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-4994003735685068193</id><published>2010-04-18T21:03:00.000-07:00</published><updated>2010-12-10T21:04:02.741-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Debian &amp; Android Development</title><content type='html'>&lt;strong&gt;Step 1, Java Development Enviroment&lt;/strong&gt;&lt;br /&gt;edit file "/ect/apt/sources.list" and add the following line&lt;br /&gt;&lt;blockquote&gt;deb http://ftp.us.debian.org/debian stable main contrib non-free&lt;/blockquote&gt;Install sun-java6-jdk / sun-java6-jre / sun-java6-bin, which were non-free packages.&lt;br /&gt;Use "java -version" to check that the java development enviroment is ok&lt;br /&gt;&lt;blockquote&gt;java version "1.6.0_12"&lt;br /&gt;Java(TM) SE Runtime Environment (build 1.6.0_12-b04)&lt;br /&gt;Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode, sharing)&lt;/blockquote&gt;If you have install gcc including the java development part, delete them (gij, gcj...etc) and make sure your system is using java 1.6 version&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 2, Eclipse Development IDE&lt;/strong&gt;&lt;br /&gt;Download eclipse3.4 from &lt;a href="http://www.eclipse.org" target="_blank"&gt;www.eclipse.org&lt;/a&gt; and unpack it to your folder, I didn't install it by apt-get..&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 3, Android SDK &amp;amp; Eclipse Plugin&lt;/strong&gt;&lt;br /&gt;Download android-sdk-linux_x86-1.5_r3 and ADT-0.9.1 from GoogleCode and install them as the manual said.&lt;br /&gt;&lt;br /&gt;At last, don't forget to show your helloworld screenshot.&amp;nbsp; ：）&lt;br /&gt;&lt;img src="http://pic.yupoo.com/lanyueniao/68355947b048/muoicfsw.jpg" alt="" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-4994003735685068193?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/4994003735685068193/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=4994003735685068193&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4994003735685068193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4994003735685068193'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/04/debian-android-development.html' title='Debian &amp; Android Development'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-5662149993873672183</id><published>2010-01-06T21:04:00.000-08:00</published><updated>2010-12-10T21:05:17.453-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Google'/><title type='text'>Spring 3.0 on Google App Engine</title><content type='html'>http://www.ardentlord.com/apps/blog/show/829881-spring-3-0-on-google-app-engine&lt;br /&gt;-- Note: If you just want the nitty gritty without my blabbing, ignore the first paragraph --&lt;br /&gt;&lt;br /&gt;So last week I got the inspiration to try out Google App Engine after reading about the new &lt;a href="http://googleappengine.blogspot.com/2009/04/seriously-this-time-new-language-on-app.html"&gt;Java support&lt;/a&gt;. I searched around to find some resources on getting Spring running on App Engine, but the resources were surprisingly scarce. Google points you to their &lt;a href="http://code.google.com/p/googleappengine/source/browse/#svn/trunk/java/demos/autoshoppe"&gt;"autoshoppe" example&lt;/a&gt;, which is a little incomplete in terms of setup and what libraries you need. Ironically, &lt;a href="http://blog.springsource.com/2009/04/07/write-your-google-app-engine-applications-in-groovy/"&gt;Spring Source's post about App Engine&lt;/a&gt; was talking about using Groovy, not Spring. Finally I found a &lt;a href="http://sikeh.javaeye.com/blog/364043"&gt;blog entry by Sikeh&lt;/a&gt;. So I got a nice Hello World up and running on Spring 2, thanks to Sikeh, but I wasn't satisfied yet. I wanted Spring 3. Spring 2 is so... 2008. So I started bringing in some Spring 3 (M2) jars, played around a little more, did some Googling, and finally got Spring 3 up and running.&lt;br /&gt;&lt;br /&gt;Here's how you'll need to setup the directory structure:&lt;br /&gt;&lt;ol&gt; &lt;li&gt;Setup a Google App Engine project (I used the &lt;a href="http://code.google.com/appengine/docs/java/tools/eclipse.html"&gt;Eclipse plugin&lt;/a&gt;)&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.springsource.com/download/community"&gt;Download Spring&lt;/a&gt; 3.0.0.M2 (or the latest version)&lt;/li&gt; &lt;li&gt;Copy the following jar files from Spring into the /war/WEB-INF/lib directory:&lt;br /&gt;org.springframework.beans-3.0.0.M2.jar&lt;br /&gt;org.springframework.context-3.0.0.M2.jar&lt;br /&gt;org.springframework.core-3.0.0.M2.jar&lt;br /&gt;org.springframework.expression-3.0.0.M2.jar&lt;br /&gt;org.springframework.web-3.0.0.M2.jar&lt;br /&gt;org.springframework.web.servlet-3.0.0.M2.jar&lt;/li&gt; &lt;li&gt;Spring also depends on the following jars, which you can search for around the internet, or download from my Spring Example git repository:&lt;br /&gt;antlr-3.0.1.jar&lt;br /&gt;asm-2.1.jar&lt;br /&gt;asm-commons-2.1.jar&lt;br /&gt;commons-logging-1.1.1.jar&lt;/li&gt; &lt;li&gt;Finally, you'll need to rename the commons-logging-1.1.1 jar to something else, like commons-logging.jar (thanks to Martin for &lt;a href="http://groups.google.com/group/google-appengine-java/browse_thread/thread/d88f23730971bb66/cfdfb4a504071e7d"&gt;this tip&lt;/a&gt;!)&lt;/li&gt;&lt;/ol&gt;Next, you'll need to configure your web.xml for Spring. In web.xml I added a catch-all mapping to my Spring dispatcher:&lt;br /&gt;&lt;pre class="brush: xml;light: true; fontsize: 100; first-line: 1; "&gt;&amp;lt;servlet&amp;gt;&lt;br /&gt;        &amp;lt;servlet-name&amp;gt;dispatcher&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;        &amp;lt;servlet-class&amp;gt;org.springframework.web.servlet.DispatcherServlet&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;        &amp;lt;load-on-startup&amp;gt;1&amp;lt;/load-on-startup&amp;gt;&lt;br /&gt;&amp;lt;/servlet&amp;gt;&lt;br /&gt;&amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;        &amp;lt;servlet-name&amp;gt;dispatcher&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;        &amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;&amp;lt;/servlet-mapping&amp;gt;&lt;/pre&gt;&lt;strong&gt;WARNING: &lt;/strong&gt;If you use a catch-all (/*) url-pattern, the application will not work in development mode (locally), but will work on the AppEngine server. I believe this is a known bug.&lt;br /&gt;&lt;br /&gt;For my dispatcher-servlet.xml: (also in /war/WEB-INF/)&lt;br /&gt;&lt;pre class="brush: xml;light: true; fontsize: 100; first-line: 1; "&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;beans xmlns="http://www.springframework.org/schema/beans"&lt;br /&gt;        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"&lt;br /&gt;        xmlns:context="http://www.springframework.org/schema/context"&lt;br /&gt;        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd&lt;br /&gt;        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"&amp;gt;&lt;br /&gt;        &amp;lt;context:component-scan base-package="example.controllers" /&amp;gt;&lt;br /&gt;        &amp;lt;bean id="viewResolver"&lt;br /&gt;                class="org.springframework.web.servlet.view.InternalResourceViewResolver"&lt;br /&gt;                p:prefix="/WEB-INF/views/" p:suffix=".jsp" /&amp;gt;&lt;br /&gt;&amp;lt;/beans&amp;gt;&lt;/pre&gt;You obviously want to change the base-package to whatever package you want. I use the InternalResourceViewResolver, and put all my views in /WEB-INF/views/. Finally, here's my (uninteresting) applicationContext.xml:&lt;br /&gt;&lt;pre class="brush: xml;light: true; fontsize: 100; first-line: 1; "&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"&lt;br /&gt;    "http://www.springframework.org/dtd/spring-beans-2.0.dtd"&amp;gt;&lt;br /&gt;&amp;lt;beans&amp;gt;&lt;br /&gt;&amp;lt;/beans&amp;gt;&lt;/pre&gt;Now we're all done with setup! Just create a controller and a view. I made a simple hello.jsp view that outputs the request parameter "name". Here's the controller:&lt;br /&gt;&lt;pre class="brush: java;light: true; fontsize: 100; first-line: 1; "&gt;package example.controllers.hello; &lt;br /&gt;&lt;br /&gt;import org.springframework.stereotype.Controller;&lt;br /&gt;import org.springframework.ui.Model;&lt;br /&gt;import org.springframework.web.bind.annotation.PathVariable;&lt;br /&gt;import org.springframework.web.bind.annotation.RequestMapping; &lt;br /&gt;&lt;br /&gt;@Controller&lt;br /&gt;public class HelloController {&lt;br /&gt;        @RequestMapping("/hello/{name}")&lt;br /&gt;        public String hello(@PathVariable String name, Model model) {&lt;br /&gt;                model.addAttribute("name", name);&lt;br /&gt;                return "hello/hello";&lt;br /&gt;        }&lt;br /&gt;}&lt;/pre&gt;So there you have it. Spring up and running on Google App Engine. You can see it in action at &lt;a href="http://springexample.appspot.com/"&gt;http://springexample.appspot.com/&lt;/a&gt;, or you can get the source at &lt;a href="http://github.com/idris/spring-example-gae/"&gt;http://github.com/idris/spring-example-gae/&lt;/a&gt;. For now, this is all just a Hello Wold. I'll post more functionality later... Feel free to suggest topics in the comments!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-5662149993873672183?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/5662149993873672183/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=5662149993873672183&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5662149993873672183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5662149993873672183'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/01/spring-30-on-google-app-engine.html' title='Spring 3.0 on Google App Engine'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-5307470303616356019</id><published>2009-12-20T21:06:00.000-08:00</published><updated>2010-12-10T21:06:28.661-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>溜798</title><content type='html'>&lt;img src="http://pic.yupoo.com/lanyueniao/26928947b04a/31okdlt6.jpg" border="0" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;"Good day"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;mdash;&amp;mdash;迪卡&amp;middot;凯恩&lt;br /&gt;&lt;br /&gt;&lt;span&gt;在这样的日子里&lt;br /&gt;我想变成一只肥嘟嘟的野猫&lt;br /&gt;在一个没有人的墙角&lt;br /&gt;打着哈欠伸着懒腰&lt;br /&gt;享受着冬日暖阳&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;那些干枯枯的枝丫上&lt;br /&gt;挂满了灵魂凋零的叶子&lt;br /&gt;在寒风中瑟缩着&lt;br /&gt;我本以为是槐花开了&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;把脑袋再往领子里缩一缩&lt;br /&gt;接着走吧&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-5307470303616356019?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/5307470303616356019/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=5307470303616356019&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5307470303616356019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5307470303616356019'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/12/798.html' title='溜798'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-4013277788581829474</id><published>2009-12-12T21:06:00.000-08:00</published><updated>2010-12-10T21:06:55.446-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>暴中轴线</title><content type='html'>&lt;img src="http://farm3.static.flickr.com/2602/4178288479_f9d7eae8bb.jpg" border="0" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;三环至四环之间&lt;br /&gt;中轴线西侧的建筑群挺有特色&lt;br /&gt;推荐感兴趣的同学前去观光&lt;br /&gt;此外&lt;br /&gt;这个季节&lt;br /&gt;森林公园适合两个人在傍晚时分散步&lt;br /&gt;当然也适合诱人的糖葫芦&lt;img style="border: 0px none;" src="http://public.blogbus.com/biaoqing/zhairen/13.gif" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://farm5.static.flickr.com/4038/4181049227_f89ac7b908_o.jpg" alt="" height="400/" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-4013277788581829474?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/4013277788581829474/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=4013277788581829474&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4013277788581829474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4013277788581829474'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/12/blog-post.html' title='暴中轴线'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm3.static.flickr.com/2602/4178288479_f9d7eae8bb_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-2447795374957634368</id><published>2009-12-07T21:05:00.000-08:00</published><updated>2010-12-10T21:05:57.410-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>linux线程同步</title><content type='html'>南极下了冻雨，北极熊都冻死了&lt;img src="http://public.blogbus.com/biaoqing/zhairen/10.gif" border="0" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;job_queue.h&lt;br /&gt;&lt;pre class="brush: cpp;light: true; fontsize: 100; first-line: 1; "&gt;#ifndef JOB_QUEUE_H_&lt;br /&gt;#define JOB_QUEUE_H_&lt;br /&gt;&lt;br /&gt;typedef struct job{&lt;br /&gt;  struct job* next;&lt;br /&gt;  char data;&lt;br /&gt;} job_t;&lt;br /&gt;&lt;br /&gt;void init_queue();&lt;br /&gt;void* eq_thread(void* arg);&lt;br /&gt;void* dq_thread(void* arg);&lt;br /&gt;&lt;br /&gt;#endif /* JOB_QUEUE_H_ */&lt;/pre&gt;job_queue.c&lt;br /&gt;&lt;pre class="brush: cpp;light: true; fontsize: 100; first-line: 1; "&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;malloc.h&amp;gt;&lt;br /&gt;#include &amp;lt;pthread.h&amp;gt;&lt;br /&gt;#include &amp;lt;semaphore.h&amp;gt;&lt;br /&gt;#include "job_queue.h"&lt;br /&gt;&lt;br /&gt;job_t* queue;&lt;br /&gt;pthread_mutex_t job_queue_mutex = PTHREAD_MUTEX_INITIALIZER;&lt;br /&gt;sem_t queue_count;&lt;br /&gt;&lt;br /&gt;void init_queue() {&lt;br /&gt;  queue = NULL;&lt;br /&gt;  sem_init(&amp;amp;queue_count, 0, 0);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void enqueue(job_t* new_job){&lt;br /&gt;  pthread_mutex_lock(&amp;amp;job_queue_mutex);&lt;br /&gt;  new_job-&amp;gt;next = queue;&lt;br /&gt;  queue = new_job;&lt;br /&gt;  sem_post(&amp;amp;queue_count);&lt;br /&gt;  pthread_mutex_unlock(&amp;amp;job_queue_mutex);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;job_t* dequeue() {&lt;br /&gt;  job_t* next;&lt;br /&gt;  sem_wait(&amp;amp;queue_count);&lt;br /&gt;  pthread_mutex_lock(&amp;amp;job_queue_mutex);&lt;br /&gt;  if(queue == NULL){&lt;br /&gt;    next = NULL;&lt;br /&gt;  } else {&lt;br /&gt;    next = queue;&lt;br /&gt;    queue = queue-&amp;gt;next;&lt;br /&gt;  }&lt;br /&gt;  pthread_mutex_unlock(&amp;amp;job_queue_mutex);&lt;br /&gt;  return next;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void* dq_thread(void* arg) {&lt;br /&gt;  job_t* next;&lt;br /&gt;&lt;br /&gt;  while(1) {&lt;br /&gt;    next = dequeue();&lt;br /&gt;    if(next!= NULL) {&lt;br /&gt;      fputc(next-&amp;gt;data, stderr);&lt;br /&gt;      free(next);&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void* eq_thread(void* arg) {&lt;br /&gt;  job_t* job;&lt;br /&gt;&lt;br /&gt;  while (1) {&lt;br /&gt;    job = (job_t*) malloc(sizeof(job_t));&lt;br /&gt;    job-&amp;gt;data = 'X';&lt;br /&gt;    enqueue(job);&lt;br /&gt;    sleep(1);&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;main.c&lt;br /&gt;&lt;pre class="brush: cpp;light: true; fontsize: 100; first-line: 1; "&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include "job_queue.h"&lt;br /&gt;&lt;br /&gt;int main(int argc, char** argv) {&lt;br /&gt;    pthread_t thread_1;&lt;br /&gt;    pthread_t thread_2;&lt;br /&gt;&lt;br /&gt;    init_queue();&lt;br /&gt;    pthread_create(&amp;amp;thread_1, NULL, &amp;amp;dq_thread, NULL);&lt;br /&gt;    pthread_create(&amp;amp;thread_2, NULL, &amp;amp;eq_thread, NULL);&lt;br /&gt;&lt;br /&gt;    pthread_join(&amp;amp;thread_1, NULL);&lt;br /&gt;    pthread_join(&amp;amp;thread_2, NULL);&lt;br /&gt;&lt;br /&gt;    return EXIT_SUCCESS;&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-2447795374957634368?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/2447795374957634368/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=2447795374957634368&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2447795374957634368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2447795374957634368'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/12/linux.html' title='linux线程同步'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-7826780390438822756</id><published>2009-11-25T21:10:00.000-08:00</published><updated>2010-12-10T21:10:37.935-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>故地重游</title><content type='html'>&lt;img src="http://farm3.static.flickr.com/2801/4042096267_498d6f543a.jpg" alt="" /&gt;&lt;br /&gt;这个季节&lt;br /&gt;外面的风景是美丽滴&lt;br /&gt;&lt;br /&gt;满山橘红色的柿子&lt;br /&gt;路旁一排排黄绿相间的白杨&lt;br /&gt;石壁上布满红彤彤的爬山虎&lt;br /&gt;宁静的小河上漂几片竹筏&lt;br /&gt;格兰外懒洋洋的阳光&lt;br /&gt;透过随风微微颤动的树叶在地上画上斑驳的身影&lt;br /&gt;还有古朴的小山村&lt;br /&gt;那一堵堵石头墙&lt;br /&gt;在岁月的敲打中迸开的一道道裂痕&lt;br /&gt;多出去走走吧&lt;br /&gt;&lt;br /&gt;&lt;img src="http://farm4.static.flickr.com/3494/4042108991_bfa4e5dac9.jpg" alt="" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-7826780390438822756?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/7826780390438822756/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=7826780390438822756&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7826780390438822756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7826780390438822756'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/11/blog-post_25.html' title='故地重游'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm3.static.flickr.com/2801/4042096267_498d6f543a_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-7309673573518990756</id><published>2009-11-18T21:07:00.000-08:00</published><updated>2010-12-10T21:07:25.956-08:00</updated><title type='text'>看客</title><content type='html'>看完《2012》&lt;br /&gt;等着看狮子座流星雨&lt;br /&gt;最近自己越发懒惰了&lt;br /&gt;懒得不想写任何东西&lt;br /&gt;只想在一个小店里坐着&lt;br /&gt;看橱窗外的车水马龙&lt;br /&gt;及那些匆忙赶路的人们&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-7309673573518990756?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/7309673573518990756/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=7309673573518990756&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7309673573518990756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7309673573518990756'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/11/blog-post.html' title='看客'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-6606368612625143210</id><published>2009-11-16T21:07:00.000-08:00</published><updated>2010-12-10T21:10:03.030-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>片刻安宁</title><content type='html'>在清华园的一个无人的足球场看台上呆坐一个下午&lt;br /&gt;&lt;br /&gt;阳光明媚&lt;br /&gt;&lt;br /&gt;天有点冷&lt;br /&gt;&lt;br /&gt;大礼堂外有些个着迷彩服的学生练唱歌&lt;br /&gt;&lt;br /&gt;应该又是个什么演出吧&lt;br /&gt;&lt;br /&gt;还有些个拍婚纱照的&lt;br /&gt;&lt;br /&gt;冬日暖阳 沧桑的建筑 衬托着洁白的婚纱&lt;br /&gt;&lt;br /&gt;去图书馆淘几本书&lt;br /&gt;&lt;br /&gt;书非借不能读也&lt;br /&gt;&lt;br /&gt;没地方借书可读&lt;br /&gt;一直是毕业后唯一让自己最头疼的事情&lt;br /&gt;&lt;br /&gt;计划买把好一点的吉他&lt;br /&gt;&lt;br /&gt;有些事情总要善始善终&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-6606368612625143210?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/6606368612625143210/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=6606368612625143210&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/6606368612625143210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/6606368612625143210'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/11/blog-post_16.html' title='片刻安宁'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-2424161427125902507</id><published>2009-11-12T21:08:00.000-08:00</published><updated>2010-12-10T21:28:56.156-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>第三场雪</title><content type='html'>已经是第三场雪了&lt;br /&gt;还是写点东西吧&lt;br /&gt;&lt;br /&gt;即便绚烂多彩的秋天很美丽&lt;br /&gt;仍旧最喜欢冬天&lt;br /&gt;将一切掩埋&lt;br /&gt;让你保持冷静&lt;br /&gt;&lt;br /&gt;一个陌生的城市&lt;br /&gt;晚上有人陪着喝酒&lt;br /&gt;是很难得的一件事&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration: line-through;"&gt;爱情不是怜悯&lt;br /&gt;也不是找保姆&lt;br /&gt;它悲喜交加&lt;br /&gt;让你笑，让你哭&lt;br /&gt;让你亢奋，也让你萎靡&lt;br /&gt;为什么不找喜欢的人呢？&lt;br /&gt;为什么不呢？？？&lt;br /&gt;大概是累了&lt;br /&gt;自我妥协了&lt;br /&gt;不想再坚持了&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;你相信那些命运所说的吗？&lt;br /&gt;我不知道&lt;br /&gt;也罢&lt;br /&gt;随ta&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-2424161427125902507?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/2424161427125902507/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=2424161427125902507&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2424161427125902507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2424161427125902507'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2010/11/blog-post_12.html' title='第三场雪'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-5268404088223361961</id><published>2009-11-01T21:09:00.000-08:00</published><updated>2010-12-10T21:09:49.369-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>第一场雪</title><content type='html'>1、北京初雪&lt;br /&gt;&lt;br /&gt;2、迁至新源里 琨莎对面&lt;br /&gt;&lt;br /&gt;3、WeRunner Beijing Group二次小聚&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-5268404088223361961?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/5268404088223361961/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=5268404088223361961&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5268404088223361961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5268404088223361961'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/11/blog-post_01.html' title='第一场雪'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-3112247420392278443</id><published>2009-10-10T21:11:00.000-07:00</published><updated>2010-12-10T21:11:44.534-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>今天台湾国庆节来着</title><content type='html'>向所有发来贺电的筒子们致意真诚的谢意&lt;br /&gt;&lt;br /&gt;若不是下午老大提醒又会忘记了&lt;br /&gt;&lt;br /&gt;晚上跟涛哥去麻辣香锅&lt;br /&gt;&lt;br /&gt;近期身高增至174+, 体重下降至110-&lt;br /&gt;&lt;br /&gt;长了三个月的头发开始有点上次六个月的感觉了&lt;br /&gt;&lt;br /&gt;乐子一则：某人下车，忽内急，遂入一动车行便，顷，车始行..&lt;br /&gt;&lt;br /&gt;&lt;img style="border: 0px;" src="http://farm4.static.flickr.com/3452/3999232605_2c4d327b1c.jpg" alt="" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-3112247420392278443?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/3112247420392278443/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=3112247420392278443&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3112247420392278443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3112247420392278443'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/10/blog-post.html' title='今天台湾国庆节来着'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm4.static.flickr.com/3452/3999232605_2c4d327b1c_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-7761276288745915470</id><published>2009-09-26T21:11:00.000-07:00</published><updated>2010-12-10T21:12:16.018-08:00</updated><title type='text'>关于逝去</title><content type='html'>我们每个人都有可能随时死去.&lt;br /&gt;&lt;br /&gt;而且，我们也终究都会逝去&lt;br /&gt;&lt;br /&gt;所以，我并不祈求上苍给了我多少时间，只管近自己最大的每天努力去拼..&lt;br /&gt;&lt;br /&gt;《Knowing》里的两种理论&lt;br /&gt;&lt;br /&gt;：一切都是事先安排好的，包括地球和太阳的距离正好可以使生物繁衍，包括04年的秋天正好有58个人走在一起&lt;br /&gt;&lt;br /&gt;：一切都是随机产生的，包括出生、死亡，生命中某些人的出现和离开，包括我们的所想所作都是没有意义的..&lt;br /&gt;&lt;br /&gt;兄弟，走好&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-7761276288745915470?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/7761276288745915470/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=7761276288745915470&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7761276288745915470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7761276288745915470'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/09/blog-post.html' title='关于逝去'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-7633376956558655820</id><published>2009-09-21T21:12:00.000-07:00</published><updated>2010-12-13T04:03:15.981-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>多线程理论 之 如何有效的使用公厕</title><content type='html'>记得小时候，在一个陈旧的书房里翻出一本《寓言》，有文曰《两小儿辩日》.其实，我更希望他们两个在下棋。棋盘只有一个，棋手有两名，每个人下完后都会播一下旁边的计时器，并说：我下完了，该你了&lt;br /&gt;&lt;br /&gt;突然间这又让我联想到好多的人去挤公厕。当你神清气爽后，从容走出，放眼望去，芸芸众生皆手捂住下体，脸上挂着隐忍的表情。这时，你喊了句：大爷爽完了， 该你们了。然后众人便疯狂涌向门口。但是，地球人都知道：一次只能进去一个人，而生物界内的竞争经常会导致种间或者种内斗争，于是会演变为暴力，人们互相 争抢，有肯能会导致一些人永远没有机会而导致活人被尿憋死。这不是我们想看到的。&lt;br /&gt;&lt;br /&gt;于是乎，世间产生了&amp;ldquo;规则&amp;rdquo;这个词儿，排队！&lt;br /&gt;我们安排一急具权威的管理员坐在门口，给第一个人一个令牌，上书：大内密探，急入厕，如有拦着，格杀勿论&lt;br /&gt;这时，我们有很多个规则&lt;br /&gt;1, 免费公厕：每个人只能爽一次，名单都在内部墙壁上，入厕者爽完之后划去自己的名字，出门告诉管理员下一个人名，管理员把令牌给这个人&lt;br /&gt;2, 收费公厕：每个人要攒钱，谁最先攒够多少的资本就优先拿到令牌&lt;br /&gt;3, 皇宫公厕：皇帝贵族有优先使用权力&lt;br /&gt;4, ......&lt;br /&gt;我们的目标是建设社会主义下的有组织有纪律的入厕方案&lt;br /&gt;&lt;br /&gt;下面只是一个特例，比如你和一个姑娘同住，约法三章：轮流使用洗手间，并且不能连续2次使用；&lt;br /&gt;该理论适用于任何公用物品，因为所谓线程同步就是因为竞争公用资源导致的，比如黑板，租车，小时候和弟弟妹妹抢唯一的一个口琴玩....&lt;br /&gt;&lt;pre class="brush: java;light: true; fontsize: 100; first-line: 1; "&gt;public class YouAndGirl {&lt;br /&gt;    public static void main(String[] args) {&lt;br /&gt;        boolean[] toilet = new boolean[1];&lt;br /&gt;        new Thread(new You(toilet)).start();&lt;br /&gt;        new Thread(new Girl(toilet)).start();&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;pre class="brush: java;light: true; fontsize: 100; first-line: 1; "&gt;class You implements Runnable {&lt;br /&gt;    protected boolean[] mutex = null;&lt;br /&gt;&lt;br /&gt;    public You(boolean[] mutex) {&lt;br /&gt;        this.mutex = mutex;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @Override&lt;br /&gt;    public void run() {&lt;br /&gt;        for (;;) {&lt;br /&gt;            synchronized (mutex) {&lt;br /&gt;                while (mutex[0]) {&lt;br /&gt;                    try { mutex.wait(); } catch (InterruptedException e) { }&lt;br /&gt;                }&lt;br /&gt;                System.out.print("A");&lt;br /&gt;                mutex[0] = true;&lt;br /&gt;                mutex.notifyAll();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;pre class="brush: java;light: true; fontsize: 100; first-line: 1; "&gt;class Girl implements Runnable {&lt;br /&gt;&lt;br /&gt;    protected boolean[] mutex = null;&lt;br /&gt;&lt;br /&gt;    public Girl(boolean[] mutex) {&lt;br /&gt;        this.mutex = mutex;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @Override&lt;br /&gt;    public void run() {&lt;br /&gt;        for (;;) {&lt;br /&gt;            synchronized (mutex) {&lt;br /&gt;                while (!mutex[0]) {&lt;br /&gt;                    try { mutex.wait(); } catch (InterruptedException e) { }&lt;br /&gt;                }&lt;br /&gt;                System.out.print("B");&lt;br /&gt;                mutex[0] = false;&lt;br /&gt;                mutex.notifyAll();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-7633376956558655820?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/7633376956558655820/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=7633376956558655820&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7633376956558655820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7633376956558655820'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/09/blog-post_21.html' title='多线程理论 之 如何有效的使用公厕'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-1994424388210172247</id><published>2009-09-08T21:13:00.000-07:00</published><updated>2010-12-10T21:14:28.900-08:00</updated><title type='text'>十三陵暴走</title><content type='html'>6:00爬起洗簌，13线(知春路)转2线抵积水潭，B口出东行至德胜门(6:50)&lt;br /&gt;路南一小店早点，豆腐脑及油炸食品&lt;br /&gt;7:15行 至345站&lt;br /&gt;7:40+左右前往朝凤庵&lt;br /&gt;略.&lt;br /&gt;集合后，出发&lt;br /&gt;&lt;br /&gt;&lt;img src="http://farm3.static.flickr.com/2631/3920159074_3b1221d84a.jpg" alt="" width="500" height="375" /&gt;&lt;br /&gt;&lt;br /&gt;中石化昌平会议中心&lt;br /&gt;十三陵水库管理处（貌似有个厕所）&lt;br /&gt;右侧高尔夫球场及大坝&lt;br /&gt;沿路前行，有一队结婚车打酱油路过&lt;br /&gt;然后 就是沿着水库路走啊走阿走啊&lt;br /&gt;印象中到了一个地方左拐然后右拐，有人买了水和食物&lt;br /&gt;到一个路口排了长长一队的货车&lt;br /&gt;然后走啊走到一个 &amp;ldquo;十三陵欢迎您&amp;rdquo;的大路牌，门票30米&lt;br /&gt;又是漫漫长路&lt;br /&gt;应该是沿着胡泰路走的，因为路过一个柿子山庄和雪世界滑雪场&lt;br /&gt;之后右拐沿万西路 抵悼陵监，路有乌鸦叫，及遇牛数头&lt;br /&gt;右行到达思陵碑合影，走的时候在想：门口那个无头石像来一句いってらしゃい&lt;br /&gt;后沿石头路上行沿万西路继续 走阿走啊&lt;br /&gt;万娘坟，一面旧城墙一颗很粗的树还有无处安放的春情&lt;br /&gt;上行遇重污染卡车数辆，穿过一座桥，右拐沿环陵路抵昭陵博物馆，有一个大屏幕&lt;br /&gt;东 行小憩，炒饼，第一小组撤退（可以找到那个餐馆的房顶XD）&lt;br /&gt;向上抵达定陵，上行至昌赤路，左行&lt;br /&gt;裕陵，茂陵，康陵，泰陵（应该是最远的那个 了，而且，这里有个厕所，小喇叭没电了）&lt;br /&gt;沿昌赤路返回至庆陵（应该是这个地方有人喊着：里面是果园子，别往里进！）&lt;br /&gt;献陵&lt;br /&gt;之后是长 陵，景陵村，烤鸡翅及另外一个厕所&lt;br /&gt;环陵路至永陵（两头牛一头毛驴在吃草）&lt;br /&gt;说是永陵上行500米即德陵，而我们则左拐左拐再左拐&lt;br /&gt;从 下面沿着北新村绕了一圈&lt;br /&gt;然后下去到水库路坐车返回至345站&lt;br /&gt;&lt;br /&gt;&lt;img src="http://farm3.static.flickr.com/2511/3919418985_891e13a4ee.jpg" alt="" width="500" height="375" /&gt;&lt;br /&gt;&lt;br /&gt;注：凭记忆及Google Map杜撰，略有出入&lt;br /&gt;更多细节关注&lt;a href="http://www.douban.com/group/topic/7920891/" target="_blank"&gt;这里&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;实验结果&lt;br /&gt;-------------------------------------------------------------------&lt;br /&gt;左脚磨泡若干（其中大拇指上2枚），泡破，磨干，磨出点点鲜红&lt;br /&gt;右脚磨泡，未破，膝盖部位有拉伤，第四脚趾指甲丢失一半&lt;br /&gt;右臂无法抬至肩膀以上&lt;br /&gt;左臂幸存&lt;br /&gt;实验结论：帆布随好，可以让你感受到大地的质感，但真不适宜远足&lt;img style="padding: 0px; margin: 0px; border: 0px;" src="http://public.blogbus.com/biaoqing/nownow/12.gif" border="0" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://farm3.static.flickr.com/2436/3919351259_b3b710dc1f.jpg" alt="" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-1994424388210172247?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/1994424388210172247/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=1994424388210172247&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1994424388210172247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1994424388210172247'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/09/blog-post_08.html' title='十三陵暴走'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm3.static.flickr.com/2631/3920159074_3b1221d84a_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-1481176125473700137</id><published>2009-09-05T21:14:00.000-07:00</published><updated>2010-12-10T21:15:08.210-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>这一天</title><content type='html'>&lt;img style="margin: 0px; padding: 0px; border: 0px;" src="http://farm3.static.flickr.com/2600/3887745382_9161b5692c.jpg" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;早上下雨，很大很大..&lt;br /&gt;&lt;br /&gt;从家门走到地铁的过程，背包被淋湿，裤腿被淋湿..&lt;br /&gt;&lt;br /&gt;每天固定时间起床，乘固定点的那趟车，整洁的就像白纸上标直的铅笔线条...&lt;br /&gt;&lt;br /&gt;地铁上电话想起，旁边一哥们掏出他的手机看了看，又放回去，这时才明白是自己的手机在响，这该死的Nokia铃声&lt;br /&gt;&lt;br /&gt;卓越上订购的石头送达，同时收到公司为每个月度过生日的人发的礼金&lt;br /&gt;&lt;br /&gt;到处标着&amp;ldquo;开复老师离职&amp;rdquo;的头条，同时自己邮箱收到另一个离职内幕，一个乐子，也是一个悲哀&lt;br /&gt;&lt;br /&gt;邮件，呵呵，最近发现每天收到的Email数量远远超过收到的短信量&lt;br /&gt;&lt;br /&gt;一个人久了，会经常忘记带手机，会想着买各种各样的鞋，会期待着到很远很远的地方....&lt;br /&gt;&lt;br /&gt;收到老鬼的消息，天气突变，原定周六130的暴走计划推迟至周末&lt;br /&gt;&lt;br /&gt;如果周末继续下，推迟至下周，下周还下，继续推，再下，就找面墙去撞&lt;br /&gt;&lt;br /&gt;不过这样也好，周六就可以去新浪的Python讲座，或者是去轩辕互动的Coding for Fun&lt;br /&gt;&lt;br /&gt;twitter被封，饭否被禁，而后有了围脖，咪咪.... 他们一向只许州官放火，不许百姓点灯&lt;br /&gt;&lt;br /&gt;美国人发明东西，日本人把东西做好，韩国人把东西做烂，中国人把东西做得大家没钱赚&lt;br /&gt;&lt;br /&gt;想到上次Open pary上某研究院对于Ophone＆Open source以及赚钱的认识&lt;br /&gt;&lt;br /&gt;而后看到他们回去写文章的技巧，对Open party只字未提，大有CNN风范&lt;br /&gt;&lt;br /&gt;说实话，自己自心底的严重BS这种恶俗低劣的行为，MD（一种音乐设备）&lt;br /&gt;&lt;br /&gt;在路灯下溜达了3个站的路程，而后才有心情搭上末班回家&lt;br /&gt;&lt;br /&gt;这段时间，自己极力避开听一些音乐，看一些文章&lt;br /&gt;&lt;br /&gt;可每一次这些东西都会不经意间跳出来，在你面前活灵活现&lt;br /&gt;&lt;br /&gt;洗澡的时候，切菜的时候，路上踢到一颗小石头的时候...&lt;br /&gt;&lt;br /&gt;能够自我安慰的是，始终在思考；&lt;br /&gt;&lt;br /&gt;人的一生，刨去幼年和老年，以及睡觉、吃饭等时间，剩下的没多少了&lt;br /&gt;&lt;br /&gt;即便我们醒着时间很多，思考的时间却很少&lt;br /&gt;&lt;br /&gt;曾经有一段时间乘地铁的时候特别喜欢观察人们的神情，眼神，并揣测他们在想什么..&lt;br /&gt;&lt;br /&gt;&amp;ldquo;每天花2个小时在车上，意味着1年的12个月中有一个整月是在车上度过&amp;rdquo;&lt;br /&gt;&lt;br /&gt;每次想到这个都感到十分的恐惧和内疚&lt;br /&gt;&lt;br /&gt;"你说他是不是非主流"，这是两位同事关于我的讨论&lt;br /&gt;&lt;br /&gt;事实上，根本没有什么主流和非主流，这是个相对的中性词，我只是一直极力保留自己原本的样子&lt;br /&gt;&lt;br /&gt;那个数夜逃课不归，每天爬在桌子上睡觉，雨天一身臭汗飞奔球场&lt;br /&gt;&lt;br /&gt;数次与老师们发生冲突甩门而去并在教学楼的一角深深刻下&amp;ldquo;我有理由为我之所以为我而存在&amp;rdquo;的短语的孩子长得稍微大点的样子&lt;br /&gt;&lt;br /&gt;迷失，是一件很可怕的事情，而事物的质变源自内因，外因只是推动作用&lt;br /&gt;&lt;br /&gt;你可以控制很多事情，而多数人往往忽视这一点&lt;br /&gt;&lt;br /&gt;Impossible is nothing, 我喜欢那些广告词&lt;br /&gt;&lt;br /&gt;"鸟，来到这个世上不是为了躲枪子，是为了做它应该做的事情的。如果因为做了应该做的事情而注定要挨枪子，那就认了"&lt;br /&gt;&lt;br /&gt;以上是老罗在吉大演讲中的句子&lt;br /&gt;&lt;br /&gt;在BBS上翻到一个谈理想的帖子，一位同学道：小时候我们都抱着远大的理想，想做就做，现在，呵呵...&lt;br /&gt;&lt;br /&gt;炼金术士的原则：等价交换&lt;br /&gt;&lt;br /&gt;你们只是害怕失去，然而又有什么是不可以失去的，反正终究会失去，只是个过程而已？&lt;br /&gt;&lt;br /&gt;这本身就是一个混沌，物质，精神，道德，伦理....&lt;br /&gt;&lt;br /&gt;回来的路上听一路的歌，那些以前没注意到的东西在经历过一些事情后竟发现是如此的唯美&lt;br /&gt;&lt;br /&gt;现在又是凌晨1:30，插着耳机睁一只眼闭一只眼的写这些文字&lt;br /&gt;&lt;br /&gt;很累，很困，但要坚持&lt;br /&gt;&lt;br /&gt;人的一生中，有一些重要东西往往是因为丁点的松懈而消逝，很远很远....&lt;br /&gt;&lt;br /&gt;我，只是一个普通人，偶尔想些事情，写点程序..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-1481176125473700137?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/1481176125473700137/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=1481176125473700137&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1481176125473700137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1481176125473700137'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/09/blog-post_05.html' title='这一天'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm3.static.flickr.com/2600/3887745382_9161b5692c_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-601923235276942361</id><published>2009-08-28T21:15:00.000-07:00</published><updated>2010-12-10T21:15:40.850-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>人来人往</title><content type='html'>&lt;span style="color: #993300;"&gt;凌晨的 王府井大街路边凳子上睡着的那些无家可归和有家不回的人勾起我想和他们&lt;/span&gt;&lt;span style="color: #993300;"&gt;一起&lt;/span&gt;&lt;span style="color: #993300;"&gt;坐教堂门口一直聊天到天亮的强烈欲望&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #993300;"&gt;眼袋消 完后那没有血色的眼角膜是你被岁月摧残即便是像野狗一样疯狂反抗最终依旧会败下阵并开始被苍老吞噬的最好的例证&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://farm3.static.flickr.com/2502/3864188635_9e6ef58d3b.jpg" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;送李伟&lt;br /&gt;&lt;br /&gt;12点多从机场回到王府井&lt;br /&gt;&lt;br /&gt;溜达过那条街已是凌晨1点半&lt;br /&gt;&lt;br /&gt;在灯市口站旁边的南苑e家住一晚&lt;br /&gt;&lt;br /&gt;早上9点背着包上班去&lt;br /&gt;&lt;br /&gt;完鸟&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-601923235276942361?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/601923235276942361/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=601923235276942361&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/601923235276942361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/601923235276942361'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/08/blog-post.html' title='人来人往'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm3.static.flickr.com/2502/3864188635_9e6ef58d3b_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-2438043348526708934</id><published>2009-08-23T21:15:00.000-07:00</published><updated>2010-12-10T21:16:10.578-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>草原他乡</title><content type='html'>&lt;img src="http://farm3.static.flickr.com/2636/3858768723_f5098b468d.jpg" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;沉睡中的城市&lt;br /&gt;&lt;br /&gt;出城一路向北&lt;br /&gt;&lt;br /&gt;京北，多山&lt;br /&gt;&lt;br /&gt;隧道、河流、大片风力发电，山间绕来绕去&lt;br /&gt;&lt;br /&gt;沙城，赤城，雕鹗镇，清真风格建筑&lt;br /&gt;&lt;br /&gt;向北6个多小时丰宁满族自治县继续，大滩镇，再北就是蒙古.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://farm3.static.flickr.com/2568/3859581704_89ac1677a9.jpg" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;东衫国际假日酒店（GoogleMap坐标 41.609974, 116.003188）温室花园，令人吃惊的蓝天，浮云，空气.&lt;br /&gt;&lt;br /&gt;骑马，听养马人的故事&lt;br /&gt;&lt;br /&gt;夜晚的篝火、烤羊，大厅到12点，星辰，背单词1点&lt;br /&gt;&lt;br /&gt;7:30起，冬日暖阳&lt;br /&gt;&lt;br /&gt;6辆吉普撒欢儿，羊肠小路上飞奔，野性的风，躺在后面看天，灰机，后面的滚滚红尘，路人&lt;br /&gt;&lt;br /&gt;真正的小山村，陈旧的土房（影视《我的父亲母亲》），石头墙，草原平坦的河流，羊群，远处山坡上一簇簇灌木丛，远处的白桦林，草间不知名的虫叫&lt;br /&gt;&lt;br /&gt;蓝天，白云，暖阳，肥沃的草地，蜿蜒小河，羊群，马儿，小山村，白桦林，车轮，野花，山泉...&lt;br /&gt;&lt;br /&gt;：这就是我想要的生活&lt;br /&gt;&lt;br /&gt;回来用了8个多小时 － －！&lt;br /&gt;&lt;br /&gt;在此招募人马国庆节，去看层林尽染&lt;br /&gt;&lt;br /&gt;&lt;img src="http://farm4.static.flickr.com/3480/3858768811_5520f91477.jpg" alt="" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-2438043348526708934?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/2438043348526708934/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=2438043348526708934&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2438043348526708934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2438043348526708934'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/08/blog-post_23.html' title='草原他乡'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm3.static.flickr.com/2636/3858768723_f5098b468d_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-6461600867066279366</id><published>2009-08-21T21:16:00.000-07:00</published><updated>2010-12-10T21:16:40.407-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>璐璐鱼头签</title><content type='html'>2点爬床7点爬起&lt;br /&gt;目标：东直门外大街26号&lt;br /&gt;8:05抵达，用时53分钟&lt;br /&gt;&lt;br /&gt;如果不想拥挤的地铁，要么起早（7点以前），要么晚起（10点以后，不过会有一些老人和孩子）；&lt;br /&gt;遇到第一个推销机票的，不好意思拒绝&lt;br /&gt;遇到第二个的时候，不得已告诉他&amp;ldquo;不好意思，其实已经定过了&amp;rdquo;&lt;br /&gt;然后，看到第一个推销者奇怪的表情&lt;br /&gt;&lt;br /&gt;自从搬到三层后，消息就一直很闭塞&lt;br /&gt;中午抽风的去了趟十二层，被告知去领体检卡；进门被问：够30岁了吗？&lt;br /&gt;我这刚过20没多久的人有那么苍老吗..&lt;br /&gt;&lt;img src="http://public.blogbus.com/biaoqing/nownow/34.gif" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;晚7点，坐在地铁门口听一个人拉小提琴&lt;br /&gt;我的认知中，大街上的乐者大致上分以下三种&lt;br /&gt;1、职业级的流浪歌手，总会在城市的某个角落里经常见到他们&lt;br /&gt;2、业余爱好者，闲暇之余，溜达溜达，给大伙儿带来些许快乐&lt;br /&gt;3、怕在家练琴影响邻里而转移至大街者&lt;br /&gt;&lt;br /&gt;跟璐璐同学去鱼头...&lt;br /&gt;1年没见，头发短了&lt;br /&gt;别人说胖了&lt;br /&gt;自己没怎么觉得&lt;br /&gt;倒是更熟了&lt;br /&gt;此外，我真的长高了吗？&lt;br /&gt;有机会找个许久不见的人来证实以下..&lt;br /&gt;&lt;br /&gt;最后&lt;br /&gt;对地铁通道里喊我名字的那位靓丽的姑娘说&lt;br /&gt;对不起，最近视力急剧下降，没看清恁是哪个？&lt;br /&gt;不过，漂亮是肯定的&lt;br /&gt;&lt;img src="http://public.blogbus.com/biaoqing/nownow/33.gif" alt="" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-6461600867066279366?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/6461600867066279366/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=6461600867066279366&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/6461600867066279366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/6461600867066279366'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/08/blog-post_21.html' title='璐璐鱼头签'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-4223085612935433641</id><published>2009-08-19T21:16:00.000-07:00</published><updated>2010-12-10T21:17:08.391-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>那些天</title><content type='html'>&lt;img src="http://farm3.static.flickr.com/2656/3833779215_70156c0574.jpg" alt="" width="500" height="342" /&gt;&lt;br /&gt;我喜欢穿着靴子扯着风筝到处跑，直到风筝挂到树上或者高压电线上&lt;br /&gt;&lt;br /&gt;我喜欢五月里飘香的槐花和那一墙绿油油的爬山虎&lt;br /&gt;&lt;br /&gt;我喜欢小动物，即便是7岁的时候养死过一直兔子以后再也没讲过任何东西&lt;br /&gt;&lt;br /&gt;我喜欢浮动的水草，悠闲的鱼儿，以及芦苇丛中时不时窜出来不知名的鸟儿&lt;br /&gt;&lt;br /&gt;我喜欢小时候家门口的那片林子，印象中记得每一棵树的位置和样貌&lt;br /&gt;&lt;br /&gt;我喜欢宁静的夜晚，躺在席子上，听着草从中蟋蟀的吱吱声，数满天空一闪一闪的星星&lt;br /&gt;&lt;br /&gt;我喜欢下雨天，坐在门口，看院子里梧桐树下溅起的一个个水泡&lt;br /&gt;----------------------------------------------------&lt;br /&gt;以前奶奶家有一颗巨大的桐树，要三个人手拉手才能抱起来&lt;br /&gt;树上有好多洞洞，里面住过啄木鸟、猫头鹰还有马蜂&lt;br /&gt;12岁那年，树死了，树干中间都空掉了&lt;br /&gt;我仔细的数过那个年轮，有30多圈&lt;br /&gt;----------------------------------------------------&lt;br /&gt;&lt;br /&gt;我喜欢路边那厚厚的落叶，还有傍晚十分远处飘起的袅袅青烟&lt;br /&gt;&lt;br /&gt;我喜欢某一天醒来的时候哦，大雾弥漫&lt;br /&gt;&lt;br /&gt;我喜欢听一晚上簌簌的飘雪声，第二天早起数地上喜鹊们的脚印&lt;br /&gt;&lt;br /&gt;我喜欢到一个杳无人烟的地方，躺在大片的雪地里，听远处树林传来阵阵的伐木声&lt;br /&gt;&lt;br /&gt;我喜欢寒冷冬天，室外篝火架上的炉子冒出一股股的热气&lt;br /&gt;&lt;br /&gt;我喜欢出生后的那个季节，即使不管自己怎么努力，都只能想起3/4岁以后的事情&lt;br /&gt;&lt;br /&gt;其实，只要是发生过的事情，我们都会永远记得&lt;br /&gt;&lt;br /&gt;所说的忘记，只是不愿意想起&lt;br /&gt;&lt;br /&gt;12岁的那年&lt;br /&gt;冬天有大雪，冰榴，结冰的池塘，人和鸟的脚印，火炉，长靴；&lt;br /&gt;春天有花草，虫子，清新的茶树；&lt;br /&gt;夏天有知了，莲藕，板栗，蜈蚣，树荫和小说；&lt;br /&gt;秋天有桑枣和美丽的地霜，还有成群结队的伙伴；&lt;br /&gt;如今只剩下水泥和汽车....&lt;br /&gt;&lt;br /&gt;2009/08/19 03:08 北京 雨夜&lt;br /&gt;---------------------------------------------------------&lt;br /&gt;最后，我讨厌一篇日志写三次&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-4223085612935433641?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/4223085612935433641/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=4223085612935433641&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4223085612935433641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4223085612935433641'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/08/blog-post_19.html' title='那些天'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm3.static.flickr.com/2656/3833779215_70156c0574_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-8495447951116863615</id><published>2009-08-09T21:17:00.000-07:00</published><updated>2010-12-10T21:18:08.166-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>小蜡笔</title><content type='html'>&lt;img src="http://farm3.static.flickr.com/2667/3800566513_28ee1fbd12.jpg" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;每个人都应该用自己的双手&lt;br /&gt;&lt;br /&gt;像小时候一样&lt;br /&gt;&lt;br /&gt;用蜡笔把天空涂成五颜六色&lt;br /&gt;&lt;br /&gt;周末是自己的&lt;br /&gt;&lt;br /&gt;背着电脑去一个安静、温馨而又可以满地打滚的地方&lt;br /&gt;&lt;br /&gt;通宵达旦的做自己想做的事情&lt;br /&gt;&lt;br /&gt;Coding~ :-)&lt;br /&gt;&lt;br /&gt;蹲坐在宾馆的地毯上看电子书&lt;br /&gt;&lt;br /&gt;床上的同学睡的正香&lt;br /&gt;&lt;br /&gt;电视里播着一个称作《快乐女生》的节目&lt;br /&gt;&lt;br /&gt;很轻很轻的歌声～熟睡的喘气声～键盘声～&lt;br /&gt;&lt;br /&gt;窗帘外夜幕中足球场边的小路&lt;br /&gt;&lt;br /&gt;在路灯的的偎依下&lt;br /&gt;&lt;br /&gt;暖暖的&lt;br /&gt;&lt;br /&gt;这是一个安静的夜晚&lt;br /&gt;&lt;br /&gt;同时，也是一个容易让人思考、想念、陷入纠结的夜晚&lt;br /&gt;&lt;br /&gt;甜蜜的、温暖的、伤心的...&lt;br /&gt;&lt;br /&gt;藏在记忆中的那个夏天&lt;br /&gt;&lt;br /&gt;2009/08/07(秋)&lt;br /&gt;&lt;br /&gt;时间点 12:34:56 按照HH:MM:SS:d:m:y的格式是 12:34:56:7:8:9&lt;br /&gt;&lt;br /&gt;2009/08/08(奥)&lt;br /&gt;&lt;br /&gt;2009/09/09&lt;br /&gt;&lt;br /&gt;2009/10/10&lt;br /&gt;&lt;br /&gt;...........&lt;br /&gt;&lt;br /&gt;时间过得好快...&lt;br /&gt;&lt;br /&gt;努力~&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-8495447951116863615?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/8495447951116863615/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=8495447951116863615&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8495447951116863615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8495447951116863615'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/08/blog-post_09.html' title='小蜡笔'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm3.static.flickr.com/2667/3800566513_28ee1fbd12_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-97345089805860647</id><published>2009-07-29T21:18:00.000-07:00</published><updated>2010-12-10T21:18:40.114-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>Busy or Easy</title><content type='html'>&lt;img style="border: 0px none; margin: 0px; padding: 0px;" src="http://valgrind.org/images/st-george-dragon.png" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;马儿好&lt;br /&gt;&lt;br /&gt;马儿跑&lt;br /&gt;&lt;br /&gt;我的马儿不吃草&lt;br /&gt;&lt;br /&gt;冲啊~~冲啊~~哈~~！&lt;br /&gt;&lt;br /&gt;&lt;object classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" width="452" height="33" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"&gt;&lt;param name="windowlessvideo" value="true" /&gt;&lt;param name="url" value="http://cdn1-52.projectplaylist.com/e1/static10/349/1099769.mp3" /&gt;&lt;param name="src" value="http://cdn1-52.projectplaylist.com/e1/static10/349/1099769.mp3" /&gt;&lt;embed type="application/x-mplayer2" width="452" height="33" src="http://cdn1-52.projectplaylist.com/e1/static10/349/1099769.mp3" url="http://cdn1-52.projectplaylist.com/e1/static10/349/1099769.mp3" windowlessvideo="true"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;pre&gt;もう我慢ばっかしてらんないよ&lt;br /&gt;言いたいことは言わなくちゃ&lt;br /&gt;帰り道 夕暮れのバス停&lt;br /&gt;落ちこんだ背中に Bye Bye Bye&lt;br /&gt;君のFighting Pose&lt;br /&gt;見せなきゃ Oh!Oh!&lt;br /&gt;夢にまで見たような世界は&lt;br /&gt;争いもなく平和な日常&lt;br /&gt;でも現実は日々トラブッて&lt;br /&gt;たまに悔やんだりしてる&lt;br /&gt;そんな Rolling days&lt;br /&gt;&lt;br /&gt;転んじゃったって いいんじゃないの&lt;br /&gt;そんときは笑ってあげる&lt;br /&gt;仱贽zんだバスの奥から&lt;br /&gt;ちいさく ほほえみが見えた&lt;br /&gt;君を頼りにしてるよ Oh!Oh!&lt;br /&gt;夢にまで見たような Sweet Love&lt;br /&gt;恋人たちは隠れ家を探すの&lt;br /&gt;でも現実は会えない日が&lt;br /&gt;続きながらも信じてるの Rolling days&lt;br /&gt;&lt;br /&gt;つまずいたって Way to go !!&lt;br /&gt;Yeah!! Yeah!!&lt;br /&gt;泥だらけ Rolling star !!&lt;br /&gt;&lt;br /&gt;なるべく笑顔でいたいけれど&lt;br /&gt;守り抜くためには仕方ないでしょ?&lt;br /&gt;&lt;br /&gt;きっと嘘なんて そう意味を持たないの&lt;br /&gt;～All my loving&lt;br /&gt;そうじゃなきゃ やってらんない&lt;br /&gt;&lt;br /&gt;夢にまで見たような世界は&lt;br /&gt;争いもなく平和な日常&lt;br /&gt;でも現実は日々トラブッて&lt;br /&gt;たまに悔やんだりしてる&lt;br /&gt;そんな Rolling days&lt;br /&gt;&lt;br /&gt;&amp;hellip;そう わかってるって&lt;br /&gt;つまずいたって Way to go !!&lt;br /&gt;Yeah!! Yeah!!&lt;br /&gt;泥だらけ Rolling star !!&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-97345089805860647?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/97345089805860647/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=97345089805860647&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/97345089805860647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/97345089805860647'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/07/busy-or-easy.html' title='Busy or Easy'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-4787250643091385240</id><published>2009-07-21T21:18:00.000-07:00</published><updated>2010-12-10T21:19:28.168-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>想念狗尾巴草</title><content type='html'>我承认自己最近越来越懒了..&lt;br /&gt;&lt;br /&gt;&lt;img src="http://farm4.static.flickr.com/3494/3739012983_00e3fabd25.jpg" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;其实&lt;br /&gt;&lt;br /&gt;我只是想一个有大块草坪的地方&lt;br /&gt;&lt;br /&gt;野花丛生&lt;br /&gt;&lt;br /&gt;嘴里叼一根狗尾巴草&lt;br /&gt;&lt;br /&gt;躺下去,看蓝蓝的天空,白云朵朵&lt;br /&gt;&lt;br /&gt;清风拂过,有蝴蝶和蜜蜂在身边飞舞&lt;br /&gt;&lt;br /&gt;看蚂蚁拖着一个比自己身体大很多的草籽慢慢爬&lt;br /&gt;&lt;br /&gt;什么都不用做，什么都不用去想&lt;br /&gt;&lt;br /&gt;就这么躺着...躺着...&lt;br /&gt;&lt;br /&gt;慢慢睡着.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://farm3.static.flickr.com/2621/3739013467_9c33976938.jpg" alt="" /&gt;&lt;br /&gt;Come from &lt;a href="http://xkcd.com/" target="_blank"&gt;XKCD&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-4787250643091385240?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/4787250643091385240/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=4787250643091385240&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4787250643091385240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4787250643091385240'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/07/blog-post.html' title='想念狗尾巴草'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm4.static.flickr.com/3494/3739012983_00e3fabd25_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-8580280628823086994</id><published>2009-07-19T21:19:00.000-07:00</published><updated>2010-12-10T21:20:03.046-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>Illustration - mechanics</title><content type='html'>寡人最喜欢的画风&lt;br /&gt;&lt;br /&gt;&lt;img style="border-width: 0px; padding: 0px;" src="http://farm3.static.flickr.com/2539/3734344455_b5682b3f84.jpg" alt="" /&gt;&lt;br /&gt;&lt;img style="border-width: 0px; padding: 0px;" src="http://farm4.static.flickr.com/3465/3735144756_c9f813cc30.jpg" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;╮(╯▽╰)╭&lt;br /&gt;&lt;br /&gt;最终还是喜欢在代码模式下写文章&lt;br /&gt;&lt;br /&gt;在&lt;a href="http://www.time.com/"&gt;Time&lt;/a&gt;上翻阅到一篇&lt;a href="http://www.time.com/time/magazine/article/0,9171,787043,00.html"&gt;Super Wheat&lt;/a&gt;的文章&lt;br /&gt;&lt;br /&gt;看时间Monday, Mar 26, 1928&lt;br /&gt;&lt;br /&gt;信息啊，为什么国内就没有一个地方随时翻阅历史某一天的记实呢？&lt;br /&gt;&lt;br /&gt;更恶心的是写论文的时候，搜罗到得一些什么文献库统统的注册, 充值&amp;hellip;&lt;br /&gt;&lt;br /&gt;MIT描述着Goes to the Moon的时候&lt;br /&gt;&lt;br /&gt;HIT却写着某某会议召开、某某人士来访、某某重要讲话&amp;hellip;&lt;br /&gt;&lt;br /&gt;悲剧&amp;hellip;&lt;br /&gt;&lt;br /&gt;--------------------欠揍的分割线---------------------------&lt;br /&gt;&lt;br /&gt;memo: 今天，突然不记得自己多少岁了, 拿笔算了一下...&lt;br /&gt;&lt;br /&gt;啊~~&lt;br /&gt;&lt;br /&gt;补一句：外面好像下雨了&lt;br /&gt;&lt;br /&gt;洗澡爬床去~_~&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-8580280628823086994?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/8580280628823086994/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=8580280628823086994&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8580280628823086994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8580280628823086994'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/07/illustration-mechanics.html' title='Illustration - mechanics'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm3.static.flickr.com/2539/3734344455_b5682b3f84_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-8632995900753172941</id><published>2009-07-18T21:20:00.000-07:00</published><updated>2010-12-10T21:20:34.419-08:00</updated><title type='text'>Dream</title><content type='html'>&lt;img style="border: 0px none; padding: 0px;" src="http://farm3.static.flickr.com/2593/3731100827_0fefcfa1f0.jpg" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://luyizhi.blog.sohu.com/" target="_blank"&gt;逯总&lt;/a&gt;说&lt;br /&gt;&lt;br /&gt;生活就像是电影&lt;br /&gt;&lt;br /&gt;现实中的事情每天都戏剧性的变化&lt;br /&gt;&lt;br /&gt;我只能控制自己&lt;br /&gt;&lt;br /&gt;还有许多事情要做いろいろ&lt;br /&gt;&lt;br /&gt;年轻就要有梦想 I like it&lt;br /&gt;&lt;br /&gt;我忙碌，我快乐&lt;br /&gt;&lt;br /&gt;&lt;a href="http://fanqieshu.com/dreamcog/" target="_blank"&gt;蚂蚁&lt;/a&gt;~嗯~是个好ID&lt;br /&gt;&lt;br /&gt;sukida--&amp;gt;すきだ--&amp;gt;好きだ--&amp;gt;喜欢&lt;br /&gt;&lt;br /&gt;恩&lt;br /&gt;&lt;br /&gt;memo&lt;br /&gt;----------------------------------------&lt;br /&gt;A: 早上睡过头，明天早上不能去海边看日出，悲剧了&lt;br /&gt;B: Live Writer &amp;amp; SouGou兼容性bug（一个输入法，要那么多快捷键有什么用？）&lt;br /&gt;C: 支付宝刚出的插件与不同版本的FF兼容性有待考究&lt;br /&gt;D: 不想女人（梦到的不算）&lt;br /&gt;&lt;br /&gt;todo&lt;br /&gt;----------------------------------------&lt;br /&gt;日本語&amp;uarr;&lt;br /&gt;VBA (他们称之为国粹)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-8632995900753172941?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/8632995900753172941/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=8632995900753172941&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8632995900753172941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8632995900753172941'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/07/dream.html' title='Dream'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm3.static.flickr.com/2593/3731100827_0fefcfa1f0_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-3455409586980793349</id><published>2009-07-17T21:20:00.000-07:00</published><updated>2010-12-10T21:21:02.021-08:00</updated><title type='text'>New Day, New Style, New Life</title><content type='html'>长了5个多月的头发&lt;br /&gt;&lt;br /&gt;今天，哦不，是昨天，剪了&lt;br /&gt;&lt;br /&gt;而且剪得很漂亮~哈~哈~哈~哈~&lt;br /&gt;&lt;br /&gt;上次长了6个月，因为是冬天- -！&lt;br /&gt;&lt;br /&gt;下班后乘坐1个多小时的地铁后转公交&lt;br /&gt;&lt;br /&gt;特地跑到2年前在望京那边住过的小区剪的&lt;br /&gt;&lt;br /&gt;路过卖早点的商店、以前每天都会走的小路以及两边的树、藤&lt;br /&gt;&lt;br /&gt;仿佛又回到了2007年&lt;br /&gt;&lt;br /&gt;环境好亲切，突然想下一次再搬家的时候搬回去住&lt;br /&gt;&lt;br /&gt;╮(╯▽╰)╭&lt;br /&gt;&lt;br /&gt;现在的手机不能拍照了，扔家里当座机用&lt;br /&gt;&lt;br /&gt;其实，没有手机、没人联系、没有烦恼的时光真好&lt;br /&gt;&lt;br /&gt;豆瓣上溜达一圈&lt;br /&gt;&lt;br /&gt;春天过去了，失恋的人渐渐多起来了&lt;br /&gt;&lt;br /&gt;一个姑娘说，她的FirstKiss给了一个说过要保护她的男孩&lt;br /&gt;&lt;br /&gt;如果，一个男孩说，FirstKiss给了一个说要离开的姑娘是不是更显悲剧色彩呢？&lt;br /&gt;&lt;br /&gt;人类真是种喜欢自虐的动物&lt;br /&gt;&lt;br /&gt;想伸手抓住一些东西，却又不想失去另外一些，这严重违反&lt;a href="http://lanyueniao.blogspot.com/2009/03/blog-post_28.html" target="_blank"&gt;《等价交换》&lt;/a&gt;原则&lt;br /&gt;&lt;br /&gt;而且还经常做一些与自己想法完全相反的举动，何苦呢？&lt;br /&gt;&lt;br /&gt;人都会很快的老去并消逝&lt;br /&gt;&lt;br /&gt;等到步履蹒跚的时候想想年轻时候的事情&lt;br /&gt;&lt;br /&gt;是唉声叹息&amp;ldquo;就这样吧&amp;rdquo;？还是后悔呢？&lt;br /&gt;&lt;br /&gt;最终都不是自己想要的吧&lt;br /&gt;&lt;br /&gt;应该每天早起，指着镜子说：怎么想的就怎么去做好了，Do your best!&lt;br /&gt;&lt;br /&gt;Impossible is nothing~~&lt;br /&gt;&lt;br /&gt;自己始终坚信，并将永久的持续贯彻下去~~&lt;br /&gt;&lt;br /&gt;想起08年的十二月在以前博客上发过的&lt;a href="http://lanyueniao.blogspot.com/2008/12/mrbrooks.html" target="_blank"&gt;Mr. Brooks&lt;/a&gt;的台词&lt;br /&gt;&lt;br /&gt;恍惚间又回到了那年的冬天，阳光暖暖的....&lt;br /&gt;&lt;blockquote&gt;Why should we suppress their desires?&lt;br /&gt;God gave me quiet&lt;br /&gt;So I accept that I can not change&lt;br /&gt;Give me the courage to change my best to change&lt;br /&gt;And would only let me go to tell the difference&lt;br /&gt;Believe in God&lt;br /&gt;I only will your submission&lt;br /&gt;Everything will repair Straight Alliance of Reformed&lt;br /&gt;So&lt;br /&gt;I can celebrate this life&lt;br /&gt;Hereafter will be the same with God&lt;br /&gt;The cause of a symbol of happiness&lt;br /&gt;Amen&lt;br /&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&lt;br /&gt;为什么要压抑自己的欲望呢？&lt;br /&gt;上帝赐给我宁静&lt;br /&gt;让我接受我所不能改变的&lt;br /&gt;给我勇气改变我所能改变的&lt;br /&gt;并只会让我去分辨两者的不同&lt;br /&gt;相信神&lt;br /&gt;我只归顺您的意志&lt;br /&gt;凡事定会归正修直&lt;br /&gt;如此&lt;br /&gt;我可欢度今生&lt;br /&gt;来世也将与神同在&lt;br /&gt;永享无上的幸福&lt;br /&gt;阿门&lt;/blockquote&gt;这张图是用来凑数的&lt;br /&gt;&lt;br /&gt;就是那只从天而降并最终被我成功养死的兔子&lt;br /&gt;&lt;br /&gt;&lt;img src="http://farm3.static.flickr.com/2430/3726342271_81140d6bcc.jpg?v=0" alt="" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-3455409586980793349?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/3455409586980793349/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=3455409586980793349&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3455409586980793349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3455409586980793349'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/07/new-day-new-style-new-life.html' title='New Day, New Style, New Life'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-7070195251663582545</id><published>2009-07-17T07:13:00.001-07:00</published><updated>2009-07-17T07:13:26.693-07:00</updated><title type='text'>At Last</title><content type='html'>博主已死&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-7070195251663582545?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/7070195251663582545/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=7070195251663582545&amp;isPopup=true' title='1 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7070195251663582545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7070195251663582545'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/07/at-last.html' title='At Last'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-7976156467582685628</id><published>2009-07-16T21:21:00.000-07:00</published><updated>2010-12-10T21:21:35.228-08:00</updated><title type='text'>路人</title><content type='html'>&lt;img src="http://farm3.static.flickr.com/2477/3724387788_93ef5b1576.jpg" alt="" /&gt;&lt;br /&gt;（鉴于逻辑混乱，删除此处500文字，因为我曾经最喜欢、学得最好的科目是数学和物理）&lt;br /&gt;&lt;br /&gt;地铁上见一人穿一T恤，印：情侣去死&lt;br /&gt;------------------------------------------------------------&lt;br /&gt;男男女女纠缠在一起除了有助于人类繁衍&lt;br /&gt;&lt;br /&gt;本质上还有什么积极的意义？&lt;br /&gt;&lt;br /&gt;求解（忽略人类意念出来的感情）&lt;br /&gt;------------------------------------------------------------&lt;br /&gt;通常所指的寂寞了，多数是由于自身的惰性或者模仿的本能&lt;br /&gt;&lt;br /&gt;A:10个人中有8个人成对，剩下的2个人就会认为向那个方向发展是应该的，不做则受谴责&lt;br /&gt;&lt;br /&gt;B:惰性所指为需要个人照顾自己，生病有人陪，看电影有人陪，吃饭有人陪...gay或者lala，只不过是想找个人陪而已&lt;br /&gt;------------------------------------------------------------&lt;br /&gt;这个星球上与自己同类的生物有60多亿&lt;br /&gt;&lt;br /&gt;某个时间某个地点遇到这批同类&lt;br /&gt;&lt;br /&gt;另个时间另个地点又遇到另一些同类&lt;br /&gt;&lt;br /&gt;生物之间互相在对方的大脑的记忆体力留下模糊的或终究会变模糊的印象&lt;br /&gt;&lt;br /&gt;同时人本身的惰性又不希望事物发生太大的变化&lt;br /&gt;&lt;br /&gt;&amp;ldquo;你来我信你不会走，你走我当你没来过&amp;rdquo;&lt;br /&gt;&lt;br /&gt;今天在twitter上看到的一句话.&lt;br /&gt;------------------------------------------------------------&lt;br /&gt;熬夜除了影响抵抗力、导致消化系统疾病、皮肤没有弹性&lt;br /&gt;&lt;br /&gt;与是否得脑瘤没有直接关系&lt;br /&gt;&lt;br /&gt;so，头疼的话不用担心&lt;br /&gt;------------------------------------------------------------&lt;br /&gt;贝贝同学的一篇文章描写了我现在的心理波动&lt;a href="http://xxuanxx.blogbus.com/logs/42267602.html" target="_blank"&gt;《你们太自私鸟》&lt;/a&gt;&lt;br /&gt;------------------------------------------------------------&lt;br /&gt;弱小生物喜群居，生命力顽强不需要照料者喜独居；参考蚂蚁与霸王龙&lt;br /&gt;------------------------------------------------------------&lt;br /&gt;如果你感觉无聊了，Coding吧&lt;br /&gt;&lt;br /&gt;如果你烦躁了，就去做数学题，而且要用手握着铅笔算，把脑袋算累了你就没时间去烦躁了&lt;br /&gt;------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;路途中所有的人;都只是自己的过客;没有谁因为你的存在而停留&lt;br /&gt;&lt;br /&gt;&amp;mdash;&amp;mdash; 路人甲  2009/07/16/02:30&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-7976156467582685628?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/7976156467582685628/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=7976156467582685628&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7976156467582685628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7976156467582685628'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/07/blog-post_16.html' title='路人'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm3.static.flickr.com/2477/3724387788_93ef5b1576_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-1280921940062763272</id><published>2009-07-14T21:21:00.000-07:00</published><updated>2010-12-10T21:22:04.845-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>Rain</title><content type='html'>&lt;img src="http://farm1.static.flickr.com/4/5038411_72647c4c22.jpg" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;流水账&lt;br /&gt;&lt;br /&gt;周末同涛哥、亮亮去烧烤&lt;br /&gt;&lt;br /&gt;然后到旁边的一家小店里要了3大杯扎啤&lt;br /&gt;&lt;br /&gt;服务员问：先生还要别的吗？答：不用了，谢谢！&lt;br /&gt;&lt;br /&gt;你可以想象一下服务员的表情，还有那差异的眼神。&lt;br /&gt;&lt;br /&gt;结束后出门碰见MissYu领着大票人马去KTV，追随而去&lt;br /&gt;&lt;br /&gt;酒精，缺氧&lt;br /&gt;&lt;br /&gt;对于消费类的会员卡，指定卡的有效期是一个明智的决策&lt;br /&gt;&lt;br /&gt;12点多从文津国际出来的时候，雨下得正大&lt;br /&gt;&lt;br /&gt;突然很想找个兄弟在电闪雷鸣的暴雨里打一架&lt;br /&gt;&lt;br /&gt;或者在雨里走回去也好（因为从五道口到科院的距离足以把人的衣服淋透）&lt;br /&gt;&lt;br /&gt;然后得一场大病卧床不起（印象中好像上次见医生是07年冬天的事情了）&lt;br /&gt;&lt;br /&gt;像我这样生活规律的人道现在居然还能健康滴活着对医院的那些人是不公平的&lt;br /&gt;&lt;br /&gt;不明白上面的老头怎么想的&lt;br /&gt;&lt;br /&gt;想起那次陈琳、老大还有恒太等人一起淋着雨从山大到糖酒站的情景&lt;br /&gt;&lt;br /&gt;以及售货员那看火星人的眼神&lt;br /&gt;&lt;br /&gt;美好的回忆~~呵呵~~&lt;br /&gt;&lt;br /&gt;不知道还有多少人记得&lt;br /&gt;&lt;br /&gt;随着人类的成长脑细胞的不断分裂会导致忘记一些东西&lt;br /&gt;&lt;br /&gt;只有那些受到强烈刺激的记忆才能保留下来&lt;br /&gt;&lt;br /&gt;所以要经常做些另类的事情&lt;br /&gt;&lt;br /&gt;要不生活也太枯燥或者你已经老了&lt;br /&gt;&lt;br /&gt;最终我这个小小建议被否决并被同化着打的回去&lt;br /&gt;&lt;br /&gt;这里又有一个错误&lt;br /&gt;&lt;br /&gt;我之所以喜欢并习惯于一个人的生活&lt;br /&gt;&lt;br /&gt;&amp;ldquo;自己的生活规律不好，怕影响别人&amp;rdquo;是其中一个原因&lt;br /&gt;&lt;br /&gt;另外一个是&lt;br /&gt;&lt;br /&gt;与很多人在一起的时候，一个人的思维容易受限或受影响&lt;br /&gt;&lt;br /&gt;就像我们高中的时候都认为80是一个很低的分数，而现在却为拿到60分而沾沾自喜&lt;br /&gt;&lt;br /&gt;人们都是在不知不觉中发生变化&lt;br /&gt;&lt;br /&gt;不管这个社会营造的环境是好的还是坏的，都在不知不觉中欣然接受而不去思考为什么&lt;br /&gt;&lt;br /&gt;性格的、观念的、习惯的...&lt;br /&gt;&lt;br /&gt;memo: 人类之所以有痛苦，多数是由于感情导致的，扔掉感情就Free了&lt;br /&gt;&lt;br /&gt;Flicker的图片保护做得太弱=所谓的安全都是对土鳖说的&lt;br /&gt;&lt;br /&gt;Done！&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-1280921940062763272?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/1280921940062763272/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=1280921940062763272&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1280921940062763272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1280921940062763272'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/07/rain.html' title='Rain'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm1.static.flickr.com/4/5038411_72647c4c22_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-7047217574072511696</id><published>2009-07-12T21:22:00.000-07:00</published><updated>2010-12-10T21:22:34.830-08:00</updated><title type='text'>The rule</title><content type='html'>&lt;img src="http://farm3.static.flickr.com/2545/3713425652_8bbae83847.jpg" alt="" /&gt;&lt;br /&gt;&lt;blockquote&gt;You are not your job&lt;br /&gt;&lt;br /&gt;You're not how much money you have in the bank&lt;br /&gt;&lt;br /&gt;You are not the shoes you wear.&lt;br /&gt;&lt;br /&gt;You're not the car you drive&lt;br /&gt;&lt;br /&gt;You're not the contents of your wallet&lt;br /&gt;&lt;br /&gt;You're not your fucking khakis.&lt;br /&gt;&lt;br /&gt;You are the all singing, all dancing, crap of the world&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-7047217574072511696?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/7047217574072511696/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=7047217574072511696&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7047217574072511696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7047217574072511696'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/07/rule.html' title='The rule'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm3.static.flickr.com/2545/3713425652_8bbae83847_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-3153670978627303221</id><published>2009-07-11T21:23:00.000-07:00</published><updated>2010-12-10T21:23:32.573-08:00</updated><title type='text'>亡灵</title><content type='html'>&lt;blockquote&gt;var sleepTimeAverage &amp;lt; 5h/d&lt;/blockquote&gt;半年前症状&lt;br /&gt;------------------------&lt;br /&gt;12:30睡觉&lt;br /&gt;8:00爬起&lt;br /&gt;------------------------&lt;br /&gt;为此曾经还查阅过相关资料&lt;br /&gt;来自日本的学者称：人类每天睡眠7个小时死亡率最低&lt;br /&gt;我深信这个数据的正确性（因为日本是一个严重过劳死突发的国家）&lt;br /&gt;甚至还庆幸自己属于这个安全范围之内&lt;br /&gt;现在症状&lt;br /&gt;------------------------&lt;br /&gt;3:30~4:30睡觉&lt;br /&gt;9:00爬起&lt;br /&gt;------------------------&lt;br /&gt;一天有36个小时&lt;br /&gt;一周有8天&lt;br /&gt;且每日2餐依旧无食欲&lt;br /&gt;也许&lt;br /&gt;该去看医生&lt;br /&gt;或许&lt;br /&gt;任其自然&lt;br /&gt;喜欢上面这个词&lt;br /&gt;因为一切事物的发展都是遵循自然的&lt;br /&gt;自然的发生到自然的结束&lt;br /&gt;精彩的只是这个过程&lt;br /&gt;It's a programmed game&lt;br /&gt;世界上不眠者的最长记录是200小时依然保持身心正常&lt;br /&gt;It' a challenge, just like the 233m Bungee Jumping&lt;br /&gt;Glad to be with you&lt;br /&gt;&lt;img src="http://www.unix.org/40years.png" alt="" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-3153670978627303221?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/3153670978627303221/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=3153670978627303221&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3153670978627303221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3153670978627303221'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/07/blog-post_1534.html' title='亡灵'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-7952975264750594996</id><published>2009-07-11T21:22:00.000-07:00</published><updated>2010-12-10T21:23:05.794-08:00</updated><title type='text'>丝妮</title><content type='html'>&lt;img src="http://farm3.static.flickr.com/2608/3709615590_a1e82e08b5.jpg" alt="" /&gt;&lt;br /&gt;《战争机器》里的重型战车pk《士兵突击》里的吉普&lt;br /&gt;&lt;br /&gt;Peter的重音响&lt;br /&gt;&lt;br /&gt;上下铺&lt;br /&gt;&lt;br /&gt;卫青&lt;br /&gt;&lt;br /&gt;&amp;Sigma;&amp;int;sin&amp;alpha;/&amp;alpha;(&amp;alpha;-&amp;gt;&amp;infin;)&lt;br /&gt;&lt;br /&gt;北京102年产的越南牌香烟&lt;br /&gt;&lt;br /&gt;造假的邮票以及车牌&lt;br /&gt;&lt;br /&gt;10年前的老爸&lt;br /&gt;&lt;br /&gt;..........&lt;br /&gt;&lt;br /&gt;以上&lt;br /&gt;&lt;br /&gt;这就是刚才一个小时内逻辑混乱的梦境&lt;br /&gt;&lt;br /&gt;醒来后&lt;br /&gt;&lt;br /&gt;旁边的哥们在看《阳光灿烂的日子》&lt;br /&gt;&lt;br /&gt;然后用被阉割的网络Post这篇荒诞不经的文字&lt;br /&gt;&lt;br /&gt;同时想起了一位姓L的同学&lt;br /&gt;&lt;br /&gt;突然想去淋一场大雨&lt;br /&gt;&lt;br /&gt;memo: L --&amp;gt; 雷&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-7952975264750594996?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/7952975264750594996/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=7952975264750594996&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7952975264750594996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7952975264750594996'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/07/blog-post_11.html' title='丝妮'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm3.static.flickr.com/2608/3709615590_a1e82e08b5_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-3867948556875422395</id><published>2009-07-10T21:25:00.000-07:00</published><updated>2010-12-10T21:25:40.158-08:00</updated><title type='text'>听</title><content type='html'>&lt;a href="http://www.songtaste.com/song/1268674/" target="_blank"&gt;&amp;para;♩♪♩♩♬♪♩♪♬♫♪♬♭♩&lt;/a&gt;&lt;br /&gt;&lt;blockquote&gt;夜&lt;br /&gt;&lt;br /&gt;明亮的街灯&lt;br /&gt;&lt;br /&gt;还有一颗格外清醒的心&lt;br /&gt;&lt;br /&gt;我想如果世上这样一种叫花未眠的花&lt;br /&gt;&lt;br /&gt;那它一定是世界上最美丽的花了&lt;br /&gt;&lt;br /&gt;有时候把川端康成的景色小说和挪威森林里的某些情景混合在一起&lt;br /&gt;&lt;br /&gt;有一种幸福的感觉&lt;br /&gt;&lt;br /&gt;就象心中的未眠花&lt;br /&gt;&lt;br /&gt;即使看不到 摸不到&lt;br /&gt;&lt;br /&gt;但它却长开在心中不会凋零&lt;/blockquote&gt;记得你说过的每一句话&lt;br /&gt;&lt;br /&gt;记得你写过的每一篇日志&lt;br /&gt;&lt;br /&gt;记得每一次见到你时的样子&lt;br /&gt;&lt;br /&gt;想象着牵着你的手儿在海边散步&lt;br /&gt;&lt;br /&gt;在广场上给你一个大大的KISS&lt;br /&gt;&lt;br /&gt;就当那光秃秃的主楼是个金字塔吧&lt;br /&gt;&lt;br /&gt;只是想让你开心&lt;br /&gt;&lt;br /&gt;像孩子般开心的笑&lt;br /&gt;&lt;br /&gt;我好像又做傻事了&lt;br /&gt;&lt;br /&gt;这样也好&lt;br /&gt;&lt;br /&gt;等我们都老的时候就能有好多好玩的回忆了&lt;br /&gt;&lt;br /&gt;过去一年了呢&lt;br /&gt;&lt;br /&gt;6月的海风吹动白色的裙摆&lt;br /&gt;&lt;br /&gt;7月离别的季节黑色法袍&lt;br /&gt;&lt;br /&gt;卡其色 - -！就是我说的那个土色 .....&lt;br /&gt;&lt;br /&gt;感情是个很奢侈的东东&lt;br /&gt;&lt;br /&gt;距离产生美 也产生距离&lt;br /&gt;&lt;br /&gt;只想简简单单的在你身边&lt;br /&gt;&lt;br /&gt;不让桌角磕到pp&lt;br /&gt;&lt;br /&gt;不让水果刀刺到小手&lt;br /&gt;&lt;br /&gt;感冒都让我来&lt;br /&gt;&lt;br /&gt;所有痘儿都让我长&lt;br /&gt;&lt;br /&gt;这样你就可以想吃什么就吃什么&lt;br /&gt;&lt;br /&gt;还要拎着一大包鸡蛋躲到你后面穿过最热闹的人群.&lt;br /&gt;&lt;br /&gt;还记得哈尔滨的第一场雪吧&lt;br /&gt;&lt;br /&gt;那个时候的路人甲&lt;br /&gt;&lt;br /&gt;上面的那个老头总是捉弄我&lt;br /&gt;&lt;br /&gt;这次我相信是他老人家的安排吧&lt;br /&gt;&lt;br /&gt;我这只傻了吧唧缩在壳里记忆力差得要死的木头蜗牛&lt;br /&gt;&lt;br /&gt;不知道怎么能把上面的事情记得那么清楚&lt;br /&gt;&lt;br /&gt;各位围观者们&lt;br /&gt;&lt;br /&gt;有时候我都不知道自己是谁&lt;br /&gt;&lt;br /&gt;完全是一个被雷击的性格分裂者&lt;br /&gt;&lt;br /&gt;发一些笨的要死的邮件打一些傻得要命的电话&lt;br /&gt;&lt;br /&gt;回来的路上晕乎乎的脑袋组织着一堆堆的碎片&lt;br /&gt;&lt;br /&gt;就像毕业的时候想抱着一大群王八蛋们一起哭&lt;br /&gt;&lt;br /&gt;毫无掩饰真实的青春宽恕我今天又是半夜爬床吧~&lt;br /&gt;&lt;br /&gt;Good night honey~&lt;br /&gt;&lt;br /&gt;等你回来~&lt;br /&gt;&lt;br /&gt;跟你玩泡泡~&lt;br /&gt;&lt;br /&gt;&lt;img src="http://farm3.static.flickr.com/2674/3704312195_39181159a2.jpg?v=0" alt="" width="500" height="281" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-3867948556875422395?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/3867948556875422395/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=3867948556875422395&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3867948556875422395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3867948556875422395'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/07/blog-post_3144.html' title='听'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-2873582023095239410</id><published>2009-07-10T21:24:00.000-07:00</published><updated>2010-12-10T21:24:36.740-08:00</updated><title type='text'>遗失的幻觉</title><content type='html'>现在是2009/07/10 03:22&lt;br /&gt;&lt;br /&gt;昨天又一次几近失眠，凌晨4点多才有睡意&lt;br /&gt;&lt;br /&gt;9点多大脑混沌&lt;br /&gt;&lt;br /&gt;11:30恍恍惚惚上班&lt;br /&gt;&lt;br /&gt;改善几个代码片段&lt;br /&gt;&lt;br /&gt;剩下的整个下午几乎是趴在桌子上看书&lt;br /&gt;&lt;br /&gt;突然想起在学校的时候实验室的桌子&lt;br /&gt;&lt;br /&gt;&amp;ldquo;自习&amp;rdquo;这个久远的字眼&lt;br /&gt;&lt;br /&gt;不禁让人怀想起学校的那片蓝天、那片海&lt;br /&gt;&lt;br /&gt;&lt;img src="http://farm3.static.flickr.com/2487/3705202638_040be1def3.jpg" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;收到京东送来的手机&lt;br /&gt;&lt;br /&gt;这是我的第7个&lt;br /&gt;&lt;br /&gt;截至目前共使用过6个，丢3个&lt;br /&gt;&lt;br /&gt;24 h/d = sleep(6) + working(8) + subway(2) + dinner_wc_xxx(1.5) + study_selfCoding(6.5)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-2873582023095239410?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/2873582023095239410/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=2873582023095239410&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2873582023095239410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2873582023095239410'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/07/blog-post_9554.html' title='遗失的幻觉'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm3.static.flickr.com/2487/3705202638_040be1def3_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-3604126285078578079</id><published>2009-07-10T21:23:00.000-07:00</published><updated>2010-12-10T21:24:05.070-08:00</updated><title type='text'>北回归线</title><content type='html'>墙外的blogspot&lt;br /&gt;&lt;br /&gt;荒芜多日&lt;br /&gt;&lt;br /&gt;好奇心强的同学可以过去瞅瞅（梯子自备）&lt;br /&gt;&lt;br /&gt;谨献一米阳光&lt;br /&gt;&lt;img src="http://farm3.static.flickr.com/2449/3704320525_fb769a1d61.jpg?v=0" alt="" width="512" height="417" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-3604126285078578079?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/3604126285078578079/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=3604126285078578079&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3604126285078578079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/3604126285078578079'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/07/blog-post_10.html' title='北回归线'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-2643654299103450330</id><published>2009-06-02T06:26:00.001-07:00</published><updated>2009-07-11T20:40:48.783-07:00</updated><title type='text'>Happy children's day</title><content type='html'>&lt;img src="http://www.wardking.com/blog/attachment/1180688648_0.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;首先捏，大半夜的祝天下的所有小盆友们节日哈皮^_^..&lt;br /&gt;假期结束，预计迎来一个繁忙的夏天.&lt;br /&gt;十分怀念学校后面的那个海滩&lt;br /&gt;这个季节应该是最美丽的吧&lt;br /&gt;&lt;img src="http://lh4.ggpht.com/_jedFwTjISAA/SiP-SlTyClI/AAAAAAAAFSE/WzmK4Qw5eRk/s576/0905312240477b05e5e77a7cfa.jpg" /&gt;&lt;br /&gt;&lt;img src="http://lh4.ggpht.com/_jedFwTjISAA/SiP-Sb_jJSI/AAAAAAAAFSA/cM4OF1gw_H8/s576/090531224068b573c971ebcf2c.jpg" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-2643654299103450330?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/2643654299103450330/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=2643654299103450330&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2643654299103450330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2643654299103450330'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/06/happy-children-day.html' title='Happy children&amp;#39;s day'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_jedFwTjISAA/SiP-SlTyClI/AAAAAAAAFSE/WzmK4Qw5eRk/s72-c/0905312240477b05e5e77a7cfa.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-7106657786615228877</id><published>2009-06-02T06:23:00.001-07:00</published><updated>2009-07-11T20:40:02.083-07:00</updated><title type='text'>Game:Officers</title><content type='html'>又一个二战题材的RTS&lt;br /&gt;绚丽啊绚丽~~&lt;br /&gt;&lt;blockquote&gt;游戏名称：指挥官&lt;br /&gt;英文名称：Officers&lt;br /&gt;制作厂商：3A Games&lt;br /&gt;游戏发行：Tri Synergy&lt;br /&gt;游戏语种：英语&lt;br /&gt;游戏类型：Historic Real-Time Strategy&lt;br /&gt;游戏平台：PC&lt;br /&gt;官方网站：http://www.trisynergy.com/products/157/details/Officers&lt;br /&gt;&lt;img src="http://image.com.com/gamespot/images/2008/043/919553_20080213_790screen003.jpg" /&gt;&lt;br /&gt;&lt;img src="http://image.com.com/gamespot/images/2006/306/919553_20061103_790screen002.jpg" /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-7106657786615228877?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/7106657786615228877/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=7106657786615228877&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7106657786615228877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/7106657786615228877'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/06/gameofficers.html' title='Game:Officers'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-4308018135806952310</id><published>2009-05-25T10:29:00.001-07:00</published><updated>2009-05-25T10:29:47.914-07:00</updated><title type='text'>マスカット闲言碎语</title><content type='html'>Blogspot被河蟹&lt;br&gt;YouTube被河蟹&lt;br&gt;-------------------------------------------------&lt;br&gt;&lt;div id="yi9h" style="text-align: left;"&gt;Copyright(C) 2006-2009 マスカットプロジェクト&lt;br&gt;-------------------------------------------------&lt;br&gt;&lt;img style="width: 240px; height: 72px;" src="http://docs.google.com/File?id=ddpbdvn5_63fdfh9phd_b"&gt;&lt;br&gt; 近几天看的一个东西，データ自己的Ajax框架，一个Open的项目。有时候，你不得不佩服日本人做事情的态度，细腻的让人惊讶，所以这个岛国二战后的迅速恢复不是偶然，是必然。利于统治和布道的东方儒家思想在其他地区得到较好的保留和发展，而我们自己似乎在那个屈辱的年代把这些都丢了，同时沦落为一个流氓一样的神圣的国度，没有信仰，腐烂...&lt;br&gt;态度决定行为，行为决定过程，过程决定结果，事情就是这样，符合逻辑。&lt;br&gt;扯远了~~回来..&lt;br&gt;&lt;br&gt;积木，几乎所有结构合理系统共有的特性，Maskat也不例外：&lt;br&gt;使用xml做layout，记得第一次看到这种用法应该是在android上；XML，真是个伟大的发明，当然还有JSON。&lt;br&gt;与其他框架或者应用的整合。&lt;br&gt;附带的PluginIDE是另一个让人感觉贴心的细腻东东，真是性感。&lt;br&gt;目前还没有发现英文资料，清一色日文，似乎用的人也不是很多，貌似データ并不想把这个Open的东东进行大规模推广，Who knows...&lt;br&gt;&lt;br&gt;和Tiger在MSN讨论这个季节的一些个纠结问题&lt;br&gt;杜撰了《吉他里的阳光》的一句台词：机会，是自找的！&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-4308018135806952310?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/4308018135806952310/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=4308018135806952310&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4308018135806952310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4308018135806952310'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/05/blog-post_25.html' title='マスカット闲言碎语'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-8088545561502551615</id><published>2009-05-12T03:43:00.000-07:00</published><updated>2010-12-10T21:50:39.158-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Google'/><title type='text'>GDD 2009 is coming~</title><content type='html'>&lt;a href="http://code.google.com/events/developerday/2009/" target="_blank"&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;img src="http://code.google.com/intl/zh-CN/events/developerday/2009/images/logo.gif" style="float: left;" /&gt;&lt;/a&gt;谷歌诚挚邀请您参加我们在北京举办的Google 2009 年开发者日大会&lt;br /&gt;在谷歌每年最大的技术分享盛会上，充分了解Google开发者产品和技术的最新发展，学习如何更好地利用谷歌开发者技术来帮助您更有效地开发构建网上社交和社区的&lt;a id="publishButton" class="cssButton" href="javascript:void(0)" target="" onclick="if (this.className.indexOf(&amp;quot;ubtn-disabled&amp;quot;) == -1) {var e = document['stuffform'].publish;(e.length) ? e[0].click() : e.click(); if (window.event) window.event.cancelBubble = true; return false;}"&gt;&lt;/a&gt;应用、移动设备的应用、地理和地图的应用、网站和网页设计、以及搜索应用等等多项网络应用和服务的开发，以及听取业界其它领先企业分享他们在这些网络技术开发上的经验与体会。&lt;br /&gt;&lt;br /&gt;2009 年 6 月 5 日 北京国际会议中心 中国北京&lt;br /&gt;We'll be there, my friends :-)&lt;br /&gt;Good night~&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-8088545561502551615?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/8088545561502551615/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=8088545561502551615&amp;isPopup=true' title='1 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8088545561502551615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8088545561502551615'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/05/gdd-2009-is-coming.html' title='GDD 2009 is coming~'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-8943217813827039538</id><published>2009-05-10T11:03:00.000-07:00</published><updated>2010-12-10T21:50:45.576-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><title type='text'>Install Debian5 on a Tulatin PC</title><content type='html'>23:00 ~ 00:20, After eating something I sleep for one hour, waked up at 00:20, sleeping and tired. &lt;br /&gt;00:20 ~ 00:50, Have a shawer and sit in from of PC. The damn router shutdown, again! It take almost one day to download the Debian 5, and now there is 14% left.&lt;br /&gt;01:30~01:50, Debian downloaded, finally.. Installing Lenny (a good nick XD..) takes 20 minutes. The old machine looks like this, 815EPT Motherboard, Tulatin 1.3G, 512 RAM, 30G Disk. The latest MySQL5.4 doesn't support Windows platform, which may be the reason why It needs to install a linux. And in future it could be used as a source server, database server, web server, slave node, bt-PC... :-)&lt;br /&gt;01:50~02:00, Reboot and post this article with lenny. Ok, time's up and I have to go to bed, even didn't knowing what I'm talking about. &lt;br /&gt;The xfce4 is so cute :-)&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/_jedFwTjISAA/Sgdp3TlroaI/AAAAAAAAFRE/zw2auavLcXA/s400/debian.jpg" /&gt;&lt;br /&gt;&lt;a href="http://lanyueniao.blogspot.com/2009/01/debian.html" target="_blank"&gt;Debian installing guide&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-8943217813827039538?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/8943217813827039538/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=8943217813827039538&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8943217813827039538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8943217813827039538'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/05/install-debian5-on-turatin-pc.html' title='Install Debian5 on a Tulatin PC'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_jedFwTjISAA/Sgdp3TlroaI/AAAAAAAAFRE/zw2auavLcXA/s72-c/debian.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-6749653774825885086</id><published>2009-05-07T05:07:00.000-07:00</published><updated>2010-12-10T21:50:55.089-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><title type='text'>ZK Direct RIA 似曾相识燕归来</title><content type='html'>一套由台湾那边某公司做的开源Ajax框架，反响很好。看了一晚上，.zul配合.java，突然有种.net的code behind的感觉。&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;架构师和开发者们大多只对架构和程序本身产生美感&lt;br /&gt;而客户却常常只愿意为页面买单&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;用jsp做web，页面问题总是能让人头痛很长时间，即便是有很多的模板引擎，实际开发的时候，绝对没有在vs里面拖拖拽拽的效果好、效率高。“用.net的页面开发配合Java的下层架构”，对这个幻想了很久 XD..&lt;br /&gt;&lt;img src="http://zh.zkoss.org/doc/devguide/img/3-1.png" /&gt;&lt;br /&gt;虽说ZK的基本思想虽然还是基于模板引擎的，不过贴心的人儿想到了整合auEngine和Client Engine这一点，然后就飞跃了。感觉上比DWR清晰、比GWT简洁（起码人家想到了直接做个Studio插到Eclipse上就行了..）。而且你可以用你喜欢的任何一种语言，比如Java、Javascript、Ruby、Python..看好你哟~_~&lt;br /&gt;不过有点屁事就去找auEngine，这也太疯狂了.. - -!&lt;br /&gt;当然，不管是从效果还是响应速度上都无法和前年用过的一个商业的&lt;a href="http://www.componentart.com/" target="_blank"&gt;ComponentArt&lt;/a&gt;相比，那个太绚丽了&lt;br /&gt;&lt;br /&gt;未来WebClient端的主天下&lt;br /&gt;不是Silverlight/JavaFX的&lt;br /&gt;也不是Flex/Flash的&lt;br /&gt;仍将是Javascript的（除特殊情况）&lt;br /&gt;效果看&lt;a href="http://www.zkoss.org/zkdemo/userguide/#f1" target="_blank"&gt;这里&lt;/a&gt;&lt;br /&gt;官网看&lt;a href="http://www.zkoss.org/" target="_blank"&gt;这里&lt;/a&gt;&lt;br /&gt;------------------------------------------------------------&lt;br /&gt;左磨右磨&lt;br /&gt;还是没敢拎着这个包出门 - -！&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/_jedFwTjISAA/SgMPfq0ZgsI/AAAAAAAAFQk/nbWnn-IWWYE/s400/20090507.jpg" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-6749653774825885086?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/6749653774825885086/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=6749653774825885086&amp;isPopup=true' title='1 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/6749653774825885086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/6749653774825885086'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/05/zk-direct-ria.html' title='ZK Direct RIA 似曾相识燕归来'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_jedFwTjISAA/SgMPfq0ZgsI/AAAAAAAAFQk/nbWnn-IWWYE/s72-c/20090507.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-1989230155029735470</id><published>2009-05-05T06:36:00.000-07:00</published><updated>2009-05-07T20:42:19.773-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Coding'/><title type='text'>@Annotation板凳上的TestCase</title><content type='html'>其实，我特别讨厌在文章里贴大篇幅的Code&lt;br /&gt;懒人宗旨：能省则省，一劳永逸.. ←△←&lt;br /&gt;@&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/annotation/Retention.html" target="_blank"&gt;Retention&lt;/a&gt;(&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/annotation/RetentionPolicy.html" target="_blank"&gt;RetentionPolicy.XXX&lt;/a&gt;)&lt;br /&gt;@&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/annotation/Target.html" target="_blank"&gt;Target&lt;/a&gt;(&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/annotation/ElementType.html" target="_blank"&gt;ElementType.XXX&lt;/a&gt;)&lt;br /&gt;&lt;pre name="code" class="java"&gt;@Retention(RetentionPolicy.RUNTIME)&lt;br /&gt;@Target(ElementType.METHOD)&lt;br /&gt;public @interface Before {}&lt;/pre&gt;&lt;pre name="code" class="java"&gt;@Retention(RetentionPolicy.RUNTIME)&lt;br /&gt;@Target(ElementType.METHOD)&lt;br /&gt;public @interface After {}&lt;/pre&gt;&lt;pre name="code" class="java"&gt;@Retention(RetentionPolicy.RUNTIME)&lt;br /&gt;@Target(ElementType.METHOD)&lt;br /&gt;public @interface Test {&lt;br /&gt;    String value() default "TestCase";&lt;br /&gt;}&lt;/pre&gt;&lt;pre name="code" class="java"&gt;public abstract class TestCase {&lt;br /&gt;    @Before&lt;br /&gt;    public void setUp(){};&lt;br /&gt;    @After&lt;br /&gt;    public void tearDown(){};&lt;br /&gt;}&lt;/pre&gt;&lt;pre name="code" class="java"&gt;public class SampleTest extends TestCase {&lt;br /&gt;    @Before&lt;br /&gt;    public void setUp() {&lt;br /&gt;        System.out.println("set up");&lt;br /&gt;    }&lt;br /&gt;    @After&lt;br /&gt;    public void tearDown() {&lt;br /&gt;        System.out.println("tear down");&lt;br /&gt;    }&lt;br /&gt;    @Test&lt;br /&gt;    public void testMethod1() {&lt;br /&gt;        System.out.println("Test Method1");&lt;br /&gt;    }&lt;br /&gt;    @Test&lt;br /&gt;    public void testMethod2() {&lt;br /&gt;        System.out.println("Test Method2");&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;pre name="code" class="java"&gt;public class TestLoader {&lt;br /&gt;    public void runTest(Class&lt;?&gt; class1) throws InstantiationException,&lt;br /&gt;                IllegalAccessException {&lt;br /&gt;        Object object = class1.newInstance();&lt;br /&gt;        Method[] methods = class1.getMethods();&lt;br /&gt;        Method before = null;&lt;br /&gt;        Method after = null;&lt;br /&gt;&lt;br /&gt;        for (Method method : methods) {&lt;br /&gt;            if (method.isAnnotationPresent(Before.class)) {&lt;br /&gt;                before = method;&lt;br /&gt;                break;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        for (Method method : methods) {&lt;br /&gt;            if (method.isAnnotationPresent(After.class)) {&lt;br /&gt;                after = method;&lt;br /&gt;                break;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        for (Method method : methods) {&lt;br /&gt;            if (method.isAnnotationPresent(Test.class)) {&lt;br /&gt;                try {&lt;br /&gt;                    if(before != null)&lt;br /&gt;                        before.invoke(object, new Object[] {});&lt;br /&gt;                    method.invoke(object, new Object[] {});&lt;br /&gt;                    if(after!= null)&lt;br /&gt;                        after.invoke(object, new Object[] {});&lt;br /&gt;                } catch (Exception e) {&lt;br /&gt;                    e.printStackTrace();&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public static void main(String[] args) throws ClassNotFoundException,&lt;br /&gt;                InstantiationException, IllegalAccessException {&lt;br /&gt;        new TestLoader().runTest(Class.forName("demo.java.annotation.SampleTest"));&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;pre class="console"&gt;set up&lt;br /&gt;Test Method1&lt;br /&gt;tear down&lt;br /&gt;set up&lt;br /&gt;Test Method2&lt;br /&gt;tear down&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-1989230155029735470?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/1989230155029735470/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=1989230155029735470&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1989230155029735470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1989230155029735470'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/05/annotation.html' title='@Annotation板凳上的TestCase'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-6969945188199640590</id><published>2009-05-03T23:03:00.000-07:00</published><updated>2009-05-03T23:14:45.555-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='听歌儿'/><title type='text'>许同学-淡淡的歌儿</title><content type='html'>&lt;img src="http://lh3.ggpht.com/_jedFwTjISAA/Sf6HE8GBT5I/AAAAAAAAFQc/-22BZL_CHaM/s720/dandandege.jpg" /&gt;&lt;br /&gt;&lt;object type="application/x-shockwave-flash" data="http://www.macloo.com/examples/audio_player/player.swf" id="audioplayer1" width="260" height="20"&gt;&lt;br /&gt;&lt;param name="movie" value="http://www.macloo.com/examples/audio_player/player.swf"&gt;&lt;br /&gt;&lt;param name="FlashVars" value="playerID=1&amp;amp;soundFile=http://www.512ktv.com/UploadFiles/2008/09/200809021502068427.mp3"&gt;&lt;br /&gt;&lt;param name="quality" value="high"&gt;&lt;br /&gt;&lt;param name="menu" value="false"&gt;&lt;br /&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/object&gt;&lt;br /&gt;&lt;img src="http://lh4.ggpht.com/_jedFwTjISAA/Sf6G7A9Fx7I/AAAAAAAAFQU/BlNPtLYTfVE/xufei.jpg" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-6969945188199640590?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/6969945188199640590/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=6969945188199640590&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/6969945188199640590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/6969945188199640590'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/05/blog-post_2569.html' title='许同学-淡淡的歌儿'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_jedFwTjISAA/Sf6HE8GBT5I/AAAAAAAAFQc/-22BZL_CHaM/s72-c/dandandege.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-4094611918171218181</id><published>2009-05-03T20:08:00.000-07:00</published><updated>2010-12-10T21:51:14.298-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>暴走第二弹</title><content type='html'>5月2日 7:00 ~ 22:20 你说，一个人一天能走多少路？&lt;br /&gt;&lt;br /&gt;本着溜达到哪儿算哪儿的态度&lt;br /&gt;一天下来收获片片多张以及水泡两枚&lt;br /&gt;流程如下&lt;br /&gt;路线仅供参考~&lt;br /&gt;如有雷同，请备好鞋一双~ &lt;br /&gt;------------------------------------------------------------------&lt;br /&gt;13线（霍营）→13线（立水桥）→5（灯市口）→106电车→北京南站→天津站→过河→劝业场好多人→和平路→吉鸿昌故居→哈尔滨道→西开教堂→营口道→昆明路→人民体育馆→成都道→好多古建筑→绕来绕去→一路向东→外国语学院（休整片刻）→马场向东→凯旋门大厦→小白楼→大光明桥→沿河返回→新意（三国茅庐的cosplay）→曹禺、梁启超N多人的故居→向北一片草地（好多人放风筝）→望海教堂→美术学院→大悲禅院→摩天轮子→引滦纪念碑（什么饮料的活动撒）→金刚桥→一个小吃街→鼓楼→南市→河边→发现那个桔子酒店（笑~~）→沿河（武大郎炊饼）→天津站→北京南站→54路（开阳桥）→2线（宣武门）→13线（西直门）→13（霍营）&lt;br /&gt;------------------------------------------------------------------&lt;br /&gt;不多扯了，片都在&lt;a href="http://photo.xiaonei.com/zhangzhongyuan" target="_blank"&gt;校内&lt;/a&gt;上，这里写，累死了&lt;br /&gt;&lt;img style="width: 300px; height: 400px;" src="http://4.bp.blogspot.com/_jedFwTjISAA/Sf5uCuEZDnI/AAAAAAAAFPQ/v2DwC6fS69o/s400/IMG_1800.jpg" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-4094611918171218181?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/4094611918171218181/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=4094611918171218181&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4094611918171218181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4094611918171218181'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/05/blog-post_03.html' title='暴走第二弹'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_jedFwTjISAA/Sf5uCuEZDnI/AAAAAAAAFPQ/v2DwC6fS69o/s72-c/IMG_1800.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-5188496493827200918</id><published>2009-05-03T19:20:00.000-07:00</published><updated>2010-12-10T21:51:28.954-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>暴走第一弹</title><content type='html'>5月1日   星期五                             雨&lt;br /&gt;睡眠时间：2:00 ~ 7:00&lt;br /&gt;起床、洗澡、出门&lt;br /&gt;沿着Google到的路线，13→5（灯市口）→106电车绕了个大圈。&lt;br /&gt;后来发现去南站最近的路线应该是13→2（宣武门）→54（开阳桥）&lt;br /&gt;茫茫多人&lt;br /&gt;9:20赶到，已经只有下午的车票了，失败&lt;br /&gt;买了张第二天上午9:30的&lt;br /&gt;出站，漫无目的的开始溜达&lt;br /&gt;陶然桥随便上了辆车，跑到东单，向南穿过一大片胡同，沿着前门大街一路向西。&lt;br /&gt;人，从，众，傘，遁行..&lt;br /&gt;西交民巷北行&lt;br /&gt;啊，鸟蛋..&lt;br /&gt;还有茫茫人群&lt;br /&gt;&lt;img style="height:300px" src="http://4.bp.blogspot.com/_jedFwTjISAA/Sf5X0Mb7BII/AAAAAAAAFNE/9gNnPk2RkH8/s400/IMG_1337.jpg" /&gt;&lt;img src="http://2.bp.blogspot.com/_jedFwTjISAA/Sf5XjwkagMI/AAAAAAAAFM8/myzOq5X-TRk/s400/IMG_1346.jpg" /&gt;&lt;br /&gt;绕进另一大片胡同。看来这里要拆迁了，还有大条的标语“早拆迁、早选房、早受益”。旁边，一位老人坐在老院子的门口，就那么静静的坐着。再过几年，“胡同”一词可能真的成了北京永久的回忆了。&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/_jedFwTjISAA/Sf5YfVCWtVI/AAAAAAAAFNM/0etfALZJvT8/s400/IMG_1349.jpg" /&gt;&lt;br /&gt;14:00左右徒步到西单的时候，开始下雨，无奈了。本想回家拿伞继续，回去以后直接扑床，醒来的时候已是下午六点..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-5188496493827200918?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/5188496493827200918/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=5188496493827200918&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5188496493827200918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5188496493827200918'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/05/blog-post.html' title='暴走第一弹'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_jedFwTjISAA/Sf5X0Mb7BII/AAAAAAAAFNE/9gNnPk2RkH8/s72-c/IMG_1337.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-5486924009561681351</id><published>2009-04-29T00:46:00.000-07:00</published><updated>2009-04-29T01:08:06.940-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Coding'/><title type='text'>排队去！有人接你..</title><content type='html'>&lt;pre name="code" class="java"&gt;package demo.jms;&lt;br /&gt;&lt;br /&gt;import javax.ejb.ActivationConfigProperty;&lt;br /&gt;import javax.ejb.MessageDriven;&lt;br /&gt;import javax.jms.JMSException;&lt;br /&gt;import javax.jms.Message;&lt;br /&gt;import javax.jms.MessageListener;&lt;br /&gt;import javax.jms.TextMessage;&lt;br /&gt;&lt;br /&gt;@MessageDriven(activationConfig = {&lt;br /&gt;        @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),&lt;br /&gt;        @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/HelloQueue") })&lt;br /&gt;public class HelloQueue implements MessageListener {&lt;br /&gt;    public void onMessage(Message message) {&lt;br /&gt;        TextMessage textMessage = (TextMessage) message;&lt;br /&gt;        try {&lt;br /&gt;            System.out.println("message: " + textMessage.getText());&lt;br /&gt;        } catch (JMSException e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;pre name="code" class="java"&gt;package demo.jms;&lt;br /&gt;&lt;br /&gt;import javax.jms.Connection;&lt;br /&gt;import javax.jms.ConnectionFactory;&lt;br /&gt;import javax.jms.Destination;&lt;br /&gt;import javax.jms.JMSException;&lt;br /&gt;import javax.jms.MessageProducer;&lt;br /&gt;import javax.jms.Session;&lt;br /&gt;import javax.jms.TextMessage;&lt;br /&gt;import javax.naming.Context;&lt;br /&gt;import javax.naming.InitialContext;&lt;br /&gt;import javax.naming.NamingException;&lt;br /&gt;&lt;br /&gt;public class QueueClient {&lt;br /&gt;    public static void main(String[] args) throws NamingException, JMSException {&lt;br /&gt;        Context ctx = new InitialContext();&lt;br /&gt;        ConnectionFactory factory = (ConnectionFactory) ctx.lookup("QueueConnectionFactory");&lt;br /&gt;        Destination destination = (Destination) ctx.lookup("queue/HelloQueue");&lt;br /&gt;        Connection connection = factory.createConnection();&lt;br /&gt;        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);&lt;br /&gt;        MessageProducer producer = session.createProducer(destination);&lt;br /&gt;        TextMessage message = session.createTextMessage();&lt;br /&gt;        message.setText("Hello, JMS");&lt;br /&gt;        producer.send(message);&lt;br /&gt;        producer.close();&lt;br /&gt;        session.close();&lt;br /&gt;        connection.close();&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;jndi.properties内容与&lt;a href="http://lanyueniao.blogspot.com/2009/04/blog-post_17.html" target="_blank"&gt;《崩溃~继续罢课~》&lt;/a&gt;一文内容相同&lt;pre class="console"&gt;15:59:41,218 INFO  [STDOUT] message: Hello, JMS&lt;/pre&gt;&lt;a href="http://www.coderanch.com/t/319834/EJB-Other-Java-EE-Technologies/java/What-correct-way-create-MDB" target="_blank"&gt;Jaikiran Pai&lt;/a&gt; says "JBoss by default binds queues to the "queue" context in the Global JNDI tree. So if your queue is named "xyz", its going to be bound to "queue/xyz" jndi name."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-5486924009561681351?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/5486924009561681351/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=5486924009561681351&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5486924009561681351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/5486924009561681351'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/04/blog-post_29.html' title='排队去！有人接你..'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-2169420019889553416</id><published>2009-04-26T03:41:00.000-07:00</published><updated>2010-12-10T21:51:54.377-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>我回来了~</title><content type='html'>&lt;object type="application/x-shockwave-flash" data="http://www.macloo.com/examples/audio_player/player.swf" id="audioplayer1" width="260" height="20"&gt;&lt;param name="movie" value="http://www.macloo.com/examples/audio_player/player.swf"&gt;&lt;param name="FlashVars" value="playerID=1&amp;amp;soundFile=http://www.yoho.cn/InformationImages/2008/09/21/2008092116063993e125a34bf846648495f93c99468778.mp3"&gt;&lt;param name="quality" value="high"&gt;&lt;param name="menu" value="false"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/object&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;当 我和世界不一样 那就让我不一样 坚持对我来说 就是以刚克刚&lt;br /&gt;我 如果对自己妥协 如果对自己说谎 即使别人原谅 我也不能原谅&lt;br /&gt;最美的愿望 一定最疯狂 我就是我自己的神 在我活的地方&lt;br /&gt;我和我最后的倔强 握紧双手绝对不放&lt;br /&gt;下一站是不是天堂 就算失望 不能绝望&lt;br /&gt;我和我骄傲的倔强 我在风中大声的唱&lt;br /&gt;这一次为自己疯狂 就这一次 我和我的倔强&lt;br /&gt;对 爱我的人别紧张 我的固执很善良 我的手越骯脏 眼神越是发光&lt;br /&gt;你 不在乎我的过往 看到了我的翅膀 你说被火烧过 才能出现凤凰&lt;br /&gt;逆风的方向 更适合飞翔 我不怕千万人阻挡 只怕自己投降&lt;br /&gt;就这一次 让我大声唱&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2点睡6:30起，早上7点的阳光，已经好久没有见到了。&lt;br /&gt;车开了4个小时，期间睡了2个小时凑够了6个多小时。醒后，思考着世界上原本的单细胞生物为何后来演变为雄雌异体。这是一个很复杂的问题。沿途漂亮的风景以及路边开着不知名的的小花。&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/_jedFwTjISAA/SfQ-6tTVQgI/AAAAAAAAFK4/L2MMV2T2G5g/s400/20090425%28006%29.jpg" /&gt;&lt;br /&gt;目的地，应该是那个荒山野岭处最好的一家店了，&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/_jedFwTjISAA/SfRBWsqVyyI/AAAAAAAAFLA/Lz-qKZg626w/s400/20090426%28024%29.jpg" /&gt;&lt;br /&gt;午餐午休爬山&lt;br /&gt;台阶从2008开始倒数&lt;br /&gt;记载着每年发生的重大事件&lt;br /&gt;我们以为到0的时候应该就结束了&lt;br /&gt;到最后发现他们还有公元前...&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/_jedFwTjISAA/SfRCnZNUgLI/AAAAAAAAFLI/PEafCYDCWPg/s400/20090425%28040%29.jpg" /&gt;&lt;br /&gt;阴森、怪异的山散发出一股妖气，西游记拍摄场地&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/_jedFwTjISAA/SfRDpTS1QrI/AAAAAAAAFLQ/PToPb4elbwQ/s400/20090425%28059%29.jpg" /&gt;&lt;br /&gt;走在乡间的小路上，一天中最轻松的时刻，惬意&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/_jedFwTjISAA/SfREW89hCjI/AAAAAAAAFLY/o8LAPwsP-Qk/s400/20090425%28098%29.jpg" /&gt;&lt;br /&gt;晚餐后的篝火、烟花以及烤羊&lt;br /&gt;还有喝不尽的啤酒&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/_jedFwTjISAA/SfRE_H_YSaI/AAAAAAAAFLg/f4pWBj8LgVU/s400/20090425%28115%29.jpg" /&gt;&lt;br /&gt;KTV唱歌接近凌晨一点&lt;br /&gt;开一瓶有一点点贵的酒却没能喝完&lt;br /&gt;帮一个姑娘开罐露露&lt;br /&gt;搞了一手番茄酱&lt;br /&gt;去洗手间冲洗&lt;br /&gt;地上滴的到处都是&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/_jedFwTjISAA/SfRGV5zB85I/AAAAAAAAFLo/Qma3HVHQkdI/s400/20090425%28121%29.jpg" /&gt;&lt;br /&gt;写到这里，突然醒悟这将是另外一个流水账的东东，不是我想要的。感觉自己好像很长的一段时间一直处于无目标或目标模糊的状态，这个很危险。撒谎者欺骗他人，同时也在欺骗自己。前些日子，我对自己撒了一个谎，你们知道的，我一向是不撒谎的。233米的蹦极吉尼斯，I like that，即便尝试那个高度的可能性很小。这里的只有60+米的，居然是中国第一高度，悲剧！&lt;br /&gt;其实，我是喜欢看天的。然而城市的天空常常是污浊的压抑的，人们慢慢的就只会低头走路。生物因环境改变而改变。有句话说：城里人真傻，真的。在笼子里关久了的猴子出去后看到任何事物都是兴奋的。&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/_jedFwTjISAA/SfRKr7XlubI/AAAAAAAAFLw/WdAri9st08A/s400/20090426%28032%29.jpg" /&gt;&lt;br /&gt;回来的时候，突然觉得这是一个很陌生的城市，陌生的行人、建筑以及每天都在走的街道。&lt;br /&gt;一直希望找一个安静的地方待一段时间，每天看云卷云舒，什么都不用去想..&lt;br /&gt;总有一天，我要离开这里~&lt;br /&gt;ps:我今天跨越了小区西边的那条路。其实，除了好奇，那里什么都没有...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-2169420019889553416?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/2169420019889553416/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=2169420019889553416&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2169420019889553416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2169420019889553416'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/04/blog-post_26.html' title='我回来了~'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_jedFwTjISAA/SfQ-6tTVQgI/AAAAAAAAFK4/L2MMV2T2G5g/s72-c/20090425%28006%29.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-8393135398861056295</id><published>2009-04-24T10:05:00.000-07:00</published><updated>2010-12-13T04:00:31.818-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Coding'/><title type='text'>安静的Coding</title><content type='html'>这个周总睡眠时间&amp;lt;40小时 周五在家7点睡到中午12点 雨过天晴 没有迈出家门一步 起床后消灭掉冰箱里一个冰激凌 在电脑前面坐到晚上10点多 饿得大脑发昏不得不去找吃的 搬过来半年 我始终没有跨越小区西边20米外的那条路 即便是好多次都想着到路那边走走 皆未果 人具有惰性 一旦习惯于某个事物后 就不怎么想改变了 比如某个作息制度 或者某个人 改变易使人恐惧抑或兴奋 某妞收到匿名礼物 突兀地发消息过来怀疑是我送的 礼物——我已经要6+年的岁月没接触过这个词汇 烦躁，不安，忧郁，沮丧~ 和Jee同学讨论古老的A*寻路问题 想象着把怪物们穿在铁丝上当肉串烤 思考着10年甚至是20年前人们讨论过的事情 &lt;img src="http://lh5.ggpht.com/_jedFwTjISAA/SfH31tv9uoI/AAAAAAAAFKw/Lb1BB_w5gck/coding.png" style="height: 400px;" /&gt;&lt;br /&gt;Coding~&lt;br /&gt;唯一能使自己平静下来的事情&lt;br /&gt;机器始终是听话的、诚实的&lt;br /&gt;人类生长发育&lt;br /&gt;阶段性的记忆细胞分裂会导致忘记一些事物&lt;br /&gt;14岁的时候记不清6岁的事情&lt;br /&gt;24岁的时候记不清14岁的事情&lt;br /&gt;那么在30岁的时候&lt;br /&gt;应该会忘记20岁的那些人、那些事&lt;br /&gt;引: 世界是我们的，也是儿子们的，但最终是那帮孙子们的。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-8393135398861056295?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/8393135398861056295/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=8393135398861056295&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8393135398861056295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8393135398861056295'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/04/coding.html' title='安静的Coding'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_jedFwTjISAA/SfH31tv9uoI/AAAAAAAAFKw/Lb1BB_w5gck/s72-c/coding.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-8983802343377500237</id><published>2009-04-24T01:55:00.000-07:00</published><updated>2010-12-13T03:54:17.459-08:00</updated><title type='text'>木头人儿破例~~转个关于短信的贴儿~~</title><content type='html'>舌头长泡ing~&lt;br /&gt;&lt;object type="application/x-shockwave-flash" data="http://www.macloo.com/examples/audio_player/player.swf" id="audioplayer1" height="20" width="260"&gt;&lt;param name="movie" value="http://www.macloo.com/examples/audio_player/player.swf"&gt;&lt;param name="FlashVars" value="playerID=1&amp;amp;soundFile=http://bbs.cnjxol.com/upload/20080123/U200801231201053807500.mp3"&gt;&lt;param name="quality" value="high"&gt;&lt;param name="menu" value="false"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/object&gt;&lt;br /&gt;当你收到“你干嘛呢”&lt;br /&gt;就等于“我想你了”&lt;br /&gt;发“呵呵”多是没笑或傻笑&lt;br /&gt;但如果我发的是“嘿嘿”“嘎嘎”或者“哈哈哈”&lt;br /&gt;这是你打过来我一定是在笑&lt;br /&gt;&lt;br /&gt;每次骂你“傻瓜”“笨蛋”“屁孩”&lt;br /&gt;都是关心 希望你照顾好自己&lt;br /&gt;&lt;br /&gt;当多是问句结束时&lt;br /&gt;是希望能在和你多聊一会&lt;br /&gt;相反如果“嗯”“哦”一定是敷衍&lt;br /&gt;在意的人我多会回复“收到”“遵命”“知道啦”之类的&lt;br /&gt;&lt;br /&gt;有时催你睡觉或者让你忙自己的&lt;br /&gt;其实心里并不想你真的那么做&lt;br /&gt;&lt;br /&gt;把我的糗事 傻事 失落事告诉你&lt;br /&gt;是希望你安慰我 照顾我 甚至骂骂我&lt;br /&gt;&lt;br /&gt;主动发给你&lt;br /&gt;一定是你在我心中有很重的分量&lt;br /&gt;我很讨厌和不在意的人啰嗦&lt;br /&gt;&lt;br /&gt;喜欢给你起外号的&lt;br /&gt;是我希望可以让你多记住我一些&lt;br /&gt;&lt;br /&gt;“我到了放心吧”“你到了告诉我一声”&lt;br /&gt;是说明我进屋第一个想到的人是你&lt;br /&gt;希望你也如此&lt;br /&gt;或者你一定要一路平安&lt;br /&gt;我不许你有事&lt;br /&gt;&lt;br /&gt;有时实在没话了又想发给你&lt;br /&gt;就会假装发错人&lt;br /&gt;好吧 我承认这很蠢……&lt;br /&gt;&lt;br /&gt;关于爱情：&lt;br /&gt;不要认为后面还有更好的，因为现在拥有就是最好的。&lt;br /&gt;不要认为我还年轻，可以晚些结婚，爱情是不等年龄的。&lt;br /&gt;不要因为距离太远而放弃，爱情是可以和你一起坐火车的。&lt;br /&gt;不要因为对方不富裕而放弃，只要不是无能的人，勤劳可以让你们致富。&lt;br /&gt;不要因为父母反对而放弃，你会发现这个原因而放弃的爱情，将是你一生的悔恨。&lt;br /&gt;其实，对于爱情，越单纯越幸福！一生只谈一次恋爱是最好的。经历的太多了，会麻木，分离多了，会习惯，换恋人多了，会比较，到最后你会不再相信爱情，你会自暴自弃，你会毫无生气，你会行尸走肉，你会与一个你不爱的人结婚，就这样过一辈子···&lt;br /&gt;&lt;br /&gt;所以牵好的手就不要轻易放开，说过的话就不要轻易收回，承诺过的人就不要轻易忘记···&lt;br /&gt;有些人，有些事，既然发生了。&lt;br /&gt;就注定是你一生的回忆··· ！！！&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-8983802343377500237?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/8983802343377500237/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=8983802343377500237&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8983802343377500237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8983802343377500237'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/04/blog-post_24.html' title='木头人儿破例~~转个关于短信的贴儿~~'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-1955406393303114343</id><published>2009-04-23T16:04:00.000-07:00</published><updated>2010-12-10T22:22:31.117-08:00</updated><title type='text'>防御阵形:觉醒</title><content type='html'>玩了一晚上&lt;br /&gt;挺好&lt;br /&gt;不论是画面还是策略&lt;br /&gt;最近塔防类的好像很流行啊&lt;br /&gt;&lt;br /&gt;7点整&lt;br /&gt;今天的计划是睡觉&lt;br /&gt;熬夜&lt;br /&gt;心脏死了~&lt;br /&gt;人也死了~&lt;br /&gt;像这样不知道能进化到什么程度&lt;br /&gt;40？很满足了&lt;br /&gt;&lt;br /&gt;最近毅力退化&lt;br /&gt;总是不能够坚持完成某个预定目标&lt;br /&gt;这样不好不好~&lt;br /&gt;&lt;br /&gt;给自己挖一个坑&lt;br /&gt;然后跳进去&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.verycd.com/topics/2742193/" target="_blank"&gt;&lt;img src="http://image-7.verycd.com/bf5679de74c849b1a427d95029b6904c153679%28600x%29/thumb.jpg" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-1955406393303114343?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/1955406393303114343/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=1955406393303114343&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1955406393303114343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/1955406393303114343'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/04/blog-post_23.html' title='防御阵形:觉醒'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-8592380496782482751</id><published>2009-04-20T08:19:00.001-07:00</published><updated>2010-12-10T22:17:01.785-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>好天气\(^o^)/~</title><content type='html'>&lt;img src="http://4.bp.blogspot.com/_jedFwTjISAA/SeyShwcK6dI/AAAAAAAAFKQ/uEU6EKJxf5U/s400/20090421.jpg" /&gt;&lt;br /&gt;计划&lt;br /&gt;明天睡懒觉~&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-8592380496782482751?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/8592380496782482751/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=8592380496782482751&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8592380496782482751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/8592380496782482751'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/04/o.html' title='好天气\(^o^)/~'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_jedFwTjISAA/SeyShwcK6dI/AAAAAAAAFKQ/uEU6EKJxf5U/s72-c/20090421.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-2966119223682354941</id><published>2009-04-19T09:57:00.000-07:00</published><updated>2010-12-10T22:21:27.466-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>饥饿</title><content type='html'>&lt;img src="http://1.bp.blogspot.com/_jedFwTjISAA/SetYV5kYlYI/AAAAAAAAFKI/MOnryy_1w78/s400/20090420%28004%29.jpg" /&gt;&lt;br /&gt;人在饿的时候会找东西吃而不在乎吃什么&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;生存法则&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;先活着 然后想怎么活&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;人如此&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;软件亦如此&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;前天凌晨四点&lt;br /&gt;昨天凌晨五点&lt;br /&gt;现在极度厌恶“习惯”这个字眼儿&lt;br /&gt;讨厌一切束缚的东西&lt;br /&gt;像蜘蛛网一样萦绕&lt;br /&gt;不能自由思考&lt;br /&gt;猩猩是个可怕的趋势&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;什么叫程序&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;Stallman称之为菜谱&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;吃没有炒熟的芸豆&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;中毒的人分为三种&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;牛、牛虻、牛粪&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;什么叫软件开发&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;一群操不同口音的牛虻试图把某件事情说清楚&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-2966119223682354941?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/2966119223682354941/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=2966119223682354941&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2966119223682354941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/2966119223682354941'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/04/blog-post_19.html' title='饥饿'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_jedFwTjISAA/SetYV5kYlYI/AAAAAAAAFKI/MOnryy_1w78/s72-c/20090420%28004%29.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-9090158253187415268</id><published>2009-04-17T13:29:00.000-07:00</published><updated>2009-04-29T04:30:39.413-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Coding'/><title type='text'>崩溃~继续罢课~</title><content type='html'>This world grows so fast.&lt;br /&gt;&lt;pre name="code" class="java"&gt;package demo.ejb;&lt;br /&gt;&lt;br /&gt;import javax.ejb.Remote;&lt;br /&gt;&lt;br /&gt;@Remote&lt;br /&gt;public interface Hello {&lt;br /&gt;    public String doHello(String name);&lt;br /&gt;}&lt;/pre&gt;&lt;pre name="code" class="java"&gt;package demo.ejb;&lt;br /&gt;&lt;br /&gt;import javax.ejb.Stateless;&lt;br /&gt;&lt;br /&gt;@Stateless(name = "ejb/Hello")&lt;br /&gt;public class HelloImpl implements Hello {&lt;br /&gt;    @Override&lt;br /&gt;    public String doHello(String name) {&lt;br /&gt;        return "Greetings, " + name;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;pre name="code" class="java"&gt;package demo.ejb;&lt;br /&gt;&lt;br /&gt;import java.rmi.RemoteException;&lt;br /&gt;&lt;br /&gt;import javax.ejb.CreateException;&lt;br /&gt;import javax.naming.Context;&lt;br /&gt;import javax.naming.InitialContext;&lt;br /&gt;import javax.naming.NamingException;&lt;br /&gt;&lt;br /&gt;public class Client {&lt;br /&gt;    public static void main(String[] args) throws NamingException,&lt;br /&gt;            RemoteException, CreateException {&lt;br /&gt;        Context ctx = new InitialContext();&lt;br /&gt;        Object objRef = ctx.lookup("ejb/Hello/remote");&lt;br /&gt;        System.out.println(((Hello)objRef).doHello("Tom"));&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;pre&gt;java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory&lt;br /&gt;java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces&lt;br /&gt;java.naming.provider.url=localhost:1099&lt;/pre&gt;&lt;pre class="console"&gt;Greetings, Tom&lt;/pre&gt;Be careful of jacorb.jar (org.omg.CORBA.INITIALIZE...)&lt;br /&gt;They always write &lt;a href="http://www.jboss.org/index.html?module=bb&amp;op=viewtopic&amp;t=108648&amp;postdays=0&amp;postorder=asc&amp;start=0" target="_blank"&gt;document&lt;/a&gt; badly which leads to troubles.&lt;br /&gt;&lt;blockquote&gt;Open JNDIView (at http://localhost:8080/jmx-console/ by default) use the "list" method and look for Your beans in "Global JNDI Namespace" to find out what are the JNDI Names. &lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-9090158253187415268?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/9090158253187415268/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=9090158253187415268&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/9090158253187415268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/9090158253187415268'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/04/blog-post_17.html' title='崩溃~继续罢课~'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-4579891355745577067</id><published>2009-04-17T05:36:00.000-07:00</published><updated>2010-12-10T22:22:26.914-08:00</updated><title type='text'>刺客信条2</title><content type='html'>在文艺复兴时期的意大利，距离第一代有三百多年。&lt;br /&gt;在调酒师Desmond Miles的DNA里，Abstergo公司发现了他另一位祖先的记忆，生活在十五世纪末的贵族Ezio Auditore Di Firenze。这个年轻人遭到家族背叛，被迫踏上踏上复仇之路，最终Ezio和Desmond将发现一个埋藏已久的惊天阴谋，它将对今天的世界产生巨大影响。&lt;br /&gt;&lt;img src="http://lh5.ggpht.com/_jedFwTjISAA/Seh5b-nlr5I/AAAAAAAAFJw/DfZ_M_lqLbU/assassen.jpg" /&gt;&lt;br /&gt;&lt;img src="http://lh4.ggpht.com/_jedFwTjISAA/Seh6Za0KxpI/AAAAAAAAFJ4/YMJJzIVEALM/assassen2.jpg" /&gt;&lt;br /&gt;&lt;img src="http://lh6.ggpht.com/_jedFwTjISAA/Seh6ZqMTunI/AAAAAAAAFKA/g6rb17uDpHU/assassen3.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;Hello, my princess&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-4579891355745577067?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/4579891355745577067/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=4579891355745577067&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4579891355745577067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/4579891355745577067'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/04/2.html' title='刺客信条2'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_jedFwTjISAA/Seh5b-nlr5I/AAAAAAAAFJw/DfZ_M_lqLbU/s72-c/assassen.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2595309773216235436.post-506878235923422845</id><published>2009-04-15T12:10:00.000-07:00</published><updated>2009-04-15T12:32:07.359-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Coding'/><title type='text'>淳朴依旧~</title><content type='html'>一切Code都是纸老虎&lt;br /&gt;想推箱子&lt;br /&gt;已经过去三年了啊&lt;br /&gt;&lt;br /&gt;Code是艺术&lt;br /&gt;Game也是艺术&lt;br /&gt;物欲横流年代&lt;br /&gt;金钱、色情、欲望&lt;br /&gt;换个壳改个名&lt;br /&gt;就是XX传奇了&lt;br /&gt;艺术家都死光了&lt;br /&gt;&lt;br /&gt;凌晨3:30&lt;br /&gt;把一天当做两天过&lt;br /&gt;LIM(Tsleep→5) ⇒ LOSS(life)→0.20833333....&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;#include "Box.h"&lt;br /&gt;bool FrameFunc()&lt;br /&gt;{&lt;br /&gt;    // Process keys&lt;br /&gt;    // Deal with other logic data...&lt;br /&gt;    return false;&lt;br /&gt;}&lt;br /&gt;bool RenderFunc()&lt;br /&gt;{&lt;br /&gt;    hge-&gt;Gfx_BeginScene();&lt;br /&gt;    hge-&gt;Gfx_Clear(0);&lt;br /&gt;    // Render something&lt;br /&gt;    hge-&gt;Gfx_EndScene();&lt;br /&gt;    return false;&lt;br /&gt;}&lt;br /&gt;int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)&lt;br /&gt;{&lt;br /&gt;    hge = hgeCreate(HGE_VERSION);&lt;br /&gt;    hge-&gt;System_SetState(HGE_LOGFILE, "box.log");&lt;br /&gt;    hge-&gt;System_SetState(HGE_FRAMEFUNC, FrameFunc);&lt;br /&gt;    hge-&gt;System_SetState(HGE_RENDERFUNC, RenderFunc);&lt;br /&gt;    hge-&gt;System_SetState(HGE_TITLE, "HGE BOX");&lt;br /&gt;&lt;br /&gt;    hge-&gt;System_SetState(HGE_WINDOWED, true);&lt;br /&gt;    hge-&gt;System_SetState(HGE_SCREENWIDTH, 800);&lt;br /&gt;    hge-&gt;System_SetState(HGE_SCREENHEIGHT, 600);&lt;br /&gt;    hge-&gt;System_SetState(HGE_SCREENBPP, 32);&lt;br /&gt;&lt;br /&gt;    if(hge-&gt;System_Initiate())&lt;br /&gt;    {&lt;br /&gt;        // Load resources&lt;br /&gt;        snd=hge-&gt;Effect_Load("..\\rabbit.mp3");&lt;br /&gt;        // Check resources or release if failed&lt;br /&gt;        // Set up enviroment...&lt;br /&gt;&lt;br /&gt;        hge-&gt;System_Start();&lt;br /&gt;        // Release...&lt;br /&gt;        hge-&gt;Effect_Free(snd);&lt;br /&gt;     }&lt;br /&gt;     // Clean up and shutdown&lt;br /&gt;     hge-&gt;System_Shutdown();&lt;br /&gt;     hge-&gt;Release();&lt;br /&gt;     return 0;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2595309773216235436-506878235923422845?l=lanyueniao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lanyueniao.blogspot.com/feeds/506878235923422845/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2595309773216235436&amp;postID=506878235923422845&amp;isPopup=true' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/506878235923422845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2595309773216235436/posts/default/506878235923422845'/><link rel='alternate' type='text/html' href='http://lanyueniao.blogspot.com/2009/04/blog-post_15.html' title='淳朴依旧~'/><author><name>蓝月鸟</name><uri>http://www.blogger.com/profile/12613313567848648133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_jedFwTjISAA/SZ-bOdSnVtI/AAAAAAAAFBE/xVt4LL8Nvko/S220/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg'/></author><thr:total>0</thr:total></entry></feed>
