tag:blogger.com,1999:blog-46667026785499918522009-05-13T07:49:11.517+08:00自由软件与Linux技术果园Discuss FLOSS and Linux technology.Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.comBlogger92125tag:blogger.com,1999:blog-4666702678549991852.post-60799562478498217512009-05-13T00:57:00.001+08:002009-05-13T00:57:22.624+08:00在北京听到布谷鸟了这个夜晚,开始听到窗外布谷鸟叫。麦子,马上要收割了。   城市之中竟然能听到布谷鸟,很神奇吧。 大家都加油吧   -- Liu LantaoCollege of Information Science and Technology, Beijing Normal UniversityEMAIL: liulantao ( at ) gmail ( dot ) com ; WEBSITE: http://www.liulantao.com/ . ------ Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-57935081637485782532009-05-12T09:28:00.001+08:002009-05-12T09:28:12.474+08:00Working Productively in Bash’s Vi Command Line Editing Mode (with Cheat Sheet)[ 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 aLaxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-17690610757065693192009-04-28T13:09:00.001+08:002009-04-28T13:09:56.401+08:00Subversion主干-分支开发的流程。使用Subversion辅助开发,有一个重要的概念就是主干与分支。采用主干与分支的开发方法,可以有几种不同的策略:1、主干上开发,分支上发布。发布之后,如果分支有BUG(主干可能也是有的),则在分支上修改BUG。然后合并到主干。分支的发布 继续进行。这个一般适用于客户化软件工程的。 2、主干保持一个最新的稳定版本,保证随时能提供稳定的发布版本。而所有的新功能、新技术实验全放在分支上去做开发,进行新技术的验证实验。等分支相对稳定以后,再合并到主干上形成稳定的发布版本。此 时就要更新主干,进行主干版本的升级。很多开源软件基本采取这种策略。 3、还有一种就是这两者的混合,结合两者的优点,即保证随时可以有稳定的版本发布,又能保证客户化的版本分支开发功能及其客 户化版本的维护。下面介绍采用第2中策略的详细步骤和命令。以trunk为主干目录,branches下为分支目录。在分支进行开发,Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-57520263823676806322009-04-25T17:49:00.001+08:002009-04-25T17:49:51.344+08:00Install and Config Sun Java Runtime Environment: How-to.Install and Config Sun Java Runtime Environment: How-to. [ http://www.liulantao.com/ ]  First, get the latest jre from SUN and get the rpm.Go-to http://java.com/en/download/manual.jsp, and choose the rpm file. Then install it using rpm[lax@liulantao-com JAVA]$ sudo rpm -Uvh jre-6u12-linux-i586.rpm Make the system recognize it.[lax@liulantao-com ~]$ sudo /usr/sbin/alternatives --install /usr/bin/Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-53291177129723819472009-04-25T10:40:00.002+08:002009-04-29T11:08:04.597+08:00在Linux上编译安装SUN拼音输入法|Build SunPinyin on GNU/Linux (CentOS/Redhat/Fedora).〔懒桃原创,转载请注明完整链接http://www.liulantao.com/〕= 在Linux上编译安装SUN拼音。 =Sun Pinyin是最近评价很高的一款中文输入法。首先安装必须的工具和库文件:[lax@liulantao-com ~]$ sudo yum install mercurial scim-devel libtool gcc-c++ -y如果安装过程中报错,可以添加下面的东西试试:[lax@liulantao-com ~]$ sudo yum install git gnome-common intltool -y现在把源代码从库中签出:[lax@liulantao-com ~]$ hg clone ssh://anon@hg.opensolaris.org/hg/nv-g11n/inputmethod开始安装过程,以下命令安装使得sun拼音能够在scim中被调用:Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com1tag:blogger.com,1999:blog-4666702678549991852.post-71389898158072214362009-04-21T13:11:00.001+08:002009-04-21T13:11:57.371+08:00磁盘数据救援工具R-StudioR-Studio 是一个功能强大、节省成本的反删除和数据恢复软件系列。它采用独特的数据恢复新技术,为恢复 FAT12/16/32、NTFS、NTFS5(由 Windows 2000/XP/2003/Vista 创建或更新)、Ext2FS/Ext3FS(LINUX 文件系统)以及 UFS1/UFS2(FreeBSD/OpenBSD/NetBSD 文件系统)分区的文件提供了最为广泛的数据恢复解决方案。R-Studio 运行于本地磁盘和网络磁盘,即使这些分区已被格式化、损坏或删除。对参数进行灵活的设置,可以让您对数据恢复实施绝对控制。 R-Studio 工具恢复适合以下情况:1、没有进回收站而被直接删除的文件,或者当回收站被清空时的文件;2、因病毒攻击或电源故障被删除的文件;3、文件分区被重新格式化后的文件(甚至是不同的文件系统);4、硬盘上的分区结构被改变或损害时的文件。在这种情况下,Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-55135000962634191372009-04-15T08:09:00.000+08:002009-04-15T08:10:01.291+08:00Principles behind the Agile ManifestoPrinciples behind the Agile ManifestoWe follow these principles:Our highest priority is to satisfy the customerthrough early and continuous deliveryof valuable software. Welcome changing requirements, even late indevelopment. Agile processes harness change forthe customer's competitive advantage.Deliver working software frequently, from acouple of weeks to a couple of months, with a preference toLaxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-41152592860107337222009-04-07T21:51:00.001+08:002009-04-07T21:51:54.459+08:00使用SVN+SSH,同步Ruby On Rails代码的脚本版本库和开发都在自己的笔记本上进行,而服务器则通过svn来同步代码。每次在服务器上测试都需要运行一系列的命令,并且由于无线网络使用DHCP取得动态ip,每次都要修改。这个过程很麻烦,所以写一个简单的脚本完成这个任务。基本思路很简单:首先修改hosts文件(为svn update时提供方便,即使使用动态ip,也可以每次通过主机名来访问),然后通过svn+ssh来获取代码,之后则进行初步的设定,配置数据库文件, 最后则执行数据库迁移,并且启动script/server。---------------------------------------------[lax@gnu ~]$ cat svn_ssh_from_lax sudo vi /etc/hostssvn co svn+ssh://lax/LAX/_DEV_/_SVN_/repos/www.myshu.org/trunk Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com1tag:blogger.com,1999:blog-4666702678549991852.post-30640073609357860362009-03-04T14:47:00.001+08:002009-03-04T14:47:16.849+08:00YUM error: No module named rpmWhen I am upgrading my Fedora 10 to Fedora rawhide, my desktop was locked. Then I restart the computer, rerun the yum upgrade. some error like the following comes out.-------------------------There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: No module named rpm Please install a package which provides this module, or verify Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-9942532840970132832009-02-26T19:19:00.001+08:002009-02-26T19:19:39.780+08:00Debian Lenny: Chinese Input MethodInstall the Chinese input tool package scim-chines with its recommended packages such as im-switch. - Execute "im-switch -c" from user's shell and select "scim". - Relogin.-- Liu LantaoCollege of Information Science and Technology, Beijing Normal UniversityEMAIL: liulantao ( at ) gmail ( dot ) com ; WEBSITE: http://www.liulantao.com/ . ------ Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-58014390620218254622009-02-26T13:19:00.001+08:002009-02-26T13:19:53.264+08:00Debian Lenny: Audio Not WorkingThe simplest, and currently suggested approach, is to use theasoundconf command. # alsaconfif it still doesn't work for normal users, try add this user to audio group. # adduser lax audio-- Liu LantaoCollege of Information Science and Technology, Beijing Normal UniversityEMAIL: liulantao ( at ) gmail ( dot ) com ; WEBSITE: http://www.liulantao.com/ . ------ Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-9622947148110958262009-02-17T15:47:00.001+08:002009-02-17T15:47:06.898+08:00Install Debian GNU/Linux under an existing Unix-like system VIA chroot and debootstrapI should say the new debian GNU/Linux LENNY is an excellent platform to meet various users' needs.Before starting our installation, the new version of debootstrap and chroot should work on your machine.Information about chroot can be found an "http://en.wikipedia.org/wiki/Chroot". These two software should have been contained in the repository of most of the popular distributions such as redhat/Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-1484532775478794052009-02-07T20:11:00.001+08:002009-02-07T20:11:44.227+08:00嗨,大家好!新年新面貌,我的主页也换了一个新风格。希望这里能够成为我与亲人和朋友们交流的好平台。您可以把本网页加入收藏夹,以便获得最新动态。网址:http://www.liulantao.com/http://www.liulantao.com/blogs/liulantao/atom.xml -- Liu LantaoCollege of Information Science and Technology, Beijing Normal UniversityEMAIL: liulantao ( at ) gmail ( dot ) com ; WEBSITE: http://www.liulantao.com/ . ------ Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-15262693926018808782009-01-24T13:35:00.001+08:002009-01-24T13:35:33.556+08:00Rails国际化的关键步骤。Rails I18n Key Steps.Rails I18n的关键点1、设定locales文档。config/locales/en.yml------------------------------en:  hello: "Hello world"  store: "Store"------------------------------config/locales/zh-CN.yml ------------------------------zh-CN:  hello: "你好"  store: "商店"------------------------------2、解析locale。app/controller/application.rb------------------------------  class ApplicationController < ActionController::Base     Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-31868251063368852032009-01-20T00:12:00.002+08:002009-01-21T08:32:05.705+08:00Rails开发中的MySQL中文问题以及简单解决方式Rails2.2.2对中文的支持是不错的,当然不仅仅是中文,所有多字节文字都能够很好得被支持。对于一个有很高本地化l10n和国际化i18n需求的网站,多语言支持的实现方式很多,最常用的是采用gettext来实现。在网页生成过程中,初学者最容易出问题的就是数据库连接的编码问题。最便捷的解决方式是采用utf8编码方式。Rails应用中config/database.yml中可以在数据库段中设置encoding: utf8如下:----------------development: adapter: mysql encoding: utf8 database: project_development pool: 5 username: root password: host: localhost----------------对于使用MySQL数据库的应用,只要设置/etc/Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-46209653349613641282009-01-19T18:00:00.001+08:002009-01-19T18:00:50.277+08:00# rake rails:freeze:gems VERSION=2.2.2rake rails:freeze:gems VERSION=2.2.2  -- Liu LantaoCollege of Information Science and Technology, Beijing Normal University EMAIL: liulantao ( at ) gmail ( dot ) com ; WEBSITE: http://www.liulantao.com/ .------ Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-27131100148992464462009-01-17T00:35:00.001+08:002009-01-17T00:35:38.130+08:00ROR development with RadRails in Eclipse安装Eclips。菜单:Help - Software Updates - Available Software - Add Sites, http://radrails.sourceforge.net/update, http://updatesite.rubypeople.org/release ------------参考文章-------------------installing RadRails on Eclipse ...........I could not find a proper answer when i wanted to install RadRails on eclipse . This is how it is done , .... in the Eclipse menu go to Help-->Software Updates --> Find Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-90130350942561122472009-01-06T22:47:00.001+08:002009-01-06T22:47:42.668+08:00从“Rails 2.2 / Scaffold功能增强”看Rails敏捷性的提高这几天看《Agile Web Development With Rails, 2nd Edition》(AWDWR),体验一下rails开发的敏捷。不料第一个例子就卡住了。原来书上的例子所需要使用的方法是在rails1.2中有效的,而在rails2.2不被默认支持了。我遇到的这个东西就是那个scaffold!从网上搜索发现大家都说要装plugin才能够使用,可是找到plugin的老巢也没看出什么门道。 于是打开AWDWR,3rd edition beta电子书来看,才发现这个东西已经是可以直接作为script/generate的对象来使用了。下面是成功的使用方式,创建一个product的scaffold:---------------------------------------------depot> ruby script/generate scaffold product \ >Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-77810101134167941042008-12-31T15:36:00.000+08:002008-12-31T16:12:37.909+08:00MSYS的搭建及参数设置MSYS、Qt编译环境的搭建及参数设置liulantao (at) gmail.com--------------------------目标:在WindowsXP中搭建MSYS/MinGW环境,并安装Qt库,编译LinQ。步骤及注意事项:一、按照http://linq.sourceforge.net/compile.php安装MinGW、MSYS、Qt和Win32 OpenSSL。 MinGW安装目录E:\MinGW;MSYS安装目录E:\MSYS。安装后要进行设置,指定MinGW的目录;Qt安装目录E:\Qt。安装过程中要指定MinGW的目录;OpenSSL安装目录D:\OpenSSL。并且要安装一个Visual C++ 2008 Redistributables的东西,openssl下载页面有链接,只有1.7M。二、系统变量System variables中需要设置: 1、Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-26509259813715933992008-11-19T13:47:00.001+08:002008-11-19T13:47:48.280+08:00“升级到Fedora 10后键盘鼠标输入没反应”及解决办法。"升级到Fedora 10后键盘鼠标输入没反应"及解决办法最近把fedora升级到Release 10(Cambridge)。这个版本的软件要比以前的丰富很多,比如Eclipse之外,又加入来了NetBeans,当然也假如不少有趣的游戏。但是重启之后,启动X后鼠标无法移动,键盘也无法操作。再次启动直接进入控制台下,启动gpm之后鼠标可以控制,键盘输入也没有问题。所以不太可能驱动问题。将synaptics驱动重新安装,也不会有效果。 现在看一看启动x之后的信息,<code>[lax@liulantao-com ~]$ startxxauth:  creating new authority file /home/lax/.serverauth.3071X.Org X Server 1.5.3Release Date: 5 November 2008X Protocol Version 11Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-88426635030742708842008-10-28T15:23:00.001+08:002008-10-28T15:23:20.762+08:00fuse-sshfs: 安全mount 远程目录>sudo yum install -y fuse-sshfs ; >sshfs hostname: mountpoint>df -h>fusermount -u mountpoint-- Liu LantaoCollege of Information Science and Technology, Beijing Normal University EMAIL: liulantao ( at ) gmail ( dot ) com ; WEBSITE: http://www.liulantao.com/ .------ Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-54353920284120984072008-10-25T11:04:00.001+08:002008-10-25T11:04:56.543+08:00转:10个最吃香的网站开发技术看起来这些技术都是心在最热门的一些应用,比如facebook开放接口的入选。当然有些就比较传统而且充满技巧性和经验的要求,比如CMS的theme和plugin开发。而framework则面临着迅速变化的境地,竞争也日趋激烈。最终谁能统御市场还难下定论,但是它里面蕴涵的机遇则是谁也不能否认的。------------以下为原文---------------10个最吃香的网站开发技术http://www.cnbeta.com/articles/67944.htm -------------------------------------------尽管美国经济出现危机,但是网站开发领域还是很繁荣的,因为不论是现在或者将来,网络必定是人们日常生活中不可缺少的组成部分。NETTUTS上列出10个最吃香的网站开发技术。作为网站开发工程师,如果你精通这些技术,即便在经济不景气的时候,Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-17870458624208152002008-10-24T15:00:00.002+08:002008-10-24T15:08:59.795+08:00跨平台编程的好工具:编辑器SciTE和编译环境Code::Blocks跨平台编程的好工具:编辑器SciTE和编译环境Code::Blocks这两个软件都是在Windows平台下和*nix平台下使用的自由软件。SciTE支持几十种语言的高亮显示,编程常用的替换、自动补足功能,实在是让人爱不释手。Code::Blocks是一个高效的C/C++开发平台,包含了编辑器、编译器等。它内置了多种模板,甚至可以自动生成简单的OpenGL显示程序。--Liu LantaoCollege of Information Science and Technology, Beijing Normal UniversityEMAIL: liulantao ( at ) gmail ( dot ) com ;WEBSITE: http://www.liulantao.com/ .------Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-80758570124720655422008-10-14T19:41:00.001+08:002008-10-14T19:41:35.333+08:0010分钟让你全面了解当前世界金融危机!-转载 10分钟让你全面了解当前世界金融危机!-转载对金融危机最普遍的官方解释是次贷问题,然而次贷总共不过几千亿,而美国政府救市资金早已到了万亿以上,为 什么危机还是看不到头?有文章指出危机的根源是金融机构采用"杠杆"交易;另一些专家指出金融危机的背后是62万亿的信用违约掉期 (Credit Default Swap, CDS)。那么,次贷,杠杆和CDS之间究竟是什么关系?它们之间通过什么样的相互作用产生了今天的金融危 机?在众多的金融危机分析文章中,始终没有看到对这些问题的简单明了的解释。本文试图通过自己的理解为这些问题提供一个答案,为通俗易懂起见,我们使用了 几个假想的例子。有不恰当之处欢迎批评讨论。        一。杠杆。目前,许多投资银行为了赚取暴利,采用20-30倍杠杆操作,假设一个银行A自身资产为30亿,30倍杠杆就是900亿。也就是说,这个银 行A以 30Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0tag:blogger.com,1999:blog-4666702678549991852.post-83091955390777001492008-10-13T10:21:00.002+08:002008-10-13T10:23:47.713+08:002008年国庆相册-与父母在天安门、王府井点下面的这个地址:http://home.5jia1.com/uchome/space.php?uid=365190&do=album&id=367230--Liu LantaoCollege of Information Science and Technology, Beijing Normal UniversityEMAIL: liulantao ( at ) gmail ( dot ) com ;WEBSITE: http://www.liulantao.com/ .------Laxhttp://www.blogger.com/profile/07029628977635259933noreply@blogger.com0