<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>Millenniumdark</title>
	<atom:link href="http://millenniumdark.blog.ubuntu.org.cn/feed/" rel="self" type="application/rss+xml" />
	<link>http://millenniumdark.blog.ubuntu.org.cn</link>
	<description>cat weakish &#62;&#62; /tmp/note.log</description>
	<pubDate>Wed, 20 May 2009 06:19:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>皈依了</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/05/20/%e7%9a%88%e4%be%9d%e4%ba%86/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/05/20/%e7%9a%88%e4%be%9d%e4%ba%86/#comments</comments>
		<pubDate>Wed, 20 May 2009 06:19:00 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/2009/05/20/%e7%9a%88%e4%be%9d%e4%ba%86/</guid>
		<description><![CDATA[笛卡爾的“cogito ergo sum”非常漂亮地解決了存在的確定性問題：如果你自己不存在，那
麼，那個懷疑自己不存在的又是誰呢？既然你懷疑自己的存在了，那你就一定存在。
不過，cogito ergo sum 雖然完美地解決了這個問題，但卻是從理性上解決的。而懷疑自己是否存在，本身就帶有非常多的非理性因素。所以，cogito ergo sum 未必能消除那種非理性的對自身存在的不確定感。要擺脫這種不確定感，恐怕只有借助宗教了。
上帝是否存在，神是否存在，這些都不重要，重要的是信不信上帝，信不信神。通過對一個不確定是否存在的存在（上帝或神）的信仰，來尋求對自身存在的確定感，這實在是太荒謬了。但是，這確實管用。其實也可以算是自己騙自己。但是怎麼樣都是過一生，自己騙自己，以求得一種實在感，又有何妨？總好過受那虛無感的折磨。
既然決定皈依了，那就該選個宗教。其實最重要的是信神，信哪個神是無關緊要的，隨便挑一個對自己胃口的就可以。我個人一直非常認同“Think different”的教義，手頭的iBook也可做一個現成的偶像（可省下買十字架、佛像之類的錢），Steve Jobs雖然有些地方討人厭，但還算是個有人格魅力的教主，所以，我選定蘋果教作為自己的信仰。
Apple與我同在。
]]></description>
			<content:encoded><![CDATA[<p>笛卡爾的“cogito ergo sum”非常漂亮地解決了存在的確定性問題：如果你自己不存在，那<br />
麼，那個懷疑自己不存在的又是誰呢？既然你懷疑自己的存在了，那你就一定存在。</p>
<p>不過，cogito ergo sum 雖然完美地解決了這個問題，但卻是從理性上解決的。而懷疑自己是否存在，本身就帶有非常多的非理性因素。所以，cogito ergo sum 未必能消除那種非理性的對自身存在的不確定感。要擺脫這種不確定感，恐怕只有借助宗教了。</p>
<p>上帝是否存在，神是否存在，這些都不重要，重要的是信不信上帝，信不信神。通過對一個不確定是否存在的存在（上帝或神）的信仰，來尋求對自身存在的確定感，這實在是太荒謬了。但是，這確實管用。其實也可以算是自己騙自己。但是怎麼樣都是過一生，自己騙自己，以求得一種實在感，又有何妨？總好過受那虛無感的折磨。</p>
<p>既然決定皈依了，那就該選個宗教。其實最重要的是信神，信哪個神是無關緊要的，隨便挑一個對自己胃口的就可以。我個人一直非常認同“Think different”的教義，手頭的iBook也可做一個現成的偶像（可省下買十字架、佛像之類的錢），Steve Jobs雖然有些地方討人厭，但還算是個有人格魅力的教主，所以，我選定蘋果教作為自己的信仰。</p>
<p>Apple與我同在。</p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/05/20/%e7%9a%88%e4%be%9d%e4%ba%86/feed/</wfw:commentRss>
		</item>
		<item>
		<title>现汉双语版三折</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/05/20/%e7%8e%b0%e6%b1%89%e5%8f%8c%e8%af%ad%e7%89%88%e4%b8%89%e6%8a%98/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/05/20/%e7%8e%b0%e6%b1%89%e5%8f%8c%e8%af%ad%e7%89%88%e4%b8%89%e6%8a%98/#comments</comments>
		<pubDate>Wed, 20 May 2009 06:08:56 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1364</guid>
		<description><![CDATA[外研社翻译的双语版商务的现代汉语词典 在卓越上三折卖了。33.30元得了（源自）丁声树、吕叔湘的现代汉语词典，还附送英文翻译，真是划算。
]]></description>
			<content:encoded><![CDATA[<p>外研社翻译的双语版商务的现代汉语词典 <a href="http://www.amazon.cn/mn/searchApp?source=weakish&amp;searchType=1&amp;keywords=%E7%8E%B0%E4%BB%A3%E6%B1%89%E8%AF%AD%E8%AF%8D%E5%85%B8">在卓越上三折卖了</a>。33.30元得了（源自）丁声树、吕叔湘的现代汉语词典，还附送英文翻译，真是划算。</p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/05/20/%e7%8e%b0%e6%b1%89%e5%8f%8c%e8%af%ad%e7%89%88%e4%b8%89%e6%8a%98/feed/</wfw:commentRss>
		</item>
		<item>
		<title>電影看後</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/04/09/%e9%9b%bb%e5%bd%b1%e7%9c%8b%e5%be%8c/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/04/09/%e9%9b%bb%e5%bd%b1%e7%9c%8b%e5%be%8c/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 04:09:19 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1361</guid>
		<description><![CDATA[三月初四，甲戌，沖龍煞北，宜祭祀，出行，忌開光，出貨財。
明知道是搶錢版，還是跑到影院去看了。五點場，總共也就六七個人。坐在前排的一個肥女大口大口吃著一個大煎餅。
看完了趕快到附近吃了頓水餃。頭突然莫名其妙地痛起來。
公交車上，一個男的在和一個女的聊天，好像不是很熟，但又認識。聊著聊著，男的問女的幾歲，女的說你不知道我幾歲啊！男的說沒人告訴過我你幾歲。女的說那你看我幾歲。男的說我看你二十多吧，你還能有幾歲。女的冷冷地說：“三十四。”
回來了頭還是痛。讀了兩卷史記，好多了，便睡了。
次日午飯時聽到一個人說：“在他拒絕你前，你先拒絕他，多有面子啊！”
]]></description>
			<content:encoded><![CDATA[<p>三月初四，甲戌，沖龍煞北，宜祭祀，出行，忌開光，出貨財。</p>
<p>明知道是搶錢版，還是跑到影院去看了。五點場，總共也就六七個人。坐在前排的一個肥女大口大口吃著一個大煎餅。</p>
<p>看完了趕快到附近吃了頓水餃。頭突然莫名其妙地痛起來。</p>
<p>公交車上，一個男的在和一個女的聊天，好像不是很熟，但又認識。聊著聊著，男的問女的幾歲，女的說你不知道我幾歲啊！男的說沒人告訴過我你幾歲。女的說那你看我幾歲。男的說我看你二十多吧，你還能有幾歲。女的冷冷地說：“三十四。”</p>
<p>回來了頭還是痛。讀了兩卷史記，好多了，便睡了。</p>
<p>次日午飯時聽到一個人說：“在他拒絕你前，你先拒絕他，多有面子啊！”</p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/04/09/%e9%9b%bb%e5%bd%b1%e7%9c%8b%e5%be%8c/feed/</wfw:commentRss>
		</item>
		<item>
		<title>python筆記</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/04/05/python%e7%ad%86%e8%a8%98/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/04/05/python%e7%ad%86%e8%a8%98/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 13:12:00 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1359</guid>
		<description><![CDATA[

語法
單引號和雙引號沒有區別。不轉義反斜槓等用r前綴。
u前綴字符串表示unicode字符串。其實只是增加幾個unicode的特有的反斜槓開頭的轉義序列。如果不想用到這些，完全可以用普通的字符串。


操作符
“/”用於整數時，給出整數商。
“^”不表示乘方。（表示bit-wise XOR）
“&#124;”和“&#38;”都表示bit-wide層面的。布爾值的要用“and”和“or”。


序列
range(1,3)=[1,2]! 猜想不包括最後一個的原因是range可以指定step count，當step count比較復雜的時候，生成的列表的最後一個數不是一目了然的。
以下情況在Python中，mylist指向shoplist。而Perl則是復制shoplist的內容。Haskell無所謂啦，反正所有的variable都是immutable的:

shoplist = ['apple', 'mango', 'carrot', 'banana']
mylist = shoplist



函數
和perl以及haskell不同，但和bash一樣，函數必須先定義才能召喚。。
reStructuredText裡有時要用到反斜槓，為了避免麻煩，最好給docstring加上r前綴。


]]></description>
			<content:encoded><![CDATA[<div class="document">
<div class="section">
<h2>語法</h2>
<p>單引號和雙引號沒有區別。不轉義反斜槓等用r前綴。</p>
<p>u前綴字符串表示unicode字符串。其實只是增加幾個unicode的特有的反斜槓開頭的轉義序列。如果不想用到這些，完全可以用普通的字符串。</p>
</div>
<div class="section">
<h2>操作符</h2>
<p>“/”用於整數時，給出整數商。</p>
<p>“^”不表示乘方。（表示bit-wise XOR）</p>
<p>“|”和“&amp;”都表示bit-wide層面的。布爾值的要用“and”和“or”。</p>
</div>
<div class="section">
<h2>序列</h2>
<p>range(1,3)=[1,2]! 猜想不包括最後一個的原因是range可以指定step count，當step count比較復雜的時候，生成的列表的最後一個數不是一目了然的。</p>
<p>以下情況在Python中，mylist指向shoplist。而Perl則是復制shoplist的內容。Haskell無所謂啦，反正所有的variable都是immutable的:</p>
<pre>
shoplist = ['apple', 'mango', 'carrot', 'banana']
mylist = shoplist
</pre>
</div>
<div class="section">
<h2>函數</h2>
<p>和perl以及haskell不同，但和bash一樣，函數必須先定義才能召喚。。</p>
<p>reStructuredText裡有時要用到反斜槓，為了避免麻煩，最好給docstring加上r前綴。</p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/04/05/python%e7%ad%86%e8%a8%98/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Windows重啟害死人</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/04/02/windows%e9%87%8d%e5%95%9f%e5%ae%b3%e6%ad%bb%e4%ba%ba/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/04/02/windows%e9%87%8d%e5%95%9f%e5%ae%b3%e6%ad%bb%e4%ba%ba/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 12:42:29 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1353</guid>
		<description><![CDATA[Windows系統已經在我的電腦上消失了三四年了，以為不會有Windows重啟的煩惱了。沒想到去交行的ATM上取錢，剛取完，卡還沒退出，居然重啟了。Windows NT 4.0 Workstation版。重啟完畢卡也沒退出。
第一次遭遇ATM吞卡撞上Windows重啟。算運氣好還是運氣差？
]]></description>
			<content:encoded><![CDATA[<p>Windows系統已經在我的電腦上消失了三四年了，以為不會有Windows重啟的煩惱了。沒想到去交行的ATM上取錢，剛取完，卡還沒退出，居然重啟了。Windows NT 4.0 Workstation版。重啟完畢卡也沒退出。</p>
<p>第一次遭遇ATM吞卡撞上Windows重啟。算運氣好還是運氣差？</p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/04/02/windows%e9%87%8d%e5%95%9f%e5%ae%b3%e6%ad%bb%e4%ba%ba/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[Haskell筆記]夭折</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/03/08/%e4%b8%ad%e5%9b%bd%e6%96%87%e5%ba%93/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/03/08/%e4%b8%ad%e5%9b%bd%e6%96%87%e5%ba%93/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 12:34:02 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1345</guid>
		<description><![CDATA[到此為止了。發現Haskell好難，於是百分之一途而廢了。
]]></description>
			<content:encoded><![CDATA[<p>到此為止了。發現Haskell好難，於是百分之一途而廢了。</p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/03/08/%e4%b8%ad%e5%9b%bd%e6%96%87%e5%ba%93/feed/</wfw:commentRss>
		</item>
		<item>
		<title>LG KP500都降到2100了哦</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/02/26/lg-kp500%e9%83%bd%e9%99%8d%e5%88%b02100%e4%ba%86/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/02/26/lg-kp500%e9%83%bd%e9%99%8d%e5%88%b02100%e4%ba%86/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 11:55:05 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1343</guid>
		<description><![CDATA[LG KP500卓越上都降到2096了哦。几年前的巧克力给我留下了LG漫天要价的坏印象。不过，这曲奇还真不错。
创新的小石头也卖到99了，几年前难以想象创新的mp3能卖到99哦。
不过，为什么原来剪头发最低10元，现在最低也要15了呢？
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.amazon.cn/mn/searchApp?source=weakish&amp;searchType=5&amp;keywords=kp500" title="LG KP500">LG KP500</a>卓越上都降到2096了哦。几年前的巧克力给我留下了LG漫天要价的坏印象。不过，这曲奇还真不错。</p>
<p><a href="http://www.amazon.cn/mn/searchApp?source=weakish&amp;searchType=21&amp;keywords=stone" title="mp3">创新的小石头</a>也卖到99了，几年前难以想象创新的mp3能卖到99哦。</p>
<p>不过，为什么原来剪头发最低10元，现在最低也要15了呢？</p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/02/26/lg-kp500%e9%83%bd%e9%99%8d%e5%88%b02100%e4%ba%86/feed/</wfw:commentRss>
		</item>
		<item>
		<title>某大姊姊的八卦</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/02/26/%e6%9f%90%e5%a4%a7%e5%a7%8a%e5%a7%8a%e7%9a%84%e5%85%ab%e5%8d%a6/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/02/26/%e6%9f%90%e5%a4%a7%e5%a7%8a%e5%a7%8a%e7%9a%84%e5%85%ab%e5%8d%a6/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 11:13:36 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/2009/02/26/%e6%9f%90%e5%a4%a7%e5%a7%8a%e5%a7%8a%e7%9a%84%e5%85%ab%e5%8d%a6/</guid>
		<description><![CDATA[今天聽同學說某大姊姊是彭林的學生，讀書通宵達旦。
這個大姊姊買書生猛我早就知道，沒想到讀書也如此生猛。
]]></description>
			<content:encoded><![CDATA[<p>今天聽同學說某大姊姊是彭林的學生，讀書通宵達旦。<br />
這個大姊姊買書生猛我早就知道，沒想到讀書也如此生猛。</p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/02/26/%e6%9f%90%e5%a4%a7%e5%a7%8a%e5%a7%8a%e7%9a%84%e5%85%ab%e5%8d%a6/feed/</wfw:commentRss>
		</item>
		<item>
		<title>bash4.0</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/02/26/bash40/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/02/26/bash40/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 11:09:02 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1340</guid>
		<description><![CDATA[最近bash 4.0發布了。支持**的glob匹配了。
]]></description>
			<content:encoded><![CDATA[<p>最近bash 4.0發布了。支持**的glob匹配了。</p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/02/26/bash40/feed/</wfw:commentRss>
		</item>
		<item>
		<title>wiki&#8211;</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/02/14/wiki-2/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/02/14/wiki-2/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 07:22:32 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1334</guid>
		<description><![CDATA[ikiwiki所有的頁面都生成靜態的html文件，在wiki中是比較另類的。
如果再進一步的話，就是不生成html了。其實本地的作管理個人筆記用的wiki，是可以這麼弄的。
vim下有很多插件可以幹這個，比如vimwiki和potwiki。
vimwiki其實不算這種，因為它自己有一套wiki標記，提供生成html的功能。potwiki纔正宗。除了WikiWord之外不提供其他的wiki標記（反正不生成html，定義標記有何用？）。每個wiki頁面是一個文本頁面，都放在一個目錄裡。
其實，用utl也是可以的，支持WikiWord。做筆記就可以了。而且支持任意文件類型，除了用plain text外，也完全可以和rst/markdown/creole/html等等配合，某些筆記要生成html發布出去也自有相應的轉換工具。如果需要管理版本，用rcs/hg/git/darcs之類的也很方便。
]]></description>
			<content:encoded><![CDATA[<p><a href="http://ikiwiki.info">ikiwiki</a>所有的頁面都生成靜態的html文件，在wiki中是比較另類的。</p>
<p>如果再進一步的話，就是不生成html了。其實本地的作管理個人筆記用的wiki，是可以這麼弄的。</p>
<p>vim下有很多插件可以幹這個，比如<a href="http://www.vim.org/scripts/script.php?script_id=2226">vimwiki</a>和<a href="http://www.vim.org/scripts/script.php?script_id=1018">potwiki</a>。</p>
<p>vimwiki其實不算這種，因為它自己有一套wiki標記，提供生成html的功能。potwiki纔正宗。除了WikiWord之外不提供其他的wiki標記（反正不生成html，定義標記有何用？）。每個wiki頁面是一個文本頁面，都放在一個目錄裡。</p>
<p>其實，用<a href="http://www.vim.org/scripts/script.php?script_id=293">utl</a>也是可以的，支持WikiWord。做筆記就可以了。而且支持任意文件類型，除了用plain text外，也完全可以和rst/markdown/creole/html等等配合，某些筆記要生成html發布出去也自有相應的轉換工具。如果需要管理版本，用rcs/hg/git/darcs之類的也很方便。</p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/02/14/wiki-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>yet another reST online render</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/02/14/yet-another-rest-online-render/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/02/14/yet-another-rest-online-render/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 17:05:48 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1331</guid>
		<description><![CDATA[基本就是比著google app engine starter guide裡面的guestbook的例子寫的。
http://weakish.appspot.com/rest.py
]]></description>
			<content:encoded><![CDATA[<p>基本就是比著google app engine starter guide裡面的guestbook的例子寫的。</p>
<p><a href="http://weakish.appspot.com/rest.py">http://weakish.appspot.com/rest.py</a></p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/02/14/yet-another-rest-online-render/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[patch]creole syntax highlight for vim</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/02/14/patchcreole-syntax-highlight-for-vim/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/02/14/patchcreole-syntax-highlight-for-vim/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 16:28:01 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1329</guid>
		<description><![CDATA[creole.vim is a vim syntax file for the creole wiki markup standard. 
creole.vim 0.1  	2007-05-31
Below is my patch with these features:

Added highlight support for standalone url
Added highlight support for escape charachter
better handling for nonwiki block


--- a/creole.vim        Sat Jan 17 22:43:39 2009 +0800
+++ b/creole.vim     [...]]]></description>
			<content:encoded><![CDATA[<p>creole.vim is a vim syntax file for the <a href="http://www.wikicreole.org">creole</a> wiki markup standard. </p>
<p>creole.vim <a href="http://www.vim.org/scripts/script.php?script_id=1909">0.1  	2007-05-31</a></p>
<p>Below is my patch with these features:</p>
<ul>
<li>Added highlight support for standalone url</li>
<li>Added highlight support for escape charachter</li>
<li>better handling for nonwiki block</li>
</ul>
<pre>
--- a/creole.vim        Sat Jan 17 22:43:39 2009 +0800
+++ b/creole.vim        Tue Jan 20 14:25:48 2009 +0800
@@ -41,11 +41,14 @@
   command! -nargs=+ WikiHiLink hi def link
 endif

+syn match wikiAutoLink "\(http\|https\|ftp\|afs\|news\|nntp\|mid\|cid\|mailto\|wais\|prospero\|telnet\|gopher\|irc\|feed\):[-a-zA-Z0-9/@=+$_~*.,;:?!\'"()&amp;#%]\+[-a-zA-Z0-9/@=+$_~*]"
+syn match wikiEscape "\~\S"
 syn match   wikiLine        "^----$"
 "TODO add different markup for [[link|name]] type of links
 syn region  wikiLink        start=+\[\[+hs=s+2 end=+\]\]+he=e-2
 syn match   wikiList        "^[*#]* "
-syn region  wikiCurly       start="{\{3\}" end="}\{3\}"
+syn match  wikiInlineCurly start="{{{" end="}}}"
+syn region  wikiBlockCurly       start="^{{{$" end="^}}}$"
 syn region  wikiHead        start="^=" end="$"
 "syn region  wikiSubhead     start="^== " end="$"
 "TODO add syntax for tables
@@ -61,27 +64,29 @@
 "syn region wikiBoldItalic   contained start=+\([^']\|^\)''[^']+ end=+[^']''\([^']\|$\)+
 "syn region wikiItalicBold   contained start=+'''+ end=+'''+

+
 " The default highlighting.
 if version &gt;= 508 || !exists("did_wiki_syn_inits")
   if version &lt; 508
     let did_wiki_syn_inits = 1
   endif

-WikiHiLink wikiCurly       Type
+WikiHiLink wikiInlineCurly       Type
+WikiHiLink wikiBlockCurly       Type
 WikiHiLink wikiHead        Statement
 "  WikiHiLink wikiSubhead     PreProc
 WikiHiLink wikiList        String
 WikiHiLink wikiExtLink     Identifier
 WikiHiLink wikiLink        Identifier
 WikiHiLink wikiLine        PreProc
-
+WikiHiLink wikiEscape Comment
+WikiHiLink wikiAutoLink Identifier
 hi def     wikiBold        term=bold cterm=bold gui=bold
  " hi def     wikiBoldItalic  term=bold,italic cterm=bold,italic gui=bold,italic
 hi def     wikiItalic      term=italic cterm=italic gui=italic
  " hi def     wikiItalicBold  term=bold,italic cterm=bold,italic gui=bold,italic
 hi def  wikiUnderline   term=underline cterm=underline gui=underline
 "hi def wikiStrike ???
-
 endif

 delcommand WikiHiLink
</pre>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/02/14/patchcreole-syntax-highlight-for-vim/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Configure Evolution for Gmail IMAP</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/configure-evolution-for-gmail-imap/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/configure-evolution-for-gmail-imap/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 10:08:20 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1320</guid>
		<description><![CDATA[Currently, there is no configuration guide for using Gmail&#8217;s IMAP under Evolution in Gmail&#8217;s help page. However, this doesn&#8217;t mean that Evolution cannot use Gmail&#8217;s IMAP service. This step-by-step guide is aiming at users who are not familiar with Evolution or Gmail&#8217;s IMAP settings. It&#8217;s easy for experienced users to figure out how to configure [...]]]></description>
			<content:encoded><![CDATA[<p>Currently, there is no configuration guide for using Gmail&#8217;s IMAP under Evolution in Gmail&#8217;s help page. However, this doesn&#8217;t mean that Evolution cannot use Gmail&#8217;s IMAP service. This step-by-step guide is aiming at users who are not familiar with Evolution or Gmail&#8217;s IMAP settings. It&#8217;s easy for experienced users to figure out how to configure Evolution to use Gmail&#8217;s IMAP by Gmail&#8217;s official help pages for other mail clients. For those users, this guide may still save them some time.</p>
<p>First, you should enable IMAP in Gmail&#8217;s setting.</p>
<p><img src="http://weakish.appspot.com/img/evolution/gmail-imap.png" alt="Go to Gmail's setting. In the Forwarding and POP/IMAP tab, go down to the IMAP access section, and select 'Enable IMAP'. " /></p>
<p>Then you should open Evolution&#8217;s preferences window.</p>
<p><img src="http://weakish.appspot.com/img/evolution/Evolution-pref.png" alt="Open Evolution, and go to the menu Edit, then the sub menu Preferences." /></p>
<p>We need to add a new account.</p>
<p><img src="http://weakish.appspot.com/img/evolution/Screenshot-Evolution-add.png" alt="In the Evolution preferences window, click the Add button." /></p>
<p>A wizard will appear.</p>
<p><img src="http://weakish.appspot.com/img/evolution/Screenshot-Evolution-welcome.png" alt="In the welcome window of the wizard, click the forward button." /></p>
<p>Type in your name and email address.</p>
<p><img src="http://weakish.appspot.com/img/evolution/Screenshot-Evolution-identity.png" alt="Fill the Full name and Email address fields, and select 'Make this my default account'. Click the forward button." /></p>
<p>Then fill in Gmail&#8217;s IMAP server&#8217;s information. Note that there is not a port field in Evolution. You should specify the server port use this form <code>imap.gmail.com:993</code>. Also, username should be your <em>full gmail address</em>. And for security, you should use SSL connection.</p>
<p><img src="http://weakish.appspot.com/img/evolution/Screenshot-Evolution-receiving.png" alt="993 and yourname@gmail.com. Select SSL encryption in Security and Password in Authentication Type. Select 'Remember password'. Click the forward button." /></p>
<p>Next, we&#8217;ll set some receiving options. Typically you can check first two items. And I recommend that you leave other items unselected.</p>
<p><img src="http://weakish.appspot.com/img/evolution/Screenshot-Evolution-receiving-options.png" alt="Select 'Automatically check for new mails' and 'Check for new messages in all folds'. And leave other options unselected. Click the forward button." /></p>
<p>Now we&#8217;ve finished the IMAP settings, we&#8217;ll configure sending settings. We&#8217;ll use the smtp.gmail.com:587 server via TLS. Again, you should note that the username is your <em>full gmail address</em>.</p>
<p><img src="http://weakish.appspot.com/img/evolution/Screenshot-Evolution-sending.png" alt="587 in the server field. Select 'Server requires authentication'. Select 'TLS encryption' in Security and choose 'Login' in Authentication Type. Fill 'yourname@gmail.com' as Username. Select 'Remember password'. Click the forward button." /></p>
<p>We&#8217;re almost finished. Just pick a name for your account, for example, gmail.</p>
<p><img src="http://weakish.appspot.com/img/evolution/Screenshot-Evolution-Account-Management.png" alt="Fill in 'gmail' in the Name field. Click the forward button." /></p>
<p><img src="http://weakish.appspot.com/img/evolution/Screenshot-Evolution-Done.png" alt="A done dialog box will pop out." /></p>
<p>Congratulations! Just click the apply button to save all.</p>
<p>Now you&#8217;ve set up all. You can receive your gmails via IMAP now. Try it. (A window will pop up asking for your password. Fill in your Gamil password.)</p>
<p>There is still something left, which are not must-haves. However, I recommend you to read on. </p>
<p>Again, open Evolution&#8217;s preferences window.</p>
<p><img src="http://weakish.appspot.com/img/evolution/Evolution-pref.png" alt="Open Evolution, and go to the menu Edit, then the sub menu Preferences." /></p>
<p>Highlight the account we&#8217;ve created and edit it.</p>
<p><img src="http://weakish.appspot.com/img/evolution/Evolution-edit.png" alt="Click the 'Edit' button." /></p>
<p>We need to configure the draft and sent folder in the Defaults tab.</p>
<p><img src="http://weakish.appspot.com/img/evolution/Screenshot-Defaults.png" alt="Click the Defaults tab in the Account Editor window." /></p>
<p><img src="http://weakish.appspot.com/img/evolution/Screenshot-Drafts.png" alt="Click the 'Draft folder', in the pop up window, open 'gmail', then '[Gmail]', and select 'Drafts'." /></p>
<p>Note the location of Draft folder. It&#8217;s inside [Gmail], which itself is inside &#8220;gmail&#8221;. We do this configuration to save our drafts in Gmail&#8217;s server.</p>
<p><img src="http://weakish.appspot.com/img/evolution/Screenshot-Sent.png" alt="Click the 'Sent folder', in the pop up window, select 'sent' in 'On This Computer'." /></p>
<p>You can make other choices here. But <em>don&#8217;t save it inside Gmail&#8217;s sent folder</em>, as this will be done by Gmail itself whenever you use Gmail&#8217;s smtp.</p>
<p>Finally it&#8217;s the Gnu PGP settings (if you use PGP keys).</p>
<p><img src="http://weakish.appspot.com/img/evolution/Screenshot-Account-security.png" alt="Go to the 'Security' tab in Account Edit window." /></p>
<p>Click &#8220;OK&#8221; button, and enjoy Evolution with Gmail!</p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/configure-evolution-for-gmail-imap/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A basic guide to XHTML</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/a-basic-guide-to-xhtml/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/a-basic-guide-to-xhtml/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 08:52:39 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1315</guid>
		<description><![CDATA[This is a basic guide to XHTML for newbie and by newbie.
I will introduce some basic knowledge about XHTML 1.1, which is the latest W3C recommendation for producing general web pages. (95% of the content here applies to XHTML 1.0 standards, too.) This guide is focused on conforming to W3C&#8217;s standards. And we won&#8217;t go [...]]]></description>
			<content:encoded><![CDATA[<p>This is a basic guide to XHTML for newbie and by newbie.</p>
<p>I will introduce some basic knowledge about XHTML 1.1, which is the latest W3C recommendation for producing general web pages. (95% of the content here applies to XHTML 1.0 standards, too.) This guide is focused on conforming to W3C&#8217;s standards. And we won&#8217;t go too deep, just a basic introduction. It&#8217;s a long article though I try my best to make it easy to understand. I will also try to not only tell you what is the correct mark up, but also which usage of XHTML is better for user experience. </p>
<p>Reading this guide doesn&#8217;t require knowledge on HTML. (When I learned XHTML, I found that almost all guides assume that you know something about HTML. So I have to learn HTML first to learn XHTML.) However, some basic knowledge of XML is required. (Don&#8217;t worry if you never heard of XML. Just read my another blog post, (very short) <a href="http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/xml-basic-concepts/">XML basic concepts</a>.</p>
<h3>A simple example</h3>
<p>Let&#8217;s take a look at a very simple webpage:</p>
<pre><span class="kwa">&lt;?xml version=</span><span class="str">"1.0"</span><span class="kwa"> encoding=</span><span class="str">"UTF-8"</span><span class="kwa">?&gt;</span>
<span class="kwa">&lt;!DOCTYPE html PUBLIC</span> <span class="str">"-//W3C//DTD XHTML 1.1//EN"</span><span> <span class="str">"xhtml11.dtd"</span><span class="kwa">&gt;</span>

       <span class="kwa">&lt;html xmlns=</span><span class="str">"http://www.w3.org/1999/xhtml"</span><span>
             xml:lang=<span class="str">"en"</span>&gt;<span class="kwa">&lt;head&gt;</span>
    <span class="kwa">&lt;title&gt;</span>SandBox<span class="kwa">&lt;/title&gt;</span>
    <span class="kwa">&lt;meta http-equiv=</span><span class="str">"Content-Type"</span><span>

          content=<span class="str">"application/xhtml+xml; charset=utf-8"</span> /&gt;

  <span class="kwa">&lt;/head&gt;</span>
  <span class="kwa">&lt;body&gt;</span>

    <span class="kwa">&lt;h1&gt;</span>SandBox<span class="kwa">&lt;/h1&gt;</span>

    <span class="com">&lt;!-- this is a comment --&gt;</span>
<span class="kwa">&lt;p&gt;</span>This is the sandbox.<span class="kwa">&lt;/p&gt;</span>

  <span class="kwa">&lt;/body&gt;</span>

<span class="kwa">&lt;/html&gt;</span>
</pre>
<p>Take a galance at it to have a basic feel of XHTML. We will analysis this example in the following part.</p>
<h3>XML declaration</h3>
<pre><span class="kwa">&lt;?xml version=</span><span class="str">"1.0"</span><span class="kwa"> encoding=</span><span class="str">"UTF-8"</span><span class="kwa">?&gt;</span>
</pre>
<p>This is the XML declaration. The version of XML is 1.0, and the encoding is in UTF-8.</p>
<p>If your document uses XML 1.0 and an encoding of either UTF-8 or UTF-16, the XML Declaration is not required. But it is never wrong to include it.</p>
<h3>Document type declaration</h3>
<pre><span class="kwa">&lt;!DOCTYPE html PUBLIC</span> <span class="str">"-//W3C//DTD XHTML 1.1//EN"</span><span> <span class="str">"xhtml11.dtd"</span><span class="kwa">&gt;</span></pre>
<p>This is a Document type declaration. XML documents don&#8217;t require a DTD and if you are using RELAX NG, often they will not include one. Historically, XHML 1.1 pages have almost always had one.</p>
<p>The document type declaration identifies the DTD that will be used by the document and what the root element of the document will be.</p>
<p>This declaration indicates that the root element will be html.</p>
<h3>The root  element</h3>
<pre> <span class="kwa">&lt;html xmlns=</span><span class="str">"http://www.w3.org/1999/xhtml"</span><span>

             xml:lang=<span class="str">"en"</span>&gt;</pre>
<p>All XML documents must have exactly one root element. Although comments and processing instructions may occur between the document type declaration and the root element, the root element usually immediately follows the document type declaration.</p>
<p>The xmlns attribute specifies the XML namespace, while the xml:lang specifies the language. The xml:lang attribute is required on this element. Refer to ISO 692 to see the codes for the representation of names of languages.</p>
<h3>The head element</h3>
<pre><span class="kwa">&lt;head&gt;</span>

<span class="com">&lt;!-- Some content omitted here. --&gt;</span>

<span class="kwa">&lt;/head&gt;</span>
</pre>
<p>The head element is for meta information. It must contain exactly one title element and zero or more optional elements including meta.</p>
<h3>The title element</h3>
<pre><span class="kwa">&lt;title&gt;</span>SandBox<span class="kwa">&lt;/title&gt;</span></pre>
<p>The title element usually will be displayed on the titlebar of the browser and in the bookmarks if the webpage has been bookmarked. Your page should have a proper title.</p>
<p>Your title should be coherent to the first level heading in your page. Otherwise, they may cause users&#8217; confusion.</p>
<p>Think of where your title will appear to avoid useless title. For example, &#8220;My Homepage&#8221; is a bad title. In the bookmarks, this title is meaningless.</p>
<p>I suggest the form:</p>
<pre>

PageFirstLevelHeading - YourSiteName
</pre>
<p>So if the user jump to one of your pages through an external link or from a search engine, they will recognize where they are easily.</p>
<p>Alternately, you can use the following form:</p>
<pre>
YourSiteName - PageFirstLevelHeading
</pre>
<p>I don&#8217;t prefer this because sometimes this is inconvenient for users who open several pages of your site in a tabbed browser</p>
<p>(Just for fun.) I read about recently that ancient Chinese books put the book title after the chapter title. </p>
<h3>The meta element</h3>
<pre>
    <span class="kwa">&lt;meta http-equiv=</span><span class="str">"Content-Type"</span><span>
          content=<span class="str">"application/xhtml+xml; charset=utf-8"</span> /&gt;
</pre>
<p>This element provides some meta information of the webpage. The meta element has the general form</p>
<pre>
&lt;meta name="some_name" content="some_text"/&gt;
</pre>
<p>and values for some_name and some_text can be arbitrary.</p>
<p>In the above example, the first line gives the MIME type of the page. If your are curious, the http-equiv meta tag provides an equivalent HTTP response header for the page. </p>
<h3>The body element</h3>
<pre> <span class="kwa">&lt;body&gt;</span>
<span class="com">&lt;!-- Some content omitted here. --&gt;</span>
<span class="kwa">&lt;/body&gt;</span>
</pre>
<p>body is the container of the webpage&#8217;s content.</p>
<h3>The h1 element</h3>
<pre>
<span class="kwa">&lt;h1&gt;</span>SandBox<span class="kwa">&lt;/h1&gt;</span>
</pre>
<p>The first level heading of the webpage. In a book or an article, we usually call first level heading as &#8220;title&#8221;.</p>
<p>As mentioned before, this element will be generated automatically by Muse according to the title derivative.</p>
<h3>The p element</h3>
<pre>
<span class="kwa">&lt;p&gt;</span>This is the sandbox.<span class="kwa">&lt;/p&gt;</span>
</pre>
<p>p is short for paragraph.</p>
<h3>Comments</h3>
<pre><span class="com">&lt;!-- this a comment. --&gt;</span></pre>
<p>Comments won&#8217;t be displayed in browser, but are visible if the user view the XHTML source file.</p>
<p>As you have seen, comments are enclosed in &#8220;&lt;!—&#8221; and &#8220;—&gt;&#8221;.</p>
<p>OK, we have finished the analytic of this simple sample. Now, let&#8217;s start to learn more elements. The secret is that you should not only read, but also write them and see what turns out. Keep practising.</p>
<h3>Paragraphs</h3>
<p>The most important and common element for paragraphs is the p element, which we have discussed before. But there are also other markup for paragraphs.</p>
<h3>Address</h3>
<p>The address element is provided to supply contact information for a document.</p>
<p>For example,</p>
<pre>
&lt;literal&gt;
&lt;address&gt;Mail Weakish Jiang at weakish@gmail.com&lt;/address&gt;
&lt;/literal&gt;
</pre>
<h3>The blockquote element</h3>
<p>This element designates a block of quoted text.</p>
<p>An excerpt from &#8216;The Two Towers&#8217;, by J.R.R. Tolkien, as a blockquote.</p>
<pre>
&lt;blockquote cite="http://www.example.com/tolkien/twotowers.html"&gt;
&lt;p&gt;They went in single file, running like hounds on a strong scent,
and an eager light was in their eyes. Nearly due west the broad
swath of the marching Orcs tramped its ugly slot; the sweet grass
of Rohan had been bruised and blackened as they passed.&lt;/p&gt;
&lt;/blockquote&gt;
</pre>
<h3>The pre element</h3>
<p>The pre element indicates that whitespace in the enclosed text has semantic relevance.</p>
<p>Note that <em>all</em> elements in the XHTML family preserve their whitespace in the document, which is only removed on rendering, via a style sheet, according to the rules of CSS.</p>
<p>A bad poem where whitespace matters:</p>
<pre>&lt;pre&gt;
                If
              I   had
           any      talent
              I   would
               be a

               poet

&lt;/pre&gt;</pre>
<p>Here is how this might be rendered:</p>
<pre>

                If
              I   had
           any      talent
              I   would
               be a

               poet
</pre>
<h3>Headings</h3>
<p>A heading element briefly describes the topic of the section it introduces. In XHTML 1.1, there are six levels of numbered headings in XHTML with h1 as the most important and h6 as the least.</p>
<p>Note that in XHTML 1.1, there is not any elements such as chapter, section, etc. (There is a section element in XHTML 2.0 though.) So headings are the only way to distinguish your sections in the webpage.</p>
<h3>Text</h3>
<p>Let&#8217;s take a look at something about text formatting.</p>
<h3>Abbreviation</h3>
<p>The abbr element indicates that a text fragment is an abbreviation.</p>
<p>The content of the abbr element specifies the abbreviated expression itself, as it would normally appear in running text. The title attribute may be used to provide the full or expanded form of the expression. Such an attribute should be repeated each time the abbreviation is defined in the document.</p>
<p>Examples</p>
<pre>&lt;abbr title="Abbreviation"&gt;abbr.&lt;/abbr&gt;</pre>
<p>The output looks like this: <abbr title="Abbreviation">abbr</abbr>.</p>
<p>In my opinion, usually you don&#8217;t have to define an abbreviation. You only need to define an abbreviation when you think this abbreviation may be unfamiliar with your users or/and appears in the first time. For example, defining U.S. as United States is not necessary in most cases.</p>
<p>In fact, I can hardly imagine any situation when any abbreviation should be defined in a abbr element. If you do need to do so, I suggest you use the abbrev-mode in Emacs. Otherwise, it will be rather frustrating.</p>
<p>Besides, it doesn&#8217;t mean that you don&#8217;t need to have write out the full name in text in any condition. If you are sure users are not familiar with the abbreviation (especially in the first time), you should write the full name out explicitly as in the following example:</p>
<pre>mdark is the short form of MillenniumDark.</pre>
<p>In most cases, if you use the abbr element instead, users have to, say, point the mouse over the word &#8220;mdark&#8221; to see a tooltip showing &#8220;MillenniumDark&#8221;. This is inconvenient. And remember that users tend to scan the web pages, so they may ignore the meaning of &#8220;mdark&#8221; at all.</p>
<p>Besides, since you have written it out explicitly, you don&#8217;t need to use the abbr element.</p>
<p>However, if MillenniumDark mentioned mdark in hir own blog, things are different. It&#8217;s reasonable for MillenniumDark to think that frequent visitors may have already been familiar with hir short nickname, not saying that the full name of mdark has been specified in the introduction area of the web log. Thus, s/he just wrote <code>&lt;abbr title="MillenniumDark"&gt;mdark&lt;/abbr&gt;</code> in case new visitors may not know this.</p>
<h3>Citation</h3>
<p>The cite element contains a citation or a reference to other sources.</p>
<p>Examples,</p>
<pre>
  As Gandalf the White said in
&lt;cite&gt;The Two Towers&lt;/cite&gt;,

&lt;q&gt;The hospitality of
your hall is somewhat lessened of late, Theoden King.&lt;/q&gt;

More information can be found in
&lt;cite&gt;Muse's manual&lt;/cite&gt;.
</pre>
<p>The q element means quotation, which we will discuss later.</p>
<h3>Code</h3>
<p>The code element contains a fragment of computer code.</p>
<pre>
The Pascal statement &lt;code&gt;i := 1;&lt;/code&gt; assigns the
literal value one to the variable &lt;var&gt;i&lt;/var&gt;.
</pre>
<p>There are another similar elements in XHTML 1.1: kbd (indicates input to be entered by the user) and samp (designates sample output from programs, scripts, etc). I think in most cases, you can use code instead of them.</p>
<h3>The dfn element</h3>
<p>This element element contains the defining instance of the enclosed term.</p>
<pre>
  &lt;p&gt;
    An &lt;dfn&gt;acronym&lt;/dfn&gt; is a word
    formed from the initial letters or groups of letters of words in a
    set phrase or series of words.

&lt;/p&gt;
</pre>
<h3>Emphasis and Strong</h3>
<p>The em element indicates emphasis for its contents.</p>
<p>The strong element indicates higher importance for its contents than that of the surrounding content.</p>
<pre>
On <strong>Monday</strong> please put the rubbish out,
but <em>not</em> before nightfall!
</pre>
<p>A lot of people think that strong is stronger than em, but this may be wrong. Read the explanation again and think about the above example.</p>
<h3>The q element</h3>
<p>This element designates an inline text fragment of quoted text. This element can be nested.</p>
<p>Usually browsers will add delimiting quotation marks. But W3C thinks visual user agents must not by default add delimiting quotation marks. It is the responsibility of the document author to add any required quotation marks, either directly in the text, or via a style sheet.</p>
<h3>Subscript and Super-script</h3>
<p>The sub element indicates that its contents should regarded as a subscript.</p>
<p>The sup element indicates that its contents should be regarded as a super-script.</p>
<p>Examples:</p>
<pre>
H&lt;sub &gt;2&lt;/sub&gt;O
E = mc&lt;sup&gt;2&lt;/sup&gt;
</pre>
<p>The above examples look like this: H<sub>2</sub>O and E = mc<sup>2</sup></p>
<h3>The var element</h3>
<p>The var element indicates an instance of a variable or program argument. </p>
<h3>Hypertext</h3>
<p>An a element defines an anchor.</p>
<p>Example:</p>
<pre>
&lt;a href="http://www.w3.org/"&gt;The W3C Home Page&lt;/a&gt;
</pre>
<p>The href attribute specifies a URI that is actuated when the element is activated.</p>
<p>You can nested the a element, like this:</p>
<pre>
&lt;a href="http://www.w3.org/"&gt;The W3C &lt;a href="http://www.debian.org&gt;Home Page&lt;/a&gt;&lt;/a&gt;
</pre>
<p>However, Iceweasel 2.0.0.3 doesn&#8217;t provide a mechanism for actuating the &#8220;inside&#8221; url (<a href="http://www.debian.org">http://www.debian.org</a>).</p>
<p>Some examples of URI:</p>
<ul>
<li>http://www.debian.org</li>
<li>mlogo.jpg</li>
<li>../mlogo.jpg</li>
<li>/www/img/mlogo.jpg</li>
<li>http://weakish.googlepages.com/default.xhtml#feedback</li>
</ul>
<p>The 1st example is a URL. The 2nd to 4th examples are paths to local files. The last example is a bit triky. We will discuss it later.</p>
<h3>Some attributes with the <strong>a</strong> element</h3>
<dl>
<dt>charset</dt>
<dd>
<p>This attribute specifies the charset of the linked sources.</p>
</dd>
<dt>hreflang</dt>
<dd>This attribute specifies the primary language of the resource designated by href.</dd>
<dt>accesskey</dt>
<dd>
<p>This attribute assigns a key mapping to an access shortcut. An access key is a single character from the document character set. The invocation of access keys depends on the implementation. For instance, on some systems one may have to press the &#8220;alt&#8221; key in addition to the access key. On other systems, one generally has to press the &#8220;cmd&#8221; key in addition to the access key.</p>
<p>I almost never use this attribute. It&#8217;s already hard for me to deal with the key-bindings&#8217; conflict between the window manager and the browser. The situation will be more complicated if shortcuts defined by webpages have been involved.</p>
</dd>
</dl>
<h3>Lists</h3>
<p>XHTML offers authors several mechanisms for specifying lists of information. Lists may contain:</p>
<ul>
<li>Unordered information.</li>
<li>Ordered information.</li>
<li>Definitions.</li>
<li>Navigation information.</li>
</ul>
<h3>Unordered list</h3>
<p>The previous list, for example, is an unordered list, created with the ul element:</p>
<pre>
&lt;ul&gt;
&lt;li&gt;Unordered information. &lt;/li&gt;

&lt;li&gt;Ordered information. &lt;/li&gt;
&lt;li&gt;Definitions. &lt;/li&gt;
&lt;li&gt;Navigation information. &lt;/li&gt;

&lt;/ul&gt;
</pre>
<p>The unordered list is enclosed in the ul element, and every list item in the li element.</p>
<h3>Ordered list</h3>
<p>An ordered list, created using the ol element, contains information where order is important, as in a recipe:</p>
<ol>
<li>Mix dry ingredients thoroughly.</li>
<li>Pour in wet ingredients.</li>
<li>Mix for 10 minutes.</li>
<li>Bake for one hour at 300 degrees.</li>
</ol>
<pre>
  &lt;ol&gt;
&lt;li&gt;Mix dry ingredients thoroughly.&lt;/li&gt;
&lt;li&gt;Pour in wet ingredients.&lt;/li&gt;

&lt;li&gt;Mix for 10 minutes.&lt;/li&gt;
&lt;li&gt;Bake for one hour at 300 degrees.&lt;/li&gt;
&lt;/ol&gt;
</pre>
<p>Note you dont&#8217;t need to type the number in text directly, browsers will calculate and add them for you.</p>
<h3>Definition lists</h3>
<p>Definition lists, created using the dl element, generally consist of a series of term/definition pairs (although definition lists may have other applications).</p>
<dl>
<dt><strong>Lower cost</strong></dt>
<dd>
The new version of this product costs significantly less than the previous one!</dd>
<dt><strong>Easier to use</strong></dt>
<dd>
We&#8217;ve changed the product so that it&#8217;s much easier to use!</dd>
<dt><strong>Safe for kids</strong></dt>
<dd>
You can leave your kids alone in a room with this product and they won&#8217;t get hurt (not a guarantee).</dd>
</dl>
<p>defined in XHTML as:</p>
<pre>
&lt;dl&gt;
&lt;dt&gt;Lower cost&lt;/dt&gt;
&lt;dd&gt;The new version of this product costs significantly less than the
previous one!&lt;/dd&gt;

&lt;dt&gt;Easier to use&lt;/dt&gt;

&lt;dd&gt;We've changed the product so that it's much easier to
use!&lt;/dd&gt;
&lt;dt&gt;Safe for kids&lt;/dt&gt;
&lt;dd&gt;You can leave your kids alone in a room with this product and
they won't get hurt (not a guarantee).&lt;/dd&gt;

&lt;/dl&gt;
</pre>
<p>Here is an example with multiple terms and descriptions:</p>
<pre>
&lt;dl&gt;
   &lt;dt&gt;Center&lt;/dt&gt;
   &lt;dt&gt;Centre&lt;/dt&gt;

   &lt;dd&gt; A point equidistant from all points
              on the surface of a sphere.&lt;/dd&gt;

   &lt;dd&gt; In some field sports, the player who
              holds the middle position on the field, court,
              or forward line.&lt;/dd&gt;
&lt;/dl&gt;
</pre>
<h3>Navigation list</h3>
<p>Lists can be used for navigation. Sometimes this will involve CSS. We won&#8217;t talk more about it in this basic guide.</p>
<h3>Tables</h3>
<p>Tables is a bit complex. I will try to explain it in a way that is easy to understand.</p>
<h3>An extremely simple table</h3>
<table>
<tbody>
<tr>
<td>1</td>
<td>one</td>
</tr>
<tr>
<td>2</td>
<td>two</td>
</tr>
<tr>
<td>3</td>
<td>three</td>
</tr>
</tbody>
</table>
<p>The XHTML source looks like this:</p>
<pre>
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;

&lt;td&gt;one&lt;/td&gt;

&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;two&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;

&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;three&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
</pre>
<p>The table element contains all other elements for a table. Inside the table element is a tbody element, which indicates the body of the table. And tr indicates a row of the table, while td defines a cell that contains data.</p>
<h3>Table head and foot</h3>
<p>Table rows may be grouped into a table head, table foot, and one or more table body sections, using the thead, tfoot and tbody elements, respectively. This division enables user agents to support scrolling of table bodies independently of the table head and foot. When long tables are printed, the table head and foot information may be repeated on each page that contains table data.</p>
<p>Example:</p>
<pre>
&lt;table&gt;
&lt;thead&gt;

&lt;tr&gt;

&lt;th&gt;header1&lt;/th&gt;
&lt;th&gt;header2&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tfoot&gt;
&lt;tr&gt;

&lt;td&gt;foot1&lt;/td&gt;
&lt;td&gt;foot2&lt;/td&gt;
&lt;/tr&gt;
&lt;/tfoot&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;data1&lt;/td&gt;

&lt;td&gt;data2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;data3&lt;/td&gt;
&lt;td&gt;data4&lt;/td&gt;

&lt;/tr&gt;

&lt;/tbody&gt;
&lt;/table&gt;
</pre>
<p>As you have seen, tfoot appears (in fact, it must appear) before tbody within a table definition so that user agents can render the foot before receiving all of the (potentially numerous) rows of data. In Muse you can use any order for these sections that you like, and Muse will re-order them for you at publish-time.</p>
<p>The th element defines a cell that contains header information. Besides appearing inside thead, it may also appear in tbody or tfoot. Let&#8217;s look at an example.</p>
<table>
<caption>my activity on weekend</caption>
<thead>
<tr>
<th> </th>
<th>Friday</th>
<th>Saturday</th>
<th>Sunday</th>
</tr>
</thead>
<tbody>
<tr>
<th>a.m.</th>
<td>sleep</td>
<td>sleep</td>
<td>sleep</td>
</tr>
<tr>
<th>p.m.</th>
<td>sleep</td>
<td>sleep</td>
<td>sleep</td>
</tr>
</tbody>
</table>
<p>And the source is:</p>
<pre>
&lt;table&gt;
&lt;caption&gt;my activity on weekend&lt;caption&gt;
&lt;thead&gt;

&lt;tr&gt;&lt;th&gt; &lt;/th&gt;&lt;th&gt;Friday&lt;/th&gt;&lt;th&gt;Saturday&lt;/th&gt;&lt;th&gt;Sunday&lt;/th&gt;&lt;/tr&gt;

&lt;/thead&gt;

&lt;tbody&gt;
&lt;tr&gt;&lt;th&gt;a.m.&lt;/th&gt;&lt;td&gt;sleep&lt;/td&gt;&lt;td&gt;sleep&lt;/td&gt;&lt;td&gt;sleep&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt;&lt;th&gt;p.m.&lt;/th&gt;&lt;td&gt;sleep&lt;/td&gt;&lt;td&gt;sleep&lt;/td&gt;&lt;td&gt;sleep&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;

&lt;/table&gt;
</pre>
<p>Besides, you see, a cell (defined by th or td) may be empty.</p>
<p>What&#8217;s more, you may have noticed the caption element which describe the nature of the table.</p>
<p>You may also use the summary attribute of the table element to specifies the table&#8217;s purpose and structure for user agents rendering to non-visual media such as speech and Braille.</p>
<h3>Ruby annotation</h3>
<p>&#8220;Ruby&#8221; are short runs of text alongside the base text, typically used in East Asian documents to indicate pronunciation or to provide a short annotation.  XHTML 1.1 supports ruby annotation. (XHTML 1.0 not.)For more information, please see  <a href="http://www.w3.org/TR/2001/REC-ruby-20010531">http://www.w3.org/TR/2001/REC-ruby-20010531</a>.</p>
<h3>Images, audio, video, etc.</h3>
<p>Most user agents have built-in mechanisms for processing common data types such as text, and various image types. In some instances the user agent may pass the processing to an external application.</p>
<p>In the most general case, an author should specify three types of information:</p>
<ol>
<li>The location of the object data (the data attribute).</li>
<li>The media type associated with the object data (the type attribute).</li>
<li>Additional values required for the appropriate processing of the object data by the object handler at run-time (via the param element).</li>
</ol>
<p>The object element allows authors to specify all three types of information, but authors may not have to specify all three at once. For example, some object element instances may not require src (e.g., a self-contained applet that performs a small animation). Others may not require media type information, i.e., the user agent itself may already know how to process that type of data. Still others may not require run-time initialization.</p>
<p>This is an example about displaying a picture:</p>
<pre>
&lt;object data="http://weakish.int.eu.org/logo/mlogo.jpg" type="image/jpeg" /&gt;
</pre>
<p>If you omit the type attribution, the result displayed will probably be the same (in the above example), since you already specified the file type by the extension of the file name.</p>
<p>You can tune up the size of the image by using the height and width attributes.</p>
<pre>
&lt;object data="http://weakish.int.eu.org/logo/mlogo.jpg" type="image/jpeg" height="40" width="40" /&gt;
</pre>
<p>Note: you can gain a similar result by using the img element, like this:</p>
<pre>
&lt;img src="http://weakish.int.eu.org/logo/mlogo.jpg" height="40" width="40" /&gt;
</pre>
<p>But why bother since object can do this quite well. And img can only handle image files, but object can handle images, audio, video, etc. What&#8217;s more, because of this, img will probably be deprecated in XHTML 2.0.</p>
<p>The magic of object element is that you can use it recursively. In other words, it supports alternate processing in a wonderful way. Let&#8217;s see an example:</p>
<pre>
&lt;!-- First, try to play a movie --&gt;
&lt;object
    data="debian.mpeg"&gt;

      &lt;!-- If the movie cannot be played, then play a piece of music --&gt;

      &lt;object
          data="debian.ogg"&gt;

            &lt;!-- Else, try to display an image --&gt;
            &lt;object
                data="debian.png"&gt;

                &lt;!-- Else process the alternate text --&gt;
               Debian GNU/Linux
            &lt;/object&gt;

      &lt;/object&gt;

&lt;/object&gt;
</pre>
<p>Authors should always include alternate text as the content of the object element declaration when an embedded object is not defined.</p>
<p>The two examples about displaying images are just for illusion. In fact, you should almost always include alternate text when displaying images. Think about users who use a text browser, the users who turn off the displaying of images to speed up the loading of a page in a GPRS network, and so on.</p>
<p>The archive attribute may be used to specify a space-separated list of URIs for archives containing resources relevant to the object.</p>
<p>The standby attribute specifies a message while loading.</p>
<h3>Summary on some XHTML elements</h3>
<p>Before reading on, check whether you&#8217;re familiar with the following elements. You may need to review this article if you&#8217;re unsure about some of them.</p>
<ul>
<li>body, head, html, title</li>
<li>address, blockquote, h1, h2, h3, h4, h5, h6, p, pre</li>
<li>abbr, cite, code, dfn, em, q, strong, sub, sup</li>
<li>a</li>
<li>dl, dt, dd, ol, ul, li</li>
<li>meta</li>
<li>object</li>
<li>caption, table, tbody, td, tfoot, th, thead, tr</li>
</ul>
<h3>Introduction To More Attributes</h3>
<p>We have talked about a few attributes before, now let&#8217;s look other ones. Note: There are various attributes for elements. Available attributes may differ for different elements. We will cover only basic ones here.</p>
<h3>class</h3>
<p>This attribute assigns one or more class names (separated by space) to an element; the element may be said to belong to these classes. A class name may be shared by several element instances.</p>
<p>The class attribute can be used for different purposes in XHTML, for instance as a style sheet selector.</p>
<p>You should use names that represent the purpose of the element rather than the visual presentation to be used. For instance don&#8217;t use class=&#8221;red&#8221;, but rather class=&#8221;urgent&#8221;, or similar.</p>
<h3>dir</h3>
<p>This attribute allows the author to specify the direction of the element&#8217;s text content. The default value of this attribute is ltr. </p>
<h3>id</h3>
<p>The id attribute assigns an identifier to an element. The value of this attribute must be <em>unique</em> within a document.</p>
<p>One use of this attribute is to provide a a target anchor for hypertext links. For example, you can link to the element which have a id feedback as <code>&lt;a href="#feedback"&gt;Feedback&lt;a&gt;</code>.</p>
<h3>xml:lang</h3>
<p>This attribute indicates the language of an element&#8217;s attribute values and text content, and of all elements it contains, unless overridden. The default value of this attribute is unspecified. That&#8217;s why you should always write this attribute value in the html element.</p>
<h3>title</h3>
<p>This attribute defines meta-information about the element. Browsers usually show its value in a tooltip. Example:</p>
<pre>
&lt;a href="http://millenniumdark.blog.ubuntu.org.cn/"
title="Web Log"&gt;weakish&lt;/a&gt;
is the author of this document.
</pre>
<p>The result is showed below. Put you mouse above &#8220;Weakish Jiang&#8221;, but don&#8217;t press. Wait a few seconds and you are ought to see a tooltip read &#8220;Web Log&#8221;.</p>
<p><a href="http://millenniumdark.blog.ubuntu.org.cn/" title="Web Log">Weakish Jiang</a> is the author of this document.</p>
<h3>cite</h3>
<p>The value of this attribute is a URI that designates a source document or message. It&#8217;s often used with the blockquote or q element.</p>
<h3>Extension</h3>
<p>There are two special elements (div span), together with the id, class attributes offering a generic mechanism for adding structure to documents. Use them to tailor XHTML to your own needs and tastes. The difference between div and span is: div is a block level element, while span is a inline one.</p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/a-basic-guide-to-xhtml/feed/</wfw:commentRss>
		</item>
		<item>
		<title>XML Basic Concepts</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/xml-basic-concepts/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/xml-basic-concepts/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 08:18:03 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1312</guid>
		<description><![CDATA[Foreword
This article is intended to provide a quick introduction to basic concepts about XML.
Structured and semantic markup
An essential characteristic of structured markup is that it explicitly specifies the structure and semantic content of a document. It does not mark up the way in which the document will be displayed in the screen, printing, or anywhere [...]]]></description>
			<content:encoded><![CDATA[<h3>Foreword</h3>
<p>This article is intended to provide a quick introduction to basic concepts about XML.</p>
<h3>Structured and semantic markup</h3>
<p>An essential characteristic of structured markup is that it explicitly specifies the structure and semantic content of a document. It does not mark up the way in which the document will be displayed in the screen, printing, or anywhere else.</p>
<p>XML use named elements, delimited by angle brackets (“&lt;” and “&gt;”) to identify the markup in a document. Note the following features of this markup:</p>
<dl>
<dt><strong>Clarity</strong></dt>
<dd>
<p>Every element should in tags(&#8221;&lt; &gt;&#8221;), and a starting tag (&lt;element&gt;) is always followed by a ending tag (&lt;/element&gt;). An empty tag should be written as &lt;element /&gt;</dd>
<dt><strong>Hierarchy</strong></dt>
<dd>
For example, in XHTML, the inline element code (which means a piece of code) cannot contain a block element p (which means a paragraph).</dd>
</dl>
<p>Semantic markup makes your documents more amenable to interpretation by software. And it makes possible to apply different styles to the same document without rewriting it.</p>
<h3>Elements and Attributes</h3>
<p class="first">XML markup consists primarily of elements, attributes, and entities.</p>
<p>Elements are the terms we have been speaking about most, like p, that describe a document&#8217;s content and structure.</p>
<p>Most elements are represented by pairs of tags and mark the start and end of the construct they surround. For example, <code>&lt;strong&gt;strong&lt;/strong&gt;</code>. Some elements are &#8220;empty&#8221;, e.g. &lt;hr /&gt;.</p>
<p>Elements can, but don&#8217;t necessarily, include one or more attributes, which are additional terms that extend the function or refine the content of a given element. For example, in XHTML 1.1, the element a, usually has a href attribute, whcih specifies the target, like this: <code>&lt;a href="http://example.com"&gt;</code>. End tags cannot contain attributes.</p>
<h3>Entities</h3>
<p>Mostly, we use entities to type in some special characters. For example, &#8220;&lt;&#8221; and &#8220;&gt;&#8221; has special meaning in XHTML file. Therefore, if you write XHTML files manually and want to type &#8220;&lt;&#8221; or &#8220;&gt;&#8221; literal, you should type &#8220;&amp;gt;&#8221; and &#8220;&amp;lt;&#8221; instead. Also, some characters such as © are hard to type. Instead, you can just type &#8220;&amp;#xA9&#8243;.</p>
<p>There are other uses and other types of entities, which I won&#8217;t discuss here.</p>
<h3>More Information</h3>
<p>Refer to <cite><a href="http://www.w3.org/TR/xml">Extensible Markup Language</a></cite> for more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/xml-basic-concepts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Information Architecture</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/information-architecture/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/information-architecture/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 08:07:52 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1307</guid>
		<description><![CDATA[Importance
Jakob Nielsen said in his foreword for the book Information Architecture: for the World Wide Web:

Critics may say that users don&#8217;t care about information architecture. They don&#8217;t want to learn how a web site is structured; they just want to get in, get their task done, and get out.Users focus on tasks, not structure. But [...]]]></description>
			<content:encoded><![CDATA[<h3>Importance</h3>
<p><span class="person"><span class="personname"><a class="offsite" href="http://www.useit.com">Jakob Nielsen</a></span></span> said in his foreword for the book <cite>Information Architecture: for the World Wide Web</cite>:</p>
<blockquote><p>
Critics may say that users don&#8217;t care about information architecture. They don&#8217;t want to learn how a web site is structured; they just want to get in, get their task done, and get out.Users focus on tasks, not structure. But it&#8217;s because users don&#8217;t care about the structure of a web site that it is so important to get the information architecture right in the design. If users did bother to study our web sites, they could surely learn how an obscure or illogical structure works and utilize that knowledge to improve their task performance.
</p></blockquote>
<h3>Don&#8217;t go too deep!</h3>
<p>If users are forced to click through more than two or three levels, they may simply give up and leave your web site. At the very least, they&#8217;ll become frustrated.</p>
<h3>All roads lead to Roma.</h3>
<p>Provide multiple ways to access the same information. Think about computer programs. For example, in Emacs, I can save this file by type C-x C-s, or click the &#8220;save&#8221; icon on the toolbar, or click the &#8220;File&#8221; menu, then click &#8220;Save&#8221; on the pop up item. There are three ways, you see. Oh, I almost forgot it! In fact, there are <em>one more</em> way: type M-x save-buffer. Why should a website diff?</p>
<p>For instance, a site map provides a supplemental way for accessing website. However, a sitemap is most useful for web sites that lend themselves to hierarchical organization.  If not , an index may be better.</p>
<h3>Graphic navigation systems</h3>
<p>Graphic navigation bars tend to look nicer. Apple&#8217;s website is an example. However, using graphic navigation bars means more time to load the page as well as to design and maintain. </p>
<p>Some people are in favor of using icons on navigation systems. This has its own pros and cons.</p>
<p>It&#8217;s true that a picture is worth a thousand words, But which thousand? Users are likely to be confused.</p>
<p>However, icons are especially useful shorthand for regular visitors, easy to visually recognize. </p>
<p>Let&#8217;s take a look at phpBB forum. The reply, new-topic and submit buttons are labeled as text, while ban ID, warn ID, report buttons are represented by red, yellow, and blue cards. The text-labeled buttons are friendly to new visitors. And the ban ID and warn ID buttons are only available for moderators. Moderators are surely a regular visitor. The report button is available for all registered users. And it&#8217;s reasonable to assume that a rational registered user won&#8217;t report any topic until they get along with the forum for a period of time. </p>
<p>You may argue that you can add a title attribute to the icon images, so when a user&#8217;s mouse hover on the icon, a tooltip will appear. Of course you should use tooltip for icons without text. However, keep in mind than toottips are inconvenient.</p>
<h3>Build a sense of familiarity</h3>
<p> The navigation system should strike to build a sense of familiarity through consistent page location. Remember, consistency means predictability. Predictable systems are easier to learn, and users often feel more comfortable in a familiar environment.</p>
<h3>Internal And External Links</h3>
<p>A well-designed site should make a clear distinction between internal and external links. It is recommended that each external link is clearly indicated as going off site. This can be marked either by text (off-site, for example), or by a small icon (an earth, for example).</p>
<p>This can be done via direct typing as well as CSS. You can mark every external link with a class, say, offsite, and label them via CSS. Some examples:</p>
<pre>
/* If you prefer an icon */
#page a.offsite:before {
content: url(../logo/www.png);
}
/* If you prefer text */
#page a.offsite:before {
content: "(off-site)";
}
</pre>
<p>Every external link in blog posts here are labbeled with an blue earth icon.</p>
<p>Someone also suggested that each external link is displayed in a new window so the visitor can come back by closing or iconifying that new window. But I don&#8217;t think so. First, I don&#8217;t think website has the right to add one more window to the users&#8217; desktop. (This is especially true for a wmii user as me.) Second, it&#8217;s hard to implement. A simple way is to use the attribute target=&#8221;_blank&#8221;, but the target attribute is not supported by XHTML Strict. Alternatively, you can use JavaScript to open new browser windows. But I think it costs too much.</p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/information-architecture/feed/</wfw:commentRss>
		</item>
		<item>
		<title>校勘成果的處理形式</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/emending-results/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/emending-results/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 07:56:10 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1305</guid>
		<description><![CDATA[校勘成果的處理形式，大致有定本、定本附校勘記、底本附校勘記、單行的校勘記、校注、筆記、論文、序跋。
我想，在大多數情況下，僅僅一個定本是不足取的，因為極少有古書只有一個版本沒有其他資料可供校勘的，也極少有人的水平能高到可以校出一個毫無缺陷的定本。如果說初學沒有分辨的能力，附了校勘記他們也無法自己作判斷，反而會造成困惑，不如給他們一個定本，那我要說，對於這樣的初學者，恐怕是沒有能力讀白文的。所以絕大多數情況下，單單一個定本是不能起甚么作用的。這類定本要和注釋甚至翻譯結合起來，纔對初學有用，要和索引、語料庫結合起來，纔對研究者有用。當然，這裡的不足取是指出版的時候最好不要采用這種形式。很多出版社為了壓縮字數，把校勘記都去掉，這樣的書如果校訂者具有一定水平，還是有參考價值的。如果校訂水平很高，甚至會有很大的參考價值。
定本附校勘記的，固然研究者也可以參考，但主要適合作一般的讀本，因此校勘記不妨簡明扼要些。之所以說主要適合做一般讀本，是因為我比較信奉“不校校之”。
底本附校勘記的，一般是研究者用的，因此校勘記應該盡可能詳盡。這一類的，還需要精擇底本。
單行的校勘記，可以節省資源，尤適用於原書有通行的本子的情況。
作注時，往往要牽涉到校勘問題，因此校注也是很常見的。校注合一，作一般的讀本而言，甚便閱讀。但是為方便研究者計（某些研究者可能主要關心的是校記而非注釋），不宜過於“水乳交融”，能分則分。比如校記在前，注釋在後，等等。
筆記比較靈活，一般以零散的校記為主。但因其散見各書，難以稽檢，往往難以充分應用。
有些論文和序跋，喜歡將校記歸類。但對於研究專書的人而言，反而帶來了不便，從這個意義上，也可以說這種歸類是自作聰明。
]]></description>
			<content:encoded><![CDATA[<p>校勘成果的處理形式，大致有定本、定本附校勘記、底本附校勘記、單行的校勘記、校注、筆記、論文、序跋。</p>
<p>我想，在大多數情況下，僅僅一個定本是不足取的，因為極少有古書只有一個版本沒有其他資料可供校勘的，也極少有人的水平能高到可以校出一個毫無缺陷的定本。如果說初學沒有分辨的能力，附了校勘記他們也無法自己作判斷，反而會造成困惑，不如給他們一個定本，那我要說，對於這樣的初學者，恐怕是沒有能力讀白文的。所以絕大多數情況下，單單一個定本是不能起甚么作用的。這類定本要和注釋甚至翻譯結合起來，纔對初學有用，要和索引、語料庫結合起來，纔對研究者有用。當然，這裡的不足取是指出版的時候最好不要采用這種形式。很多出版社為了壓縮字數，把校勘記都去掉，這樣的書如果校訂者具有一定水平，還是有參考價值的。如果校訂水平很高，甚至會有很大的參考價值。</p>
<p>定本附校勘記的，固然研究者也可以參考，但主要適合作一般的讀本，因此校勘記不妨簡明扼要些。之所以說主要適合做一般讀本，是因為我比較信奉“不校校之”。</p>
<p>底本附校勘記的，一般是研究者用的，因此校勘記應該盡可能詳盡。這一類的，還需要精擇底本。</p>
<p>單行的校勘記，可以節省資源，尤適用於原書有通行的本子的情況。</p>
<p>作注時，往往要牽涉到校勘問題，因此校注也是很常見的。校注合一，作一般的讀本而言，甚便閱讀。但是為方便研究者計（某些研究者可能主要關心的是校記而非注釋），不宜過於“水乳交融”，能分則分。比如校記在前，注釋在後，等等。</p>
<p>筆記比較靈活，一般以零散的校記為主。但因其散見各書，難以稽檢，往往難以充分應用。</p>
<p>有些論文和序跋，喜歡將校記歸類。但對於研究專書的人而言，反而帶來了不便，從這個意義上，也可以說這種歸類是自作聰明。</p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/emending-results/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How I chose my first digital camera</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/choose-first-digital-camera/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/choose-first-digital-camera/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 07:00:18 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1300</guid>
		<description><![CDATA[This article was originally titled &#8216;Choose your first digital camera&#8217;, but actually it was some thoughts of mine when I decided to buy my first digital camera about one or two years ago.  So it may be a bit out of date.  I put it here mainly for reference.
It&#8217;s a poor carpenter who [...]]]></description>
			<content:encoded><![CDATA[<p>This article was originally titled &#8216;Choose your first digital camera&#8217;, but actually it was some thoughts of mine when I decided to buy my first digital camera about one or two years ago.  So it may be a bit out of date.  I put it here mainly for reference.</p>
<p>It&#8217;s a poor carpenter who blames hir tools. This is also true for digital photographers. However, this is no denying that cameras that offer advanced photographic options enable you to fine-tune focus, exposure, and color with more precision than a basic one. In the following part of this article, I will bring to your attention a few issues that may not occur to you when you&#8217;re shopping but play a big role in your long-term satisfaction with a camera.</p>
<h3>Manual exposure control</h3>
<p>Three camera components affect exposure:</p>
<dl>
<dt>Aperture</dt>
<dd>The aperture is an tiny &#8220;hole&#8221; in the lens that controls how much light enters through the lens. Aperture size is represented by f-numbers such as f/2.8. The higher the f-number, the smaller the aperture size and the less light enters through the lens. </dd>
<dt>Shutter speed</dt>
<dd>The shutter is like a door behind the camera lens. When you take a photo, the shutter opens to allow light to enter through the lens and strike the camera&#8217;s image sensor. Therefore, the slower the shutter speed, the more light the sensor get.</dd>
<dt>ISO</dt>
<dd>This is used to indicate the light sensitivity of the image sensor. The higher the ISO number, the more sensitive the image sensor and the light is required to expose the image.</dd>
</dl>
<p>Manual exposure control does not only gives you the ability to control how light or dark your photo appears. What&#8217;s more, aperture affects depth of field, while shutter speed determines whether a moving object blurred or not.</p>
<p>Besides the program (P) mode, in which the camera chooses the aperture size and shutter speed automatically, advanced cameras also offer you the manual (M) mode, in which you make the decisions yourself. Plus, many cameras offer aperture-priority (A) mode and shutter-priority (S) mode, in either of which, you select one control (aperture size or shutter speed) and the camera calculate the other automatically. Not only does working with a camera that offers PASM modes give you the opportunity to implement your creative decisions, but also enables you to manually deal with some difficult conditions under which automatic exposure cannot handle.</p>
<p>In my opinion, you don&#8217;t need to pay much attention to ISO ratings. At high ISO ratings, photos are usually full of noises.</p>
<h1>Focal length</h1>
<p>Focal length, which is measured in millimeters, is the distance between the optical center of the lens and the image sensor. It affects the angle of view and the size at which your objects appear. At a short focal length, you can capture a wide aera, but objects appear smaller and farther away, while at a long focal length, the opposite is true. </p>
<p>In most conditions, you can&#8217;t evaluate digital camera focal lengths on the same scale you use for a traditional camera lens. This is a bit complicated to explain fully, but I can give an oversimplified explanation here: The size of the recording element affects what the camera sees at a particular focal length, and in most cases image sensors are much smaller than the traditional 35mm film negatives. </p>
<p>Because photographers are more familiar with the focal lengths of 35mm film and a variety of sensor sizes are used in digital cameras, the digital industry has adopted the practice of staing camera focal lengths as 35mm film equivalents.</p>
<p>So digital camera specs may read something like this: &#8220;Focal length: 5.8 mm, equivalent to 35mm with 35mm film.&#8221; This tells you that the digital camera lens produces the same image you would get with a 50mm lens if you were shooting 35mm film. Note that I use the word same in the meaning that the same angle of view. The optical effect is different because of the difference of the size of the recording element.</p>
<p>Some basic guidelines for focal lengths:</p>
<ul>
<li>A lens with a focal length equivalency of less than 35mm is considered a wide-angle lens. Wide-angle lenses are perfect for landscape photography.</li>
<li>A focal length equivalency of 50mm produces the most natural view, recording a subject at approximately the same size and distance as your eyes see it.</li>
<li>A focal length equivalency of more than 85mm is considered as a telephoto lens. You can use them to capture a distant object in a close view.</li>
</ul>
<p>A zoom lens enables you to shift between a range of focal lengths. If you want to buy a digital camera, just ignore what-so-called digital zoom. This feature is nonsense. Roughly speaking, digital zoom is enlarging your photos by reducing the quality. </p>
<p>Also, don&#8217;t get confused with things like &#8220;4x optical zoom&#8221;. For example, one camera&#8217;s focal length range is 17mm to 85mm, and another&#8217;s is 70mm to 200mm. The first camera is a 5x optical zoom camera (85/17=5) and the latter is a approximatively 3x optical zoom camera (200/70‚âà3). But obviously the second one has a much large focal length range than the first one.</p>
<p>To sum up, when buying a digital camera, just ignore digital focal lengths, digital zoom and optical zoom, and look for the 35mm equivalency numbers.</p>
<h1>Manual focusing mechanisms</h1>
<p>Besides autofocus, advanced digital cameras also offer manual focusing. </p>
<h3>Pixels</h3>
<p>Roughly speaking, more pixels means more details. However, unless you are buying a DSLR, don&#8217;t lay much emphasis on pixels. At the time I wrote this article (2007), all most every main-stream digital camera manufacturer doesn&#8217;t offer models below 500 million pixels. This is enough for a beginner. And general speaking, given the certain sensor size (for consideration of portability and cost-saving, manufacturers usually won&#8217;t enlarge the image sensor at the same time), more pixels tend to cause more noises.  </p>
<h3>Image format</h3>
<p>All digital cameras provide the JPEG format, but advanced models also provide TIFF format or RAW format. TIFF format is wildly used in professional field and is better than JPEG in quality. And RAW format, which is not a real image format, strictly speaking, is actually the raw data the image sensor recorded. Therefore, it provide ultimately flexibility in the digital darkroom stage. Both TIFF and RAW need much more storage space than JPEG. From my viewpoint, it&#8217;s a good idea to get a camera which support RAW format if you are a serious photographer. And I don&#8217;t prefer TIFF cause it requires a bit more storage space than the RAW format and lacks the flexibility. </p>
<h3>Viewfinder</h3>
<p>Some digital cameras do not offer a viewfinder, forcing you to use the LCD monitor solely. I don&#8217;t recommend this choice. This is not only because the batteries&#8217; life get shorter when the monitor is turned on all the time, but also because the displays on most monitors tend to wash out in bright sunlight. For the same reason, I don&#8217;t think a large LCD monitor makes much sense.</p>
<p>Note that some cameras provide electronic viewfinders instead. When you look through it, you see whatever the lens is looking at plus all the information normally displayed on the LCD monitor. A electronic viewfinder is more convenient than a traditional one. However, it consumes battery power.</p>
<h3>Tripod mount</h3>
<p>In situations that call for a slow shutter speed, for example, take landscape photography at night, you need to mount your camera on a tripod. Almost all digital cameras include the necessary screw threads for attaching the camera to a tripod. However, some extraordinary slim models don&#8217;t provide this function. Be careful, a tripod mount is somehow essential.</p>
<h3>Recording media</h3>
<p>SD card is the main-stream recording media. Standing by the main-stream recording media means you have more choices of brands and usually get the same capacity at a lower price.</p>
<h3>Batteries</h3>
<p>AA-sized batteries are cheaper and available almost everywhere. However, they are heavier and bigger. </p>
<h3>Control Accessibility</h3>
<p>Last but absolutely not the lease, is the control accessibility. If you&#8217;re forced to go through batches of menus and press many buttons to make your selection in most times, you&#8217;re sure to get frustrating. What&#8217;s more, you may miss the opportunity to take a shot when you&#8217;re finding your way through those menus. Thus, if possible, look for a model that allows you to control regular functions via buttons or dials.</p>
<h3>In the end</h3>
<p>I never mean that you are ought to buy a camera which satisfies you at all the aspects I mentioned above. I didn&#8217;t list portability and price, which is absolutely very important when choosing a camera. You may also have some specific needs, such as avoiding shake effect, waterproof, the ability to record movies, etc. I myself bought a Canon&#8217;s A570 IS, which doesn&#8217;t satisfy me in every aspect. However, for me, it&#8217;s the best choice at its price level. </p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/02/09/choose-first-digital-camera/feed/</wfw:commentRss>
		</item>
		<item>
		<title>有點不喜歡ikiwiki</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/02/08/%e6%9c%89%e9%bb%9e%e4%b8%8d%e5%96%9c%e6%ad%a1ikiwiki/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/02/08/%e6%9c%89%e9%bb%9e%e4%b8%8d%e5%96%9c%e6%ad%a1ikiwiki/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 08:32:47 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1296</guid>
		<description><![CDATA[默認使用markdown。markdown不是一個很適合wiki的標記語言。因為markdown沒有提供方便的wiki頁面鏈接功能，ikiwiki使用預處理指令把自定義的wiki頁面鏈接格式轉換成raw html，再把整個頁面交給markdown處理。
這就導致了兩個問題：
1，雖然ikiwiki支持很多標記語言。但對於不支持插入html代碼格式的標記語言支持很差。
2, 因為markdown允許插入raw html，在wiki上會導致安全問題，於是ikiwiki需要後期處理去除不安全的html代碼。所以一個頁面的生成至少需要：先預處理wiki頁面鏈接，交給markdown生成html，再後期處理不安全的html代碼。如果選用一個支持wiki頁面鏈接但不支持危險html代碼嵌入的標記語言，這3步就可以並成1步。
]]></description>
			<content:encoded><![CDATA[<p>默認使用markdown。markdown不是一個很適合wiki的標記語言。因為markdown沒有提供方便的wiki頁面鏈接功能，ikiwiki使用預處理指令把自定義的wiki頁面鏈接格式轉換成raw html，再把整個頁面交給markdown處理。</p>
<p>這就導致了兩個問題：<br />
1，雖然ikiwiki支持很多標記語言。但對於不支持插入html代碼格式的標記語言支持很差。<br />
2, 因為markdown允許插入raw html，在wiki上會導致安全問題，於是ikiwiki需要後期處理去除不安全的html代碼。所以一個頁面的生成至少需要：先預處理wiki頁面鏈接，交給markdown生成html，再後期處理不安全的html代碼。如果選用一個支持wiki頁面鏈接但不支持危險html代碼嵌入的標記語言，這3步就可以並成1步。</p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/02/08/%e6%9c%89%e9%bb%9e%e4%b8%8d%e5%96%9c%e6%ad%a1ikiwiki/feed/</wfw:commentRss>
		</item>
		<item>
		<title>論壇的修改帖子功能</title>
		<link>http://millenniumdark.blog.ubuntu.org.cn/2009/02/08/%e8%ab%96%e5%a3%87%e7%9a%84%e4%bf%ae%e6%94%b9%e5%b8%96%e5%ad%90%e5%8a%9f%e8%83%bd/</link>
		<comments>http://millenniumdark.blog.ubuntu.org.cn/2009/02/08/%e8%ab%96%e5%a3%87%e7%9a%84%e4%bf%ae%e6%94%b9%e5%b8%96%e5%ad%90%e5%8a%9f%e8%83%bd/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 08:16:11 +0000</pubDate>
		<dc:creator>millenniumdark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://millenniumdark.blog.ubuntu.org.cn/?p=1293</guid>
		<description><![CDATA[郵件列表屬於不可修改的歷史，wiki屬於不斷篡改的歷史。而論壇，就比較尷尬。一般論壇的設定，普通用戶可以修改自己的帖子，但是不可以修改別人的（mail list是誰的都不能修改，wiki是誰的都能修改）。這就造成用戶修改自己的帖子後，會破壞上下文環境。
m6的設定，除非自己的帖子位於tip，否則無法修改。這也許是比較好的方式。
]]></description>
			<content:encoded><![CDATA[<p>郵件列表屬於不可修改的歷史，wiki屬於不斷篡改的歷史。而論壇，就比較尷尬。一般論壇的設定，普通用戶可以修改自己的帖子，但是不可以修改別人的（mail list是誰的都不能修改，wiki是誰的都能修改）。這就造成用戶修改自己的帖子後，會破壞上下文環境。</p>
<p><a href="http://mac.6.cn">m6</a>的設定，除非自己的帖子位於tip，否則無法修改。這也許是比較好的方式。</p>
]]></content:encoded>
			<wfw:commentRss>http://millenniumdark.blog.ubuntu.org.cn/2009/02/08/%e8%ab%96%e5%a3%87%e7%9a%84%e4%bf%ae%e6%94%b9%e5%b8%96%e5%ad%90%e5%8a%9f%e8%83%bd/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.380 seconds -->
<!-- Cached page generated by WP-Super-Cache on 2009-07-04 08:34:38 -->
<!-- Compression = gzip -->