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

<channel>
	<title>NullVoid</title>
	<atom:link href="http://blog.mikezhang.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.mikezhang.com</link>
	<description>thoughts of michael xiaoquan zhang professor at hkust</description>
	<pubDate>Fri, 19 Sep 2008 09:55:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Pic-A-Day: Roof</title>
		<link>http://blog.mikezhang.com/2008/09/19/pic-a-day-roof</link>
		<comments>http://blog.mikezhang.com/2008/09/19/pic-a-day-roof#comments</comments>
		<pubDate>Fri, 19 Sep 2008 09:55:32 +0000</pubDate>
		<dc:creator>ET</dc:creator>
		
		<category><![CDATA[Art]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[Life]]></category>

		<category><![CDATA[Photography]]></category>

		<category><![CDATA[Pic-A-Day]]></category>

		<guid isPermaLink="false">http://blog.mikezhang.com/?p=696</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://blog.mikezhang.com/wp-content/uploads/km_building.jpg" class="lightview" rel="gallery[696]" title="km_building"><img class="attachment wp-att-695 centered" src="http://blog.mikezhang.com/wp-content/uploads/km_building.thumbnail.jpg" alt="km_building" width="500" height="312" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikezhang.com/2008/09/19/pic-a-day-roof/feed</wfw:commentRss>
		</item>
		<item>
		<title>Decimal Point Alignment in Latex</title>
		<link>http://blog.mikezhang.com/2008/09/08/decimal-point-alignment-in-latex</link>
		<comments>http://blog.mikezhang.com/2008/09/08/decimal-point-alignment-in-latex#comments</comments>
		<pubDate>Sun, 07 Sep 2008 16:38:39 +0000</pubDate>
		<dc:creator>ET</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Information]]></category>

		<category><![CDATA[Notes]]></category>

		<category><![CDATA[Research]]></category>

		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.mikezhang.com/?p=687</guid>
		<description><![CDATA[It has been a headache to do decimal point alignment in latex.
Fortunately, there is a package called dcolumn that helps with this problem.
This dcolumn package &#8220;defines a system for defining columns of entries in an array or tabular which are to be aligned on a ‘decimal point’.&#8221;
Unfortunately, it is very hard to make the modifications [...]]]></description>
			<content:encoded><![CDATA[<p>It has been a headache to do decimal point alignment in latex.</p>
<p>Fortunately, there is a package called <a href="http://www.ctex.org/documents/packages/table/dcolumn.pdf" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.ctex.org');">dcolumn</a> that helps with this problem.</p>
<p>This dcolumn package &#8220;defines a system for defining columns of entries in an array or tabular which are to be aligned on a ‘decimal point’.&#8221;</p>
<p>Unfortunately, it is very hard to make the modifications manually on the tables to align the decimal points of numbers.  I searched online and could not find a solution.  So I created a web service that does this:</p>
<p>Basically, just visit the webpage: <a href="http://blog.mikezhang.com/dcolumn/">http://blog.mikezhang.com/dcolumn/</a>.</p>
<p style="text-align: center;"><a href="http://blog.mikezhang.com/wp-content/uploads/screen-capture-21.png" class="lightview" rel="gallery[687]" title="screen-capture-21"><img class="attachment wp-att-688 centered" src="http://blog.mikezhang.com/wp-content/uploads/screen-capture-21.thumbnail.png" alt="screen-capture-21" width="500" height="468" /></a></p>
<p style="text-align: left;">There is only one field for you to browse a latex file.  Make sure it has extension .tex, otherwise, the system would not accept the file.</p>
<p style="text-align: left;">Click Submit, you will obtain the converted file with correctly aligned numbers in your tables.</p>
<p style="text-align: left;">See the screen shot of the finished page:</p>
<p style="text-align: center;"><a href="http://blog.mikezhang.com/wp-content/uploads/screen-capture-3.png" class="lightview" rel="gallery[687]" title="screen-capture-3"><img class="attachment wp-att-689 centered" src="http://blog.mikezhang.com/wp-content/uploads/screen-capture-3.thumbnail.png" alt="screen-capture-3" width="500" height="297" /></a></p>
<p style="text-align: left;">Now clicking &#8220;FILE&#8221; will bring you the new file, in txt format.  You need to change the extension to .tex to try it out.  This intended trouble helps you to avoid overwriting your original file.</p>
<p style="text-align: left;">Here is how it worked on a paper:</p>
<p style="text-align: left;">Before:</p>
<p style="text-align: center;"><a href="http://blog.mikezhang.com/wp-content/uploads/screen-capture6.png" class="lightview" rel="gallery[687]" title="screen-capture6"><img class="attachment wp-att-690 centered" src="http://blog.mikezhang.com/wp-content/uploads/screen-capture6.png" alt="screen-capture6" width="415" height="643" /></a></p>
<p style="text-align: left;">and After:</p>
<p style="text-align: left;">
<p style="text-align: center;"><a href="http://blog.mikezhang.com/wp-content/uploads/screen-capture-11.png" class="lightview" rel="gallery[687]" title="screen-capture-11"><img class="attachment wp-att-692 centered" src="http://blog.mikezhang.com/wp-content/uploads/screen-capture-11.png" alt="screen-capture-11" width="455" height="680" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikezhang.com/2008/09/08/decimal-point-alignment-in-latex/feed</wfw:commentRss>
		</item>
		<item>
		<title>PERL Load MySQL Query Results into an Array</title>
		<link>http://blog.mikezhang.com/2008/09/06/perl-load-mysql-query-results-into-an-array</link>
		<comments>http://blog.mikezhang.com/2008/09/06/perl-load-mysql-query-results-into-an-array#comments</comments>
		<pubDate>Sat, 06 Sep 2008 08:48:53 +0000</pubDate>
		<dc:creator>ET</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Information]]></category>

		<category><![CDATA[Research]]></category>

		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.mikezhang.com/?p=686</guid>
		<description><![CDATA[It&#8217;s that simple:

use DBI;
my  $conn = DBI->connect
    ("DBI:mysql:db","owner","ownerpass") or die("Cannot connect: $DBI::errstr");
$sql=qq(select field from table where id=$id);
@array=@{$conn-&#62;selectcol_arrayref($sql)};

]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s that simple:<br />
<code><br />
use DBI;<br />
my  $conn = DBI->connect<br />
    ("DBI:mysql:db","owner","ownerpass") or die("Cannot connect: $DBI::errstr");<br />
$sql=qq(select field from table where id=$id);<br />
@array=@{$conn-&gt;selectcol_arrayref($sql)};<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikezhang.com/2008/09/06/perl-load-mysql-query-results-into-an-array/feed</wfw:commentRss>
		</item>
		<item>
		<title>Passing Array as a Parameter in PERL</title>
		<link>http://blog.mikezhang.com/2008/09/06/passing-array-as-a-parameter-in-perl</link>
		<comments>http://blog.mikezhang.com/2008/09/06/passing-array-as-a-parameter-in-perl#comments</comments>
		<pubDate>Sat, 06 Sep 2008 07:35:26 +0000</pubDate>
		<dc:creator>ET</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Information]]></category>

		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.mikezhang.com/?p=685</guid>
		<description><![CDATA[There are more than two ways to do it. I just put down two quick ways.

using reference to array
not using reference to array

Method 1:

In program:
     processarray(\@array);
In sub processarray:
     my $arrayref=shift;
     my @array=@$arrayref;

Method 2:

In program:
     processarray(@array);
In sub processarray:
   [...]]]></description>
			<content:encoded><![CDATA[<p>There are more than two ways to do it. I just put down two quick ways.</p>
<ol>
<li>using reference to array</li>
<li>not using reference to array</li>
</ol>
<p>Method 1:<br />
<code><br />
In program:<br />
     processarray(\@array);<br />
In sub processarray:<br />
     my $arrayref=shift;<br />
     my @array=@$arrayref;<br />
</code></p>
<p>Method 2:<br />
<code><br />
In program:<br />
     processarray(@array);<br />
In sub processarray:<br />
     my @array=@_;<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikezhang.com/2008/09/06/passing-array-as-a-parameter-in-perl/feed</wfw:commentRss>
		</item>
		<item>
		<title>Overhead: WISE vs. SMART</title>
		<link>http://blog.mikezhang.com/2008/09/05/overhead-wise-vs-smart</link>
		<comments>http://blog.mikezhang.com/2008/09/05/overhead-wise-vs-smart#comments</comments>
		<pubDate>Fri, 05 Sep 2008 05:02:37 +0000</pubDate>
		<dc:creator>ET</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Life]]></category>

		<category><![CDATA[Random Thoughts]]></category>

		<guid isPermaLink="false">http://blog.mikezhang.com/?p=684</guid>
		<description><![CDATA[The difference between a smart person and a wise person is that a wise person knows how not to get into situations that a smart person knows how to get out of.
]]></description>
			<content:encoded><![CDATA[<blockquote><p>The difference between a smart person and a wise person is that a wise person knows how not to get into situations that a smart person knows how to get out of.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikezhang.com/2008/09/05/overhead-wise-vs-smart/feed</wfw:commentRss>
		</item>
		<item>
		<title>Pic-A-Day: Palace Museum</title>
		<link>http://blog.mikezhang.com/2008/09/02/pic-a-day-palace-museum</link>
		<comments>http://blog.mikezhang.com/2008/09/02/pic-a-day-palace-museum#comments</comments>
		<pubDate>Tue, 02 Sep 2008 13:05:04 +0000</pubDate>
		<dc:creator>ET</dc:creator>
		
		<category><![CDATA[Art]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[Life]]></category>

		<category><![CDATA[Photography]]></category>

		<category><![CDATA[Pic-A-Day]]></category>

		<guid isPermaLink="false">http://blog.mikezhang.com/?p=683</guid>
		<description><![CDATA[It is renovated when I visited. But I could manage to get a picture like this.

]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">It is renovated when I visited. But I could manage to get a picture like this.</p>
<p style="text-align: center;"><a href="http://blog.mikezhang.com/wp-content/uploads/taihedianhdr.jpg" class="lightview" rel="gallery[683]" title="taihedianhdr"><img class="attachment wp-att-682 centered" src="http://blog.mikezhang.com/wp-content/uploads/taihedianhdr.thumbnail.jpg" alt="taihedianhdr" width="500" height="312" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikezhang.com/2008/09/02/pic-a-day-palace-museum/feed</wfw:commentRss>
		</item>
		<item>
		<title>Pic-A-Day: Lantern of Double Happiness</title>
		<link>http://blog.mikezhang.com/2008/08/29/pic-a-day-lantern-of-double-happiness</link>
		<comments>http://blog.mikezhang.com/2008/08/29/pic-a-day-lantern-of-double-happiness#comments</comments>
		<pubDate>Fri, 29 Aug 2008 00:51:45 +0000</pubDate>
		<dc:creator>ET</dc:creator>
		
		<category><![CDATA[Art]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[Life]]></category>

		<category><![CDATA[Photography]]></category>

		<category><![CDATA[Pic-A-Day]]></category>

		<category><![CDATA[Play]]></category>

		<guid isPermaLink="false">http://blog.mikezhang.com/?p=681</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://blog.mikezhang.com/wp-content/uploads/tam_xis_wall.jpg" class="lightview" rel="gallery[681]" title="tam_xis_wall"><img class="attachment wp-att-680 centered" src="http://blog.mikezhang.com/wp-content/uploads/tam_xis_wall.thumbnail.jpg" alt="tam_xis_wall" width="500" height="312" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikezhang.com/2008/08/29/pic-a-day-lantern-of-double-happiness/feed</wfw:commentRss>
		</item>
		<item>
		<title>Political Correctness at Google</title>
		<link>http://blog.mikezhang.com/2008/08/29/political-correctness-at-google</link>
		<comments>http://blog.mikezhang.com/2008/08/29/political-correctness-at-google#comments</comments>
		<pubDate>Fri, 29 Aug 2008 00:44:37 +0000</pubDate>
		<dc:creator>ET</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Random Thoughts]]></category>

		<category><![CDATA[Research]]></category>

		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.mikezhang.com/?p=678</guid>
		<description><![CDATA[Google blog posted an article on &#8220;Strengthening the Study of Computer Science&#8221;.
It started with:
At a time when more and more digital technologies are becoming indispensable to millions of people, the field of computer science (CS) is in trouble. Enrollment and retention of CS students, particularly those historically underrepresented in the field (women, African-Americans, Native-Americans, and [...]]]></description>
			<content:encoded><![CDATA[<p>Google blog posted an article on <a href="http://googleblog.blogspot.com/2008/08/strengthening-study-of-computer-science.html" onclick="javascript:pageTracker._trackPageview ('/outbound/googleblog.blogspot.com');">&#8220;Strengthening the Study of Computer Science&#8221;</a>.</p>
<p>It started with:</p>
<blockquote><p>At a time when more and more digital technologies are becoming indispensable to millions of people, the field of computer science (CS) is in trouble. Enrollment and retention of CS students, particularly those historically underrepresented in the field (women, African-Americans, Native-Americans, and Hispanics) has declined sharply.</p></blockquote>
<p>I think the sharp decline in enrollment is really an issue, but the inner-economist of mine keeps saying that there is something wrong with the argument that we are able to address the issue by promoting this major to underrepresented people.</p>
<p style="text-align: center;"><img class="attachment wp-att-679 centered" src="http://blog.mikezhang.com/wp-content/uploads/cssi_students.png" alt="cssi_students" width="320" height="213" /></p>
<p style="text-align: center;">
<p>I believe in the invisible hand theory of resource allocation. There was definitely an excess in supply of CS students during the bubble years, but then the students shifted attention to other desciplines. We only have certain amount of brain power in the society, and the flow of these brains to different industries is definitely a good thing for the society as a whole. If computer science proves to be playing an ever increasing role in the society, I&#8217;m sure the brains will flow back. Just reward these brains accordingly.</p>
<p>Overall, the marginal decision maker should be indifferent to choose between any major if the market is effecient and can reward the students through the market system.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikezhang.com/2008/08/29/political-correctness-at-google/feed</wfw:commentRss>
		</item>
		<item>
		<title>Perl Reading A File</title>
		<link>http://blog.mikezhang.com/2008/08/28/perl-reading-a-file</link>
		<comments>http://blog.mikezhang.com/2008/08/28/perl-reading-a-file#comments</comments>
		<pubDate>Thu, 28 Aug 2008 14:24:26 +0000</pubDate>
		<dc:creator>ET</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Information]]></category>

		<category><![CDATA[Notes]]></category>

		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.mikezhang.com/?p=677</guid>
		<description><![CDATA[Read from a file, and write out.  Just put it here for my own reference.

#!/usr/bin/perl
$data_file=&#8221;file.csv&#8221;;
open(DAT, $data_file) &#124;&#124; die(&#8221;Could not open file!&#8221;);
@raw_data=;
close(DAT);
#print &#8220;Content-type: text/html\n\n&#8221;;
#print &#8220;&#8221;;
foreach $lines (@raw_data)
{
chomp($lines);
($var1,$var2,$var2)=split(/\&#124;/,$lines);
print &#8220;$var1,$var2,$var3\n&#8221;;
# print &#8221;
\n&#8221;;
}
#print &#8220;&#8221;;
]]></description>
			<content:encoded><![CDATA[<p>Read from a file, and write out.  Just put it here for my own reference.<br />
<code><br />
#!/usr/bin/perl</code></p>
<p>$data_file=&#8221;file.csv&#8221;;</p>
<p>open(DAT, $data_file) || die(&#8221;Could not open file!&#8221;);<br />
@raw_data=;<br />
close(DAT);</p>
<p>#print &#8220;Content-type: text/html\n\n&#8221;;<br />
#print &#8220;&#8221;;</p>
<p>foreach $lines (@raw_data)<br />
{<br />
chomp($lines);<br />
($var1,$var2,$var2)=split(/\|/,$lines);<br />
print &#8220;$var1,$var2,$var3\n&#8221;;<br />
# print &#8221;<br />
\n&#8221;;<br />
}</p>
<p>#print &#8220;&#8221;;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikezhang.com/2008/08/28/perl-reading-a-file/feed</wfw:commentRss>
		</item>
		<item>
		<title>More on the Age of Gymnasts: A Reply to Chris Bourdon</title>
		<link>http://blog.mikezhang.com/2008/08/26/more-on-the-age-of-gymnasts-a-reply-to-chris-bourdon</link>
		<comments>http://blog.mikezhang.com/2008/08/26/more-on-the-age-of-gymnasts-a-reply-to-chris-bourdon#comments</comments>
		<pubDate>Tue, 26 Aug 2008 07:47:32 +0000</pubDate>
		<dc:creator>ET</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Information]]></category>

		<category><![CDATA[Life]]></category>

		<category><![CDATA[Random Thoughts]]></category>

		<category><![CDATA[Research]]></category>

		<guid isPermaLink="false">http://blog.mikezhang.com/?p=673</guid>
		<description><![CDATA[
Photo of Yang Yilin, One of the Gold Medal Winning Gymnast
After I wrote a post and complained about Levitt&#8217;s  un-scientific  way of making ungrounded statements, I received a comment from the original data analyst Chris Bourdon. To make the reply more visible, I put it here, and it gives a little bit more about how [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://blog.mikezhang.com/wp-content/uploads/yyl.jpg" class="lightview" rel="gallery[673]" title="yyl"><img class="attachment wp-att-674 centered" src="http://blog.mikezhang.com/wp-content/uploads/yyl.thumbnail.jpg" alt="yyl" width="500" height="579" /></a></p>
<p style="text-align: center;">Photo of Yang Yilin, One of the Gold Medal Winning Gymnast</p>
<p>After I wrote <a href="http://blog.mikezhang.com/2008/08/22/questions-on-the-age-of-chinese-female-gymnasts">a post and</a> complained about Levitt&#8217;s  un-scientific  way of making ungrounded statements, I received <a href="http://blog.mikezhang.com/2008/08/22/questions-on-the-age-of-chinese-female-gymnasts#comment-114584">a comment from the original data analyst Chris Bourdon</a>. To make the reply more visible, I put it here, and it gives a little bit more about how I look at this issue.</p>
<p>Chris, thanks very much for the comment. The original purpose of writing<a href="http://blog.mikezhang.com/2008/08/22/questions-on-the-age-of-chinese-female-gymnasts"> that blog post</a> was to show my disappointment with Prof. L.  From your original analysis and your comment, I can say you are very scientific and possess the quality of an inquisitive thinker.</p>
<p>I did not spend too much time writing down my thoughts on this in the original post, here I&#8217;d like to add my two cents to the discussion.</p>
<p>There are two types of explanations on why gymnasts are smaller (in terms of size, not age) than their peers.<br />
1. when young girls practice gymnastics, their bodies receive a trigger to stop growing (this may well be caused by injuries, etc.)<br />
2. smaller girls enjoy an advantage in performing better.</p>
<p>Both explanations introduce some possible reasons that cannot be directly observed and verified in the Chris Bourdon analysis.</p>
<p>Explanation 1 may tell us that maybe due to the poor training conditions, etc. Chinese girls suffer more injuries than their US counterparts, and therefore look smaller. Or, maybe some special technique they use gives the necessary trigger to stop their growth.  Of course, simply by comparing the girls with the national growth chart does not give us enough evidence to suggest that they are smaller than they should be.  A better measure would be comparing these gymnasts with girls from other countries (Japan, Russia, etc.) and see if gymnast girls are also smaller in these other countries. Japan may give us a control for race (Asians), and Russia may give us a control for way of training (government supported intensive training).</p>
<p><a href="http://results.beijing2008.cn/WRM/ENG/BIO/Athlete/3/235963.shtml" onclick="javascript:pageTracker._trackPageview ('/outbound/results.beijing2008.cn');"><img class="alignleft" style="float: left;" src="http://results.beijing2008.cn/WRM/images/athlete_photo/normal/3/235963.jpg" alt="" width="141" height="189" /></a>Explanation 2 introduces an issue of self-selection. Those girls who are smaller enjoy a benefit, therefore, good gymnasts are smaller.  If you do better (and in the case of Olympics, you do exceptional), you are, by-definition, not average.  So compare these girls with the national chart is not the right way to control for this self-selection problem.  I&#8217;m not sure about the gymnasts, but from what I hear on TV, I know that one of the Chinese gold medalist for diving did not eat dinner for 3 years.  Her weight is only 28kg (61 lb). (<a href="http://results.beijing2008.cn/WRM/ENG/BIO/Athlete/3/235963.shtml" onclick="javascript:pageTracker._trackPageview ('/outbound/results.beijing2008.cn');">Wang Xin: http://results.beijing2008.cn/WRM/ENG/BIO/Athlete/3/235963.shtml</a>).</p>
<p>Also, think about <a href="http://en.wikipedia.org/wiki/Sumo" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">SUMO wrestlers</a>, if you do the same charting thing, they would appear awkwardly large compared to the Japanese average. It is simply determined by the profession, and you just cannot compare these athletes with the national chart to make any meaning inference.</p>
<p>Overall, I agree with you on that there should be no limitations on the age. But as there is such a <em>de facto</em> limit, out of academic prudence, I would hesitate to point fingers at these small girls before I have good evidence to suggest that they mis-report their ages.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikezhang.com/2008/08/26/more-on-the-age-of-gymnasts-a-reply-to-chris-bourdon/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
