<?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>:maohao:</title>
	<atom:link href="http://maohao.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://maohao.wordpress.com</link>
	<description>by maohao.com</description>
	<lastBuildDate>Tue, 24 Jan 2012 12:46:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='maohao.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>:maohao:</title>
		<link>http://maohao.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://maohao.wordpress.com/osd.xml" title=":maohao:" />
	<atom:link rel='hub' href='http://maohao.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Java bitwise operators</title>
		<link>http://maohao.wordpress.com/2011/12/25/java-bitwise-operators/</link>
		<comments>http://maohao.wordpress.com/2011/12/25/java-bitwise-operators/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 16:19:34 +0000</pubDate>
		<dc:creator>maohao</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://maohao.wordpress.com/?p=938</guid>
		<description><![CDATA[This is a code snippet found in android.widget.AutoCompleteTextView class: // Always turn on the auto complete input type flag, since it // makes no sense to use this widget without it. int inputType = getInputType(); if ((inputType&#38;EditorInfo.TYPE_MASK_CLASS) == EditorInfo.TYPE_CLASS_TEXT) { inputType &#124;= EditorInfo.TYPE_TEXT_FLAG_AUTO_COMPLETE; setRawInputType(inputType); } Here is what I found out: Java Notes: Bitwise Operators [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=938&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a code snippet found in android.widget.AutoCompleteTextView class:</p>
<pre>        // Always turn on the auto complete input type flag, since it
        // makes no sense to use this widget without it.
        int inputType = getInputType();
        if ((inputType&amp;EditorInfo.TYPE_MASK_CLASS)
                == EditorInfo.TYPE_CLASS_TEXT) {
            inputType |= EditorInfo.TYPE_TEXT_FLAG_AUTO_COMPLETE;
            setRawInputType(inputType);
        }</pre>
<p>Here is what I found out: <a title="Java Notes: Bitwise Operators" href="http://leepoint.net/notes-java/data/expressions/bitops.html" target="_blank">Java Notes: Bitwise Operators</a></p>
<p><code>System.out.println("3 &amp; 7 = "+(3 &amp; 7));//3<br />
System.out.println("2 &amp; 4 = "+(2 &amp; 4));//0<br />
System.out.println("2 &amp; 5 = "+(2 &amp; 5));//0<br />
System.out.println("1 &amp; 2 = "+(1 &amp; 2));//0<br />
System.out.println("1 &amp; 0 = "+(1 &amp; 0));//0</code></p>
<p><code>System.out.println("3 | 7 = "+(3 | 7));//7<br />
System.out.println("2 | 4 = "+(2 | 4));//6<br />
System.out.println("2 | 5 = "+(2 | 5));//7<br />
System.out.println("1 | 2 = "+(1 | 2));//3<br />
System.out.println("1 | 0 = "+(1 | 0));//1</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maohao.wordpress.com/938/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maohao.wordpress.com/938/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maohao.wordpress.com/938/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maohao.wordpress.com/938/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maohao.wordpress.com/938/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maohao.wordpress.com/938/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maohao.wordpress.com/938/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maohao.wordpress.com/938/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maohao.wordpress.com/938/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maohao.wordpress.com/938/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maohao.wordpress.com/938/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maohao.wordpress.com/938/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maohao.wordpress.com/938/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maohao.wordpress.com/938/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=938&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maohao.wordpress.com/2011/12/25/java-bitwise-operators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ac75dfe1c3f137ec54a538bb66a390c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maohao</media:title>
		</media:content>
	</item>
		<item>
		<title>Root Nexus One 2.3.6</title>
		<link>http://maohao.wordpress.com/2011/12/17/root-nexus-one-2-3-6/</link>
		<comments>http://maohao.wordpress.com/2011/12/17/root-nexus-one-2-3-6/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 00:39:32 +0000</pubDate>
		<dc:creator>maohao</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://maohao.wordpress.com/?p=933</guid>
		<description><![CDATA[Used this &#8220;DooMLoRD Easy Rooting Toolkit v3.0 (using zergRush exploit)&#8221; (Windows) and rooted my phone in less than 3 minutes. Also downloaded this  ROM Toolbox . In the future if I find more time and energy, I may play around with some custom ROMs like CyanogenMod. I would probably be most interested in  getting them running [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=933&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Used this &#8220;<a title="DooMLoRD Easy Rooting Toolkit v3.0 (using zergRush exploit)" href="http://forum.xda-developers.com/showthread.php?p=18777723&amp;highlight=rooting#post18777723" target="_blank">DooMLoRD Easy Rooting Toolkit v3.0 (using zergRush exploit)</a>&#8221; (Windows) and rooted my phone in less than 3 minutes. Also downloaded this  <a title="ROM Toolbox by JRummy16" href="https://market.android.com/details?id=com.jrummy.liberty.toolbox#?t=W251bGwsMSwyLDIxMiwiY29tLmpydW1teS5saWJlcnR5LnRvb2xib3giXQ.." target="_blank">ROM Toolbox </a>.</p>
<p>In the future if I find more time and energy, I may play around with some custom ROMs like <a title="Android CM" href="http://www.cyanogenmod.com/" target="_blank">CyanogenMod</a>. I would probably be most interested in  getting them running on an emulator; It would be nice if someone put the compiled system.img files somewhere so that I don&#8217;t need to build from the source;).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maohao.wordpress.com/933/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maohao.wordpress.com/933/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maohao.wordpress.com/933/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maohao.wordpress.com/933/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maohao.wordpress.com/933/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maohao.wordpress.com/933/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maohao.wordpress.com/933/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maohao.wordpress.com/933/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maohao.wordpress.com/933/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maohao.wordpress.com/933/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maohao.wordpress.com/933/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maohao.wordpress.com/933/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maohao.wordpress.com/933/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maohao.wordpress.com/933/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=933&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maohao.wordpress.com/2011/12/17/root-nexus-one-2-3-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ac75dfe1c3f137ec54a538bb66a390c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maohao</media:title>
		</media:content>
	</item>
		<item>
		<title>Facebook for Android API 101</title>
		<link>http://maohao.wordpress.com/2011/12/11/facebook-for-android-api-101/</link>
		<comments>http://maohao.wordpress.com/2011/12/11/facebook-for-android-api-101/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 19:18:44 +0000</pubDate>
		<dc:creator>maohao</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Facebook socialMedia]]></category>

		<guid isPermaLink="false">http://maohao.wordpress.com/?p=929</guid>
		<description><![CDATA[This morning I got to sit down and had a jump start on my first Facebook/mobile adventure! It seems I was able to follow through most part of their documentation (Android Tutorial and Graph API). When I tried to get my app signature (Android key hash) using the java keytool, my Windows XP said it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=929&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This morning I got to sit down and had a jump start on my first Facebook/mobile adventure! It seems I was able to follow through most part of their documentation (<a title="Android Tutorial" href="https://developers.facebook.com/docs/mobile/android/build/" target="_blank">Android Tutorial</a> and<a title="Graph API" href="http://developers.facebook.com/docs/reference/api/" target="_blank"> Graph API)</a>.</p>
<p>When I tried to get my app signature (Android key hash) using the java keytool, my Windows XP said it couldn&#8217;t find openssl command. I had to download both <a href="http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF" target="_blank">Visual C++ 2008 Redistributables</a> and <a href="http://www.slproweb.com/download/Win32OpenSSL-1_0_0e.exe">Win32 OpenSSL v1.0.0e</a> from <a title="Win32 OpenSSL" href="http://www.slproweb.com/products/Win32OpenSSL.html" target="_blank">here</a>.</p>
<p>I wasn&#8217;t able to save/get the access token from the preference file and I had to manually set the access token in the app. I got the token from the <a title="Graph API Explorer" href="http://developers.facebook.com/tools/explorer/?method=GET" target="_blank">Graph API Explorer</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maohao.wordpress.com/929/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maohao.wordpress.com/929/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maohao.wordpress.com/929/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maohao.wordpress.com/929/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maohao.wordpress.com/929/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maohao.wordpress.com/929/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maohao.wordpress.com/929/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maohao.wordpress.com/929/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maohao.wordpress.com/929/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maohao.wordpress.com/929/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maohao.wordpress.com/929/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maohao.wordpress.com/929/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maohao.wordpress.com/929/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maohao.wordpress.com/929/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=929&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maohao.wordpress.com/2011/12/11/facebook-for-android-api-101/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ac75dfe1c3f137ec54a538bb66a390c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maohao</media:title>
		</media:content>
	</item>
		<item>
		<title>Escaping Angle Brackets in XML in Android</title>
		<link>http://maohao.wordpress.com/2011/11/20/escaping-angle-brackets-in-xml-in-android/</link>
		<comments>http://maohao.wordpress.com/2011/11/20/escaping-angle-brackets-in-xml-in-android/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 04:48:28 +0000</pubDate>
		<dc:creator>maohao</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://maohao.wordpress.com/?p=925</guid>
		<description><![CDATA[Either specify those characters like this: &#60; = &#38;lt; &#62; = &#38;gt; Or use a CDATA section and put those characters inside: &#60;![CDATA[&#60;]]&#62; &#60;![CDATA[&#62;]]&#62; Here.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=925&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Either specify those characters like this:</p>
<pre><code>&lt; = &amp;lt; &gt; = &amp;gt; </code></pre>
<p>Or use a CDATA section and put those characters inside:</p>
<pre><code>&lt;![CDATA[&lt;]]&gt; &lt;![CDATA[&gt;]]&gt;</code>

<code><a title="Escaping Angle Brackets in XML in Eclipse / Android" href="http://stackoverflow.com/questions/4979889/escaping-angle-brackets-in-xml-in-eclipse-android" target="_blank">Here.</a></code></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maohao.wordpress.com/925/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maohao.wordpress.com/925/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maohao.wordpress.com/925/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maohao.wordpress.com/925/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maohao.wordpress.com/925/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maohao.wordpress.com/925/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maohao.wordpress.com/925/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maohao.wordpress.com/925/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maohao.wordpress.com/925/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maohao.wordpress.com/925/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maohao.wordpress.com/925/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maohao.wordpress.com/925/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maohao.wordpress.com/925/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maohao.wordpress.com/925/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=925&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maohao.wordpress.com/2011/11/20/escaping-angle-brackets-in-xml-in-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ac75dfe1c3f137ec54a538bb66a390c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maohao</media:title>
		</media:content>
	</item>
		<item>
		<title>Accessing resources in Android</title>
		<link>http://maohao.wordpress.com/2011/11/20/accessing-resources-in-android/</link>
		<comments>http://maohao.wordpress.com/2011/11/20/accessing-resources-in-android/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 04:44:01 +0000</pubDate>
		<dc:creator>maohao</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://maohao.wordpress.com/?p=921</guid>
		<description><![CDATA[In most cases, you need to get hold of the Context object in order to access the resources in the app (the local package). Because Activity extends Context, you can get all the resources accessible from an instance of Context. For example: Context.getResources().getString(R.string.resName); or simply Context.getString(R.string.resName); If you want to access the resources in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=921&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In most cases, you need to get hold of the Context object in order to access the resources in the app (the local package). Because Activity extends Context, you can get all the resources accessible from an instance of Context. For example:</p>
<p><code>Context.getResources().getString(R.string.resName);</code></p>
<p>or simply</p>
<p><code>Context.<a href="http://developer.android.com/reference/android/content/Context.html#getString(int)">getString</a>(R.string.resName);</code></p>
<p>If you want to access the resources in the local package from an object that doesn&#8217;t inherit from Context, you need to pass the context object to it somehow. On the other hand, you can access the resources provided by the system (Android) without any context object:</p>
<p><code>final Resources r = Resources.getSystem();<br />
r.getString(android.R.string.untitled);</code></p>
<p><a title="Loading string resources in Android" href="http://www.connorgarvey.com/blog/?p=9">Here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maohao.wordpress.com/921/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maohao.wordpress.com/921/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maohao.wordpress.com/921/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maohao.wordpress.com/921/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maohao.wordpress.com/921/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maohao.wordpress.com/921/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maohao.wordpress.com/921/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maohao.wordpress.com/921/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maohao.wordpress.com/921/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maohao.wordpress.com/921/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maohao.wordpress.com/921/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maohao.wordpress.com/921/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maohao.wordpress.com/921/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maohao.wordpress.com/921/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=921&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maohao.wordpress.com/2011/11/20/accessing-resources-in-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ac75dfe1c3f137ec54a538bb66a390c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maohao</media:title>
		</media:content>
	</item>
		<item>
		<title>So color in KML is in aaBBGGRR!</title>
		<link>http://maohao.wordpress.com/2011/09/20/so-color-in-kml-is-in-aabbggrr/</link>
		<comments>http://maohao.wordpress.com/2011/09/20/so-color-in-kml-is-in-aabbggrr/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 20:42:46 +0000</pubDate>
		<dc:creator>maohao</dc:creator>
				<category><![CDATA[graphics]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://maohao.wordpress.com/?p=917</guid>
		<description><![CDATA[not in aaRRGGBB as you normally expect: &#60;color&#62;ffFFFF00&#60;/color&#62; is cyan &#60;color&#62;ffff00ff&#60;/color&#62; is pink<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=917&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>not in aaRRGGBB as you normally expect:</p>
<p>&lt;color&gt;ffFFFF00&lt;/color&gt; is cyan</p>
<p>&lt;color&gt;ffff00ff&lt;/color&gt; is pink</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maohao.wordpress.com/917/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maohao.wordpress.com/917/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maohao.wordpress.com/917/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maohao.wordpress.com/917/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maohao.wordpress.com/917/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maohao.wordpress.com/917/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maohao.wordpress.com/917/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maohao.wordpress.com/917/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maohao.wordpress.com/917/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maohao.wordpress.com/917/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maohao.wordpress.com/917/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maohao.wordpress.com/917/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maohao.wordpress.com/917/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maohao.wordpress.com/917/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=917&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maohao.wordpress.com/2011/09/20/so-color-in-kml-is-in-aabbggrr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ac75dfe1c3f137ec54a538bb66a390c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maohao</media:title>
		</media:content>
	</item>
		<item>
		<title>Android: Sqlite long to datetime</title>
		<link>http://maohao.wordpress.com/2011/08/21/android-sqlite-long-to-datetime/</link>
		<comments>http://maohao.wordpress.com/2011/08/21/android-sqlite-long-to-datetime/#comments</comments>
		<pubDate>Mon, 22 Aug 2011 03:13:16 +0000</pubDate>
		<dc:creator>maohao</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://maohao.wordpress.com/?p=914</guid>
		<description><![CDATA[If you store time using android.text.format.Time.toMillis, it will end up in the sqlite as a 13 chars &#8220;text/numeric&#8221;, something like &#8220;1311123600000&#8243;. You can do the following to make them human readable: SELECT datetime(start/1000, 'unixepoch') as start, datetime(end/1000, 'unixepoch') as end from countdowns //output: 2011-07-20 01:00:00 (I think this means 12:00 AM but I am not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=914&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you store time using android.text.format.Time.toMillis, it will end up in the sqlite as a 13 chars &#8220;text/numeric&#8221;, something like &#8220;1311123600000&#8243;. You can do the following to make them human readable:<br />
<code><br />
SELECT datetime(start/1000, 'unixepoch') as start, datetime(end/1000, 'unixepoch') as end from countdowns</code></p>
<p>//output: 2011-07-20 01:00:00 (I think this means 12:00 AM but I am not sure)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maohao.wordpress.com/914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maohao.wordpress.com/914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maohao.wordpress.com/914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maohao.wordpress.com/914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maohao.wordpress.com/914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maohao.wordpress.com/914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maohao.wordpress.com/914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maohao.wordpress.com/914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maohao.wordpress.com/914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maohao.wordpress.com/914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maohao.wordpress.com/914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maohao.wordpress.com/914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maohao.wordpress.com/914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maohao.wordpress.com/914/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=914&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maohao.wordpress.com/2011/08/21/android-sqlite-long-to-datetime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ac75dfe1c3f137ec54a538bb66a390c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maohao</media:title>
		</media:content>
	</item>
		<item>
		<title>Android AppWidget 101</title>
		<link>http://maohao.wordpress.com/2011/05/23/android-appwidget-101/</link>
		<comments>http://maohao.wordpress.com/2011/05/23/android-appwidget-101/#comments</comments>
		<pubDate>Mon, 23 May 2011 17:49:35 +0000</pubDate>
		<dc:creator>maohao</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://maohao.wordpress.com/?p=896</guid>
		<description><![CDATA[0. To create an appWidget, you would need 4 things: in your application manifest xml, declare the appWidget Provider (in a &#60;receiver&#62; tag, see code below);  a layout xml for your remote views (in &#8220;res/layout&#8221;); an app widget provider xml (in &#8220;res/xml&#8221; with an &#60;appwidget-provider&#62; tag); and optionally implementing AppWidgetProvider for the logic in your app. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=896&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>0. To create an appWidget, you would need 4 things: in your application manifest xml, declare the appWidget Provider (in a &lt;receiver&gt; tag, see code below);  a layout xml for your remote views (in &#8220;res/layout&#8221;); an app widget provider xml (in &#8220;res/xml&#8221; with an &lt;appwidget-provider&gt; tag); and optionally implementing AppWidgetProvider for the logic in your app.</p>
<blockquote><p><code>&lt;receiver android:name=".TestAppWidgetProvider" android:enabled="true"&gt;<br />
&lt;intent-filter&gt;<br />
&lt;action android:name="android.appwidget.action.APPWIDGET_UPDATE"/&gt;<br />
&lt;/intent-filter&gt;<br />
&lt;meta-data android:resource="@xml/widget" android:name="android.appwidget.provider"&gt;&lt;/meta-data&gt;<br />
&lt;/receiver&gt;</code></p></blockquote>
<p>1. You can explicitly update the appWidgets using AppWidgetManager and not rely on the timer mechanism. This means your app can register with all kinds of listeners and update your appWidgets based on the corresponding events when they occur:</p>
<blockquote><p><code>final AppWidgetManager gm = AppWidgetManager.getInstance(context);<br />
gm.updateAppWidget( new ComponentName("com.maohao.android.myappnamespace",<br />
"com.maohao.android.myappnamespace.MyAppWidgetProvider"), views);</code></p></blockquote>
<p>2. Each time a new appWidget is added to the home screen,</p>
<blockquote><p><code>AppWidgetProvider.onReceive &gt; onUpdate</code></p></blockquote>
<p>also get called; each time an appWidget is deleted from the home screen,</p>
<blockquote><p><code>onReceive &gt; onDelete</code></p></blockquote>
<p>get called.</p>
<p>When the first appWidget is added to home,</p>
<blockquote><p><code>onReceive &gt; onEnabled &gt; onReceive &gt; onUpdate</code></p></blockquote>
<p>anddroid.appWidget.action.APPWIDGET_ENABLED is the onReceived intent action;</p>
<p>When the last appWidget is removed from home,</p>
<blockquote><p><code> onReceive - onDeleted &gt; onReceive - onDisabled<br />
</code></p></blockquote>
<p>anddroid.appWidget.action.APPWIDGET_DELETED for onDeleted and anddroid.appWidget.action.APPWIDGET_DISABLED for onDeleted get called.</p>
<p>You don&#8217;t seem to explicitly declare in your manifest xml for your appWidgetProvider to receive APPWIDGET_DELETED/APPWIDGET_DISABLED actions but you need to declare an intent filter for ACTION_APPWIDGET_UPDATE action.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maohao.wordpress.com/896/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maohao.wordpress.com/896/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maohao.wordpress.com/896/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maohao.wordpress.com/896/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maohao.wordpress.com/896/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maohao.wordpress.com/896/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maohao.wordpress.com/896/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maohao.wordpress.com/896/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maohao.wordpress.com/896/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maohao.wordpress.com/896/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maohao.wordpress.com/896/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maohao.wordpress.com/896/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maohao.wordpress.com/896/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maohao.wordpress.com/896/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=896&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maohao.wordpress.com/2011/05/23/android-appwidget-101/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ac75dfe1c3f137ec54a538bb66a390c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maohao</media:title>
		</media:content>
	</item>
		<item>
		<title>Run extra DOS commands before and after build in VS2001</title>
		<link>http://maohao.wordpress.com/2011/04/06/run-extra-dos-commands-before-and-after-build-in-visual-studi/</link>
		<comments>http://maohao.wordpress.com/2011/04/06/run-extra-dos-commands-before-and-after-build-in-visual-studi/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 17:40:31 +0000</pubDate>
		<dc:creator>maohao</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://maohao.wordpress.com/?p=888</guid>
		<description><![CDATA[Gotcha! Visual Studio Pre/Post-Build Events<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=888&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a id="viewpost_ascx_TitleUrl" title="Gotcha! Visual Studio Pre/Post-Build Events" href="http://geekswithblogs.net/dchestnutt/archive/2006/05/30/80113.aspx" target="_blank">Gotcha! Visual Studio Pre/Post-Build Events</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maohao.wordpress.com/888/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maohao.wordpress.com/888/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maohao.wordpress.com/888/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maohao.wordpress.com/888/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maohao.wordpress.com/888/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maohao.wordpress.com/888/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maohao.wordpress.com/888/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maohao.wordpress.com/888/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maohao.wordpress.com/888/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maohao.wordpress.com/888/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maohao.wordpress.com/888/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maohao.wordpress.com/888/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maohao.wordpress.com/888/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maohao.wordpress.com/888/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=888&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maohao.wordpress.com/2011/04/06/run-extra-dos-commands-before-and-after-build-in-visual-studi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ac75dfe1c3f137ec54a538bb66a390c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maohao</media:title>
		</media:content>
	</item>
		<item>
		<title>Modular flex (4) applications 101</title>
		<link>http://maohao.wordpress.com/2011/03/27/using-modules-in-flex-101/</link>
		<comments>http://maohao.wordpress.com/2011/03/27/using-modules-in-flex-101/#comments</comments>
		<pubDate>Sun, 27 Mar 2011 19:27:05 +0000</pubDate>
		<dc:creator>maohao</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://maohao.wordpress.com/?p=880</guid>
		<description><![CDATA[How to use modules in the same project: Define an interface for your module as the following. The whole point of modular app is to program to abstract interfaces so that different parts of your app have less dependency on one another; it also makes it easier to test:package { import flash.events.IEventDispatcher;&#160; public interface IInnerModuel1 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=880&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>How to use modules in the same project:</p>
<ol>
<li>Define an interface for your module as the following. The whole point of modular app is to program to abstract interfaces so that different parts of your app have less dependency on one another; it also makes it easier to test:<code>package<br />
{<br />
import flash.events.IEventDispatcher;</code>&nbsp;</p>
<p><code> </code><code>public interface IInnerModuel1 extends IEventDispatcher<br />
{<br />
function foo():void<br />
}<br />
}</code></li>
<li>Create a new module by right-click on the project on the Package Explorer&gt; New &gt; MXML Module.  Flex then generates a spark module (s:Module) for you. The module can has its own namespace; if it does, that means the resulting .swf file will be compiled into a subfolder that corresponds to its namespace structure, like  &#8220;/debug-bin/com/mh/test/flex/modules/MyInnerModule1.swf&#8221; or something.<code>&lt;s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"<br />
xmlns:s="library://ns.adobe.com/flex/spark"<br />
xmlns:mx="library://ns.adobe.com/flex/mx"<br />
implements="IInnerModuel1"&gt;</code>&nbsp;</p>
<p><code>&lt;fx:Script&gt;<br />
&lt;![CDATA[<br />
public function foo():void<br />
{<br />
myFooLabel.text = "Yo! What's up?";<br />
}<br />
]]&gt;<br />
&lt;/fx:Script&gt;<br />
...</code></p>
<p><code> </code><code>&lt;/s:Module&gt;</code></li>
<li>Add the module to the project by right-click  &gt; Project Properties &gt; Flex Modules &gt; Add and navigate to the .mxml or the .as component.</li>
<li>Load the module for the main app to use. You can do this using the following tag in your main app:<br />
<code>&lt;s:ModuleLoader id="innerModule1Loader" url="com/mh/test/flex/modules/MyInnerModule1.swf" /&gt;<br />
</code></li>
<li>In order to access your module from main WindowedApplication, you can do this:<code>protected function button1_clickHandler(event:MouseEvent):void<br />
{</code>&nbsp;</p>
<p><code>if(innerModule1Loader.child == null)<br />
return;</code></p>
<p><code>var iChild:* = innerModule1Loader.child as IInnerModuel1;<br />
iChild.foo();</p>
<p></code><code>}</code></li>
</ol>
<p>Some links:<br />
<a href="http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf64277-7fea.html#WS2db454920e96a9e51e63e3d11c0bf69084-7d22" target="_blank">How to pass data to modules and access modules from main app and vice versa (Flex 4)</a><br />
<a href="http://www.mail-archive.com/flexcoders@yahoogroups.com/msg84451.html" target="_blank"><br />
How to use modules from different Flex projects</a></p>
<p><a title="Passing data to modules" href="http://bkflex.wordpress.com/2007/06/25/explicit-support-for-module-base-application/" target="_blank">Step by step of how to use modules in Flex 3<br />
</a></p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maohao.wordpress.com/880/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maohao.wordpress.com/880/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maohao.wordpress.com/880/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maohao.wordpress.com/880/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maohao.wordpress.com/880/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maohao.wordpress.com/880/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maohao.wordpress.com/880/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maohao.wordpress.com/880/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maohao.wordpress.com/880/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maohao.wordpress.com/880/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maohao.wordpress.com/880/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maohao.wordpress.com/880/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maohao.wordpress.com/880/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maohao.wordpress.com/880/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maohao.wordpress.com&amp;blog=202301&amp;post=880&amp;subd=maohao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maohao.wordpress.com/2011/03/27/using-modules-in-flex-101/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ac75dfe1c3f137ec54a538bb66a390c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maohao</media:title>
		</media:content>
	</item>
	</channel>
</rss>
