亲爱的你:
不知道我的只言片语、东拉西扯真正能为你的生活带来什么。
但是我还想写下,与素不相识的你的悄悄话。既然打开了它,就请耐心看完,因为这里满载着我的真诚、热情还有最虔诚的愿望。
希望我们都能有所期待地活着,
希望我们都能获得幸福。
请允许我不知所云地从朱诺说起吧。
在Juno原声碟里面听到一首叫做《loose lips》的歌,根据我浅浅的翻译,有一段歌词是这样的:“如果你想烧伤自己,记住我爱你
如果你想割伤自己,记住我爱你
如果你想自杀,记住我爱你。
在你死之前给我打个电话,我们可以改变计划,去做些别的。
给我发个电子邮件,我就会成为你的朋友。”
《Juno》的电影原声碟到现在为止还是我最喜欢的一张CD。呵呵,之所以强调“到现在为止”是因为,人生中无论好的坏的,它的变数谁知道呢?在我人生的 剩下几十年,可能还会遇见更美好的旋律的。话说Juno这个小女孩天不怕地不怕,有种天生的洒脱。很好奇地想象着扮演她的艾莲.佩奇在现实中是个什么样的 人。(呵呵此刻在放假期间无所事事的我,因为好奇心太旺盛,就连发呆都变得很有趣了。)对于朱诺来说,无论生活到了一个多尴尬的境地,就算是挺着个未婚先 孕的大肚子,她还是要穿着她的旧风衣,双手插兜,潇洒地走着。
试着拽拽地在街上走一次吧~别在乎别人的眼光。尝试一下目空一切,你可以的,一定很好玩的,相信我。
你喜欢音乐吗?
我是个五音不全的人~从小就喜欢唱唱跳跳,也是一直被爸爸笑我跑掉~但是又能怎么样呢?唱歌跳舞是我愉快情绪的表达,好不好听,无关紧要的。音乐是作曲家 给人类的礼物,几个音符,变奏出无数美妙的旋律。我自认为还是个比较内向和循规蹈矩的人。拿着扩音器和舍友一起大声地唱神曲《爱情买卖》的那次经历,给了 我从未有过的放肆的感觉。
去操场上,大声地唱首歌,或者骂几句脏话~嘻嘻……偶尔发疯,其实挺快乐的。
你的嗅觉灵敏吗?
不知道你是不是有留心你不停呼、吸的空气一共有几种不同的味道。在满满都是人的自习室,忍受着热腾腾地混合着大家的体味的空气,接水或是上厕所时,走出 去,那个瞬间清新的世界你还记得吗?夏天的时候,伴随着校园里的割草机一阵噪杂声传来的,还有那属于泥土和青草的味道。美好得,我都怀疑我上辈子是不是牛 马羊,竟这么喜欢这个青草香味。
去慢慢剥开一颗橙子吧,那么清香的气味,会让你忍不住微笑的。
你喜欢吃东西吗?
我是个不折不扣的馋猫,一大爱好就是吃妈妈炖的鱼。周杰伦有一首歌里面有唱:“爷爷泡的茶,有种味道叫做家”。还能回忆起来家里饭菜的味道吗?虽然没有什 么玉盘珍馐,但是绝对是最珍贵的。仔细想想,在这个世界上我们没办法选择的东西其实并不多,我能想到的不过只有家庭、头脑而已。恰恰这些都是我们的父母赋 予我们的。那天和妈妈杀鱼的时候,突然特别感慨,我们能作为万物之灵——人 这种生物来世间走一遭,真是太太幸运了。生存还是死亡,我们听自己的。我很感激。就算我没有富庶的家庭、显赫的背景,我没有聪明的头脑,又能怎么样呢?外 在的没落,没办法夺走我作为人的,最本真的幸福和喜悦。你知道吗?就连呆呆的阿甘,也拥有了自己的幸福。既然我们无法改变的部分并不是那么不好,其他的部 分,事在人为,努力就好呀~
去给你最爱的亲人或朋友做一点吃的吧~就算只是一碗热气腾腾的泡面~呵呵
你喜欢读书吗?
我一点都不喜欢看课本,但是我喜欢读书,读其他的书,(*^__^*) 嘻嘻……我最近在看的一本书叫做《项塔兰》,它的作者的人生轨迹从劫匪到囚犯,从越狱到全球通缉,从逃命孟买到再次犯罪入狱,最后又成为了畅销书作家。我 并不赞同他这种亡命徒似的生活轨迹,但是在心底却悄悄地佩服他,多么不可思议的人生旅途啊。我们的生活也许是被动地变得很跌宕、很曲折,但是这并不妨碍它 变得精彩。感谢苦难,它使我们成为了一个有故事可说的人。
去选一本图书馆或者书店里面你看着使你最愉快,或者你的手下意识碰到的第一本书,珍惜这一点点的缘分,耐心读完它吧~
你小的时候淘气吗?
我小的时候很淘气,总是摔倒受伤,膝盖摔得很疼的时候我就会屏住呼吸,忍过那一阵最痛的过程,可是每次过后都回忆不出到底当时有多痛。其实我们觉得最痛的 那段时间,忍过去了,也不会在我们的生命中留下难以抹平的伤口。也许我们不会忘掉,但是随着时间的推移和我们本身渐渐变得更成熟,那些我们曾经认为痛彻心 扉的事情,回忆起来,是带着笑的。
去和妈妈、爸爸或爷爷、奶奶,聊聊近况,一起回忆一下你小时候的故事吧~看看小小的你做过多少你自己不知道的傻事~无论我们觉得现在的自己多么不堪,在爱 你的人眼里,你还是那个有点淘气,有点傻气的小孩子。
上中学时候的我是个心事重重的人。敬重的老师和我说过这样一句:我希望无论到什么时候,你能成为那种因为一个苹果就可以开心地笑的人。
我们的心其实远比我们想象中坚强,它是能承载快乐和苦难的柔软的床。如果它累了,就让它放空、休息一下,但是请别伤害自己,因为有天你的心脏还会因为某个 瞬间或者某个人,愉快而剧烈地跳动的。
我们一直在努力往前走,要把一切风景都看过。别错过,一定别错过,属于你的,未来的,那些快乐的时刻。
爱自己,爱生活,是我们一生都要用心去做的功课。
我的心,这只野鸟,在你的双眼中找到了天空。 它们是清晓的摇篮,它们是星辰的王国。 我的诗歌在它们的深处消失。 只让我在这天空中高飞,翱翔在静寂的无限空间里。 只让我冲破它的云层,在它的阳光中展翅吧。
Thursday, February 3, 2011
Friday, January 21, 2011
[ZZ]printf是一个神奇的函数
第一优先准则是计算++
这是C++的++体现的地方(开玩笑的^_^),有++的地方先执行
第二优先准则是程序译码原理:
译码是由右往左译的,貌似所有编译器都是那样
printf("%d\n%d\n%d\n%d\n",*p, *p++, *p++, *p);
优先执行++,然后从右开始,所以第一句执行的是第三位置的*p++
优先执行++,所以第二句执行的是第二位置的*p++
类似了后面
另外也就是因为++优先级是奇高,所以*p++ = *(p++)
这就不用我说了吧,和printf就没关系
--------------------------
可变形参的实现是通过堆栈来完成的,函数在堆栈里去拿数据,不过根据了不同的机器做了一些偏移
贴一下libc里面printf的实现
int
printf(const char *format, ...)
{
va_list ap;
int retval;
va_start(ap, format);
retval = _doprnt(format, ap, stdout);
va_end(ap);
return retval;
}
typedef char * va_list;
#define _INTSIZEOF(n) \ //n 为 char *
((sizeof(n)+sizeof(int)-1)&~(sizeof(int) - 1) ) //这个值为4 (32bit机器)
#define va_start(ap,v) ( ap = (va_list)&v + _INTSIZEOF(v) ) //偏移4bytes
#define va_end(ap) ( ap = (va_list)0 )
*p++在有些编译器实现的时候很可能额外开栈,从而导致最后一个参数(实际上第一个传递)和看到的不同,实际上完成的是两个动作:
q=*p; p=p+1;
因此编译器拿数据取值的时候就不一致了,可变形参的这种问题不同编译器处理是不一样的。
这是C++的++体现的地方(开玩笑的^_^),有++的地方先执行
第二优先准则是程序译码原理:
译码是由右往左译的,貌似所有编译器都是那样
printf("%d\n%d\n%d\n%d\n",*p, *p++, *p++, *p);
优先执行++,然后从右开始,所以第一句执行的是第三位置的*p++
优先执行++,所以第二句执行的是第二位置的*p++
类似了后面
另外也就是因为++优先级是奇高,所以*p++ = *(p++)
这就不用我说了吧,和printf就没关系
--------------------------
可变形参的实现是通过堆栈来完成的,函数在堆栈里去拿数据,不过根据了不同的机器做了一些偏移
贴一下libc里面printf的实现
int
printf(const char *format, ...)
{
va_list ap;
int retval;
va_start(ap, format);
retval = _doprnt(format, ap, stdout);
va_end(ap);
return retval;
}
typedef char * va_list;
#define _INTSIZEOF(n) \ //n 为 char *
((sizeof(n)+sizeof(int)-1)&~(sizeof(int) - 1) ) //这个值为4 (32bit机器)
#define va_start(ap,v) ( ap = (va_list)&v + _INTSIZEOF(v) ) //偏移4bytes
#define va_end(ap) ( ap = (va_list)0 )
*p++在有些编译器实现的时候很可能额外开栈,从而导致最后一个参数(实际上第一个传递)和看到的不同,实际上完成的是两个动作:
q=*p; p=p+1;
因此编译器拿数据取值的时候就不一致了,可变形参的这种问题不同编译器处理是不一样的。
Tuesday, December 28, 2010
Arduino LED Sensing
/*
@Kun Duan
Simple LED sensing
Two LED required:
ledPin connects the output LED
analogPin connects the input LED as a light sensor
Note that the input LED MUST have its +/- legs inversed
*/
int ledPin = 13; // LED '13 pin as output
int analogPin = 0;
int value = LOW;
int val = 0;
long previousMillis = 0;
long interval = 120;
void setup()
{
pinMode(ledPin, OUTPUT); // set pin mode as OUTPUT
Serial.begin(9600); // set baud rate as 9600 bps
}
void loop()
{
if (millis() - previousMillis > interval) // run program every "interval" msec
{
previousMillis = millis();
val = analogRead(analogPin); // read analog input
if(val < 10) // set output led value as HIGH
value = HIGH;
else
{
value = LOW;
}
digitalWrite(ledPin, value); // write value to led pin
Serial.print("DETECT:"); // send back analog input through serial port Serial.println(val);
}
}
%%%%%%%%%%%%%%%%%%%%%
Below is a demo video
%%%%%%%%%%%%%%%%%%%%%
@Kun Duan
Simple LED sensing
Two LED required:
ledPin connects the output LED
analogPin connects the input LED as a light sensor
Note that the input LED MUST have its +/- legs inversed
*/
int ledPin = 13; // LED '13 pin as output
int analogPin = 0;
int value = LOW;
int val = 0;
long previousMillis = 0;
long interval = 120;
void setup()
{
pinMode(ledPin, OUTPUT); // set pin mode as OUTPUT
Serial.begin(9600); // set baud rate as 9600 bps
}
void loop()
{
if (millis() - previousMillis > interval) // run program every "interval" msec
{
previousMillis = millis();
val = analogRead(analogPin); // read analog input
if(val < 10) // set output led value as HIGH
value = HIGH;
else
{
value = LOW;
}
digitalWrite(ledPin, value); // write value to led pin
Serial.print("DETECT:"); // send back analog input through serial port Serial.println(val);
}
}
%%%%%%%%%%%%%%%%%%%%%
Below is a demo video
%%%%%%%%%%%%%%%%%%%%%
Friday, November 26, 2010
FIFA Announces 55-Man Shortlist For 2010 World XI
Fifty-five players shortlisted for FIFA/FIFPro World XI 2010
(FIFA.com) Thursday 25 November 2010
Getty ImagesThe worldwide players’ union FIFPro and FIFA today announced
the 55 players shortlisted for the FIFA/FIPro World XI 2010 (see full list
below), which is to be revealed at the FIFA Ballon d’Or gala in Zurich on
10 January 2011.
The 50,000 professional footballers belonging to the players’ unions across
the world that form FIFPro received voting forms in a secret ballot to
nominate their peers for inclusion in their World XI – choosing the best
four defenders, three midfielders, three forwards and goalkeeper of 2010.
World champions Spain lead the way with the most players in the shortlist
with ten, followed by nine from Brazil, eight from Argentina, six from
England, four from Germany, three each from the Netherlands and Italy, two
from Portugal and one each from Uruguay, Wales, France, Bulgaria, Serbia,
the Czech Republic, Sweden, Ghana, the Ivory Coast and Cameroon.
Spain’s Primera Division attracted the most nominees with 18, followed by
England’s Premier League with 17 and Italy’s Serie A with 15. Four
nominees came from Germany’s Bundesliga and one from France’s Ligue 1.
The final FIFA/FIFPro World XI will be announced at the FIFA Ballon d’Or
gala in the Zurich Kongresshaus on 10 January 2011. During this televised
gala, the winner of the FIFA Ballon d’Or for the best player of 2010 and
the FIFA Women’s World Player of the Year 2010 award will also be revealed.
Meanwhile, the FIFA World Coach of the Year for Men’s Football award and
the FIFA World Coach of the Year for Women’s Football award will be
presented for the first time, while the FIFA Puskas Award for the best goal
of the year will be announced for the second year running. The FIFA
Presidential Award and the FIFA Fair Play Award will also be presented
during the gala.
The 55-player shortlist in full:
Goalkeepers: Gianluigi Buffon (Italy, Juventus FC), Iker Casillas (Spain,
Real Madrid C.F.), Petr Cech (Czech Republic, Chelsea FC), Julio Cesar
(Brazil, F.C. Internazionale), Edwin van der Sar (Netherlands, Manchester
United FC)
Defenders: Daniel Alves (Brazil, FC Barcelona), Gareth Bale (Wales,
Tottenham Hotspur), Michel Bastos (Brazil, Olympique Lyonnais), Ashley Cole
(England, Chelsea FC), Patrice Evra (France, Manchester United FC), Rio
Ferdinand (England, Manchester United FC), Philipp Lahm (Germany, FC Bayern
Munchen), Lucio (Brazil, F.C. Internazionale), Maicon (Brazil, F.C.
Internazionale), Marcelo (Brazil, Real Madrid C.F.), Alessandro Nesta
(Italy, AC Milan), Pepe (Portugal, Real Madrid C.F.), Gerard Pique (Spain,
FC Barcelona), Carles Puyol (Spain, FC Barcelona), Sergio Ramos (Spain, Real
Madrid C.F.), Walter Samuel (Argentina, F.C. Internazionale), John Terry
(England, Chelsea FC), Thiago Silva (Brazil, AC Milan), Nemanja Vidic
(Serbia, Manchester United FC), Javier Zanetti (Argentina, F.C.
Internazionale)
Midfielders: Esteban Cambiasso (Argentina, F.C. Internazionale), Michael
Essien (Ghana, Chelsea FC), Cesc Fabregas (Spain, Arsenal FC), Steven
Gerrard (England, Liverpool FC), Andres Iniesta (Spain, FC Barcelona),
Ricardo Kaka (Brazil, Real Madrid C.F.), Frank Lampard (England, Chelsea
FC), Javier Mascherano (Argentina, FC Barcelona), Thomas Muller (Germany, FC
Bayern Munchen), Mesut Ozil (Germany, Real Madrid C.F.), Andrea Pirlo
(Italy, AC Milan), Bastian Schweinsteiger (Germany, FC Bayern Munchen),
Wesley Sneijder (Netherlands, F.C. Internazionale), Xabi Alonso (Spain, Real
Madrid C.F.), Xavi (Spain, FC Barcelona)
Forwards: Dimitar Berbatov (Bulgaria, Manchester United FC), Didier Drogba
(Ivory Coast, Chelsea FC), Samuel Eto’o (Cameroon, F.C. Internazionale),
Diego Forlán (Uruguay, Atletico Madrid), Gonzalo Higuain (Argentina, Real
Madrid C.F.), Zlatan Ibrahimovic (Sweden, AC Milan), Lionel Messi
(Argentina, FC Barcelona), Diego Milito (Argentina, F.C. Internazionale),
Arjen Robben (Netherlands, FC Bayern München), Ronaldinho (Brazil, AC
Milan), Cristiano Ronaldo (Portugal, Real Madrid C.F.), Wayne Rooney
(England, Manchester United FC), Carlos Tevez (Argentina, Manchester City
FC), Fernando Torres (Spain, Liverpool FC), David Villa (Spain, FC Barcelona)
(FIFA.com) Thursday 25 November 2010
Getty ImagesThe worldwide players’ union FIFPro and FIFA today announced
the 55 players shortlisted for the FIFA/FIPro World XI 2010 (see full list
below), which is to be revealed at the FIFA Ballon d’Or gala in Zurich on
10 January 2011.
The 50,000 professional footballers belonging to the players’ unions across
the world that form FIFPro received voting forms in a secret ballot to
nominate their peers for inclusion in their World XI – choosing the best
four defenders, three midfielders, three forwards and goalkeeper of 2010.
World champions Spain lead the way with the most players in the shortlist
with ten, followed by nine from Brazil, eight from Argentina, six from
England, four from Germany, three each from the Netherlands and Italy, two
from Portugal and one each from Uruguay, Wales, France, Bulgaria, Serbia,
the Czech Republic, Sweden, Ghana, the Ivory Coast and Cameroon.
Spain’s Primera Division attracted the most nominees with 18, followed by
England’s Premier League with 17 and Italy’s Serie A with 15. Four
nominees came from Germany’s Bundesliga and one from France’s Ligue 1.
The final FIFA/FIFPro World XI will be announced at the FIFA Ballon d’Or
gala in the Zurich Kongresshaus on 10 January 2011. During this televised
gala, the winner of the FIFA Ballon d’Or for the best player of 2010 and
the FIFA Women’s World Player of the Year 2010 award will also be revealed.
Meanwhile, the FIFA World Coach of the Year for Men’s Football award and
the FIFA World Coach of the Year for Women’s Football award will be
presented for the first time, while the FIFA Puskas Award for the best goal
of the year will be announced for the second year running. The FIFA
Presidential Award and the FIFA Fair Play Award will also be presented
during the gala.
The 55-player shortlist in full:
Goalkeepers: Gianluigi Buffon (Italy, Juventus FC), Iker Casillas (Spain,
Real Madrid C.F.), Petr Cech (Czech Republic, Chelsea FC), Julio Cesar
(Brazil, F.C. Internazionale), Edwin van der Sar (Netherlands, Manchester
United FC)
Defenders: Daniel Alves (Brazil, FC Barcelona), Gareth Bale (Wales,
Tottenham Hotspur), Michel Bastos (Brazil, Olympique Lyonnais), Ashley Cole
(England, Chelsea FC), Patrice Evra (France, Manchester United FC), Rio
Ferdinand (England, Manchester United FC), Philipp Lahm (Germany, FC Bayern
Munchen), Lucio (Brazil, F.C. Internazionale), Maicon (Brazil, F.C.
Internazionale), Marcelo (Brazil, Real Madrid C.F.), Alessandro Nesta
(Italy, AC Milan), Pepe (Portugal, Real Madrid C.F.), Gerard Pique (Spain,
FC Barcelona), Carles Puyol (Spain, FC Barcelona), Sergio Ramos (Spain, Real
Madrid C.F.), Walter Samuel (Argentina, F.C. Internazionale), John Terry
(England, Chelsea FC), Thiago Silva (Brazil, AC Milan), Nemanja Vidic
(Serbia, Manchester United FC), Javier Zanetti (Argentina, F.C.
Internazionale)
Midfielders: Esteban Cambiasso (Argentina, F.C. Internazionale), Michael
Essien (Ghana, Chelsea FC), Cesc Fabregas (Spain, Arsenal FC), Steven
Gerrard (England, Liverpool FC), Andres Iniesta (Spain, FC Barcelona),
Ricardo Kaka (Brazil, Real Madrid C.F.), Frank Lampard (England, Chelsea
FC), Javier Mascherano (Argentina, FC Barcelona), Thomas Muller (Germany, FC
Bayern Munchen), Mesut Ozil (Germany, Real Madrid C.F.), Andrea Pirlo
(Italy, AC Milan), Bastian Schweinsteiger (Germany, FC Bayern Munchen),
Wesley Sneijder (Netherlands, F.C. Internazionale), Xabi Alonso (Spain, Real
Madrid C.F.), Xavi (Spain, FC Barcelona)
Forwards: Dimitar Berbatov (Bulgaria, Manchester United FC), Didier Drogba
(Ivory Coast, Chelsea FC), Samuel Eto’o (Cameroon, F.C. Internazionale),
Diego Forlán (Uruguay, Atletico Madrid), Gonzalo Higuain (Argentina, Real
Madrid C.F.), Zlatan Ibrahimovic (Sweden, AC Milan), Lionel Messi
(Argentina, FC Barcelona), Diego Milito (Argentina, F.C. Internazionale),
Arjen Robben (Netherlands, FC Bayern München), Ronaldinho (Brazil, AC
Milan), Cristiano Ronaldo (Portugal, Real Madrid C.F.), Wayne Rooney
(England, Manchester United FC), Carlos Tevez (Argentina, Manchester City
FC), Fernando Torres (Spain, Liverpool FC), David Villa (Spain, FC Barcelona)
Thursday, July 1, 2010
如果还在一起
如果当我24岁时,
我们还在一起,
我们牵手去见彼此的家人,
获取他们的认同
如果当我26岁时,
我们还在一起,
我会挽起留了很久的长发,
做你最美的新娘
如果当我28岁时,
我们还在一起,
我们一起期待着迎接那个加入我们小家庭的新生命的降临
如果当我29岁时,
我们还在一起,
我们一起用心经营我们的家,
每天听着宝宝稚嫩的声音叫我们“爸爸”、“妈妈”
如果当我33岁时,
我们还在一起,
不管周围的人如何分分和和,
我们一起携手坚定的走过那3年之痛、7年之痒,
继续着我们的幸福
如果当我40岁时,
我们还在一起,
就算最初的激情已被现实的生活打磨殆尽,
一切归于平淡,
但彼此的目光仍然会追逐着对方的身影,
相视一笑也会觉得安心
如果当我50岁时,
我们还在一起,
孩子离开我们去追寻他的幸福,
虽然想念宝宝,
依然还有你陪在我的身边,
每天傍晚手牵手一起散步
如果当我60岁时,
我们还在一起,
我们都已该休息,
有了大把的时间一起去做彼此曾经想做而没做的事,
去想去而没去过的地方
如果当我70岁时,
我们还在一起,
身边的孩子们都已经称呼我们“爷爷”、“奶奶”,
你还是当我是个不会照顾自己的孩子,
呵护着你眼中的“孩子”
如果当我76岁时,
我们还在一起,
我们要通知所以认识的人,
邀请所有的人来参加我们的金婚纪念日,
分享我们的幸福快乐
如果当我80岁时,
我们还在一起,
我们会每天躺在摇椅上一起晒太阳,
虽然不知道生命会持续到哪一天,
因为身边有彼此的陪伴,
不再恐惧死亡,
享受生命中的每一天
如果当我走到生命的最后一天时,
我希望身边有你陪伴,
我不要做那个留下来的人,
请允许我自私的先离开这个世界,
又或者你坚持不了了,我愿意陪你一同远去...
因为,
没有你的世界是冰冷的,
所以,
亲爱的,
如果到了那一天,
请让我先走,或带上我一起,
因为,
曾经属于
两个人共享的幸福我一个人收纳不了......
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
死生契阔 与子相悦 执子之手 与子偕老 才是幸福
我们还在一起,
我们牵手去见彼此的家人,
获取他们的认同
如果当我26岁时,
我们还在一起,
我会挽起留了很久的长发,
做你最美的新娘
如果当我28岁时,
我们还在一起,
我们一起期待着迎接那个加入我们小家庭的新生命的降临
如果当我29岁时,
我们还在一起,
我们一起用心经营我们的家,
每天听着宝宝稚嫩的声音叫我们“爸爸”、“妈妈”
如果当我33岁时,
我们还在一起,
不管周围的人如何分分和和,
我们一起携手坚定的走过那3年之痛、7年之痒,
继续着我们的幸福
如果当我40岁时,
我们还在一起,
就算最初的激情已被现实的生活打磨殆尽,
一切归于平淡,
但彼此的目光仍然会追逐着对方的身影,
相视一笑也会觉得安心
如果当我50岁时,
我们还在一起,
孩子离开我们去追寻他的幸福,
虽然想念宝宝,
依然还有你陪在我的身边,
每天傍晚手牵手一起散步
如果当我60岁时,
我们还在一起,
我们都已该休息,
有了大把的时间一起去做彼此曾经想做而没做的事,
去想去而没去过的地方
如果当我70岁时,
我们还在一起,
身边的孩子们都已经称呼我们“爷爷”、“奶奶”,
你还是当我是个不会照顾自己的孩子,
呵护着你眼中的“孩子”
如果当我76岁时,
我们还在一起,
我们要通知所以认识的人,
邀请所有的人来参加我们的金婚纪念日,
分享我们的幸福快乐
如果当我80岁时,
我们还在一起,
我们会每天躺在摇椅上一起晒太阳,
虽然不知道生命会持续到哪一天,
因为身边有彼此的陪伴,
不再恐惧死亡,
享受生命中的每一天
如果当我走到生命的最后一天时,
我希望身边有你陪伴,
我不要做那个留下来的人,
请允许我自私的先离开这个世界,
又或者你坚持不了了,我愿意陪你一同远去...
因为,
没有你的世界是冰冷的,
所以,
亲爱的,
如果到了那一天,
请让我先走,或带上我一起,
因为,
曾经属于
两个人共享的幸福我一个人收纳不了......
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
死生契阔 与子相悦 执子之手 与子偕老 才是幸福
Tuesday, June 8, 2010
EP-LDA 0.2 更正版!!!
这次主要debug了一下Gamma函数,原先计算Scaler的时候直接套用Gamma Function的定义计算,容易导致溢出(用Matlab算几个值就知道了),这次改为用log_gamma()进行计算,避开计算Gamma函数的乘积。貌似这次效果要好些,但是应该还是会有bug,以后再慢慢调不着急嘿嘿。
贴个链接:https://www.cs.indiana.edu/~kduan/rsc/2010/lda-ep-0.2.tar
贴个链接:https://www.cs.indiana.edu/~kduan/rsc/2010/lda-ep-0.2.tar
Monday, June 7, 2010
EP-LDA!!!
从开始看LDA到最后初步写完了基于EP的LDA算法!前前后后花了将近三周?忘了,反正很长。。。刚开始时候看LDA的那叫个一头雾水啊。。看到最后才发现,好像不是因为很难,而是自己懂的东西太少了。。Blei的那篇文章从头到尾看下来,发现要是不好好学一下Graphical Model和Machine Learning的话那是基本上在这个方向发展无望的,当然还有最优化相关的知识吧。。。Anyway,今天整理了下代码,感觉还不错嘿嘿。。(狞笑)
废话少说,贴出来几个很有用的reference,算是又一个reading list吧。。。
1. http://research.microsoft.com/en-us/um/people/minka/papers/ep/
这个是Minka所有关于EP的paper list,怎么说的,非常想感慨的一下是,这样的人之所以能有这样好的idea,可能和美国对孩子的教育方式是很有关系的,中国的孩子学习能力超强的,但是又有什么用呢,总是会被别人牵着鼻子走,很难会有很创新的idea。。想到刚刚发布的iphone 4和大陆那么多代工工厂,不禁汗一下,难道中国人生来就是“任劳任怨”的么。。。好像扯淡扯远了,let's make idea!!!
2. http://www.cs.princeton.edu/~blei/.../BleiNgJordan2003.pdf
LDA的开篇之作,没啥可说的,自己写了一个learning notes也一并贴出来,当然写的很简陋,仅仅是这篇paper里边我感觉比较难的地方的推导过程(又一个只会学习的!)请见这里:https://www.cs.indiana.edu/~kduan/rsc/2010/lda-report.pdf
3. http://chasen.org/~daiti-m/dist/lda/
代码框架借鉴的是这位大神,这个是用variational inference也就是原始paper里边的推理方法。代码写的相对来说比较容易懂,所以就没有用Blei自己release的代码,那个应该是写的很完美的,可是比较难理解,对本人这样的菜鸟还是留着以后慢慢研究,哈哈
废话少说,贴出来几个很有用的reference,算是又一个reading list吧。。。
1. http://research.microsoft.com/en-us/um/people/minka/papers/ep/
这个是Minka所有关于EP的paper list,怎么说的,非常想感慨的一下是,这样的人之所以能有这样好的idea,可能和美国对孩子的教育方式是很有关系的,中国的孩子学习能力超强的,但是又有什么用呢,总是会被别人牵着鼻子走,很难会有很创新的idea。。想到刚刚发布的iphone 4和大陆那么多代工工厂,不禁汗一下,难道中国人生来就是“任劳任怨”的么。。。好像扯淡扯远了,let's make idea!!!
2. http://www.cs.princeton.edu/~blei/.../BleiNgJordan2003.pdf
LDA的开篇之作,没啥可说的,自己写了一个learning notes也一并贴出来,当然写的很简陋,仅仅是这篇paper里边我感觉比较难的地方的推导过程(又一个只会学习的!)请见这里:https://www.cs.indiana.edu/~kduan/rsc/2010/lda-report.pdf
3. http://chasen.org/~daiti-m/dist/lda/
代码框架借鉴的是这位大神,这个是用variational inference也就是原始paper里边的推理方法。代码写的相对来说比较容易懂,所以就没有用Blei自己release的代码,那个应该是写的很完美的,可是比较难理解,对本人这样的菜鸟还是留着以后慢慢研究,哈哈
Subscribe to:
Posts (Atom)