<?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/"
	>

<channel>
	<title>ChiaoCheng.com</title>
	<atom:link href="http://www.chiaocheng.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chiaocheng.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 09 Mar 2010 08:20:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Battlefield Bad Company 2: thoughts</title>
		<link>http://www.chiaocheng.com/2010/03/battlefield-bad-company-2-thoughts/</link>
		<comments>http://www.chiaocheng.com/2010/03/battlefield-bad-company-2-thoughts/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 08:20:31 +0000</pubDate>
		<dc:creator>chiao</dc:creator>
				<category><![CDATA[Games]]></category>

		<guid isPermaLink="false">http://www.chiaocheng.com/?p=281</guid>
		<description><![CDATA[
Bad Company 2 has finally been released.  Since I passed on Modern Warfare, I hoped that Bad Company 2 would be everything I wanted.   As reviews for the game came out, I realized that at least one aspect of the game did not meet my expectations.  But overall, it appears that the game [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-282 aligncenter" title="battlefield-bad-company-2" src="http://www.chiaocheng.com/wp-content/uploads/2010/03/battlefield-bad-company-2.jpg" alt="battlefield-bad-company-2" width="490" height="347" /></p>
<p>Bad Company 2 has finally been released.  Since I passed on Modern Warfare, I hoped that Bad Company 2 would be everything I wanted.   As reviews for the game came out, I realized that at least one aspect of the game did not meet my expectations.  But overall, it appears that the game got good reviews and most importantly it does not have any deal breakers for me.</p>
<h2 id="toc-the-bad">The Bad</h2>
<p>Before the game was released, I had see online reports that Bad Company 2 was going to support up to 40 players on the PC.  But unfortunately, it seems like the game only supports 32 players now.  Even though this is still better than the measly 18 players for Modern Warfare 2, I am still disappointed that it&#8217;s not 40 players.</p>
<h2 id="toc-the-good">The Good</h2>
<p>Destruction, destruction, destruction.  Can&#8217;t really say this enough because almost everything can be destroyed in the game.  No words can do this justice so just go out and find a video where you can see this happen!</p>
<p>Although 32 players are not as good as my expected 40 or 64 from other Battlefield games, I will give this game credit for increasing the number of players for the PC.  The xbox and playstation versions of the game are limited to 24 players which is too bad.  But understanding that the PC can handle more and actually using that power is just a smart move on the developer and should keep the PC gamers, including me, happy.</p>
<h2 id="toc-conclusion">Conclusion</h2>
<p>I will be giving this game a go as soon as soon as I get my new graphics card.  I&#8217;ll see you on the battlefield solder!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chiaocheng.com/2010/03/battlefield-bad-company-2-thoughts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux remote screen lock</title>
		<link>http://www.chiaocheng.com/2009/12/linux-remote-screen-lock/</link>
		<comments>http://www.chiaocheng.com/2009/12/linux-remote-screen-lock/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 02:45:03 +0000</pubDate>
		<dc:creator>chiao</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[lock]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[screen saver]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[x11]]></category>

		<guid isPermaLink="false">http://www.chiaocheng.com/?p=274</guid>
		<description><![CDATA[You can activate your linux screen saver or screen lock by running this command:
gnome-screensaver-command --lock
or
xlock
But if you ssh into your linux machine to activate the screen lock or screen saver, you might run into this error:
** Message: Failed to connect to the D-BUS daemon: dbus-launch failed to
autolaunch D-Bus session: Autolaunch error: X11 initialization failed.
or
No protocol [...]]]></description>
			<content:encoded><![CDATA[<p>You can activate your linux screen saver or screen lock by running this command:
<pre class="brush:shell; gutter:false">gnome-screensaver-command --lock</pre>
<p>or
<pre class="brush:shell; gutter:false">xlock</pre>
<p>But if you ssh into your linux machine to activate the screen lock or screen saver, you might run into this error:</p>
<pre>** Message: Failed to connect to the D-BUS daemon: dbus-launch failed to
autolaunch D-Bus session: Autolaunch error: X11 initialization failed.</pre>
<p>or</p>
<pre>No protocol specified
xscreensaver: Can't open display: :0.0</pre>
<p>You have to set the DBUS_SESSION_BUS_ADDRESS environment variable in order the command to work.  You can find the current running DBUS address by first getting the process id of the running screen saver.  Then grepping for the address in the environ file.  The following script will lock your linux terminal:
<pre class="brush:shell">#!/bin/sh

PID=`pgrep -u $USER -f &quot;gnome-screensaver&quot;`
DBUS_SESSION_BUS_ADDRESS=`grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ`
DBUS_SESSION_BUS_ADDRESS=`echo $DBUS_SESSION_BUS_ADDRESS | sed -e 's/DBUS_SESSION_BUS_ADDRESS=//'`
export DBUS_SESSION_BUS_ADDRESS

gnome-screensaver-command --lock</pre>
<p>Holy remote locking Batman!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chiaocheng.com/2009/12/linux-remote-screen-lock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modern Warfare 2: Released but not recommended</title>
		<link>http://www.chiaocheng.com/2009/11/modern-warfare-2-released-but-not-recommended/</link>
		<comments>http://www.chiaocheng.com/2009/11/modern-warfare-2-released-but-not-recommended/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 20:43:23 +0000</pubDate>
		<dc:creator>chiao</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[doa]]></category>
		<category><![CDATA[fps]]></category>
		<category><![CDATA[recommendation]]></category>

		<guid isPermaLink="false">http://www.chiaocheng.com/?p=254</guid>
		<description><![CDATA[I have been urging to get my hands on a new FPS (first person shooter) game for a while now since my main FPS is the super old Battlefield 2 game! I thought about getting Modern Warfare 1 but I noticed both Modern Warfare 2 and Bad Company 2 were coming out soon. I decided to [...]]]></description>
			<content:encoded><![CDATA[<p>I have been urging to get my hands on a new FPS (first person shooter) game for a while now since my main FPS is the super old Battlefield 2 game! I thought about getting Modern Warfare 1 but I noticed both Modern Warfare 2 and Bad Company 2 were coming out soon. I decided to wait and see.</p>
<p><img class="size-full wp-image-270 alignright" title="mw2logo" src="http://www.chiaocheng.com/wp-content/uploads/2009/11/mw2logo.png" alt="mw2logo" width="202" height="39" />Well today Modern Warfare 2 has been released! So I decided to poke around the internet to see what the word is. And my verdict is&#8230; not recommended.  I have decided that I will not buy Modern Warfare 2 based on two main deal breakers.</p>
<h2 id="toc-deal-breaker-1-18-player-limit">Deal breaker #1: 18 player limit</h2>
<p>Say what!  That&#8217;s right, it appears that Modern Warfare 2 is limited to 18 players.  Not 18 players on each side, but 18 players total, that&#8217;s 9v9 tops.  Personally, I love playing with a huge number of players because it just feels more like the scenes from the movie Saving Private Ryan.  And I think that&#8217;s awesome.  I love the concept of organized chaos which is what you get from 32 or 64 players duking it out while sub-dividing into miniature rambo teams.  With a maximum of 9 players on your side, half of them may be dead at any one time so that really leaves you 4 guys running around at a time.</p>
<p>If you&#8217;re a console guy, then you&#8217;re probably saying what&#8217;s the big deal?  And I would say it&#8217;s not a big deal to you.  For console games, this is pretty much the norm and this is what you expect.  More power to you.  But I am personally a PC guy and I am accustom to games that support up to 64 players.</p>
<h2 id="toc-deal-breaker-2-no-dedicated-servers">Deal breaker #2: no dedicated servers</h2>
<p>Initially I didn&#8217;t even know what this meant.  This basically means Infinity Ward, the creators of the game, will not have any game servers setup for people to play on.  The game is designed to be hosted directly on one of the client&#8217;s or player&#8217;s machines.  So yes, one lucky player in a given game will be hosting the game.  Based on my experience with FPS games and ping, this may give an unfair advantage to the player hosting the game as his ping will be virtually zero.  I have on many occassions, when my ping was super low, been able to defy death, almost in an omni-potent way, seen hoards of enemy shooting at me but always missing, as if they were targeting thin air.</p>
<h2 id="toc-conclusion">Conclusion</h2>
<p>A good summary is the title I have been seeing around the internet&#8230; Modern Warfare 2, DOA.  For those who are unfamiliar with that acronym, it stands for dead on arrival and is a common phrase seen when purchasing computer hardware.</p>
<p>Check out the funny ratings from <a title="GameSpot" href="http://www.gamespot.com/pc/action/modernwarfare2/players.html?tag=player-reviews;header;more" target="_blank">GameSpot</a> and <a title="IGN" href="http://pc.ign.com/objects/142/14280895.html" target="_blank">IGN</a>.</p>
<div id="attachment_266" class="wp-caption aligncenter" style="width: 410px"><img class="size-full wp-image-266" title="modern-warfare-2-rating" src="http://www.chiaocheng.com/wp-content/uploads/2009/11/modern-warfare-2-rating1.gif" alt="Ratings from GameSpot and IGN" width="400" height="400" /><p class="wp-caption-text">Ratings from GameSpot and IGN</p></div>
<p>For now, I will be waiting for Bad Company 2.  While I have read that it can support a maximum of 40 players, the game is still to a bit too far from release to know for sure.  So hopefully it won&#8217;t let me down.  If it does, well there is always Modern Warfare 1.</p>
<p>Finally, here are some direct quotes that made me laugh (disclaimer: quotes do not necessarily represent the author&#8217;s opinions):</p>
<ul>
<li>Take $60 out and burn it&#8230;least you get warm -zippythezip (GameSpot)</li>
<li>it&#8217;s like mw but then crippled -ATFNeOpHyTe (GameSpot)</li>
<li>Screw you consoles!!!!!!! -ZeppelinE6 (GameSpot)</li>
<li>outside of consoles this game is already DOA -doorules (IGN)</li>
<li>If I wanted to play 9 vrs 9 on small maps I would just reinstall my old Doom disks. -jdwksu (IGN)</li>
<li>Complete and utter failure, a 10 year step back in PC gaming -Liksecken (GameSpot)</li>
</ul>
<p>Holy bad PR, Batman!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chiaocheng.com/2009/11/modern-warfare-2-released-but-not-recommended/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wordpress: No Page comments</title>
		<link>http://www.chiaocheng.com/2009/07/wordpress-no-page-comments/</link>
		<comments>http://www.chiaocheng.com/2009/07/wordpress-no-page-comments/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 00:45:42 +0000</pubDate>
		<dc:creator>chiao</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.chiaocheng.com/?p=213</guid>
		<description><![CDATA[It seems like the &#8220;Allow Comments&#8221; option on the &#8220;Add new page&#8221; screen does not work in wordpress.  Specifically, it does not work for the default theme Kubrick.
Seeing this option, it&#8217;s easy to assume this enables comments on your wordpress Pages, especially for the default theme.  But unfortunately, this particular option in the admin [...]]]></description>
			<content:encoded><![CDATA[<p>It seems like the &#8220;Allow Comments&#8221; option on the &#8220;Add new page&#8221; screen does not work in wordpress.  Specifically, it does not work for the default theme Kubrick.</p>
<div id="attachment_215" class="wp-caption alignnone" style="width: 540px"><img class="size-full wp-image-215" title="wordpress-allow-discussion" src="http://www.chiaocheng.com/wp-content/uploads/2009/07/wordpress-allow-discussion.png" alt="Allow comments option" width="530" height="113" /><p class="wp-caption-text">Allow comments option</p></div>
<p>Seeing this option, it&#8217;s easy to assume this enables comments on your wordpress Pages, especially for the default theme.  But unfortunately, this particular option in the admin page has no affect on the default Kubrick theme.  To enable comments on your Page(s), you have to select a theme which includes them or modify your default Kubrick theme.</p>
<h2 id="toc-default-theme-with-page-comments">Default theme with page comments</h2>
<p>To change your default theme, add the following line to <code>/wp-content/themes/default/page.php</code></p>
<p><!--no-encode--></p>
<pre class="brush:php; highlight: [24]">&lt;?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */

get_header(); ?&gt;

    &lt;div id="content" class="narrowcolumn"&gt;

        &lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
        &lt;div class="post" id="post-&lt;?php the_ID(); ?&gt;"&gt;
        &lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
            &lt;div class="entry"&gt;
                &lt;?php the_content('&lt;p class="serif"&gt;Read the rest of this page &amp;raquo;&lt;/p&gt;'); ?&gt;

                &lt;?php wp_link_pages(array('before' =&gt; '&lt;p&gt;&lt;strong&gt;Pages:&lt;/strong&gt; ', 'after' =&gt; '&lt;/p&gt;', 'next_or_number' =&gt; 'number')); ?&gt;

            &lt;/div&gt;
        &lt;/div&gt;
        &lt;?php endwhile; endif; ?&gt;
    &lt;?php edit_post_link('Edit this entry.', '&lt;p&gt;', '&lt;/p&gt;'); ?&gt;

    &lt;?php comments_template(); ?&gt;
    &lt;/div&gt;

&lt;?php get_footer(); ?&gt;</pre>
<h2 id="toc-additional-references">Additional References</h2>
<p><a href="http://wordpress.org/support/topic/246879" target="_blank">http://wordpress.org/support/topic/246879</a></p>
<p><a href="http://wordpress.org/support/topic/196788" target="_blank">http://wordpress.org/support/topic/196788</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chiaocheng.com/2009/07/wordpress-no-page-comments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress thumbnail generation disabled</title>
		<link>http://www.chiaocheng.com/2009/06/wordpress-thumbnail-generation-disabled/</link>
		<comments>http://www.chiaocheng.com/2009/06/wordpress-thumbnail-generation-disabled/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 23:22:29 +0000</pubDate>
		<dc:creator>chiao</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.chiaocheng.com/?p=60</guid>
		<description><![CDATA[No thumbnails in your wordpress?  Read on&#8230;
I noticed last night that my wordpress is not generating thumbnails from uploaded images like it&#8217;s suppose to. You&#8217;ll noticed that the size options (thumbnail, medium, large) are all disabled except for the full size.

After doing a lot of searching, I finally found out that in order for [...]]]></description>
			<content:encoded><![CDATA[<p>No thumbnails in your wordpress?  Read on&#8230;</p>
<p>I noticed last night that my wordpress is not generating thumbnails from uploaded images like it&#8217;s suppose to. You&#8217;ll noticed that the size options (thumbnail, medium, large) are all disabled except for the full size.</p>
<p style="text-align: center;"><img class="size-full wp-image-62  aligncenter" title="wordpress-size-options" src="http://www.chiaocheng.com/wp-content/uploads/2009/06/wordpress-size-options.png" alt="wordpress-size-options" width="637" height="114" /></p>
<p>After doing a lot of searching, I finally found out that in order for wordpress to generate thumbnails &#8220;by default&#8221;, you need to have GD library support for your php. It would have been nice if wordpress had documented that better.</p>
<p>The only reference I found was this:</p>
<p><a href="http://wordpress.org/support/topic/235625" target="_blank">http://wordpress.org/support/topic/235625</a></p>
<p>To be clear, <strong>wordpress does not generate thumbnails by default unless your php instance has GD support</strong>.</p>
<h3 id="toc-install-php-gd-library">Install php gd library</h3>
<p>For me, installing GD library was easy:
<pre class="brush:shell; gutter:false">
# yum install php-gd
</pre>
<h3 id="toc-check-for-gd">Check for gd</h3>
<p>To check if you have GD loaded in php:
<pre class="brush:shell; gutter:false; highlight:[11]"># php -m
[PHP Modules]
bz2
calendar
ctype
curl
date
dbase
exif
ftp
gd
gettext
gmp
hash
iconv</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.chiaocheng.com/2009/06/wordpress-thumbnail-generation-disabled/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>this version of PCRE is not compiled with PCRE_UTF8 support</title>
		<link>http://www.chiaocheng.com/2009/06/pcre-utf8-support/</link>
		<comments>http://www.chiaocheng.com/2009/06/pcre-utf8-support/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 01:24:02 +0000</pubDate>
		<dc:creator>chiao</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.crikeymate.com/?p=33</guid>
		<description><![CDATA[After installing wordpress, I got a lot of these errors in my apache wordpress error log.
PHP Warning:  preg_match_all() [&#60;a href='function.preg-match-all'&#62;function.preg-match-all&#60;/a&#62;]:
Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0 in ...
I am running apache 2.2.8 and it uses the built-in version 5 of pcre.
http://httpd.apache.org/docs/2.2/new_features_2_2.html
The problem is that version 5 of [...]]]></description>
			<content:encoded><![CDATA[<p>After installing wordpress, I got a lot of these errors in my apache wordpress error log.</p>
<pre>PHP Warning:  preg_match_all() [&lt;a href='function.preg-match-all'&gt;function.preg-match-all&lt;/a&gt;]:
Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0 in ...</pre>
<p>I am running apache 2.2.8 and it uses the built-in version 5 of pcre.</p>
<p><a href="http://httpd.apache.org/docs/2.2/new_features_2_2.html" target="_blank">http://httpd.apache.org/docs/2.2/new_features_2_2.html</a></p>
<p>The problem is that version 5 of pcre does not contain UTF-8 support.  So I had to recompile apache with a newer version of pcre. Luckily I have pcre 6.6 already installed on my linux box.</p>
<pre>&gt;&gt; rpm -qa |grep -i pcre
pcre-devel-6.6-2.el5_0.1
pcre-6.6-2.el5_0.1
pcre-6.6-2.el5_0.1</pre>
<p>So all I had to do is re-compile apache with the &#8220;&#8211;with-pcre&#8221; flag.</p>
<pre>./configure --with-pcre</pre>
<p>If you don&#8217;t know what version of pcre your php is using, create a phpinfo script and hit it with your broswer.  You should see&#8230;</p>
<p style="text-align: center;"><img class="size-full wp-image-34  aligncenter" title="php-pcre" src="http://www.chiaocheng.com/wp-content/uploads/2009/06/php-pcre.png" alt="pcre version" width="622" height="108" /></p>
<p>Happy compiling&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chiaocheng.com/2009/06/pcre-utf8-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving to wordpress 2.8</title>
		<link>http://www.chiaocheng.com/2009/06/moving-to-wordpress-2-8/</link>
		<comments>http://www.chiaocheng.com/2009/06/moving-to-wordpress-2-8/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 20:15:52 +0000</pubDate>
		<dc:creator>chiao</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.crikeymate.com/?p=17</guid>
		<description><![CDATA[I&#8217;ve finally moved chiaocheng.com to wordpress.  I have been looking for ways to add content more easily than writing up html pages.  To achieve that, I focused on two types of software, blogs and wiki&#8217;s.  Initially, I had hoped to keep my site on java for integration purposes.  My photo album is running off tomcat [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally moved <a href="http://www.chiaocheng.com">chiaocheng.com</a> to <a href="http://wordpress.org/" target="_blank">wordpress</a>.  I have been looking for ways to add content more easily than writing up html pages.  To achieve that, I focused on two types of software, blogs and wiki&#8217;s.  Initially, I had hoped to keep my site on java for integration purposes.  My photo album is running off tomcat and so keeping things in java would have allowed me to include my photo album without redirecting to a new site.  I looked at several java solutions such as <a href="http://www.jspwiki.org/" target="_blank">jspwiki</a> and <a href="http://www.jamwiki.org" target="_blank">jamwiki</a> but unfortunately, I didn&#8217;t find anything suitable.  I finally decided to ditch the java requirement.  After that, the choice got a lot easier since wordpress is very popular, thus having a lot of community built support around it.</p>
<p>Another important factor for me was the ability to customize the software.  Not only the legal ability but also the ease to understand and change the underlying software.  Not being a php guy, I&#8217;ve been pleasantly surprised how easy and straight forward to understand and modify the code base.  The bad part is that it looks very much like procedural spagehiti code resembling much of what you would see if a java web app was written completely in jsp.</p>
<p>Just a few weeks ago, wordpress 2.8 came out.  So I installed the new version and it seems like a lot of the buggy admin functions are now fixed.  Using wordpress 2.7, I felt a lot of the backend pages had bugs.  Luckily for me, 2.8 came out at the perfect time.</p>
<p>You can find my old website here: <a href="http://old.chiaocheng.com">old.chiaocheng.com</a>.  It going to take me some time to move everything over.</p>
<p>And guess what, you just read my first ever blog post!</p>
<p>Happy blogging.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chiaocheng.com/2009/06/moving-to-wordpress-2-8/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
