1995年7月28号,我拎着两个衣箱在上海公平渡码头下轮渡
轮渡是从青岛出发,我买的是最便宜的统舱票。
所谓统舱,就是底舱,就是舱底,一个超大的大厅,所有人都在里面找一块地方
铺上报纸衣服,坐着或睡着。
我喝了一大瓶雪碧,第一次喝这种奢侈的汽水。
一整天船舱的晃动,柴油的味道,让我从那以后再也不想喝雪碧。
在青岛呆了一周,一周都是雾沼沼的,衣服晾不干。
再之前是坐了30多小时的火车到青岛,没有座位。
在码头下船,遇到举着牌子接我的人,坐上一辆桑塔那,直奔上海郊区。
后来知道那个桑塔那是特意借来的,免得我对公司的实力有所怀疑。
跟这家公司联系是在哈尔滨打的一个长途电话,那时候还没有IP卡,电信还
没分家,话费还没降下来,电话花了我50块钱,大概是月生活费的1/3.
不过那会我在学校也有收入了,我的收入让我父母担心是不是我在外面干了什么坏事。
本来想昨天写这篇,没想到昨天一直忙到晚上9点才走。马上就要从一个我很仰慕的公司
跳到一个我很鄙视的公司了,走之前还要把手里的事做好。添了一百多个数据,检查了
两遍,传到公司的内部wiki上。再开车1个小时40公里回家。
刚刚过去的面试,人家让我自己介绍一下工作经历,我把从95年到现在10年重新描述了
一遍,简短的,只能是简短的,要不然就时间太长了,大家的时间都很宝贵,那就不要浪费了。
开车回家的路上,我听着许巍的《那一年》。
那一年.许巍
那一年 你正年轻
总觉得明天肯定会很美
那理想世界就象一道光芒
在你心里闪耀着
怎能就让这不停燃烧的心
就这样耗尽消失在平庸里
你决定上路就离开这城市
离开你深爱多年的姑娘
这么多年你还在不停奔跑
眼看着明天依然虚无缥缈
在生存面前那纯洁的理想
原来是那么脆弱不堪
你站在这繁华的街上
找不到你该去的方向
你站在这繁华的街上
感觉到从来没有的慌张 ……..
你曾拥有一些英雄的梦想
好象黑夜里面温暖的灯光
怎能没有了希望的力量
只能够挺胸勇往直前
你走在这繁华的街上
在寻找你该去的方向
你走在这繁华的街上
再寻找你曾拥有的力量
先cvs checkout -l -d dir .
-l 是 local的意思
-d是指定的目录
然后 cd dir
把module原来的目录copy过来
然后cvs add moduledir
然后cvs commit
然后进入moduledir
再cvs commit
Setting up a Win32 Toolchain with SDL and wxWidgets in Gentoo
Everyone of us always wanted to have the ability to compile for Windows and Unix in one makefile, right?
Unfortunately, there is very few documentation on this topic and I had quite a hard time to get things working the way I wanted to. I wrote this small HOWTO to share the way I managed to build my toolchain to other people.
I like writing games and most gamers use Windows. I didn’t want to leave my Linux setup to compile the games for Windows, so I needed a MingW toolchain with SDL and wxWidgets, for those are the two cross platform APIs I use.
Compiling the toolchain
Here we can go with ebuilds, there are some nice in the portage tree:
emerge xmingw-binutils
emerge xmingw-gcc
emerge xmingw-w32api
emerge xmingw-runtime
emerge xmingw-gcc
You have to do it in this order and you have to compile gcc twice, yes. If you don’t you wont get a c++ compiler, i don’t know exactly why.
Gentoo will put the toolchain into /opt/xmingw.
Setting the environment variables
Everytime you want to compile something for Windows, you have to set some environment variables first. The best is to put them into a small script:
export PATH=”/opt/xmingw/bin:/opt/xmingw/i386-mingw32msvc/bin:$PATH”
export CC=”i386-mingw32msvc-gcc”
export CXX=”i386-mingw32msvc-g++”
unset CFLAGS
unset CPPFLAGS
unset CXXFLAGS
unset LDFLAGS
export CFLAGS=”-I/opt/xmingw/i386-mingw32msvc/include”
export CXXFLAGS=”-I/opt/xmingw/i386-mingw32msvc/include”
After you have set the environment variables you can configure a program to compile for Win32 by running ./configure –target=i386-mingw32msvc –host=i386-mingw32msvc –build=i386-linux
Compiling SDL
Download the latest cvs version of SDL from here. Untar it into a working directory and cd into SDL-1.2/. Now run your script to set the environment variables mentioned above. After that you can configure SDL:
./autogen.sh
./configure –target=i386-mingw32msvc –host=i386-mingw32msvc
–build=i386-linux –enable-cdrom –enable-threads –enable-timers
–enable-endian –enable-file –enable-cpuinfo –enable-opengl
–disable-shared –prefix=/opt/xmingw/i386-mingw32msvc
–disable-shared will even remove the dependency on SDL.dll, if you don’t want that, leave this parameter out.
Now you can call make and make install. If you have to su to run make install, don’t forget to set your environment variables again (I forgot that at first).
Now for a little tweak: cd into /opt/xmingw/i386-mingw32msvc/bin and create a symbolic link.
ln -s i386-mingw32msvc-sdl-config sdl-config
This way, if you run sdl-config in your Makefile, the right sdl-config will be executed. (wxWidgets does this automatically for wx-config)
Compiling wxWidgets
Download a wxAll package from here. I used 2.4.2, I didn’t try any newer versions. Untar it and cd into wxWindows-2.4.2/.
Don’t forget to run your environment script and then run
./autogen.sh
./configure –target=i386-mingw32msvc –host=i386-mingw32msvc –build=i386-linux –with-msw –disable-threads –disable-shared –disable-unicode –with-opengl –prefix=/opt/xmingw/i386-mingw32msvc
I recommend to disable threads because else the programs will depend on some MingW libraries. You should also disable shared, because else the programs will depend on the wxWidgets libraries (and I think I ran into some more trouble). If you don’t disable unicode, the programs will only work on WinNT/2k/XP, not on 9x.
After that you can run make and make install just like you did for SDL.
Now you should have a fully working MingW+SDL+wxWidgets toolchain. I compiled 2 games I made and they ran fine in wine after compiling. I didn’t test them on Windows, yet but I strongly believe they will run. If you run into troubles, please report them to me.
四衝程引擎運作的四個階段動畫圖解
二衝程引擎運作的兩個階段運作動畫圖解
四衝程V型6汽缸引擎的運作

四衝程並列四汽缸引擎的運作

四衝程水平對向四汽缸引擎的運作

四衝程並列四汽缸的凸輪軸及閥門運作

list modules:
cvs co -c
list tags:
cvs history -a -T
看到一片新闻说微软要成立个啥部门在中国,头是宫力
宫力?好像听说过,一goog,原来是Sun中国研究院的头
goog到的连接有一片是他演讲如何用linux 打击m$的
呵呵
make -C /usr/src/linux-2.6.12 M=`pwd` modules
Makefile:
obj-m := helloworld.o
helloworld.c:
#include 《linux/init.h》
#include 《linux/module.h》
MODULE_LICENSE( “Dual BSD/GPL” );
static int hello_init( void )
{
printk( KERN_ALERT “Hello, world!\n” ) ;
return 0 ;
}
static void hello_exit( void )
{
printk( KERN_ALERT “Goodbye, cruel world\n” ) ;
}
module_init( hello_init ) ;
module_exit( hello_exit ) ;