昨天去那把电脑装上,由于现在资源不足,额外抽出一台服务器给我,其实跟新机器差不多。而且上面只装了Centos,真实非常合俺的意思。这几天,披星戴月,累死劳活的把宿舍机子上的windows xp给换成了Gentoo,虽然说不容易,但用起来真的很爽,什么东西,都让你知道的清清楚楚,就好像知心的朋友,从此以后打心眼里瞧不起windows了。--总之,我宣布,彻底告别windows!
这段日子被折腾的晕头转向的。开学近两周了,貌似还没一天早上准时(更别说提前了)到过教室,更惭愧的是某日清晨走在上学的路上思量着迟到实在太久,不好意思去,便发生了早退现-_!
以后会更忙的,赶紧把emacs整好,好用org-mode来管理管理自己的时间。
Wednesday, February 25, 2009
Monday, February 23, 2009
Gentoo安装之二:安装中文字体
英文环境的gentoo自带的中文字体很陋,所以必须重新安装字体。
emerge arphicfonts wqy-bitmapfont corefonts ttf-bitstream-vera
下载后的字体,位于/usr/share/fonts 中,为了便于管理,可将其移到/usr/local/share/fonts下,一般下下来的字体文件夹内都自带了font.scale和font.dir,无须再用mkfontscale和mkfontdir生成索引,系统能自动识别。当然,前提是,你把字体文件夹的路径加入的/etc/xorg.conf的Files section的FontPath
Section "Files"
RgbPath "/usr/share/X11/rgb"
............#以下开始是中文字体,fontconfig默认会选择第一个
FontPath "/usr/local/share/fonts/ttf-bitstream-vera/"
FontPath "/usr/local/share/fonts/arphicfonts/"
FontPath "/usr/local/share/fonts/wqy-bitmapfont/"
FontPath "/usr/local/share/fonts/corefonts/"
EndSection
另外,再本地化时,/etc/locale.gen应加入:
en_US ISO-8859-1
en_US.UTF-8 UTF-8
zh_CN GB18030
zh_CN.GBK GBK
zh_CN.GB2312 GB2312
zh_CN.UTF-8 UTF-8
再用locale-gen生成以下locale,以便glibc使用。
emerge arphicfonts wqy-bitmapfont corefonts ttf-bitstream-vera
下载后的字体,位于/usr/share/fonts 中,为了便于管理,可将其移到/usr/local/share/fonts下,一般下下来的字体文件夹内都自带了font.scale和font.dir,无须再用mkfontscale和mkfontdir生成索引,系统能自动识别。当然,前提是,你把字体文件夹的路径加入的/etc/xorg.conf的Files section的FontPath
Section "Files"
RgbPath "/usr/share/X11/rgb"
............#以下开始是中文字体,fontconfig默认会选择第一个
FontPath "/usr/local/share/fonts/ttf-bitstream-vera/"
FontPath "/usr/local/share/fonts/arphicfonts/"
FontPath "/usr/local/share/fonts/wqy-bitmapfont/"
FontPath "/usr/local/share/fonts/corefonts/"
EndSection
另外,再本地化时,/etc/locale.gen应加入:
en_US ISO-8859-1
en_US.UTF-8 UTF-8
zh_CN GB18030
zh_CN.GBK GBK
zh_CN.GB2312 GB2312
zh_CN.UTF-8 UTF-8
再用locale-gen生成以下locale,以便glibc使用。
Gentoo安装之三:fcitx在英文系统界面下的安装
为什么使用fcitx:支持双拼,配置性高,快,不和其他程序冲突(暂时没发现)。
这个问题折磨了了我一天有余,罪魁祸首是emerge下来的fictx是nostfx(fictx -v 可查看版本号)版的,装上之后,虽然可以勉强输入中文,但尽是些古怪的文字。网上也没找到到底什么是nostfx版,或许只有yuking自己知道吧。另外,最新的3.6.0测试版无法configure,没细究原因,后来emerge --unmerge fcitx,再到www.fcitx.org下了fictx-3.4.2稳定版。
1.首先配置locale
其实fictx只要求LC_CTYPE=zh_CN,即可,所以为了可以这样设置,
LANG=C
LC_CTYPE=zh_CN
系统就可以仍为英文的。
2.到fictx源码目录下,./configure->make->make install
3.配置文件的GB2312编码
fcitx的配置文件~/.fcitx/config和profile默认是使用GB2312编码,用gedit读取时显示为乱码,可用gconftool-2来配置gedit让其自动识别(也可以在 gconf-editor 里面改):
$gconftool-2 --set /apps/gedit-2/preferences/encodings/auto_detected [UTF-8,CURRENT,GB18030,BIG5,ISO-8859-15,UTF-16] --type list --list-type string
注意,保存时,也要选择GB2312编码(再选择栏中有添加编码),否则fcitx无法读取。
4.让fcitx自动运行
按网上方法,我再~/.brashrc和/etc/env.d/99input中都添加了那三行代码,但都没成功,待进一步试验...
这个问题折磨了了我一天有余,罪魁祸首是emerge下来的fictx是nostfx(fictx -v 可查看版本号)版的,装上之后,虽然可以勉强输入中文,但尽是些古怪的文字。网上也没找到到底什么是nostfx版,或许只有yuking自己知道吧。另外,最新的3.6.0测试版无法configure,没细究原因,后来emerge --unmerge fcitx,再到www.fcitx.org下了fictx-3.4.2稳定版。
1.首先配置locale
其实fictx只要求LC_CTYPE=zh_CN,即可,所以为了可以这样设置,
LANG=C
LC_CTYPE=zh_CN
系统就可以仍为英文的。
2.到fictx源码目录下,./configure->make->make install
3.配置文件的GB2312编码
fcitx的配置文件~/.fcitx/config和profile默认是使用GB2312编码,用gedit读取时显示为乱码,可用gconftool-2来配置gedit让其自动识别(也可以在 gconf-editor 里面改):
$gconftool-2 --set /apps/gedit-2/preferences/encodings/auto_detected [UTF-8,CURRENT,GB18030,BIG5,ISO-8859-15,UTF-16] --type list --list-type string
注意,保存时,也要选择GB2312编码(再选择栏中有添加编码),否则fcitx无法读取。
4.让fcitx自动运行
按网上方法,我再~/.brashrc和/etc/env.d/99input中都添加了那三行代码,但都没成功,待进一步试验...
Sunday, February 15, 2009
在emacs中查字典
实验环境:windows下的emacs22.3,dictionary-1.8.7
1.下载dict mode支持包。
2.安装Windows下的make:
http://sourceforge.net/projects/gnuwin32/
这个开源项目就是要移植一些linux下的常用工具到windows下,其中包括make,grep等等。
3.然后安装dict mode。注意两点:
(1)为方便起见,应先把make的路径加到系统的环境变量中;
(2)修改dictionary-1.8.7的makefile中的EMACS变量的值为你的runemacs的路径。
2.在配置文件init.el或(.emacs)中添加如下代码:
OK了,上面几个操作函数意思如下:
dictionary-search:请求输入一个单词,输出所有的解释条目。
dictionary-lookup-definition:查当前鼠标处的单词。
dictionary-match-words:输入一个匹配模式,输出匹配的单词。
dictionary-popup-matching-words:弹出一个菜单,显示各个字典中相的匹配单词(匹配策略点击按钮Select Match Strategy中选择)。
在查询结果窗口中,输入h可查看快捷键。
有了这个,看起英文文档来就方便多了,而且用的是原汁原味的英语词典,对英语水平的提升也很有帮助啦。
1.下载dict mode支持包。
2.安装Windows下的make:
http://sourceforge.net/projects/gnuwin32/
这个开源项目就是要移植一些linux下的常用工具到windows下,其中包括make,grep等等。
3.然后安装dict mode。注意两点:
(1)为方便起见,应先把make的路径加到系统的环境变量中;
(2)修改dictionary-1.8.7的makefile中的EMACS变量的值为你的runemacs的路径。
2.在配置文件init.el或(.emacs)中添加如下代码:
;;-----------------dictionary------------------
(autoload 'dictionary-search "dictionary"
"Ask for a word and search it in all dictionaries" t)
(autoload 'dictionary-match-words "dictionary"
"Ask for a word and search all matching words in the dictionaries" t)
(autoload 'dictionary-lookup-definition "dictionary"
"Unconditionally lookup the word at point." t)
(autoload 'dictionary "dictionary"
"Create a new dictionary buffer" t)
(autoload 'dictionary-mouse-popup-matching-words "dictionary"
"Display entries matching the word at the cursor" t)
(autoload 'dictionary-popup-matching-words "dictionary"
"Display entries matching the word at the point" t)
(autoload 'dictionary-tooltip-mode "dictionary"
"Display tooltips for the current word" t)
(unless (boundp 'running-xemacs)
(autoload 'global-dictionary-tooltip-mode "dictionary"
"Enable/disable dictionary-tooltip-mode for all buffers" t))
;; key bindings
(global-set-key "\C-cs" 'dictionary-search)
(global-set-key "\C-cm" 'dictionary-match-words)
(global-set-key [mouse-3] 'dictionary-mouse-popup-matching-words)
(global-set-key "\C-cd" 'dictionary-lookup-definition)
;; for dictionary tooltip mode
;; "web1913" for Webster's Revised Unabridged Dictionary(1913)
;; 貌似在emacs 22.3中不支持tooltip,即鼠标取词,故去掉,节省内存
;;(setq dictionary-tooltip-dictionary "web1913")
;(global-dictionary-tooltip-mode t)
(setq dictionary-default-dictionary "web1913")
OK了,上面几个操作函数意思如下:
dictionary-search:请求输入一个单词,输出所有的解释条目。
dictionary-lookup-definition:查当前鼠标处的单词。
dictionary-match-words:输入一个匹配模式,输出匹配的单词。
dictionary-popup-matching-words:弹出一个菜单,显示各个字典中相的匹配单词(匹配策略点击按钮Select Match Strategy中选择)。
在查询结果窗口中,输入h可查看快捷键。
有了这个,看起英文文档来就方便多了,而且用的是原汁原味的英语词典,对英语水平的提升也很有帮助啦。
Saturday, February 14, 2009
Sunday, January 18, 2009
做人、做事、做学问--胡伟武本学期最后一堂课摘录
听君一席话,胜读十年书。愿你我共勉。
一、全面优化你的人生设计(1)简单经历与似是而非的机会:不要因为一件事不可能完成,而不去做。
(2)“运气好”的必然性与偶然性:吃小亏终占大便宜。
(3)修身为本,立志为先,成功平台的重要性:在你每个人生阶段,树立几个榜样,不断调整,看最终能否达到。
(4)不埋怨,不抱怨:困境是一时的,怨天尤人只会让你更消极,谁能在困境中做到这点,谁就是王者。
二、艰苦奋斗
(1)我做的比别人好,是因为我比别人更努力:世上真正的天才有几个,即使是天才成才的又有几个。不要期待不可能事件会发生在你的头上,问问自己是否比别人更加努力?
(2) 耐得住寂寞,抵得住诱惑:要有别人说我傻,我就笑他们傻的勇气。“当年我有公费出国的机会,但我没去,博士毕业后只有800多工资,村里的人都说我傻,但我就认为他们傻,出去干什么啊”,你有这个觉悟吗?
(3)除了艰苦奋斗,还是艰苦奋斗
三、勤于学习
(1)从书本中学习,从实践中学习,学而时习之,不亦悦乎
(2)学习知识,学习方法,学习哲学
(3)把握事物的简单性:“吾道一以贯之”
(4)在学习中提高修养
what is love--the movie "Artifcial intelligence" told us
The movie is told a young boy Davild,who is a high advanced robotic with love,dreams to receive his "mother" Monica's love--a real woman who is going to lost her only son and then adopt Davild.But human beings,as you and I,can share our love to a machine?Most of us may think it is a silly thing,even the kindly mother can not absolutly.However,the "ignorant" automaton perceive love from his "mother",he thought the reason why she adapted him is just because he is not a real human.Therefore,the clining boy begin the way searching for "blue fairy" in legend,who can help him to be a real man.Two thousands year later,the silly robotic achieved his dream,with the help of the 2000-yeas-after robotics,his mother was cloned for one day's life.The day,only beyond to him and his mother,was full of happness,the only happy day in his life,but enough.The end of the day,the mom died again,and Davild sleeped beside she,with a sweet smile and a good dream.
In the world,one thing is very simple but we alawys take it complex and confusing.In fact,most time not because love we to do somthing,but we do that for love.That is the soure of love.In other words,love is not the reason but the result,a perpetual,constant feeling to the person you love.Motherhood is the best example.
That is the true love,which can move you deep into heart,I think,the others are presudo or jejune.
Friday, January 16, 2009
保护眼睛的字体增强补丁(只对液晶有效)
ClearType不是专门的字体,而是一种显示技术,可以称为"超清晰显示技术",它是专门为液晶显示器用的,可以大大增强所有文字的显示清晰度(包括中文),而且,普通的显示管显示器(阴极射线管显示器)也可以使用。效果大大增强,不妨试试吧:)
要实现这个效果,不是使用专用的字体文件,而是必须下载一个补丁,开启ClearType功能即可。
下载地址:
http://d.download.csdn.net/down/964411/fz_zhou
要实现这个效果,不是使用专用的字体文件,而是必须下载一个补丁,开启ClearType功能即可。
下载地址:
http://d.download.csdn.net/down/964411/fz_zhou
Thursday, January 15, 2009
The last exam of this semester
The result is always not as what you thinked before,even if you did hard.
May I take a rest?
No,many more tough missions have to be done.
May I come to delight?
No,I don't know how to make them and what are the results,just as I cannot image what my life likes tomorrow.
Nice day tomorrow!
PS:Giving in,I considerred,but it's beyond me.
May I take a rest?
No,many more tough missions have to be done.
May I come to delight?
No,I don't know how to make them and what are the results,just as I cannot image what my life likes tomorrow.
Nice day tomorrow!
PS:Giving in,I considerred,but it's beyond me.
Tuesday, January 13, 2009
Wednesday, December 31, 2008
The last day of 2008
Life is tough,this year.
First,Several months ago,I got a ticket to ict after payout for almost a year.The target has been acomplished perfectlly,but I'm not happy by the time I getting real contact with the place where I had been longing for.On the retrial day,I said to myself :"I'm not belong here",just a feeling.Half year past,the situation is that we have been ignored.
Second,the whole world financial crisis also affects my famliy.We are poor,but we paid for the failure of games played by the rich!
But,the worst thing is she left me.These days I always try to keep me in busy,so that I will not think of this all the time,which take me to desperation.But I cannot forget her for ever,the only one person who love me so much besides my relatives,she give me a lot.There is no hope to find the second one evermore.Many times I want to beg her pardon for me,but I still couldn't chang my mind.The life she want I cannot give her.So if I do that,the only result is hurting her again.The pity girl has been hurt by the unfair reality so much,I cannot.You must get your happness,deepest bless to you.
The only good thing is I find I am young and the fate is still in my own hands.The de-facto force me to make a new way,I think.Hope for bright days in 2009!
First,Several months ago,I got a ticket to ict after payout for almost a year.The target has been acomplished perfectlly,but I'm not happy by the time I getting real contact with the place where I had been longing for.On the retrial day,I said to myself :"I'm not belong here",just a feeling.Half year past,the situation is that we have been ignored.
Second,the whole world financial crisis also affects my famliy.We are poor,but we paid for the failure of games played by the rich!
But,the worst thing is she left me.These days I always try to keep me in busy,so that I will not think of this all the time,which take me to desperation.But I cannot forget her for ever,the only one person who love me so much besides my relatives,she give me a lot.There is no hope to find the second one evermore.Many times I want to beg her pardon for me,but I still couldn't chang my mind.The life she want I cannot give her.So if I do that,the only result is hurting her again.The pity girl has been hurt by the unfair reality so much,I cannot.You must get your happness,deepest bless to you.
The only good thing is I find I am young and the fate is still in my own hands.The de-facto force me to make a new way,I think.Hope for bright days in 2009!
Tuesday, December 30, 2008
Subscribe to:
Posts (Atom)
To-do
- Only think things in down the line
- lab:ROCK parallelize
- study:devel into dm
- health:insist on exercise
- data mining course project