粵語聲韻表更新2017

Thursday, 21. September 2017

http://pcwong.org/cantonese/syllables.html 係最新版本,用了常用字及加了遺漏了的字,有圓圈的就是改用了的常用字及加了遺漏了的字。

2017 syllable table update

廣東話,廣府話,粵語聲韻表輸入法

Include script files in one script file

Friday, 15. September 2017

The power of computing is to load a program from another program. Just like booting up the computer. To load an HTML page with many scripts files can be loaded with one script file.

After a few research, I found the following techniques:

1. create this master js file:
var tobeadded = document.createElement(’script’);//start script
tobeadded.src = ‘/script1.js’;//script src
document.head.appendChild(tobeadded);//close script
tobeadded = document.createElement(’script’);// repeat until all done
tobeadded.src = ‘/script2.js’;
document.head.appendChild(tobeadded);
tobeadded = document.createElement(’script’);// repeat until all done
tobeadded.src = ‘/script3.js’;
document.head.appendChild(tobeadded);

Save this file called master.js and enter this into the HTML file:
<script type=”text/javascript” src=”/master.js”></script>

The problem is that all the scripts will be loaded asynchronously, that is, you have no control which is loaded first. When one of the script depends on the other to be loaded first, you will experience error when scripts are executed “onload”.

2. Same problem as #1. You can need to add a script file first before adding this master file because of the reason mention before:
<script type=”text/javascript” src=”/jquery.js”></script>
It is because jquery.js is needed for all scripts in the master.js
Here is a different master.js file:
function include(file){
var script = document.createElement(’script’);
script.src = file;
script.type = ‘text/javascript’;
script.defer = true;
document.getElementsByTagName(‘head’).item(0).appendChild(script);
}
/* include any js files here */
include(‘/script1.js’);
include(‘/script2.js’);
include(‘/script3.js’);
This master.js is creating a function called include to ease the repetition.

3. This is what I prefer as I can control the order of the scripts loaded. Here is the inorder master.js file:
var scriptMap =["/jquery.js","/script1.js", "/script2.js", "/script3.js"];// list of to be loaded script in an array
var order = 0;
function loadScriptInOrder(){
if(order == scriptMap.length) {
return;
}
var JSLink = scriptMap[order];
var JSElement = document.createElement(’script’);
JSElement.src = JSLink;
JSElement.onload = callback;
document.getElementsByTagName(‘head’).item(0).appendChild(JSElement);

function callback(){
order++;
loadScriptInOrder();
}
};
loadScriptInOrder();//load the script in a recursive manner

This way I will not need to load jquery.js in HTML file and then inlude the master.js file. It will be one once and for all. That’s perfect!

牛耕田,馬食穀

Friday, 28. July 2017

朋友送來廣東諺語一首,珍藏。
一首應該是幾十年前的絕妙粵諺,沒有一字粵俚,但肯定是廣東話的至高境界:

牛耕田,馬食穀,老竇賺錢仔享福。
象行田,馬行日,過河卒仔不退縮﹔
兵殺敵,將閃縮,功成身退享俸祿﹔
男善變,女易哭,貧賤夫妻難和睦﹔
流水清,死水濁,人望高處無滿足﹔
冰易化,錢難蓄,巧婦難煲無米粥﹔
水維生,土長木,光合作用葉變綠﹔
賭易學,書難讀,賭仔何曾買大屋?
命注定,運難卜,三衰六旺好難捉﹔
仙灑脫,凡人俗,犯規和尚食狗肉﹔
陽壽盡,落陰谷,生老病死乃定局。

傳統直版

羣之銘

Monday, 10. July 2017

得友送來羣之銘一文

​【羣之銘】

羣者,以情會友,以誠待友,以實交友。朋友相聚,本于缘,增于份。無遠近之分,無貴賤之别。君子相交,清淡如水,馨香若菊。不以位尊而趨附,不以位卑而疏遠。

朋友之交,習之以長。正所謂,尺有所短,寸有所長。大凡君子,見賢思齊,從善如流,求同存異。不以異見而憎,不以特性而惡。海納百川,有容乃大。君子也,同道而謀之,非同道而習之。察纳雅言,咨諏善道。君子也,非同類而同性。以水為師,效其澹泊;以竹為友,慕其虛懷。近朱者赤,近墨者黑。與君子交,如水,如竹,如谷,如菊。

今之羣也,藏龍蛟,卧虎豹,棲鳳鸞,遨鯤鵬。人才濟濟,才華耀庭。故言有雅俗,音有宫商,不為奇也。

羣之大,不過森林一葉。人之大,不過滄海一粟。故,人以謙卑為懷,方能成其大;以厚德爲基,方能載其物。​

Microsoft Multi-media All-in-one keyboard

Tuesday, 23. May 2017

Not documented information for additional functions for this wireless all in one keyboard from Microsoft:

Fn-Lock: Fn + Caps Lock (inverts the way Fn works with the F1-F12 keys)
Home: Fn + Left arrow
End: Fn + Right arrow
Page Up: Fn + Up arrow
Page Down: Fn + Down arrow
Print Screen (full screen): Fn + Windows Key + Space
Print Screen (current window) Fn + Alt + Space

+ means hit all keys at the same time