<?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>Chris Hampson &#187; Uncategorized</title>
	<atom:link href="http://www.bleevo.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bleevo.com</link>
	<description>Software, Business &#38; Life</description>
	<lastBuildDate>Fri, 12 Feb 2010 12:27:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>cannot be loaded because the execution of scripts is disabled on this system</title>
		<link>http://www.bleevo.com/2010/01/cannot-be-loaded-because-the-execution-of-scripts-is-disabled-on-this-system/</link>
		<comments>http://www.bleevo.com/2010/01/cannot-be-loaded-because-the-execution-of-scripts-is-disabled-on-this-system/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 23:13:46 +0000</pubDate>
		<dc:creator>Chris Hampson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.bleevo.com/?p=175</guid>
		<description><![CDATA[To enable running unsigned powershell scripts on your system. Set-ExecutionPolicy Unrestricted Easy!]]></description>
			<content:encoded><![CDATA[<p>To enable running unsigned powershell scripts on your system.</p>
<p>Set-ExecutionPolicy Unrestricted</p>
<p>Easy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bleevo.com/2010/01/cannot-be-loaded-because-the-execution-of-scripts-is-disabled-on-this-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Event handlers can only be bound to HttpApplication events during IHttpModule initialization.</title>
		<link>http://www.bleevo.com/2009/08/event-handlers-can-only-be-bound-to-httpapplication-events-during-ihttpmodule-initialization/</link>
		<comments>http://www.bleevo.com/2009/08/event-handlers-can-only-be-bound-to-httpapplication-events-during-ihttpmodule-initialization/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 06:10:52 +0000</pubDate>
		<dc:creator>Chris Hampson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.bleevo.com/?p=169</guid>
		<description><![CDATA[If you ever get this error it is because you are trying to access the HttpApplication context outside of its intialisation pipeline and more than likely you are using IIS7. This error is easily fixed you must add this code block to your Global.asax and move the offending code inside it and no more errors [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever get this error it is because you are trying to access the HttpApplication context outside of its intialisation pipeline and more than likely you are using IIS7.</p>
<p>This error is easily fixed you must add this code block to your Global.asax and move the offending code inside it and no more errors <img src='http://www.bleevo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #0600FF;">override</span> <span style="color: #0600FF;">void</span> Init<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">base</span>.<span style="color: #0000FF;">Init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008080; font-style: italic;">//offending code here</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bleevo.com/2009/08/event-handlers-can-only-be-bound-to-httpapplication-events-during-ihttpmodule-initialization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET MVC StrongRoutes AppAir.Web Preview Release</title>
		<link>http://www.bleevo.com/2009/08/aspnet-mvc-strongroutes-appairweb-preview-release/</link>
		<comments>http://www.bleevo.com/2009/08/aspnet-mvc-strongroutes-appairweb-preview-release/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 00:13:58 +0000</pubDate>
		<dc:creator>Chris Hampson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.bleevo.com/?p=161</guid>
		<description><![CDATA[Today is a preview release of the AppAir.Web utility library for ASP.NET MVC. What is included is StrongRoutes and two helper functions to clean up your views. The general idea is you have static classes for routes so they can be referenced anywhere in your Controllers and Views without using nasty Magic Strings. If you [...]]]></description>
			<content:encoded><![CDATA[<p>Today is a preview release of the AppAir.Web utility library for ASP.NET MVC.</p>
<p>What is included is StrongRoutes and two helper functions to clean up your views. The general idea is you have static classes for routes so they can be referenced anywhere in your Controllers and Views without using <strong>nasty</strong> Magic Strings.</p>
<p>If you like what you see or have some suggestions give me a shoutout via here or tweeter <a href="http://twitter.com/bleevo">@bleevo</a>.</p>
<p>All code is licensed as <a href="http://www.opensource.org/licenses/mit-license.php">MIT</a><br />
Source Code: <a href="http://github.com/bleevo/AppAir.Web/tree/master">http://github.com/bleevo/AppAir.Web/tree/master</a><br />
Direct Download: <a href="http://github.com/bleevo/AppAir.Web/zipball/master">http://github.com/bleevo/AppAir.Web/zipball/master</a></p>
<p>View</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&lt;%=</span>Html.<span style="color: #0000FF;">LinkTo</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Register&quot;</span>, UserRoutes.<span style="color: #0000FF;">Register</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">%&gt;</span>
<span style="color: #008000;">&lt;</span>a href<span style="color: #008000;">=</span><span style="color: #666666;">&quot;&lt;%=Url.LinkTo(UserRoutes.Register)%&gt;&quot;</span><span style="color: #008000;">&gt;</span>Register<span style="color: #008000;">&lt;/</span>a<span style="color: #008000;">&gt;</span></pre></div></div>

<p>Global.asax</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> MvcApplication <span style="color: #008000;">:</span> <span style="color: #000000;">System.<span style="color: #0000FF;">Web</span></span>.<span style="color: #0000FF;">HttpApplication</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">void</span> RegisterRoutes<span style="color: #000000;">&#40;</span>RouteCollection routes<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        routes.<span style="color: #0000FF;">IgnoreRoute</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;{resource}.axd/{*pathInfo}&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
		AppAir.<span style="color: #0000FF;">Web</span>.<span style="color: #0000FF;">Routing</span>.<span style="color: #0000FF;">StrongRouteRegistrar</span>.<span style="color: #0000FF;">MapFrom</span><span style="color: #000000;">&#40;</span><span style="color: #008000;">typeof</span><span style="color: #000000;">&#40;</span>UserRoutes<span style="color: #000000;">&#41;</span>, routes<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">void</span> Application_Start<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
		RegisterRoutes<span style="color: #000000;">&#40;</span>RouteTable.<span style="color: #0000FF;">Routes</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #FF0000;">class</span> UserRoutes
<span style="color: #000000;">&#123;</span>
	<span style="color: #000000;">&#91;</span>RouteOrder<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
	<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">readonly</span> StrongRoute Register 
		<span style="color: #008000;">=</span> StrongRoute.<span style="color: #0000FF;">Map</span><span style="color: #008000;">&lt;</span>UserController<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;register&quot;</span>, c <span style="color: #008000;">=&gt;</span> c.<span style="color: #0000FF;">Register</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
	<span style="color: #000000;">&#91;</span>RouteOrder<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
	<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">readonly</span> StrongRoute Logout 
		<span style="color: #008000;">=</span> StrongRoute.<span style="color: #0000FF;">Map</span><span style="color: #008000;">&lt;</span>UserController<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;logout&quot;</span>, c <span style="color: #008000;">=&gt;</span> c.<span style="color: #0000FF;">Logout</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
	<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">readonly</span> StrongRoute Login 
		<span style="color: #008000;">=</span> StrongRoute.<span style="color: #0000FF;">Map</span><span style="color: #008000;">&lt;</span>UserController<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;login&quot;</span>, c <span style="color: #008000;">=&gt;</span> c.<span style="color: #0000FF;">Login</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bleevo.com/2009/08/aspnet-mvc-strongroutes-appairweb-preview-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing StrongRoutes for ASP.NET MVC</title>
		<link>http://www.bleevo.com/2009/08/introducing-strongroutes-for-aspnet-mvc/</link>
		<comments>http://www.bleevo.com/2009/08/introducing-strongroutes-for-aspnet-mvc/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 22:42:17 +0000</pubDate>
		<dc:creator>Chris Hampson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.bleevo.com/?p=158</guid>
		<description><![CDATA[UPDATE PREVIEW RELEASED http://www.bleevo.com/2009/08/aspnet-mvc-strongroutes-appairweb-preview-release/ Just a little preview of something I am working on that will be available soon. public static class SubmissionRoutes &#123; &#91;RouteOrder&#40;1&#41;&#93; public static readonly StrongRoute Create = StrongRoute.Map&#60;SubmissionController&#62;&#40;&#34;submission/create&#34;, c =&#62; c.CreateSubmission&#40;null&#41;&#41;; &#125; Usage: &#60;%=Html.LinkTo&#40;&#34;Create&#34;, SubmissionRoutes.Create&#41;%&#62;]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE PREVIEW RELEASED <a href="http://www.bleevo.com/2009/08/aspnet-mvc-strongroutes-appairweb-preview-release/">http://www.bleevo.com/2009/08/aspnet-mvc-strongroutes-appairweb-preview-release/</a></strong></p>
<p>Just a little preview of something I am working on that will be available soon.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #FF0000;">class</span> SubmissionRoutes
<span style="color: #000000;">&#123;</span>
    <span style="color: #000000;">&#91;</span>RouteOrder<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
    <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">readonly</span> StrongRoute Create 
      <span style="color: #008000;">=</span> StrongRoute.<span style="color: #0000FF;">Map</span><span style="color: #008000;">&lt;</span>SubmissionController<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;submission/create&quot;</span>, c <span style="color: #008000;">=&gt;</span> c.<span style="color: #0000FF;">CreateSubmission</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p><strong>Usage:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&lt;%=</span>Html.<span style="color: #0000FF;">LinkTo</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Create&quot;</span>, SubmissionRoutes.<span style="color: #0000FF;">Create</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">%&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bleevo.com/2009/08/introducing-strongroutes-for-aspnet-mvc/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ASP.NET MVC Request.Files empty</title>
		<link>http://www.bleevo.com/2009/08/aspnet-mvc-requestfiles-empty/</link>
		<comments>http://www.bleevo.com/2009/08/aspnet-mvc-requestfiles-empty/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 08:09:24 +0000</pubDate>
		<dc:creator>Chris Hampson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.bleevo.com/2009/08/aspnet-mvc-requestfiles-empty/</guid>
		<description><![CDATA[Trying to get File uploads to work in ASP.NET MVC but Request.Files is always empty? There a few things you might have done wrong! The form tag must have enctype=&#8221;multipart/form-data&#8221; and your file input tag must have a name not just an id like below. &#60;% using&#40;Html.BeginRouteForm&#40;&#34;submission_create_path&#34;, FormMethod.Post, new &#123; enctype = &#34;multipart/form-data&#34; &#125;&#41;&#41; &#123; [...]]]></description>
			<content:encoded><![CDATA[<p>Trying to get File uploads to work in ASP.NET MVC but Request.Files is always empty?</p>
<p>There a few things you might have done wrong!</p>
<p>The form tag must have enctype=&#8221;multipart/form-data&#8221; and your file input tag must have a name not just an id like below.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&lt;%</span> <span style="color: #0600FF;">using</span><span style="color: #000000;">&#40;</span>Html.<span style="color: #0000FF;">BeginRouteForm</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;submission_create_path&quot;</span>, FormMethod.<span style="color: #0000FF;">Post</span>,
 <span style="color: #008000;">new</span> <span style="color: #000000;">&#123;</span> enctype <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;multipart/form-data&quot;</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #008000;">%&gt;</span>
    <span style="color: #008000;">&lt;</span>input id<span style="color: #008000;">=</span><span style="color: #666666;">&quot;sourceCode&quot;</span> name<span style="color: #008000;">=</span><span style="color: #666666;">&quot;sourceCode&quot;</span> type<span style="color: #008000;">=</span><span style="color: #666666;">&quot;file&quot;</span> <span style="color: #008000;">/&gt;</span>
    <span style="color: #008000;">&lt;</span>input type<span style="color: #008000;">=</span><span style="color: #666666;">&quot;submit&quot;</span> value<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Upload&quot;</span> <span style="color: #008000;">/&gt;</span>
<span style="color: #008000;">&lt;%</span> <span style="color: #000000;">&#125;</span> <span style="color: #008000;">%&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bleevo.com/2009/08/aspnet-mvc-requestfiles-empty/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Attempting to load a 64-bit application, however this CPU is not compatible with 64-bit mode</title>
		<link>http://www.bleevo.com/2009/08/attempting-to-load-a-64-bit-application-however-this-cpu-is-not-compatible-with-64-bit-mode/</link>
		<comments>http://www.bleevo.com/2009/08/attempting-to-load-a-64-bit-application-however-this-cpu-is-not-compatible-with-64-bit-mode/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 07:50:59 +0000</pubDate>
		<dc:creator>Chris Hampson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[vmware esx]]></category>

		<guid isPermaLink="false">http://www.bleevo.com/2009/08/attempting-to-load-a-64-bit-application-however-this-cpu-is-not-compatible-with-64-bit-mode/</guid>
		<description><![CDATA[If you get this error using VMWare ESX 4.0 it is because either your CPU does not meet the minimum hardware requirements for 64bit guest operating systems or you have not properly configured the host hardware. The following knowledge base article describes the settings required to be enabled in the bios for both AMD and [...]]]></description>
			<content:encoded><![CDATA[<p>If you get this error using VMWare ESX 4.0 it is because either your CPU does not meet the minimum hardware requirements for 64bit guest operating systems or you have not properly configured the host hardware.</p>
<p>The following knowledge base article describes the settings required to be enabled in the bios for both AMD and Intel CPU architectures.</p>
<p><a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&#038;cmd=displayKC&#038;externalId=1901">http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&#038;cmd=displayKC&#038;externalId=1901</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bleevo.com/2009/08/attempting-to-load-a-64-bit-application-however-this-cpu-is-not-compatible-with-64-bit-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Urlorize Extensions</title>
		<link>http://www.bleevo.com/2009/08/urlorize-extensions/</link>
		<comments>http://www.bleevo.com/2009/08/urlorize-extensions/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 12:04:58 +0000</pubDate>
		<dc:creator>Chris Hampson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.bleevo.com/?p=147</guid>
		<description><![CDATA[Urlorize converts strings to Url friendly strings. public static class UrlorizeExtensions &#123; private readonly static Regex cleaner = new Regex&#40;&#34;[^a-z0-9 ]+&#34;, RegexOptions.IgnoreCase&#41;; private readonly static Regex spaceMinimizer = new Regex&#40;&#34;[ ]+&#34;, RegexOptions.IgnoreCase&#41;; &#160; public static string Urlorize&#40;this HtmlHelper helper, string value&#41; &#123; value = cleaner.Replace&#40;value, &#34; &#34;&#41;; value = spaceMinimizer.Replace&#40;value, &#34; &#34;&#41;; value = value.Replace&#40;&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>Urlorize converts strings to Url friendly strings.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #FF0000;">class</span> UrlorizeExtensions
<span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">readonly</span> <span style="color: #0600FF;">static</span> Regex cleaner <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Regex<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;[^a-z0-9 ]+&quot;</span>, RegexOptions.<span style="color: #0000FF;">IgnoreCase</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">readonly</span> <span style="color: #0600FF;">static</span> Regex spaceMinimizer <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Regex<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;[ ]+&quot;</span>, RegexOptions.<span style="color: #0000FF;">IgnoreCase</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #FF0000;">string</span> Urlorize<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">this</span> HtmlHelper helper, <span style="color: #FF0000;">string</span> value<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        value <span style="color: #008000;">=</span> cleaner.<span style="color: #0000FF;">Replace</span><span style="color: #000000;">&#40;</span>value, <span style="color: #666666;">&quot; &quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
        value <span style="color: #008000;">=</span> spaceMinimizer.<span style="color: #0000FF;">Replace</span><span style="color: #000000;">&#40;</span>value, <span style="color: #666666;">&quot; &quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
        value <span style="color: #008000;">=</span> value.<span style="color: #0000FF;">Replace</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot; &quot;</span>, <span style="color: #666666;">&quot;-&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #0600FF;">return</span> value.<span style="color: #0000FF;">ToLower</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p><strong>Usage:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&lt;%=</span>Html.<span style="color: #0000FF;">Urlorize</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;test test test&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">%&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bleevo.com/2009/08/urlorize-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NHiberante Error Invalid index 1 for this SqlParameterCollection with Count 1</title>
		<link>http://www.bleevo.com/2009/08/nhiberante-error-invalid-index-1-for-this-sqlparametercollection-with-count-1/</link>
		<comments>http://www.bleevo.com/2009/08/nhiberante-error-invalid-index-1-for-this-sqlparametercollection-with-count-1/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 04:52:11 +0000</pubDate>
		<dc:creator>Chris Hampson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[nhibernate]]></category>

		<guid isPermaLink="false">http://www.bleevo.com/2009/08/nhiberante-error-invalid-index-1-for-this-sqlparametercollection-with-count1/</guid>
		<description><![CDATA[Invalid index 1 for this SqlParameterCollection with Count=1 If you ever get this error it could be because your property mappings are mapped to the same column. &#60;property name=&#34;FirstName&#34; column=&#34;FirstName&#34; type=&#34;string&#34; not-null=&#34;true&#34; /&#62; &#60;property name=&#34;LastName&#34; column=&#34;FirstName&#34; type=&#34;string&#34; not-null=&#34;true&#34; /&#62; This will cause this error, the fix is to map your properties correctly. &#60;property name=&#34;FirstName&#34; column=&#34;FirstName&#34; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Invalid index 1 for this SqlParameterCollection with Count=1</strong></p>
<p>If you ever get this error it could be because your property mappings are mapped to the same column.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;FirstName&quot;</span> <span style="color: #000066;">column</span>=<span style="color: #ff0000;">&quot;FirstName&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="color: #000066;">not-null</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;LastName&quot;</span> <span style="color: #000066;">column</span>=<span style="color: #ff0000;">&quot;FirstName&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="color: #000066;">not-null</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p>This will cause this error, the fix is to map your properties correctly.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;FirstName&quot;</span> <span style="color: #000066;">column</span>=<span style="color: #ff0000;">&quot;FirstName&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="color: #000066;">not-null</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;LastName&quot;</span> <span style="color: #000066;">column</span>=<span style="color: #ff0000;">&quot;LastName&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="color: #000066;">not-null</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bleevo.com/2009/08/nhiberante-error-invalid-index-1-for-this-sqlparametercollection-with-count-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>System.Linq.Enumerable.Any &#8211; Better Know an Extension Method Part 3</title>
		<link>http://www.bleevo.com/2009/02/system-linq-enumerable-any-better-know-an-extension-method-part-3/</link>
		<comments>http://www.bleevo.com/2009/02/system-linq-enumerable-any-better-know-an-extension-method-part-3/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 23:00:50 +0000</pubDate>
		<dc:creator>Chris Hampson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.bleevo.com/?p=106</guid>
		<description><![CDATA[During this series I will be investigating the purpose and uses of the Extension methods made available in the System.Linq namespace specifically for classes that implement IEnumerable. If you have any gems you have created for the extension in question drop a comment below as I would love to see what people are coming up [...]]]></description>
			<content:encoded><![CDATA[<p>During this series I will be investigating the purpose and uses of the Extension methods made available in the System.Linq namespace specifically for classes that implement IEnumerable. If you have any gems you have created for the extension in question drop a comment below as I would love to see what people are coming up with. In Part 3 I will be exploring the very simple Any extension method described in the MSDN documentation as follows.</p>
<blockquote><p><em>&#8220;Determines whether a sequence contains any elements.&#8221;</em> &#8211; <a href="http://msdn.microsoft.com/en-us/library/bb337697.aspx">MSDN</a></p></blockquote>
<p>When I first started looking at Any it seemed really strange at first, the first override just returns true if the Enumeration is greater than 0 which quite frankly is bizarre since its a direct copy of <strong>Count</strong>. It would just prove a neater way to write Linq expressions rather than the alternative using Count.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">&nbsp;
var orders <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> List<span style="color: #008000;">&lt;</span>Order<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
     <span style="color: #008000;">new</span> Order<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>Total <span style="color: #008000;">=</span> <span style="color: #FF0000;">123.23</span><span style="color: #000000;">&#125;</span>,
     <span style="color: #008000;">new</span> Order<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>Total <span style="color: #008000;">=</span> <span style="color: #FF0000;">512</span><span style="color: #000000;">&#125;</span>,
     <span style="color: #008000;">new</span> Order<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>Total <span style="color: #008000;">=</span> <span style="color: #FF0000;">123.23</span><span style="color: #000000;">&#125;</span>,
     <span style="color: #008000;">new</span> Order<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>Total <span style="color: #008000;">=</span> <span style="color: #FF0000;">5172.34</span><span style="color: #000000;">&#125;</span>,
     <span style="color: #008000;">new</span> Order<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>Total <span style="color: #008000;">=</span> <span style="color: #FF0000;">647.518</span><span style="color: #000000;">&#125;</span>,
     <span style="color: #008000;">new</span> Order<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>Total <span style="color: #008000;">=</span> <span style="color: #FF0000;">368.180</span><span style="color: #000000;">&#125;</span>,
     <span style="color: #008000;">new</span> Order<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>Total <span style="color: #008000;">=</span> <span style="color: #FF0000;">12.84</span><span style="color: #000000;">&#125;</span>,
     <span style="color: #008000;">new</span> Order<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>Total <span style="color: #008000;">=</span> <span style="color: #FF0000;">947.25</span><span style="color: #000000;">&#125;</span>,
<span style="color: #000000;">&#125;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>orders.<span style="color: #0000FF;">Any</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #008080; font-style: italic;">//do something</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>orders.<span style="color: #0000FF;">Count</span> <span style="color: #008000;">&gt;</span> <span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #008080; font-style: italic;">//do something</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Both achieve the very same thing the second override is really useful it allows you to test all the items in the Enumeration for at least one match condition.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">&nbsp;
<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>orders.<span style="color: #0000FF;">Any</span><span style="color: #000000;">&#40;</span>order <span style="color: #008000;">=&gt;</span> order.<span style="color: #0000FF;">Total</span> <span style="color: #008000;">&gt;</span> <span style="color: #FF0000;">900</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #008080; font-style: italic;">//do something</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>I am really struggling to come up with a good real world example of how/when to use Any so I wont at this time. But if you find yourself writing this code below, dont!</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #FF0000;">bool</span> result <span style="color: #008000;">=</span> false<span style="color: #008000;">;</span>
<span style="color: #0600FF;">foreach</span><span style="color: #000000;">&#40;</span>var order <span style="color: #0600FF;">in</span> orders<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>order.<span style="color: #0000FF;">Total</span> <span style="color: #008000;">&gt;</span> <span style="color: #FF0000;">900</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span> 
        result <span style="color: #008000;">=</span> true<span style="color: #008000;">;</span>
        break<span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>result<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #008080; font-style: italic;">//do something</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bleevo.com/2009/02/system-linq-enumerable-any-better-know-an-extension-method-part-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Robot Overlords</title>
		<link>http://www.bleevo.com/2009/02/robot-overlords/</link>
		<comments>http://www.bleevo.com/2009/02/robot-overlords/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 01:49:55 +0000</pubDate>
		<dc:creator>Chris Hampson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.bleevo.com/?p=117</guid>
		<description><![CDATA[Reminds me of this painting in a spooky way. I for one welcome my new Robot overlords.]]></description>
			<content:encoded><![CDATA[<div class="wp-caption aligncenter" style="width: 969px"><a href="http://blogs.wsj.com/photojournal/2009/02/17/pictures-of-the-day-115/"><img src="http://s.wsj.net/media/0217pod04.jpg" alt="http://blogs.wsj.com/photojournal/2009/02/17/pictures-of-the-day-115/" width="959" height="594" /></a><p class="wp-caption-text">http://blogs.wsj.com/photojournal/2009/02/17/pictures-of-the-day-115/</p></div>
<p>Reminds me of this painting in a spooky way. I for one welcome my new Robot overlords.</p>
<div class="wp-caption aligncenter" style="width: 760px"><a href="http://upload.wikimedia.org/wikipedia/commons/7/73/God2-Sistine_Chapel.png"><img src="http://upload.wikimedia.org/wikipedia/commons/7/73/God2-Sistine_Chapel.png" alt="http://upload.wikimedia.org/wikipedia/commons/7/73/God2-Sistine_Chapel.png" width="750" height="385" /></a><p class="wp-caption-text">http://upload.wikimedia.org/wikipedia/commons/7/73/God2-Sistine_Chapel.png</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.bleevo.com/2009/02/robot-overlords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
