<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>exceptionz</title>
	<atom:link href="http://exceptionz.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://exceptionz.wordpress.com</link>
	<description>Thoughts on Technology, Methodology and Programming.</description>
	<lastBuildDate>Tue, 03 Nov 2009 08:38:31 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='exceptionz.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/4709a7b4e6b9b77cd746b8d6e908f538?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>exceptionz</title>
		<link>http://exceptionz.wordpress.com</link>
	</image>
			<item>
		<title>scrAPI on Snow Leopard</title>
		<link>http://exceptionz.wordpress.com/2009/11/03/scrapi-on-snow-leopard/</link>
		<comments>http://exceptionz.wordpress.com/2009/11/03/scrapi-on-snow-leopard/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 08:38:25 +0000</pubDate>
		<dc:creator>Marcus Wyatt</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyGems]]></category>

		<guid isPermaLink="false">http://exceptionz.wordpress.com/?p=184</guid>
		<description><![CDATA[Today I needed to scrape some data from a website and tried to use the trusted old scrAPI to do the job. Grrrr, its not working. Throwing an error:
Scraper::Reader::HTMLParseError: Scraper::Reader::HTMLParseError: Unable to load /Library/Ruby/Gems/1.8/gems/scrapi-1.2.0/lib/scraper/../tidy/libtidy.dylib 

After some time on google I didn’t find any fixes for the issue. So I decided to build from source…
I grabbed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=184&subd=exceptionz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="clear:both;">Today I needed to scrape some data from a website and tried to use the trusted old <a href="http://content.labnotes.org/rdoc/scrapi/" title="ScrAPI toolkit for Ruby" target="_blank">scrAPI</a> to do the job. Grrrr, its not working. Throwing an error:</p>
<blockquote><p><strong>Scraper::Reader::HTMLParseError:</strong> Scraper::Reader::HTMLParseError: Unable to load /Library/Ruby/Gems/1.8/gems/scrapi-1.2.0/lib/scraper/../tidy/libtidy.dylib </p>
</blockquote>
<p style="clear:both;">After some time on google I didn’t find any fixes for the issue. So I decided to build from source…</p>
<p style="clear:both;">I grabbed the assaf’s github repository.</p>
<ul style="clear:both;">
<li>git clone git://github.com/assaf/scrapi.git </li>
</ul>
<p style="clear:both;">Then tried the tests by running </p>
<p style="clear:both;"><em>rake test</em></p>
<blockquote><p>117 tests, 346 assertions, 0 failures, 44 errors</p>
</blockquote>
<p style="clear:both;">Nope errors all over the show… Looking at the original exception message, I checked if the libtidy.dylib exist on the lib/tidy directory. Nope, not there….</p>
<p style="clear:both;">So where do I get this library file….</p>
<p style="clear:both;"><a href="http://www.macports.org/" target="_blank">MacPorts</a> to the rescue… Install tidy from <a href="http://www.macports.org/" target="_blank">MacPorts</a> using the following command:</p>
<ul style="clear:both;">
<li>sudo port install tidy</li>
</ul>
<p style="clear:both;">Now we need to find where MacPorts installed the files using the following port command:</p>
<ul style="clear:both;">
<li>port contents tidy</li>
</ul>
<p style="clear:both;">The result:</p>
<blockquote><p>Port tidy contains:<br /> /opt/local/bin/tab2space<br /> /opt/local/bin/tidy<br /> /opt/local/include/buffio.h<br /> /opt/local/include/fileio.h<br /> /opt/local/include/platform.h<br /> /opt/local/include/tidy.h<br /> /opt/local/include/tidyenum.h<br /> /opt/local/lib/libtidy-0.99.0.dylib<br /> /opt/local/lib/libtidy.0.dylib<br /> /opt/local/lib/libtidy.a<br />  <strong>/opt/local/lib/libtidy.dylib</strong><br /> /opt/local/lib/libtidy.la</p>
</blockquote>
<p style="clear:both;">Now all we need to do is copy the library file to our <a href="http://content.labnotes.org/rdoc/scrapi/" title="ScrAPI toolkit for Ruby" target="_blank">scrAPI</a> source directory:</p>
<ul style="clear:both;">
<li>cp /opt/local/lib/libtidy.dylib [your source location]/lib/tidy/libtidy.dylib</li>
</ul>
<p style="clear:both;">Ok, before we speed ahead. Lets just run those test to check if all is fine:</p>
<blockquote><p>117 tests, 474 assertions, 0 failures, 0 errors</p>
</blockquote>
<p style="clear:both;">Awesome, we are almost there. Next we need to build the gem using the rake:</p>
<ul style="clear:both;">
<li>rake package</li>
</ul>
<p style="clear:both;">Make sure you get a <em>‘Successfully built RubyGem’</em> message. Now we are ready to install the newly build gem and test scrAPI again.</p>
<ul style="clear:both;">
<li>sudo gem install pkg/scrapi-1.2.1.gem</li>
</ul>
<p style="clear:both;">And there you go, <a href="http://content.labnotes.org/rdoc/scrapi/" title="ScrAPI toolkit for Ruby" target="_blank">scrAPI</a> working again.</p>
<p><br class="final-break" style="clear:both;" /></p>
Posted in OS X, Ruby, RubyGems  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exceptionz.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exceptionz.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exceptionz.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exceptionz.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exceptionz.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exceptionz.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exceptionz.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exceptionz.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exceptionz.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exceptionz.wordpress.com/184/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=184&subd=exceptionz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exceptionz.wordpress.com/2009/11/03/scrapi-on-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a8fb4e57426bf36cd281700535575ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maruis</media:title>
		</media:content>
	</item>
		<item>
		<title>My bash history</title>
		<link>http://exceptionz.wordpress.com/2009/04/24/my-bash-history/</link>
		<comments>http://exceptionz.wordpress.com/2009/04/24/my-bash-history/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 04:47:07 +0000</pubDate>
		<dc:creator>Marcus Wyatt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://exceptionz.wordpress.com/2009/04/24/my-bash-history/</guid>
		<description><![CDATA[Inspired by Ben Maybey and his bash history summary, here is mine:


  → 'history 1000 &#124; awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' &#124; sort -rn &#124; head
  242 cd
  117 clear
  96 rake
  70 sudo
  57 ss
  52 AUTOFEATURE=true
  37 sc
  32 sg
  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=176&subd=exceptionz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Inspired by <a href="http://www.benmabey.com/2008/04/17/sure-why-not-my-bash-history/">Ben Maybey</a> and his bash history summary, here is mine:</p>
<p><span id="more-176"></span></p>
<pre>
  → 'history 1000 | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
  242 cd
  117 clear
  96 rake
  70 sudo
  57 ss
  52 AUTOFEATURE=true
  37 sc
  32 sg
  32 mate
  23 tail
</pre>
Posted in Uncategorized  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exceptionz.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exceptionz.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exceptionz.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exceptionz.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exceptionz.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exceptionz.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exceptionz.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exceptionz.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exceptionz.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exceptionz.wordpress.com/176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=176&subd=exceptionz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exceptionz.wordpress.com/2009/04/24/my-bash-history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a8fb4e57426bf36cd281700535575ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maruis</media:title>
		</media:content>
	</item>
		<item>
		<title>Execute sql within rails environment without using your models</title>
		<link>http://exceptionz.wordpress.com/2008/08/19/execute-sql-within-rails-environment-without-using-your-models/</link>
		<comments>http://exceptionz.wordpress.com/2008/08/19/execute-sql-within-rails-environment-without-using-your-models/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 03:46:30 +0000</pubDate>
		<dc:creator>Marcus Wyatt</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://exceptionz.wordpress.com/2008/08/19/execute-sql-within-rails-environment-without-using-your-models/</guid>
		<description><![CDATA[When you have a query that you need to run as raw sql against the database, like batch data processing or maybe some data cleanup, and you don&#96;t want to create ActiveRecord models to handle the data. Because creating models is expensive and slow. So we want to execute directly against the database. But how [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=173&subd=exceptionz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When you have a query that you need to run as raw sql against the database, like batch data processing or maybe some data cleanup, and you don&#96;t want to create ActiveRecord models to handle the data. Because creating models is expensive and slow. So we want to execute directly against the database. But how do we execute directly on the database from within our rails application environment&#63; The solution is to use ActiveRecord::Base.connection to do the work:</p>
<p><pre class="textmate-source"><span class="source source_ruby source_ruby_rails">sql <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby">=</span> <span class="string string_quoted string_quoted_double string_quoted_double_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">"</span>my complex sql statement<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">"</span></span>
	<span class="support support_class support_class_ruby">ActiveRecord</span><span class="punctuation punctuation_separator punctuation_separator_other punctuation_separator_other_ruby">::</span><span class="support support_class support_class_ruby">Base</span><span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>connection<span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>execute<span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">(</span>sql<span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">)</span></span></pre>
</p>
<p>This is really nice way to execute queries within rake tasks. In the following example I show how you would establish a database connection as well:</p>
<p><pre class="textmate-source"><span class="source source_ruby source_ruby_rails">namespace <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>db</span> <span class="keyword keyword_control keyword_control_start-block keyword_control_start-block_ruby">do
	</span>
	  desc <span class="string string_quoted string_quoted_double string_quoted_double_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">"</span>Cleanup the database by setting rows to deleted when older than xxx. Defaults to development database.  Set RAILS_ENV=[production, test, etc.] to override.<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">"</span></span>
	  task <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>cleanup</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>environment</span> <span class="keyword keyword_control keyword_control_start-block keyword_control_start-block_ruby">do
	</span>    sql <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby">=</span> <span class="string string_unquoted string_unquoted_embedded string_unquoted_embedded_sql string_unquoted_embedded_sql_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">&lt;&lt;-SQL</span><span class="text text_sql text_sql_embedded text_sql_embedded_ruby">
	      <span class="comment comment_line comment_line_double-dash comment_line_double-dash_sql"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_sql">--</span> do some cleanup code
	</span></span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">    SQL</span></span>
	<span class="comment comment_line comment_line_number-sign comment_line_number-sign_ruby">    <span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_ruby">#</span> used to connect active record to the database
	</span>    <span class="support support_class support_class_ruby">ActiveRecord</span><span class="punctuation punctuation_separator punctuation_separator_other punctuation_separator_other_ruby">::</span><span class="support support_class support_class_ruby">Base</span><span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>establish_connection
	    <span class="support support_class support_class_ruby">ActiveRecord</span><span class="punctuation punctuation_separator punctuation_separator_other punctuation_separator_other_ruby">::</span><span class="support support_class support_class_ruby">Base</span><span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>connection<span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>execute<span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">(</span>sql<span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">)</span>
	  <span class="keyword keyword_control keyword_control_ruby">end</span>

	<span class="keyword keyword_control keyword_control_ruby">end</span>
	</span></pre>
</p>
<p><a href="http://www.railsenvy.com/2007/6/11/ruby-on-rails-rake-tutorial" target="blank">Here</a> is a very funny tutorial on rake. That&#96;s all for now folks&#8230;</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/Rails" rel="tag">Rails</a>, <a href="http://technorati.com/tag/Rake" rel="tag">Rake</a>, <a href="http://technorati.com/tag/SQL" rel="tag">SQL</a></p>
<p>Post created with <a href="http://macromates.com/">TextMate</a>.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/exceptionz.wordpress.com/173/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/exceptionz.wordpress.com/173/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exceptionz.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exceptionz.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exceptionz.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exceptionz.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exceptionz.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exceptionz.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exceptionz.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exceptionz.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exceptionz.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exceptionz.wordpress.com/173/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=173&subd=exceptionz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exceptionz.wordpress.com/2008/08/19/execute-sql-within-rails-environment-without-using-your-models/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a8fb4e57426bf36cd281700535575ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maruis</media:title>
		</media:content>
	</item>
		<item>
		<title>Easily create strong passwords</title>
		<link>http://exceptionz.wordpress.com/2008/07/11/easily-create-strong-passwords/</link>
		<comments>http://exceptionz.wordpress.com/2008/07/11/easily-create-strong-passwords/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 02:47:33 +0000</pubDate>
		<dc:creator>Marcus Wyatt</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://exceptionz.wordpress.com/2008/07/11/easily-create-strong-passwords/</guid>
		<description><![CDATA[Create strong passwords on the command line by typing
openssl rand -base64 6
and the output:
=&#62; 050L+4Kx
Run the command again:
=&#62; /sUIIy8s
Cool, now you should be able to create strong passwords quickly.

       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=169&subd=exceptionz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Create strong passwords on the command line by typing</p>
<p><i>openssl rand -base64 6</i></p>
<p>and the output:</p>
<p>=&gt; 050L+4Kx</p>
<p>Run the command again:</p>
<p>=&gt; /sUIIy8s</p>
<p>Cool, now you should be able to create strong passwords quickly.</p>
<p></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/exceptionz.wordpress.com/169/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/exceptionz.wordpress.com/169/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exceptionz.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exceptionz.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exceptionz.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exceptionz.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exceptionz.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exceptionz.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exceptionz.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exceptionz.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exceptionz.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exceptionz.wordpress.com/169/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=169&subd=exceptionz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exceptionz.wordpress.com/2008/07/11/easily-create-strong-passwords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a8fb4e57426bf36cd281700535575ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maruis</media:title>
		</media:content>
	</item>
		<item>
		<title>Databind a Combobox to an Enum Property &#8211; Version 2.0</title>
		<link>http://exceptionz.wordpress.com/2008/04/18/databind-a-combobox-to-an-enum-property-version-20/</link>
		<comments>http://exceptionz.wordpress.com/2008/04/18/databind-a-combobox-to-an-enum-property-version-20/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 01:49:56 +0000</pubDate>
		<dc:creator>Marcus Wyatt</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[code-construction]]></category>
		<category><![CDATA[coding-practices]]></category>

		<guid isPermaLink="false">http://exceptionz.wordpress.com/?p=164</guid>
		<description><![CDATA[I&#8217;ve first posted this tip on the 14 of May 2005 and I still get good traffic to the post. So I decided to update the post and code samples to use Framework 2.0 (I&#8217;m still not using 3.5) and improve the code somewhat.
The problem:
How do I databind my combo box to my domain object [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=164&subd=exceptionz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve first posted <a title="How do you bind a Combobox to an Enum Property?" href="http://exceptionz.wordpress.com/2005/05/14/how-do-you-bind-a-combobox-to-an-enum-property/" target="_self">this</a> tip on the 14 of May 2005 and I still get good traffic to the post. So I decided to update the post and code samples to use Framework 2.0 (I&#8217;m still not using 3.5) and improve the code somewhat.</p>
<p><strong>The problem:</strong></p>
<p>How do I databind my combo box to my domain object that has a property of some enum type?</p>
<p><img style="max-width:800px;" src="http://exceptionz.files.wordpress.com/2008/04/combobox-enum-bound.png" /></p>
<p><strong>The solution:</strong></p>
<p>Quite simple, firstly we will create an object (EnumComboBoxItem) that would encapsulate and represent each item in the combo list data source. EnumComboBoxItem is a pure fabrication class that has two properties we’ll use when databinding to the combo. We have a Value property which is used by the ValueMember property on the combo box and EscapedValue that is used by the DisplayMember property of the combo box. Note that when we construct a new EnumComboBoxItem instance that we call the AsciiEscape method in the constructor when populating the escapedValue field.</p>
<p>Here is the code:
<div style="background:rgb(248, 248, 248) none repeat scroll 0 50%;font-family:Consolas;font-size:10pt;color:black;">
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 1</span> <span style="color:navy;">using</span> <span style="color:maroon;">System</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 2</span> <span style="color:navy;">using</span> <span style="color:maroon;">System</span>.<span style="color:maroon;">Collections</span>.<span style="color:maroon;">Generic</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 3</span> <span style="color:navy;">using</span> <span style="color:maroon;">System</span>.<span style="color:maroon;">Text</span>.<span style="color:maroon;">RegularExpressions</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 4</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 5</span> <span style="color:navy;">namespace</span> <span style="color:maroon;">BindComboToEnum</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 6</span> {</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 7</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 8</span> <span style="color:gray;">///</span><span style="color:green;"> The enum combo box item</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 9</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 10</span> <span style="color:navy;">public</span> <span style="color:navy;">class</span> <span style="color:rgb(166, 83, 0);">EnumComboBoxItem</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 11</span> {</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 12</span> <span style="color:blue;"> #region</span> Constants</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 13</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 14</span> <span style="color:navy;">public</span> <span style="color:navy;">const</span> <span style="color:navy;">string</span> <span style="color:maroon;">DisplayMember</span> = <span style="background:rgb(255, 255, 230) none repeat scroll 0 50%;">&#8220;EscapedValue&#8221;</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 15</span> <span style="color:navy;">public</span> <span style="color:navy;">const</span> <span style="color:navy;">string</span> <span style="color:maroon;">ValueMember</span> = <span style="background:rgb(255, 255, 230) none repeat scroll 0 50%;">&#8220;Value&#8221;</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 16</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 17</span> <span style="color:blue;"> #endregion</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 18</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 19</span> <span style="color:blue;"> #region</span> Readonly &amp;amp; Static Fields</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 20</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 21</span> <span style="color:navy;">private</span> <span style="color:navy;">readonly</span> <span style="color:navy;">string</span> <span style="color:maroon;">escapedValue</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 22</span> <span style="color:navy;">private</span> <span style="color:navy;">readonly</span> <span style="color:navy;">object</span> <span style="color:maroon;">value</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 23</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 24</span> <span style="color:blue;"> #endregion</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 25</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 26</span> <span style="color:blue;"> #region</span> C&#8217;tors</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 27</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 28</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 29</span> <span style="color:gray;">///</span><span style="color:green;"> Initializes a new instance of the </span><span style="color:gray;"></span><span style="color:green;"> class.</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 30</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 31</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
</div>
<p><span style="color:green;">The original value.</span><span style="color:gray;"></span>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 32</span> <span style="color:navy;">public</span> <span style="color:maroon;">EnumComboBoxItem</span>(<span style="color:navy;">object</span> <span style="color:maroon;">originalValue</span>)</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 33</span> {</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 34</span> <span style="color:maroon;">value</span> = <span style="color:maroon;">originalValue</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 35</span> <span style="color:maroon;">escapedValue</span> = <span style="color:maroon;">EscapeAsciiValues</span>(<span style="color:maroon;">originalValue</span>.<span style="color:maroon;">ToString</span>());</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 36</span> }</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 37</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 38</span> <span style="color:blue;"> #endregion</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 39</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 40</span> <span style="color:blue;"> #region</span> Instance Properties</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 41</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 42</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 43</span> <span style="color:gray;">///</span><span style="color:green;"> Gets the escaped value.</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 44</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 45</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span><span style="color:green;">The escaped value.</span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 46</span> <span style="color:navy;">public</span> <span style="color:navy;">string</span> <span style="color:maroon;">EscapedValue</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 47</span> {</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 48</span> <span style="color:navy;">get</span> { <span style="color:navy;">return</span> <span style="color:maroon;">escapedValue</span>; }</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 49</span> }</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 50</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 51</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 52</span> <span style="color:gray;">///</span><span style="color:green;"> Gets the value.</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 53</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 54</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span><span style="color:green;">The value.</span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 55</span> <span style="color:navy;">public</span> <span style="color:navy;">object</span> <span style="color:maroon;">Value</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 56</span> {</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 57</span> <span style="color:navy;">get</span> { <span style="color:navy;">return</span> <span style="color:maroon;">value</span>; }</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 58</span> }</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 59</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 60</span> <span style="color:blue;"> #endregion</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 61</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 62</span> <span style="color:blue;"> #region</span> Instance Methods</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 63</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 64</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 65</span> <span style="color:gray;">///</span><span style="color:green;"> Returns a </span><span style="color:gray;"></span><span style="color:green;"> that represents the current </span><span style="color:gray;"></span><span style="color:green;">.</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 66</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 67</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 68</span> <span style="color:gray;">///</span><span style="color:green;"> A </span><span style="color:gray;"></span><span style="color:green;"> that represents the current </span><span style="color:gray;"></span><span style="color:green;">.</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 69</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 70</span> <span style="color:navy;">public</span> <span style="color:navy;">override</span> <span style="color:navy;">string</span> <span style="color:maroon;">ToString</span>()</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 71</span> {</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 72</span> <span style="color:navy;">return</span> <span style="color:maroon;">escapedValue</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 73</span> }</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 74</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 75</span> <span style="color:blue;"> #endregion</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 76</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 77</span> <span style="color:blue;"> #region</span> Class Methods</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 78</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 79</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 80</span> <span style="color:gray;">///</span><span style="color:green;"> Creates the data source for the enum type.</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 81</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 82</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
<p><span style="color:green;">Type of the enum.</span><span style="color:gray;"></span>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 83</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span><span style="color:green;">When the type passed is not an enum the exception is raised.</span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 84</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 85</span> <span style="color:gray;">///</span><span style="color:green;"> Returns a generic list to be used as the combo datasource.</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 86</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 87</span> <span style="color:navy;">public</span> <span style="color:navy;">static</span> <span style="color:rgb(166, 83, 0);">List</span>&amp;amp;lt;<span style="color:navy;">object</span>&amp;amp;gt; <span style="color:maroon;">CreateDataSourceFor</span>(<span style="color:rgb(166, 83, 0);">Type</span> <span style="color:maroon;">enumType</span>)</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 88</span> {</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 89</span> <span style="color:navy;">if</span> (!<span style="color:maroon;">enumType</span>.<span style="color:maroon;">IsEnum</span>)</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 90</span> <span style="color:navy;">throw</span> <span style="color:navy;">new</span> <span style="color:rgb(166, 83, 0);">ApplicationException</span>(<span style="background:rgb(255, 255, 230) none repeat scroll 0 50%;">&#8220;When using the Enum combo data source you are only allowed to use enum types.&#8221;</span>);</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 91</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 92</span> <span style="color:rgb(166, 83, 0);">Array</span> <span style="color:maroon;">enumValues</span> = <span style="color:rgb(166, 83, 0);">Enum</span>.<span style="color:maroon;">GetValues</span>(<span style="color:maroon;">enumType</span>);</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 93</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 94</span> <span style="color:rgb(166, 83, 0);">List</span>&amp;amp;lt;<span style="color:navy;">object</span>&amp;amp;gt; <span style="color:maroon;">result</span> = <span style="color:navy;">new</span> <span style="color:rgb(166, 83, 0);">List</span>&amp;amp;lt;<span style="color:navy;">object</span>&amp;amp;gt;();</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 95</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 96</span> <span style="color:navy;">for</span> (<span style="color:navy;">int</span> <span style="color:maroon;">index</span> = <span style="background:rgb(230, 255, 255) none repeat scroll 0 50%;">0</span>; <span style="color:maroon;">index</span> &amp;amp;lt; <span style="color:maroon;">enumValues</span>.<span style="color:maroon;">Length</span>; <span style="color:maroon;">index</span>++)</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 97</span> {</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 98</span> <span style="color:maroon;">result</span>.<span style="color:maroon;">Add</span>(<span style="color:navy;">new</span> <span style="color:rgb(166, 83, 0);">EnumComboBoxItem</span>(<span style="color:maroon;">enumValues</span>.<span style="color:maroon;">GetValue</span>(<span style="color:maroon;">index</span>)));</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 99</span> }</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 100</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 101</span> <span style="color:navy;">return</span> <span style="color:maroon;">result</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 102</span> }</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 103</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 104</span> <span style="color:navy;">private</span> <span style="color:navy;">static</span> <span style="color:navy;">string</span> <span style="color:maroon;">ConvertAsciiValueToStringRepresentation</span>(<span style="color:navy;">string</span> <span style="color:maroon;">currentRegexMatchValue</span>)</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 105</span> {</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 106</span> <span style="color:navy;">string</span> <span style="color:maroon;">result</span> = <span style="color:navy;">string</span>.<span style="color:maroon;">Empty</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 107</span> <span style="color:navy;">const</span> <span style="color:navy;">int</span> <span style="color:maroon;">BaseValue</span> = <span style="background:rgb(230, 255, 255) none repeat scroll 0 50%;">16</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 108</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 109</span> <span style="color:navy;">if</span> (<span style="color:maroon;">currentRegexMatchValue</span>.<span style="color:maroon;">StartsWith</span>(<span style="background:rgb(255, 255, 230) none repeat scroll 0 50%;">&#8220;0x&#8221;</span>))</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 110</span> {</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 111</span> <span style="color:green;">// grab the remainder string after the 0x</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 112</span> <span style="color:navy;">string</span> <span style="color:maroon;">asciiCodeValue</span> = <span style="color:maroon;">currentRegexMatchValue</span>.<span style="color:maroon;">Substring</span>(<span style="background:rgb(230, 255, 255) none repeat scroll 0 50%;">2</span>);</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 113</span> <span style="color:green;">// convert the remainder string to a byte</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 114</span> <span style="color:navy;">byte</span> <span style="color:maroon;">byteValue</span> = <span style="color:rgb(166, 83, 0);">Convert</span>.<span style="color:maroon;">ToByte</span>(<span style="color:maroon;">asciiCodeValue</span>, <span style="color:maroon;">BaseValue</span>);</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 115</span> <span style="color:green;">// now we can convert to a character and find the string of the character</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 116</span> <span style="color:maroon;">result</span> = <span style="color:rgb(166, 83, 0);">Convert</span>.<span style="color:maroon;">ToChar</span>(<span style="color:maroon;">byteValue</span>).<span style="color:maroon;">ToString</span>();</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 117</span> }</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 118</span> <span style="color:navy;">return</span> <span style="color:maroon;">result</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 119</span> }</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 120</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 121</span> <span style="color:navy;">private</span> <span style="color:navy;">static</span> <span style="color:navy;">string</span> <span style="color:maroon;">EscapeAsciiValues</span>(<span style="color:navy;">string</span> <span style="color:maroon;">rawValue</span>)</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 122</span> {</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 123</span> <span style="color:navy;">string</span> <span style="color:maroon;">result</span> = <span style="color:navy;">string</span>.<span style="color:maroon;">Empty</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 124</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 125</span> <span style="color:navy;">if</span> (<span style="color:maroon;">rawValue</span> == <span style="color:navy;">null</span>)</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 126</span> <span style="color:navy;">return</span> <span style="color:maroon;">result</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 127</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 128</span> <span style="color:green;">// Find 0x with any four alpha-numeric characters </span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 129</span> <span style="color:rgb(166, 83, 0);">Regex</span> <span style="color:maroon;">regex</span> = <span style="color:navy;">new</span> <span style="color:rgb(166, 83, 0);">Regex</span>(<span style="background:rgb(255, 255, 230) none repeat scroll 0 50%;">&#8220;0x[0-9A-Z]{4}&#8221;</span>);</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 130</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 131</span> <span style="color:rgb(166, 83, 0);">MatchCollection</span> <span style="color:maroon;">matchCollection</span> = <span style="color:maroon;">regex</span>.<span style="color:maroon;">Matches</span>(<span style="color:maroon;">rawValue</span>);</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 132</span> <span style="color:rgb(166, 83, 0);">Match</span> <span style="color:maroon;">matchPrevious</span> = <span style="color:navy;">null</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 133</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 134</span> <span style="color:navy;">for</span> (<span style="color:navy;">int</span> <span style="color:maroon;">i</span> = <span style="background:rgb(230, 255, 255) none repeat scroll 0 50%;">0</span>; <span style="color:maroon;">i</span> &amp;amp;lt; <span style="color:maroon;">matchCollection</span>.<span style="color:maroon;">Count</span>; <span style="color:maroon;">i</span>++)</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 135</span> {</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 136</span> <span style="color:green;">// if no match (ie. null) set to 0, else the current index + length</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 137</span> <span style="color:navy;">int</span> <span style="color:maroon;">startIndex</span> = (<span style="color:maroon;">matchPrevious</span> == <span style="color:navy;">null</span> ? <span style="background:rgb(230, 255, 255) none repeat scroll 0 50%;">0</span> : <span style="color:maroon;">matchPrevious</span>.<span style="color:maroon;">Index</span> + <span style="color:maroon;">matchPrevious</span>.<span style="color:maroon;">Length</span>);</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 138</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 139</span> <span style="color:green;">// add the part of the string that is not the ascii expression</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 140</span> <span style="color:maroon;">result</span> += <span style="color:maroon;">rawValue</span>.<span style="color:maroon;">Substring</span>(<span style="color:maroon;">startIndex</span>, <span style="color:maroon;">matchCollection</span>[<span style="color:maroon;">i</span>].<span style="color:maroon;">Index</span> &#8211; <span style="color:maroon;">startIndex</span>);</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 141</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 142</span> <span style="color:green;">// convert the ascii expression to a normal string</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 143</span> <span style="color:maroon;">result</span> += <span style="color:maroon;">ConvertAsciiValueToStringRepresentation</span>(<span style="color:maroon;">matchCollection</span>[<span style="color:maroon;">i</span>].<span style="color:maroon;">Value</span>);</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 144</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 145</span> <span style="color:maroon;">matchPrevious</span> = <span style="color:maroon;">matchCollection</span>[<span style="color:maroon;">i</span>];</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 146</span> }</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 147</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 148</span> <span style="color:navy;">if</span> (<span style="color:maroon;">matchPrevious</span> == <span style="color:navy;">null</span>)</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 149</span> <span style="color:maroon;">result</span> += <span style="color:maroon;">rawValue</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 150</span> <span style="color:navy;">else</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 151</span> <span style="color:maroon;">result</span> += <span style="color:maroon;">rawValue</span>.<span style="color:maroon;">Substring</span>(<span style="color:maroon;">matchPrevious</span>.<span style="color:maroon;">Index</span> + <span style="color:maroon;">matchPrevious</span>.<span style="color:maroon;">Length</span>);</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 152</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 153</span> <span style="color:navy;">return</span> <span style="color:maroon;">result</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 154</span> }</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 155</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 156</span> <span style="color:blue;"> #endregion</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 157</span> }</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 158</span> }</p>
<p>The <span style="color:maroon;">EscapeAsciiValues</span> method is used to Replace the Ascii characters in our Enum with the character representation. We do the Ascii characters because we want our combo to display “Bi- Annual” instead of “BiAnnual”. Look at the following enum as an example:
<div style="background:rgb(248, 248, 248) none repeat scroll 0 50%;font-family:Consolas;font-size:10pt;color:black;">
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 1</span> <span style="color:navy;">namespace</span> <span style="color:maroon;">BindComboToEnum</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 2</span> {</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 3</span> <span style="color:navy;">public</span> <span style="color:navy;">enum</span> <span style="color:rgb(166, 83, 0);">PaymentFrequencies</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 4</span> {</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 5</span> <span style="color:maroon;">Annual</span> = <span style="background:rgb(230, 255, 255) none repeat scroll 0 50%;">1</span>,</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 6</span> <span style="color:maroon;">Bi0&#215;00A00&#215;002D0&#215;00A0Annual</span> = <span style="background:rgb(230, 255, 255) none repeat scroll 0 50%;">2</span>, <span style="color:green;">// Bi &#8211; Annual</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 7</span> <span style="color:maroon;">Quarterly</span> = <span style="background:rgb(230, 255, 255) none repeat scroll 0 50%;">4</span>,</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 8</span> <span style="color:maroon;">Monthly</span> = <span style="background:rgb(230, 255, 255) none repeat scroll 0 50%;">12</span>,</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 9</span> <span style="color:maroon;">Fortnightly</span> = <span style="background:rgb(230, 255, 255) none repeat scroll 0 50%;">26</span>,</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 10</span> <span style="color:maroon;">Weekly</span> = <span style="background:rgb(230, 255, 255) none repeat scroll 0 50%;">52</span></p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 11</span> }</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 12</span> }</p>
</div>
<p>Now, all that we need is the following code behind the form to bind our Combo box and we are away:
<div style="background:rgb(248, 248, 248) none repeat scroll 0 50%;font-family:Consolas;font-size:10pt;color:black;">
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 22</span> <span style="color:navy;">private</span> <span style="color:navy;">void</span> <span style="color:maroon;">InitDataBindings</span>()</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 23</span> {</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 24</span> <span style="color:maroon;">PaymentFrequencyComboBox</span>.<span style="color:maroon;">DataSource</span> = <span style="color:rgb(166, 83, 0);">EnumComboBoxItem</span>.<span style="color:maroon;">CreateDataSourceFor</span>(<span style="color:navy;">typeof</span>(<span style="color:rgb(166, 83, 0);">PaymentFrequencies</span>));</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 25</span> <span style="color:maroon;">PaymentFrequencyComboBox</span>.<span style="color:maroon;">DisplayMember</span> = <span style="color:rgb(166, 83, 0);">EnumComboBoxItem</span>.<span style="color:maroon;">DisplayMember</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 26</span> <span style="color:maroon;">PaymentFrequencyComboBox</span>.<span style="color:maroon;">ValueMember</span> = <span style="color:rgb(166, 83, 0);">EnumComboBoxItem</span>.<span style="color:maroon;">ValueMember</span>;</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 27</span> <span style="color:maroon;">PaymentFrequencyComboBox</span>.<span style="color:maroon;">DataBindings</span>.<span style="color:maroon;">Add</span>(<span style="background:rgb(255, 255, 230) none repeat scroll 0 50%;">&#8220;SelectedValue&#8221;</span>, <span style="color:navy;">new</span> <span style="color:rgb(166, 83, 0);">Loan</span>(), <span style="background:rgb(255, 255, 230) none repeat scroll 0 50%;">&#8220;PaymentFrequency&#8221;</span>);</p>
<p>
<p style="margin:0;"><span style="background:gray none repeat scroll 0 50%;color:white;"> 28</span> }</p>
</div>
<p>The <span style="color:rgb(166, 83, 0);">EnumComboBoxItem</span>.<span style="color:maroon;">CreateDataSourceFor</span> method creates an <span style="color:rgb(166, 83, 0);">List</span>&amp;amp;lt;<span style="color:navy;">object</span>&amp;amp;gt; for us to use as a data source for the combo box.</p>
<p>And there you have it, a Combobox bound to an Enum!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/exceptionz.wordpress.com/164/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/exceptionz.wordpress.com/164/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exceptionz.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exceptionz.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exceptionz.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exceptionz.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exceptionz.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exceptionz.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exceptionz.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exceptionz.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exceptionz.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exceptionz.wordpress.com/164/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=164&subd=exceptionz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exceptionz.wordpress.com/2008/04/18/databind-a-combobox-to-an-enum-property-version-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a8fb4e57426bf36cd281700535575ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maruis</media:title>
		</media:content>

		<media:content url="http://exceptionz.files.wordpress.com/2008/04/combobox-enum-bound.png" medium="image" />
	</item>
		<item>
		<title>Run gem install behind a firewall in Windows</title>
		<link>http://exceptionz.wordpress.com/2008/03/18/run-gem-install-behind-a-firewall-in-windows/</link>
		<comments>http://exceptionz.wordpress.com/2008/03/18/run-gem-install-behind-a-firewall-in-windows/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 01:49:00 +0000</pubDate>
		<dc:creator>Marcus Wyatt</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[XP]]></category>

		<guid isPermaLink="false">http://exceptionz.wordpress.com/?p=163</guid>
		<description><![CDATA[I&#8217;m contracting at a client running a Novell network and wanted to create some small little ruby scripts to automate some tasks for me. But I ran into problems using gem install behind their firewall. I&#8217;m getting the following error:
ERROR:  While executing gem &#8230; (Gem::RemoteSourceException)
HTTP Response 407
Here is the steps I followed to get [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=163&subd=exceptionz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;m contracting at a client running a Novell network and wanted to create some small little ruby scripts to automate some tasks for me. But I ran into problems using gem install behind their firewall. I&#8217;m getting the following error:</p>
<blockquote><p>ERROR:  While executing gem &#8230; (Gem::RemoteSourceException)<br />
HTTP Response 407</p></blockquote>
<p>Here is the steps I followed to get gem install working on my windows xp machine in painstaking detail: <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Firstly we need to set the <span class="caps">HTTP</span>_PROXY environment variable. I&#8217;ve played around with different options, using uid and pwd and other suggestions, but all I needed was the following:</p>
<ol>
<li>On the desktop right click the &#8216;My Computer&#8217; icon and select properties.</li>
<li>Click on the advanced tab and then the &#8216;Environment Variables&#8217; button.<br />
<img src="http://exceptionz.files.wordpress.com/2008/03/advanced-tab.png" style="max-width:800px;" /></li>
<li>Now you can either add the <span class="caps">HTTP</span>_PROXY variable to the &#8216;User&#8217; or the &#8216;System&#8217; variables by clicking the &#8216;New&#8217; button.<br />
<img src="http://exceptionz.files.wordpress.com/2008/03/environment-variables.png" style="max-width:800px;" /></li>
<li>Within the new system variable dialog, specify &#8216;<span class="caps">HTTP</span>_PROXY&#8217; as the variable name and in the value area a url in the following format &#8211; http://[proxy_ip]:[proxy_port] &#8211; i.e. http://127.168.1.3:5865<br />
<img src="http://exceptionz.files.wordpress.com/2008/03/new-system-variable.png" style="max-width:800px;" /></li>
</ol>
<p>Next we install the <a href="http://rubyforge.org/projects/rubysspi/">Ruby Win32 <span class="caps">SSPI</span></a> which gives ruby the ability to authenticate with <span class="caps">ISA</span> natively. We need this library because as far as I understand, it patches the Open-uri library because of some incompatibilities with windows. Anyways, follow the following steps to get it working:</p>
<ol>
<li>Download rubysspi from the <a href="http://rubyforge.org/projects/rubysspi/">Ruby Win32 <span class="caps">SSPI</span></a> project page(also available as gem install rubysspi but that doesn’t help much, does it?)</li>
<li>Install the gem locally using the following command: gem install [local_path_to_gem]\rubysspi-1.2.3.gem i.e. C:\gems\rubysspi-1.2.3.gem</li>
<li>Now copy the spa.rb file from the gem install directory and paste it in the site-ruby directory. i.e. If ruby is installed in C:\ruby, then the paths should be:
<ul>
<li>origin path &#8211; C:\ruby\lib\ruby\gems\1.8\gems\rubysspi-1.2.3\spa.rb</li>
<li>destination path &#8211; C:\ruby\lib\ruby\site_ruby\spa.rb</li>
</ul>
</li>
<li>Find gem.bat in your ruby bin directory (C:\ruby\bin) and replace the last line (i.e. &#8220;%~d0%~p0ruby&#8221; -x &#8220;%~f0&#8243; %*) with the following line &#8211; @&#8221;ruby&#8221; -rspa &#8220;c:\ruby\bin\gem&#8221; %1 %2 %3 %4 %5 %6 %7 %8 %9</li>
<li>Test you can access the remote ruby gems by executing the following command: gem list rails -r<br /><img src="http://exceptionz.files.wordpress.com/2008/03/remote-gems.png" style="max-width:800px;" /></li>
<li>You should see similar output as shown above.</li>
</ol>
<p>Now we can work again without any issues when trying to install or update gems.</p>
<p>Enjoy!!!</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/Ruby" class="performancingtags" rel="tag">Ruby</a>, <a href="http://technorati.com/tag/Rails" class="performancingtags" rel="tag">Rails</a>, <a href="http://technorati.com/tag/XP" class="performancingtags" rel="tag">XP</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/exceptionz.wordpress.com/163/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/exceptionz.wordpress.com/163/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exceptionz.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exceptionz.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exceptionz.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exceptionz.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exceptionz.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exceptionz.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exceptionz.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exceptionz.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exceptionz.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exceptionz.wordpress.com/163/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=163&subd=exceptionz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exceptionz.wordpress.com/2008/03/18/run-gem-install-behind-a-firewall-in-windows/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a8fb4e57426bf36cd281700535575ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maruis</media:title>
		</media:content>

		<media:content url="http://exceptionz.files.wordpress.com/2008/03/advanced-tab.png" medium="image" />

		<media:content url="http://exceptionz.files.wordpress.com/2008/03/environment-variables.png" medium="image" />

		<media:content url="http://exceptionz.files.wordpress.com/2008/03/new-system-variable.png" medium="image" />

		<media:content url="http://exceptionz.files.wordpress.com/2008/03/remote-gems.png" medium="image" />
	</item>
		<item>
		<title>TextMate command to annotate your current ActiveRecord Model with the DB Schema</title>
		<link>http://exceptionz.wordpress.com/2008/03/18/textmate-command-to-annotate-your-current-activerecord-model-with-the-db-schema/</link>
		<comments>http://exceptionz.wordpress.com/2008/03/18/textmate-command-to-annotate-your-current-activerecord-model-with-the-db-schema/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 13:08:15 +0000</pubDate>
		<dc:creator>Marcus Wyatt</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://exceptionz.wordpress.com/?p=158</guid>
		<description><![CDATA[Edit: If you can&#8217;t wait until the end, here is the download link.
Who hasn&#8217;t used the Annotate Models plugin written by Dave Thomas, of Rails Pragmatic Studio fame? If you haven&#8217;t don&#8217;t fret&#8230; The plugin basically adds a comment block to the top of all of your model classes documenting the current database schema for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=158&subd=exceptionz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Edit: If you can&#8217;t wait until the end, <a href="http://media.exceptionz.com.s3.amazonaws.com/Exceptionz.tmbundle.zip" title="Exceptionz TextMate Bundle">here is the download link</a>.</p>
<p>Who hasn&#8217;t used the Annotate Models plugin written by <a href="http://blogs.pragprog.com/cgi-bin/pragdave.cgi/Tech/Ruby/AnnotateModels.rdoc">Dave Thomas</a>, of <a href="http://studio.pragprog.com/rails/">Rails Pragmatic Studio</a> fame? If you haven&#8217;t don&#8217;t fret&#8230; The <a href="http://svn.pragprog.com/Public/plugins/annotate_models/">plugin</a> basically adds a comment block to the top of all of your model classes documenting the current database schema for the given model. I like to have the info in my model files to make it a little easier to work with models.</p>
<p><img src="http://exceptionz.files.wordpress.com/2008/03/annotated-models-plugin.png" alt="Annotated Models Plugin" height="151" /></p>
<p>The rails bundle within TextMate gives you a &#8216;Show DB Schema for current class&#8217; command you can press to show a tool tip with the database schema (Control + Shift + Command + S). This works great, but I find the command sequence to long and the slight wait to see the schema info breaks my rhythm.</p>
<p><img src="http://exceptionz.files.wordpress.com/2008/03/show-db-schema-for-current-class.jpg" alt="Show DB Schema for Current Class" height="234" /></p>
<p>To solve the problem I made a copy of the source files used by the command and modified it slightly to output the info as comments at the top of the file. Now I have nicely annotated model files. This is a real time saver.</p>
<p><img src="http://exceptionz.files.wordpress.com/2008/03/annotated-models-bundles.jpg" alt="Annotated Models Bundles" height="400" /></p>
<p>The bundle also contain the the Beautify command. This command adds automatic code formatting capability for your ruby code. I found the beautify command from <a href="http://blog.neontology.com/">Tim Burks</a>. Cheers Tim&#8230;</p>
<p>You can download the bundle <a href="http://media.exceptionz.com.s3.amazonaws.com/Exceptionz.tmbundle.zip" title="Exceptionz TextMate Bundle">here</a>.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/Ruby" class="performancingtags" rel="tag">Ruby</a>, <a href="http://technorati.com/tag/Rails" class="performancingtags" rel="tag">Rails</a>, <a href="http://technorati.com/tag/TextMate" class="performancingtags" rel="tag">TextMate</a>, <a href="http://technorati.com/tag/JavaScript" class="performancingtags" rel="tag">JavaScript</a>, <a href="http://technorati.com/tag/Mac%20OSX" class="performancingtags" rel="tag">Mac OSX</a></p>
<p><img src="http://exceptionz.files.wordpress.com/2008/03/blogged-from-textmate.png" alt="Blogged from TextMate" height="33" /></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/exceptionz.wordpress.com/158/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/exceptionz.wordpress.com/158/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exceptionz.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exceptionz.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exceptionz.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exceptionz.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exceptionz.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exceptionz.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exceptionz.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exceptionz.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exceptionz.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exceptionz.wordpress.com/158/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=158&subd=exceptionz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exceptionz.wordpress.com/2008/03/18/textmate-command-to-annotate-your-current-activerecord-model-with-the-db-schema/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a8fb4e57426bf36cd281700535575ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maruis</media:title>
		</media:content>

		<media:content url="http://exceptionz.files.wordpress.com/2008/03/annotated-models-plugin.png" medium="image">
			<media:title type="html">Annotated Models Plugin</media:title>
		</media:content>

		<media:content url="http://exceptionz.files.wordpress.com/2008/03/show-db-schema-for-current-class.jpg" medium="image">
			<media:title type="html">Show DB Schema for Current Class</media:title>
		</media:content>

		<media:content url="http://exceptionz.files.wordpress.com/2008/03/annotated-models-bundles.jpg" medium="image">
			<media:title type="html">Annotated Models Bundles</media:title>
		</media:content>

		<media:content url="http://exceptionz.files.wordpress.com/2008/03/blogged-from-textmate.png" medium="image">
			<media:title type="html">Blogged from TextMate</media:title>
		</media:content>
	</item>
		<item>
		<title>Quick note: Ubuntu(gutsy) C compiler install and setup (glibc-devel)</title>
		<link>http://exceptionz.wordpress.com/2008/03/11/quick-note-ubuntugutsy-c-compiler-install-and-setup-glibc-devel/</link>
		<comments>http://exceptionz.wordpress.com/2008/03/11/quick-note-ubuntugutsy-c-compiler-install-and-setup-glibc-devel/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 09:09:06 +0000</pubDate>
		<dc:creator>Marcus Wyatt</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://exceptionz.wordpress.com/2008/03/11/quick-note-ubuntugutsy-c-compiler-install-and-setup-glibc-devel/</guid>
		<description><![CDATA[UPDATE: Tim Haines notified me that you can install all the necessary tools with one command:
apt-get install build-essential
Thanks Tim, I&#8217;ve tried it on a clean VPS and it works a charm&#8230;
If you are busy setting up a new Ubuntu Linux server and you get the following error:
configure: error: no acceptable C compiler found in $PATH
when [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=152&subd=exceptionz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>UPDATE: <a href="http://www.workingwithrails.com/person/11851-tim-haines" title="Tim Haines" target="_blank">Tim Haines</a> notified me that you can install all the necessary tools with one command:</p>
<blockquote><p>apt-get install build-essential</p></blockquote>
<p>Thanks Tim, I&#8217;ve tried it on a clean VPS and it works a charm&#8230;</p>
<p><strike>If you are busy setting up a new Ubuntu Linux server and you get the following error:</strike></p>
<blockquote><p><strike>configure: error: no acceptable C compiler found in $PATH</strike></p></blockquote>
<p><strike>when trying to run ./configure, then you need to install the gcc compiler (Yeah, I know&#8230; this is like a no brainer for you *nix guru&#8217;s).</strike></p>
<p><strike>Here is the command to install the gcc compiler on Ubuntu:</strike></p>
<blockquote><p><strike>sudo apt-get install gcc</strike></p></blockquote>
<p><strike>But now you get the following error:</strike></p>
<blockquote><p><strike>error: checking for C compiler default output file name</strike></p></blockquote>
<p><strike>Most results on on google search point you glibc-devel as the solution. But, alas&#8230; apt-get will report the following message when you try to install glibc-devel:</strike></p>
<blockquote><p><strike>Couldn&#8217;t find package glibc-devel</strike></p></blockquote>
<p><strike>So what to do? The correct Ubuntu package that is similar to the glibc-devel is libc6-dev. Below is the command to install the Ubuntu package:</strike></p>
<blockquote><p><strike>sudo apt-get install libc6-dev</strike></p></blockquote>
<p><strike>Happy compiling and installing&#8230;</strike></p>
<p>Technorati Tags: <a href="http://technorati.com/tag/Ubuntu%20gutsy%20glibc-devel%20libc6-dev" class="performancingtags" rel="tag">Ubuntu gutsy glibc-devel libc6-dev</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/exceptionz.wordpress.com/152/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/exceptionz.wordpress.com/152/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exceptionz.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exceptionz.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exceptionz.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exceptionz.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exceptionz.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exceptionz.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exceptionz.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exceptionz.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exceptionz.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exceptionz.wordpress.com/152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=152&subd=exceptionz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exceptionz.wordpress.com/2008/03/11/quick-note-ubuntugutsy-c-compiler-install-and-setup-glibc-devel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a8fb4e57426bf36cd281700535575ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maruis</media:title>
		</media:content>
	</item>
		<item>
		<title>You can now build the source code in either VS2k5 or VS2k8</title>
		<link>http://exceptionz.wordpress.com/2008/03/11/you-can-now-build-the-source-code-in-either-vs2k5-or-vs2k8/</link>
		<comments>http://exceptionz.wordpress.com/2008/03/11/you-can-now-build-the-source-code-in-either-vs2k5-or-vs2k8/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 00:05:33 +0000</pubDate>
		<dc:creator>Marcus Wyatt</dc:creator>
				<category><![CDATA[BDD]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[OO]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://exceptionz.wordpress.com/?p=151</guid>
		<description><![CDATA[I've updated the source code to include some conditional compilation directives to support different Visual Studio IDE versions. So if you are still stuck in VS2005 land, you can now build the source and be able to take advantage of the new features that Owen Evans added. <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=151&subd=exceptionz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve updated the source code to include some conditional compilation directives to support different Visual Studio IDE versions. So if you are still stuck in VS2005 land, you can now build the source and be able to take advantage of the new features that Owen Evans added.</p>
<p>These include the new attributes (Context, BeforeAll, BeforeEach, AfterAll, AfterEach) and new functionality like Collection.Contains#WithProperty. If you lucky to be using VS2008 you&#8217;ll have new functionality that allows you to pass lambda&#8217;s. For more information look at <a href="http://bgeek.net/2008/02/14/nspecify-rspec-well-closer-anyway/" target="_new">http://bgeek.net/2008/02/14/nspecify-rspec-well-closer-anyway/</a></p>
<p>Owen also added a new library called NSpecify.Framework.Extensions. This gives you some extension methods that you can use to specify your expectations directly on the object under test.</p>
<p>i.e. newDeveloper.Surname.Must().Equal(&#8220;Evans&#8221;);</p>
<p>Nice hey!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/exceptionz.wordpress.com/151/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/exceptionz.wordpress.com/151/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exceptionz.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exceptionz.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exceptionz.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exceptionz.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exceptionz.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exceptionz.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exceptionz.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exceptionz.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exceptionz.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exceptionz.wordpress.com/151/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=151&subd=exceptionz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exceptionz.wordpress.com/2008/03/11/you-can-now-build-the-source-code-in-either-vs2k5-or-vs2k8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a8fb4e57426bf36cd281700535575ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maruis</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby, Rails, TextMate, JavaScript, Mac OSX, Subversion</title>
		<link>http://exceptionz.wordpress.com/2008/02/15/ruby-rails-textmate-javascript-mac-osx-subversion/</link>
		<comments>http://exceptionz.wordpress.com/2008/02/15/ruby-rails-textmate-javascript-mac-osx-subversion/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 03:11:59 +0000</pubDate>
		<dc:creator>Marcus Wyatt</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://exceptionz.wordpress.com/2008/02/15/ruby-rails-textmate-javascript-mac-osx-subversion/</guid>
		<description><![CDATA[Ruby 

Object.alias_class_method &#8211; adds a singleton/eigen/virtual/meta-class to the given instance which you can use to add methods.
assert{ 2.0 } &#8211; An interesting new gem that make your assertion definitions feel more natural.
Have you killed a design pattern today?
Timeout code execution &#8211; to ensure a snippet of Ruby code doesn’t run for too long you can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=150&subd=exceptionz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Ruby 
<ul>
<li><a href="http://blog.rubyenrails.nl/articles/2008/02/14/our-daily-method-8-object-alias_class_method">Object.alias_class_method</a> &#8211; adds a singleton/eigen/virtual/meta-class to the given instance which you can use to add methods.</li>
<li><a href="http://www.oreillynet.com/ruby/blog/2008/02/assert2.html">assert{ 2.0 }</a> &#8211; An interesting new gem that make your assertion definitions feel more natural.</li>
<li><a href="http://www.relevancellc.com/2008/2/13/have-you-killed-a-design-pattern-today">Have you killed a design pattern today?</a></li>
<li><a href="http://www.slashdotdash.net/articles/2008/02/15/ruby-tidbit-timeout-code-execution">Timeout code execution</a> &#8211; to ensure a snippet of Ruby code doesn’t run for too long you can use the timeout function.</li>
<li><a href="http://blog.sidu.in/2008/02/loading-classes-from-strings-in-ruby.html">Loading classes from strings</a> &#8211; Using method like <span style="font-size:130%;"><code>Module#const_get, </code></span><span style="font-size:130%;"><code>Kernel#qualified_const_get</code></span><span style="font-size:130%;"><code> and eval.</code></span></li>
</ul>
<p>Rails
<ul>
<li><a href="http://www.dcmanges.com/blog/using-drb-to-preserve-a-selenium-driver">Using DRb to preserve a Selenium Driver</a> &#8211; Speed up your selenium tests considerably</li>
<li><a href="http://www.johnyerhot.com/2008/01/05/integrating-google-maps-in-your-rails-20-app/">Integrating Google Maps in your Rails 2.0 application</a></li>
</ul>
<p>TextMate
<ul>
<li><a href="http://ciaranwal.sh/2008/02/13/textmate-tip-the-html-bundle">HTML Bundle Tips</a> &#8211; Great tips on using the HTML bundle in Textmate</li>
</ul>
<p>JavaScript
<ul>
<li><a href="http://james.newtonking.com/archive/2008/02/11/linq-to-json-beta.aspx">Language Integrated Query for JSON</a> &#8211; This is really interesting. Shows you have versatile JavaScript is.</li>
</ul>
<p>Mac OSX
<ul>
<li><a href="http://www.rubynaut.net/articles/2008/02/12/install-ruby-memcached-on-macosx">Install ruby memcached on Mac OSX</a></li>
</ul>
<p>Subversion
<ul>
<li><a href="http://nex-3.com/posts/71-distributed-version-control">Distributed Version Control</a> &#8211; A comparison between Darcs, Subversion, Git and Mercurial</li>
</ul>
<p>Technorati Tags: <a class="performancingtags" href="http://technorati.com/tag/Ruby" rel="tag">Ruby</a>, <a class="performancingtags" href="http://technorati.com/tag/Rails" rel="tag">Rails</a>, <a class="performancingtags" href="http://technorati.com/tag/TextMate" rel="tag">TextMate</a>, <a class="performancingtags" href="http://technorati.com/tag/JavaScript" rel="tag">JavaScript</a>, <a class="performancingtags" href="http://technorati.com/tag/Mac%20OSX" rel="tag">Mac OSX</a>, <a class="performancingtags" href="http://technorati.com/tag/Subversion" rel="tag">Subversion</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/exceptionz.wordpress.com/150/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/exceptionz.wordpress.com/150/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exceptionz.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exceptionz.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exceptionz.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exceptionz.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exceptionz.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exceptionz.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exceptionz.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exceptionz.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exceptionz.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exceptionz.wordpress.com/150/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exceptionz.wordpress.com&blog=383615&post=150&subd=exceptionz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exceptionz.wordpress.com/2008/02/15/ruby-rails-textmate-javascript-mac-osx-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a8fb4e57426bf36cd281700535575ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maruis</media:title>
		</media:content>
	</item>
	</channel>
</rss>