<?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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>/home/wenlong</title>
	<atom:link href="http://wenlong.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://wenlong.wordpress.com</link>
	<description></description>
	<lastBuildDate>Sun, 15 Jan 2012 09:45:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='wenlong.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/8953dcb5965430e1a41dd2f41ebf416e?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>/home/wenlong</title>
		<link>http://wenlong.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://wenlong.wordpress.com/osd.xml" title="/home/wenlong" />
	<atom:link rel='hub' href='http://wenlong.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Awesome + Xephyr + Devil&#8217;s Pie</title>
		<link>http://wenlong.wordpress.com/2012/01/08/awesome-xephyr-devils-pie/</link>
		<comments>http://wenlong.wordpress.com/2012/01/08/awesome-xephyr-devils-pie/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 05:08:32 +0000</pubDate>
		<dc:creator>wenlong</dc:creator>
				<category><![CDATA[debian, linux, computing]]></category>

		<guid isPermaLink="false">http://wenlong.wordpress.com/?p=817</guid>
		<description><![CDATA[I do a lot of source code editing. Have multiple files opened is common. I used to open multiple gnome-terminals, each one with one file opened. In this way, a lot of screen space was wasted by the gnome-terminal title bar and the window&#8217;s borders. Another way is to use split windows in vim. But [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=817&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://wenlong.files.wordpress.com/2012/01/screenshot-14.png"><img class="aligncenter size-medium wp-image-831" title="" src="http://wenlong.files.wordpress.com/2012/01/screenshot-14.png?w=300&#038;h=187" alt="" width="300" height="187" /></a></p>
<p>I do a lot of source code editing. Have multiple files opened is common. I used to open multiple gnome-terminals, each one with one file opened. In this way, a lot of screen<br />
space was wasted by the gnome-terminal title bar and the window&#8217;s borders. Another way is to use split windows in vim. But still, some space was wasted (split window&#8217;s orders) and mouse selection (terminal mouse support, not the vim mouse support) does not work well. If you have vertical-split windows and try to select more than one line of text, you&#8217;ll end up selecting texts from both windows. Some time ago, I tried tmux. I didn&#8217;t use the session detach feature but the window spliting was great. The window borders were only one pixel, no space wasted. However, the terminal mouse selection problem remained.</p>
<p>Yesterday, I spent a few hours searching the internet and found a way to use gnome-terminal + vim without wasting precious screen space: Awesome + Xephyr + Devil&#8217;s Pie.<br />
The concept is easy, I set up a second desktop (xserver) using Xephyr (my main xserver is running gnome desktop + metacity). In this second desktop, I run the Awesome<br />
window manager. I run all the gnome-terminal + vim inside the second xserver. The Awesome window manager is really awesome. There&#8217;s no window decoration for gnome-terminal so, no space wasted. I can resize all gnome-terminal and swap their position on the screen easily. Terminal mouse selection is also working as desired. But then, the second xserver is running inside a window under metacity. Thus, It has a title bar and window borders. To remove the window decoration, I use Devil&#8217;s Pie.</p>
<p><strong>Install all the software packages (as root):</strong></p>
<pre># aptitude install awesome devilspie</pre>
<p><strong>Create a second xserver (as normal user):</strong></p>
<pre>$ DISPLAY=:0 Xephyr -keybd ephyr,,,xkbmodel=evdev -ac -screen 1280x776 -br -reset -terminate :1 2&gt; /dev/null &amp;</pre>
<ul>
<li>You may want to change to screen size to your need.</li>
<li> The second xserver will be using the DISPLAY=:1</li>
<li> `-keybd ephyr,,,xkbmodel=evdev&#8217; is required to workaround keymap bug. See links below:
<ul>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=19365">https://bugs.freedesktop.org/show_bug.cgi?id=19365</a></li>
<li><a href="http://superuser.com/questions/70428/how-can-i-sort-out-xephyrs-keyboard-mapping">http://superuser.com/questions/70428/how-can-i-sort-out-xephyrs-keyboard-mapping</a></li>
</ul>
</li>
</ul>
<p><strong>Start the awesome window manager in the second xserver:</strong></p>
<pre>$ DISPLAY=:1 awesome &amp;</pre>
<ul>
<li>Now you should see the initially black window of the second xserver comes alive. The awesome window manager is quite different from the metacity, so a bit of learning how-to-use is needed.</li>
</ul>
<p><strong>Remove the title bar of the second xserver:</strong></p>
<pre>$ mkdir ~/.devilspie
$ cat &gt;~/.devilspie/Xephyr.ds &lt;&lt;EOF
(if
    (is (window_class) "Xephyr")
    (begin
        (undecorate)
        (geometry "1280x776+0+24")
    )
)
EOF
$ devilspie -a &amp;</pre>
<ul>
<li>The window containing the second xserver has the window_class &#8220;Xephyr&#8221;.</li>
<li>You may want to change the geometry to fit the screen size when firing up the second xserver.</li>
<li>The geometry &#8220;&#8230;+0+24&#8243; is to reposition the window after removing the title bar.</li>
</ul>
<p>So now, I&#8217;m using the following script to fire up my source code editing session:</p>
<pre>#!/bin/bash
killall devilspie
devilspie ~/.devilspie/Xephyr.ds &amp;
DISPLAY=:0 Xephyr -keybd ephyr,,,xkbmodel=evdev -ac -screen 1280x776 -br -reset -terminate :1 2&gt; /dev/null &amp;
sleep 2 # wait for the xserver to come up.
DISPLAY=:1 awesome &amp;</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wenlong.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wenlong.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wenlong.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wenlong.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wenlong.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wenlong.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wenlong.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wenlong.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wenlong.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wenlong.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wenlong.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wenlong.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wenlong.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wenlong.wordpress.com/817/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=817&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wenlong.wordpress.com/2012/01/08/awesome-xephyr-devils-pie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/894b87dd015049e57db548ca98748455?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wenlong</media:title>
		</media:content>

		<media:content url="http://wenlong.files.wordpress.com/2012/01/screenshot-14.png?w=300" medium="image" />
	</item>
		<item>
		<title>Witty and GWT</title>
		<link>http://wenlong.wordpress.com/2011/12/20/witty-and-gwt/</link>
		<comments>http://wenlong.wordpress.com/2011/12/20/witty-and-gwt/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 04:16:04 +0000</pubDate>
		<dc:creator>wenlong</dc:creator>
				<category><![CDATA[debian, linux, computing]]></category>

		<guid isPermaLink="false">http://wenlong.wordpress.com/?p=806</guid>
		<description><![CDATA[I&#8217;ve been using GWT (http://code.google.com/webtoolkit/) for the past 2 years. Since a week ago, I started to try a new tool called Witty (http://www.webtoolkit.eu/wt/). I first heard of it a year ago I think but didn&#8217;t try it out at that time. Now, I&#8217;ve completed a small project with Witty and I feel good. Much [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=806&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-medium wp-image-810" title="" src="http://wenlong.files.wordpress.com/2011/12/2011-12-20121549.jpg?w=300&#038;h=52" alt="" width="300" height="52" /></p>
<p>I&#8217;ve been using GWT (<a href="http://code.google.com/p/clientsidegchart/">http://code.google.com/webtoolkit/</a>) for the past 2 years. Since a week ago, I started to try a new tool called Witty (<a href="http://www.webtoolkit.eu/wt/">http://www.webtoolkit.eu/wt/</a>). I first heard of it a year ago I think but didn&#8217;t try it out at that time. Now, I&#8217;ve completed a small project with Witty and I feel good. Much like the GWT, Witty uses C++ as the programming language. The main difference between Witty and GWT (besides the programming language) is the way browser and server communicate. In GWT, I need to specifically initiate a call to the server, get the response and process<br />
it, before displaying the result on the page. In Witty, I do not create any calls to the servers. I just need to code in the same way like coding a normal GUI application. Witty takes care of making calls to the server when needed. This can be a pros or cons depending on how you see it. In GWT, client and server are clearly separated. I can replace the server side Java classes with PHP/CGI if needed, as long as the PHP code can encode/decode the messages sent to/received from the browser. Not sure if Witty can do that. Anyway, for all my GWT projects, I&#8217;ve never used other languages for the server side processing. This advantage in GWT may not be really useful (for me at least).</p>
<p>One advantage for using Witty (besides C++ being my favourite programming language) is the built-in support for creating charts. Witty comes with classes for building simple and beautiful charts. Charting support is missing in GWT. I&#8217;ve been using the clientsidegchart or gchart (<a href="http://code.google.com/p/clientsidegchart/">http://code.google.com/p/clientsidegchart/</a>) for my GWT projects. It&#8217;s a very powerful library that allows you to create very sophisticated charts. Unfortunately, the latest release (v2.7) was in June 2010 and the last SVN activity was in the August 2010.</p>
<p>So far, I&#8217;m happy with Witty. Although my small Witty project is far less complex then the GWT&#8217;s, I think I&#8217;m ready to switch. Finally, back to the land of C++. Oops, I forgot to delete pointers in my source codes! Ughhh&#8230; It&#8217;s all Java&#8217;s fault. <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wenlong.wordpress.com/806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wenlong.wordpress.com/806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wenlong.wordpress.com/806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wenlong.wordpress.com/806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wenlong.wordpress.com/806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wenlong.wordpress.com/806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wenlong.wordpress.com/806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wenlong.wordpress.com/806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wenlong.wordpress.com/806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wenlong.wordpress.com/806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wenlong.wordpress.com/806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wenlong.wordpress.com/806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wenlong.wordpress.com/806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wenlong.wordpress.com/806/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=806&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wenlong.wordpress.com/2011/12/20/witty-and-gwt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/894b87dd015049e57db548ca98748455?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wenlong</media:title>
		</media:content>

		<media:content url="http://wenlong.files.wordpress.com/2011/12/2011-12-20121549.jpg?w=300" medium="image" />
	</item>
		<item>
		<title>火龙“花”？</title>
		<link>http://wenlong.wordpress.com/2011/11/13/%e7%81%ab%e9%be%99%e2%80%9c%e8%8a%b1%e2%80%9d%ef%bc%9f/</link>
		<comments>http://wenlong.wordpress.com/2011/11/13/%e7%81%ab%e9%be%99%e2%80%9c%e8%8a%b1%e2%80%9d%ef%bc%9f/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 15:38:12 +0000</pubDate>
		<dc:creator>wenlong</dc:creator>
				<category><![CDATA[生活]]></category>

		<guid isPermaLink="false">http://wenlong.wordpress.com/?p=791</guid>
		<description><![CDATA[火龙果（也称龙珠果）的外形独特、果肉清甜，可它的花究竟长什么样？前两天，笨珍家里的火龙果树开花了，拍了几张相片让大家见识见识。 含苞待放的模样。单是花苞就和一般的花朵不同，气势十足。 午夜十二点左右，花瓣完全张开！好大一朵、纯白的花瓣、淡黄的花蕾。 来个侧拍。 火龙果树只在半夜才开花。峰、蝶应该都睡了，不晓得怎么传播花粉。花开多长的时间？不晓得。可是天亮后，它就成了下面的模样。 照片中的这一朵并不是上面三张照片中的同一朵。当晚有两朵一块儿绽开，但距离有些远，没法一块儿入镜。气势十足、外形独特的花苞，绽开后却是意外的纯白和淡黄。成熟后深红的果实、殷红的果肉，大自然用色真大胆。 Extra: 一旁的树上，看见吗？大概有30cm长哦&#8230;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=791&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>火龙果（也称龙珠果）的外形独特、果肉清甜，可它的花究竟长什么样？前两天，笨珍家里的火龙果树开花了，拍了几张相片让大家见识见识。</p>
<p><img class="aligncenter size-full wp-image-792" title="" src="http://wenlong.files.wordpress.com/2011/11/flower1_huo_long_guo.jpg?w=630" alt=""   /></p>
<p style="text-align:center;">含苞待放的模样。单是花苞就和一般的花朵不同，气势十足。</p>
<p><img class="aligncenter size-full wp-image-794" title="" src="http://wenlong.files.wordpress.com/2011/11/flower3_huo_long_guo.jpg?w=630" alt=""   /></p>
<p style="text-align:center;">午夜十二点左右，花瓣完全张开！好大一朵、纯白的花瓣、淡黄的花蕾。</p>
<p><img class="aligncenter size-full wp-image-793" title="" src="http://wenlong.files.wordpress.com/2011/11/flower2_huo_long_guo.jpg?w=630" alt=""   /></p>
<p style="text-align:center;">来个侧拍。</p>
<p>火龙果树只在半夜才开花。峰、蝶应该都睡了，不晓得怎么传播花粉。花开多长的时间？不晓得。可是天亮后，它就成了下面的模样。<br />
<a href="http://wenlong.files.wordpress.com/2011/11/flower4_huo_long_guo.jpg"><img class="aligncenter size-full wp-image-797" title="flower4_huo_long_guo" src="http://wenlong.files.wordpress.com/2011/11/flower4_huo_long_guo.jpg?w=630" alt=""   /></a></p>
<p style="text-align:center;">照片中的这一朵并不是上面三张照片中的同一朵。当晚有两朵一块儿绽开，但距离有些远，没法一块儿入镜。气势十足、外形独特的花苞，绽开后却是意外的纯白和淡黄。成熟后深红的果实、殷红的果肉，大自然用色真大胆。</p>
<p><img class="aligncenter size-full wp-image-796" title="" src="http://wenlong.files.wordpress.com/2011/11/lizard.jpg?w=630" alt=""   /></p>
<p style="text-align:center;">Extra: 一旁的树上，看见吗？大概有30cm长哦&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wenlong.wordpress.com/791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wenlong.wordpress.com/791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wenlong.wordpress.com/791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wenlong.wordpress.com/791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wenlong.wordpress.com/791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wenlong.wordpress.com/791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wenlong.wordpress.com/791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wenlong.wordpress.com/791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wenlong.wordpress.com/791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wenlong.wordpress.com/791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wenlong.wordpress.com/791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wenlong.wordpress.com/791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wenlong.wordpress.com/791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wenlong.wordpress.com/791/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=791&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wenlong.wordpress.com/2011/11/13/%e7%81%ab%e9%be%99%e2%80%9c%e8%8a%b1%e2%80%9d%ef%bc%9f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/894b87dd015049e57db548ca98748455?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wenlong</media:title>
		</media:content>

		<media:content url="http://wenlong.files.wordpress.com/2011/11/flower1_huo_long_guo.jpg" medium="image" />

		<media:content url="http://wenlong.files.wordpress.com/2011/11/flower3_huo_long_guo.jpg" medium="image" />

		<media:content url="http://wenlong.files.wordpress.com/2011/11/flower2_huo_long_guo.jpg" medium="image" />

		<media:content url="http://wenlong.files.wordpress.com/2011/11/flower4_huo_long_guo.jpg" medium="image">
			<media:title type="html">flower4_huo_long_guo</media:title>
		</media:content>

		<media:content url="http://wenlong.files.wordpress.com/2011/11/lizard.jpg" medium="image" />
	</item>
		<item>
		<title>Load-balancing Tomcats using Apache Web Server.</title>
		<link>http://wenlong.wordpress.com/2011/11/02/load-balancing-tomcats-using-apache-web-server/</link>
		<comments>http://wenlong.wordpress.com/2011/11/02/load-balancing-tomcats-using-apache-web-server/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 03:36:57 +0000</pubDate>
		<dc:creator>wenlong</dc:creator>
				<category><![CDATA[debian, linux, computing]]></category>

		<guid isPermaLink="false">http://wenlong.wordpress.com/?p=778</guid>
		<description><![CDATA[My paid job required me to setup a load balanced system consisted of 2 tomcat servers and 1 Apache Web Server.  The requirement was simple: There were 3 machines (1 for Apache and 2 for tomcat). Incoming traffic went to Apache and then forwarded to the tomcats. There were no need to maintain the sessions.  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=778&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My paid job required me to setup a load balanced system consisted of 2 tomcat servers and 1 Apache Web Server.  The requirement was simple:</p>
<ol>
<li>There were 3 machines (1 for Apache and 2 for tomcat).</li>
<li>Incoming traffic went to Apache and then forwarded to the tomcats.</li>
<li>There were no need to maintain the sessions.  Round robin could be used for load balancing.</li>
<li>The setup should work as a HA: If one tomcat went down, all traffic should go to the working instance.</li>
</ol>
<p>Make sure both Tomcats and Apache web servers are working fine and they can `talk&#8217; to each other.  Then, just add the following into the Apache web server&#8217;s configuration file:</p>
<pre>
# Load all required modules.
LoadModule proxy_module          /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module     /usr/lib/apache2/modules/mod_proxy_http.so
LoadModule proxy_ajp_module      /usr/lib/apache2/modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module /usr/lib/apache2/modules/mod_proxy_balancer.so
LoadModule status_module         /usr/lib/apache2/modules/mod_status.so

# Tomcat must reply within 60 seconds or the connection will timeout.
# All incoming traffic with the URL ending with `/myservice' will be
# sent to one of the two tomcats.
ProxyTimeout        60
ProxyPass           /myservice   balancer://tomcatcluster
ProxyPassReverse    /myservice   balancer://tomcatcluster

# Apache talks to Tomcat using AJP (or commented HTTP) protocol.
# `loadfactor' determines the load distribution for the members.
# Use `ping' to test whether the member is up before sending the request.
&lt;Proxy balancer://tomcatcluster&gt;
    BalancerMember  ajp://tomcat1_ip:8009/myservice loadfactor=1 ping=100
    BalancerMember  ajp://tomcat2_ip:8009/myservice loadfactor=1 ping=100
    # BalancerMember  http://tomcat1_ip:8080/myservice loadfactor=1 ping=100
    # BalancerMember  http://tomcat2_ip:8080/myservice loadfactor=1 ping=100
&lt;/Proxy&gt;

# Point your browser at http://localhost/balancer-manager from the machine
# running the Apache Web Server to access the load balancer manager.
&lt;Location /balancer-manager&gt;
    SetHandler balancer-manager
    Order      Deny,Allow
    Allow from localhost ip6-localhost
&lt;/Location&gt;
</pre>
<p>Restart the Apache Web Server and start sending traffic to it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wenlong.wordpress.com/778/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wenlong.wordpress.com/778/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wenlong.wordpress.com/778/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wenlong.wordpress.com/778/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wenlong.wordpress.com/778/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wenlong.wordpress.com/778/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wenlong.wordpress.com/778/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wenlong.wordpress.com/778/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wenlong.wordpress.com/778/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wenlong.wordpress.com/778/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wenlong.wordpress.com/778/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wenlong.wordpress.com/778/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wenlong.wordpress.com/778/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wenlong.wordpress.com/778/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=778&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wenlong.wordpress.com/2011/11/02/load-balancing-tomcats-using-apache-web-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/894b87dd015049e57db548ca98748455?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wenlong</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Logitech K400 wireless keyboard with Linux</title>
		<link>http://wenlong.wordpress.com/2011/10/30/using-logitech-k400-wireless-keyboard-with-linux/</link>
		<comments>http://wenlong.wordpress.com/2011/10/30/using-logitech-k400-wireless-keyboard-with-linux/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 09:42:35 +0000</pubDate>
		<dc:creator>wenlong</dc:creator>
				<category><![CDATA[debian, linux, computing]]></category>

		<guid isPermaLink="false">http://wenlong.wordpress.com/?p=766</guid>
		<description><![CDATA[Besides the camera, I also bought a very basic computer yesterday equipped with the Logitech K400 wireless keyboard. It will be placed at home beside the LCD TV and be used as a media player and for some light-weight computing tasks. Linux is my favorite OS but I&#8217;m not sure whether the Logitech K400 can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=766&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-medium wp-image-772" title="" src="http://wenlong.files.wordpress.com/2011/10/keyboard_k4001.png?w=300&#038;h=192" alt="" width="300" height="192" /><br />
Besides the camera, I also bought a very basic computer yesterday equipped with the Logitech K400 wireless keyboard. It will be placed at home beside the LCD TV and be used as a media player and for some light-weight computing tasks. Linux is my favorite OS but I&#8217;m not sure whether the Logitech K400 can be used. The Logitech website only specify it supports MS Windows. This post is to confirm that K400 does work with Debian and Ubuntu. It works out-of-the-box with no configurations required.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wenlong.wordpress.com/766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wenlong.wordpress.com/766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wenlong.wordpress.com/766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wenlong.wordpress.com/766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wenlong.wordpress.com/766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wenlong.wordpress.com/766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wenlong.wordpress.com/766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wenlong.wordpress.com/766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wenlong.wordpress.com/766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wenlong.wordpress.com/766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wenlong.wordpress.com/766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wenlong.wordpress.com/766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wenlong.wordpress.com/766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wenlong.wordpress.com/766/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=766&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wenlong.wordpress.com/2011/10/30/using-logitech-k400-wireless-keyboard-with-linux/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/894b87dd015049e57db548ca98748455?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wenlong</media:title>
		</media:content>

		<media:content url="http://wenlong.files.wordpress.com/2011/10/keyboard_k4001.png?w=300" medium="image" />
	</item>
		<item>
		<title>Sony DSC-HX7V</title>
		<link>http://wenlong.wordpress.com/2011/10/29/sony-dsc-hx7v/</link>
		<comments>http://wenlong.wordpress.com/2011/10/29/sony-dsc-hx7v/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 15:20:42 +0000</pubDate>
		<dc:creator>wenlong</dc:creator>
				<category><![CDATA[生活]]></category>

		<guid isPermaLink="false">http://wenlong.wordpress.com/?p=759</guid>
		<description><![CDATA[今天恨下心给自己买了个不便宜的生日礼物，Sony DSC-HX7V。一直想要有个好相机，一度还想买个防水机，可是都没买下手。一直到 Sony DSC-HX9V 的出现，Photography Blog 给了它极高的评价，终于我有个目标了。HX9V 在大马没卖，本来是打算到新加坡买的，可是大马的 Sony 却给 HX7V 打了 RM200 的折扣。本来 HX9V 只贵了 RM55，可现在却变成 RM255。没办法，价钱太诱人了，所以我选择 HX7V，售价是 RM1099。花这么多钱买个 point-and-shoot 好想有点白痴，不过就当作是辛勤工作了一年，犒赏犒赏自己吧！这么想，罪恶感好像就少了点儿<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=759&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-medium wp-image-761" title="" src="http://wenlong.files.wordpress.com/2011/10/imag0297.jpg?w=300&#038;h=180" alt="" width="300" height="180" /><br />
今天恨下心给自己买了个不便宜的生日礼物，Sony DSC-HX7V。一直想要有个好相机，一度还想买个防水机，可是都没买下手。一直到 Sony DSC-HX9V 的出现，Photography Blog 给了它极高的评价，终于我有个目标了。HX9V 在大马没卖，本来是打算到新加坡买的，可是大马的 Sony 却给 HX7V 打了 RM200 的折扣。本来 HX9V 只贵了 RM55，可现在却变成 RM255。没办法，价钱太诱人了，所以我选择 HX7V，售价是 RM1099。花这么多钱买个 point-and-shoot 好想有点白痴，不过就当作是辛勤工作了一年，犒赏犒赏自己吧！这么想，罪恶感好像就少了点儿 <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wenlong.wordpress.com/759/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wenlong.wordpress.com/759/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wenlong.wordpress.com/759/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wenlong.wordpress.com/759/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wenlong.wordpress.com/759/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wenlong.wordpress.com/759/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wenlong.wordpress.com/759/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wenlong.wordpress.com/759/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wenlong.wordpress.com/759/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wenlong.wordpress.com/759/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wenlong.wordpress.com/759/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wenlong.wordpress.com/759/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wenlong.wordpress.com/759/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wenlong.wordpress.com/759/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=759&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wenlong.wordpress.com/2011/10/29/sony-dsc-hx7v/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/894b87dd015049e57db548ca98748455?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wenlong</media:title>
		</media:content>

		<media:content url="http://wenlong.files.wordpress.com/2011/10/imag0297.jpg?w=300" medium="image" />
	</item>
		<item>
		<title>La La La Love Song</title>
		<link>http://wenlong.wordpress.com/2011/09/25/la-la-la-love-song/</link>
		<comments>http://wenlong.wordpress.com/2011/09/25/la-la-la-love-song/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 13:30:59 +0000</pubDate>
		<dc:creator>wenlong</dc:creator>
				<category><![CDATA[音乐]]></category>

		<guid isPermaLink="false">http://wenlong.wordpress.com/?p=749</guid>
		<description><![CDATA[《悠长假期》的主题曲，前几天在电台听到。听着那轻快的旋律，我也要放假！ まわれ まわれ メリーゴーラウンド もう けして止まらないように 动き出したメロディ LA LA LA LA LA LOVE SONG Wanna Make Love Wanna Make Love Song, Hey Baby Wanna Make Love Wanna Make Love Song, Hey Baby ドシャ降りの午后を待って 街にとび出そう 心に降る雨に 伞をくれた君と “まっぴら！”と横向いて 本音はウラハラ でも そのままでいい お互いさまだから めぐり会えた奇迹が You Make Me Feel Brand New 涙の色を変えた And I Wanna Love That&#8217;s Brand [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=749&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>《悠长假期》的主题曲，前几天在电台听到。听着那轻快的旋律，我也要放假！</p>
<span style='text-align:left;display:block;'><p><object type='application/x-shockwave-flash' data='http://s0.wp.com/wp-content/plugins/audio-player/player.swf' width='290' height='24' id='audioplayer1'><param name='movie' value='http://s0.wp.com/wp-content/plugins/audio-player/player.swf' /><param name='FlashVars' value='&amp;bg=0xf8f8f8&amp;leftbg=0xeeeeee&amp;lefticon=0x666666&amp;rightbg=0xcccccc&amp;rightbghover=0x999999&amp;righticon=0x666666&amp;righticonhover=0xffffff&amp;text=0x666666&amp;slider=0x666666&amp;track=0xFFFFFF&amp;border=0x666666&amp;loader=0x9FFFB8&amp;soundFile=http%3A%2F%2Fwenlong.files.wordpress.com%2F2011%2F09%2Fla-la-love-song.ppt' /><param name='quality' value='high' /><param name='menu' value='false' /><param name='bgcolor' value='#FFFFFF' /><param name='wmode' value='opaque' /></object></p></span>
<p>まわれ まわれ メリーゴーラウンド もう けして止まらないように<br />
 动き出したメロディ LA LA LA LA LA LOVE SONG</p>
<p> Wanna Make Love<br />
 Wanna Make Love Song, Hey Baby<br />
 Wanna Make Love<br />
 Wanna Make Love Song, Hey Baby</p>
<p> ドシャ降りの午后を待って 街にとび出そう<br />
 心に降る雨に 伞をくれた君と</p>
<p> “まっぴら！”と横向いて 本音はウラハラ<br />
 でも そのままでいい お互いさまだから</p>
<p> めぐり会えた奇迹が<br />
 You Make Me Feel Brand New<br />
 涙の色を変えた<br />
 And I Wanna Love That&#8217;s Brand New</p>
<p> 息がとまるくらいの 甘いくちづけをしようよ<br />
 ひと言もいらないさ とびきりの今を<br />
 勇気をくれた君に 照れてる场合じゃないから<br />
 言叶よりも 本気な LA LA LA LA LA LOVE SONG</p>
<p> Wanna Make Love<br />
 Wanna Make Love Song, Hey Baby<br />
 Wanna Make Love<br />
 Wanna Make Love Song, Hey Baby</p>
<p> 知らぬ间に落としてた 小さなかけらを<br />
 隙间なく抱きよせ 肌でたしかめあう</p>
<p> 宇宙の见えない夜<br />
 You Are My Shinin&#8217; Star<br />
 かまわない 君が见える<br />
 And I Wanna Be Your Shinin&#8217; Star</p>
<p> まわれ まわれ メリーゴーラウンド もう けして止まらないように<br />
 动き出したメロディ LA LA LA LA LA LOVE SONG<br />
 とめどなく楽しくて やるせないほど 切なくて<br />
 そんな朝に生まれる 仆なりのLOVE SONG</p>
<p> ためいきの前に ここにおいでよ</p>
<p> 息がとまるくらいの 甘いくちづけをしようよ<br />
 ひと言もいらないさ とびきりの今を<br />
 勇気をくれた君に 照れてる场合じゃないから<br />
 言叶よりも 本気な LA LA LA LA LA LOVE SONG</p>
<p> LA LA LA LA&#8230;<br />
 (Wanna Make Love)<br />
 (Wanna Make Love Song)<br />
 LA LA LA LA LA LA LA LA&#8230;<br />
 (Wanna Make Love)<br />
 (Wanna Make Love Song)<br />
 LA LA LA LA LA LA&#8230;<br />
 (Wanna Make Love)<br />
 (Wanna Make Love Song)<br />
 LA LA LA LA LA LA LA LA<br />
 (Wanna Make Love)<br />
 (Wanna Make Love Song)</p>
<p>中文翻译：<br />
转啊转 旋转木马<br />
就像源源不绝 跃动而出的旋律<br />
LA.LA.LA LOVE SONG</p>
<p>Wanna Make Love<br />
Wanna Make Love Song,Hey Baby&#8230;.</p>
<p>等待倾盆大雨的午后 飞奔到大街上吧<br />
偕同为我阴雨心灵撑起伞的你</p>
<p>「门都没有!」你别开脸 其实却是口是心非<br />
不过这样就好了 毕竟我们都半斤八两</p>
<p>相逢的奇迹<br />
You Make Me Feel Brand New<br />
改变了泪水的颜色<br />
And I Wanna Love That`s Brand New</p>
<p>*让我们甜蜜热吻如将窒息 什麼都不用多说<br />
在这无以言谕的时刻 对给我勇气的你<br />
现在不是害羞的时候<br />
天花乱坠不如出自内心的LA.LA.LA LOVE SONG</p>
<p>Wanna Make Love<br />
Wanna Make Love Song,Hey Baby&#8230;.</p>
<p>将不知不觉之间遗落的小细节</p>
<p>不留空隙紧紧抱住 用身体去感觉</p>
<p>看不见宇宙的夜<br />
You Are My Shinin Star<br />
无所谓 我看见你的存在<br />
And I Wanna Be Your Shinin Star</p>
<p>转啊转 旋转木马<br />
就像源源不绝 跃动而出的旋律<br />
LA.LA.LA LOVE SONG<br />
快乐的无法抑制 悲伤得近几无法排遣<br />
诞生於这样一个早晨的是 我独特的Love Song</p>
<p>叹息之前 到这儿来吧</p>
<p>*Repeat</p>
<p>LA.LA.LA&#8230;.<br />
Wanna Make Love<br />
Wanna Make Love Song,Hey Baby&#8230;.</p>
<p><span style="text-align:center; display: block;"><a href="http://wenlong.wordpress.com/2011/09/25/la-la-la-love-song/"><img src="http://img.youtube.com/vi/Q_YV3InyFoo/2.jpg" alt="" /></a></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wenlong.wordpress.com/749/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wenlong.wordpress.com/749/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wenlong.wordpress.com/749/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wenlong.wordpress.com/749/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wenlong.wordpress.com/749/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wenlong.wordpress.com/749/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wenlong.wordpress.com/749/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wenlong.wordpress.com/749/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wenlong.wordpress.com/749/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wenlong.wordpress.com/749/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wenlong.wordpress.com/749/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wenlong.wordpress.com/749/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wenlong.wordpress.com/749/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wenlong.wordpress.com/749/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=749&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wenlong.wordpress.com/2011/09/25/la-la-la-love-song/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/894b87dd015049e57db548ca98748455?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wenlong</media:title>
		</media:content>

		<media:content url="http://img.youtube.com/vi/Q_YV3InyFoo/2.jpg" medium="image" />

		<media:content url="http://wenlong.files.wordpress.com/2011/09/la-la-love-song.ppt" medium="audio">
			<media:player url="http://wenlong.wordpress.com/wp-content/plugins/audio-player/player.swf?soundFile=http://wenlong.files.wordpress.com/2011/09/la-la-love-song.ppt" />
		</media:content>
	</item>
		<item>
		<title>《我是一只小小鸟》</title>
		<link>http://wenlong.wordpress.com/2011/09/08/%e3%80%8a%e6%88%91%e6%98%af%e4%b8%80%e5%8f%aa%e5%b0%8f%e5%b0%8f%e9%b8%9f%e3%80%8b/</link>
		<comments>http://wenlong.wordpress.com/2011/09/08/%e3%80%8a%e6%88%91%e6%98%af%e4%b8%80%e5%8f%aa%e5%b0%8f%e5%b0%8f%e9%b8%9f%e3%80%8b/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 13:36:17 +0000</pubDate>
		<dc:creator>wenlong</dc:creator>
				<category><![CDATA[生活]]></category>
		<category><![CDATA[音乐]]></category>

		<guid isPermaLink="false">http://wenlong.wordpress.com/?p=738</guid>
		<description><![CDATA[难过的时候总是喜欢听这首歌吧… 《我是一只小小鸟》 作词:李宗盛 作曲:李宗盛 演唱:赵传 有时后我觉得自己像一只小小鸟 想要飞 却怎么样也飞不高 也许有一天我栖上枝头 却成为猎人的目标 我飞上了青天才发现自己 从此无依无靠 每次到了夜深人静的时后我总是睡不着 我怀疑是不是只有我的明天会有变得更好 未来会怎样究竟有谁会知道 幸福是否只是一种传说 我永远都找不到 #我是一只小小小小鸟 想要飞呀飞却飞也飞不高 我寻寻觅觅寻寻觅觅一个温暖的怀抱 这样的要求算不算太高 Repeat # 所有知道我的名字的人啊 你们好不好 世界是如此的小 我们注定无处可逃 当我尝尽人情冷暖 当你决定为了你的理想燃烧 生活的压力与生命的尊严哪一个重要<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=738&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>难过的时候总是喜欢听这首歌吧…</p>
<span style='text-align:left;display:block;'><p><object type='application/x-shockwave-flash' data='http://s0.wp.com/wp-content/plugins/audio-player/player.swf' width='290' height='24' id='audioplayer1'><param name='movie' value='http://s0.wp.com/wp-content/plugins/audio-player/player.swf' /><param name='FlashVars' value='&amp;bg=0xf8f8f8&amp;leftbg=0xeeeeee&amp;lefticon=0x666666&amp;rightbg=0xcccccc&amp;rightbghover=0x999999&amp;righticon=0x666666&amp;righticonhover=0xffffff&amp;text=0x666666&amp;slider=0x666666&amp;track=0xFFFFFF&amp;border=0x666666&amp;loader=0x9FFFB8&amp;soundFile=http%3A%2F%2Fwenlong.files.wordpress.com%2F2011%2F09%2Flittlebird.ppt' /><param name='quality' value='high' /><param name='menu' value='false' /><param name='bgcolor' value='#FFFFFF' /><param name='wmode' value='opaque' /></object></p></span>
<p>《我是一只小小鸟》<br />
作词:李宗盛 作曲:李宗盛 演唱:赵传</p>
<p>有时后我觉得自己像一只小小鸟<br />
想要飞 却怎么样也飞不高<br />
也许有一天我栖上枝头 却成为猎人的目标<br />
我飞上了青天才发现自己 从此无依无靠</p>
<p>每次到了夜深人静的时后我总是睡不着<br />
我怀疑是不是只有我的明天会有变得更好<br />
未来会怎样究竟有谁会知道<br />
幸福是否只是一种传说 我永远都找不到</p>
<p>#我是一只小小小小鸟<br />
想要飞呀飞却飞也飞不高<br />
我寻寻觅觅寻寻觅觅一个温暖的怀抱<br />
这样的要求算不算太高<br />
Repeat #</p>
<p>所有知道我的名字的人啊 你们好不好<br />
世界是如此的小 我们注定无处可逃<br />
当我尝尽人情冷暖 当你决定为了你的理想燃烧<br />
生活的压力与生命的尊严哪一个重要</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wenlong.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wenlong.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wenlong.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wenlong.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wenlong.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wenlong.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wenlong.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wenlong.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wenlong.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wenlong.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wenlong.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wenlong.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wenlong.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wenlong.wordpress.com/738/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=738&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wenlong.wordpress.com/2011/09/08/%e3%80%8a%e6%88%91%e6%98%af%e4%b8%80%e5%8f%aa%e5%b0%8f%e5%b0%8f%e9%b8%9f%e3%80%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/894b87dd015049e57db548ca98748455?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wenlong</media:title>
		</media:content>

		<media:content url="http://wenlong.files.wordpress.com/2011/09/littlebird.ppt" medium="audio">
			<media:player url="http://wenlong.wordpress.com/wp-content/plugins/audio-player/player.swf?soundFile=http://wenlong.files.wordpress.com/2011/09/littlebird.ppt" />
		</media:content>
	</item>
		<item>
		<title>CyanogenMod on my HTC Desire (finally)</title>
		<link>http://wenlong.wordpress.com/2011/08/30/cyanogenmod-on-my-htc-desire-finally/</link>
		<comments>http://wenlong.wordpress.com/2011/08/30/cyanogenmod-on-my-htc-desire-finally/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 15:55:28 +0000</pubDate>
		<dc:creator>wenlong</dc:creator>
				<category><![CDATA[生活]]></category>
		<category><![CDATA[debian, linux, computing]]></category>

		<guid isPermaLink="false">http://wenlong.wordpress.com/?p=727</guid>
		<description><![CDATA[Today is a public holiday, got nothing to do, so I decided to install the famous custom rom CyanogenMod http://www.cyanogenmod.com/ on my one-year-old HTC Desire. There are 4 steps to install it: Install a custom recovery image. Install rom manager. Create a full backup (nandroid backup). Download and install the CyanogenMod custom rom. 1. Install a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=727&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-medium wp-image-731" title="cyanogenmod" src="http://wenlong.files.wordpress.com/2011/08/cyanogenmod.png?w=300&#038;h=64" alt="" width="300" height="64" /></p>
<p>Today is a public holiday, got nothing to do, so I decided to install the famous custom rom CyanogenMod <a href="http://www.cyanogenmod.com/">http://www.cyanogenmod.com/</a> on my one-year-old HTC Desire. There are 4 steps to install it:</p>
<ol>
<li>Install a custom recovery image.</li>
<li>Install rom manager.</li>
<li>Create a full backup (nandroid backup).</li>
<li>Download and install the CyanogenMod custom rom.</li>
</ol>
<p><strong>1. Install a custom recovery image</strong><br />
To install a custom recovery image, I used <strong>unrevoked3</strong> <a href="http://www.unrevoked.com/recovery/">http://www.unrevoked.com/recovery/</a>.  Read the instructions on the website, but basic steps are:</p>
<ol>
<li>Download a shell script (I&#8217;m using the linux version).</li>
<li>Run it with <strong>root</strong> user.</li>
<li>Enable <strong>USB debugging</strong> on the phone.</li>
<li>Connect the phone to the computer.</li>
<li>Wait patiently.</li>
</ol>
<p>For my case, the phone rebooted twice if not mistaken (i did this several months ago to gain root access but not flashing any custom rom).  I succeeded in the first try.  Some people will have to try a few times before flashing it successfully.</p>
<p><strong>2. Install rom manager</strong><br />
Use the <strong>Market</strong> app to install an application called <strong>Rom Manager</strong>.  First running it, it will ask you to install the <strong>ClockworkMod Recovery Image</strong>. Install it.</p>
<p><strong>3. Create a full backup (nandroid backup)</strong><br />
Use the <strong>Rom Manager</strong> to create a full backup (nandroid backup).  This backup is important.  In case of something goes wrong, you&#8217;ll need this to restore your phone to its current state (running official HTC Desire rom).  The backup process will actually reboot your phone into recovery mode and create the backup in your SD card.  So, make sure you have some free space there.  Once done, your phone will be rebooted normally.  Now, I&#8217;ll copy the nandroid backup (/sdcard/clockworkmod/backup/) to my computer just in case something bad happen to my SD card later.</p>
<p><strong>4. Download and install the CyanogenMod custom rom</strong><br />
Use the <strong>Rom Manager</strong> to download the custom rom.  There is list of popular roms for you to choose from.  I selected the CyanogenMod 7.0.3 (current stable).  The app will download the rom and once completed, it will prompt you to:</p>
<ul>
<li>Backup existing ROM (not selected)</li>
<li>Wipe Data and Cache (not selected)</li>
<li>Wipe Dalvik Cache (selected)</li>
</ul>
<p>We have created a full backup, so the first option is not needed.  If this is the first time you install this custom rom, you must select the second option (wipe data and cache)*.  You phone will then rebooted into recovery mode and the flashing process will be started.  Wait for a while and you should have your HTC Desire running Gingerbread  <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ve been playing with the new rom for the last couple of hours.  Many things are much better than froyo but unfortunately, I lost all Google apps.  I manage to install the <strong>Market</strong> by installing <strong>Google Apps</strong> add-on in the <strong>Rom</strong> <strong>Manager</strong>, but there were no <strong>Gmail</strong>, <strong>GoogleMaps</strong> and some other Google apps in the <strong>Market</strong>.  GoogleMaps is the most useful Google apps so I installed the <strong>Brut</strong> version <a href="http://forum.xda-developers.com/showthread.php?t=630887">http://forum.xda-developers.com/showthread.php?t=630887</a> which allows me to use the navigation in my country.  Another missing part was the Chinese keyboard.  The default Android keyboard does not support Chinese input.  Luckily, someone created a wonderfully keyboard app called <strong>MultiLing Keyboard</strong> and it is available in the <strong>Market</strong>.  It has a lot of plugins.  To support Chinese input via Pinyin, you&#8217;ll have to install <strong>Plugin.Chinese.Pinyin.拼音</strong> To support hand-writing input, <strong>Plugin HanWriting</strong> is required.  It is such a wonderful application.  So much better than the official HTC IME keyboard (which also support pinyin and hand-writing inputs).</p>
<p>* I didn&#8217;t select the second option during my installation and my phone simply failed to start up after completing the whole flashing process.  It kept looping at the splash screen and I had to pull the battery to stop it.  Luckily, I was able to get back into the recovery mode**, wipe out all the data/cache and reflash the rom.  Don&#8217;t make the same mistake I did.</p>
<p>** To get into the recovery mode, turn off the phone and then turn it on by holding down the <strong>volume down</strong> button.  You&#8217;ll see a bootloader screen.  Use volume up/down button to select <strong>recovery mode</strong>, then press the <strong>power</strong> button to activate it.  The recovery mode is actually the <strong>ClockworkMod</strong> recovery image installed in step 1 or 2.  With it, you can create nandroid backup, restore from a nandroid backup, install custom rom, wipe out caches and many more.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wenlong.wordpress.com/727/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wenlong.wordpress.com/727/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wenlong.wordpress.com/727/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wenlong.wordpress.com/727/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wenlong.wordpress.com/727/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wenlong.wordpress.com/727/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wenlong.wordpress.com/727/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wenlong.wordpress.com/727/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wenlong.wordpress.com/727/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wenlong.wordpress.com/727/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wenlong.wordpress.com/727/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wenlong.wordpress.com/727/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wenlong.wordpress.com/727/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wenlong.wordpress.com/727/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=727&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wenlong.wordpress.com/2011/08/30/cyanogenmod-on-my-htc-desire-finally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/894b87dd015049e57db548ca98748455?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wenlong</media:title>
		</media:content>

		<media:content url="http://wenlong.files.wordpress.com/2011/08/cyanogenmod.png?w=300" medium="image">
			<media:title type="html">cyanogenmod</media:title>
		</media:content>
	</item>
		<item>
		<title>Send cronjob output to multiple email addresses.</title>
		<link>http://wenlong.wordpress.com/2011/08/18/send-cronjob-output-to-multiple-email-addresses/</link>
		<comments>http://wenlong.wordpress.com/2011/08/18/send-cronjob-output-to-multiple-email-addresses/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 02:24:58 +0000</pubDate>
		<dc:creator>wenlong</dc:creator>
				<category><![CDATA[debian, linux, computing]]></category>

		<guid isPermaLink="false">http://wenlong.wordpress.com/?p=718</guid>
		<description><![CDATA[By default, cronjob will send the output of the command to the owner&#8217;s system mail box. In Linux, you can route the mail using MAILTO=user@server.com * * * * * /some/command.sh in the crontab. Some how, if I did that in Solaris, I got the following error: MAILTO=user@server.com crontab: error on previous line; unexpected character [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=718&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>By default, cronjob will send the output of the command to the owner&#8217;s system mail box.  In Linux, you can route the mail using</p>
<pre>
MAILTO=user@server.com
* * * * * /some/command.sh
</pre>
<p>in the crontab.</p>
<p>Some how, if I did that in Solaris, I got the following error:</p>
<pre>
MAILTO=user@server.com
crontab: error on previous line; unexpected character found in line.
crontab: errors detected in input, no crontab file generated.
</pre>
<p>So, I have to use mail aliases.  First, I&#8217;ll have to edit the file</p>
<pre>
vi /etc/mail/aliases
</pre>
<p>Assume the cronjob owner is called <strong>user1</strong> and I need to leave the cronjob result in the owner&#8217;s inbox, forward a copy to <strong>user2</strong> and another copy to an external email address <strong>user@server.com</strong>, I&#8217;ll add the following lines to the end of the file.</p>
<pre>
user1:user1,user2,user@server.com
</pre>
<p>Then, I&#8217;ll refresh the mail system&#8217;s alias database with the following command:</p>
<pre>
newaliases
</pre>
<p>That&#8217;s all.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wenlong.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wenlong.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wenlong.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wenlong.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wenlong.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wenlong.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wenlong.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wenlong.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wenlong.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wenlong.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wenlong.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wenlong.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wenlong.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wenlong.wordpress.com/718/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wenlong.wordpress.com&amp;blog=5295889&amp;post=718&amp;subd=wenlong&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wenlong.wordpress.com/2011/08/18/send-cronjob-output-to-multiple-email-addresses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/894b87dd015049e57db548ca98748455?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wenlong</media:title>
		</media:content>
	</item>
	</channel>
</rss>
