The following functions help you to pad a string in Javascript. Continue reading Javascript – Left/Right Pad a String
Tag Archives: Postaday2011
台北彩虹橋
旅程話咁快就完結,快樂的時光果然過得特別快。
六日行程去了以下地方
- 中正紀念堂 (台北)
- 總統府 (台北)
- 西門町 (台北)
- 外澳海灘 (宜蘭)
- 太平山 (宜蘭)
- 鳩之澤溫泉 (宜蘭)
- 羅東夜市 (宜蘭)
- 松羅國家步道 (宜蘭)
- 青蔥博物館 (宜蘭)
- 宜蘭古城 (宜蘭)
- 國立傳統藝術中心 (宜蘭)
- 龍山寺 (台北)
- 剝皮寮老街 (台北)
- 彩虹橋 (台北)
Drupal – Get Vocabulary ID/Object by Name
I found a very good example on retrieving the Vocabulary object by name. Continue reading Drupal – Get Vocabulary ID/Object by Name
宜蘭太平山
Javascript – Print an object in console
The toSource() function, which we talk about yesterday(Javascript – Print an object with alert()), only works in Firefox, a more proper way which work in non Gecko engine browser like Chrome and Safari is using console. Continue reading Javascript – Print an object in console
Javascript – Print an object with alert()
During web development, sometimes we may need to print the whole Javascript object for debug purpose. You can simply dump the object to the alert box by toSource(). Continue reading Javascript – Print an object with alert()
Taiwan 2011
The first time to go travel alone~ but just one day only~ haha~
Continue reading Taiwan 2011
名言三十八
The sad truth is that most evil is done by people who never make up their minds to be good or evil.
Hannah Arendt
Drupal – Get Current URL
Use the following code to get the current page URL.
global $base_url; print $base_url.request_uri();
Done =)
Reference: StackOverflow – How to get the full URL of a Drupal page
Drupal – Enable String Translation for Different Input Formats
If you get the following warning.
- The string XXX for textgroup YYY is not allowed for translation because of its input format.
Continue reading Drupal – Enable String Translation for Different Input Formats
