<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>福茲提克資訊科技網-資訊攻略</title>
<link>http://blog.roodo.com/fauztech/archives/cat_374931.html</link>
<description></description>
<language>zh-tw</language>
<generator>Roodo Blog System</generator>
<copyright>All Rights Reserved</copyright>
<atom:link href="http://blog.roodo.com/fauztech/archives/cat_374931.xml" rel="self" type="application/rss+xml" />
<item>
	<title>Ubuntu Server 升級到 Hardy 攻略</title>
	<description><![CDATA[
	script /tmp/upgrade-hardy
sudo aptitude install update-manager-core
sudo do-release-upgrade

script是錄影用指令（這指令真難記，很容易混淆的名字）。錄影完打exit跳出。
	]]>
	</description>
	<content:encoded><![CDATA[
	<kbd>script /tmp/upgrade-hardy<br />
sudo aptitude install update-manager-core<br />
sudo do-release-upgrade<kbd><br />
<br />
script是錄影用指令（這指令真難記，很容易混淆的名字）。錄影完打exit跳出。		]]>
	</content:encoded>
	<link>http://blog.roodo.com/fauztech/archives/5898763.html</link>
	<guid>http://blog.roodo.com/fauztech/archives/5898763.html</guid>
	<category>資訊攻略</category>
	<pubDate>Tue, 22 Apr 2008 01:42:40 +0800</pubDate>
</item>
<item>
	<title>IE的global namespace pollution</title>
	<description><![CDATA[
	昨天寫了一段javascript code，在Firefox跑，一切正常；到IE不能跑。用Microsoft Script Editor來debug，雖然可以知道錯誤發生在哪一段程式，但是看了半天卻看不出錯誤在哪。後來只好死馬當活馬醫，用trial and error方法，把code隨意改一改。結果發現：咦，把相關的HTML element id改掉，似乎程式就不會卡住了。難道是IE對我的id命名有意見？

再定睛一看，會卡住的code剛好都是javascript variable和HTML id取名一樣的。原來，在IE裡javascript variable的名字不能和HTML id一樣！？再做了一些實驗，原來IE會把每個有id的element當作javascript的global variable，讓你直接用id/name存取DOM，而不必透過getElementById()。

這真的很討厭。我看到有國外的網站稱之為global namespace pollution。
	]]>
	</description>
	<content:encoded><![CDATA[
	昨天寫了一段javascript code，在Firefox跑，一切正常；到IE不能跑。用Microsoft Script Editor來debug，雖然可以知道錯誤發生在哪一段程式，但是看了半天卻看不出錯誤在哪。後來只好死馬當活馬醫，用trial and error方法，把code隨意改一改。結果發現：咦，把相關的HTML element id改掉，似乎程式就不會卡住了。難道是IE對我的id命名有意見？<br />
<br />
再定睛一看，會卡住的code剛好都是javascript variable和HTML id取名一樣的。原來，在IE裡javascript variable的名字不能和HTML id一樣！？再做了一些實驗，原來IE會把每個有id的element當作javascript的global variable，讓你直接用id/name存取DOM，而不必透過getElementById()。<br />
<br />
這真的很討厭。我看到有國外的網站稱之為global namespace pollution。		]]>
	</content:encoded>
	<link>http://blog.roodo.com/fauztech/archives/5763715.html</link>
	<guid>http://blog.roodo.com/fauztech/archives/5763715.html</guid>
	<category>資訊攻略</category>
	<pubDate>Thu, 27 Mar 2008 14:21:02 +0800</pubDate>
</item>
<item>
	<title>在Ubuntu上安裝INN</title>
	<description><![CDATA[
	INN (InterNetNews)是一個網路新聞群組的軟體套件。

sudo aptitude update
sudo aptitude install inn2

Ubuntu上可以用aptitude直接安裝INN，但要注意的是，套件名稱是inn2（代表INN 2.x版），套件inn是舊版的。

如果安裝到一半失敗，看看訊息是否是inn.conf檔沒設定好。如果是，你可能必須編輯它，將domain設為你的主機的FQDN。

sudo nano /etc/news/inn.conf


	]]>
	</description>
	<content:encoded><![CDATA[
	<a href="http://en.wikipedia.org/wiki/InterNetNews" target="_blank" title="Wikipedia: InterNetNews">INN (InterNetNews)</a>是一個<a href="http://zh.wikipedia.org/w/index.php?title=%E6%96%B0%E8%81%9E%E7%BE%A4%E7%B5%84&variant=zh-tw" target="_blank" title="Wikipedia: 新聞群組">網路新聞群組</a>的軟體套件。<br />
<br />
<kbd>sudo aptitude update<br />
sudo aptitude install inn2</kbd><br />
<br />
Ubuntu上可以用aptitude直接安裝INN，但要注意的是，套件名稱是inn2（代表INN 2.x版），套件inn是舊版的。<br />
<br />
如果安裝到一半失敗，看看訊息是否是inn.conf檔沒設定好。如果是，你可能必須編輯它，將domain設為你的主機的FQDN。<br />
<br />
<kbd>sudo nano /etc/news/inn.conf</kbd><br />
<br />
		]]>
	</content:encoded>
	<link>http://blog.roodo.com/fauztech/archives/5035485.html</link>
	<guid>http://blog.roodo.com/fauztech/archives/5035485.html</guid>
	<category>資訊攻略</category>
	<pubDate>Wed, 23 Jan 2008 06:48:37 +0800</pubDate>
</item>
<item>
	<title>UNIX中在某目錄找某副檔名裡的某段文字</title>
	<description><![CDATA[
	grep REGULAR_EXPRESSION `find DIRECTORY -name '*.EXT' -print`

指令組合分析：

  grep REGULAR_EXPRESSION FILE
  ``（反引號，backquote）：將find指令的stand output轉成命令列上grep動詞的FILE受詞
  find DIRECTORY -name 'FILE' -print：FILE兩旁是普通單引號



	]]>
	</description>
	<content:encoded><![CDATA[
	<code>grep</code> REGULAR_EXPRESSION <code>`find </code>DIRECTORY<code> -name '*.</code>EXT<code>' -print`</code><br />
<br />
指令組合分析：<br />
<ul><br />
  <li><code>grep</code> REGULAR_EXPRESSION FILE</li><br />
  <li><code>``</code>（反引號，backquote）：將find指令的stand output轉成命令列上grep動詞的FILE受詞</li><br />
  <li><code>find </code>DIRECTORY<code> -name '</code>FILE<code>' -print</code>：FILE兩旁是普通單引號</li><br />
</ul><br />
<br />
		]]>
	</content:encoded>
	<link>http://blog.roodo.com/fauztech/archives/4765787.html</link>
	<guid>http://blog.roodo.com/fauztech/archives/4765787.html</guid>
	<category>資訊攻略</category>
	<pubDate>Thu, 03 Jan 2008 14:39:54 +0800</pubDate>
</item>
<item>
	<title>在funP推推王看文章的小祕技：星等</title>
	<description><![CDATA[
	不知道大家有沒有注意到，推推王的「所有文章」（主頁）和各分類頁的排序方式不太相同呢？主頁是以「本日最熱門」來排序，而各分類頁則是以到達「一星等」的先後來排序。星等是推推王計算文章等級的方式，基本上愈多人推，升等的可能性愈高就對了。     

 
「本日最熱門」會讓最多推的文章排在最上面；而「星等」則會讓到達一定門檻的文章，最新的排在最上面。其實這只是預設的顯示方式，你可以自行切換成別種排序方式喔！切換排序的鏈結位於頁面上方，最左邊有個「熱門推薦」；將游標移上去，會出現星等的下拉選單，選取一顆星星，就可以切換成「一星等」排序方式了。
   

 
	]]>
	</description>
	<content:encoded><![CDATA[
	不知道大家有沒有注意到，推推王的「所有文章」（主頁）和各分類頁的排序方式不太相同呢？主頁是以「<strong>本日最熱門</strong>」來排序，而各分類頁則是以到達「<strong>一星等</strong>」的先後來排序。星等是推推王計算文章等級的方式，基本上愈多人推，升等的可能性愈高就對了。  <div class="pict"><img class="pict" src="http://blog.roodo.com/fauztech/958cbe74.jpg" border="0" alt="" hspace="5" align="left" /></div>   <br />
<br />
<div style="clear:both"> </div><br />
「本日最熱門」會讓最多推的文章排在最上面；而「星等」則會讓到達一定門檻的文章，最新的排在最上面。其實這只是預設的顯示方式，你可以自行切換成別種排序方式喔！切換排序的鏈結位於頁面上方，最左邊有個「熱門推薦」；將游標移上去，會出現星等的下拉選單，選取一顆星星，就可以切換成「一星等」排序方式了。<br />
  <div class="pict"><img class="pict" src="http://blog.roodo.com/fauztech/1da6d597.jpg" border="0" alt="" hspace="5" align="left" /></div> <div class="pict"><img class="pict" src="http://blog.roodo.com/fauztech/f9f0eb6f.jpg" border="0" alt="" hspace="5" align="left" /></div><br />
<br />
<div style="clear:both"> </div>		<a href="http://blog.roodo.com/fauztech/archives/4512033.html">(繼續閱讀...)</a>;
		]]>
	</content:encoded>
	<link>http://blog.roodo.com/fauztech/archives/4512033.html</link>
	<guid>http://blog.roodo.com/fauztech/archives/4512033.html</guid>
	<category>資訊攻略</category>
	<pubDate>Tue, 20 Nov 2007 17:52:50 +0800</pubDate>
</item>
<item>
	<title>[舊文] 有關Message-ID一欄</title>
	<description><![CDATA[
	考不考慮實作In-Reply-To: 和Reference: 這兩個欄位呢
個人是認為沒這兩個欄位
加上Message-ID:的用途實在不大
BBS上一向都是以「同標題」作為討論串的判別標準
往往內文已經離題了 但為了保持討論串 不能改標題
加上這兩個欄位可以讓文章的回覆關係更明顯
而且改標題討論串不會斷掉

Message-ID是「本篇文章的Message-ID」
In-Reply-To是「本篇文章回的那篇文章(parent)的Message-ID」
Reference則是「把整個討論串的Message-ID都留下來」
（如果以樹狀結構去看它，只有留從根走到該節點會經過的，分支不算）


RFC 2822:
   The "References:" field will contain the contents of the parent's
   "References:" field (if any) followed by the contents of the parent's
   "Message-ID:" field (if any).  If the parent message does not contain
   a "References:" field but does have an "In-Reply-To:" field
   containing a single message identifier, then the "References:" field
   will contain the contents of the parent's "In-Reply-To:" field
   followed by the contents of the parent's "Message-ID:" field (if
   any).  If the parent has none of the "References:", "In-Reply-To:",
   or "Message-ID:" fields, then the new message will have no
   "References:" field.

	]]>
	</description>
	<content:encoded><![CDATA[
	考不考慮實作In-Reply-To: 和Reference: 這兩個欄位呢<br />
個人是認為沒這兩個欄位<br />
加上Message-ID:的用途實在不大<br />
BBS上一向都是以「同標題」作為討論串的判別標準<br />
往往內文已經離題了 但為了保持討論串 不能改標題<br />
加上這兩個欄位可以讓文章的回覆關係更明顯<br />
而且改標題討論串不會斷掉<br />
<br />
Message-ID是「本篇文章的Message-ID」<br />
In-Reply-To是「本篇文章回的那篇文章(parent)的Message-ID」<br />
Reference則是「把整個討論串的Message-ID都留下來」<br />
（如果以樹狀結構去看它，只有留從根走到該節點會經過的，分支不算）<br />
<br />
<pre><br />
RFC 2822:<br />
   The "References:" field will contain the contents of the parent's<br />
   "References:" field (if any) followed by the contents of the parent's<br />
   "Message-ID:" field (if any).  If the parent message does not contain<br />
   a "References:" field but does have an "In-Reply-To:" field<br />
   containing a single message identifier, then the "References:" field<br />
   will contain the contents of the parent's "In-Reply-To:" field<br />
   followed by the contents of the parent's "Message-ID:" field (if<br />
   any).  If the parent has none of the "References:", "In-Reply-To:",<br />
   or "Message-ID:" fields, then the new message will have no<br />
   "References:" field.<br />
</pre>		]]>
	</content:encoded>
	<link>http://blog.roodo.com/fauztech/archives/4470525.html</link>
	<guid>http://blog.roodo.com/fauztech/archives/4470525.html</guid>
	<category>資訊攻略</category>
	<pubDate>Mon, 12 Nov 2007 23:59:56 +0800</pubDate>
</item>
<item>
	<title>在樂多日誌使用funP推推王貼文按鈕</title>
	<description><![CDATA[
	由於樂多的單篇文章沒有側邊欄，唯一能加入script的地方就只有「日誌說明」了。進入部落格管理頁之後，點選「Blog基本管理」，就可以看到「說
明」的文字輸入框。2008.1.23 Update: 已經有內頁插入欄位功能了，你可以在內頁插入欄位追加新的「自由欄位」。在文字框內輸入以下源碼：


&lt;div id="funp_button" style="display:none"&gt;&lt;script language="JavaScript" src="http://funp.com/tools/button.php?" type="text/javascript"&gt;&lt;/script&gt;&lt;br/&gt;&lt;/div&gt;&lt;script type="text/javascript" defer="defer"&gt;//&lt;![CDATA[function funp_button() {    if (location.pathname.toLowerCase().substr(location.pathname.length - 4) != 'html')         return;        var divs = document.getElementsByTagName('div');    for (i=0; i&lt;divs.length; i++) {        if (divs[i].className == "posted") {            divs[i].innerHTML = document.getElementById('funp_button').innerHTML + divs[i].innerHTML;            return;        }    }        }if (window.attachEvent)     window.attachEvent('onload', funp_button);else     window.addEventListener('load', funp_button, false);//]]&gt;&lt;/script&gt;


按下儲存。接著就可以在你的樂多日誌每篇文章的「Posted by」上方看到funP推推王按鈕了。





	]]>
	</description>
	<content:encoded><![CDATA[
	<del>由於樂多的單篇文章沒有側邊欄，唯一能加入script的地方就只有「日誌說明」了。進入部落格管理頁之後，點選「Blog基本管理」，就可以看到「說
明」的文字輸入框。</del><ins>2008.1.23 Update: 已經有內頁插入欄位功能了，你可以在內頁插入欄位追加新的「自由欄位」。</ins>在文字框內輸入以下源碼：<br />
<br />
<div style="border: 1px dashed ; padding: 4px;">
<pre><code><br />&lt;div id="funp_button" style="display:none"&gt;<br />&lt;script language="JavaScript" src="http://funp.com/tools/button.php?" <br />type="text/javascript"&gt;&lt;/script&gt;&lt;br/&gt;<br />&lt;/div&gt;<br />&lt;script type="text/javascript" defer="defer"&gt;<br />//&lt;![CDATA[<br />function funp_button() {<br />    if (location.pathname.toLowerCase().substr(location.pathname.length - 4) != 'html') <br />        return;<br />    <br />    var divs = document.getElementsByTagName('div');<br />    for (i=0; i&lt;divs.length; i++) {<br />        if (divs[i].className == "posted") {<br />            divs[i].innerHTML = document.getElementById('funp_button').innerHTML + divs[i].innerHTML;<br />            return;<br />        }<br />    }        <br />}<br />if (window.attachEvent) <br />    window.attachEvent('onload', funp_button);<br />else <br />    window.addEventListener('load', funp_button, false);<br />//]]&gt;<br />&lt;/script&gt;</code></pre>
</div>
<br />
按下儲存。接著就可以在你的樂多日誌每篇文章的「Posted by」上方看到funP推推王按鈕了。<br />




		<a href="http://blog.roodo.com/fauztech/archives/4076697.html">(繼續閱讀...)</a>;
		]]>
	</content:encoded>
	<link>http://blog.roodo.com/fauztech/archives/4076697.html</link>
	<guid>http://blog.roodo.com/fauztech/archives/4076697.html</guid>
	<category>資訊攻略</category>
	<pubDate>Wed, 29 Aug 2007 22:25:48 +0800</pubDate>
</item>
<item>
	<title>Yahoo Pipes 應用：依版分類，一Feed看盡台灣報紙</title>
	<description><![CDATA[
	之前我用Yahoo Pipes寫過一個台灣報紙要聞pipe，它的作用是將聯合報、蘋果日報、自由時報、中國時報、中央社等四家報紙一家通訊社的「要聞」類新聞，集中到一個RSS裡。但是沒多久就因為Yahoo Pipes系統的改動（畢竟它還是beta），出現中文漢字的bug，除了中央社之外的新聞都變成亂碼而無法閱讀。William Yeh於xmliconv：解決 Yahoo Pipes 中文編碼問題文中提出了中文亂碼的解藥，於是我就可以推廣一下我寫的這個pipe還可以拿來幹嘛用了，那就是：不只要聞！
	]]>
	</description>
	<content:encoded><![CDATA[
	<p>之前我用Yahoo Pipes寫過一個<a href="http://pipes.yahoo.com/pipes/pipe.info?_id=_EPoqBoN3BG84zKGl7okhQ" target="_blank">台灣報紙要聞pipe</a>，它的作用是將聯合報、蘋果日報、自由時報、中國時報、中央社等四家報紙一家通訊社的「要聞」類新聞，集中到一個RSS裡。但是沒多久就因為Yahoo Pipes系統的改動（畢竟它還是beta），出現中文漢字的bug，除了中央社之外的新聞都變成亂碼而無法閱讀。William Yeh於<a rel="bookmark" href="http://william.cswiz.org/blog/archives/2007-06-13/xmliconv/" title="文章永久網址: http://william.cswiz.org/blog/archives/2007-06-13/xmliconv/">xmliconv：解決 Yahoo Pipes 中文編碼問題</a>文中提出了中文亂碼的解藥，於是我就可以推廣一下我寫的這個pipe還可以拿來幹嘛用了，那就是：不只要聞！</p>		<a href="http://blog.roodo.com/fauztech/archives/3466175.html">(繼續閱讀...)</a>;
		]]>
	</content:encoded>
	<link>http://blog.roodo.com/fauztech/archives/3466175.html</link>
	<guid>http://blog.roodo.com/fauztech/archives/3466175.html</guid>
	<category>資訊攻略</category>
	<pubDate>Thu, 14 Jun 2007 09:28:19 +0800</pubDate>
</item>
<item>
	<title>GNU binutils -- strip</title>
	<description><![CDATA[
	今天看 wxWidgets 的 document 學到一招：strip -o release_ver.obj -g debug_ver.obj可以把 debug 資訊拿掉，有助於程式瘦身，要做 release 版時就不用重新編一次了。Warning：請將此招用在你自己寫的程式，用在其他地方的話，Use on your own risk.ref: man strip
	]]>
	</description>
	<content:encoded><![CDATA[
	今天看 <a href="http://www.wxwidgets.org/" target="_blank">wxWidgets</a> 的 document 學到一招：<br /><br /><div style="text-align: center"><span style="font-weight: bold">strip</span> -o <span style="font-style: italic">release_ver.obj</span> -g <span style="font-style: italic">debug_ver.obj<br /><br /></span><div style="text-align: left">可以把 debug 資訊拿掉，有助於程式瘦身，要做 release 版時就不用重新編一次了。Warning：請將此招用在你自己寫的程式，用在其他地方的話，Use on your own risk.<br /><br />ref: <a href="http://www.gnu.org/software/binutils/manual/html_chapter/binutils_8.html#SEC10" target="_blank">man strip</a><br /></div></div>		]]>
	</content:encoded>
	<link>http://blog.roodo.com/fauztech/archives/3465893.html</link>
	<guid>http://blog.roodo.com/fauztech/archives/3465893.html</guid>
	<category>資訊攻略</category>
	<pubDate>Thu, 16 Jun 2005 09:36:27 +0800</pubDate>
</item>
</channel>
</rss>