Saturday, May 6, 2017
ASCII and Unicode quotation marks
For ASCII, to quote a text, grave accent (0x60) serve as a left quotation mark together with apostrophe (0x27) served as the corresponding right quotation mark(as in `quote'), but https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html is not suggesting this way, as the author tells "Your text will otherwise appear rather strange with most modern fonts", so for ascii, we quote a text using ' or " pairs while we must try our best to tell a apostrophe is a start or end.
Saturday, February 25, 2017
AJAX Introduction
AJAX IS Asynchronous JavaScript And XML. AJAX is a misleading name. AJAX applications might use XML to transport data, but it is equally common to transport data as plain text or JSON text.
AJAX just uses a combination of:
- A browser built-in XMLHttpRequest object
- JavaScript(to (pre)proecess data recved) and HTML DOM (to display updated data)
see AJAX_example for detail.
AJAX example
<html>
<head>
<meta name = "keywords" content = "ajax,example"/>
<script>
function loadDoc() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("demo").innerHTML = this.responseText;
}
};
xhttp.open("GET", "AJAX.htm", true);
xhttp.send();
}</script>
</head>
<body>
<div id="demo">
<h2>Let AJAX change this text</h2>
<button type="button" onclick="loadDoc()">Change Content</button>
</div>
</body>
</html>
Sunday, October 30, 2016
UCCB
Effective July 1, 2016, the universal child care benefit (UCCB) is replaced by the Canada child benefit(CCB);
Foreign worker can get his UCCB after 18 months. for me, I get $2220 one time and $160 per month:
- $100 for [2014/10,2015/01)
- as since 2015, the UCCB increased to $160 per month, I recv $1920 for 2015
- after the one-time payment, I get $160 per month until my work permit finished.
Tuesday, September 20, 2016
KvmSwitch_issue
problem:when you put your mouse into/out of the virtual machine, it 'kicks' your KVM switch out to the other computer.
solution: get yourself to be used to not using Num-Lock, disable both on VM and hosts.
Ubuntu_XWin_OpenTerms
use ctrl + alt + t to open terminal, at better we arrange at most 4 terms on desktop.
Sunday, August 7, 2016
劝 学(节选)(一)
积土成山,风雨兴焉;积水成渊,蛟龙生焉;积善成德,而神明自得,圣心备焉。故不积跬步,无 以致千里;不积小流,无以成江海。骐骥一跃,不能十步;驽马十驾,功在不舍。锲而舍之,朽木不 折;锲而不舍,金石可镂。蚓无爪牙之利,筋骨之强,上食埃土,下饮黄泉,用心一也。蟹八跪而二螯, 非蛇蟺之穴无可寄托者,用心躁也。是故无冥冥之志者,无昭昭之明。无惛惛之事者,无赫赫之功。行 衢道者不至,事两君者不容。目不能两视而明,耳不能两听而聪。螣蛇无足而飞,鼫鼠五技而穷。 枟诗枠曰:“尸鸠在桑,其子七兮。淑人君子,其仪一兮。其仪一兮,心如结兮。故君子结于一世。”
跬步: 半步(迈右脚为一跬,再迈左脚为另一跬)。
骐骥:千里马的别称。
驽马:拙劣的马
十驾: 跑十天
锲/镂:都是雕刻的意思
蛇蟺(dan 第四声):蛇和黄鳝
耳不能两听而聪:耳朵不能同时听两个(地方的)声音
鼫(shi, 第四声)鼠五技而穷:鼫鼠会飞会游但是每一样都不精通。
尸鸠在桑,其子七兮。淑人君子,其仪一兮。其仪一兮,心如结兮。故君子结于一世: 布谷鸟在桑树上,有很多女朋友;君子只心仪一个,他的心意像打了结一样。