Sunday, January 16, 2011

zz A quick introduction to GCC

( informative about static and dynamic libraries)

http://sinujohn.wordpress.com/2010/06/06/a-quick-introduction-to-gcc/

(vi vim file format explanations, :e ++ff=dos :setlocal ff=unix)

http://vim.wikia.com/wiki/File_format

Tuesday, April 13, 2010

bash notes

1. truncate filename: sample
for filename in *.exe
do
name=${filename%%.*}
extn=${filename##*.}

# doing operations...
done

Monday, April 12, 2010

First they came...

"First they came ..." is a popular poem attributed to Pastor Martin Niemöller (1892–1984) about the inactivity of German intellectuals following the Nazi rise to power and the purging of their chosen targets, group after group. In Niemöller's first utterance of it, in a January 6, 1946 speech before representatives of the Confessing Church in Frankfurt, it went (in German):

"THEY CAME FIRST for the Communists,
and I didn't speak up because I wasn't a Communist.

THEN THEY CAME for the Jews,
and I didn't speak up because I wasn't a Jew.

THEN THEY CAME for the trade unionists,
and I didn't speak up because I wasn't a trade unionist.

THEN THEY CAME for the Catholics,
and I didn’t speak up because I was a Protestant.

THEN THEY CAME for me
and by that time no one was left to speak up."

Wednesday, March 31, 2010

(03/30/2010) Heard a tragedy this morning, please take care of yourself and seek help if anyone is depressed.


My dear fellows,

This morning I was told that my friend, Chenghong Jiao, a first-year Chinese graduate student in Electro-Optics Program at University of Dayton, OH, committed suicide yesterday. He killed himself because of depression. I don't know, and don't want to know the details. I burst into tears when I heard of the news and for the first time I start to feel deeply sad and it seems my inside is ripped apart. I just can not believe how a young life could end so abruptly, so easily and by himself, without any warning. Now the whole department and the Chinese student community there is in great sorrow and mourn. I still can't help my tears when I thought of him gone just like that. I feel like I need to do something to prevent the similar tragedy to happen, at least in Clemson community. So I wrote this email.

Chenhong entered Electro-Optics Program at University of Dayton, Ohio in fall 2009. My friends there told me that he has depression before he came to US and his depression just got worse after he arrives. He contacted me in August 2009 for apartment information and I saw him alive, had a little conversation with him when I went back to Dayton this spring break, just two weeks ago. He seems to be a cool kid, looks smart and bright. I know that he became a Christian not long ago, however, I guess the God is not powerful, not almighty enough, at least in his mind. So sad he kept his depression to himself, so sad he did not seek for help, not God's, not his friends', not even his parents'. Now, how can his parents go through this fact. I just can't imagine.

It seems the first year is the most critical period for Chinese student overseas and please take care of yourself. Things are not that bad, please talk to friends, mentors, parents when you are feeling depressed. Please remember a person is not alone by himself, and he is the most important existence to the people who care for him. There is a way out for every bad situation, just seek for help.

I want to inform the whole community this tragedy and my fellows, please help prevent similar case happen around us.

May Chenghong rest in peace.

Best Regards

--
Shuangyang Yang

Friday, February 26, 2010

我的美学观

最近情感丰富,引用某人的话说,头脑发热,写了一些东西,让自己也很意外。原以为自己的内心只有理工科的严谨和理性(当然还有懒惰和欲望),现在发现还隐藏着一份浪漫主义情怀,追根溯源,这都得益于高中时看的好些书,体会到大师的风范,并受了老师和同学的影响。

总结起来,我的美学观是受了宗白华老先生的直接影响,主张感觉和意境,出发点是中国传统诗歌和书画的表现力。比如很推崇的几句:“大漠孤烟直,长河落日圆。”马上意境就出来了,茫茫大漠,基调是土黄色,“孤”字更显苍凉,“直”表明没有风,好一幅静止的远景,脑子里就有这么一个苍茫壮阔的画面。下半句也是一样,不过意境就更温暖一些了。还有,“行至水穷处,坐看云起时。”,缘水而上,走啊走,走到头了,没路了,下一步怎么办呢?那就坐下来看看天上云起云灭,看看日出日落,王维给出的是多么闲适优雅的一个意境啊,非常豁达,哪里都能欣赏到美景,都能感受到大自然的 奇妙。推广到生活,在任何时候都要有积极乐观的态度,总是能发现美,只要有心。这一句也是浙大飘渺水云间的主旨,无法表达对这句诗的喜爱。

宗白华先生的《美学散步》,读来真是觉得美妙无比,指点中国传统艺术的魅力,体会到意境,那滋味,就觉得原来我们祖先有这么美好的东西流传下来,现在的我也能体会到几千年前的文人学者所体会的意境,觉得自己的境界也提高了一层,真是不白来这世上。这本书扔家里了,以后要再翻看一下,我本来还买了朱光潜的美学著作,西方美学史,但总觉得看不下去,可能我骨子里还是更亲近宗白华先生一些。宗白华先生对于书法,山水画,篆刻等都有很高的造诣,在《美学散步》里都有体现,我印象很深的一点是他对于中国山水画的“留白”的描述,留白就是在画的某些地方留出一大片空白,让人自己去填充,自己去想象。举了一个例子,在一张很大的纸上,有位画家在左下角寥寥几笔画了一条小船在水上,在右下角画了一个人,然后别人就问,你这画的是什么啊,这一点那一点的。他笑了一下,拿起笔,把船和人用一条线连了起来。哦,别人就明白了,这是一个纤夫在拉船。这时纸上除了这些地方其他都是空白,什么都没有,但意境已经出来了,这些留白别人都能自己补上的。这就是美啊。

我现在写一些感性的东西也尽量去营造一个意境,虽然有时自己没意识到,因为只要别人脑子里能体会到这个画面,这个情景,那感觉自然就出来了,而且很深刻,不需要刻意的点出情绪。想起来高中时候受语文老师方丹敏和章武同学(老牛)的影响很大,都是我很尊敬的有才学有内涵的人,更不用提在书中谆谆教诲的那些先生大师们。高山仰止,景行行止,虽身不能至,而心向往之。

Sunday, January 31, 2010

config notes

Enable tcp listen on X. Usually XWin starts with the option "-nolisten tcp" which will block remote XWin connection. Can show up with `ps aux | grep X`. Another way to see if it's blocked is to see whether tcp 6000 port is listening, `netstat -nlp | grep 6000`. It can be disabled as follows:

1. With gdm, edit /etc/gdm/gdm.schemas, change one boolean field to allow tcp connection.

2. if use startx, can look into /etc/X11/xinit/xserverrc, a better way would be add `X :0` with other options into ~/.xserverrc. It seems this customized file will replace the line in the /etc directory.

3. wicd seems to be a quite good network manager. However I haven't gotten it to work with the WPA2 enterprise wireless on campus. Another problem: it will gain 100% cpu when the computer resumes from hibernate (tuxonice), also it's automatic starting with starx, annoying!

4. wget -r -nd -np URL : -nd, do not keep dir hierarchy, put all files under current directory. -np, no parent, keep under this URL.

5. NetworkManager in gentoo, (may add 'dhcpcd nss gnutls' as the USE flag)
emerge -av networkmanager nm-applet
then, under root,
/etc/init.d/NetworkManager start
nm-applet &
At this time, the wireless shows 'Device not ready', do two things
1) Check that dbus is present in your rc
2) chmod +x /usr/libexec/dbus-daemon-launch-helper
The second step does the job for me.

Monday, January 04, 2010

2009年记事

2009, 对小的我是波折的一年, 也是幸运的一年. 2008年决定申请计算机博士, 主攻programming language方向, 下半年寄出了申请材料, 请Dr. Zhan和两位cs的教授写推荐信, 申请了7所, 在等待,套磁,同时实验进展不顺利等情况下进入了2009年.


多轮套磁无果,没有任何进展,2月份开始收据信,一封接一封,其中三月份驱车到purdue去套教授, 发信后一个教授同意见面, 谈了10分钟聊得挺好, 但他不在admission committee里面, 而且下个学期sabbatical. 所以还是没戏.

同时实验方面经过等待样品, 和spatial light modulator(SLM)厂家多轮email联系, 加上泡实验室一点一点测试, 终于在3月份有了突破, 把circularly polarized + spiral phase的结果搞出来了. 之后是整理数据, 写paper.

4月份去DC看阿昌, 想去看樱花节,哪料想到达之后第二天一场狂风骤雨, 原本满树满谷的樱花一夜间掉的一片不胜,只留残景. 开始下午去家边上的小操场跑步, 即使生活不顺利也还是要保证身体健康.

5月份收到所有据信,情绪低落, 继续跑步, 以示坚持的决心. 同时申请一所欧洲的学校, 并混迹水木清华和mitbbs的飞跃版, 发信套登广告的教授. 实验室方面改paper, 并开始另一个项目.

6月份继续跑步. 跟Clenson的一个新教授S开始email联系, 写了个paper reading report, 月底接到面试电话. 继续寻找, 等待, 做做comsol simulation.

7月份继续跑步. 给Clemson的教授S发申请材料和推荐信,她竟然还给Dr. Zhan打了电话, 之后被告知会给offer, 火速完成网申,等结果. 欧洲的学校发来回复, 很有意向, 只要跟一个教授联系, 交个proposal就行. 觉得去欧洲太麻烦, 就婉拒了. 大概7月中旬收到offer, 处理转学文件等. 把手头的模拟做完, 整理实验室里的工作并撰写文档.

非常感激Dr. Zhan, Dr. Powers, Weibin师兄及EO的老师和同学们.

8月份前往Clemson, 先去刘杰那玩了几天, 去了一下Charlston的海滩, 太阳比较晒, 其他的非常惬意. 回Clemson后处理事务, 办理入学手续, 选课, 干活, 等等.

9月份每天8点到实验室, 晚上10-12点才回家, 对老板S的态度和干的活比较不爽, 但决定至少熬过一个学期. 同时每天都去gym锻炼半小时, 维持健康. 至月底精神状态很差, look like shit and feel like shit.

10月初赶了一个deadline后, 老板S对我很不满并威胁取消support, 由于自己做的很不开心, 感觉老板S的研究方式很不科学, 决定退出老板S的组, 找系里其他老师, 否则就去工作. 跟老板S摊牌后她也没说什么. 过了两周没有活干, 没有实验室的日子, 天天跑步, 搜集系里老师的信息, 根据自己的兴趣寻找可能的老板. 首先跟老师B联系, 他比较在意我离开老师S这个事实, 聊得很不好. 继续吧, 联系老师L, 直接去office找他聊, 相谈甚欢, 他做parallel computing file system, 编程比较多, Linux用得很多, 非常合胃口, 而且他的组缺人, 于是敲定. 开始旁听老板L的课, 赶上进度, 同时开始熟悉research project.

11-12月, 上课, 写作业, 看书准备来年1月份的qualify. 经常跟同系的一个单纯黑人兄弟一起去gym, 锻炼的量基本是他的一半. 学期结束后整个holiday呆在家里, 有一搭没一搭的看书, 天天找人吃饭, 美国的无聊日子啊.

2010年1月4-5号, 考了qualify, 比预想的要难, 但还不至于太糟, 看结果吧. 新学期要开始了, 要开始忙了, 幸运的是做的是比较喜欢的东西.

2009年做了好大的转变, 一波三折, 运气非常好. 将继续贯彻"坚强,勇敢,自信"的人生态度, 维持gym锻炼和跑步的良好习惯, 努力寻找人生的机会, 希望付出能有回报.

Update: qualify过了,score 28 out of 30.