Thursday, December 07, 2006

To make up a packet in python, with this format:
1 Byte (seq)+ 1 Byte (length) + N Bytes data (data, n<255),

then it will be easy to just:
newdata = chr(seq)+chr(len(data)+data

then data will be just a sequence of chars.
In order to convert char into int in C / C++, there are two methods,
1. to convert a string '1234' into integer 1234:
void main (void)
{
char c[4];
int i;
strcpy(c,"1234");
i = atoi(c);
}


2. to conver an ascii character 'q' into its decimal representation: 113
{
char c;
int i;
c='q';
i=(int)c;
}

then i will be 113.

Thursday, September 21, 2006

My Compiz+aiglx desktop,
1. Wobby effect

2. Trial focus, the transparent windows

Here is a sample plot from Gnumetric, lol...
My Ubuntu box now has compiz and aiglx working!! Viva wobby!

Another good finding is I managed to add a nice graph plot with trend line under Gnumetric, well, far more faster than Openoffice spread shit and much more features!

Friday, September 15, 2006

这两天在尝试通过boot camp往macbook上装windows,结果失败了: hal.dll missing....
后来发现,问题在于我在安装windows的时候,把boot camp分出来的驱拆除了,然后再重新分了一次。这就出现问题了。
boot camp分区的方法是:200mb free space紧跟os x 分区。而windows分区是windows partition紧跟os x partition.....呵呵。 that is the tricky part...


解决方法:
利用os x 安装盘进入硬盘上面的os x,然后用boot camp把windows分区拆除了再分一次。然后重头开始。

Wednesday, September 13, 2006

Apple 又让大家失望了,呵呵。不过Jobs的presentation还是挺好听的。准备努力学习一下keynote

Monday, September 11, 2006


中国是一个伟大的国度,伟大的国度更加有一个伟大的首都,而伟大的首都, 当然有伟大的西直门桥...
在中国开车是靠右行驶的, 所以向右转应该是顺其自然, 顺理成章的事情...当然,有了伟大的西直门桥...一切都有可能变得有"中国特色".

现在, 据说, 西直门要改了,呵呵......多么令人沮丧的一件事情啊.

1. 我没有真正的体会过
2. 据说打败米国101空降师就靠它了呢...

Saturday, September 09, 2006

古有名言,妻不如妾,妾不如偷,偷不如偷不着,
而红颜知己,就是属于最后者.......