Li-Zhao's HomePage


I (LI Zhao) am from School of Computer Engineering, Nanyang Technological University, working in Sybase.
This is a memory book for me, so, miscellaneous topics can be found here.
Have fun!



Loading Blog Search...

Tuesday, May 22, 2007

Alternatives to EndNotes

Without reference management software, writing long papers sometimes can end as a disaster. As I was used to write paper using latex, it is not a problem util now when I need to write in MS Word.

OK, I know EndNotes is the de-facto standard for Word to manage references, but it is a bit expensive.

Fornunately, there are free/opensource alternatives we can use, please refer to http://en.wikipedia.org/wiki/Comparison_of_reference_management_software for more info.

I tried Zotero with Word, and found it is so convenient, although it supports a few reference/citation styles. But that's enough for me so far.

Hope it keep going and supports more features.

Sunday, April 22, 2007

sopcast to NBA

I must stay in home today to wait a cleaner, our home is so dirty now.

While I was so boring that I wander around to find anything interesting to do, I recalled today is the first game in the series of houston VS. utan.






I haven't subscribed any sports channel like ESPN, so the only chance is to try whether those P2P network TV can work.

I downloaded sopcast and installed its GUI gsopcast on my kubuntu.

So great that free China sports channels are broadcasting this game and can play smoothly using sopcast. What even better is the result. :-D

Sunday, April 15, 2007

How to print duplex pages using Brother DCP-115C

It is not convenient to print duplex pages on Brother DCP-115C, here gives the tips.

  • Print duplex, long edge:
  1. print odd pages, with reverse order
  2. remove the printed papers from output tray
  3. rotate the papers 180'C
  4. insert the papers to input tray
  5. print even pages
  • Print duplex, short edge
  1. print odd pages, with reverse order
  2. remove the printed papers from output tray
  3. insert the printed papers to input tray
  4. print even pages
For word, the print dialog may have no options to print odd/even pages, so:
  • Word's extra setting to print odd pages in reverse order
  1. check manual duplex option
  2. click option button in print dialog, to open option dialog
  3. check the front side box

Friday, April 13, 2007

How to remove annoying location auto-detection by Google

If you are in some countries, when you search in Google, it may auto-redirect you to search results specified according to your location. For example, if you are in Hongkong, Google will automatically search from google.com.uk, which is undesired for many of us.

I just submitted a search plugin to Firefox community, you can install it to avoid Google to do that, i.e., it always search from google.com.

Please search "Li, Zhao", and install the plugin with id=16536 (when mouse move over, the ID will display) from:
all google's search plugins

Monday, April 09, 2007

startup vnc server automatically with xdm

You may expect a xdm will display when you open a vnc viewer to a server, there are at least two benefits:

  1. no need vnc to maintain its own password
  2. automatically start vnc service
There are some links you can follow to set as you desired:
  • http://ubuntuforums.org/showthread.php?t=259448
  • http://www.oreilly.com/catalog/morelnxsvrhks/chapter/hack13.pdf
  • http://gentoo-wiki.com/HOWTO_RealVNC,_TightVNC,_XF4VNC
I am using kubuntu 7.04, and found some gtk applications always complain vnc4server, for reasons such as xinputextension is missed, or 109 erros (I do not know what's these). But tightvncserver works well. So, I choose tightvnc, and my /etc/xinet.d/vnc is:

{
socket_type = stream
protocol = tcp
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -ac -query localhost -once -geometry 1300x900 -depth 16
}
The reason to use 16 depth instead of 8 is eclipse cannot run on 256 colors.

Sunday, March 11, 2007

How to install chinese fonts for Damn Small Linux DSL 中文支持

I have a very old laptop with PII 300Mhz CPU. I managed to install Gentoo Linux before, but seldom use it. Today, When I was cleaning my desktop, found it, but I forgot almost everything about Gentoo when I want to install sth.
It is burdonsome to install anything on such a old Gentoo box, so, it is the time shift to a light Linux distribution, such as DSL and puppy.
After spend 10mins to download DSL 3.3 RC2, it bootup the PII in 1 min. Wow, it really rocks on my ancient machine. Unfortunately, it does not support Chinese. However, by studying mydslPanel (the tools to install software on DSL) for half an hour, my Firefox can display Chinese fonts properly already.
To install chinese fonts, please do:

  1. Install japanese-fonts using mydslPanel on desktop, it will download japanese-fonts.tar.gz to /tmp by default.
  2. copy /tmp/usr /usr
  3. copy some fonts file from another Linux system supporting Chinese. I am running Ubuntu on another laptop, so, I copy all /usr/share/fonts/X11/misc/* from the Ubuntu to /usr/X11R6/lib/X11/fonts/misc
  4. run /usr/bin/japanese-install.sh
Now, your DSL is chinese-awared.

Sunday, March 04, 2007

JAVA Chinese fonts on Ubuntu

These days, I am trying to write a crossplatform tools (https://sourceforge.net/projects/bloghub) using JAVA, on a Kubuntu laptop. Although I expected that Linux JAVA chinese support could be much better than 5 years, when I use JAVA to do development, I am so disappointed that my JAVA system just show all Chinese characters as blank boxes.

Fortunately, the solution is quite simple:

  1. Search where is your system chinese fonts are, e.g., I use simhei&simsun from M$, at /usr/local/share/fonts.
  2. cd $JAVA_HOME/jre/lib/fonts
  3. ln -s /usr/local/share/fonts fallback
Is it simple? Sure we can adjust the fonts to display better, but that's enough for me. Good luck!

Monday, February 12, 2007

Layout Upgraded

My blog finally moved to new blogger now, with brandnew layout. It is good, considering it hasn't been changed for several years. Another reason to immigrate is I have no time to maintain some features I implemented based on old blogger system, while new blogger provides some attractive ones. I must say sorry to buddies who are using blogcat services, as it is out of work now.

Tuesday, January 02, 2007

8-steps home-made rice wine

Pre-requisites:

  1. 糯米 1公斤 glutinous rice 1kg
  2. 甜酒曲 (注意不要是用烧酒曲)yeast for glutinous rice wine
  3. 高压锅 autoclave
  4. 蒸笼 steam box
  5. 2.7升大玻璃罐 (或者搪瓷缸)2.7L large glass jug (or enamel jug)
Steps:
  1. 浸米[米洗净后用自来水泡一夜];
  2. 滤米: 把泡好的米,倒在有小孔的盆(漏盆)内,滤水半个小时
  3. 蒸米: 将白纱布洗湿后,再垫在蒸笼内放入高压锅,把米倒在纱布上(在米上用筷子戳几个孔,米熟得快),用高压锅压,待高压锅盖子上气孔发出响声后15分钟关火:
  4. 过水: [把糯米饭倒在漏盆内,用筷子把饭团拨开,米饭不能成团粘在–起,这很重要!要让每粒米饭,都能冲到自来水];
  5. 滤水:[把冲好自来水的米饭,放在漏盆中滤水,一定要滤干!否则糯米饭会变质!需4个小时以上!很重要。];
  6. 拌酒曲:[把米饭倒在玻璃罐(1kg糯米可放于2.7升罐内,IKEA有卖),边撒酒边搅拌,让饭上有曲就可以了,拌均匀更好。再把米饭拍平、拍紧,这样可以更好和酒曲发酵,再在米饭中间开一个圆形的洞,并在米饭的平面上、洞内都撒一些酒曲];
  7. 盖严玻璃罐并密封:[在28度气温下2天以后再打开看一下,如酒汁已经超过玻璃罐一半高度,就再把米饭再翻动; 再过一天,酒味就会纯、更甜、酒汁也更多的];
  8. 保存: 只需保持玻璃罐密封即可 (如果一直放于28度室温下,酒将持续发酵,逐渐趋于烧酒口味; 如果要停止发酵,可将罐至于冰箱内)。

Tuesday, November 21, 2006

More online bookmark service is here now

In a previous post, I introduced an online bookmark service, which allow you to store your bookmark online and then synchronize it among several computers. I encountered some bugs when I use this service, such as browser hangs if service is down (frequently). But now, there are much more similar service available for our choice.

  1. del.icio.us
  2. Google Browser Sync
  3. Foxmarks
  4. Clipmark
I am trying del.icio.us from yahoo, which can tag your bookmark instead of organizing in different folder.

Tuesday, November 07, 2006

Desktop Search for Source Analysis

Now, there are always Gigas source codes for me to pass. Without source analysis tools like source insight or source navigator, it really can be a big trouble sometimes.

Unfortunately, source insight is a bit expensive to deploy into all my PCs. On the freeware side, source navigator does not support c# so far (even worse, it failed several times when I try to add Gigas c++ files to a project).

Consider that the main feature I use in source insight is to search reference, caller, definition, etc. of a given entity, can we use a desktop search engine to do these work. Of cause, we stand a little chance to get such a desktop search engine.

But after I tried some engines, I feel they can help much, when I have no source insight installed. What's better is they usually do search much faster than source insight.

There are lots desktop search engine today. I have no time to try them all. So, I selected three for reference.

  • Microsoft Index Services (MIS)
  • Google Desktop Search (GDS)
  • Copernic Desktop Search (CDS)

    As MIS is integrated in windows, it is attractive that I donnot need to download and install anything, if it can be used. But I found it is slow, in terms of both indexing and searching. BTW: I use a wiki system based on MIS --- Perspective Wiki.

    Then I tried GDS, it provides search interface integrated into google search page. Maybe it is attractive for thoese google fans, but I guess they will be disappeared when they found GDS almost cannot refine search result, difficult to configure search for each folder, etc.

    After some googling, I found CDS. Its rate is quick good in some reviews. Another reason I select it is I recalled that I used to use another search product from Copernic around 2000. :-)

    Based on 1 hour experience, I think CDS is quite good for me to analyze source codes. It can easily start search inside a folder, restrict file name, date in a standalone native program.

    Maybe we can improve source navigator based on these open source desktop search enigne? :-D

  • Thursday, November 02, 2006

    SciTE --- Firefox of text editor

    SciTE is a light-weight, cross-platform, fast text editor I always use. For example, on windows platform, it can be a single exe file you can copy to anywhere you like, and smaller than 500k, which is much smaller than editplus and ultraedit.

    Despite of its small size, it is highly configurable, there are menu items to edit its default properties, e.g., whether to show line number, where to wrap long line, etc.

    For example, the following four lines make scite wrap and show line num automatically, and prompt a user to reload a file when the file is changed out of scite.
    wrap=1
    line.margin.visible=1
    load.on.activate=1
    are.you.sure.on.reload=1
    For more documents, please refer to http://www.scintilla.org/SciTEDoc.html

    Thursday, October 05, 2006

    Hotkeys for Logictech cordless desktop EX110

    I set up my old IBM T23 as media center in my living room, and got the cheap Logitech Cordless Desktop EX110 as remote.


    As it is running Linux, a few tricks are needed to use these multimedia keys on the keyboard. First, hotkeys should be installed and autostart when X startup. And hotkeys.conf and itouch.def should be edited.



    For a ubuntu user, please edit:
    /usr/share/hotkeys/itouch.def

    In this file, the codes of keys are mapped to some names easy to remember. And then please edit:

    /etc/hotkeys.conf

    In hotkeys.conf, each key name is mapped to a command, when the key is pressed, corresponding command will be invoked.

    To know what's the keycode of a key, we can run xev, and press the key, xev will print corresponding keycodes to standard output.

    A easier way: as for most Logitech keyboard, the keycodes can be found at here

    Some useful keycodes are (copied from 1n12, maybe is for microsoft keyboard, but most are right for my logitech, haven't tried all):
    keycode 115 = SLstart
    keycode 116 = SRstart
    keycode 117 = Smenu
    keycode 234 = Sback
    keycode 233 = Sforward
    keycode 232 = Sstop
    keycode 231 = Srefresh
    keycode 122 = Ssearch
    keycode 230 = Sfavourites
    keycode 130 = Swebhome
    keycode 236 = Smail
    keycode 160 = Smute
    keycode 174 = Svolumedown
    keycode 176 = Svolumeup
    keycode 162 = Splaypause
    keycode 164 = Sstop
    keycode 144 = Sprevtrack
    keycode 153 = Snexttrack
    keycode 129 = Smedia
    keycode 198 = Smycomputer
    keycode 161 = Scalculator
    keycode 223 = Ssleep

    Sunday, October 01, 2006

    kde input problem (scim bug?)

    So far, I have gotten four laptops (DELL 610, IBM t23, TOSHIBA portege 4010, and one ancient HITACHI), although most of them are aged, they are still usable, at least they over-perform VMWare to run 2nd OS.

    Now, I can install Linux, Windows seperately, and put one in each room in my flat. :-D So, I am in good mood, and decide to use Kubuntu on the IBM T23, as its Linux support is better than portege 4010 (with modem and graph accelerator).

    But there is a weird and annoying problem I meet in kubuntu, i.e., when I set XMODIFIERS="@im=SCIM", and use SCIM as XIM input method, randomly, some programs in KDE cannot get keyboard input. I believe it is due to the cooperation between kubuntu and scim, as I haven't met this problem before I use kubuntu.

    Sorry that I have reported the bug to neither Scim nor KDE. I just replaced scim with fcitx. Although fcitx supports only simplied chinese, it is enough for me. Hope it can work well.

    Friday, September 15, 2006

    Oral Defence

    After LONG3 time wait (about 1 year and 3 mths), my oral defence date is finally confirmed and it is today.
    I will get the certification letter first followed by the degree, which will cost another 10mths' wait. OK, hope everything goes smoothly.

    Monday, September 04, 2006

    Crocodile hero died in an accident

    The famous austrilian "Crocodile Dundee" (Mr. Irwin) has dies in an diving accident. The news is published in BBS website today (4-Sep-2006), while the exact date has not been mentioned in the report.

    http://news.bbc.co.uk/go/rss/-/2/hi/asia-pacific/5311298.stm

    I love this guy, although I have no much love for wildlife like him. Mourn over him.

    Thursday, August 31, 2006

    Funny, IE7

    Now IE7RC1 is running on my laptop, and I am writing this post using it. After using it for several hours, it is so funny to find it looks like firefox so much.

    I like it, it provides more features, such as:
    1. can use ctl+D to select all in url box, no matter where the focus is.
    2. can use ctl+W to close current window
    3. fonts are adjusted
    4. can use ctl++/- to zoom in/out pages
    5. integrated RSS
    6. middle click can open a new tab
    7. tab browsing
    8. ...

    Based on 1 day IE7 experience, it resembles firefox so much, as all the features above is what I like in firefox. It is also funny to find that Microsoft is pursuing usability following other companies, which seldom happened in the last decade, at least in such an important product.

    Friday, August 25, 2006

    Hosting Problem

    Free web hosting is attractive for guys like me, but it is really a bit annony when my hosting server always down in these days.
    Anyway, I will insist to use the free service, util I get enough reason to pay for my website.

    Tuesday, August 15, 2006

    blogger system update

    Finally, blogger system is to be integrated to Google's infrastructure. Please check out at beta.blogger.com. The new blogger system provides more features, such as article category.

    Friday, July 14, 2006

    Our Anniversary

    2005年7月12日 我们难忘地结婚了, 至于有多难忘, 请参见前帖 , 在此不再长篇累牍。

    一年时间过去得嗖嗖地, 在老婆的操持下,老公的努力下, 生活那是叫个忙碌。 我们去了曼谷;玩了马六甲;然后我开始在新加坡的第一份工作;参观了美国; 老婆拿了第一份年终奖和薪水提升 ; 签了我们第一份购房协议书;改完了我的毕业论文; 筹足买房款; 完成购房; 忙装修, 搬进了新家。 真是流水无情, 日新月异。

    7月11号, 老公急冲冲从印尼出差现场赶回新加坡, 完成了和老婆的共进晚餐大页,席间, 孝敬向日葵一株。 在回家摆置好该葵之后(参见左图, 位于我们的餐桌之上, 裕华国货所得瓷画之前), 我们三下五除二的以史上最快的速度收拾完7月12日的度假用品后就要准备出发了。 鉴于老婆对老公象向日葵一样成长的殷切期待,我们称之为:

    向日葵之旅

    说时轻松,那时紧张, 这次周年小修能够成行是真的不容易, 在之前的一个月中, 我们合计提出建议若干,计划若干,探访旅行社若干,合计久久, 无奈无奈发现两个人基本就安排不出时间一起出门超过几天。 那么如果只有一天时间, 我们可以去哪里? 答案还是很多的 ---- 洗衣服咯, 做饭咯, 打扫卫生咯, 逛街咯, 去百去百厌的新加坡旅游景点咯。 嗯, 还好, 我们最终想起了一个美妙的答案 ---- 去海边度假屋看日出吧。

    事实证明, 看日出是一个可遇不可求的任务, 我们后面再说。

    感谢IRC, 感谢Coast Sands Resort, 感谢老婆坚持不懈的努力, 感谢老天, 我们在11号上午终于预定到了一间IRC club合作度假村的

    小屋 (本两人为该会会员), 此是前话。在我们结束这次小修的时候, 发现我们度假屋在该club的绝对地位超然, 此是后话。让我们回到主题。

    小夫妻俩抗起大包小包, 在地铁上小睡了一觉共一个小时之后,辗转Taxi来到了Coast Sands Resort, 很快就安顿下来。 小屋的装饰满是浓浓的resort

    风格, 每一张木凳,每一张桌子都够厚实质朴。 藤编的床沿,抽屉在时日的琢磨下有点意思。 最让我们爽到的是4米多高的屋顶,卧室到客厅的无隔断设计, 让空间显得特别放松。 我们在各自的洗漱间淋浴更衣, 之后, 小小享受了一点小酒。

    眼看时间还早,经过民主决议, 我们一致同意出门走走。 走出门, 发现屋后的栅栏的一扇小门。 沿小门外是椰子, 棕榈, 波罗蜜, 暂时超出我们认知范围的种种树木, 还有草地。半夜时分, 云大都厚厚地落在了天际, 月亮分外皎洁, 在薄云后穿行。 透过月光的树影斑驳陆离地把几条海边小路装饰的蛮是漂亮。 海边!? 怎么就到海边了? 忘记交待, 我们一出小门,就发现海边原来就在我们后窗后100米, 隔开着一片草地而已, 只是可惜空调的风声遮挡了海上的风。

    走不多远, 我们从草地来到沙滩, 月亮在天顶把海水吸得高高的, 把几颗孤零零的树的根淹没在水中。 陪着这些树一起吹吹海风 and signed our names in the edge of sea后, 我们打道回府, 一夜无话, 按下不表。 第二天, 我们没有起来看日出, 因为, 大雨陪我们睡到了9点多, 嗯It is Yesterday Once More

    小屋外小屋外

    小屋外

    小屋外

    小屋外

    小屋外

    小屋外

    小屋外

    小屋外

    探险玩具

    探险玩具

    探险玩具

    探险玩具

    探险玩具

    探险玩具

    探险玩具

    探险玩具

    探险玩具

    探险玩具

    探险玩具

    探险玩具

    探险玩具

    探险玩具

    探险玩具

    探险玩具

    千米走单车

    千米走单车

    千米走单车

    千米走单车

    千米走单车

    千米走单车

    千米走单车

    千米走单车

    千米走单车

    千米走单车

    千米走单车

    千米走单车

    签字

    签字

    签字

    签字

    签字

    签字

    签字

    签字

    签字

    签字

    签字

    签字

    签字

    签字

    海滩

    海滩

    海滩

    海滩

    海滩

    海滩

    海滩

    海滩

    海滩

    海滩

    海滩

    海滩

    loyang港

    loyang港

    loyang港

    loyang港

    loyang港

    loyang港

    loyang港

    loyang港

    loyang港

    loyang港

    loyang港

    loyang港

    loyang港

    主题公园

    主题公园

    主题公园

    主题公园

    主题公园

    主题公园

    主题公园

    主题公园

    主题公园

    主题公园

    主题公园

    主题公园

    主题公园

    主题公园

    主题公园

    主题公园

    主题公园

    主题公园

    主题公园

    主题公园

    主题公园

    蜡烛

    蜡烛

    蜡烛

    蜡烛

    蜡烛

    蜡烛

    蜡烛

    蜡烛

    蜡烛

    蜡烛

    蜡烛

    蜡烛

    蜡烛

    蜡烛

    蜡烛

    蜡烛

    蜡烛