陶傑 – 百年一天窗

一名做報紙的資深人物逝世,高壽百歲。其「貢獻」最為人樂道者,是在一九八九年,社論「開天窗」。

報紙,西方叫 Watchdog。「西方先進國家」沒有社論「開天窗」這種事。華文報紙才有,沒有自由,一輩子都關在籠子裡,像一隻一輩子都綁上口罩的狗,忽然之間,口罩奇蹟地鬆脫了一分鐘。狗也沒有大吠,只是低聲嗚咽了一陣,主人發覺了,口罩再緊緊綁上──對於這隻狗來說,牠的一生,這嗚咽的一分鐘,就是最有意義的貢獻了。

多可憐呀。人家紐約時報、泰晤士報、每日鏡報,這群洋犬,一生下來第一天就暢所欲吠了,汪汪汪,一直吠到死,這些狗,投胎的方位對了,才幸福着呢。

老報人的「新聞格字」,對於政權,他信奉:「有喜報喜,有憂報憂,有惡不隱,有善必揚」,其文人門生,也大讚有「報人風骨」。

在新聞學上,這十六字,是錯的。政府做點建設,完全是份內之責,公帑是納稅人的,政府只是公僕。
Continue reading 陶傑 – 百年一天窗

Drupal 7 – Create a Datetime field in hook_schema() @ 2

Yesterday we talked about defining a datetime field for the table created by custom module.
Drupal 7 – Create a Datetime field in hook_schema() @ 1

As i have mentioned in the above post, the datetime field is no longer support by the Drupal Schema API. If you don’t want to use the datetime field, you can try to save the datetime in timestamp format and stored it in an int column.
Continue reading Drupal 7 – Create a Datetime field in hook_schema() @ 2

Drupal 7 – Create a Datetime field in hook_schema() @ 1

Next: Drupal 7 – Create a Datetime field in hook_schema() @ 1

If your custom module requires an additional table in the Drupal database, you have to create the .install file and define the schema inside it. In Drupal 7, the datetime field is no longer support by the Drupal Schema API. If you want to create a datetime field, you have to use the mysql_type or pgsql_type. Here is an example.
Continue reading Drupal 7 – Create a Datetime field in hook_schema() @ 1

Drupal 7 – Mutiliple selection list for taxonomy using Hierarchical Select

Taxonomy is a must have tool for grouping relevant content together. On the other hand, with the help of Views and exposed filter, user could easily list out the content with specific taxonomy.

But when a taxonomy has more than 1 levels, the filter option list may get too long and become less user friendly. In the past, i tried to make a multiple selection lists by applying some Javascript and jQuery on the exposed filter. It turns out that the result is quite bad.

Recently i found that there is a module which could turn the multiple levels taxonomy into multiple selection lists. It is called Hierarchical Select written by Wim Leers who is also the author of Drupal CDN module. Let’s try it now.
Continue reading Drupal 7 – Mutiliple selection list for taxonomy using Hierarchical Select

CSS – Make font-size smaller than 12px in Chrome

In Chrome, the displayed text has a minimum font-size 12px even thought you set a smaller value in CSS. This is because the Chrome browser has a auto font adjustment.

So if you want to style a text with font-size smaller than 12px, include the following line in your CSS file.

body {
  -webkit-text-size-adjust: none;
}

 

Done =)

Reference: StackOverflow – Font-size <12px doesn't have effect in Google Chrome

陶傑 – 神學和科學

神學科學,哪一個大?是有趣的問題。

在西方,神學科學一度勢不兩立,所以才有宗教裁判所審訊哥白尼。在神學的專權面前,科學一度低頭屈服。當然,不是所有的科學家都選擇為真理而殉難:布魯諾不屈,在火刑柱上燒死了,伽利略沒有,高壓之下,他選擇了大丈夫能屈能伸的策略,決定生命寶貴一些,尤其一個愚昧的黑暗世紀,不值得為一群蠢人犧牲性命。但是足足有五百年,神學迫害科學,火光熊熊之中,神學欠下科學許多人命血債。

二十世紀之後,科學復了仇,把神學擠到一角。火箭登陸月球,核彈能摧毀世界,試管嬰和複製羊,科學拓展了知識,知識就是權力。但是當科學知識的權力無限擴張,西方文明才想到神學,用神學來制衡。
Continue reading 陶傑 – 神學和科學

名言五十

The world is a dangerous place to live; not because of the people who are evil, but because of the people who don’t do anything about it.

Albert Einstein

The following quote is the chinese version with similar meaning.

知識分子應該對世界上任何不合理的現象表示自己的態度, 否則你就是幫兇。

愛因斯坦

jQuery – Using animate() with fadeIn() or fadeOut() at the same time

We know the difference between display: none and visibility: hidden as we talked about it previously.
jQuery – Animation on Visibility

The fadeIn() and fadeOut() jQuery functions are very convenient to use but they does not allow us to add animation during the fadeIn and fadeOut process. So we have to do it with a slightly different way.
Continue reading jQuery – Using animate() with fadeIn() or fadeOut() at the same time

Dream BIG and go for it =)