The file command also works in Linux. But unlike Mac, u don’t need to have the -I parameter. Continue reading Linux – Check File Encoding
Tag Archives: Postaday2011
Beijing 2011
三日三夜北京短線遊話咁快就過左,多謝 Tinyan 陪我周圍走,仲有 Ivy 五星級的家同免費導遊服務。
只可惜…
我登上了 The Great Wall of China, 但我翻不過 The Great Firewall of China. 哈哈。 Continue reading Beijing 2011
Drupal – Add CSS Attributes to Menu Items
If you want to add customized the HTML attributes such as id and class of the menu items, the Menu attributes module could help.
Download and install the module @ Drupal – Menu attributes Continue reading Drupal – Add CSS Attributes to Menu Items
jQuery – Bind event to newly inserted element
If you have inserted DOM objects into the HTML in $(document).ready(function() {…}). Those binded events will not applied to newly inserted DOM objects. In the following example, a new button is inserted whenever the .btn is clicked. but it is only valid for the first .btn button. Continue reading jQuery – Bind event to newly inserted element
jQuery – Check/Select a radio input
The following jQuery code check/select a radio button.
$('#radio-input-id').attr('checked', 'checked');
Done =)
馬嶽 – 輸者替補 曠古絕今
曠古絕今… 用來形容香港特區政府班“官”真係最貼切不過。
特區政府為了防止民主派再用辭職發動「公投」,想出了曠古絕今的替補制度:由本來輸的候選人補上出缺的席位。政府有關論據錯誤極多,處處誤導公眾,實在極為可悲。
違反比例代表制精神
政府強調有關安排符合比例代表制選舉制度,但其實新安排和比例代表制原則大相逕庭。比例代表制最簡單和重要的精神和原則,就是議席應該大致按照選舉中各政黨名單得票的比例而分配。簡言之,一個政黨如果在選舉中獲得一成的選票,它應該在議會中拿得大約一成的議席(全面普選的話),令議會的議席分佈,可以大約反映社會中民意的分佈。 Continue reading 馬嶽 – 輸者替補 曠古絕今
jQuery – Slideshow Example
This is another jQuery example which i want to share with you. Again, it maybe not good for use but it would be a nice example for beginners to take a quick look on jQuery. Try jQuery Cycle Plugin to get more interesting animation. If you are looking for more jQuery examples, take a look in my previous blog posts.
jQuery – Sliding div Example
There are some jQuery plugins such as jQuery Cycle Plugin which makes website animation simple. The following HTML is a sliding div example without using other plugins. it maybe not good for use but it would be a nice example for beginners to try the power of jQuery. Continue reading jQuery – Sliding div Example
Drupal – Enable Quantity Field for Ubercart Add to cart form
Update @ 2015-04-27: There is a simpler way to achieve this without coding. Please refer to this comment.
In the Ubercart product page, the product quantity option in the add to cart form is hidden by default. If you want to allow user modifying the product quantity in the order, create a custom module and implement the following hook. Continue reading Drupal – Enable Quantity Field for Ubercart Add to cart form
Drupal – Autocomplete CCK Text and Number Field
The module which i want to talk about in this post adds the Autocomplete feature to the CCK Text/Number fields. Continue reading Drupal – Autocomplete CCK Text and Number Field