梁振英的施政報告,平心而論,總體來說,不比十五年前差,但沒有用,因為這個小孩上學期,也就是頭六個月,成績和操行一片紅,所以這個學期,考個及格,也不夠,要考個超優良,才能把前一截的壞成績追補回來。
這樣一來,就吃力了。梁先生的報告不是沒有實質內容,譬如,這裏的土地幾多公頃,那一片土地多少,共建多少房屋,都講出來了,但是太過平淡,施政報告缺乏一點神來之筆。
什麼是神來之筆?英治時代,明知道香港租約快滿了,即將交回中國,麥理浩臨走還宣布:港島的中區,建一條登山扶手電梯。這就是神來之筆。沒有人想到從干德道半山,有一天可以步行到皇后大道中,登山電梯顛覆了許多人的生活想像,大家能期待,有一天,不用跑路,一條自動輸送帶把人送到半山,電梯動工,兩旁的商戶抗議,但英國人不管,造成之後,你看,電梯兩邊的房產和商舖,都變成了黃金戶。
這就是Governing,管治。一九八九年大陸「六四」,衛奕信宣佈玫瑰園大計,斥資千億建新機場,今天的梁振英,明知道建屋要三五年,但缺乏了神采的一筆。
Continue reading 陶傑 – 第一份報告 →
Edit your Nginx virtual host config file and the redirection could be done as follow.
non-www to www
server {
listen 80;
server_name example.com;
return 301 $scheme://www.example.com$request_uri;
}
server {
listen 80;
server_name www.example.com;
## here goes the rest of your conf...
}
Continue reading Nginx – Redirect non-www to www Subdomain and vice versa →
香港男女藝人因為宣示同性戀身份,被禁亮相中央台春節晚會。
香港藝人亮相所謂「春晚」,一夜之間有幾億觀眾,「國家」關照你,給你名利,你不要反對國家,令國家沒有面子,本無異議。但是「國家」把亮相晚會的標準越收越緊,這對藝人沒有反對誰,從沒得罪國家,他們只是在香港維護自己。
但「國家」的臉色時時變,「國家」幾時不高興了,香港的藝人很難追趕。要他們都像成龍 一樣,國家需要時,挺身而出,教誨香港的下一代不要示威遊行,做到這一點,境界很高,又不是每個藝人都做得到。
Continue reading 陶傑 – 本無一物 →
Some days ago, i write a blog post about how to render a Drupal 7 block programmatically.
Drupal 7 – Render a Block programmatically
If the block is created by Views , there is a simpler solution provided by the Views API . And we can also pass the contextual filter argument too.
print views_embed_view(<view machine name>, <display id>, <arg 1>);
Done =)
Reference: Outputting a Drupal 7 View programmatically with Contextual Filters (arguments)
香港一對男女藝人,因為「出櫃」,為同志爭取平權,今年被鄰近地區中央台禁止出台「春節晚會」。
這兩位人物出櫃,沒有一個在北京開記者會宣布我是同志,另一個在廣州公開呼籲姊妹同性站起來,他們的行為,發生在香港,根據「一國兩制」,他們在大陸的登台和表演,不應該受影響。
但是何謂「一國」,什麼是「兩制」,不是由你用常理來解釋,而是由大陸壟斷解釋權。一個人的性傾向,與政治無關,但如果一個社會本來帶有壓迫的傾向,即使你沒有公開說要全民公投普選,你只是一個人宣布你自己的品味,並希望移風易俗,能為這個社會多帶來一點平等,你已經觸犯了中國的「核心利益」。
Continue reading 陶傑 – 鬧鬼 →
One way to break a forEach loop in Javascript is to make use of the try and catch .
var BreakException= {};
try {
[1,2,3,4,5].forEach(function(val) {
if (val == 3) {
throw BreakException;
} else {
console.log(val);
}
});
} catch(e) {
if (e !== BreakException) {
throw e;
}
}
// Result: only print 1 and 2.
Continue reading Javascript – Break forEach loop →
You could use the following command to drop all the tables of a MySQL DB .
mysqldump -u<user> -p<pwd> --add-drop-table --no-data <db> | grep ^DROP | mysql -u<user> -p<pwd> <db>
Just replace the <user> , <pwd> and <db> with your MySQL username, password and database name. That’s all.
Done =)
Reference: MySQL drop all tables command
A long time ago, i have a post about hacking into the CCK module so we could have more options when settings the number of values per field in the field setting page.
Drupal – Increase Views Relationship Delta Limit
This is a dirty approach as mentioned by eosrei .
So in Drupal 7 , we can do it by creating a custom module and alter the field_ui_field_edit_form . Let’s implement the following hook_form_FORM_ID_alter() in a custom module.
Continue reading Drupal 7 – Increase the number of values per field →
The following piece of code creates a new node of a subscriber content type. This subscriber has two textfields which called First Name and Last Name . In this example, we make use of the node_object_prepare() function which helps preparing the node object.
Continue reading Drupal 7 – Create node programmatically →
有這樣的老師,他們的下一代一定有希望。
“那個決定權,在孩子自己的身上,在這個生命的身上,為他那個生命裡面去,去找到他自己與他生命的價值,他不要活在別人的價值當中裡面 ,那個生命的潛能,會因為這樣,往正向去發展。”
VIDEO
雲林縣私立信義育幼院
Posts navigation
Dream BIG and go for it =)