<?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>Amur Leopard</title>
	<atom:link href="http://amurleopard.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://amurleopard.wordpress.com</link>
	<description></description>
	<lastBuildDate>Wed, 25 Mar 2009 03:10:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='amurleopard.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Amur Leopard</title>
		<link>http://amurleopard.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://amurleopard.wordpress.com/osd.xml" title="Amur Leopard" />
	<atom:link rel='hub' href='http://amurleopard.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Knuth Shuffle</title>
		<link>http://amurleopard.wordpress.com/2009/03/25/knuth-shuffle/</link>
		<comments>http://amurleopard.wordpress.com/2009/03/25/knuth-shuffle/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 02:56:00 +0000</pubDate>
		<dc:creator>chtangwin</dc:creator>
				<category><![CDATA[Quiz]]></category>

		<guid isPermaLink="false">http://amurleopard.wordpress.com/2009/03/25/knuth-shuffle/</guid>
		<description><![CDATA[How to shuffle a deck of cards in a fast efficient way? Or, given an array of length n (e.g. 10000) and natural numbers from 1 to n, how to reorder the data series to be as random as possible (random permutation)? This is a classic computer science question, and it makes a good technical [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amurleopard.wordpress.com&amp;blog=2475757&amp;post=7&amp;subd=amurleopard&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p align="justify">How to shuffle a deck of cards in a fast efficient way? Or, given an array of length n (e.g. 10000) and natural numbers from 1 to n, how to reorder the data series to be as random as possible (random permutation)? This is a classic computer science question, and it makes a good technical interview question.</p>
<p align="justify">Knuth shuffle algorithm is an elegant and fast algorithm to do shuffling.&#160; Let X1, X2…. XN be the set of N numbers to be shuffled. </p>
<p>&#160;&#160; 1. Set j to N    <br />&#160;&#160; 2. Generate a random number R. (uniformly distributed between 0 and 1)     <br />&#160;&#160; 3. Set k to (jR+1). k is now a random integer, between 1 and j.     <br />&#160;&#160; 4. Exchange Xk and Xj     <br />&#160;&#160; 5. Decrease j by 1.     <br />&#160;&#160; 6. If j &gt; 1, return to step 2. </p>
<pre>void KnuthShuffle(int* pArr)
{
	int rand;
	for(int i=N-1; i&gt;=0; i--)
	{
		rand = GenRand(0,i);
		swap (pArr[i], pArr[rand]);
	}
}</pre>
<p>Note: The algorithm is copied from <a href="http://tekpool.wordpress.com/2006/10/06/shuffling-shuffle-a-deck-of-cards-knuth-shuffle/">here</a> which has more detailed information.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amurleopard.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amurleopard.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amurleopard.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amurleopard.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amurleopard.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amurleopard.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amurleopard.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amurleopard.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amurleopard.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amurleopard.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amurleopard.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amurleopard.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amurleopard.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amurleopard.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amurleopard.wordpress.com&amp;blog=2475757&amp;post=7&amp;subd=amurleopard&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://amurleopard.wordpress.com/2009/03/25/knuth-shuffle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2cb296e43fa5bc0a89f4e661965ebac9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chtangwin</media:title>
		</media:content>
	</item>
		<item>
		<title>Brian Beckman: I have an idea, then what?</title>
		<link>http://amurleopard.wordpress.com/2008/01/21/brian-beckman-i-have-an-idea-then-what/</link>
		<comments>http://amurleopard.wordpress.com/2008/01/21/brian-beckman-i-have-an-idea-then-what/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 01:13:42 +0000</pubDate>
		<dc:creator>chtangwin</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://amurleopard.wordpress.com/2008/01/21/brian-beckman-i-have-an-idea-then-what/</guid>
		<description><![CDATA[Another Brian Beckman video, on the topic of invention, patent, etc. http://channel8.msdn.com/Posts/Brian-Beckman-I-have-an-idea-then-what/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amurleopard.wordpress.com&amp;blog=2475757&amp;post=4&amp;subd=amurleopard&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Another Brian Beckman video, on the topic of invention, patent, etc.</p>
<p><a href="http://channel8.msdn.com/Posts/Brian-Beckman-I-have-an-idea-then-what/" title="http://channel8.msdn.com/Posts/Brian-Beckman-I-have-an-idea-then-what/">http://channel8.msdn.com/Posts/Brian-Beckman-I-have-an-idea-then-what/</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amurleopard.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amurleopard.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amurleopard.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amurleopard.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amurleopard.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amurleopard.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amurleopard.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amurleopard.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amurleopard.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amurleopard.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amurleopard.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amurleopard.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amurleopard.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amurleopard.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amurleopard.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amurleopard.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amurleopard.wordpress.com&amp;blog=2475757&amp;post=4&amp;subd=amurleopard&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://amurleopard.wordpress.com/2008/01/21/brian-beckman-i-have-an-idea-then-what/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2cb296e43fa5bc0a89f4e661965ebac9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chtangwin</media:title>
		</media:content>
	</item>
		<item>
		<title>Brian Beckman: Don&#8217;t fear the Monads</title>
		<link>http://amurleopard.wordpress.com/2008/01/20/brian-beckman-dont-fear-the-monads/</link>
		<comments>http://amurleopard.wordpress.com/2008/01/20/brian-beckman-dont-fear-the-monads/#comments</comments>
		<pubDate>Sun, 20 Jan 2008 09:30:38 +0000</pubDate>
		<dc:creator>chtangwin</dc:creator>
				<category><![CDATA[Haskell]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Functional Programming]]></category>

		<guid isPermaLink="false">http://amurleopard.wordpress.com/2008/01/20/brian-beckman-dont-fear-the-monads/</guid>
		<description><![CDATA[One of the favorite exercises on the web nowadays is to write Monads tutorial. I struggled through the concept until having seen this video from Brian Beckman of Microsoft Research.: http://channel9.msdn.com/Showpost.aspx?postid=358968 It is a terrific video and explain Monad in the context of function &#8220;composability&#8221;. Highly recommended!! I will write a short summary of my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amurleopard.wordpress.com&amp;blog=2475757&amp;post=3&amp;subd=amurleopard&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One of the favorite exercises on the web nowadays is to write Monads tutorial. I struggled through the concept until having seen this video from Brian Beckman of Microsoft Research.:</p>
<p><a href="http://channel9.msdn.com/Showpost.aspx?postid=358968" title="http://channel9.msdn.com/Showpost.aspx?postid=358968">http://channel9.msdn.com/Showpost.aspx?postid=358968</a></p>
<p>It is a terrific video and explain Monad in the context of function &#8220;composability&#8221;. Highly recommended!!</p>
<p>I will write a short summary of my understanding when I get time.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amurleopard.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amurleopard.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amurleopard.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amurleopard.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amurleopard.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amurleopard.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amurleopard.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amurleopard.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amurleopard.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amurleopard.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amurleopard.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amurleopard.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amurleopard.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amurleopard.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amurleopard.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amurleopard.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amurleopard.wordpress.com&amp;blog=2475757&amp;post=3&amp;subd=amurleopard&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://amurleopard.wordpress.com/2008/01/20/brian-beckman-dont-fear-the-monads/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2cb296e43fa5bc0a89f4e661965ebac9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chtangwin</media:title>
		</media:content>
	</item>
		<item>
		<title>Welcome</title>
		<link>http://amurleopard.wordpress.com/2008/01/08/hello-world/</link>
		<comments>http://amurleopard.wordpress.com/2008/01/08/hello-world/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 19:23:14 +0000</pubDate>
		<dc:creator>chtangwin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Welcome to my first weblog. The Amur Leopard (Panthera pardus orientalis or Panthera pardus amurensis) is the rarest subspecies of leopard and the rarest cat on Earth, according to Answer.com.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amurleopard.wordpress.com&amp;blog=2475757&amp;post=1&amp;subd=amurleopard&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Welcome to my first weblog.</p>
<p>The <b>Amur Leopard</b> (<i>Panthera pardus orientalis</i> or <i>Panthera pardus amurensis</i>) is the rarest subspecies of leopard and the rarest cat on Earth, according to <a href="http://www.answers.com/topic/amur-leopard">Answer.com</a>.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amurleopard.wordpress.com/1/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amurleopard.wordpress.com/1/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amurleopard.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amurleopard.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amurleopard.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amurleopard.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amurleopard.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amurleopard.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amurleopard.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amurleopard.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amurleopard.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amurleopard.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amurleopard.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amurleopard.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amurleopard.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amurleopard.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amurleopard.wordpress.com&amp;blog=2475757&amp;post=1&amp;subd=amurleopard&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://amurleopard.wordpress.com/2008/01/08/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2cb296e43fa5bc0a89f4e661965ebac9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chtangwin</media:title>
		</media:content>
	</item>
	</channel>
</rss>
