<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
 <channel>
  <title>Tsung's Blog</title>
  <link>http://plog.longwin.com.tw</link>
  <description> 廢話的定義: 聽起來好像很具體，實際上是很空洞的話，看起來好像講到問題的徵結了，實際上是在迴避所有的答案，所以這段話聽起來很流暢，但是他註定是要作廢的。 
</description>
  <pubDate>Sun, 08 Nov 2009 14:41:20 +0800</pubDate>
  <generator>http://www.lifetype.net</generator>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/tsungblog" type="application/rss+xml" /><feedburner:emailServiceId>tsungblog</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
   <title>Key-Value 系統 分類整理 (NoSQL)</title>
   <description>&lt;p&gt;
一般使用的 DB 統稱是 RDBMS(MSSQL、MySQL ... 等), 現在因為雲端運算的興起, Key-Value 的系統也漸漸紅了起來, 那到底有哪些 Key-Value system 可以用呢?
&lt;/p&gt;

&lt;p&gt;
此篇文章 &lt;a href="http://highscalability.com/blog/2009/11/5/a-yes-for-a-nosql-taxonomy.html" target="_blank" title="A Yes for a NoSQL Taxonomy"&gt;A Yes for a NoSQL Taxonomy&lt;/a&gt; 主要是這篇 &lt;a href="http://dl.getdropbox.com/u/2075876/nosql-steve-yen.pdf" target="_blank" title="NoSQL is a Horseless Carriage"&gt;NoSQL is a Horseless Carriage&lt;/a&gt; 簡報的整理.
&lt;/p&gt;
&lt;p&gt;
此簡報將 Key-Value 的系統分成幾個類別, 並將這些資料整理出來. (下述內容主要取自簡報, 另外補上 連結 和 簡介.)
&lt;/p&gt;
&lt;p&gt;
註: 下述連結有可能有誤, 有些系統不熟, 若有錯誤麻煩請隨時糾正我. orz.
&lt;/p&gt;
&lt;h4&gt;Key-Value 系統分類列表&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;key‐value‐cache: memcached, repcached, coherence, infinispan, eXtreme scale, jboss cache, velocity, terracoqa
	&lt;ul&gt;
		&lt;li&gt;&lt;a href="http://www.danga.com/memcached/" target="_blank" title="memcached: a distributed memory object caching system"&gt;memcached&lt;/a&gt;: a distributed memory object caching system&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://repcached.lab.klab.org/" target="_blank" title="repcached - add data replication feature to memcached"&gt;repcached&lt;/a&gt; - add data replication feature to memcached&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.oracle.com/technology/products/coherence/index.html" target="_blank" title="Oracle Coherence"&gt;Oracle Coherence&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.jboss.org/infinispan" target="_blank" title="INFINISPAN - Open Source Data Grids - JBoss Community"&gt;INFINISPAN&lt;/a&gt; - Open Source Data Grids - JBoss Community&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www-01.ibm.com/software/webservers/appserv/extremescale/" target="_blank" title="WebSphere eXtreme Scale"&gt;WebSphere eXtreme Scale&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.jboss.org/jbosscache/" target="_blank" title="JBoss Cache"&gt;JBoss Cache&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://velocity.apache.org/" target="_blank" title="Apache Velocity Site"&gt;Apache Velocity Site&lt;/a&gt; - The Apache Velocity Project&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.terracotta.org/" target="_blank" title="Terracotta: Simple Scale for Enterprise Java"&gt;Terracotta&lt;/a&gt;: Simple Scale for Enterprise Java&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;key‐value‐store: keyspace, flare, schema‐free, RAMCloud
	&lt;ul&gt;
		&lt;li&gt;&lt;a href="http://scalien.com/keyspace/" target="_blank" title="Scalien - Keyspace"&gt;Scalien&lt;/a&gt; - Keyspace&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://flare.prefuse.org/" target="_blank" title="Flare | Data Visualization for the Web"&gt;Flare&lt;/a&gt; | Data Visualization for the Web&lt;/li&gt;
		&lt;li&gt;schema‐free&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://fiz.stanford.edu:8081/display/ramcloud/Home" target="_blank" title="RAMCloud Project - Confluence"&gt;RAMCloud Project&lt;/a&gt; - Confluence&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;eventually‐consistent key‐value‐store: dynamo, voldemort, Dynomite, SubRecord, Mo8onDb, Dovetaildb
	&lt;ul&gt;
		&lt;li&gt;&lt;a href="http://s3.amazonaws.com/AllThingsDistributed/sosp/amazon-dynamo-sosp2007.pdf" target="_blank" title="Dynamo: Amazon's Highly Available Key-value Store"&gt;Dynamo: Amazon's Highly Available Key-value Store&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://project-voldemort.com/" target="_blank" title="Project Voldemort"&gt;Project Voldemort&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://wiki.github.com/cliffmoon/dynomite" target="_blank" title="Dynomite - GitHub"&gt;Dynomite - GitHub&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://plog.longwin.com.tw/SubRecord%20-%20Storage%20in%20the%20cloud" target="_blank" title="SubRecord - Storage in the cloud"&gt;SubRecord&lt;/a&gt; - Storage in the cloud&lt;/li&gt;
		&lt;li&gt;Mo8onDb - ?&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.millstonecw.com/dovetaildb/" target="_blank" title="Dovetaildb - DovetailDB is a schemaless, JSON-based database."&gt;Dovetaildb&lt;/a&gt; - DovetailDB is a schemaless, JSON-based database. It is similar in spirit to Amazon's SimpleDB, but allows for javascript to be executed on the server, and, within that context, provides full transaction support.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;ordered‐key‐value‐store: tokyo tyrant, lightcloud, NMDB, luxio, memcachedb, actord
	&lt;ul&gt;
		&lt;li&gt;&lt;a href="http://1978th.net/tokyotyrant/" target="_blank" title="Tokyo Tyrant: network interface of Tokyo Cabinet"&gt;Tokyo Tyrant&lt;/a&gt;: network interface of Tokyo Cabinet&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://opensource.plurk.com/LightCloud/" target="_blank" title="LightCloud - Distributed and persistent key value database (Plurk Open Source)"&gt;LightCloud&lt;/a&gt; - Distributed and persistent key value database (Plurk Open Source)&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blitiri.com.ar/p/nmdb/" target="_blank" title="nmdb - A multiprotocol network database"&gt;nmdb&lt;/a&gt; - A multiprotocol network database&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://luxio.sourceforge.net/" target="_blank" title="http://luxio.sourceforge.net/"&gt;Lux IO&lt;/a&gt; - Yet Another Fast Database Manager&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://code.google.com/p/memcachedb/" target="_blank" title="memcachedb - A distributed key-value storage system designed for persistent."&gt;memcachedb&lt;/a&gt; - A distributed key-value storage system designed for persistent.&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://code.google.com/p/actord/" target="_blank" title="actord - Memcached implementation for the JVM in Scala."&gt;actord&lt;/a&gt; - Memcached implementation for the JVM in Scala. Uses treaps for in memory storage. Treap per cpu for better throughput. Allows for disk storage as well. speak memached protocol.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;data‐structures server: redis
	&lt;ul&gt;
		&lt;li&gt;&lt;a href="http://code.google.com/p/redis/" target="_blank" title="redis - A persistent key-value database with built-in net interface written in ANSI-C for Posix systems"&gt;redis&lt;/a&gt; - A persistent key-value database with built-in net interface written in ANSI-C for Posix systems&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;tuple‐store: gigaspaces, coord, apache river
	&lt;ul&gt;
		&lt;li&gt;&lt;a href="http://blog.gigaspaces.com/" target="_blank" title="GigaSpaces Blog"&gt;GigaSpaces Blog&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.coordguru.com/" target="_blank" title="Coord - An Open Source Project for Large-Scale Data Analysis"&gt;Coord&lt;/a&gt; - An Open Source Project for Large-Scale Data Analysis&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://incubator.apache.org/river/" target="_blank" title="Apache River"&gt;Apache River&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;object database: ZopeDB, db4o, Shoal
	&lt;ul&gt;
		&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Zope_Object_Database" target="_blank" title="ZopeDB - Zope Object Database"&gt;ZopeDB&lt;/a&gt; - Zope Object Database&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.db4o.com/" target="_blank" title="db4o :: Java &amp;amp; .NET Object Database"&gt;db4o&lt;/a&gt; :: Java &amp;amp; .NET Object Database &amp;ndash; Open Source Object Database, Open Source Persistence, Oodb&lt;/li&gt;
		&lt;li&gt;Shoal - ?&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;document store: CouchDB, Mongo, Jackrabbit, XML Databases, ThruDB, CloudKit, Perservere, Riak Basho, Scalaris
	&lt;ul&gt;
		&lt;li&gt;&lt;a href="http://couchdb.apache.org/" target="_blank" title="CouchDB - Apache CouchDB: The CouchDB Project"&gt;CouchDB&lt;/a&gt; - Apache CouchDB: The CouchDB Project&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.mongodb.org/display/DOCS/Home" target="_blank" title="Mongo"&gt;Mongo&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://jackrabbit.apache.org/" target="_blank" title="http://jackrabbit.apache.org/"&gt;Jackrabbit&lt;/a&gt; - Welcome to Apache Jackrabbit&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/XML_database" title="XML Databases"&gt;XML Databases&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://code.google.com/p/thrudb/" target="_blank" title="http://code.google.com/p/thrudb/"&gt;ThruDB&lt;/a&gt; - Document Oriented Database Services&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://getcloudkit.com/" target="_blank" title="http://getcloudkit.com/"&gt;CloudKit&lt;/a&gt; - An Open Web JSON Appliance&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.persvr.org/" target="_blank" title="http://www.persvr.org/"&gt;Persevere&lt;/a&gt;: The JSON database and JavaScript application server&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://riak.basho.com/" target="_blank" title="Riak Basho - A Decentralized Database"&gt;Riak Basho&lt;/a&gt; - A Decentralized Database&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://code.google.com/p/scalaris/" target="_blank" title="Scalaris - Scalaris is a distributed key-value store"&gt;Scalaris&lt;/a&gt; - Scalaris is a distributed key-value store&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;wide columnar store: BigTable, Hbase, Cassandra, Hypertable, KAI, OpenNeptune, Qbase, KDI&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://labs.google.com/papers/bigtable.html" target="_blank" title="Bigtable: A Distributed Storage System for Structured Data"&gt;Bigtable&lt;/a&gt;: A Distributed Storage System for Structured Data&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://hadoop.apache.org/hbase/" target="_blank" title="Hbase"&gt;Hbase&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://incubator.apache.org/cassandra/" target="_blank" title="Cassandra Project"&gt;Cassandra Project&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.hypertable.org/" target="_blank" title="Hypertable: An Open Source, High Performance, Scalable Database"&gt;Hypertable&lt;/a&gt;: An Open Source, High Performance, Scalable Database&lt;/li&gt;
	&lt;li&gt;KAI - ?&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://code.google.com/p/openneptune/" target="_blank" title="OpenNeptune - Distributed Structured Data Storage"&gt;OpenNeptune&lt;/a&gt; - Distributed Structured Data Storage&lt;/li&gt;
	&lt;li&gt;Qbase - ?&lt;/li&gt;
	&lt;li&gt;KDI - ?&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
相關網頁
&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://people.debian.org.tw/~chihchun/2008/06/02/distributed-fault-tolerant-and-schema-free-document-oriented-database/" target="_blank" title="Distributed, fault-tolerant and schema-free document-oriented database"&gt;Distributed, fault-tolerant and schema-free document-oriented database&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.slideshare.net/iso1600/key-value-store" target="_blank" title="分散式 Key Value Store 漫谈"&gt;分散式 Key Value Store 漫谈&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://blog.chinaunix.net/u3/103470/showart_2053656.html" target="_blank" title="Dynamo - Amazon 的 key value 系統簡介"&gt;Dynamo - Amazon 的 key value 系統簡介&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.metabrew.com/article/anti-rdbms-a-list-of-distributed-key-value-stores/" target="_blank" title="Anti-RDBMS: A list of distributed key-value stores"&gt;Anti-RDBMS: A list of distributed key-value stores&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://blog.gslin.org/archives/2008/02/17/1431/" target="_blank" title="memcachedb at Gea-Suan Lin&amp;rsquo;s BLOG"&gt;memcachedb at Gea-Suan Lin&amp;rsquo;s BLOG&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://blog.gslin.org/archives/2009/03/07/1958/" target="_blank" title="Plurk 的 LightCloud at Gea-Suan Lin's BLOG"&gt;Plurk 的 LightCloud at Gea-Suan Lin's BLOG&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.zemanta.com/fruitblog/nosql-meetup-reporton/" target="_blank" title="NoSQL meetup, report"&gt;NoSQL meetup, report&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://highscalability.com/blog/2009/10/8/riak-web-shaped-data-storage-system.html" target="_blank" title="Riak - web-shaped data storage system"&gt;Riak - web-shaped data storage system&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.lshift.net/blog/2009/08/21/yet-another-key-value-database" target="_blank" title="Yet another Key-Value database"&gt;Yet another Key-Value database&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://highscalability.com/product-lightcloud-key-value-database" target="_blank" title="Product: Lightcloud - Key-Value Database"&gt;Product: Lightcloud - Key-Value Database&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/tsungblog/~4/7Vvhi_4w7H0" height="1" width="1"/&gt;</description>
   <link>http://feedproxy.google.com/~r/tsungblog/~3/7Vvhi_4w7H0/key-value-system-category-2009</link>
   <comments>http://plog.longwin.com.tw/news-technology/2009/11/06/key-value-system-category-2009</comments>
   <guid isPermaLink="false">http://plog.longwin.com.tw/news-technology/2009/11/06/key-value-system-category-2009</guid>
      <dc:creator>jon</dc:creator>
      
    <category>News-Technology</category>
         <pubDate>Fri, 06 Nov 2009 20:24:11 +0800</pubDate>
   <source url="http://plog.longwin.com.tw/rss.php?blogId=1&amp;profile=rss20">Tsung's Blog</source>
     <feedburner:origLink>http://plog.longwin.com.tw/news-technology/2009/11/06/key-value-system-category-2009</feedburner:origLink></item>
    <item>
   <title>Apache2 mod_rewirte 於 %2F 的 Bug 修復</title>
   <description>&lt;p&gt;
現在大家都喜歡使用 /user/add, /user/list, /user/del ... 等等的網址, 若要於 Apache2 實現, 可以使用 mod_rewrite 實作.
&lt;/p&gt;
&lt;p&gt;
但是 Apache2 的 mod_rewrite (RewriteRule) 在遇到 %2F 時, 於解析結果會和想像中的不同(%2F = /).
&lt;/p&gt;

&lt;h4&gt;Apache2 設定&lt;/h4&gt;
&lt;p&gt;
Apache2 設定如下述
&lt;/p&gt;
&lt;blockquote&gt;
	&amp;lt;IfModule mod_rewrite.c&amp;gt;
	&lt;br /&gt;
	RewriteEngine On
	&lt;br /&gt;
	RewriteRule ^/s/(.*)$&amp;nbsp; /s?p=$1&amp;amp;%{QUERY_STRING} [PT,L]
	&lt;br /&gt;
	RewriteRule ^/s$&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /s?%{QUERY_STRING} [PT,L]
	&lt;br /&gt;
	&amp;lt;/IfModule&amp;gt;
&lt;/blockquote&gt;
&lt;p&gt;
依此設定說明: /s/xxx 等同於連到 /s.php?p=xxx (/s/xxx = /s.php?p=xxx)
&lt;/p&gt;
&lt;h4&gt;
範例
&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;http://example.com/s/中文%2F測試 =&amp;gt; 查不到結果(直接 404 Not Found 錯誤)&lt;/li&gt;
	&lt;li&gt;http://example.com/s/中文/測試 =&amp;gt; 有結果&lt;/li&gt;
	&lt;li&gt;&lt;q&gt;中文%2F測試&lt;/q&gt; 預期應該收到 p=中文/測試, 但是收不到任何結果, 而且是直接出現 404 Not Found 的錯誤.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
解法
&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;於此篇找到解法: &lt;a href="http://fgiasson.com/blog/index.php/2006/07/19/hack_for_the_encoding_of_url_into_url_pr/" target="_blank" title="Hack for the encoding of a URL into another URL problem with Apache and mod_rewrite"&gt;Hack for the encoding of a URL into another URL problem with Apache and mod_rewrite&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;
解法1
&lt;/h5&gt;
&lt;p&gt;
於 urlencode 後, 把 &amp;quot;%&lt;q&gt;2F&amp;quot;&lt;/q&gt;另外取代回 &amp;quot;/&amp;quot;, 把這個直接包成另外一個 Function.
&lt;/p&gt;
&lt;blockquote&gt;
	&lt;code&gt;
	function url_encode($url)&lt;br /&gt;
	{&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; return str_replace(&amp;quot;%2F&amp;quot;, &amp;quot;/&amp;quot;, urlencode($url));&lt;br /&gt;
	}
	&lt;/code&gt;
&lt;/blockquote&gt;
&lt;h5&gt;
解法2
&lt;/h5&gt;
&lt;p&gt;
於上篇的留言中查到
&lt;/p&gt;
&lt;blockquote&gt;
	If you have Apache &amp;gt;= 2.0.46, you can use the core directive&lt;br /&gt;
	&amp;quot;AllowEncodedSlashes On&amp;quot; to allow %2F in urls
&lt;/blockquote&gt;
&lt;p&gt;
於 Apache2 設定檔中加入 AllowEncodedSlashes On 即可, 範例如下: (Apache2 版本要大於 2.0.46)
&lt;/p&gt;
&lt;blockquote&gt;
	AllowEncodedSlashes On&lt;br /&gt;
	&amp;lt;IfModule mod_rewrite.c&amp;gt;&lt;br /&gt;
	RewriteEngine On&lt;br /&gt;
	RewriteRule ^/s/(.*)$&amp;nbsp; /s?p=$1&amp;amp;%{QUERY_STRING} [PT,L]&lt;br /&gt;
	RewriteRule ^/s$&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /s?%{QUERY_STRING} [PT,L]&lt;br /&gt;
	&amp;lt;/IfModule&amp;gt;
&lt;/blockquote&gt;
&lt;p&gt;
目前我是用 解法2 來解決囉~ :)
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tsungblog/~4/WPSZ34vngHQ" height="1" width="1"/&gt;</description>
   <link>http://feedproxy.google.com/~r/tsungblog/~3/WPSZ34vngHQ/apache2-mod-rewrite-slash-bug-fix-2009</link>
   <comments>http://plog.longwin.com.tw/my_note-unix/2009/11/05/apache2-mod-rewrite-slash-bug-fix-2009</comments>
   <guid isPermaLink="false">http://plog.longwin.com.tw/my_note-unix/2009/11/05/apache2-mod-rewrite-slash-bug-fix-2009</guid>
      <dc:creator>jon</dc:creator>
      
    <category>My_Note-Unix</category>
         <pubDate>Thu, 05 Nov 2009 22:48:06 +0800</pubDate>
   <source url="http://plog.longwin.com.tw/rss.php?blogId=1&amp;profile=rss20">Tsung's Blog</source>
     <feedburner:origLink>http://plog.longwin.com.tw/my_note-unix/2009/11/05/apache2-mod-rewrite-slash-bug-fix-2009</feedburner:origLink></item>
    <item>
   <title>好書: Linux Performance Monitoring 下載 (電子書)</title>
   <description>&lt;p&gt;
Linux 效能調校 與 監控、監看, 該如何做、如何看?
&lt;/p&gt;

&lt;p&gt;
此書有介紹 下述命令該如何觀看.
&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;vmstat&lt;/li&gt;
	&lt;li&gt;mpstat&lt;/li&gt;
	&lt;li&gt;sar&lt;/li&gt;
	&lt;li&gt;iostat&lt;/li&gt;
	&lt;li&gt;netstat&lt;/li&gt;
	&lt;li&gt;dstat&lt;/li&gt;
	&lt;li&gt;iptraf&lt;/li&gt;
	&lt;li&gt;netperf&lt;/li&gt;
	&lt;li&gt;ethtool&lt;/li&gt;
	&lt;li&gt;iperf&lt;/li&gt;
	&lt;li&gt;tcptrace&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
詳細可見: &lt;a href="http://www.sanotes.net/html/y2009/409.html" target="_blank" title="Linux Performance Monitoring.chm 下載"&gt;Linux Performance Monitoring.chm 下載&lt;/a&gt; &lt;a href="http://plog.longwin.com.tw/files/linux_performance_monitoring_2009.chm" target="_blank" title="Linux Performance Monitoring 電子書"&gt;備份&lt;/a&gt;
&lt;/p&gt;
&lt;h4&gt;
筆記
&lt;/h4&gt;
&lt;p&gt;
ps 透過 psr 可以看到 Process 佔用哪個&amp;nbsp; CPU
&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;while :; do ps -eo pid,ni,pri,pcpu,psr,comm | grep 'apache'; sleep 1; done # 看 Aaache&lt;/li&gt;
	&lt;li&gt;while :; do ps -eo pid,ni,pri,pcpu,psr,comm | grep 'mysql'; sleep 1; done # 看 MySQL&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
寫入 Bash alias
&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;vim .bashrc # 加入下述&lt;br /&gt;
	&lt;blockquote&gt;
		alias apachemon='while :; do ps -eo pid,ni,pri,pcpu,psr,comm | grep &amp;quot;apache&amp;quot;; sleep 1; done';&lt;br /&gt;
		alias mysqlmon='while :; do ps -eo pid,ni,pri,pcpu,psr,comm | grep &amp;quot;mysql&amp;quot;; sleep 1; done';
	&lt;/blockquote&gt;
	&lt;/li&gt;
	&lt;li&gt;使用 apachemon, mysqlmon 即可看 Process 對 CPU 的 使用狀況.&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/tsungblog/~4/RVyQQm4s8Is" height="1" width="1"/&gt;</description>
   <link>http://feedproxy.google.com/~r/tsungblog/~3/RVyQQm4s8Is/ebook-linux-performance-monitor-2009</link>
   <comments>http://plog.longwin.com.tw/document-ebook/2009/11/04/ebook-linux-performance-monitor-2009</comments>
   <guid isPermaLink="false">http://plog.longwin.com.tw/document-ebook/2009/11/04/ebook-linux-performance-monitor-2009</guid>
      <dc:creator>jon</dc:creator>
      
    <category>Document-Ebook</category>
         <pubDate>Wed, 04 Nov 2009 20:14:54 +0800</pubDate>
   <source url="http://plog.longwin.com.tw/rss.php?blogId=1&amp;profile=rss20">Tsung's Blog</source>
     <feedburner:origLink>http://plog.longwin.com.tw/document-ebook/2009/11/04/ebook-linux-performance-monitor-2009</feedburner:origLink></item>
    <item>
   <title>好文: 你知道你家有什麼東西最耗電嗎?</title>
   <description>&lt;p&gt;
這篇文章蠻常跟人提起的, 但是每次都要花點時間找, 寫起來比較快~ :)
&lt;/p&gt;

&lt;p&gt;
現在 電價 + 環保 + 節能 的時代, 要怎麼省電、省錢, 除了本身開的在耗電外, 沒拔插頭的耗電狀況要如何查看?
&lt;/p&gt;
&lt;p&gt;
此篇文章的作者使用 &lt;q&gt;電力省電監測器&lt;/q&gt; 測量常用的電器, 如: 電腦、烤麵包機、大同電鍋... 等等.
&lt;/p&gt;
&lt;p&gt;
最讓我意外的是 大同電鍋 在沒有使用時, 所耗的電量還不少, 其它還有電腦硬碟在運轉時、拷貝資料時所耗費的電力數據 等等.
&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;文章詳細可見: &lt;a href="http://www.mobile01.com/topicdetail.php?f=299&amp;amp;t=1078480" target="_blank" title="你知道你家有什麼東西最耗電嗎 + 圖片多請耐心看完!!!"&gt;你知道你家有什麼東西最耗電嗎&lt;/a&gt; - Mobile01 &lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/tsungblog/~4/-QpdVcQXHe4" height="1" width="1"/&gt;</description>
   <link>http://feedproxy.google.com/~r/tsungblog/~3/-QpdVcQXHe4/paper-life-electric-power-2009</link>
   <comments>http://plog.longwin.com.tw/news-life-joke/2009/11/03/paper-life-electric-power-2009</comments>
   <guid isPermaLink="false">http://plog.longwin.com.tw/news-life-joke/2009/11/03/paper-life-electric-power-2009</guid>
      <dc:creator>jon</dc:creator>
      
    <category>News-Life-Joke</category>
         <pubDate>Tue, 03 Nov 2009 21:49:31 +0800</pubDate>
   <source url="http://plog.longwin.com.tw/rss.php?blogId=1&amp;profile=rss20">Tsung's Blog</source>
     <feedburner:origLink>http://plog.longwin.com.tw/news-life-joke/2009/11/03/paper-life-electric-power-2009</feedburner:origLink></item>
    <item>
   <title>Mplayer 開啟 全螢幕 會卡住無法播放 修正</title>
   <description>&lt;p&gt;
升級完 Ubuntu Linux 9.10 後, mplayer 開全螢幕看影片時就會卡住.(影片於 小視窗 都正常, 只要按 f 切到全螢幕, 就會卡住無法播放)
&lt;/p&gt;

&lt;p&gt;
剛開始以為 codecs 有問題, 但是換過都沒有用.
&lt;/p&gt;
&lt;h4&gt;
錯誤訊息
&lt;/h4&gt;
&lt;blockquote&gt;
	Error: /usr/lib/codecs/drvc.bundle/Contents/MacOS/drvc: cannot open shared object file: No such file or directory Win32 LoadLibrary failed to load: drvc.bundle/Contents/MacOS/drvc, /usr/lib/codecs/drvc.bundle/Contents/MacOS/drvc, /usr/lib/win32/drvc.bundle/Contents/MacOS/drvc, /usr/local/lib/win32/drvc.bundle/Contents/MacOS/drvc Error loading dll
&lt;/blockquote&gt;
&lt;h4&gt;
解法
&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;於 Shell 執行: chcon -t textrel_shlib_t /usr/lib/codecs/drv*so* 即可.(chcon - change file security context)&lt;/li&gt;
	&lt;li&gt;參考自: &lt;a href="http://www.linuxsir.org/bbs/archive/index.php/t-306313.html" target="_blank" title="如何讓mplayer撥rm檔? 如何移除軟體才乾淨?"&gt;如何讓mplayer撥rm檔? 如何移除軟體才乾淨?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/tsungblog/~4/9zzxR7k_Zbs" height="1" width="1"/&gt;</description>
   <link>http://feedproxy.google.com/~r/tsungblog/~3/9zzxR7k_Zbs/mplayer-full-screen-stop-2009</link>
   <comments>http://plog.longwin.com.tw/my_note-app-setting/2009/11/02/mplayer-full-screen-stop-2009</comments>
   <guid isPermaLink="false">http://plog.longwin.com.tw/my_note-app-setting/2009/11/02/mplayer-full-screen-stop-2009</guid>
      <dc:creator>jon</dc:creator>
      
    <category>My_Note-App-Setting</category>
         <pubDate>Mon, 02 Nov 2009 11:03:39 +0800</pubDate>
   <source url="http://plog.longwin.com.tw/rss.php?blogId=1&amp;profile=rss20">Tsung's Blog</source>
     <feedburner:origLink>http://plog.longwin.com.tw/my_note-app-setting/2009/11/02/mplayer-full-screen-stop-2009</feedburner:origLink></item>
    <item>
   <title>Ubuntu 9.04 升級到 9.10 Karmic Koala</title>
   <description>&lt;p&gt;
昨天還沒正式釋出就直接升級 9.04 -&amp;gt; 9.10, 升級還算順利~ :)
&lt;/p&gt;
&lt;p&gt;
自從 Ubuntu 9.10 釋出的消息出來後, 今天 apt-get upgrade 都會出現 timeout 的現象. XD
&lt;/p&gt;

&lt;h4&gt;
升級方式
&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;升級方式: &lt;q&gt;sudo update-manager -d&lt;/q&gt;&lt;/li&gt;
	&lt;li&gt;按下 &lt;q&gt;升級&lt;/q&gt; 即可&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
Ubuntu 9.10 下載
&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;官方網站: &lt;a href="http://www.ubuntu.com/" target="_blank" title="Ubuntu Home Page | Ubuntu"&gt;Ubuntu Home Page | Ubuntu&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;正體中文官方網站: &lt;a href="http://www.ubuntu-tw.org/" target="_blank" title="Ubuntu 正體中文站"&gt;Ubuntu 正體中文站&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;現在若想抓 DVD ISO 光碟, 建議使用 BT 來下載, 詳細可見: &lt;a href="http://fourdollars.blogspot.com/2009/10/ubuntu-910-dvd-iso-bittorrent-files.html" target="_blank" title="Ubuntu 9.10 DVD ISO BitTorrent Files"&gt;Ubuntu 9.10 DVD ISO BitTorrent Files&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
Ubuntu One
&lt;/h4&gt;
&lt;p&gt;
Ubuntu 9.10 除了系統更新外, 另外主推得是 &lt;q&gt;Ubuntu One(線上硬碟)&lt;/q&gt;, 類似 &lt;a href="http://www.getdropbox.com/" target="_blank" title="Dropbox"&gt;Dropbox&lt;/a&gt;, 但是整合應該會更完整. (Free 2GB, 每月付 $10 美金, 可升級到 50GB)
&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;官方網站: &lt;a href="https://one.ubuntu.com/" target="_blank" title="Ubuntu One : Home"&gt;Ubuntu One : Home&lt;/a&gt; (&lt;strong&gt;註冊&lt;/strong&gt;, 線上操作) &lt;/li&gt;
	&lt;li&gt;關於 Ubuntu One 的使用 / 操作 / &lt;strong&gt;軟體下載&lt;/strong&gt; / 安裝 / 教學, 可見: &lt;a href="https://wiki.ubuntu.com/UbuntuOne/Tutorials/FileSharing" target="_blank" title="UbuntuOne/Tutorials/FileSharing - Ubuntu Wiki"&gt;UbuntuOne/Tutorials/FileSharing - Ubuntu Wiki&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
升級問題 修正
&lt;/h4&gt;
&lt;p&gt;
升級算是很不錯, 只是踩到一點小地雷.
&lt;/p&gt;
&lt;p&gt;
在升級完成後, 整個桌面亂到不行 (我的桌面一直都是空的), 原因是把 /home/user 所有資料都搬到桌面上來, 可能是 &amp;quot;Desktop -&amp;gt; 桌面&amp;quot; 這些在做設定轉換時, 出了點小問題, 只要修正即可.
&lt;/p&gt;
&lt;h5&gt;
修正方式
&lt;/h5&gt;
&lt;ol&gt;
	&lt;li&gt;vim ~/.config/user-dirs.dirs # 會看到下述, 若 英文 會看到 Desktop, Music .. 等
	&lt;blockquote&gt;
		XDG_DESKTOP_DIR=&amp;quot;$HOME&amp;quot;&lt;br /&gt;
		XDG_DOWNLOAD_DIR=&amp;quot;$HOME/桌面&amp;quot;&lt;br /&gt;
		XDG_TEMPLATES_DIR=&amp;quot;$HOME/模板&amp;quot;&lt;br /&gt;
		XDG_PUBLICSHARE_DIR=&amp;quot;$HOME/公共&amp;quot;&lt;br /&gt;
		XDG_DOCUMENTS_DIR=&amp;quot;$HOME/文件&amp;quot;&lt;br /&gt;
		XDG_MUSIC_DIR=&amp;quot;$HOME/音樂&amp;quot;&lt;br /&gt;
		XDG_PICTURES_DIR=&amp;quot;$HOME/圖片&amp;quot;&lt;br /&gt;
		XDG_VIDEOS_DIR=&amp;quot;$HOME/影片&amp;quot;
	&lt;/blockquote&gt;
	&lt;/li&gt;
	&lt;li&gt;修改成
	&lt;blockquote&gt;
		XDG_DESKTOP_DIR=&amp;quot;$HOME/桌面&amp;quot; # 或 $HOME/Desktop&lt;br /&gt;
		XDG_DOWNLOAD_DIR=&amp;quot;$HOME/桌面&amp;quot;&lt;br /&gt;
		XDG_TEMPLATES_DIR=&amp;quot;$HOME/模板&amp;quot;&lt;br /&gt;
		XDG_PUBLICSHARE_DIR=&amp;quot;$HOME/公共&amp;quot;&lt;br /&gt;
		XDG_DOCUMENTS_DIR=&amp;quot;$HOME/文件&amp;quot;&lt;br /&gt;
		XDG_MUSIC_DIR=&amp;quot;$HOME/音樂&amp;quot;&lt;br /&gt;
		XDG_PICTURES_DIR=&amp;quot;$HOME/圖片&amp;quot;&lt;br /&gt;
		XDG_VIDEOS_DIR=&amp;quot;$HOME/影片&amp;quot;
	&lt;/blockquote&gt;
	&lt;/li&gt;
	&lt;li&gt;執行更新: &lt;strong&gt;xdg-user-dirs-update&lt;/strong&gt;&lt;/li&gt;
	&lt;li&gt;登出 再 登入 即可&lt;/li&gt;
	&lt;li&gt;註: 若 Desktop 或 桌面 資料夾不存在, 記得 mkdir /home/user/Desktop&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
另外輸入法改成 &lt;a href="http://code.google.com/p/ibus/" target="_blank" title="ibus"&gt;ibus&lt;/a&gt;, 感謝 AceLan 的指導, 之後 在整理如何 新增其他輸入法. :P 
&lt;/p&gt;
&lt;h4&gt;
相關網頁
&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://gordon168.tw/?p=332" target="_blank" title="Ubuntu 9.10 Karmic Koala 推出"&gt;Ubuntu 9.10 Karmic Koala 推出&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://yblog.org/archive/index.php/ubuntu_9_10_beta_release" target="_blank" title="Ubuntu 9.10 Karmic Koala Beta公開測試版發表與10個讓人喜歡的改進"&gt;Ubuntu 9.10 Karmic Koala Beta公開測試版發表與10個讓人喜歡的改進&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://moskyat.pixnet.net/blog/post/24226576" target="_blank" title="iBus，linux 平台上新的輸入法框架"&gt;iBus，linux 平台上新的輸入法框架&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/tsungblog/~4/GcYlLaJwkLk" height="1" width="1"/&gt;</description>
   <link>http://feedproxy.google.com/~r/tsungblog/~3/GcYlLaJwkLk/ubuntu-upgrade-910-karmic-koala-release-2009</link>
   <comments>http://plog.longwin.com.tw/news-unix/2009/10/30/ubuntu-upgrade-910-karmic-koala-release-2009</comments>
   <guid isPermaLink="false">http://plog.longwin.com.tw/news-unix/2009/10/30/ubuntu-upgrade-910-karmic-koala-release-2009</guid>
      <dc:creator>jon</dc:creator>
      
    <category>News-Unix</category>
         <pubDate>Fri, 30 Oct 2009 20:20:22 +0800</pubDate>
   <source url="http://plog.longwin.com.tw/rss.php?blogId=1&amp;profile=rss20">Tsung's Blog</source>
     <feedburner:origLink>http://plog.longwin.com.tw/news-unix/2009/10/30/ubuntu-upgrade-910-karmic-koala-release-2009</feedburner:origLink></item>
    <item>
   <title>使用 YUI Compressor 壓縮 CSS / JavaScript</title>
   <description>&lt;p&gt;
使用 Yahoo! 提供的 YUI Compressor 來壓縮(Minify) JavaScript 和 CSS.
&lt;/p&gt;
&lt;p&gt;
註: 此文件操作環境於 Ubuntu / Debian Linux.
&lt;/p&gt;

&lt;h4&gt;
官方文件
&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;
	官方網頁: &lt;a href="http://developer.yahoo.com/yui/compressor/" target="_blank" title="YUI Compressor"&gt;YUI Compressor&lt;/a&gt; - YUI Compressor - The Yahoo! JavaScript and CSS Compressor
	&lt;/li&gt;
	&lt;li&gt;
	說明文件: &lt;a href="http://www.julienlecomte.net/yuicompressor/README" target="_blank" title="YUI Compressor README"&gt;YUI Compressor README&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
環境設定
&lt;/h4&gt;
&lt;ol&gt;
	&lt;li&gt;安裝 Java 執行環境: apt-get install sun-java6-jre&lt;/li&gt;
	&lt;li&gt;下載 yuicompressor-2.4.2.zip&lt;/li&gt;
	&lt;li&gt;unzip yuicompressor-2.4.2.zip&lt;/li&gt;
&lt;/ol&gt;
&lt;h4&gt;
壓縮 JavaScript
&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;java -jar yuicompressor-x.y.z.jar myfile.js -o myfile-min.js --charset utf-8 --type js&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
壓縮 CSS
&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;java -jar yuicompressor-x.y.z.jar myfile.css -o myfile-min.css --charset utf-8 --type css&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
範例
&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;# 不用輸入 --type js / css, yuicompressor 依照檔名也會自動判斷.&lt;/li&gt;
	&lt;li&gt;java -jar yuicompressor-2.4.2.jar myfile.js -o myfile-min.js --charset utf-8 --preserve-semi # 保留分號(--preserve-semi)&lt;/li&gt;
	&lt;li&gt;java -jar yuicompressor-2.4.2.jar myfile.css -o myfile-min.css --charset utf-8&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
參數說明
&lt;/h4&gt;
&lt;blockquote&gt;
	Usage: java -jar yuicompressor-x.y.z.jar [options] [input file]&lt;br /&gt;
	&lt;br /&gt;
	Global Options&lt;br /&gt;
	&amp;nbsp; -h, --help&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Displays this information&lt;br /&gt;
	&amp;nbsp; --type &amp;lt;js|css&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specifies the type of the input file&lt;br /&gt;
	&amp;nbsp; --charset &amp;lt;charset&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Read the input file using &amp;lt;charset&amp;gt;&lt;br /&gt;
	&amp;nbsp; --line-break &amp;lt;column&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Insert a line break after the specified column number&lt;br /&gt;
	&amp;nbsp; -v, --verbose&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Display informational messages and warnings&lt;br /&gt;
	&amp;nbsp; -o &amp;lt;file&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Place the output into &amp;lt;file&amp;gt;. Defaults to stdout.&lt;br /&gt;
	&lt;br /&gt;
	JavaScript Options&lt;br /&gt;
	&amp;nbsp; --nomunge&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Minify only, do not obfuscate&lt;br /&gt;
	&amp;nbsp; --preserve-semi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Preserve all semicolons&lt;br /&gt;
	&amp;nbsp; --disable-optimizations&amp;nbsp;&amp;nbsp; Disable all micro optimizations 
&lt;/blockquote&gt;&lt;img src="http://feeds.feedburner.com/~r/tsungblog/~4/1u0uBrWBPCA" height="1" width="1"/&gt;</description>
   <link>http://feedproxy.google.com/~r/tsungblog/~3/1u0uBrWBPCA/use-yui-compress-css-js-2009</link>
   <comments>http://plog.longwin.com.tw/my_note-unix/2009/10/29/use-yui-compress-css-js-2009</comments>
   <guid isPermaLink="false">http://plog.longwin.com.tw/my_note-unix/2009/10/29/use-yui-compress-css-js-2009</guid>
      <dc:creator>jon</dc:creator>
      
    <category>My_Note-Unix</category>
         <pubDate>Thu, 29 Oct 2009 20:27:54 +0800</pubDate>
   <source url="http://plog.longwin.com.tw/rss.php?blogId=1&amp;profile=rss20">Tsung's Blog</source>
     <feedburner:origLink>http://plog.longwin.com.tw/my_note-unix/2009/10/29/use-yui-compress-css-js-2009</feedburner:origLink></item>
    <item>
   <title>Debian / Ubuntu Linux 使用 MAN 查看 C Library</title>
   <description>&lt;p&gt;
於 Debian / Ubuntu Linux 要使用 MAN 直接查 C 的函式庫、程式範例, 安裝 manpages-dev 即可查詢.
&lt;/p&gt;

&lt;h4&gt;
安裝
&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;
	apt-get install manpages-dev
	&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
查詢
&lt;/h4&gt;
&lt;h5&gt;
列出此 Function 詳細說明與範例
&lt;/h5&gt;
&lt;ul&gt;
	&lt;li&gt;man 3 &amp;lt;function&amp;gt; &lt;/li&gt;
	&lt;li&gt;範例: man 3 printf&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;
列出 與 此字 有關的 Function
&lt;/h5&gt;
&lt;ul&gt;
	&lt;li&gt;man -k &amp;lt;keyword&amp;gt;&lt;/li&gt;
	&lt;li&gt;範例: man -k printf
	&lt;blockquote&gt;
		asprintf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - print to allocated string&lt;br /&gt;
		dprintf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - print to a file descriptor&lt;br /&gt;
		fprintf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - formatted output conversion&lt;br /&gt;
		fwprintf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - formatted wide-character output conversion&lt;br /&gt;
		printf (1)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - format and print data&lt;br /&gt;
		printf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - formatted output conversion&lt;br /&gt;
		snprintf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - formatted output conversion&lt;br /&gt;
		sprintf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - formatted output conversion&lt;br /&gt;
		swprintf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - formatted wide-character output conversion&lt;br /&gt;
		vasprintf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - print to allocated string&lt;br /&gt;
		vdprintf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - print to a file descriptor&lt;br /&gt;
		vfprintf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - formatted output conversion&lt;br /&gt;
		vfwprintf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - formatted wide-character output conversion&lt;br /&gt;
		vprintf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - formatted output conversion&lt;br /&gt;
		vsnprintf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - formatted output conversion&lt;br /&gt;
		vsprintf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - formatted output conversion&lt;br /&gt;
		vswprintf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - formatted wide-character output conversion&lt;br /&gt;
		vwprintf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - formatted wide-character output conversion&lt;br /&gt;
		wprintf (3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - formatted wide-character output conversion
	&lt;/blockquote&gt;
	&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;
列出 MAN 文件位置
&lt;/h5&gt;
&lt;ul&gt;
	&lt;li&gt;man -wa &amp;lt;function&amp;gt;&lt;/li&gt;
	&lt;li&gt;範例: man -wa printf
	&lt;blockquote&gt;
		/usr/share/man/man1/printf.1.gz&lt;br /&gt;
		/usr/share/man/man3/printf.3.gz
	&lt;/blockquote&gt;
	&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/tsungblog/~4/6j8eYZScktM" height="1" width="1"/&gt;</description>
   <link>http://feedproxy.google.com/~r/tsungblog/~3/6j8eYZScktM/linux-man-c-library-howto-2009</link>
   <comments>http://plog.longwin.com.tw/my_note-unix/2009/10/28/linux-man-c-library-howto-2009</comments>
   <guid isPermaLink="false">http://plog.longwin.com.tw/my_note-unix/2009/10/28/linux-man-c-library-howto-2009</guid>
      <dc:creator>jon</dc:creator>
      
    <category>My_Note-Unix</category>
         <pubDate>Wed, 28 Oct 2009 21:26:09 +0800</pubDate>
   <source url="http://plog.longwin.com.tw/rss.php?blogId=1&amp;profile=rss20">Tsung's Blog</source>
     <feedburner:origLink>http://plog.longwin.com.tw/my_note-unix/2009/10/28/linux-man-c-library-howto-2009</feedburner:origLink></item>
    <item>
   <title>PHP 使用 SimpleXML 來解析 XML 內容、屬性</title>
   <description>&lt;p&gt;
PHP 可以使用 &lt;a href="http://www.php.net/manual/en/function.simplexml-load-string.php" target="_blank" title="PHP simplexml_load_string"&gt;simplexml_load_string&lt;/a&gt;、&lt;a href="http://www.php.net/manual/en/function.simplexml-load-file.php" target="_blank" title="PHP simplexml_load_file"&gt;simplexml_load_file&lt;/a&gt; 來解析 XML, 以取得內容.
&lt;/p&gt;

&lt;h4&gt;
程式 與 XML 內容
&lt;/h4&gt;
&lt;blockquote&gt;
	&lt;code&gt;
	&amp;lt;?php&lt;br /&gt;
	$string = &amp;lt;&amp;lt;&amp;lt;XML&lt;br /&gt;
	&amp;lt;?xml version='1.0'?&amp;gt;&lt;br /&gt;
	&amp;lt;document responsecode=&amp;quot;200&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;nbsp; &amp;lt;result count=&amp;quot;10&amp;quot; start=&amp;quot;0&amp;quot; totalhits=&amp;quot;133047950&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;Test&amp;lt;/title&amp;gt;&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;from&amp;gt;Jon&amp;lt;/from&amp;gt;&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;to&amp;gt;Tsung&amp;lt;/to&amp;gt;&lt;br /&gt;
	&amp;nbsp; &amp;lt;/result&amp;gt;&lt;br /&gt;
	&amp;lt;/document&amp;gt;&lt;br /&gt;
	XML;&lt;br /&gt;
	&amp;nbsp;&lt;br /&gt;
	$xml = simplexml_load_string($string);&lt;br /&gt;
	print_r($xml);&lt;br /&gt;
	?&amp;gt;
	&lt;/code&gt;
&lt;/blockquote&gt;
&lt;h4&gt;
XML 解析 的 內容會回傳一個物件
&lt;/h4&gt;
&lt;blockquote&gt;
	&lt;code&gt;
	SimpleXMLElement Object&lt;br /&gt;
	(&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; [@attributes] =&amp;gt; Array&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [responsecode] =&amp;gt; 200&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;br /&gt;
	&amp;nbsp;&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; [result] =&amp;gt; SimpleXMLElement Object&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [@attributes] =&amp;gt; Array&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [count] =&amp;gt; 10&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [start] =&amp;gt; 0&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [totalhits] =&amp;gt; 13304&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;br /&gt;
	&amp;nbsp;&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [title] =&amp;gt; Test&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [from] =&amp;gt; Jon&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [to] =&amp;gt; Tsung&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;br /&gt;
	)
	&lt;/code&gt;
&lt;/blockquote&gt;
&lt;h4&gt;
如何取用此物件回傳的值
&lt;/h4&gt;
&lt;h5&gt;
取得 result 下的 title
&lt;/h5&gt;
&lt;ul&gt;
	&lt;li&gt;$xml-&amp;gt;result-&amp;gt;title; // Test (object)&lt;/li&gt;
	&lt;li&gt;建議: (string)$xml-&amp;gt;result-&amp;gt;title; // 強迫轉換成字串&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;
取得屬性的值(@attributes)
&lt;/h5&gt;
&lt;ul&gt;
	&lt;li&gt;$xml-&amp;gt;result-&amp;gt;attributes()-&amp;gt;totalhits; // 13304 (object), 一樣建議於前面加 (string)&lt;/li&gt;
	&lt;li&gt;或&lt;/li&gt;
	&lt;li&gt;$result_attr = $xml-&amp;gt;result-&amp;gt;attributes();&lt;br /&gt;
	$result_attr['totalhits']; // 13304 (object), 一樣建議於前面加 (string)&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/tsungblog/~4/V1TAjX9ngOo" height="1" width="1"/&gt;</description>
   <link>http://feedproxy.google.com/~r/tsungblog/~3/V1TAjX9ngOo/php-simplexml-parse-attr-content-2009</link>
   <comments>http://plog.longwin.com.tw/programming/2009/10/27/php-simplexml-parse-attr-content-2009</comments>
   <guid isPermaLink="false">http://plog.longwin.com.tw/programming/2009/10/27/php-simplexml-parse-attr-content-2009</guid>
      <dc:creator>jon</dc:creator>
      
    <category>Programming</category>
         <pubDate>Tue, 27 Oct 2009 21:59:24 +0800</pubDate>
   <source url="http://plog.longwin.com.tw/rss.php?blogId=1&amp;profile=rss20">Tsung's Blog</source>
     <feedburner:origLink>http://plog.longwin.com.tw/programming/2009/10/27/php-simplexml-parse-attr-content-2009</feedburner:origLink></item>
    <item>
   <title>使用整個螢幕來顯示輸入的文字(Linux)</title>
   <description>&lt;p&gt;
於 Debian / Ubuntu Linux 要全螢幕的輸入文字讓大家看(特別適用於 Demo), 可以使用 sm 來達成.
&lt;/p&gt;
&lt;p&gt;
詳細可見: &lt;a href="http://packages.debian.org/lenny/sm" target="_blank" title="Debian -- Details of package sm in lenny"&gt;sm&lt;/a&gt; - Displays a short text fullscreen
&lt;/p&gt;

&lt;h4&gt;
安裝 與 使用
&lt;/h4&gt;
&lt;ol&gt;
	&lt;li&gt;apt-get install sm # 安裝&lt;/li&gt;
	&lt;li&gt;sm # 執行&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
即可於全螢幕顯示輸入的內容, Esc 可清除畫面 &amp;amp; 結束. 
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tsungblog/~4/IAFZ6FwL6bU" height="1" width="1"/&gt;</description>
   <link>http://feedproxy.google.com/~r/tsungblog/~3/IAFZ6FwL6bU/linux-use-monitor-show-text-input-2009</link>
   <comments>http://plog.longwin.com.tw/news-application/2009/10/26/linux-use-monitor-show-text-input-2009</comments>
   <guid isPermaLink="false">http://plog.longwin.com.tw/news-application/2009/10/26/linux-use-monitor-show-text-input-2009</guid>
      <dc:creator>jon</dc:creator>
      
    <category>News-Application</category>
         <pubDate>Mon, 26 Oct 2009 21:29:40 +0800</pubDate>
   <source url="http://plog.longwin.com.tw/rss.php?blogId=1&amp;profile=rss20">Tsung's Blog</source>
     <feedburner:origLink>http://plog.longwin.com.tw/news-application/2009/10/26/linux-use-monitor-show-text-input-2009</feedburner:origLink></item>
   </channel>
</rss>
