Showing posts from 2005

[Life]RMS and Me

It's like a dream. "RMS will give a speech at Hong Kong Chinese University next monday!" I heard of this last friday. And today, I met my idol. Really like a dream. Never imagined that before. I asked him whether he still supervise the development of Hurd/L4 and what his thought of Hurd's perspective is. He said he no longer supervise it and seems that he didn't even care about it's future. He said, "anyway we have a working operating system now." I think when he said these words, he must be very proud. It is him who started the free software campaign, and the followers will carry it on and on..........

[I18N]environment variable priority

In which language will your application's interface will be displayed? It depends on the following environment variables with decreasing priority: LANGUAGE LC_ALL LC_xxx LANG PS: another environment variable related to I18N is "LINGUAS". Its value is a space separated list of language code, e.g. "en", "zh_CN". When building an application, this value determines which locale's mo file will be built.

[Kernel] Suspend2 add a member to struct kthread_create_info

As a consequence, all functions related to it now have a new parameter-freezer_flag, as shown in the source code(include header files) I discovered this when emerging ipw2200 this morning. I failed to emerge it at first. I am using 2.6.11-nitro0 which was patched with suspend2. However I don't have it compiled in the kernel. In ipw2200.c, there is a conditional compilation. It will check whether your kernel configuration file has CONFIG_SOFTWARE_SUSPEND2 defined. If yes, it will use with-freezer_flag version of create_workqueue(). Otherwise, it use the vanilla version, ie. the one without freezer_flag. Apparently, now my kernel configuration file don't have CONFIG_SOFTWARE_SUSPEND2 defined. So when compiling ipw2200.c, the vallia version of create_workqueue() will be used. However header file "include/linux/workqueue.h" is now patched, so gcc will not find the vanilla version of create_workqueue() in it. That's why the compilation would fail. The solution is

[Apps] wget using http proxy

$ export http_proxy="" $ wget whatever the environment variable " http_proxy " should be in lower case

[Life] 写Windows程序?

Maybe it could be a chance Prepare for battle!!!

[Soccer] 中国青年队胜乌克兰

跌宕起伏,一波三折 最终我们赢了! 爽!看中国足球多少年没有这么爽! 以往中国队的队员根本不敢拿球突破,不求有功,但求无过,连去年在小西湾打香港队也是如此。 但是这届中青队一扫中国队员给人的传统印象,敢突敢带,对方要靠频频犯规来阻断中国队的进攻。前场队员也能拿得住球,进攻组织的起来。这分明具备了强队的潜质。颇具我踢实况的风格,哈哈! 牛比!最好都留洋,一个也不要回来!!!

[Font] 英文字体间距变宽之根源

根源: 用中文字体显示英文 根本解决办法: 用英文字体显示英文,用中文字体显示中文 具体操作: 如果可行,则对中文英文分别指定字体 否则对于中文指定英文字体,不要仅仅指定serif, sans serif 或者 monospace 比如在firefox里Monospace就用Bitstream Vera Sans Mono 这样英文就肯定会用Bitstream Vera Sans Mono 对于中文,fontconfig就会找替换列表里排最前的一个,我的是SimSun 否则如果Monospace里指定的是monospace, 那么简体中文网页个别时候(css可以指定字体,所以不是全部)以及查看简体中文网页的源代码时,firefox就会用排在第一位的简体中文字体来显示所有中英文内容,之前我的是NSimSun

[Font] 有关freetype和fontconfig

前段时间听说好像不需要补丁也能显示粗体 不过当时没搞清楚是那个部分的改进 后来看到portage里fontconfig有了新版本2.3.2, 还以为是因为它,后来发现不是 是freetype和libXft,还是再等等 不过还是升级了fontconfig,发现个别情况下英文字母会变宽 降回原版本也还是一样 后来发现把monospace的字体替换列表里的NSimSun改成SimSun就好了

[Apps] KQEMU conflicts with WIN98

Currently, if running a win98 guest os with kqemu enabled, you will get a "windows protection error" Alas! Switched to Vmware. Honestly speaking, vmware does better than qemu on emulating WIN98

[Apps] About qemu sound

Like Vmware, qemu emulates a SoundBlaster16 sound card. Alsa's driver for SB16 is called snd-sb16 To load the modules, one should use the following command modprobe snd-sb16 port=0x220 irq=5 dma8=1 dma16=7 mpu_port=0 isapnp=0

[Life] Something buried in memory, ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAvkSIZSV4P9HNO3MeX xS7iEyfrgNXnVGNJm12F7zmPve83a61i6bOOYTR2w7NBT ZSGAoOCc8bkKeOA+0iMsVL9BosQunq7auUF27if5PAymI t7afLygKSHWOTBEfbJmVXNM7szI77usXwSGMBRuJHRuSM 7HaFc2G9CmnZTWoDH9s=, 1024 35 141087622604984352947073823381669525561182271 425567940961971914504832300932245048277609650 094079962102843946849369875728378063399456613 647998570284974539552752883200527266847955913 542629545587385680424043735389622031831256167 599729345670473925247530244406340068958707947 533905560128653734273279036206628894447 Unforgettable! Those old days!

[Java] anonymous inner class issue

It seems that if an anonymous inner class implements an interface ,then its constructor can't have argument。If really need arguments, theorectically two solutions: define a method which takes arguments (must be " final "). The method does nothing but return an anonymous class, which uses the method's arguments。 public Destination dest(final String dest) { return new Destination() { private String label = dest; public String readLabel() { return label; } }; } see the exmaple below: import*; import java.util.*; abstract class NewFilenameFilter implements FilenameFilter{ protected String start, end; NewFilenameFilter(String s, String e){ start = s; end = e; } } public class NameFilter{ public static void main(String argv[]){ if(argv.length != 1){ System.out.println("must have one argument!"); System.exit(1); } File f = ne

[Java] Some thing about inner classes

If you’re defining an anonymous inner class and want to use an object that’s defined outside the anonymous inner class, the compiler requires that the outside object be final . If you don’t need a connection between the inner class object and the outer class object, then you can make the inner class static . So, it means: You don’t need an outer-class object in order to create an object of a static inner class. You can’t access an outer-class object from an object of a static inner class. Non- static inner classes cannot have static data, static fields, or static inner classes. However, static inner classes can have all of these. Normally an interface can't have any code, but static inner class can be part of an interface. It’s not possible to create an object of the inner class unless you already have an object of the outer class. This is because the object of the inner class is quietly connected to the object of the outer class th

upgrade to gnome-volume-manager 1.2.0

My previous hacking still works. However, I find an interesting thing. It only works for removable device, such as external usb disk, doesn't work for any partition in /dev/hda. I am trying to figure out the reason. In the latter situation, I find in src/manager.c:841 the "g_slist_find_custom()" returns NULL. As a result, gvm_device_autorun() won't be executed I find a link talking about "glib singly linked list" I will pick up here next time.

I openned a new blog

Not bad here, uh? I do like the look and feel of However it's not an ideal place for my blog. I can't talk about certain topics there. You know the reason. What's worse, there are a lot of rubbish on its index page. Here is better, I think, haha!