<?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:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4666702678549991852</id><updated>2010-05-11T22:19:57.958+08:00</updated><title type='text'>自由软件与Linux技术果园</title><subtitle type='html'>Discuss FLOSS and Linux technology.</subtitle><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default?start-index=26&amp;max-results=25'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.liulantao.com/blogs/liulantao/atom.xml'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>115</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-2870561956598449910</id><published>2010-05-11T22:19:00.001+08:00</published><updated>2010-05-11T22:19:58.041+08:00</updated><title type='text'>Emerge抱怨gcc不能工作啦！</title><summary type='text'>Emerge抱怨gcc不能工作啦！平时gentoo自动更新，省心也省力。结果聪明反被聪明误，遇到了搞不清道不明的依赖关系，有个东西是装也装不上，卸也卸不下，只好动手挨着理出来。一次舒爽的emerge --depclean之后，系统里多余的小家伙挨个儿离开了。重启，再来试试revdep-rebuild（系统推荐的步骤是emerge --update --deep --newuse world, emerge --depclean, then revdep-rebuild）。 不好，突然停住了，看看输出的提示，找到红绿交界的地方，看到如下文字：-------code-------checking whether the C compiler (gcc  ) works... no  configure: error: installation or configuration problem</summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/2870561956598449910/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2010/05/emergegcc.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/2870561956598449910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/2870561956598449910'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2010/05/emergegcc.html' title='Emerge抱怨gcc不能工作啦！'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-2376461025494498877</id><published>2010-04-21T16:55:00.001+08:00</published><updated>2010-04-21T16:55:08.177+08:00</updated><title type='text'>补充：使用Ruby进行Log分析</title><summary type='text'>补充：使用str.split方法，分析同一个文件需要的时间：lax@mib ~ $ time ruby accounting_total_reqs.rb 4820147812real    0m8.272suser    0m8.105ssys    0m0.148s-- Liu LantaoEMAIL: liulantao ( at ) gmail ( dot ) com ;  WEBSITE: http://www.liulantao.com/ . </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/2376461025494498877/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2010/04/rubylog.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/2376461025494498877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/2376461025494498877'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2010/04/rubylog.html' title='补充：使用Ruby进行Log分析'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-4221053633967927849</id><published>2010-04-21T16:33:00.001+08:00</published><updated>2010-04-21T16:33:58.598+08:00</updated><title type='text'>使用Ruby进行Log分析：放弃String.split，使用Regexp.match</title><summary type='text'>使用Ruby进行log分析，它的性能成为一个瓶颈。传统在perl中通过split的方式进行字段抽取的工作，在ruby中性能变的极差。对一个32万行的log文件进行统计，抽取其中一个字段进行累加。原有采用split方式，脚本运行时间在12~13s，且CPU占用较高。这种情况下，进行实施数据分析的消耗巨大，无法大范围部署。而让这一状况得以改观的是，采用Regexp.match(str)进行抽取，计算速度有了非常大的改善，在2s内完成了计划的任务。 －－－－－－－－－－－－－－－lax@mib ~ $ cat accounting_total_reqs.rb #!/usr/bin/env rubyf = File.open("NginxAccounting.log")regex = Regexp.new(/req_total:(\d+)/)tp = 0while(f.gets)    $_.</summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/4221053633967927849/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2010/04/rubylogstringsplitregexpmatch.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/4221053633967927849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/4221053633967927849'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2010/04/rubylogstringsplitregexpmatch.html' title='使用Ruby进行Log分析：放弃String.split，使用Regexp.match'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-1997028008038567418</id><published>2010-02-23T21:22:00.001+08:00</published><updated>2010-02-23T21:22:31.859+08:00</updated><title type='text'>Gentoo: setup scim in GNOME</title><summary type='text'>1 add USE flags:  USE="${USE} scim unicode nls"2  emerge -avuDN world3  #  vim /etc/locale.gen;     #  locale-gen    #  env-update ; source  /etc/profile4  add LANG="en_US.UTF-8" to /etc/env.d/02locale 5  set environment inf /etc/source of ~/.xinitrc export XMODIFIERS=@im=SCIM export GTK_IM_MODULE=scim export QT_IM_MODULE=scim6  Sometimes: add line "scim -d &amp;" to ~/.xinitrc-- Liu LantaoEMAIL: </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/1997028008038567418/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2010/02/gentoo-setup-scim-in-gnome.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/1997028008038567418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/1997028008038567418'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2010/02/gentoo-setup-scim-in-gnome.html' title='Gentoo: setup scim in GNOME'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-823527332954063861</id><published>2010-02-11T17:00:00.001+08:00</published><updated>2010-02-11T17:00:16.188+08:00</updated><title type='text'>C++构造函数私有的有趣问题</title><summary type='text'>C++构造函数私有的有趣问题很多情况下，一个类的构造函数是按照public权限作为接口，当构造对象时默认来执行一些初始化功能。但是当构造函数出现在private中时，对类进行实例化时，会无法取得构造函数的权限，于是不能通过这种方式构造对象实例。疑问出现了：如果不能通过构造函数对类进行实例化，那么这个类还有用处吗？其实，构造函数私有并不违背C++的语法规则，我们也大可不必为这个问题担心。解决之道呢，一般来说有两种方法。 第一种方法，使用class的static成员来进行实例化工作。因为他们独立于class的对象，所以不必实例化也能够使用它来进行一些private操作，当然就可以调用那个害羞的构造函数。第二种方法，当然可以通过一些朋友们来绕过这个权限控制，也就是我们都很熟悉的友元函数/友元类。追究原因，因为这类class不能被任意调用创建实例，于是适合构造一些需要进行对象控制的类。--  </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/823527332954063861/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2010/02/c.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/823527332954063861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/823527332954063861'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2010/02/c.html' title='C++构造函数私有的有趣问题'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-1290607663100171099</id><published>2010-01-24T22:38:00.003+08:00</published><updated>2010-02-01T19:05:53.797+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='compiz、gentoo、thinkpad sl400'/><title type='text'>Compiz-fusion on Thinkpad SL400, NVIDIA Card.</title><summary type='text'>1 - Set USE flagsx11-libs/libX11 and media-libs/mesa with xcb enabled.x11-libs/cairo with glitz, xcb and svg enabled.x11-wm/compiz-fusion with emerald enabled.2 - Keywordsdev-python/compizconfig-python x11-wm/compiz x11-wm/compiz-fusion x11-plugins/compiz-plugins-main x11-plugins/compiz-plugins-extra x11-plugins/compiz-plugins-unsupported x11-wm/emerald x11-themes/emerald-themes x11-apps/ccsm x11</summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/1290607663100171099/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2010/01/compiz-fusion-on-thinkpad-sl400-nvidia.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/1290607663100171099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/1290607663100171099'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2010/01/compiz-fusion-on-thinkpad-sl400-nvidia.html' title='Compiz-fusion on Thinkpad SL400, NVIDIA Card.'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-1948535049163342013</id><published>2009-12-10T22:49:00.003+08:00</published><updated>2010-02-01T19:06:23.037+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby、开发语言'/><title type='text'>Ruby让你成为一个愉悦的开发者</title><summary type='text'>在最近工作的几个项目中，我有意无意的采用了Ruby语言。作为一种介于主流与非主流之间的动态语言（TIOBE排名10左右），采用ruby的开发者群体在一度暴涨之后，一直处于一个相当稳定的水平。从效率来看，ruby确实不是一个让人完全满意的选择。在我以前一个项目中实现的一个搜索项目，最先采用了一个PHP的版本，运行起来显示了php一贯的高效和稳定特性。后来采用了ruby进行功能扩展，开发的过程让人愉悦，少量的代码实现了全部功能，并且增加了灵活性，但是在数据量急遽增加的时候，ruby的表现并不如php那样轻松自在。jruby等正在尝试通过新的手段来对这个方面进行改进，前面的路还有很长，值得期待。而抛开这个瑕疵，Ruby语言本身的优雅简洁，却能将开发者吸引到它的圈子。ruby强调代码的质量，在ruby的世界里，到处看到的是短小精悍的代码，寥寥几行，可以清晰看到进程的脉络。</summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/1948535049163342013/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/12/ruby.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/1948535049163342013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/1948535049163342013'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/12/ruby.html' title='Ruby让你成为一个愉悦的开发者'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-1476410669648052340</id><published>2009-09-25T21:35:00.001+08:00</published><updated>2009-09-25T21:35:24.152+08:00</updated><title type='text'>curl -4 --head -H "Host 203.166.178.9" http://www.liulantao.com/images/lax_shetou.gif</title><summary type='text'>lax@homex ~ $ host www.liulantao.comwww.liulantao.com has address 203.166.178.9lax@homex ~ $ curl -4 --head -H "Host 203.166.178.9" http://www.liulantao.com/images/lax_shetou.gif HTTP/1.1 200 OKDate: Fri, 25 Sep 2009 13:19:45 GMTServer: Apache/2.0.52 (Red Hat)Last-Modified: Sat, 07 Feb 2009 07:30:15 GMTETag: "1208ae-16be-1bc9efc0" Accept-Ranges: bytesContent-Length: 5822Connection: </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/1476410669648052340/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/09/curl-4-head-h-host-2031661789.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/1476410669648052340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/1476410669648052340'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/09/curl-4-head-h-host-2031661789.html' title='curl -4 --head -H &quot;Host 203.166.178.9&quot; http://www.liulantao.com/images/lax_shetou.gif'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-5639782625791163843</id><published>2009-09-25T10:49:00.000+08:00</published><updated>2009-09-25T10:50:03.734+08:00</updated><title type='text'>What is Test-Driven Development in Ruby?</title><summary type='text'>TDD steps:1, Write a test that describes some shortcoming or missing feature in the code. 2, Run the tests.3, Write just enough code to make this test pass. 4, Run the tests again. 5, Refactor. 6, Write a test to define a new feature and start the process all over again.Always remember:1, Code doesn't exist yet until it's tested. 2, Run tests religiously. see more: 1, http://ruby.about.com/od/</summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/5639782625791163843/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/09/what-is-test-driven-development-in-ruby.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/5639782625791163843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/5639782625791163843'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/09/what-is-test-driven-development-in-ruby.html' title='What is Test-Driven Development in Ruby?'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-7787423515687806798</id><published>2009-09-24T14:42:00.001+08:00</published><updated>2009-09-24T14:42:54.217+08:00</updated><title type='text'>rake db:drop with permission denied error.</title><summary type='text'>&gt;rake db:drop Couldn't drop db/development.sqlite3 : #&lt;Errno::EACCES: Permission denied - db/development.sqlite3&gt;maybe you run script/console and didn't exit.-- Liu Lantao College of Information Science and Technology, Beijing Normal UniversityEMAIL: liulantao ( at ) gmail ( dot ) com ; WEBSITE: http://www.liulantao.com/ .------ </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/7787423515687806798/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/09/rake-dbdrop-with-permission-denied.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/7787423515687806798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/7787423515687806798'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/09/rake-dbdrop-with-permission-denied.html' title='rake db:drop with permission denied error.'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-4876074992862163302</id><published>2009-09-16T23:51:00.001+08:00</published><updated>2009-09-16T23:51:57.593+08:00</updated><title type='text'>A journey to Gentoo: Intel video card and xorg installed.</title><summary type='text'>config intel video card on Gentoo Linux.first, make sure the kernel module option, "Device Drivers --&gt; Graphics support --&gt; Direct Rendering Manager --&gt; Intel 810" should be checked for my i810 card. then set  VIDEO_CARDS="intel"  in /etc/make.conf.now, reinstall xorg-x11:  # sudo emerge -uDNva xorg-x11.when all above steps were finished, remove /etc/X11/xorg.conf, run $ startx, and everything is</summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/4876074992862163302/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/09/journey-to-gentoo-intel-video-card-and.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/4876074992862163302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/4876074992862163302'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/09/journey-to-gentoo-intel-video-card-and.html' title='A journey to Gentoo: Intel video card and xorg installed.'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-3503778054796519936</id><published>2009-09-07T22:38:00.001+08:00</published><updated>2009-09-07T22:38:26.044+08:00</updated><title type='text'>Installing Chromium Web Browser on Fedora 11.</title><summary type='text'>[lax@homex ~]$ sudo vim /etc/yum.repos.d/chromium.repo [chromium]name=Chromium Test Packagesbaseurl=http://spot.fedorapeople.org/chromium/F$releasever/ enabled=0gpgcheck=0[lax@homex ~]$ sudo yum install *chromium* --enablerepo=chromiumLoaded plugins: aliases, fastestmirror, refresh-packagekitLoading mirror speeds from cached hostfile * fedora: ftp.cuhk.edu.hk  * rpmfusion-free: </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/3503778054796519936/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/09/installing-chromium-web-browser-on.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/3503778054796519936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/3503778054796519936'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/09/installing-chromium-web-browser-on.html' title='Installing Chromium Web Browser on Fedora 11.'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-26549371631330249</id><published>2009-09-07T22:35:00.001+08:00</published><updated>2009-09-07T22:35:11.103+08:00</updated><title type='text'>Output of an Array to sentence, the ruby way</title><summary type='text'>@contacts.collect{|s| s.name}.to_sentence.concat(".") -- Liu LantaoEMAIL: liulantao ( at ) gmail ( dot ) com ; WEBSITE: http://www.liulantao.com/ .------ </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/26549371631330249/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/09/output-of-array-to-sentence-ruby-way.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/26549371631330249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/26549371631330249'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/09/output-of-array-to-sentence-ruby-way.html' title='Output of an Array to sentence, the ruby way'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-1780578745740502135</id><published>2009-09-06T20:53:00.001+08:00</published><updated>2009-09-06T20:53:52.868+08:00</updated><title type='text'>西四新开的一家奶酪魏</title><summary type='text'>奶酪魏，西四店，今年入夏新开的店。老字号的牌子，进去店面不大，装修得简单，但是也干净整洁。奶酪白色小瓷碗，一般是7元。此外还有奶酪卷、奶酪干等品种。我要了一碗原味的，很好吃，入口滑而不腻，奶的香醇之气全在其中，回味很久。平时吃的现酿酸奶与它相比，瞬间就没有了一点儿吸引力。地点嘛，22路、826路等公交车在平安里路口南，路东。过段时间西四的地铁开通，应该更方便了。奶酪魏第一家店位于前门门框胡同15号，名字为麟记酪铺，在经常是极为有名的了，梁实秋的文章中曾有描述。 -- Liu LantaoCollege of Information Science and Technology, Beijing Normal UniversityEMAIL: liulantao ( at ) gmail ( dot ) com ; WEBSITE: http://www.liulantao.com/ . </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/1780578745740502135/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/09/blog-post.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/1780578745740502135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/1780578745740502135'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/09/blog-post.html' title='西四新开的一家奶酪魏'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-8994590103316817892</id><published>2009-09-02T18:52:00.001+08:00</published><updated>2009-09-02T18:52:44.462+08:00</updated><title type='text'>Config rubygems and rails in ubuntu.</title><summary type='text'> sudo apt-get install rubygems  sudo gem install rubygems-update  sudo update_rubygems sudo apt-get install libsqlite3-dev sudo gem install sqlite3-ruby rails-- Liu LantaoCollege of Information Science and Technology, Beijing Normal University EMAIL: liulantao ( at ) gmail ( dot ) com ; WEBSITE: http://www.liulantao.com/ .------ </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/8994590103316817892/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/09/config-rubygems-and-rails-in-ubuntu.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/8994590103316817892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/8994590103316817892'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/09/config-rubygems-and-rails-in-ubuntu.html' title='Config rubygems and rails in ubuntu.'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-7433430769436241291</id><published>2009-08-29T21:44:00.001+08:00</published><updated>2009-08-29T21:44:53.817+08:00</updated><title type='text'>Unix-like系统用户交流信息的几个小命令</title><summary type='text'>向系统所有在线用户发送消息：$ wall [message]如果想设定是否接收这个消息：$ mesg [y|n]向特定用户发送小心：$ write user [ttyname]$ talk person [ttyname]  也可以通过mesg来设定。当然还有选项更丰富的mail命令：$ mail [-iInv ] [-s subject ] [-c cc-addr ] [-b bcc-addr ] to-addr... $ mail [-iInNv -f ] [name ] $ mail [-iInNv [-u user ] ] -- Liu LantaoOak Pacific Interactive Corp. Ltd.EMAIL: liulantao ( at ) gmail ( dot ) com ; WEBSITE: http://www.liulantao.com/ .---</summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/7433430769436241291/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/08/unix-like.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/7433430769436241291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/7433430769436241291'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/08/unix-like.html' title='Unix-like系统用户交流信息的几个小命令'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-6300252633817885750</id><published>2009-08-25T14:21:00.001+08:00</published><updated>2009-08-25T14:21:25.423+08:00</updated><title type='text'>Google Sets is cool!</title><summary type='text'>Use Google Sets to expand a list of a few items, into a list with many items. For example let's suppose you want a set (or list) of Star Wars characters, but can only think of a few. Enter a the ones you can think of, and Google sets will return a whole list. links: http://labs.google.com/sets-- Liu LantaoCollege of Information Science and Technology, Beijing Normal UniversityEMAIL: liulantao ( </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/6300252633817885750/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/08/google-sets-is-cool.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/6300252633817885750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/6300252633817885750'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/08/google-sets-is-cool.html' title='Google Sets is cool!'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-8673785730320933311</id><published>2009-08-25T11:42:00.001+08:00</published><updated>2009-08-25T11:42:47.489+08:00</updated><title type='text'>How-to: disable the PING response.</title><summary type='text'>To disable the PING response, add the following line to your init script for the network:echo 1 &gt;/proc/sys/net/ipv4/icmp_echo_ignore_allTo reenable the PING response do this:echo 0 &gt;/proc/sys/net/ipv4/icmp_echo_ignore_all To make the change PERMANENT add the following line to /etc/sysctl.conf:net.ipv4.icmp_echo_ignore_all=1and execute this commandsysctl -pIt is better to use firewall for these </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/8673785730320933311/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/08/how-to-disable-ping-response.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/8673785730320933311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/8673785730320933311'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/08/how-to-disable-ping-response.html' title='How-to: disable the PING response.'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-2350508221124263108</id><published>2009-08-14T17:32:00.001+08:00</published><updated>2009-08-14T17:32:52.478+08:00</updated><title type='text'>sed -i 's/str1/rep1/;s/str2/rep2/;...;s/strN/repN/' urfile</title><summary type='text'>sed -i 's/str1/rep1/;s/str2/rep2/;...;s/strN/repN/' urfile-- Liu LantaoCollege of Information Science and Technology, Beijing Normal UniversityEMAIL: liulantao ( at ) gmail ( dot ) com ;  WEBSITE: http://www.liulantao.com/ .------ </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/2350508221124263108/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/08/sed-i-sstr1rep1sstr2rep2sstrnrepn.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/2350508221124263108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/2350508221124263108'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/08/sed-i-sstr1rep1sstr2rep2sstrnrepn.html' title='sed -i &apos;s/str1/rep1/;s/str2/rep2/;...;s/strN/repN/&apos; urfile'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-391699956879506830</id><published>2009-08-07T16:33:00.001+08:00</published><updated>2009-08-07T16:33:32.466+08:00</updated><title type='text'>Nginx访问日志统计：按时间计数</title><summary type='text'>$ grep "GET / " access.log | awk '{print substr($4,2,14)}' | uniq -c   4275 04/Aug/2009 14  11484 04/Aug/2009 15  10145 04/Aug/2009 16   9718 04/Aug/2009 17   7522 04/Aug/2009 18    8169 04/Aug/2009 19   8385 04/Aug/2009 20   9033 04/Aug/2009 21   8356 04/Aug/2009 22   6144 04/Aug/2009 23   3457 05/Aug/2009 00   1698 05/Aug/2009 01    853 05/Aug/2009 02    534 05/Aug/2009 03     393 05/Aug/2009 </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/391699956879506830/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/08/nginx.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/391699956879506830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/391699956879506830'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/08/nginx.html' title='Nginx访问日志统计：按时间计数'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-3078914203110187835</id><published>2009-07-28T16:01:00.001+08:00</published><updated>2009-07-28T16:01:52.791+08:00</updated><title type='text'>something about xulrunner and xpcom</title><summary type='text'>----------- addProgressListener( listener, notifyMask )    Return type: no return value     Add a progress listener to the browser which will monitor loaded documents. The progress listener should implement the nsIWebProgressListener interface.  ----------------loadURI( uri, referrer, charset )    Return type: no return value     Load a URL into the document, with the given referrer and character</summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/3078914203110187835/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/07/something-about-xulrunner-and-xpcom.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/3078914203110187835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/3078914203110187835'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/07/something-about-xulrunner-and-xpcom.html' title='something about xulrunner and xpcom'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-5284846683515626430</id><published>2009-07-27T15:06:00.001+08:00</published><updated>2009-07-27T15:06:56.290+08:00</updated><title type='text'>.htaccess</title><summary type='text'>.htaccess&lt;Limit GET&gt;Order Deny,AllowDeny from allAllow from 10.0.0.0/8&lt;/Limit&gt;-- Liu LantaoCollege of Information Science and Technology, Beijing Normal University EMAIL: liulantao ( at ) gmail ( dot ) com ; WEBSITE: http://www.liulantao.com/ .------ </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/5284846683515626430/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/07/htaccess.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/5284846683515626430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/5284846683515626430'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/07/htaccess.html' title='.htaccess'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-7312233985753379492</id><published>2009-07-22T09:46:00.000+08:00</published><updated>2009-07-22T09:47:00.899+08:00</updated><title type='text'>nagios中主机依赖与服务依赖</title><summary type='text'>主机依赖：A主机依赖于B主机服务依赖：A服务依赖于B服务服务依赖有几种情况：A主机上的X服务依赖于A主机上的Y服务A主机上的X服务依赖于B主机上的X服务A主机上的X服务依赖于B主机上的Y服务 依赖关系在主机和服务之间有很重要的地位。比如服务依赖的情况，很多服务都依赖于主机的可连接性，网页的可访问依赖于web服务器的状态。一般情况下，如果主机已经死掉，它上面的其它服务的监测也会失败。如果主机上的服务由不同的管理员负责，通过nagios进行检测，只需通报主机已经down掉的消息给系统管理员即可，因为即使得到其它相关服务无法访问的消息，其它服务管理员无力处理这个问题。nagios默认能够支持刚才提到的依赖。主机依赖也有相似的状况，比如A主机通过B主机连接网络提供服务，如果监测到B主机停止的话，则不再对A主机进行监测。  主机依赖 通过hostdependency进行定义。参数格式定义</summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/7312233985753379492/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/07/nagios.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/7312233985753379492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/7312233985753379492'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/07/nagios.html' title='nagios中主机依赖与服务依赖'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-6079956247849821751</id><published>2009-05-13T00:57:00.001+08:00</published><updated>2009-05-13T00:57:22.624+08:00</updated><title type='text'>在北京听到布谷鸟了</title><summary type='text'>这个夜晚，开始听到窗外布谷鸟叫。麦子，马上要收割了。   城市之中竟然能听到布谷鸟，很神奇吧。  大家都加油吧   -- Liu LantaoCollege of Information Science and Technology, Beijing Normal UniversityEMAIL: liulantao ( at ) gmail ( dot ) com ; WEBSITE: http://www.liulantao.com/ . ------ </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/6079956247849821751/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/05/blog-post.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/6079956247849821751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/6079956247849821751'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/05/blog-post.html' title='在北京听到布谷鸟了'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4666702678549991852.post-5793508163748578253</id><published>2009-05-12T09:28:00.001+08:00</published><updated>2009-05-12T09:28:12.474+08:00</updated><title type='text'>Working Productively in Bash’s Vi Command Line Editing Mode (with Cheat Sheet)</title><summary type='text'>[ This article is from Peteris Krumins' blog, and you can read original aritle here:http://www.catonmat.net/blog/bash-vi-editing-mode-cheat-sheet/. ] Bash provides two modes for command line editing - emacs and vi. Emacs editing mode is the default and I already wrote an article and created a cheat sheet for this mode. This time I am going to introduce you to bash's vi editing mode and give out a</summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/5793508163748578253/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/05/working-productively-in-bashs-vi.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/5793508163748578253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4666702678549991852/posts/default/5793508163748578253'/><link rel='alternate' type='text/html' href='http://www.liulantao.com/blogs/liulantao/2009/05/working-productively-in-bashs-vi.html' title='Working Productively in Bash’s Vi Command Line Editing Mode (with Cheat Sheet)'/><author><name>Lax</name><uri>http://www.blogger.com/profile/07029628977635259933</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12457904257622149369'/></author><thr:total>0</thr:total></entry></feed>
