<?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>Andrew Chaa, cha cha</title>
	<atom:link href="http://andrewchaa.me.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrewchaa.me.uk</link>
	<description>Dance with a geek</description>
	<lastBuildDate>Sat, 18 Feb 2012 22:08:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='andrewchaa.me.uk' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Andrew Chaa, cha cha</title>
		<link>http://andrewchaa.me.uk</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://andrewchaa.me.uk/osd.xml" title="Andrew Chaa, cha cha" />
	<atom:link rel='hub' href='http://andrewchaa.me.uk/?pushpress=hub'/>
		<item>
		<title>Visual Studio 2010 Command Prompt Here On the Context Menu of Windows Explorer</title>
		<link>http://andrewchaa.me.uk/2012/02/18/visual-studio-2010-command-prompt-here-on-the-context-menu-of-windows-explorer/</link>
		<comments>http://andrewchaa.me.uk/2012/02/18/visual-studio-2010-command-prompt-here-on-the-context-menu-of-windows-explorer/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 22:08:31 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[command prompt]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://andrewchaa.me.uk/?p=531</guid>
		<description><![CDATA[You use keyboards and command line more and more, as you get more experienced with the tools in development. If you install git on windows, it creates &#8220;Git bash here&#8221; context menu on Windows Explorer. It is really handy, and I like it. I believe Visual Studio installation should do the same. Well, it doesn&#8217;t, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=531&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You use keyboards and command line more and more, as you get more experienced with the tools in development. If you install git on windows, it creates &#8220;Git bash here&#8221; context menu on Windows Explorer. It is really handy, and I like it. I believe Visual Studio installation should do the same.</p>
<p>Well, it doesn&#8217;t, but you can create it, if you want, with the little manipulation of windows registry.</p>
<p>First, open regedit. Make sure you export the current settings as backup, as your mistake can paralyse your system.</p>
<p>Second, Create two registry keys to enable the context menu on Windows Explorer.</p>
<ul>
<li>HKEY_CLASSES_ROOT\Directory\shell\vs_cmd</li>
<li>HKEY_CLASSES_ROOT\Directory\shell\vs_cmd\command</li>
</ul>
<p>The values are like these</p>
<p><span style="text-decoration:underline;"><span style="color:#000000;text-decoration:underline;">HKEY_CLASSES_ROOT\Directory\shell\vs_cmd</span></span></p>
<ul>
<li>Name: (Default)</li>
<li>Type: REG_SZ</li>
<li>Data: Visual Studio 2010 Command Prompt Here</li>
</ul>
<div><span style="text-decoration:underline;">HKEY_CLASSES_ROOT\Directory\shell\vs_cmd\command</span></div>
<ul>
<li>Name: (Default)</li>
<li>Type: REG_SZ</li>
<li>Data: cmd.exe /s /k pushd &#8220;%V&#8221; &amp;&amp; &#8220;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat&#8221; x86</li>
</ul>
<p>Then go to windows explorer and right-click on any directory. You will see a menu &#8220;Visual Studio 2010 Command Prompt Here&#8221;</p>
<p>Let me explain what&#8217;s happening here.</p>
<ul>
<li>&#8220;HKEY_CLASSES_ROOT\Directory\shell&#8221; is where you put settings for your windows shell.</li>
<li>cmd.exe is reachable from any directory, so you don&#8217;t have to specify the full path to execute it.</li>
<li>/s means to strip quote characters from the command_line (<a href="http://ss64.com/nt/cmd.html">http://ss64.com/nt/cmd.html</a>)</li>
<li>/k means to carry out a command but the shell remains without closing.</li>
<li>pushd let you execute cmd.exe with a given directory (<a href="http://www.hanselman.com/blog/PUSHDReminderItAutomaticallyMapsNetworkDrives.aspx">http://www.hanselman.com/blog/PUSHDReminderItAutomaticallyMapsNetworkDrives.aspx</a>)</li>
<li>vcvarsall.bat is a batch file executed when you run visual studio command prompt.</li>
</ul>
<p>&nbsp;</p>
<p>I also referenced the below nice posts.</p>
<ul>
<li><a href="http://www.reversealchemy.net/blog/2008/11/26/adding-the-visual-studio-2008-command-prompt-to-your-explorer-context-menu/">http://www.reversealchemy.net/blog/2008/11/26/adding-the-visual-studio-2008-command-prompt-to-your-explorer-context-menu/</a></li>
<li><a href="http://www.alteridem.net/2010/09/02/visual-studio-2010-command-prompt-here/">http://www.alteridem.net/2010/09/02/visual-studio-2010-command-prompt-here/</a></li>
</ul>
<p>but eventually, I used git&#8217;s &#8220;bash shell here&#8221; registry settings.</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simplelifeuk.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simplelifeuk.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/simplelifeuk.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/simplelifeuk.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/simplelifeuk.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/simplelifeuk.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/simplelifeuk.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/simplelifeuk.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/simplelifeuk.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/simplelifeuk.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/simplelifeuk.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/simplelifeuk.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/simplelifeuk.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/simplelifeuk.wordpress.com/531/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=531&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewchaa.me.uk/2012/02/18/visual-studio-2010-command-prompt-here-on-the-context-menu-of-windows-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c311c181986feead6c7cb43fb9844b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simplelifeuk</media:title>
		</media:content>
	</item>
		<item>
		<title>structuremap will scan your machine.config / web.config</title>
		<link>http://andrewchaa.me.uk/2012/02/14/structuremap-will-scan-your-machine-config-web-config/</link>
		<comments>http://andrewchaa.me.uk/2012/02/14/structuremap-will-scan-your-machine-config-web-config/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 15:03:21 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[StructureMap]]></category>

		<guid isPermaLink="false">http://andrewchaa.me.uk/?p=521</guid>
		<description><![CDATA[It&#8217;s not a security threat or concern. I don&#8217;t mean StructureMap does any harm. As IoC container, StructureMap tries to do his job by searching for assemblies specified in your machine.config or web.config. For example, it is a kind of legacy, but we specified our custom GAC assemblies in web.config in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG The problem is StructureMap [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=521&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not a security threat or concern. I don&#8217;t mean <a href="http://structuremap.net/structuremap/">StructureMap</a> does any harm. As IoC container, StructureMap tries to do his job by searching for assemblies specified in your machine.config or web.config.</p>
<p>For example, it is a kind of legacy, but we specified our custom GAC assemblies in web.config in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG</p>
<p><pre class="brush: xml;">
&lt;compilation&gt;
  &lt;assemblies&gt;
	&lt;add assembly=&quot;mscorlib&quot;/&gt;
	&lt;add assembly=&quot;System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&quot;/&gt;
	...
	&lt;add assembly=&quot;Your.Custom.Assembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c77a5H561934e089&quot;/&gt;
	...
</pre></p>
<p>The problem is StructureMap can complain that it can&#8217;t load the type while it is trying to find the matching instance. For example, we have the assembly on our dev machine and integration server, but not on the build box, and suddenly our functional tests start failing. Our functional tests do not use those dlls at all, and still StructureMap fail.</p>
<p>So beware of those naughty custom GAC assemblies, if you have any and put them in web.config or machine.config.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simplelifeuk.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simplelifeuk.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/simplelifeuk.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/simplelifeuk.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/simplelifeuk.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/simplelifeuk.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/simplelifeuk.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/simplelifeuk.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/simplelifeuk.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/simplelifeuk.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/simplelifeuk.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/simplelifeuk.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/simplelifeuk.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/simplelifeuk.wordpress.com/521/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=521&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewchaa.me.uk/2012/02/14/structuremap-will-scan-your-machine-config-web-config/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c311c181986feead6c7cb43fb9844b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simplelifeuk</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby dojo #2 reverse string, array permutation, and filtering binary numbers</title>
		<link>http://andrewchaa.me.uk/2012/02/10/ruby-dojo-2-reverse-string-array-permutation-and-filtering-binary-numbers/</link>
		<comments>http://andrewchaa.me.uk/2012/02/10/ruby-dojo-2-reverse-string-array-permutation-and-filtering-binary-numbers/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 13:42:31 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://andrewchaa.me.uk/2012/02/10/ruby-jodo-2-reverse-string-array-permutation-and-filtering-binary-numbers/</guid>
		<description><![CDATA[It was the second ruby dojo yesterday (Thu. 9/2/2012). A few more people turned up this time. No pizza, sadly, but understandable that they can&#8217;t buy pizza and drinks every time. This time, it was more organised. If you are agile, you get better at each iteration. 3 problems were given. Reverse the string: &#8220;Welcome! [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=514&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It was the second ruby dojo yesterday (Thu. 9/2/2012). A few more people turned up this time. No pizza, sadly, but understandable that they can&#8217;t buy pizza and drinks every time.</p>
<p>This time, it was more organised. If you are agile, you get better at each iteration.</p>
<p>3 problems were given.</p>
<ul>
<li>Reverse the string: &#8220;Welcome! Today&#8217;s challenges: Reverse the string&#8221;</li>
<li>Find all permutations of the letters: &#8220;welcome&#8221;</li>
<li>Find all 10-digit binary numbers with no consecutive 1s</li>
</ul>
<p>The first and the third were relatively straightforward, but permutations of &#8220;welcome&#8221; was a real challenge. We ended up using ruby&#8217;s &#8220;permutation&#8221; method, which was a cheat.</p>
<p><strong>Reverse the string</strong></p>
<p><pre class="brush: ruby;">
string = &quot;Hello Welcome to Ruby Dojo&quot;
reverse = []
string.each_char do |char|
reverse.unshift char
end
puts reverse.to_s
</pre></p>
<p><strong>ten_digit_binary.rb</strong></p>
<p><pre class="brush: ruby;">
filtered = []
max = &quot;1100000000&quot;.to_i(2)
(0..max).each do |number|
  n = number.to_s(2)
  filtered &lt;&lt; n unless n.match /11/
end

puts filtered
</pre></p>
<p><strong>permutations_of_welcome</strong></p>
<p><pre class="brush: ruby;">
string = &quot;welcome&quot;.split(&quot;&quot;)
string.permutation do  |str|
  puts str.inspect
end
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simplelifeuk.wordpress.com/514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simplelifeuk.wordpress.com/514/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/simplelifeuk.wordpress.com/514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/simplelifeuk.wordpress.com/514/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/simplelifeuk.wordpress.com/514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/simplelifeuk.wordpress.com/514/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/simplelifeuk.wordpress.com/514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/simplelifeuk.wordpress.com/514/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/simplelifeuk.wordpress.com/514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/simplelifeuk.wordpress.com/514/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/simplelifeuk.wordpress.com/514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/simplelifeuk.wordpress.com/514/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/simplelifeuk.wordpress.com/514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/simplelifeuk.wordpress.com/514/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=514&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewchaa.me.uk/2012/02/10/ruby-dojo-2-reverse-string-array-permutation-and-filtering-binary-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c311c181986feead6c7cb43fb9844b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simplelifeuk</media:title>
		</media:content>
	</item>
		<item>
		<title>d3.js Data-Driven Documents</title>
		<link>http://andrewchaa.me.uk/2012/02/02/d3-js-data-driven-documents/</link>
		<comments>http://andrewchaa.me.uk/2012/02/02/d3-js-data-driven-documents/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 15:48:35 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[d3]]></category>
		<category><![CDATA[javascript library]]></category>
		<category><![CDATA[mime type]]></category>

		<guid isPermaLink="false">http://andrewchaa.me.uk/?p=463</guid>
		<description><![CDATA[This is an amazing javascript library that allows you to impressively visualise your data. http://mbostock.github.com/d3/ When you download it from github, you have a great number of examples (I believe they are about 100). In order to try those examples, you need to request those example htmls through http, I mean, using web server. Javascript [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=463&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is an amazing javascript library that allows you to impressively visualise your data.</p>
<ul>
<li><a href="http://mbostock.github.com/d3/">http://mbostock.github.com/d3/</a></li>
</ul>
<p>When you download it from github, you have a great number of examples (I believe they are about 100).</p>
<p>In order to try those examples, you need to request those example htmls through http, I mean, using web server. Javascript usually don&#8217;t run very well, when you open the page from file system, as you know.</p>
<p>I tried them on a windows machine with IIS 7. One tricky bit was to set the mime type of json file. By default, IIS7 does not have json mime type, so you need to set it manually.</p>
<p><strong>Setting json mime type</strong></p>
<ol>
<li>Go to &#8220;MIME Types&#8221; on IIS Manager</li>
<li>Add .json extension with mime type of &#8220;application/json&#8221;</li>
</ol>
<p>Refresh the page, and your examples should run good and calm.</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simplelifeuk.wordpress.com/463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simplelifeuk.wordpress.com/463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/simplelifeuk.wordpress.com/463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/simplelifeuk.wordpress.com/463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/simplelifeuk.wordpress.com/463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/simplelifeuk.wordpress.com/463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/simplelifeuk.wordpress.com/463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/simplelifeuk.wordpress.com/463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/simplelifeuk.wordpress.com/463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/simplelifeuk.wordpress.com/463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/simplelifeuk.wordpress.com/463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/simplelifeuk.wordpress.com/463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/simplelifeuk.wordpress.com/463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/simplelifeuk.wordpress.com/463/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=463&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewchaa.me.uk/2012/02/02/d3-js-data-driven-documents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c311c181986feead6c7cb43fb9844b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simplelifeuk</media:title>
		</media:content>
	</item>
		<item>
		<title>Show and hide hidden files on mac</title>
		<link>http://andrewchaa.me.uk/2011/12/27/show-and-hide-hidden-files-on-mac/</link>
		<comments>http://andrewchaa.me.uk/2011/12/27/show-and-hide-hidden-files-on-mac/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 14:38:13 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[lion]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mac os x]]></category>

		<guid isPermaLink="false">http://andrewchaa.me.uk/?p=460</guid>
		<description><![CDATA[This should be a simple matter, but it troubled me so much. Simply, you need to the followings, but be warned that there are slight incorrect version of command on internet, at least which didnt&#8217; work for me on Lion. defaults write com.apple.finder AppleShowAllFiles -bool true Then killall Finder For me, if you did &#8220;YES&#8221; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=460&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This should be a simple matter, but it troubled me so much.</p>
<p>Simply, you need to the followings, but be warned that there are slight incorrect version of command on internet, at least which didnt&#8217; work for me on Lion.</p>
<p>defaults write com.apple.finder AppleShowAllFiles -bool true</p>
<p>Then</p>
<p>killall Finder</p>
<p>For me, if you did &#8220;YES&#8221; instead of true, it didn&#8217;t work.</p>
<p>from ehow (http://www.ehow.com/how_2274100_hidden-files-mac-os-x.html)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simplelifeuk.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simplelifeuk.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/simplelifeuk.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/simplelifeuk.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/simplelifeuk.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/simplelifeuk.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/simplelifeuk.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/simplelifeuk.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/simplelifeuk.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/simplelifeuk.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/simplelifeuk.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/simplelifeuk.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/simplelifeuk.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/simplelifeuk.wordpress.com/460/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=460&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewchaa.me.uk/2011/12/27/show-and-hide-hidden-files-on-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c311c181986feead6c7cb43fb9844b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simplelifeuk</media:title>
		</media:content>
	</item>
		<item>
		<title>Snowy, our beloved cat</title>
		<link>http://andrewchaa.me.uk/2011/12/01/snowy-our-beloved-cat/</link>
		<comments>http://andrewchaa.me.uk/2011/12/01/snowy-our-beloved-cat/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 20:52:39 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[Cat]]></category>

		<guid isPermaLink="false">http://simplelifeuk.wordpress.com/?p=454</guid>
		<description><![CDATA[This is a reminder for myself not to forget snowy&#8217;s details Flea medicine: Frontline Combo Spot-On Cat Worming: Drontal<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=454&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a reminder for myself not to forget snowy&#8217;s details</p>
<ul>
<li>Flea medicine: Frontline Combo Spot-On Cat</li>
<li>Worming: Drontal</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simplelifeuk.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simplelifeuk.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/simplelifeuk.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/simplelifeuk.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/simplelifeuk.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/simplelifeuk.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/simplelifeuk.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/simplelifeuk.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/simplelifeuk.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/simplelifeuk.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/simplelifeuk.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/simplelifeuk.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/simplelifeuk.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/simplelifeuk.wordpress.com/454/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=454&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewchaa.me.uk/2011/12/01/snowy-our-beloved-cat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c311c181986feead6c7cb43fb9844b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simplelifeuk</media:title>
		</media:content>
	</item>
		<item>
		<title>The benefits of simple, automated performance testing by Kristoffer Dyrkorn</title>
		<link>http://andrewchaa.me.uk/2011/07/31/the-benefits-of-simple-automated-performance-testing/</link>
		<comments>http://andrewchaa.me.uk/2011/07/31/the-benefits-of-simple-automated-performance-testing/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 21:41:17 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[NDC]]></category>
		<category><![CDATA[Perfornamce]]></category>

		<guid isPermaLink="false">http://andrewchaa.me.uk/?p=433</guid>
		<description><![CDATA[It is so good that all those videos are published after conference. If you are not a speaker at the conference, not sponsored by your company, or not have a free ticket, often you can&#8217;t simply afford to attend it. This is the first of &#8220;My learnings from NDC Conference Videos&#8221; series. The benefits of simple, automated [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=433&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It is so good that all those videos are published after conference. If you are not a speaker at the conference, not sponsored by your company, or not have a free ticket, often you can&#8217;t simply afford to attend it. This is the first of &#8220;My learnings from NDC Conference Videos&#8221; series.</p>
<p><a href="http://ndc2011.macsimum.no/SAL5/Onsdag/1140-1240.wmv">The benefits of simple, automated performance testing</a> by Kristoffer Dyrkorn</p>
<p>1. Crawl the site every night! Log the response times for each page.</p>
<p>2. Visualise the result with graph.</p>
<p><a href="http://simplelifeuk.files.wordpress.com/2011/07/response-time-graph-sorted.jpg"><img class="aligncenter size-medium wp-image-436" title="Response Time Graph Sorted" src="http://simplelifeuk.files.wordpress.com/2011/07/response-time-graph-sorted.jpg?w=300&#038;h=161" alt="" width="300" height="161" /></a></p>
<p>&nbsp;</p>
<p><a href="http://simplelifeuk.files.wordpress.com/2011/07/response-time-graph-1.jpg"><img class="aligncenter size-medium wp-image-435" title="Response Time Graph 1" src="http://simplelifeuk.files.wordpress.com/2011/07/response-time-graph-1.jpg?w=300&#038;h=163" alt="" width="300" height="163" /></a></p>
<p>3. Are we slower now than 3 months ago</p>
<p>4. Estimate environment differences. HOw are DEV servers performing, compared to TEST and QA?</p>
<p>5. Tools: <a href="http://ncrawler.codeplex.com/">NCrawler </a>+ Log Parser + IIS with time-taken</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simplelifeuk.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simplelifeuk.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/simplelifeuk.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/simplelifeuk.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/simplelifeuk.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/simplelifeuk.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/simplelifeuk.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/simplelifeuk.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/simplelifeuk.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/simplelifeuk.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/simplelifeuk.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/simplelifeuk.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/simplelifeuk.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/simplelifeuk.wordpress.com/433/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=433&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewchaa.me.uk/2011/07/31/the-benefits-of-simple-automated-performance-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://ndc2011.macsimum.no/SAL5/Onsdag/1140-1240.wmv" length="424971340" type="video/asf" />
	
		<media:content url="http://0.gravatar.com/avatar/c311c181986feead6c7cb43fb9844b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simplelifeuk</media:title>
		</media:content>

		<media:content url="http://simplelifeuk.files.wordpress.com/2011/07/response-time-graph-sorted.jpg?w=300" medium="image">
			<media:title type="html">Response Time Graph Sorted</media:title>
		</media:content>

		<media:content url="http://simplelifeuk.files.wordpress.com/2011/07/response-time-graph-1.jpg?w=300" medium="image">
			<media:title type="html">Response Time Graph 1</media:title>
		</media:content>
	</item>
		<item>
		<title>Handling Sandwich Code in C#</title>
		<link>http://andrewchaa.me.uk/2011/06/30/handling-sandwich-code-in-c/</link>
		<comments>http://andrewchaa.me.uk/2011/06/30/handling-sandwich-code-in-c/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 19:57:57 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[lamda]]></category>
		<category><![CDATA[sandwich code]]></category>

		<guid isPermaLink="false">http://simplelifeuk.wordpress.com/2011/06/30/handling-sandwich-code-in-c/</guid>
		<description><![CDATA[What is &#8220;Sandwich Code&#8221;? I found it in Ruby Koans. Often, you have to do something at the beginning and at the end, even though your main lock is in the middle. Let&#8217;s say, you want to retrieve data from database. You have to create a connection, open it, use it to load data, and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=429&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>What is &#8220;Sandwich Code&#8221;? I found it in <a href="http://rubykoans.com/">Ruby Koans</a>.</p>
<p>Often, you have to do something at the beginning and at the end, even though your main lock is in the middle. Let&#8217;s say, you want to retrieve data from database. You have to create a connection, open it, use it to load data, and close it. You are interested in loading data, but you have to do some chores like opening a connection and closing it.</p>
<p><pre class="brush: powershell;">
_connection = new SqlConnection(ConfigurationManager.ConnectionStrings[&quot;Db&quot;].ConnectionString);
_connection.open()var sql =
    @&quot;SELECT     DATEPART(YEAR, PDate) AS [Year],
                 DATEPART(MONTH, PDate) AS [Month],
                 DATEPART(DAY, PDate) AS [Day],
                 COUNT(*) AS [Count]
        FROM     JobPostingPeriod
       WHERE     PublishToDate &gt;= GETDATE() AND PDate &lt;= GETDATE()
       GROUP BY  DATEPART(YEAR, PDate), DATEPART(MONTH, PDate), DATEPART(DAY, PDate)
       ORDER BY  [Year], [Month], [Day]&quot;;

var result = _connection.Query(sql));return result;_connection.close()
</pre></p>
<p><span class="Apple-style-span" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13px;line-height:19px;white-space:normal;"><br />
</span><br />
<span class="Apple-style-span" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13px;line-height:19px;white-space:normal;">Those &#8220;bread-in-the-sandwich&#8221; code is repeated whenever you write any code that load data, and it can be quite annoying as you go on. In ruby, you can write a method that handles the opening and closing with block. In C#, you can use lamda delegate and Func.</span></p>
<div>I wrote a simple method, &#8220;ManageConnection&#8221;, with the help of Dan, my Totaljobs colleague, as he happened to be with me.</div>
<div>It accepts an anonymous method that has SqlConnection as input, and return T.</div>
<div>And now I can re-write the data loading method like this.</div>
<p><pre class="brush: powershell;">
private T ManageConnection(Func func)
{
    _connection.Open();
    var result = func(_connection);
    _connection.Close();
    return result;
}
</pre></p>
<div>The excution flow is</div>
<div>1. GetJobCountByDate is called</div>
<div>2. It calls ManageConnection and pass conn.Query(sql) as anonymous method</div>
<div>3. In ManageConnection, _connection is opened.</div>
<div>4. In ManageConnection, func(_connection) is called. func is conn.Querysql at this point.</div>
<div>5. ManageConnection returns the result.</div>
<div>6. GetJobCountByDate receives the result from ManageConnection, and now returns the result.</div>
<div>I think this is nice and clean, once you understand how it works.</div>
<div>There are loads of sandwich code. If you write file, access database, write to http stream, &#8230;</div>
<pre></pre>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">
<pre>	ection.open()</pre>
</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">var sql =</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">    @&#8221;SELECT    DATEPART(YEAR, PostedDate) AS [Year],</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">                DATEPART(MONTH, PostedDate) AS [Month],</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">                DATEPART(DAY, PostedDate) AS [Day],</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">                COUNT(*) AS [Count]</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">       FROM     JobPostingPeriod</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">      WHERE     PublishToDate &gt;= GETDATE() AND PostedDate &lt;= GETDATE()</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">      GROUP BY  DATEPART(YEAR, PostedDate), DATEPART(MONTH, PostedDate), DATEPART(DAY, PostedDate)</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">      ORDER BY  [Year], [Month], [Day]&#8220;;</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">var result = _connection.Query(sql));</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">return result;</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">_connection.close()_connection = new SqlConnection(ConfigurationManager.ConnectionStrings["JobSeekerReadOnly"].ConnectionString);</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">_connection.open()</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">var sql =</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">    @&#8221;SELECT    DATEPART(YEAR, PostedDate) AS [Year],</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">                DATEPART(MONTH, PostedDate) AS [Month],</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">                DATEPART(DAY, PostedDate) AS [Day],</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">                COUNT(*) AS [Count]</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">       FROM     JobPostingPeriod</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">      WHERE     PublishToDate &gt;= GETDATE() AND PostedDate &lt;= GETDATE()</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">      GROUP BY  DATEPART(YEAR, PostedDate), DATEPART(MONTH, PostedDate), DATEPART(DAY, PostedDate)</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">      ORDER BY  [Year], [Month], [Day]&#8220;;</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">var result = _connection.Query(sql));</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">return result;</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">_connection.close()</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">_connection = new SqlConnection(ConfigurationManager.ConnectionStrings["JobSeekerReadOnly"].ConnectionString);</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">_connection.open()</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">var sql =</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">    @&#8221;SELECT    DATEPART(YEAR, PostedDate) AS [Year],</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">                DATEPART(MONTH, PostedDate) AS [Month],</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">                DATEPART(DAY, PostedDate) AS [Day],</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">                COUNT(*) AS [Count]</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">       FROM     JobPostingPeriod</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">      WHERE     PublishToDate &gt;= GETDATE() AND PostedDate &lt;= GETDATE()</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">      GROUP BY  DATEPART(YEAR, PostedDate), DATEPART(MONTH, PostedDate), DATEPART(DAY, PostedDate)</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">      ORDER BY  [Year], [Month], [Day]&#8220;;</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">var result = _connection.Query(sql));</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">return result;</div>
<div id="cke_pastebin" style="position:absolute;left:-1000px;top:138px;width:1px;height:1px;">_connection.close()</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simplelifeuk.wordpress.com/429/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simplelifeuk.wordpress.com/429/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/simplelifeuk.wordpress.com/429/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/simplelifeuk.wordpress.com/429/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/simplelifeuk.wordpress.com/429/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/simplelifeuk.wordpress.com/429/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/simplelifeuk.wordpress.com/429/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/simplelifeuk.wordpress.com/429/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/simplelifeuk.wordpress.com/429/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/simplelifeuk.wordpress.com/429/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/simplelifeuk.wordpress.com/429/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/simplelifeuk.wordpress.com/429/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/simplelifeuk.wordpress.com/429/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/simplelifeuk.wordpress.com/429/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=429&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewchaa.me.uk/2011/06/30/handling-sandwich-code-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c311c181986feead6c7cb43fb9844b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simplelifeuk</media:title>
		</media:content>
	</item>
		<item>
		<title>My favourite jQuery expressions</title>
		<link>http://andrewchaa.me.uk/2011/05/04/my-favourite-jquery-expressions/</link>
		<comments>http://andrewchaa.me.uk/2011/05/04/my-favourite-jquery-expressions/#comments</comments>
		<pubDate>Wed, 04 May 2011 12:55:35 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://simplelifeuk.wordpress.com/?p=417</guid>
		<description><![CDATA[This is purely for me and to remind myself of the frequently used jQuery expressions. Forgetfulness is a curse as well as a bliss! Make the first option of &#60;select &#62; selected (http://stackoverflow.com/questions/1414276/how-to-make-first-option-of-select-selected-with-jquery) populate select list dynamically. This simply replace html. If there is a better way, please let me know. I used an extension [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=417&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is purely for me and to remind myself of the frequently used jQuery expressions. Forgetfulness is a curse as well as a bliss!</p>
<ul>
<li>Make the first option of &lt;select &gt; selected (<a href="http://stackoverflow.com/questions/1414276/how-to-make-first-option-of-select-selected-with-jquery">http://stackoverflow.com/questions/1414276/how-to-make-first-option-of-select-selected-with-jquery</a>)</li>
</ul>
<p><pre class="brush: jscript;">
$(&quot;#target option:first&quot;).attr('selected','selected');
</pre></p>
<ul>
<li>populate select list dynamically. This simply replace html. If there is a better way, please let me know. I used an extension method, <a href="http://simplelifeuk.wordpress.com/2011/04/14/my-favourite-helpers-for-aspnet-mvc/">Html.ClientIdFor</a>.</li>
</ul>
<p><pre class="brush: jscript;">
function(result) {
    var options = '';
    for(var i=0; i&lt;result.length; i++) {
        options += '&lt;option value=&quot;' + result[i].Id + '&quot;&gt;' + result[i].Name + '&lt;/option&gt;';
    }
    $('#&lt;%= Html.ClientIdFor(m =&gt; m.Input.ProductCategoryId) %&gt;').find('option').remove().end().html(options);
    $('#&lt;%= Html.ClientIdFor(m =&gt; m.Input.ProductCategoryId) %&gt; option:first').attr('selected', 'selected');
}
</pre></p>
<ul>
<li>table and click on a link on table row</li>
</ul>
<p><pre class="brush: jscript;">
$('#result').delegate('a[name=&quot;lnkDescription&quot;]', 'click', function(e) {
    e.preventDefault();

    var link = $(this).closest('tr').find('a[name=&quot;lnkDescription&quot;]');

    ...
    });

})
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simplelifeuk.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simplelifeuk.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/simplelifeuk.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/simplelifeuk.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/simplelifeuk.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/simplelifeuk.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/simplelifeuk.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/simplelifeuk.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/simplelifeuk.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/simplelifeuk.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/simplelifeuk.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/simplelifeuk.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/simplelifeuk.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/simplelifeuk.wordpress.com/417/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=417&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewchaa.me.uk/2011/05/04/my-favourite-jquery-expressions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c311c181986feead6c7cb43fb9844b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simplelifeuk</media:title>
		</media:content>
	</item>
		<item>
		<title>mongodb and norm</title>
		<link>http://andrewchaa.me.uk/2011/04/16/mongodb-and-norm/</link>
		<comments>http://andrewchaa.me.uk/2011/04/16/mongodb-and-norm/#comments</comments>
		<pubDate>Sat, 16 Apr 2011 10:10:55 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://simplelifeuk.wordpress.com/?p=408</guid>
		<description><![CDATA[People use ORM like Entity Framework and NHibernate a lot and I am one of them. When I use ORM, often I ma haunted by two inner thoughts. One is &#8220;This can be done in sql so easily&#8221; and the other is &#8220;What would it be like to use object database or document database? It [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=408&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>People use ORM like Entity Framework and NHibernate a lot and I am one of them. When I use ORM, often I ma haunted by two inner thoughts. One is &#8220;This can be done in sql so easily&#8221; and the other is &#8220;What would it be like to use object database or document database? It might be fantastic.&#8221; So I tried <a title="mongodb" href="http://www.mongodb.org/">mongodb</a>.</p>
<p>Installing mongodb was unexpectedly easy. You just download it and double click it. You can install it as windows service very easily like below. (from <a href="http://www.mongodb.org/display/DOCS/Windows+Service">http://www.mongodb.org/display/DOCS/Windows+Service</a>)</p>
<p><pre class="brush: powershell;">
mongod --bind_ip 127.0.0.1 --logpath d:\mongo\logs --logappend --dbpath d:\mongo\data --directoryperdb --install
</pre></p>
<p>I user <a href="https://github.com/atheken/NoRM">NoRM</a>, which is mongodb driver for .NET. There are three C# drivers for .NET.</p>
<ul>
<li>mongodb-csharp</li>
<li>simple-mongodb</li>
<li>NoRM</li>
</ul>
<div>(to be continued)</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simplelifeuk.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simplelifeuk.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/simplelifeuk.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/simplelifeuk.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/simplelifeuk.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/simplelifeuk.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/simplelifeuk.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/simplelifeuk.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/simplelifeuk.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/simplelifeuk.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/simplelifeuk.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/simplelifeuk.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/simplelifeuk.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/simplelifeuk.wordpress.com/408/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewchaa.me.uk&amp;blog=1833431&amp;post=408&amp;subd=simplelifeuk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewchaa.me.uk/2011/04/16/mongodb-and-norm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c311c181986feead6c7cb43fb9844b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simplelifeuk</media:title>
		</media:content>
	</item>
	</channel>
</rss>
