Posts

open...: Economistical with the Truth

[Life]RMS and Me

Image
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:
LANGUAGELC_ALLLC_xxxLANG 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 easy, jus…

[Apps] wget using http proxy

$ export http_proxy="http://61.150.115.245:8080"
$ 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

csdoor.comp.polyu.edu.hk,158.132.8.8 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAvkSIZSV4P9HNO3MeX
xS7iEyfrgNXnVGNJm12F7zmPve83a61i6bOOYTR2w7NBT
ZSGAoOCc8bkKeOA+0iMsVL9BosQunq7auUF27if5PAymI
t7afLygKSHWOTBEfbJmVXNM7szI77usXwSGMBRuJHRuSM
7HaFc2G9CmnZTWoDH9s=

smth.org,166.111.8.238 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 java.io.*;
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 = new File(argv[0]);
if( !f.exists…