• Thinkpad Hotkeys in KDE4

    Posted on: Wed, 12/01/2010 - 22:00 By: Huahai

    I have kept my Thinkpad X61 laptop up to date with Debian sid for a few years. The KDE4 in Debian sid is at version 4.4.5 at this moment, and I think it is mature enough for me to switch the laptop power management from my own hacked up solution to a KDE integrated one. My old solution still works for the most part, but there are some glitches after repeated supsend-resume cycles. As the system keeps evolving, I suspect more things would break.

  • Config Spring and DWR on Jetty with zero XML

    Posted on: Sun, 08/09/2009 - 11:51 By: Huahai

    I hate xml configuation files. They look awful. As a result, they can be very time-consuming to write, and are very error-prone. There's no type-safty checking whatsoever. I would rather keep configurations within my Java source code. After all, we programmers are the only people looking at these configurations, why create trouble for ourselves? Luckily, with annotation support in Java, we can now completely do away with xml files for developing Web applications. Here is my recent experience integrating Spring framework with DWR on a Jetty sever.

    Spring

  • 大草原和越野车:谈谈科学的硬壳(上)

    Posted on: Fri, 04/18/2008 - 04:04 By: Huahai

    到非洲撒哈拉沙漠以南辽阔的大草原(Safari)上旅行可能是很多人的梦想。在电视上大家可能看过这样的镜头:纯净高远的蓝天之下,水草丰美的草甸之上,大群大群的野生动物随意倘佯,与坐在越野车上的游客咫尺相邻,兴奋的游客们有的照相,有的惊呼指点,好不快活。不过,如果知道这些游客在上车前受到的警告,可能有人就不会觉得有这么快活了。

  • 嫉妒教信的是假道么? 一个教义的分析

    Posted on: Fri, 04/18/2008 - 03:35 By: Huahai

    面对嫉妒教徒(1)的所作所为,很多人很疑惑,为什么这些自称以耶酥为楷模的人群,
    行为上和耶酥所教的往往是背道而弛呢?我现在说的行为,并不是指个别嫉妒教徒的恶
    行,而是在嫉妒徒中普遍的存在的,在外人看来是虚伪的行为。一个极端的例子,就是
    前美国新教福音派领袖Ted Haggard。而不那么极端的例子,读者如果留意,就可以在
    身边找到。正如甘地所说:"我喜爱你们的耶酥,只是太多的嫉妒徒和耶酥实在太不像
    了。"(2) 这样的差异的来源是什么? 本文试图从嫉妒教的教义和历史中寻求答案。

    信嫉妒教的朋友们可能都知道,没有保罗,就没今天的嫉妒教。几乎完全是靠保罗一个
    人的超强的组织能力,口才和热情,才使得嫉妒教在犹太人以外传播开来。指导嫉妒徒
    日常生活的教义,基本上来源于保罗对教义的阐述。一本新约,只有前面四篇福音是纪
    录耶酥的言行,剩下的倒有十四篇经文是纪录保罗的言行,篇幅和福音差不多长。就是
    福音,保罗的印记也很明显。比如说,路加福音的作者就是保罗的弟子,马可福音的作
    者也和保罗一起旅行传道过。事实上,新约的最早内容就是保罗的书信,福音是其后成
    书的(3)。有意思的是,保罗本人并不是耶酥在世时耶酥的门徒,也没见过耶酥。更让
    人诧异的是,保罗最开始是在耶路撒冷主持迫害耶酥信徒的人。后来保罗自称,在一次
    去大马士革主持迫害耶酥信徒的路上,耶酥向他显现,命令他向世人传播耶酥的道。显
    然,保罗是否误传了耶酥的道,就成了嫉妒教信仰的一个重大问题。

  • Suspending to RAM on Debian laptop

    Posted on: Fri, 04/18/2008 - 00:39 By: Huahai

    I am tracking Debian sid on my Thinkpad laptop, a few months ago it started to use pm-utils and broke suspending to RAM (sleep) functionality. Basically, the machine would go to sleep then immediately resume.
    It turned out that this problem can be easily fixed by creating a file /etc/pm/config.d/local, and put in a line

    SUSPEND_MODULES="e1000"

    The reason is that pm-utils by default does not unload Ethernet card module e1000, so the machine would be waken up by Ethernet card activities.

  • 显微镜下的数学

    Posted on: Sat, 04/12/2008 - 06:29 By: Huahai

    显微镜下的数学 Mathematics under microscope (电子书下载)是本数学家写的
    从认知角度看数学的书,挺有启发性的。

    数学和心理学的联系,应该要比和物理学的联系还要紧密,还要更自然:数学是心理产
    物(Mathematics is the study of mental objects with reproducible properties.
    p.IX),而心理学是研究心理产物的产生过程的。如果对心理产物本身都不了解,如

  • an interesting birthday gift

    Posted on: Sun, 03/02/2008 - 22:34 By: Huahai

    Huahai has received his birthday gift from Yunyao, a few days early.

    What's inside?

    Wow, a scenic flight certificate, what a lovely gift! Thank you, babe.

  • Create Multiple Modules Maven Project in Eclipse

    Posted on: Thu, 02/14/2008 - 04:49 By: Huahai

    Modularized software system design is often a good idea. Maven is the new software build system that is purported to be better than ant. For my new project, I want to create a maven build consisting of multiple modules. To do this, and let Eclipse treats these modules as parts of a single Eclipse project, I used the following procedure.

    First create the top level maven project, which will be the container of the modules. Our top level maven project is called "cool".

Subscribe to Huahai's Blog