Posted by: lihan on: February 18, 2012
A man sat at a metro station in Washington DC and started to play the violin; it was a cold January morning. He played six Bach pieces for about 45 minutes. During that time, since it was rush hour, it was calculated that 1,100 people went through the station, most of them on their way to work. Three minutes went by, and a middle aged man noticed there was musician playing. He slowed his pace, and stopped for a few seconds, and then hurried up to meet his schedule. A minute later, the violinist received his first dollar tip: a woman threw the money in the till and without stopping, and continued to walk. A few minutes later, someone leaned against the wall to listen to him, but the man looked at his watch and started to walk again. Clearly he was late for work. The one who paid the most attention was a 3 year old boy. His mother tagged him along, hurried, but the kid stopped to look at the violinist. Finally, the mother pushed hard, and the child continued to walk, turning his head all the time. This action was repeated by several other children. All the parents, without exception, forced them to move on. In the 45 minutes the musician played, only 6 people stopped and stayed for a while. About 20 gave him money, but continued to walk their normal pace. He collected $32. When he finished playing and silence took over, no one noticed it. No one applauded, nor was there any recognition. No one knew this, but the violinist was Joshua Bell, one of the most talented musicians in the world. He had just played one of the most intricate pieces ever written, on a violin worth $3.5 million dollars. Two days before his playing in the subway, Joshua Bell sold out at a theater in Boston where the seats averaged $100. This is a real story. Joshua Bell playing incognito in the metro station was organized by the Washington Post as part of a social experiment about perception, taste, and priorities of people. The outlines were: in a commonplace environment at an inappropriate hour: Do we perceive beauty? Do we stop to appreciate it? Do we recognize the talent in an unexpected context? One of the possible conclusions from this experience could be: If we do not have a moment to stop and listen to one of the best musicians in the world playing the best music ever written, how many other things are we missing?
Posted by: lihan on: February 10, 2012
当你把Wordpress,主题,插件全部安装好,并且能平稳的运行之后,你还却一样东西,那就是流量。你可能已经建立了一个闪亮的博客,但是这个时间还不知道它,现在是时间行动起来,开始让大家注意你了,这其实比想象得要难。

最好的方法去获得一个稳定的日均访客就是在搜索引擎里面去的一个更高的排名。这里我们主要讲一个需要注意的地方。
我们先简单了解下Google的排名机制之一,外链。这套机制非常复杂,我们用简单的方法展示。
A, B, C 三个独立网站,他们都有类似质量和数量但不重复的内容,这种情况在搜索引擎的排名系统内,他们的排名应该是一样的。如果A和B互相有回应链接,而C只给了A一个链接,那么A比B和C的排名都高。 但是,如果站点C只是一个单纯的出卖外链的网站,或者在搜索引擎的排名不好,这时C其实不能给A带去太大的利益,反而会使得A失去搜索引擎的权重。
Google已经全面调整了搜索引擎机制来控制这种作弊方式,所以,请花更多的时间去顽固内容吧。
Posted by: lihan on: February 9, 2012
到底应该给电脑升级哪个配件,其实,在这里并没有一个绝对的固定答案。这取决鱼你主要用电脑做什么。比如,如果你做很多多任务应用程序,或者你用到的软件需要大量内存(比如 虚拟机), 那么,升级内存一定是一个最佳选择。如果你玩很多游戏,选择升级一块新诞生的显卡更容易提升性能。视频编辑的工作者则更青睐一块更快的多线程处理器。这里我把一些配件的最佳升级case简单的讨论一下。
内存: 升级内存是最经济有效的提升电脑性能的方法。通常来说4GB的内存足够一个标准的用户使用。如果你的电脑仍然只有512M或者1GB,升级到4G会有一个大幅度的性能提升。对于一些使用photoshop, Vmware, Virtualbox的用户来说,也会有一个明显的性能提升,因为更大的内存意味着更少的次数读取硬盘。
硬盘/固态硬盘:升级到固态硬盘是提升电脑速度最好的方法之一。一块固态硬盘(SSD)会大幅度提升电脑的和应用程序的启动速度。请注意,固态硬盘不会使得视频的处理速度变得更快,也不会使网站的加载时间变得明显更短,但是会使得一些需要长时间启动的应用程序在不到十分之一的时间内启动完成。
处理器:处理器的升级没有内存或者硬盘的升级那么简单,因为你要知道你只能升级到和主板接口相配的处理器。通常来说,升级处理器对一些重负荷运算的任务会有较大的性能提升,例如视频处理。多核心的CPU会帮助多任务执行,的速度提升,特别当电脑处于繁忙状态时。更快的处理器也能提升游戏性能。
显卡:如果你是一个游戏玩家,这个可能是你最需要升级的。没有任何一个配件能像升级显卡一样提升游戏性能来得直接。然而,新显卡并不便宜,你可以在二手市场找到一块合适使用。如果你不是一个游戏玩家,你则不需要太在意显卡。现在任何一台电脑都能应付大部分的视频操作,包括HD视频。
Posted by: lihan on: February 6, 2012
Tonight is the celebration of the Latern Festival(元宵节) which is a Chinese festival having on the fifteenth day of the lunar month, officially the ends of Chinese New Year (Spring Festival) celebration.
During the festival celebration, in my town (the mid of China), there are a lot of lanterns hanging besides the Gan river. They are wrapped by a piece of thin red paper with riddle on it. Kids are together and guess them as main entertainment. It wasn’t really fun to me honestly, since I couldn’t read lots of Chinese characters by that moment, and lack of life experience, workout the answer is nearly impossible. And I believe most kids with average intelligent level do share this same point of view. It’s more like a evening that SOMEBODY shows off how smart he/she is, and suck the rest of us.

Additionally, there is another very meaning for the festival. That is ‘be together’. The whole family members usually go to their grand parents’ house and having dinner together. ‘Tangyuan’ and ‘Yuanxiao’ is the essential traditional dish on the table what is round shaped dumpling means wholeness. An interesting finding that is more than half of the Chinese population(including myself) consider ‘Tangyuan’ and ‘Yuanxiao’ to be the same kind of food, but they are certainty not.
Posted by: lihan on: February 5, 2012
After months of being busy for uni and work, I had to sacrifice the time for blogging so I could focus on study and work. But the facts has proven it’s wrong. I did not feel I have done my study any better than I could, and hadn’t perform any nicer at work. Instead, the lazy dude caught me and then tried to take over my control. I knew that’s absolutely wrong and will destroy my remaining positive thinkings. So I started exercise in the morning so I could have dump the ‘lazy’ dude from my back. And today, I would like keep sharing my views with you by this blog.
Someone told me that if you fell aimless in your life, you’d better to establish a 5-year plan, that is what you want to be after 5 years. And then you break it down into years and months, then it’s a lot clear to set up a plan for a recent future.
I am working 40 hours per week, so it’s pretty difficult to code much outside work and having anything impressive done without destroy my balanced lifestyle. But I keen on producing something that will help me in the future, I need an idea, a great idea for a web app that could helping people. My friends, that’s all.
I also planned to do some readings that related to business. Because I’ve been many years in IT field and want some fresh air, learn how to turn my professional into real business and benefit people. Rework by Jason Fried has selected for my study material, not for any special reason, but it’s proposed by many of my friends who have business background. And I will share my findings with you in the next few days. See you there.
Posted by: lihan on: October 2, 2011
Python 2.5 is relatively recent and not supported everywhere yet, so it’s important to understand the behavior of both Python 2.5 and earlier versions.
This quiz is cited from here.
adders = []
for i in range(0, 100):
adders.append(lambda x: x+i)
print adders[17](42)
(b) What about the following similar-looking code?
adders = [lambda x: x+i for i in range(0, 100)] print adders[17](42)
try:
exit(0)
except Exception, e:
print e
units = [1, 2] tens = [10, 20] nums = (a + b for a in units for b in tens) units = [3, 4] tens = [30, 40] print nums.next()
print "word" in [] == False
print ("word" in []) == False
print "word" in ([] == False)
Posted by: lihan on: May 15, 2011
The tutorial includes the topics below:
Posted by: lihan on: May 11, 2011
Posted by: lihan on: May 9, 2011
I’ve been looking for some missing header file from glut for ages, and finally have all of them, just in case I’d like make a copy on my webiste, you also can download, that’s all you need to do opengl programming.
The package is tested with Visual Studio 2010, any other version should be working!
Posted by: lihan on: May 8, 2011
母亲节(Mother’s Day),作为一个感谢母亲的节日,最早出现在古希腊,时间是每年的1月8日,而在中国、美国、加拿大和一些其他国家,则是每年5月的第2个星期天,其他一些国家的日期也并不相同。
母亲们在这一天通常会收到礼物。康乃馨被视为献给母亲的花,中国的母亲花是萱草花,也称忘忧草。作为一个特殊的群体——程序员,我们的表述方式自然也 会有些特色。我们这一辈程序员的父母(至少是绝大部分父母),别说这下面的编程语言,有些甚至都还不知道如何操作电脑。虽然也许母亲们会看不懂,但这种表 述你我都能领会。或许几十年后,等我们自己的儿女用这种方式来表达他们对父母的爱,你我绝对不会陌生。