Lihan's

Author Archive

How many are we missing

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 [...]

谨慎通过购买外链来提升流量

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视频。  

Happy Lantern Festival

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 [...]

Never too late to start

Posted by: lihan on: February 5, 2012

So, What happened 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 [...]

A python quiz

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. (a) What number does the following code print? adders = [] for i in range(0, 100): adders.append(lambda x: x+i) print adders[17](42) (b) What about the [...]

C++ essentials for OpenGL

Posted by: lihan on: May 15, 2011

The tutorial includes the topics below: Pointers Arrays and strings Parameter passing Class basics Constructors & destructors Class Hierarchy Virtual Functions Coding tips Advanced topics c++ tutorial for opengl

A few highlights from Google I/O 2011 (Photos)

Posted by: lihan on: May 11, 2011

OpenGL glut bundle for download

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个星期天,其他一些国家的日期也并不相同。 母亲们在这一天通常会收到礼物。康乃馨被视为献给母亲的花,中国的母亲花是萱草花,也称忘忧草。作为一个特殊的群体——程序员,我们的表述方式自然也 会有些特色。我们这一辈程序员的父母(至少是绝大部分父母),别说这下面的编程语言,有些甚至都还不知道如何操作电脑。虽然也许母亲们会看不懂,但这种表 述你我都能领会。或许几十年后,等我们自己的儿女用这种方式来表达他们对父母的爱,你我绝对不会陌生。