ImageCache allows you presetting the uploaded image like cropping and scaling. Download the following two modules.
Enable the features as shown below. Continue reading Drupal – Preset Image Processing Using ImageCache
ImageCache allows you presetting the uploaded image like cropping and scaling. Download the following two modules.
Enable the features as shown below. Continue reading Drupal – Preset Image Processing Using ImageCache
The following CCK field modules are needed if you want to add an image field to content type.
Enable them in your Drupal site and add a new field to your content type as follow.
Continue reading Drupal – Add Image Field to Content Type
In Mac Terminal:
I would like to set the action of the fn + left arrow as to be Home of Line as well as End of Line for fn + right arrow. So you can open the Terminal Preference –> Settings –> Keyboard Widget. Continue reading Mac – Setting Home and End of Line in Terminal
You can show the line number in the vi editor by entering the following input command.
The Nodewords module could help you to add meta tags to any pages of your Drupal site. Let’s try it now!
In this example, the Drupal version is 6.19 and the Nodewords module is 6.x-1.11. There is a bug in this Nodewords version and you can never save the meta tag for other page. Luckily, someone has created a patch and just edit the nodewords.module as follow. Continue reading Drupal – Add Meta Tags to Drupal
I was working on a legacy CMS which has a HTML form with ISO-8859-1 encoding. I found that whenever i got an Apostrophe (‘) in the string, the data cannot be persisted.
I guess it should be some encoding problem which makes the database fail to persist the data. So i try to use the PHP str_replace function to replace those Apostrophe but it has never replaced them successfully.
Finally, i got the solution. PHP provide a function called htmlspecialchars which will substitute the following special characters into HTML entities. Continue reading PHP – Convert Special Characters to HTML Entities
八九年六四後,美國前總統尼克遜到北京,他跟鄧小平說了一句極具智慧的話:「以前反對你們的,是你們的敵人,現在反對你們的,很多都是你們的朋友。」據說,鄧小平聽了此言,沉吟了一陣,其後提出了因應世局的 28字方針,最重要的幾句是:「善於守拙,絕不當頭,韜光養晦……」。用通俗的話來說,意思就是要「夾着尾巴做人」。
20年過去,中國靠着當世界工廠和國富民窮政策,變得財大氣粗起來,認為有錢有軍力就可以在國際社會不再「守拙」、可以「當頭」了。許多國際政要對中國也「睇錢份上」,給足了面子,甚至對中國的專權政治加特權市場經濟的體制讚譽有加了。然而,這些國家的掌權者,說甚麼視中國為戰略夥伴,說白了就是有相互利用價值,絕不等於視中國為真正朋友。因為真正朋友必須有共同的價值標準,也就是所謂「共同的語言」。 Continue reading 李怡 – 劉曉波沒有敵人,中國沒有朋友
If morality represents an ideal world, then economics represents the actual world.
Steven D. Levitt