俺的 iGook G4 上有两个分区,一个是 `/',一个是 `My Partition',近日公司开通了 VPN,为了能在家干点儿活,就把 code 更新到了第二个分区上,结果 cscope 不 work,总是报错说 `cannot read trailer offset from file',不解,Google 了一下,原来是路径中的空格字符引起的;还好,俺有 iPartition,把 `My Partition' 改名成 `Part_2',cscope works fine :)
LINKS: link 1, link 2
2007-04-30
cscope: cannot read trailer offset from file
Posted by
Display Name
-
7:39 PM
0
comments
Compiling Expect: Can't find Tcl private headers
Expect is looking for tclInt.h which is one of Tcl's private headers. Tcl doesn't install this by default, so Expect tries to find it in Tcl's source or build directory. To explain where that directory is, use the --with-tclinclude flag when running Expect's configure.
If someone (your vendor, for example) has supplied you with Tcl but without providing tclInt.h, get a source distribution and install it yourself (or get a binary distribution that includes the private headers).
-- Expect FAQ
Posted by
Display Name
-
6:47 PM
0
comments
Labels: Tcl/Expect
Expect-5.42.1's bug?
在 ubuntu 6.06 上用 expect-5.42.1 写了一个 ssh 到远程 server 上的 script, ssh 上去之后, 执行 `find /' 时永远终止不了, 屏幕一直有输出, 并且输出的内容是循环的. 又测试了一下, 发现如果远程 server 上瞬间输出大量信息时总是会引起这种情况. 一开始还怀疑是我的 script 有问题, 后来发现 `find /' 进程其实早已退出, 看样子是 expect 内部出现了一个 infinite loop. 到 expect 网站上下载了一个最新的 5.43.0 版本编译安装后没有这个问题, 看来是 5.42.1 的一个 bug.
Posted by
Display Name
-
3:13 PM
0
comments
Labels: Tcl/Expect
2007-04-29
GNU Make Debugger
刚在 bashdb 上浏览时, 发现那儿还有个 make debugger, 新奇, 有时间试用一把.
Posted by
Display Name
-
6:14 PM
0
comments
Labels: C/CPP, Make/Build, Utils
Bash-3.2.15: Coloured prompt confuses Ctrl+R
这个问题困扰了俺很久了, 烦的要死, 也不知道是从哪个版本开始出现的, 反正 ubuntu 6.06 自带的那个 3.1.17 是没问题的. 到 GNU.org 上也看不到新的 patch, 今天到 ftp://ftp.cwru.edu/pub/bash/ 上看了看, 发现有两个新的 patch (16, 17), 打开一看, 原来早就有人发 bug 了. 下载, 编译, OK.
Gentoo 上也有报过这个 bug.
Posted by
Display Name
-
5:44 PM
0
comments
Labels: Shell/Scripting
苹果输入法 FIT
Fun Input Toy, 据说不错, 支持双拼, 晚上回去试试.
Posted by
Display Name
-
12:23 PM
0
comments
Labels: Apple
The ps command
ps 应该是 linux 中最难用的 command 之一了, 多数人都会用 `ps -ef' 或者 `ps auwx', 不过很少会有人确切的清楚各个参数的意义. 即使看 ps 的 man page 也是一头雾水, 不知所云. 其原因大概是由于 ps 的 option 比较混乱, 同时支持 3 种 style:
- UNIX options, which may be grouped and must be preceded by a dash.
- BSD options, which may be grouped and must not be used with a dash.
- GNU long options, which are preceded by two dashes.
下面是俺平时用的较多的一些 ps 用法, 备忘:
- ps
- ps u
- ps auwx
- ps -C ntpd
- ps -C sleep s
- ps -C ntpd u --sort pid
- ps -C slapd hm
- ps p $$
- ps t pts/1
- ps o pid,tty,time,cmd
- ps u {--width | --cols | --columns} 1000
- ps u ww
- ps ... ...
Posted by
Display Name
-
9:32 AM
0
comments
Labels: Shell/Scripting
Ubuntu 的版本号
第一次用 ubuntu 是 6.06, 当时就觉得这个版本号怪怪的, 后来又是 6.10, 现又出了 7.04, 莫名其妙. 今天忍不住问了一下 jiahuan 同志才明白原来 ubuntu 的版本号是根据 release date 来确定的, 比如 6.06 是指 2006 年 6 月, 7.04 是指 2007 年 4 月.
Posted by
Display Name
-
9:25 AM
0
comments
Labels: Debian/Ubuntu
2007-04-26
Hello Tips
You can send a snapshot of a Web page to a friend in your Hello Friends list. Use the Share in Hello icon in your web browser to take a web page snapshot.
NOTE: This feature is supported in Internet Explorer only
To send a snapshot of a Web page:
- From Internet Explorer, click the Share in Hello button. A snapshot of the current Web page is taken and a new dialog box appears.
- Select one or more friends you want to receive the snapshot.
- Click Send. The snapshot is sent to your friends in Hello.
Posted by
Display Name
-
7:19 PM
0
comments
man sections
- Executable programs or shell commands
- System calls (functions provided by the kernel)
- Library calls (functions within program libraries)
- Special files (usually found in /dev)
- File formats and conventions eg /etc/passwd
- Games
- Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
- System administration commands (usually only for root)
- Kernel routines [Non standard]
Posted by
Display Name
-
4:49 PM
0
comments
Labels: Utils
2007-04-25
Hello - Share pictures like you’re sitting side-by-side
Hello is a new way to look at pictures with friends and family.
When you use Hello, you get to see your photographs together with your friends online. You don’t have to wait for huge email attachments to download or upload your pictures to a public website. Just point at a picture and you can tell the person who sent it exactly what you think. With just one click, you can get the original high-quality, full-sized file to print.
Hello is easy to get going (as long as you have someone to share with). You’ll be talking about pictures in just minutes.
Posted by
Display Name
-
7:04 PM
0
comments
Home - Dixie Chicks
Home: a musically rich and accomplished piece of work., 14 Nov 2003
One of the characteristics of the Dixie Chick's "Home" which makes it a great album is how musically rich it sounds. Gone are the electric guitars and drums which featured in their two previous albums. The sounds of the banjo (naturally, as this is Emily Robison's instrument), the mandolin, the acoustic guitar and the papoose pepper this album giving it a more folky and rootsy feel. The instumental break in "More Love" where Martie Maguire's fiddle solo plays is sublime and beautiful. In addition there are more bluegrass tracks than their other albums; I counted five including an intrumental ("Lil' Jack Slade") which will please those who prefer their country music less pop-orientated.
The songs themselves add depth to "Home." The use of quality song writers such as Patty Griffin, Bruce Robison and the Chicks themselves show. As well songs about subjects usually tackled in country songs (eg the fickleness of young love in "Tortured, Tangled Hearts"), there is a soothing lullaby in "Godspeed" and an old fashioned telling of a story done in song. This particular song, "Travellin' Soldier", one of my favourite tracks is about a young man who goes off to fight in the Vietnam War and never returns. It manages to be poignant and memorable through its delivery: listen the harmony vocals conveying the sadness of the story teller and the deliberate slowing down of the song when the young man's fate is realised. The song slowly fades with the an accordion playing and the beating of a military drum - very reflective.
The highlight of "Home" is "Top of the World" which in my view is an extraordinary song. It's about a man who has died recently (the album is not all doom and gloom!) and looks back at his life ruefully. It is sung, interestingly enough, from his own perspective by the lead vocalist Natalie Maines. This melancholic song climaxes with a stirring outro with a string arrangement and Natalie's amazing vocals, pleading sorrow and regret. I am always moved when I listen to it.
To elaborate on an earlier point, Natalie Maines has an incredible voice. It is both distinguishable and excellent whether she chooses to be soft and subtle for something like the lullaby "Godspeed" or loud and raucous for the energetic bluegrass number "White Trash Wedding." Emily and Martie provide great harmonies to back up Natalie too.
It is safe to assume that every Dixie Chicks fan owns a copy of this album. To those who may want to open their ears to country music or even want to seek an alternative to the pop music that is saturating the charts, I would strongly recommend "Home" as this is an accomplished piece of work that contains great songs, excellent vocals and one that is musically rich.
SEE ALSO:
Posted by
Display Name
-
6:14 PM
0
comments
Labels: Music
2007-04-24
grep tips
-(root@ubuntu:S.8)-(~)-
[V 27073 0] # ps ax | grep ntpd
8625 ? SNLs 0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 124:124
13325 pts/19 S+ 0:00 grep --color=auto ntpd
-(root@ubuntu:S.8)-(~)-
[V 27073 0] # ps ax | grep [n]tpd
8625 ? SNLs 0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 124:124
-(root@ubuntu:S.8)-(~)-
[V 27073 0] #
Posted by
Display Name
-
3:25 PM
0
comments
Labels: Shell/Scripting
2007-04-21
Install OpenLDAP on Mac OS X
Mac 上的 BDB 版本跟 OpenLDAP-2.3.32 的要求不一致,首先要自己重新编译一个高版本(4.2+)的 BDB,然后才能编译 OpenLDAP。基本步骤:
- 安装 BerkeleyDB 到 /usr/local/BerkeleyDB.NN
- 到 OpenLDAP 的目录中运行 configure CPPFLAGS=-I... LDFLAGS=-L...
- make CPPFLAGS=-I... LDFLAGS=-L... depend
- make CPPFLAGS=-I... LDFLAGS=-L...
- make install
Posted by
Display Name
-
4:49 PM
0
comments
Labels: Apple
2007-04-20
Audium Now Supports QQ
以前用 isQ,不过后来好像被 Tencent 作了限制,登录不了,从此 N 久没有在 iBook 上 QQ 了。现在好了,Audium 1.0.2 支持 QQ 登录了!而且 Audium 的界面比 isQ 可漂亮多了,同时支持 MSN、Yahoo、GTalk 等 N 多 IM,爽之极!
Posted by
Display Name
-
9:39 PM
0
comments
DoubleCommand Not Stable
现在用的是 DoubleCommand 1.6.2 for Mac OS X 10.4,好像很不稳定的样子,安装之后经常导致系统启动失败,还好这东西比较‘智能’,启动失败后会自动把自己 disable 掉,reboot 就 ok。
以前用 ext2fs for Mac OS X 的时候也经常导致系统 crash,由此看来这些 kernel 级的 plugin 也不能轻信,慎用为好 :)
Posted by
Display Name
-
9:23 PM
0
comments
2007-04-19
find -regex
以前从来不知道 find 还有个 -regex 和 -iregex 选项, 平时俺都是用 -path [-prune]. 这下好了, find 功能更上一层楼.
感谢欢欢 :)
Posted by
Display Name
-
10:49 AM
0
comments
Labels: Shell/Scripting
pyjj 4.1A
昨天到 pyjj 网站上发现出 4.1A 了, 赶紧下载下来安装试用, 却发现双拼状态下不怎么好用了, 以前输入 pyjj 马上就能出现“拼音加加”的, 现在却出不来了; 并且重码的显示也不那么智能了, 害我昨晚经常输错字. 看来新的东西未必真的好用, 正如“谷歌”输入法一样. 放弃, 重新使用 4.0
Posted by
Display Name
-
9:03 AM
0
comments
Labels: Utils
2007-04-13
Easiest man2pdf
原来 man2pdf 还可以更简单的, man 有个选项 -t 可以直接把 man page 转换成 PostScript 格式, 然后直接调 ps2pdf 就可以了:
# Linux
$ man -t bash | ps2pdf - > bash.pdf
# Mac OS X
$ man -t bash | pstopdf -i -o bash.pdf
可怜俺辛辛苦苦写的 man2pdf.sh, 估计以后没有人再用了 :(
Posted by
Display Name
-
9:18 AM
0
comments
Labels: Apple, Shell/Scripting
2007-04-07
Google 输入法
Google 也出输入法了, 正在试用. 已经发现有几点不方便:
- 不能像拼音加加那样用左右 Shift 来选词
- 双拼模式 (自然码) 下不能使用笔划输入
- 双拼模式 (自然码) 下不能使用英文提示功能
Posted by
Display Name
-
4:54 PM
0
comments
Labels: Google
2007-04-02
PuTTY 串口登录超级不稳定
输入用户名/口令时经常死掉, 还是用 Windows 的 HyperTerminal 吧 :(
Posted by
Display Name
-
2:09 PM
0
comments
Labels: Utils