<?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>Xster.net</title>
	<atom:link href="http://tech.xster.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.xster.net</link>
	<description>Never relearn twice</description>
	<lastBuildDate>Fri, 11 May 2012 18:35:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How to Change Disabled Button Background, Focused TextBox Border etc in Windows Phone</title>
		<link>http://tech.xster.net/tips/how-to-change-disabled-button-background-focused-textbox-border-etc-in-windows-phone/</link>
		<comments>http://tech.xster.net/tips/how-to-change-disabled-button-background-focused-textbox-border-etc-in-windows-phone/#comments</comments>
		<pubDate>Fri, 11 May 2012 18:34:54 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Mango]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Template]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[Windows Phone]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[WP7]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=402</guid>
		<description><![CDATA[In the properties tab or attributes of XAML, the level of control you can have over Silverlight controls is rather limited. You can&#8217;t change their behaviours in different states. To actually control it, you need to create a ControlTemplate. Sounds innocent enough but it&#8217;s basically forcing the user to redefine a user control and recreate [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>In the properties tab or attributes of XAML, the level of control you can have over Silverlight controls is rather limited. You can&#8217;t change their behaviours in different states. To actually control it, you need to create a ControlTemplate. Sounds innocent enough but it&#8217;s basically forcing the user to redefine a user control and recreate the button or the textbox manually from their constituents (border, grid etc) which is extremely labour intensive if all you want to do is just change say the colour of the border when it is selected.</p>
<p>Instead of recreating the control from scratch, you can let Microsoft Expression Blend do some part of that job for you. Style your control to your liking as much as you can in Blend and then right-click to select Edit Template -&gt; Edit a Copy. Then you get to define a key. Think of it like a CSS class and name it as you wish. Define it in the Application (App.xaml) so you can use it everywhere in your application. This will then generate a ControlTemplate for you based on the instance of control you selected Edit Template on.<span id="more-402"></span></p>
<p style="text-align: center;"><a href="http://tech.xster.net/tips/how-to-change-disabled-button-background-focused-textbox-border-etc-in-windows-phone/attachment/screen-shot-2012-05-11-at-2-30-04-pm/" rel="attachment wp-att-403"><img class="size-medium wp-image-403 aligncenter" title="Generated ControlTemplate" src="http://tech.xster.net/wp-content/uploads/2012/05/Screen-Shot-2012-05-11-at-2.30.04-PM-300x236.png" alt="" width="300" height="236" /></a></p>
<p style="text-align: left;">From there, you can look at the code and notice the properties that are storyboard-animated to change on different events and customize them. Once that&#8217;s done you can start applying this new template to your controls by adding the</p>

<div class="wp_syntax"><div class="code"><pre class="xaml" style="font-family:monospace;">Template=&quot;{StaticResource TextBoxCustom}&quot;</pre></div></div>

<p style="text-align: left;">attribute to the tags.</p>
<div></div>
<div class="shr-publisher-402"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fhow-to-change-disabled-button-background-focused-textbox-border-etc-in-windows-phone%2F' data-shr_title='How+to+Change+Disabled+Button+Background%2C+Focused+TextBox+Border+etc+in+Windows+Phone'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fhow-to-change-disabled-button-background-focused-textbox-border-etc-in-windows-phone%2F' data-shr_title='How+to+Change+Disabled+Button+Background%2C+Focused+TextBox+Border+etc+in+Windows+Phone'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/how-to-change-disabled-button-background-focused-textbox-border-etc-in-windows-phone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Read Raw JSON Data from HTTP POST for ASP.NET MVC 4 Web API</title>
		<link>http://tech.xster.net/tips/read-raw-json-data-from-http-post-for-asp-net-mvc-4-web-api/</link>
		<comments>http://tech.xster.net/tips/read-raw-json-data-from-http-post-for-asp-net-mvc-4-web-api/#comments</comments>
		<pubDate>Fri, 04 May 2012 20:12:25 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[MVC 4]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Web API]]></category>
		<category><![CDATA[Web Service]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=400</guid>
		<description><![CDATA[The Web API is a good step catching up to Ruby on Rails and Django but isn&#8217;t nearly as well documented. If your posted data doesn&#8217;t match exactly a model object, it&#8217;s hard to figure out how to just get all the data out and process it yourself. Inside the public void Post() tag, you [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>The Web API is a good step catching up to Ruby on Rails and Django but isn&#8217;t nearly as well documented. If your posted data doesn&#8217;t match exactly a model object, it&#8217;s hard to figure out how to just get all the data out and process it yourself. Inside the</p>
<pre lang="C#">public void Post()</pre>
<p>tag, you can have access to a Request member from ApiController and with it, you can do</p>
<pre lang="C#">JsonObject input = Request.Content.ReadAsAsync().Result;</pre>
<p>to get the data out. A key detail is that if you do so, you cannot put any parameters in the Post method declaration or it will try to bind it to which ever parameter type you specified.</p>
<div class="shr-publisher-400"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fread-raw-json-data-from-http-post-for-asp-net-mvc-4-web-api%2F' data-shr_title='Read+Raw+JSON+Data+from+HTTP+POST+for+ASP.NET+MVC+4+Web+API'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fread-raw-json-data-from-http-post-for-asp-net-mvc-4-web-api%2F' data-shr_title='Read+Raw+JSON+Data+from+HTTP+POST+for+ASP.NET+MVC+4+Web+API'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/read-raw-json-data-from-http-post-for-asp-net-mvc-4-web-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Can&#8217;t Ping Windows Parallels VM in Bridged Network Mode</title>
		<link>http://tech.xster.net/tips/cant-ping-windows-parallels-vm-in-bridged-network-mode/</link>
		<comments>http://tech.xster.net/tips/cant-ping-windows-parallels-vm-in-bridged-network-mode/#comments</comments>
		<pubDate>Wed, 02 May 2012 20:54:24 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Parallels]]></category>
		<category><![CDATA[ping]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[vm]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=397</guid>
		<description><![CDATA[If you can&#8217;t see your Windows 7 VM from Mac OS X in bridged mode, the problem could be the location set on your Windows 7 OS. It&#8217;s possible that with bridged mode, Windows can&#8217;t figure out the network time and default to &#8216;Unidentified network&#8217; which is the same as if you chose Public and [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>If you can&#8217;t see your Windows 7 VM from Mac OS X in bridged mode, the problem could be the location set on your Windows 7 OS. It&#8217;s possible that with bridged mode, Windows can&#8217;t figure out the network time and default to &#8216;Unidentified network&#8217; which is the same as if you chose Public and put it into a safer mode than if you chose Home or Work. Unfortunately if it were the case, you can&#8217;t really change the network type. If your VM is going to stay home and never wonder into the dangerous wildland, you can just set the &#8216;Unidentified network&#8217; to be treated as a private network via:</p>
<p>Start -&gt; secpol.msc<br />
Network List Manager Policies -&gt; Unidentified Networks<br />
Select Private</p>
<p>Then you&#8217;re done!</p>
<div class="shr-publisher-397"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fcant-ping-windows-parallels-vm-in-bridged-network-mode%2F' data-shr_title='Can%27t+Ping+Windows+Parallels+VM+in+Bridged+Network+Mode'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fcant-ping-windows-parallels-vm-in-bridged-network-mode%2F' data-shr_title='Can%27t+Ping+Windows+Parallels+VM+in+Bridged+Network+Mode'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/cant-ping-windows-parallels-vm-in-bridged-network-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pythonic Coding Example</title>
		<link>http://tech.xster.net/tips/pythonic-coding-example/</link>
		<comments>http://tech.xster.net/tips/pythonic-coding-example/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 14:04:12 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[pythonic]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=394</guid>
		<description><![CDATA[Great article about the elusive &#8216;Pythonic&#8217; coding: http://artifex.org/~hblanks/talks/2011/pep20_by_example.html]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Great article about the elusive &#8216;Pythonic&#8217; coding:</p>
<p><a href="http://artifex.org/~hblanks/talks/2011/pep20_by_example.html">http://artifex.org/~hblanks/talks/2011/pep20_by_example.html</a></p>
<div class="shr-publisher-394"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fpythonic-coding-example%2F' data-shr_title='Pythonic+Coding+Example'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fpythonic-coding-example%2F' data-shr_title='Pythonic+Coding+Example'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/pythonic-coding-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>8 Ways to Share your Git Repository</title>
		<link>http://tech.xster.net/tips/8-ways-to-share-your-git-repository/</link>
		<comments>http://tech.xster.net/tips/8-ways-to-share-your-git-repository/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 19:32:12 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[alm]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[scm]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=391</guid>
		<description><![CDATA[Excellent article describing how you can collaborate with your development team: http://www.jedi.be/blog/2009/05/06/8-ways-to-share-your-git-repository/]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Excellent article describing how you can collaborate with your development team:</p>
<p><a href="http://www.jedi.be/blog/2009/05/06/8-ways-to-share-your-git-repository/">http://www.jedi.be/blog/2009/05/06/8-ways-to-share-your-git-repository/</a></p>
<div class="shr-publisher-391"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2F8-ways-to-share-your-git-repository%2F' data-shr_title='8+Ways+to+Share+your+Git+Repository'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2F8-ways-to-share-your-git-repository%2F' data-shr_title='8+Ways+to+Share+your+Git+Repository'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/8-ways-to-share-your-git-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac Doesn&#8217;t Go to Sleep</title>
		<link>http://tech.xster.net/tips/mac-doesnt-go-to-sleep/</link>
		<comments>http://tech.xster.net/tips/mac-doesnt-go-to-sleep/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 02:43:22 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[power management]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=388</guid>
		<description><![CDATA[When you make the Mac go to sleep but it just stays on with the screen black, you can use the pmset -g to display you current power management settings and see the entry for sleep that will tell you the problem causing process PID]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>When you make the Mac go to sleep but it just stays on with the screen black, you can use the</p>
<pre lang="&quot;bash">pmset -g</pre>
<p>to display you current power management settings and see the entry for sleep that will tell you the problem causing process PID</p>
<div class="shr-publisher-388"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fmac-doesnt-go-to-sleep%2F' data-shr_title='Mac+Doesn%27t+Go+to+Sleep'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fmac-doesnt-go-to-sleep%2F' data-shr_title='Mac+Doesn%27t+Go+to+Sleep'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/mac-doesnt-go-to-sleep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Login SAP CRM as a Separate User than Single Sign-On</title>
		<link>http://tech.xster.net/tips/login-sap-crm-as-a-separate-user-than-single-sign-on/</link>
		<comments>http://tech.xster.net/tips/login-sap-crm-as-a-separate-user-than-single-sign-on/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 20:56:00 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[CRM]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[NetWeaver]]></category>
		<category><![CDATA[R/3]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[SSO]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=383</guid>
		<description><![CDATA[If you have SSO enabled on SAP CRM, you can sometimes get stuck with your user on your computer&#8217;s certificate and you can&#8217;t get out of it with logout, delete cookies, no auto-login etc. But what you can do is add ?sap-user=DIFFERENTUSER at the end of your usual sap/bc/bsp/sap/crm_ui_start/default.htm URL and the login dialog will prompt. [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>If you have SSO enabled on SAP CRM, you can sometimes get stuck with your user on your computer&#8217;s certificate and you can&#8217;t get out of it with logout, delete cookies, no auto-login etc. But what you can do is add</p>
<blockquote><p>?sap-user=DIFFERENTUSER</p></blockquote>
<p>at the end of your usual sap/bc/bsp/sap/crm_ui_start/default.htm URL and the login dialog will prompt. Try it in conjunction with &#8216;Clear SSL state&#8217; button in the Content tab of Internet Options</p>
<div class="shr-publisher-383"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Flogin-sap-crm-as-a-separate-user-than-single-sign-on%2F' data-shr_title='Login+SAP+CRM+as+a+Separate+User+than+Single+Sign-On'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Flogin-sap-crm-as-a-separate-user-than-single-sign-on%2F' data-shr_title='Login+SAP+CRM+as+a+Separate+User+than+Single+Sign-On'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/login-sap-crm-as-a-separate-user-than-single-sign-on/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone rings twice with text message</title>
		<link>http://tech.xster.net/tips/iphone-rings-twice-with-text-message/</link>
		<comments>http://tech.xster.net/tips/iphone-rings-twice-with-text-message/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 13:30:21 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[phone]]></category>

		<guid isPermaLink="false">http://tech.xster.net/tips/iphone-rings-twice-with-text-message/</guid>
		<description><![CDATA[It was kinda off putting with my new iPhone 4S to find out that Apple makes SMS alerts ring twice (once on receive and one reminder) instead of having an LED light for alerts like in Android or Blackberry. Kind of a workaround rather than a real solution to the problem of how to find [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>It was kinda off putting with my new iPhone 4S to find out that Apple makes SMS alerts ring twice (once on receive and one reminder) instead of having an LED light for alerts like in Android or Blackberry. Kind of a workaround rather than a real solution to the problem of how to find out I have alerts pending when I missed the first alert. Apple operates on a push principle and Google/RIM operates on pull.</p>
<p>Anyway, if I have reason to miss the first one, I most likely won&#8217;t notice the second one. It&#8217;s also misleading when it rings twice because you&#8217;d think there&#8217;s 2 messages.</p>
<p>To turn that functionality off, go to Settings->Notifications->Messages->Repeat Alert->Never.</p>
<p><a href="http://tech.xster.net/wp-content/uploads/2011/11/20111101-093215.jpg"><img src="http://tech.xster.net/wp-content/uploads/2011/11/20111101-093215.jpg" alt="20111101-093215.jpg" class="alignnone size-full" /></a></p>
<div class="shr-publisher-380"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fiphone-rings-twice-with-text-message%2F' data-shr_title='iPhone+rings+twice+with+text+message'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fiphone-rings-twice-with-text-message%2F' data-shr_title='iPhone+rings+twice+with+text+message'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/iphone-rings-twice-with-text-message/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Disable Android Exchange Enforced Email Unlock Security</title>
		<link>http://tech.xster.net/tips/disable-android-exchange-enforced-email-unlock-security/</link>
		<comments>http://tech.xster.net/tips/disable-android-exchange-enforced-email-unlock-security/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 03:45:12 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[account]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[CyanogenMod]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=375</guid>
		<description><![CDATA[If you tried to load an entreprise email account in the Email.apk app and the Exchange server enforces a minimun password, it could be pretty annoying. To get around it, you can start by getting a modified version of the app from shafty023 onto your rooted phone. Copy the app to your SD card. Then [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>If you tried to load an entreprise email account in the Email.apk app and the Exchange server enforces a minimun password, it could be pretty annoying. To get around it, you can start by getting a modified version of the app from <a href="http://forum.xda-developers.com/showthread.php?t=775007">shafty023</a> onto your rooted phone. Copy the app to your SD card. Then run</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">su</span>
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> remount,rw <span style="color: #660033;">-t</span> yaffs2 <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>block<span style="color: #000000; font-weight: bold;">/</span>mtdblock3 <span style="color: #000000; font-weight: bold;">/</span>system
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>sdcard<span style="color: #000000; font-weight: bold;">/</span>Email.apk <span style="color: #000000; font-weight: bold;">/</span>system<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">chown</span> root <span style="color: #000000; font-weight: bold;">/</span>system<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>Email.apk
<span style="color: #c20cb9; font-weight: bold;">chgrp</span> root <span style="color: #000000; font-weight: bold;">/</span>system<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>Email.apk
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">644</span> <span style="color: #000000; font-weight: bold;">/</span>system<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>Email.apk
reboot</pre></div></div>

<div class="shr-publisher-375"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fdisable-android-exchange-enforced-email-unlock-security%2F' data-shr_title='Disable+Android+Exchange+Enforced+Email+Unlock+Security'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fdisable-android-exchange-enforced-email-unlock-security%2F' data-shr_title='Disable+Android+Exchange+Enforced+Email+Unlock+Security'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/disable-android-exchange-enforced-email-unlock-security/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Django Compress Static Files and Compile CSS</title>
		<link>http://tech.xster.net/tips/django-compress-static-files-and-compile-css/</link>
		<comments>http://tech.xster.net/tips/django-compress-static-files-and-compile-css/#comments</comments>
		<pubDate>Tue, 10 May 2011 01:49:32 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[compress]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[static]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=373</guid>
		<description><![CDATA[I started off looking for a request time compiler of LESS for Django and initially found django-css which seems to serve the purpose great. Compressing static files on the fly is definitely a nice added bonus as well. It does so by containing a fork of django_compressor. But on further inspections, I jumped ship. The [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I started off looking for a request time compiler of <a href="http://lesscss.org/">LESS</a> for Django and initially found <a href="http://github.com/dziegler/django-css">django-css</a> which seems to serve the purpose great. Compressing static files on the fly is definitely a nice added bonus as well. It does so by containing a fork of <a href="http://github.com/jezdez/django_compressor">django_compressor</a>. But on further inspections, I jumped ship. The original project, django_compressor, sees a more regular update and is now Django 1.3 ready while the &#8216;successor&#8217; isn&#8217;t. Funny thing is django_compressor supports compiling any CSS formats compilable via command line. With a better documentation overall, seems like the original has beat the sequel.</p>
<div class="shr-publisher-373"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fdjango-compress-static-files-and-compile-css%2F' data-shr_title='Django+Compress+Static+Files+and+Compile+CSS'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fdjango-compress-static-files-and-compile-css%2F' data-shr_title='Django+Compress+Static+Files+and+Compile+CSS'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/django-compress-static-files-and-compile-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django Log to File</title>
		<link>http://tech.xster.net/tips/django-log-to-file/</link>
		<comments>http://tech.xster.net/tips/django-log-to-file/#comments</comments>
		<pubDate>Mon, 09 May 2011 03:36:06 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[FileHandler]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=369</guid>
		<description><![CDATA[In the official Django logging docs, it wasn&#8217;t very clear about how to log to files. As you can understand, Django can use any Python logging classes that are all listed here. One of them is FileHandler. To use it, just add this to your settings.py LOGGING = &#123; ... 'handlers': &#123; ... 'file':&#123; 'level': [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>In the official Django <a href="http://docs.djangoproject.com/en/dev/topics/logging/">logging docs</a>, it wasn&#8217;t very clear about how to log to files. As you can understand, Django can use any Python logging classes that are all listed <a href="http://docs.python.org/library/logging.handlers.html">here</a>. One of them is FileHandler. To use it, just add this to your settings.py<span id="more-369"></span></p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">LOGGING = <span style="color: black;">&#123;</span>
    ...
    <span style="color: #483d8b;">'handlers'</span>: <span style="color: black;">&#123;</span>
        ...
	<span style="color: #483d8b;">'file'</span>:<span style="color: black;">&#123;</span>
	    <span style="color: #483d8b;">'level'</span>: <span style="color: #483d8b;">'DEBUG'</span>,
	    <span style="color: #483d8b;">'class'</span>: <span style="color: #483d8b;">'logging.FileHandler'</span>,
	<span style="color: black;">&#125;</span>
    <span style="color: black;">&#125;</span>,
    ...
<span style="color: black;">&#125;</span></pre></div></div>

<p>But the FileHandler class constructor needs more parameters. To add them, you have to add the parameter name key with its value into the dictionary.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">LOGGING = <span style="color: black;">&#123;</span>
    ...
    <span style="color: #483d8b;">'handlers'</span>: <span style="color: black;">&#123;</span>
        ...
	<span style="color: #483d8b;">'file'</span>:<span style="color: black;">&#123;</span>
	    <span style="color: #483d8b;">'level'</span>: <span style="color: #483d8b;">'DEBUG'</span>,
	    <span style="color: #483d8b;">'class'</span>: <span style="color: #483d8b;">'logging.FileHandler'</span>,
            <span style="color: #483d8b;">'filename'</span>: <span style="color: #483d8b;">'debug.log'</span>,
	<span style="color: black;">&#125;</span>
    <span style="color: black;">&#125;</span>,
    ...
<span style="color: black;">&#125;</span></pre></div></div>

<div class="shr-publisher-369"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fdjango-log-to-file%2F' data-shr_title='Django+Log+to+File'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fdjango-log-to-file%2F' data-shr_title='Django+Log+to+File'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/django-log-to-file/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Logitech Performance MX Review</title>
		<link>http://tech.xster.net/thoughts/logitech-performance-mx-review/</link>
		<comments>http://tech.xster.net/thoughts/logitech-performance-mx-review/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 03:59:33 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[ergonomics]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[Logitech]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[product]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[shopping]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=364</guid>
		<description><![CDATA[Got a Logitech Performance MX on &#8220;special&#8221; at Best Buy this weekend (80$ for a mouse&#8230; what a slaughter) because I just have a laptop mouse and am tired of not having anything to rest my palm on. At first, it&#8217;s great. Looks like a race car, good performance, nice receiver, rechargeable on the fly [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Got a <a href="http://www.logitech.com/en-us/mice-pointers/mice/devices/5845">Logitech Performance MX</a> on &#8220;special&#8221; at Best Buy this weekend (80$ for a mouse&#8230; what a slaughter) because I just have a laptop mouse and am tired of not having anything to rest my palm on. At first, it&#8217;s great. Looks like a race car, good performance, nice receiver, rechargeable on the fly etc. Then, something feels off&#8230; something uncomfortable. I turn the mouse over and the fatal flaw. The sensor isn&#8217;t placed at the center of the mouse but almost under your thumb&#8230;<span id="more-364"></span></p>
<p>Then I reconfirmed my discomfort. Since the box says that it&#8217;s the best mouse the &#8220;mice experts&#8221; came up with after making a billion mice, I figured I must be able to use it at the zenith of comfort. I closed my eyes and made the most natural horizontal draw (ie, rotate around a point on the wrist which is placed on the table such that the instantaneous motion of the mouse is the tangent of the arc I&#8217;m drawing). I look and the cursor is moving diagonally on the screen.</p>
<p>In order to produce the intended horizontal move, I had to either lift and move my wrist (very uncomfortable) or continuously extend and retract my wrist (very uncomfortable as well). You can also resolve this if you hold the mouse differently. If instead of putting the thumb into the intended groove, you rotate the mouse to compensate for the vertical move, you can also draw horizontal lines at the cost of having a gap under your palm.</p>
<p>Overall, it&#8217;s a sexy sleek black mouse but not necessarily ergonomically superior to the 2$ mouse you can get at any random stores. In other words, if you want to pay 100$ for it, you&#8217;d have to be willing to buy the different look, not rationalise it with ergonomics.</p>
<div class="shr-publisher-364"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Ftech.xster.net%2Fthoughts%2Flogitech-performance-mx-review%2F' data-shr_title='Logitech+Performance+MX+Review'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Ftech.xster.net%2Fthoughts%2Flogitech-performance-mx-review%2F' data-shr_title='Logitech+Performance+MX+Review'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/thoughts/logitech-performance-mx-review/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Validate and Format Addresses using Google API</title>
		<link>http://tech.xster.net/tips/validate-and-format-addresses-using-google-api/</link>
		<comments>http://tech.xster.net/tips/validate-and-format-addresses-using-google-api/#comments</comments>
		<pubDate>Thu, 21 Apr 2011 18:54:38 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[address]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[Geocoding]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[pygeocoder]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[validate]]></category>
		<category><![CDATA[verify]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=356</guid>
		<description><![CDATA[Suppose you want to make some web app that lets users input addresses. I would be nice to Weed out minor misspelling Standardise format (proper capitalisation, abbreviated province/state or full name etc) Input in freeform but store civic number, street name, city etc separately Verify the address exists of course Some governmental entities provide this [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div>
<p>Suppose you want to make some web app that lets users input addresses. I would be nice to</p>
<ol>
<li>Weed out minor misspelling</li>
<li>Standardise format (proper capitalisation, abbreviated province/state or full name etc)</li>
<li>Input in freeform but store civic number, street name, city etc separately</li>
<li>Verify the address exists of course</li>
</ol>
<p>Some governmental entities provide this information via public APIs but if you want a uniform service, why not use Google?<span id="more-356"></span></p>
<p>Fortunately, <a href="http://twitter.com/thormitchell">Thor Mitchell</a>, a Google Product Manager, posted an excellent <a href="http://www.thialfi.org/work/api/validate.html">example code</a> that does all of the above using Google Maps JavaScript API. Even better, it&#8217;s with the new V3 so it&#8217;s not obsolete anytime soon. It&#8217;s originally posted <a href="http://www.telnet80.com/2010/09/address-validation-using-google-maps.html?showComment=1285726654178#c2804710605065263449">here</a> in the comments of a blog by <a href="https://profiles.google.com/gabe.sumner/about">Gabe Sumner</a>. It definitely deserves more recognition so here it is again as is:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&amp;lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta name=&quot;viewport&quot; content=&quot;initial-scale=1.0, user-scalable=no&quot; /&amp;gt;
&amp;lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=UTF-8&quot;/&amp;gt;
&amp;lt;title&amp;gt;Google Maps JavaScript API v3 Example: Map Simple&amp;lt;/title&amp;gt;
&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://maps.google.com/maps/api/js?sensor=false&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
&nbsp;
  var geocoder, map, marker;
  var defaultLatLng = new google.maps.LatLng(30,0);
&nbsp;
  function initialize() {
    geocoder = new google.maps.Geocoder();
    var mapOptions = {
      zoom: 0,
      center: defaultLatLng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    map = new google.maps.Map(
      document.getElementById(&quot;map_canvas&quot;),
      mapOptions
    );
    marker = new google.maps.Marker();
  }
&nbsp;
  function validate() {
    clearResults();
    var address = document.getElementById('address').value;
    geocoder.geocode({'address': address }, function(results, status) {
      switch(status) {
        case google.maps.GeocoderStatus.OK:
          document.getElementById('valid').value = 'YES';
          document.getElementById('type').value = results[0].types[0];
          document.getElementById('result').value = results[0].formatted_address;
          mapAddress(results[0]);
          break;
        case google.maps.GeocoderStatus.ZERO_RESULTS:
          document.getElementById('valid').value = 'NO';
          break;
        default:
          alert(&quot;An error occured while validating this address&quot;)
      }
    });
  }
&nbsp;
  function clearResults() {
    document.getElementById('valid').value = '';
    document.getElementById('type').value = '';
    document.getElementById('result').value = '';
    map.setCenter(defaultLatLng);
    map.setZoom(0);
    marker.setMap(null);
  }
&nbsp;
  function mapAddress(result) {
    marker.setPosition(result.geometry.location);
    marker.setMap(map);
    map.fitBounds(result.geometry.viewport);
  }
&amp;lt;/script&amp;gt;
&amp;lt;style&amp;gt;
body {
  font-family: sans-serif;
}
&nbsp;
#address {
  width:300px;
  height:150px;
  float: left;
  margin: 10px;
}
&nbsp;
#map_canvas {
  width:256px;
  height:150px;
  margin: 10px;
}
&nbsp;
#validate {
  clear: both;
}
&nbsp;
#results {
  margin-top: 10px;
}
&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body onload=&quot;initialize()&quot;&amp;gt;
  &amp;lt;div&amp;gt;Address&amp;lt;/div&amp;gt;
  &amp;lt;textarea type=&quot;text&quot; id=&quot;address&quot;&amp;gt;&amp;lt;/textarea&amp;gt;
  &amp;lt;div id=&quot;map_canvas&quot;&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;div id=&quot;validate&quot;&amp;gt;&amp;lt;input type=&quot;button&quot; value=&quot;Validate&quot; onClick=&quot;validate()&quot;&amp;gt;&amp;lt;/input&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;div id=&quot;results&quot;&amp;gt;
    &amp;lt;table&amp;gt;
      &amp;lt;tr&amp;gt;&amp;lt;td align=&quot;right&quot;&amp;gt;Valid:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; id=&quot;valid&quot; size=&quot;60&quot;&amp;gt;&amp;lt;/input&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
      &amp;lt;tr&amp;gt;&amp;lt;td align=&quot;right&quot;&amp;gt;Matched:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; id=&quot;type&quot; size=&quot;60&quot;&amp;gt;&amp;lt;/input&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
      &amp;lt;tr&amp;gt;&amp;lt;td align=&quot;right&quot;&amp;gt;Result:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; id=&quot;result&quot; size=&quot;60&quot;&amp;gt;&amp;lt;/input&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
    &amp;lt;/table&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;</pre></div></div>

<p>Only 100 lines! It uses Google&#8217;s GeoCoding JavaScript API and you can fancy it up easily with jQuery. In the validate function, the results variable contains of course json formatted responses as described in Google&#8217;s <a href="http://code.google.com/apis/maps/documentation/geocoding/#GeocodingResponses">docs</a>. Looking at &#8216;address_components&#8217; will give you the properly formatted address separated by parts which you can put into database.</p>
<p>For a backend solution, you can use <a href="http://code.xster.net/pygeocoder">pygeocoder</a>, a Python library, to validate addresses.</p>
</div>
<div class="shr-publisher-356"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fvalidate-and-format-addresses-using-google-api%2F' data-shr_title='Validate+and+Format+Addresses+using+Google+API'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fvalidate-and-format-addresses-using-google-api%2F' data-shr_title='Validate+and+Format+Addresses+using+Google+API'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/validate-and-format-addresses-using-google-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Debug with ipdb</title>
		<link>http://tech.xster.net/tips/python-debug-with-ipdb/</link>
		<comments>http://tech.xster.net/tips/python-debug-with-ipdb/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 18:30:47 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[breakpoint]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[ipdb]]></category>
		<category><![CDATA[IPython]]></category>
		<category><![CDATA[pdb]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=352</guid>
		<description><![CDATA[A quickie: import ipdb; ipdb.set_trace&#40;&#41; This puts a breakpoint in the code using ipdb. It has the advantage of having better formatted output, tab completion etc over the vanilla pdb]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>A quickie:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> ipdb<span style="color: #66cc66;">;</span> ipdb.<span style="color: black;">set_trace</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>This puts a breakpoint in the code using ipdb. It has the advantage of having better formatted output, tab completion etc over the vanilla pdb</p>
<div class="shr-publisher-352"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fpython-debug-with-ipdb%2F' data-shr_title='Python+Debug+with+ipdb'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fpython-debug-with-ipdb%2F' data-shr_title='Python+Debug+with+ipdb'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/python-debug-with-ipdb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PIL: Get RGB Value from GIF</title>
		<link>http://tech.xster.net/tips/pil-get-rgb-value-from-gif/</link>
		<comments>http://tech.xster.net/tips/pil-get-rgb-value-from-gif/#comments</comments>
		<pubDate>Sun, 03 Apr 2011 05:16:58 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[GIF]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[PIL]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[RGB]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=331</guid>
		<description><![CDATA[If you load a GIF file with PIL via Image.open(&#8216;giffile.gif&#8217;) and then try to look at its pixels, you would get integers instead of tuples since the GIF pixels refers to one of the 256 colours in the GIF colour palette. The palette would then contain the RGB value of the pixel. To avoid all [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>If you load a GIF file with PIL via Image.open(&#8216;giffile.gif&#8217;) and then try to look at its pixels, you would get integers instead of tuples since the GIF pixels refers to one of the 256 colours in the GIF colour palette. The palette would then contain the RGB value of the pixel.</p>
<p>To avoid all this hassle and just get RGB tuple directly:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">gif = Image.<span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'giffile.gif'</span><span style="color: black;">&#41;</span>
rgbimage = GIF.<span style="color: black;">convert</span> <span style="color: black;">&#40;</span><span style="color: #483d8b;">'RGB'</span><span style="color: black;">&#41;</span>
rgbimage.<span style="color: black;">getpixel</span><span style="color: black;">&#40;</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span>,<span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">231</span>, <span style="color: #ff4500;">10</span>, <span style="color: #ff4500;">54</span><span style="color: black;">&#41;</span></pre></div></div>

<div class="shr-publisher-331"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fpil-get-rgb-value-from-gif%2F' data-shr_title='PIL%3A+Get+RGB+Value+from+GIF'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fpil-get-rgb-value-from-gif%2F' data-shr_title='PIL%3A+Get+RGB+Value+from+GIF'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/pil-get-rgb-value-from-gif/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

