<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Opgenorth.NET &#187; Programming</title>
	<atom:link href="http://www.opgenorth.net/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.opgenorth.net</link>
	<description>A software geek torn apart by the dicotomy of .NET by day, Ruby and Android by night</description>
	<lastBuildDate>Wed, 07 Sep 2011 03:30:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Picking Apart PDF with Ruby and Linux</title>
		<link>http://www.opgenorth.net/2011/03/17/picking-apart-pdf-with-ruby-and-linux/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=picking-apart-pdf-with-ruby-and-linux</link>
		<comments>http://www.opgenorth.net/2011/03/17/picking-apart-pdf-with-ruby-and-linux/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 00:09:00 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.opgenorth.net/?p=356</guid>
		<description><![CDATA[I ran into a curious problem for a side problem of mine where I had some information in PDF files, both text and images.&#160; What I want to do is display the information from the PDF&#8217;s on a mobile (Android) device.&#160; PDF isn&#8217;t exactly a mobile friendly format, so I got the idea use HTML.&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into a curious problem for a side problem of mine where I had some information in PDF files, both text and images.&#160; What I want to do is display the information from the PDF&#8217;s on a mobile (Android) device.&#160; PDF isn&#8217;t exactly a mobile friendly format, so I got the idea use HTML.&#160; The next trick then becomes how to get the content out of the PDF&#8217;s I want into HTML.&#160; Tux to the rescue!</p>
<p>As luck would have the, the utilities pdftotext and pdfimage will allow you to extract your text and images from a PDF (respectively).&#160; pdftotext was even nice enough to extract the text from the PDF and put it into an HTML document for me. (To get these on your Ubuntu box:&#160;&#160; sudo apt-get install xpdf-utils).&#160; Once I had these apps installed, I used a bit of Ruby to automate the process &#8211; I had 65 PDF&#8217;s to convert and wasn&#8217;t crazy about the keystrokes involved for all 65 files.&#160; Net time to do all this was a comfortable couple of hours in front of my TV catching up on the backlog of shows on the PVR.&#160; How is that for multi-tasking?</p>
<p>Here is the Ruby script I wrote.&#160; I welcome suggestions / improvements / enhancements / comments / cash donations / bottles of scotch:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;">#!/usr/bin/ruby</span>
<span style="color:#CC00FF; font-weight:bold;">Dir</span>.<span style="color:#9900CC;">glob</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;*.txt&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>file<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">delete</span><span style="color:#006600; font-weight:bold;">&#40;</span>file<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#CC00FF; font-weight:bold;">Dir</span>.<span style="color:#9900CC;">glob</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;*.jpg&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>file<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">delete</span><span style="color:#006600; font-weight:bold;">&#40;</span>file<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#CC00FF; font-weight:bold;">Dir</span>.<span style="color:#9900CC;">glob</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;*.pdf&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>file<span style="color:#006600; font-weight:bold;">|</span>
	basename = <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">basename</span><span style="color:#006600; font-weight:bold;">&#40;</span>file,<span style="color:#996600;">'.*'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
	<span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">directory</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>basename<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
		<span style="color:#CC00FF; font-weight:bold;">Dir</span>.<span style="color:#9900CC;">glob</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;./#{basename}/*.*&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>file2<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">delete</span><span style="color:#006600; font-weight:bold;">&#40;</span>file2<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">end</span>
	<span style="color:#9966CC; font-weight:bold;">else</span>
	  <span style="color:#CC00FF; font-weight:bold;">Dir</span>.<span style="color:#9900CC;">mkdir</span> basename <span style="color:#9966CC; font-weight:bold;">unless</span> <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">directory</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>basename<span style="color:#006600; font-weight:bold;">&#41;</span>
	<span style="color:#9966CC; font-weight:bold;">end</span>
	<span style="color:#CC0066; font-weight:bold;">system</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;pdftotext&quot;</span>, <span style="color:#996600;">&quot;-htmlmeta&quot;</span>, file, <span style="color:#996600;">&quot;./#{basename}/#{basename}.html&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
	<span style="color:#CC0066; font-weight:bold;">system</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;pdfimages&quot;</span>, <span style="color:#996600;">&quot;-j&quot;</span>,  file, <span style="color:#996600;">&quot;./#{basename}/&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
	<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Converted #{file} to text and extracted images to #{basename}.&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.opgenorth.net/2011/03/17/picking-apart-pdf-with-ruby-and-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>First Impressions: Windows Phone 7 Development</title>
		<link>http://www.opgenorth.net/2010/11/15/first-impressions-windows-phone-7-development/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=first-impressions-windows-phone-7-development</link>
		<comments>http://www.opgenorth.net/2010/11/15/first-impressions-windows-phone-7-development/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 04:01:55 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://www.opgenorth.net/2010/11/15/first-impressions-windows-phone-7-development/</guid>
		<description><![CDATA[I’ve spent a bit of my spare time in the past week looking at Windows Phone 7 from a developer’s point of view.  I’d have started sooner, but honestly, I didn’t see the point until there were actually devices that I could hold and use.  I know that in the U.S., some guys got developer [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve spent a bit of my spare time in the past week looking at Windows Phone 7 from a developer’s point of view.  I’d have started sooner, but honestly, I didn’t see the point until there were actually devices that I could hold and use.  I know that in the U.S., some guys got developer phones from Microsoft, but I don’t think that anybody up here in Canada was that lucky.</p>
<p>So, over the past year or so I’ve been dabbling with Android and I actually like programming for Android.  The biggest issues I’ve run into with Android are my lack of Java skills – I keep doing things the C# way (you really don’t realize how handy Linq is until you don’t have it) and the fact that Android doesn’t have a decent UI designer.  But otherwise, I like Android.</p>
<p>So, I was curious what the developer experience was for WP7.  In a nutshell – it’s not bad, and in some ways better than that of Android.</p>
<p>Things I like about WP7 development:</p>
<ul>
<li>Being a C# guy, it was pretty easy and fast for me to get going with WP7.  Of course, Novell now has <a href="http://www.monodroid.net">MonoDroid</a> which in theory should lessen the learning curve for a C# guy to create Android applications.</li>
<li>It’s nice to have good tooling to help with creating my UI’s.  Blend and Cider are pretty decent. Android does have <a href="http://droiddraw.org">DroidDraw</a>, but I’ve never really found that tool to be good to work with.  Eclipse has some sort of an GUI designer thingy, but again, I’ve found it to be kind of lack-lustre at best.  That, and I don’t use Eclipse – I prefer IntelliJ.</li>
<li>The Emulator seems to start up faster to me that the Android emulator – but that could just be me.</li>
<li>The MVVM pattern.  I know the theory, and am now learning the more practical side of it.  Was worried that WP7 was going to decent into the path of darkness and pain that was/is Web Forms.</li>
<li>I think that the debugger integrates better with the WP7 emulator.  Not that, generally speaking, I spend a lot of time in the debugger, but when you need it, it does seem to be more natural to me.  Again, this could just be because by day I do a lot of C# development so I’m more used to the Microsoft tooling to begin with.</li>
</ul>
<p>Some things I didn’t like about WP7 development:</p>
<ul>
<li>You have to have Vista or Windows 7.  Yes, I know, XP is almost 10 years old, time to move on.  Call me an O/S curmudgeon.  I don’t mind Windows 7, but Vista sucks/sucked.</li>
<li>It seems like to build your apps, you have to use Visual Studio 2010.  Not a problem for a developer, but I’m old school when it comes to compiling applications, and your build server shouldn’t be tainted by your IDE.</li>
<li>I’m use to the relatively easy going Google marketplace and the fact I have numerous avenues available to me to distribute Android applications.  No such joy with WP7 apps.</li>
<li>Editing XAML by hand.  But, I suppose it’s no worse that the XML resource files that Android uses.</li>
<li>Not seeing a lot of projects whose code I can read.  Granted it’s still early, so hopefully that will change.  Or not.  .NET doesn’t seem to have the same OSS community spirit that Java does.</li>
</ul>
<p>Microsoft has always tried to be pretty good to developers (sometimes to their own detriment), but I think Windows Phone 7 does have some things going for it, from a developer’s point of view anyway.  Here’s to hoping that strategy pays off – that cool apps will get written for WP7, and that it will be commercially viable.  Competition is good – it will keep Apple and Google on their toes.  <img class="wlEmoticon wlEmoticon-smile" style="border-style: none;" src="http://www.opgenorth.net/wp-content/uploads/2010/11/wlEmoticon-smile.png" alt="Smile" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.opgenorth.net/2010/11/15/first-impressions-windows-phone-7-development/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Looking for a Job?</title>
		<link>http://www.opgenorth.net/2010/09/21/looking-for-a-job/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=looking-for-a-job</link>
		<comments>http://www.opgenorth.net/2010/09/21/looking-for-a-job/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 15:15:32 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[YEG]]></category>

		<guid isPermaLink="false">http://www.opgenorth.net/2010/09/21/looking-for-a-job/</guid>
		<description><![CDATA[If you happen to be a .NET type, knowledgeable/interested in MVC and Agile, QuestionMark is looking for .NET developers (F/T only, no contractors) here in Edmonton, Alberta.&#160; Below is the job description.&#160; If you’re interested, send your resume to Kaitlyn Lardin at QuestionMark (kaitlyn AT questionmark DOT com): &#160; Senior Software Developer Background Questionmark is [...]]]></description>
			<content:encoded><![CDATA[<p>If you happen to be a .NET type, knowledgeable/interested in MVC and Agile, QuestionMark is looking for .NET developers (F/T only, no contractors) here in Edmonton, Alberta.&#160; Below is the job description.&#160; If you’re interested, send your resume to Kaitlyn Lardin at QuestionMark (kaitlyn AT questionmark DOT com):</p>
<p>&#160;</p>
<h3>Senior Software Developer</h3>
<p><b>Background</b></p>
<p>Questionmark is a company with a 20 year history recognised global presence in e-learning and assessment automation with software covering all aspects of this field, from authoring to delivery and reporting. Our software is used by over 3 million people in 15 different countries throughout the world. Questionmark<i> </i>is a fast-growing company, with a dedicated, passionate, and global workforce. We have offices in London, UK, Norwalk, CT and Tubize, Belgium. We care about the satisfaction of our employees and we reward them for meeting or exceeding expectations. The company promotes a relaxed, fun and highly productive approach to work. We have recently moved location to a vibrant office in the heart of downtown surrounded by software development companies.</p>
<p><b>Role of the Senior Developer</b></p>
<p>We are looking for a talented senior developer to join our development team in designing and creating the next generation of on-line assessment delivery software. This role will work closely with a Product Owner and other team members in a SCRUM environment, and be responsible for delivering potentially shippable functionality each Sprint. It also includes the mentoring of other team members through peer review. Our development team works in a Continuous Integration environment with automated builds and testing.</p>
<p><b>Essential skills:</b></p>
<p>· At least 5 years commercial experience development experience.</p>
<p>· You will be highly skilled in software development using our core technologies of C#, ASP.NET, XML, JavaScript, SQL Server and/or Oracle.</p>
<p>· Experience of jQuery very desirable </p>
<p>· Experience of working with .NET 2.0 or later</p>
<p>· Expertise in object oriented programming and relational databases</p>
<p>· Expertise in T-SQL and/or PL/SQL</p>
<p>· Good written and verbal communication. You must be able to write specifications</p>
<p>· Experience working in a SCRUM environment is desirable </p>
<p><b></b></p>
<p><b>Attributes of the Senior Software Developer:</b></p>
<p>The successful candidate will be highly skilled in software development using our core technologies, as above. You will be a self starting, self motivated individual who is enthusiastic and passionate about developing innovative software solutions.</p>
<p>Candidates must be eligible to work within Canada and relocate to Edmonton. </p>
<p><b>The package: </b></p>
<p>We offer excellent salary and benefits that include flexible working hours, starting 14 days annual leave, company bonus scheme, generous health coverage, and subsidized gym membership. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.opgenorth.net/2010/09/21/looking-for-a-job/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript IDE&#8217;s</title>
		<link>http://www.opgenorth.net/2010/08/10/javascript-ides/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=javascript-ides</link>
		<comments>http://www.opgenorth.net/2010/08/10/javascript-ides/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 02:23:00 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.opgenorth.net/2008/11/15/javascript-ides/</guid>
		<description><![CDATA[Lately I’ve found myself doing a lot more web application development in JavaScript.&#160; Typically, I always seem to fall back on plain old Notepad++ or Visual Studio.&#160; As a developer, the user experience in either is, IMHO, somewhat lacking. However, for the past week, I’ve been using RubyMine.&#160; RubyMine is a Ruby on Rails IDE [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I’ve found myself doing a lot more web application development in JavaScript.&#160; Typically, I always seem to fall back on plain old Notepad++ or Visual Studio.&#160; As a developer, the user experience in either is, IMHO, somewhat lacking. </p>
<p>However, for the past week, I’ve been using <a href="http://www.jetbrains.com/ruby/index.html">RubyMine</a>.&#160; <a href="http://www.jetbrains.com/ruby/index.html">RubyMine</a> is a Ruby on Rails IDE from <a href="http://www.jetbrains.com">Jetbrains</a>, but it seems to work rather well for editing JavaScript and HTML files.&#160; Plus, as an added bonus, it automatically comes with built in support for <a href="http://www.jquery.com">jQuery</a>.</p>
<p>Curious about <a href="http://www.jetbrains.com/ruby/index.html">RubyMine</a>?&#160; Why not come to the <a href="http://www.edmontoncodecamp.com/">Edmonton Code Camp</a> on November 29th, 2008 and see it in action during my presentation on <a href="http://www.jquery.com">jQuery</a>?&#160; Or better yet, download your own copy and check it out.</p>
<p>&lt;rant&gt;    <br />Now this may strike the one or two readers of blog as odd (assuming they haven’t fallen asleep or navigated away by now) – a lot of what I do is ASP.NET Development (WebForms and ASP.NET MVC), so shouldn’t I have been doing a lot of JavaScript up to now?</p>
<p>Well, if you allow me to digress a bit, my answer to that is “No”.&#160; I’ve said it before, and I’ll say it again that, as a web developer relying very heavily on WebForms in the past, nothing has done more to emasculate my JavaScript skills than Microsoft’s ASP.NET WebForms.&#160; ASP.NET Webforms, with it’s emphasis on making development as VB6-like as possible, seems to encourage you do try and do everything server-side.&#160; I know that I’ve sat in on at least one presentation by Microsoft employees who have spoken disparagingly of JavaScript.&#160; This is just plain wrong, IMHO.&#160; Ask me why in person, if you’d like to hear the full rant.</p>
<p>Note:&#160; This is my opinion.&#160; Lots of people are happy with Webforms, and if you are, good for you.&#160; I’m not.&#160; Direct all comments and opinions on my viewpoint to /dev/null.&#160; </p>
<p>Of course, this rant doesn’t apply if you’re using ASP.NET MVC or MonoRail.    <br />&lt;/rant&gt;</p>
<p><em><strong>Updated August 10, 2010</strong> : A bit of time has passed since I first wrote this post, figured an update couldn’t hurt</em></p>
<p>These days I seem to use a combination of <a href="http://notepad-plus-plus.org/">Notepad++</a> and <a href="http://getfirebug.com/">Firebug</a>.&#160; Firebug truly rocks.&#160; It would be really nice if it worked for Internet Explorer, but it’s probably more realistic to hope for universal peace or an end to world hunger.&#160; I’m told IE9 is supposed to have some good stuff for JavaScript development, but I somehow doubt that will help me out when I have to debug IE7/IE8 issues.</p>
<p>I’ve had some people in the past suggest Visual Studio 2008 whenever I do an informal poll.&#160; Personally, I’ve found the JavaScript editing experience in VS2008 to be lacklustre at best.&#160; </p>
<p>When <a href="http://www.jetbrains.com/webstorm/">WebStorm</a> was in beta, I tried that combined with Firebug.&#160; I rather liked it for my JavaScript editing needs.&#160; </p>
<p>If you have any favourite tools (or IDE’s) to help with your JavaScript/jQuery development, I sure would like to hear about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.opgenorth.net/2010/08/10/javascript-ides/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Android, MapView, and your Google apiKey: Part 2</title>
		<link>http://www.opgenorth.net/2010/08/09/android-mapview-and-your-google-apikey-part-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=android-mapview-and-your-google-apikey-part-2</link>
		<comments>http://www.opgenorth.net/2010/08/09/android-mapview-and-your-google-apikey-part-2/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 22:11:00 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.opgenorth.net/?p=263</guid>
		<description><![CDATA[Just to follow up on my last post about embedding Google Maps into your Android application (this part is kind of anti-climatic). So, by now you’ve signed your application.  This is the “hardest” (i.e. busiest part) of the whole process.  The next part, getting your Goggle apiKey, is the easy part.  First you  need to [...]]]></description>
			<content:encoded><![CDATA[<p>Just to follow up on my <a href="http://www.opgenorth.net/2010/04/07/android-mapview-and-your-google-apikey-part-1/">last post</a> about embedding Google Maps into your Android application (this part is kind of anti-climatic).</p>
<p>So, by now you’ve signed your application.  This is the “hardest” (i.e. busiest part) of the whole process.  The next part, getting your Goggle apiKey, is the easy part.  First you  need to get the MD5 fingerprint of your keystore:</p>
<p>keytool -list -alias androiddebugkey -keystore &lt;path_to_debug_keystore&gt;.keystore -storepass android -keypass android</p>
<p>Once that is done, you and register for a <a href="http://code.google. com/android/maps-api-signup.html">Google Maps API key</a>.  You need a Google account, and have to agree to some terms of service legal mumbo-jumbo, but it’s pretty simple.  Once you click “Generate API Key”, you will get your key string.  You then simply add the Maps API key to your MapView in your application.  There are a couple of ways to do this, heres how you would do it if you were using the XML layout files:</p>
<p>Of course, after all this is done, the next trick is managing these keys.  You see, when you are working locally, your application is automatically signed using a debug key.  This is fine and dandy for most development.  However, when you deploy your application, you sign the application using your keystore that you created in <a href="http://www.opgenorth.net/2010/04/07/android-mapview-and-your-google-apikey-part-1/">Step 1</a>.  You may have a brief moment of clarity here and realize that the apiKey from your debug keystore and your deployment keystore are different.  I’ve got some ideas on how to deal with that that, but that will be for another day.</p>
<p><a href="http://code.google.com/android/add-ons/google-apis/mapkey.html">Full documentation</a> for all this can be found on the Android developer’s website.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.opgenorth.net/2010/08/09/android-mapview-and-your-google-apikey-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gotta Love JetBrains</title>
		<link>http://www.opgenorth.net/2010/05/22/gotta-love-jetbrains/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=gotta-love-jetbrains</link>
		<comments>http://www.opgenorth.net/2010/05/22/gotta-love-jetbrains/#comments</comments>
		<pubDate>Sun, 23 May 2010 03:22:29 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.opgenorth.net/2010/05/22/gotta-love-jetbrains/</guid>
		<description><![CDATA[Gotta love companies that &#8220;get it&#8221;.  Late last night I was hacking away on some Android stuff using IntelliJ 9.0.2 (on Ubuntu 10.04). For reasons unknown to me, none of my breakpoints seemed to be working.  In fact, IntelliJ just didn&#8217;t seem to be working.  I narrowed it down to the breakpoints I was setting [...]]]></description>
			<content:encoded><![CDATA[<p>Gotta love companies that &#8220;get it&#8221;.  Late last night I was hacking away on some Android stuff using IntelliJ 9.0.2 (on Ubuntu 10.04). For reasons unknown to me, none of my breakpoints seemed to be working.  In fact, IntelliJ just didn&#8217;t seem to be working.  I narrowed it down to the breakpoints I was setting &#8211; it seemed that every time the breakpoints were being hit.  I managed to narrow it down to this error:</p>
<blockquote><p><span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="border-collapse: collapse; color: #444444; font-family: arial,sans-serif; font-size: 13px;">[ 166030]  ERROR &#8211; lij.debugger.impl.InvokeThread &#8211; null<br />
java.lang.UnsupportedOperationException<br />
at com.sun.tools.jdi.ReferenceTypeImpl.sourceDebugExtension(ReferenceTypeImpl.java:774)<br />
at org.jetbrains.plugins.ruby.jruby.debug.JRubyPositionManager.getPath(JRubyPositionManager.java:141)<br />
at org.jetbrains.plugins.ruby.jruby.debug.JRubyPositionManager.getPsiFileByLocation(JRubyPositionManager.java:156)<br />
at org.jetbrains.plugins.ruby.jruby.debug.JRubyPositionManager.getSourcePosition(JRubyPositionManager.java:51)<br />
at com.intellij.debugger.engine.CompoundPositionManager.getSourcePosition(CompoundPositionManager.java:51)<br />
at com.intellij.debugger.engine.ContextUtil.getSourcePosition(ContextUtil.java:63)<br />
at com.intellij.debugger.impl.DebuggerSession$MyDebugProcessListener$2.compute(DebuggerSession.java:462)<br />
at com.intellij.debugger.impl.DebuggerSession$MyDebugProcessListener$2.compute(DebuggerSession.java:460)<br />
at com.intellij.psi.impl.PsiDocumentManagerImpl$3.run(PsiDocumentManagerImpl.java:298)<br />
at com.intellij.psi.impl.PsiDocumentManagerImpl$4.run(PsiDocumentManagerImpl.java:321)<br />
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:695)<br />
at com.intellij.psi.impl.PsiDocumentManagerImpl.commitAndRunReadAction(PsiDocumentManagerImpl.java:317)<br />
at com.intellij.psi.impl.PsiDocumentManagerImpl.commitAndRunReadAction(PsiDocumentManagerImpl.java:296)<br />
at com.intellij.debugger.impl.DebuggerSession$MyDebugProcessListener.paused(DebuggerSession.java:460)<br />
at com.intellij.debugger.engine.DebugProcessAdapterImpl.paused(DebugProcessAdapterImpl.java:28)<br />
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)<br />
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br />
at java.lang.reflect.Method.invoke(Method.java:616)<br />
at com.intellij.util.EventDispatcher.dispatch(EventDispatcher.java:87)<br />
at com.intellij.util.EventDispatcher.access$100(EventDispatcher.java:33)<br />
at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:64)<br />
at $Proxy84.paused(Unknown Source)<br />
at com.intellij.debugger.engine.SuspendManagerImpl.notifyPaused(SuspendManagerImpl.java:306)<br />
at com.intellij.debugger.engine.SuspendManagerImpl.b(SuspendManagerImpl.java:299)<br />
at com.intellij.debugger.engine.SuspendManagerImpl.voteSuspend(SuspendManagerImpl.java:318)<br />
at com.intellij.debugger.engine.DebugProcessEvents$1.contextAction(DebugProcessEvents.java:412)<br />
at com.intellij.debugger.engine.events.SuspendContextCommandImpl.action(SuspendContextCommandImpl.java:62)<br />
at com.intellij.debugger.engine.events.DebuggerCommandImpl.run(DebuggerCommandImpl.java:44)<br />
at com.intellij.debugger.engine.DebuggerManagerThreadImpl.processEvent(DebuggerManagerThreadImpl.java:148)<br />
at com.intellij.debugger.engine.DebuggerManagerThreadImpl.processEvent(DebuggerManagerThreadImpl.java:36)<br />
at com.intellij.debugger.impl.InvokeThread.run(InvokeThread.java:135)<br />
at com.intellij.debugger.impl.InvokeThread$WorkerThreadRequest.run(InvokeThread.java:52)<br />
at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:329)<br />
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)<br />
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)<br />
at java.util.concurrent.FutureTask.run(FutureTask.java:166)<br />
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)<br />
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)<br />
at java.lang.Thread.run(Thread.java:636)<br />
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:125)<br />
[ 166036]  ERROR &#8211; lij.debugger.impl.InvokeThread &#8211; IntelliJ IDEA 9.0.2  Build #IU-95.66<br />
[ 166036]  ERROR &#8211; lij.debugger.impl.InvokeThread &#8211; JDK: 1.6.0_18<br />
[ 166036]  ERROR &#8211; lij.debugger.impl.InvokeThread &#8211; VM: OpenJDK Server VM<br />
[ 166036]  ERROR &#8211; lij.debugger.impl.InvokeThread &#8211; Vendor: Sun Microsystems Inc.<br />
[ 166036]  ERROR &#8211; lij.debugger.impl.InvokeThread &#8211; OS: Linux<br />
[ 166036]  ERROR &#8211; lij.debugger.impl.InvokeThread &#8211; Last Action: Debug</span></span></p></blockquote>
<p>So, the problem to me seemed to be something wonky with IntelliJ.  I e-mailed Jetbrains, explaining the symptoms and the above stack trace.  This morning, I was pleased to find an e-mail from Serge  at Jetbrains.  He suggests disabling the Ruby plug-in that I have installed.</p>
<p>BINGO!</p>
<p>Worked like a charm.  Problem goes away, and in less than 12 hours since I asked for help.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.opgenorth.net/2010/05/22/gotta-love-jetbrains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android, MapView, and your Google apiKey: Part 1</title>
		<link>http://www.opgenorth.net/2010/04/07/android-mapview-and-your-google-apikey-part-1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=android-mapview-and-your-google-apikey-part-1</link>
		<comments>http://www.opgenorth.net/2010/04/07/android-mapview-and-your-google-apikey-part-1/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 03:52:38 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.opgenorth.net/2010/04/07/android-mapview-and-your-google-apikey-part-1/</guid>
		<description><![CDATA[Thanks to the MapView, it’s drop dead easy to put Google Maps into your application.&#160; There are lots of posts out there how to do it.&#160; Interestingly (to me anyway), when I did a quick search of the Android developers mailing list, I was surprised to see that a lot of people had the same [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.opgenorth.net/wp-content/uploads/2010/04/MapList1.png"><img style="display: inline; margin-left: 10px; margin-right: 0px" title="MapList" border="0" alt="MapList" align="right" src="http://www.opgenorth.net/wp-content/uploads/2010/04/MapList_thumb1.png" width="164" height="244" /></a></p>
<p>Thanks to the <a href="http://developer.android.com/guide/tutorials/views/hello-mapview.html">MapView</a>, it’s drop dead easy to put Google Maps into your application.&#160; There are lots of posts out there how to do it.&#160; Interestingly (to me anyway), when I did a quick search of the Android developers mailing list, I was surprised to see that a lot of people had the same problem:&#160; basically, when you look at your MapView, you end up with a grid of white squares.&#160; It kind of sucks.&#160; There are a lot of blog posts and articles out there on how to fix this problem, but this one is for me, and to help me remember it.</p>
<p>The trick to fixing this is setting your Google Maps API key.&#160; Note the layout below:</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 76.6%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; height: 210px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">&lt;?</span><span style="color: #800000">xml</span> <span style="color: #ff0000">version</span><span style="color: #0000ff">=&quot;1.0&quot;</span> <span style="color: #ff0000">encoding</span><span style="color: #0000ff">=&quot;utf-8&quot;</span>?<span style="color: #0000ff">&gt;</span></pre>
<p>
      <br /><!--CRLF--></p>
<p></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">RelativeLayout</span> <span style="color: #ff0000">xmlns:android</span><span style="color: #0000ff">=&quot;http://schemas.android.com/apk/res/android&quot;</span></pre>
<p>
      <br /><!--CRLF--></p>
<p></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     <span style="color: #ff0000">android:id</span><span style="color: #0000ff">=&quot;@+id/mainlayout&quot;</span></pre>
<p>
      <br /><!--CRLF--></p>
<p></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     <span style="color: #ff0000">android:orientation</span><span style="color: #0000ff">=&quot;vertical&quot;</span></pre>
<p>
      <br /><!--CRLF--></p>
<p></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>     <span style="color: #ff0000">android:layout_width</span><span style="color: #0000ff">=&quot;fill_parent&quot;</span></pre>
<p>
      <br /><!--CRLF--></p>
<p></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>     <span style="color: #ff0000">android:layout_height</span><span style="color: #0000ff">=&quot;fill_parent&quot;</span> <span style="color: #0000ff">&gt;</span></pre>
<p>
      <br /><!--CRLF--></p>
<p></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span></pre>
<p>
      <br /><!--CRLF--></p>
<p></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">com.google.android.maps.MapView</span></pre>
<p>
      <br /><!--CRLF--></p>
<p></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>         android:id=&quot;@+id/mapview&quot;</pre>
<p>
      <br /><!--CRLF--></p>
<p></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>         android:layout_width=&quot;fill_parent&quot;</pre>
<p>
      <br /><!--CRLF--></p>
<p></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>         android:layout_height=&quot;fill_parent&quot;</pre>
<p>
      <br /><!--CRLF--></p>
<p></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>         android:clickable=&quot;true&quot;</pre>
<p>
      <br /><!--CRLF--></p>
<p></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>         android:apiKey=&quot;Your Maps API Key&quot;</pre>
<p>
      <br /><!--CRLF--></p>
<p></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>     <span style="color: #0000ff">/&gt;</span></pre>
<p>
      <br /><!--CRLF--></p>
<p></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span></pre>
<p>
      <br /><!--CRLF--></p>
<p></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">RelativeLayout</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
</p></div>
</div>
<p><a href="http://www.opgenorth.net/wp-content/uploads/2010/04/hotelkey.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="hotel-key" border="0" alt="hotel-key" align="left" src="http://www.opgenorth.net/wp-content/uploads/2010/04/hotelkey_thumb.jpg" width="71" height="63" /></a></p>
<p>In particular, pay attention to line #13.&#160; What you have to do is create a Google Maps API key, and then paste it in there.&#160; That’s simple.&#160; How do you do that?&#160; Well it’s simple too, but not as simple as it could be.&#160; The first thing you need to do is to <a href="http://developer.android.com/guide/publishing/app-signing.html">sign your application</a>.&#160; This isn’t a big deal, you have to sign your application before you can publish it anyway.&#160; Android will NOT install an application otherwise.</p>
<p>So, it seems we have two steps here:</p>
<ol>
<li>Sign your application </li>
<li>Use your signed application to get a Google Maps apiKey. </li>
</ol>
<p>Generate a private key.&#160; Keep this safer, as if it were the Holy Grail.&#160; Lose this, and as far as the public is concerned, you’re locked out from your own application – you will not be able to update it.&#160; The image below will show you the steps to go through</p>
<ol>
<pre class="csharpcode"><span class="str">&quot;C:\Program Files (x86)\Java\jdk1.6.0_19\bin\keytool&quot;</span> -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -validity 10000</pre>
</ol>
<p><a href="http://www.opgenorth.net/wp-content/uploads/2010/04/keytoolsample1.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="keytoolsample" border="0" alt="keytoolsample" src="http://www.opgenorth.net/wp-content/uploads/2010/04/keytoolsample_thumb1.png" width="594" height="309" /></a></p>
<p>Once you have that done, build your application (in release mode).&#160; I leave this as an exercise for the reader.</p>
<p>Now that you have your application built, you need to sign it.&#160; This is where jarsigner comes in:</p>
<p><!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --><a href="http://www.opgenorth.net/wp-content/uploads/2010/04/jarsigner1.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="jarsigner" border="0" alt="jarsigner" src="http://www.opgenorth.net/wp-content/uploads/2010/04/jarsigner_thumb1.png" width="513" height="267" /></a>And the final step is to zipalign your&#160; APK.&#160; You have to do zipalign last.&#160; Basically, you do zipalign for performance reasons.&#160; If you want to know more, RTFM.</p>
<pre class="csharpcode">C:\android-sdk-windows\tools\zipalign -v 4 HistoricalBuildings-unalign.apk HistoricalBuildings.apk</pre>
<p><!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --><a href="http://www.opgenorth.net/wp-content/uploads/2010/04/zipalign1.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="zipalign" border="0" alt="zipalign" src="http://www.opgenorth.net/wp-content/uploads/2010/04/zipalign_thumb1.png" width="513" height="267" /></a></p>
<p>Now, of course, both Eclipse and IntelliJ will handle these steps for you.&#160; But where is the fun in that?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.opgenorth.net/2010/04/07/android-mapview-and-your-google-apikey-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Followup: TechDays 2009 in Calgary</title>
		<link>http://www.opgenorth.net/2009/11/19/techdays-2009-in-calgary-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=techdays-2009-in-calgary-2</link>
		<comments>http://www.opgenorth.net/2009/11/19/techdays-2009-in-calgary-2/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 03:48:09 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.opgenorth.net/2009/11/19/techdays-2009-in-calgary-2/</guid>
		<description><![CDATA[Yesterday I was at TechDays 2009 in Calgary for the day (well, the morning really).  I wasn&#8217;t there as an attendee, but as a speaker.  Thanks to everybody who came out to my two talks, the first one on an Introduction to ASP.NET MVC and the second one on SOLIDifying your ASP.NET MVC Application.  There [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I was at TechDays 2009 in Calgary for the day (well, the morning really).  I wasn&#8217;t there as an attendee, but as a speaker.  Thanks to everybody who came out to my two talks, the first one on an <em>Introduction to ASP.NET MVC</em> and the second one on <em>SOLIDifying your ASP.NET MVC Application</em>.  There were a few hiccups along the way:  as usual, I fell victim to the Technical Presentation Time Dilation Syndrome (i.e. ran out of time) on both talks.  I guess I&#8217;m just to long-winded for my own good.  As well, because I was running a <a href="http://www.jetbrains.net/confluence/display/ReSharper/ReSharper+Early+Access+Program">EAP of Resharper 5</a>, I had some Visual Studio 2008 issues &#8211; namely VS2008 would hang on me from time to time.  Note to self: maybe don&#8217;t use the bleeding edge tools in a talk.  And I really should break myself of wanting to type all the code &#8211; using snippets would really save me time.</p>
<p>Two things that suprised me:</p>
<ol>
<li>That there was still that much interest in ASP.NET MVC intro talks.  I just figured that everybody knew/knows about it.  Or maybe I just spend to much time with guys who have drunk the ASP.NET MVC Flavor Aid.  Either way, I think that there were some in the crowd that will convert from WebForms to ASP.NET MVC.</li>
<li>I asked how many people wrote unit tests or developing their software using Test Driven Development was the number of people who didn&#8217;t raise their hands.  While I didn&#8217;t expect the majority of the crowd, I did expect a lot more people than I saw.  Maybe it was a quiet crowd, and people didn&#8217;t feel like saying they wrote unit tests.  Maybe I live in a bubble, and my perception of what is actually going on in the .NET world is skewed (that is to say, perhaps writing tests is the exception rather than the rule).  It did kind of make me a bit concerned, as I truly believe that TDD does help one write better software overall.</li>
</ol>
<p>Anyway, here&#8217;s to hoping that TechDays 2010 will stop off in Edmonton.  And hopefully have a track that will focus on developer fundamentals, like TechDays had in Toronto and Vancouver.</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=2eb31f71-f855-83ff-bf64-795e87c1b4f0" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.opgenorth.net/2009/11/19/techdays-2009-in-calgary-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Compiling ASP.NET MVC on Mono 2.4.3</title>
		<link>http://www.opgenorth.net/2009/11/11/compiling-asp-net-mvc-on-mono-2-4-3/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=compiling-asp-net-mvc-on-mono-2-4-3</link>
		<comments>http://www.opgenorth.net/2009/11/11/compiling-asp-net-mvc-on-mono-2-4-3/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 16:52:17 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Mono]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[mono]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.opgenorth.net/2009/11/11/compiling-asp-net-mvc-on-mono-2-4-3/</guid>
		<description><![CDATA[Out of intellectual curiosity, I sparked up MonoDevelop and decided to see what would happen when I tried to compile the ASP.NET MVC source code. I figured that it would Just Work.&#160; After all, I can use the .NET compiled assembly with no problems on Mono, so there really shouldn&#8217;t be any problems trying to [...]]]></description>
			<content:encoded><![CDATA[<p>Out of intellectual curiosity, I sparked up <a href="http://www.monodevelop.com">MonoDevelop</a> and decided to see what would happen when I tried to compile the <a href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24471">ASP.NET MVC source code</a>. I figured that it would Just Work.&#160; After all, I can use the .NET compiled assembly with no problems on <a href="http://www.go-mono.com">Mono</a>, so there really shouldn&#8217;t be any problems trying to compile the code.&#160; Bad news is that there is one minor glitch.&#160; Good news is the glitch is easy to work around and has already been fixed so it shouldn&#8217;t be a problem for future version of Mono. </p>
<p>When you compile, here is what you get:</p>
<p><font face="monospace">Compilation failed: 1 error(s), 0 warnings</font>
<p>/home/tom/Projects/MVC-MS-Pl-original/MVC-MS-Pl/Mvc/FormCollection.cs(25,6): error CS0246: The type or namespace name `FormCollectionBinder&#8217; could not be found. Are you missing a using directive or an assembly reference?</p>
<p>Build complete &#8212; 1 error, 0 warnings</p>
</p>
<p>So, this kind of surprised me.&#160; Looking at the code, I did see the FormCollectionBinder in the code, it&#8217;s an embedded class within System.Web.Mvc.FormCollection, check out lines 68-88 below:   </p>
<div>
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> <span style="color: #008000">/* **************************************************************************** </span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   2:</span> <span style="color: #008000"> * </span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   3:</span> <span style="color: #008000"> * Copyright (c) Microsoft Corporation. All rights reserved. </span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   4:</span> <span style="color: #008000"> * </span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   5:</span> <span style="color: #008000"> * This software is subject to the Microsoft Public License (Ms-PL).  </span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   6:</span> <span style="color: #008000"> * A copy of the license can be found in the license.htm file included  </span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   7:</span> <span style="color: #008000"> * in this distribution. </span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   8:</span> <span style="color: #008000"> * </span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   9:</span> <span style="color: #008000"> * You must not remove this notice, or any other, from this software. </span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  10:</span> <span style="color: #008000"> * </span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  11:</span> <span style="color: #008000"> * ***************************************************************************/</span> </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  12:</span>  </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  13:</span> <span style="color: #0000ff">namespace</span> System.Web.Mvc { </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  14:</span>     <span style="color: #0000ff">using</span> System; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  15:</span>     <span style="color: #0000ff">using</span> System.Collections.Generic; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  16:</span>     <span style="color: #0000ff">using</span> System.Collections.Specialized; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  17:</span>     <span style="color: #0000ff">using</span> System.Diagnostics.CodeAnalysis; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  18:</span>     <span style="color: #0000ff">using</span> System.Globalization; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  19:</span>     <span style="color: #0000ff">using</span> System.Web.Mvc.Resources; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  20:</span>  </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  21:</span>     [SuppressMessage(<span style="color: #006080">&quot;Microsoft.Usage&quot;</span>, <span style="color: #006080">&quot;CA2237:MarkISerializableTypesWithSerializable&quot;</span>, </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  22:</span>         Justification = <span style="color: #006080">&quot;It is not anticipated that users will need to serialize this type.&quot;</span>)] </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  23:</span>     [SuppressMessage(<span style="color: #006080">&quot;Microsoft.Design&quot;</span>, <span style="color: #006080">&quot;CA1035:ICollectionImplementationsHaveStronglyTypedMembers&quot;</span>, </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  24:</span>         Justification = <span style="color: #006080">&quot;It is not anticipated that users will call FormCollection.CopyTo().&quot;</span>)] </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  25:</span>     [FormCollectionBinder] </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  26:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> FormCollection : NameValueCollection { </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  27:</span>  </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  28:</span>         <span style="color: #0000ff">public</span> FormCollection() { </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  29:</span>         } </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  30:</span>  </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  31:</span>         <span style="color: #0000ff">public</span> FormCollection(NameValueCollection collection) { </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  32:</span>             <span style="color: #0000ff">if</span> (collection == <span style="color: #0000ff">null</span>) { </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  33:</span>                 <span style="color: #0000ff">throw</span> <span style="color: #0000ff">new</span> ArgumentNullException(<span style="color: #006080">&quot;collection&quot;</span>); </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  34:</span>             } </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  35:</span>  </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  36:</span>             Add(collection); </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  37:</span>         } </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  38:</span>  </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  39:</span>         <span style="color: #0000ff">public</span> IDictionary&lt;<span style="color: #0000ff">string</span>, ValueProviderResult&gt; ToValueProvider() { </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  40:</span>             CultureInfo currentCulture = CultureInfo.CurrentCulture; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  41:</span>  </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  42:</span>             Dictionary&lt;<span style="color: #0000ff">string</span>, ValueProviderResult&gt; dict = <span style="color: #0000ff">new</span> Dictionary&lt;<span style="color: #0000ff">string</span>, ValueProviderResult&gt;(StringComparer.OrdinalIgnoreCase); </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  43:</span>             <span style="color: #0000ff">string</span>[] keys = AllKeys; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  44:</span>             <span style="color: #0000ff">foreach</span> (<span style="color: #0000ff">string</span> key <span style="color: #0000ff">in</span> keys) { </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  45:</span>                 <span style="color: #0000ff">string</span>[] rawValue = GetValues(key); </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  46:</span>                 <span style="color: #0000ff">string</span> attemptedValue = <span style="color: #0000ff">this</span>[key]; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  47:</span>                 ValueProviderResult vpResult = <span style="color: #0000ff">new</span> ValueProviderResult(rawValue, attemptedValue, currentCulture); </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  48:</span>                 dict[key] = vpResult; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  49:</span>             } </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  50:</span>  </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  51:</span>             <span style="color: #0000ff">return</span> dict; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  52:</span>         } </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  53:</span>  </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  54:</span>         <span style="color: #0000ff">public</span> <span style="color: #0000ff">virtual</span> ValueProviderResult GetValue(<span style="color: #0000ff">string</span> name) { </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  55:</span>             <span style="color: #0000ff">if</span> (String.IsNullOrEmpty(name)) { </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  56:</span>                 <span style="color: #0000ff">throw</span> <span style="color: #0000ff">new</span> ArgumentException(MvcResources.Common_NullOrEmpty, <span style="color: #006080">&quot;name&quot;</span>); </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  57:</span>             } </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  58:</span>  </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  59:</span>             <span style="color: #0000ff">string</span>[] rawValue = GetValues(name); </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  60:</span>             <span style="color: #0000ff">if</span> (rawValue == <span style="color: #0000ff">null</span>) { </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  61:</span>                 <span style="color: #0000ff">return</span> <span style="color: #0000ff">null</span>; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  62:</span>             } </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  63:</span>  </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  64:</span>             <span style="color: #0000ff">string</span> attemptedValue = <span style="color: #0000ff">this</span>[name]; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  65:</span>             <span style="color: #0000ff">return</span> <span style="color: #0000ff">new</span> ValueProviderResult(rawValue, attemptedValue, CultureInfo.CurrentCulture); </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  66:</span>         } </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  67:</span>  </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  68:</span>         <span style="color: #0000ff">private</span> <span style="color: #0000ff">sealed</span> <span style="color: #0000ff">class</span> FormCollectionBinderAttribute : CustomModelBinderAttribute { </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  69:</span>  </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  70:</span>             <span style="color: #008000">// since the FormCollectionModelBinder.BindModel() method is thread-safe, we only need to keep </span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  71:</span>             <span style="color: #008000">// a single instance of the binder around </span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  72:</span>             <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">readonly</span> FormCollectionModelBinder _binder = <span style="color: #0000ff">new</span> FormCollectionModelBinder(); </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  73:</span>  </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  74:</span>             <span style="color: #0000ff">public</span> <span style="color: #0000ff">override</span> IModelBinder GetBinder() { </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  75:</span>                 <span style="color: #0000ff">return</span> _binder; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  76:</span>             } </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  77:</span>  </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  78:</span>             <span style="color: #008000">// this class is used for generating a FormCollection object </span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  79:</span>             <span style="color: #0000ff">private</span> <span style="color: #0000ff">sealed</span> <span style="color: #0000ff">class</span> FormCollectionModelBinder : IModelBinder { </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  80:</span>                 <span style="color: #0000ff">public</span> <span style="color: #0000ff">object</span> BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) { </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  81:</span>                     <span style="color: #0000ff">if</span> (controllerContext == <span style="color: #0000ff">null</span>) { </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  82:</span>                         <span style="color: #0000ff">throw</span> <span style="color: #0000ff">new</span> ArgumentNullException(<span style="color: #006080">&quot;controllerContext&quot;</span>); </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  83:</span>                     } </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  84:</span>  </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  85:</span>                     <span style="color: #0000ff">return</span> <span style="color: #0000ff">new</span> FormCollection(controllerContext.HttpContext.Request.Form); </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  86:</span>                 } </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  87:</span>             } </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  88:</span>         } </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  89:</span>  </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  90:</span>     } </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  91:</span> }</pre>
</p></div>
</div>
<p>The version of Mono 2.4.3 I have doesn&#8217;t compile the class FormCollection because the FormCollectionBinderAttribute is inside the FormCollection class.&#160; This is the bug, and it has since been fixed.&#160; Easy ways to get around this:</p>
<ol>
<li>Just use the binary assembly from Microsoft for ASP.NET MVC. </li>
<li>Build your own Mono with the fix included </li>
<li>Move the code for FormCollectionBinderAttribute class outside of the code for the FormCollection class. </li>
</ol>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=f2ca890b-2b86-8d88-a1e6-06841221cc73" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.opgenorth.net/2009/11/11/compiling-asp-net-mvc-on-mono-2-4-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TechDays 2009 In Calgary</title>
		<link>http://www.opgenorth.net/2009/11/10/techdays-2009-in-calgary/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=techdays-2009-in-calgary</link>
		<comments>http://www.opgenorth.net/2009/11/10/techdays-2009-in-calgary/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 00:24:22 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.opgenorth.net/2009/11/10/techdays-2009-in-calgary/</guid>
		<description><![CDATA[Just a heads up that TechDays Canada 2009 is happening in Calgary next week on November 17 and 18.  Yours truly will be there for the whole morning of November 18th talking about ASP.NET MVC and SOLID (note that this is not the same SOLID talk from the DevFundamentals track at TechDays Vancouver and TechDays [...]]]></description>
			<content:encoded><![CDATA[<p>Just a heads up that <a href="http://www.microsoft.com/canada/techdays/default.aspx">TechDays Canada 2009</a> is happening in Calgary next week on November 17 and 18.  Yours truly will be there for the whole morning of November 18th talking about ASP.NET MVC and SOLID (note that this is <strong>not</strong> the same SOLID talk from the DevFundamentals track at TechDays Vancouver and TechDays Toronto).  If you happen to be there, don&#8217;t be afraid to come on by and say hello.</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=398917f8-5ef2-8681-9044-b9ab8d709d26" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.opgenorth.net/2009/11/10/techdays-2009-in-calgary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

