星期日, 十二月 26, 2010

同样为了革命

@吴铭:1961 年,沈阳军区为筹办雷锋先进事迹巡回展览,派人为雷锋“补拍”了一组照片。①扶老携幼;②给战友王延堂送饭盒;③到抚顺市西部医院给伤病员送月饼;④打开 手电筒,夜间读《毛选》;⑤给战友乔安山家里寄去10元钱;⑥从储蓄所取回200元钱,亲自送到抚顺某人民公社。 (http://lizhensheng.blshe.com/post/38/195234

理科生闹革命 ZZ

土摩托


我来讲一个理科生闹革命的故事。
这个故事先要从台湾的60年代讲起。台湾的社会发展进程基本上比大陆早20年,台湾的60年代很像大陆的80年代,刚刚脱离白(红)色恐怖,老百姓 有了一点自由,急切地想改变命运,于是掀起了出国潮,大批学生赴美读书,尤以读物理的居多,原因有三:一,越是乱世,学生们越是倾向学理工科,觉得靠手艺 吃饭最保险。二,李政道杨振宁起到了非常大的榜样作用。三,容易拿奖学金。
其中有不少理科生很有理想,希望引进德先生赛先生,让台湾变得强大。赛先生是德先生的基础,于是这些人视开启民智为己任,科普就是开启民智最有效的一种手段。
台大物理系学生林孝信就是这样一个人。他是台湾本省人,家境贫寒,但他很聪明,学习好,加之对台湾感情深,在读书期间热衷于办杂志,搞科普。林孝信 活动能力很强,他联合了一批志同道合的同学,为《新生报》办了一份《中学生科学周刊》,因此结交了很多朋友,其中就有同班同学刘源俊。刘是外省人后代,比 较书呆子气,但他也喜欢写字,和林孝信成了死党。
liu and lin
(左为刘源俊,右为林孝信。)

星期一, 十二月 13, 2010

C++ main program return

By standard, it returns an integer.  However, Fedora will truncate it to 0-255.  Use $? to catch this return.

Also, if using makefile, make will tell you what `error' status is returned.

星期日, 十二月 12, 2010

An example makefile to compile many programs

ixx=icpc
gxx=g++
cflag=-std=c++0x -c
lflag=-mkl
elist=gsnp ggnm test

all:    $(elist)
gsnp:   gsnp.o
    $(ixx) $(lflag) -o gsnp gsnp.o
gsnp.o: gsnp.cpp
    $(ixx) $(cflag) -o gsnp.o gsnp.cpp
ggnm:   ggnm.o
    $(ixx) $(lflag) -o ggnm ggnm.o
ggnm.o: ggnm.cpp
    $(ixx) $(cflag) -o ggnm.o ggnm.cpp
test:   test.cpp
    g++ -o test test.cpp


try: test
    ./test
run: all
    ./gpop.sh
clean:
    (rm *.o $(elist)) 2>/dev/null

星期四, 十二月 09, 2010

Why is 'w' pronounced 'double u' rather than 'double v'?

English uses the Latin alphabet of the Romans. However, this had no letter suitable for representing the speech sound /w/ which was used in Old English, though phonetically the sound represented by /v/ was quite close. In the 7th century scribes wrote uu for /w/; later they used the runic symbol known as wynn. European scribes had continued to write uu, and this usage returned to England with the Norman Conquest in 1066. Early printers sometimes used vv for lack of a w in their type. The name double-u recalls the former identity of u and v, which you can also see in a number of words with a related origin, for example flour/flower, guard/ward, or suede/Swede.

(Based on the Oxford Companion to the English Language)
http://www.xys.org/forum/db/8/15/2.html

星期三, 十二月 08, 2010

旧文存档

内外书店

记得以前说过这个事情,找不到了,重新记之。

亚马逊网站上的书,什么样的书都有,尤其是专业书,许多冷门、偏门的都能找到。中国的网上书店,第一大类恐怕就是励志,然后是学英语的书,考研的书,包括考研的政治书,现在考公务员的书排名恐怕要上来了,刨去这些就剩不下几本了。

有人说在屎壳郎的国度只有卖大粪才能赚钱,我看有道理。

Mount remote server with sshfs

$ sshfs -C user@server:/path-to-access local-path

To umount it:

$fusermount -u local-path

I use paths in my home directory as mount points, for security reasons.  Actually nobody else is using my desktop.  This can be useful to backup my files.

星期二, 十二月 07, 2010

Auto mount hdd @boot

$ ll /dev/disk/by-uuid/

then for the UUID you want to mount automatically at boot:

# echo UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /mnt/backup auto defaults 0 0 >>/etc/fstab

A detailed explanation can be found @
http://ubuntuforums.org/showthread.php?&t=283131

星期五, 十二月 03, 2010

又出了一身汗

昨天神差鬼使想装一个Wine,用来运行一些破烂Windows程序。装上以后觉得不好,于是把yum install最后的安装列表拷贝至一个文件,然后
#for i in `more file`; do yum remove $i -y; done
发现中间这个script把xorg什么的都给删掉了。想停止为时已晚。这纯粹是瞎耽误时间。重新安装很简单,但是很多设置要恢复就很麻烦。以下记录了这次恢复的过程。