<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Of Code and Me</title>
	<atom:link href="http://eliasbland.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://eliasbland.wordpress.com</link>
	<description>Somewhere to write down all the stuff I&#039;m going to forget and then need</description>
	<lastBuildDate>Thu, 10 Dec 2009 20:55:51 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='eliasbland.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/97879de2d18dcf83cea427a404badd05?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Of Code and Me</title>
		<link>http://eliasbland.wordpress.com</link>
	</image>
			<item>
		<title>Search Webservice for SharePoint / Search Server with configurable timeout</title>
		<link>http://eliasbland.wordpress.com/2009/12/10/search-webservice-for-sharepoint-search-server-with-configurable-timeout/</link>
		<comments>http://eliasbland.wordpress.com/2009/12/10/search-webservice-for-sharepoint-search-server-with-configurable-timeout/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 17:11:44 +0000</pubDate>
		<dc:creator>Rupert Bates</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Search Server]]></category>

		<guid isPermaLink="false">http://eliasbland.wordpress.com/?p=195</guid>
		<description><![CDATA[Anyone who has used Microsoft Search Server or the search.asmx Query service in Sharepoint to search a site of any size has probably run into the System.ServiceProcess.TimeoutException error. This is caused by the search failing to complete within 10 seconds at which point sharepoint throws this exception. Anyone who has then Googled this error will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=195&subd=eliasbland&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Anyone who has used Microsoft Search Server or the search.asmx Query service in Sharepoint to search a site of any size has probably run into the System.ServiceProcess.TimeoutException error. This is caused by the search failing to complete within 10 seconds at which point sharepoint throws this exception. Anyone who has then Googled this error will probably have found out that this 10 second limit is (amazingly) hard coded into the QueryService class and so cannot be extended. The only suggestion I have seen for getting round this is to write your own webservice which uses the same classes as QueryService to perform a search and so that is what I have done.</p>
<p><strong>To make use of this code:</strong><br />
1. <a href="http://cid-ffb74301d14a900b.skydrive.live.com/self.aspx/.Public/Guardian.SearchServer.zip">Download</a> and unzip the files</p>
<p>2. Copy:</p>
<p><em>SearchWithTimeout.asmx<br />
SearchWithTimeoutWsdl.aspx<br />
SearchWithTimeoutDisco.aspx</em></p>
<p><em>To: c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI</em></p>
<p>3. Install <em>Guardian.SearchServer.dll</em> into the GAC. The easiest way to do this is to copy the dll to <em>C:\Windows\Assembly</em></p>
<p>In the assembly in which you reference the webservice you need to change the Config setting in System.ServiceModel\bindings\basicHttpBinding\binding<br />
to set the mode to &#8220;TransportCredentialOnly&#8221; and the Transport clientCredentialType to &#8220;Windows&#8221; or &#8220;NTLM&#8221; (this is the same as with the original Search Server webservice, <a href="http://msdn.microsoft.com/en-us/library/ms729700.aspx">more info here</a>). This should look as follows:</p>
<pre class="brush: xml;">
  &lt;system.serviceModel&gt;
    &lt;bindings&gt;
      &lt;basicHttpBinding&gt;
        &lt;binding name=&quot;SearchWithTimeoutSoap&quot; closeTimeout=&quot;00:01:00&quot;
          openTimeout=&quot;00:01:00&quot; receiveTimeout=&quot;00:10:00&quot; sendTimeout=&quot;00:01:00&quot;
          allowCookies=&quot;false&quot; bypassProxyOnLocal=&quot;false&quot; hostNameComparisonMode=&quot;StrongWildcard&quot;
          maxBufferSize=&quot;65536&quot; maxBufferPoolSize=&quot;524288&quot; maxReceivedMessageSize=&quot;65536&quot;
          messageEncoding=&quot;Text&quot; textEncoding=&quot;utf-8&quot; transferMode=&quot;Buffered&quot;
          useDefaultWebProxy=&quot;true&quot;&gt;
          &lt;readerQuotas maxDepth=&quot;32&quot; maxStringContentLength=&quot;8192&quot; maxArrayLength=&quot;16384&quot;
            maxBytesPerRead=&quot;4096&quot; maxNameTableCharCount=&quot;16384&quot; /&gt;
          &lt;security mode=&quot;TransportCredentialOnly&quot;&gt;
            &lt;transport clientCredentialType=&quot;Windows&quot; proxyCredentialType=&quot;None&quot;
              realm=&quot;&quot; /&gt;
            &lt;message clientCredentialType=&quot;UserName&quot; algorithmSuite=&quot;Default&quot; /&gt;
          &lt;/security&gt;
        &lt;/binding&gt;
      &lt;/basicHttpBinding&gt;
    &lt;/bindings&gt;
</pre>
<p>You can then call this webservice with the same queryXml you would pass in to the Search Server webservice as well as the timeout in milliseconds</p>
<pre class="brush: csharp;">
var searchServiceQuery = new SearchServer.SearchWithTimeoutSoapClient();

            searchServiceQuery.ClientCredentials.Windows.ClientCredential.Domain = ConfigurationManager.AppSettings[&quot;SearchServer.Domain&quot;];
            searchServiceQuery.ClientCredentials.Windows.ClientCredential.UserName = ConfigurationManager.AppSettings[&quot;SearchServer.Username&quot;];
            searchServiceQuery.ClientCredentials.Windows.ClientCredential.Password = ConfigurationManager.AppSettings[&quot;SearchServer.Password&quot;];
            searchServiceQuery.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
            searchServiceQuery.ClientCredentials.Windows.AllowNtlm = true;

            //Verify that the Search Server is up and running
            if (string.Compare(searchServiceQuery.Status(), &quot;ONLINE&quot;, true) != 0)
                throw new Exception(&quot;The Search Server isn't online.&quot;);

            var timeout = int.Parse(ConfigurationManager.AppSettings[&quot;SearchServer.TimeoutInMilliseconds&quot;]);
            var searchResults = searchServiceQuery.QueryEx(query, timeout);

            searchServiceQuery.Close();
</pre>
<p><strong>Notes</strong><br />
My webservice only has a subset of the methods that can be found on search.asmx/QueryService, this is because the missing methods used classes which were internal to Microsoft.Office.Server.Search.dll so I couldn&#8217;t reproduce their functionality. If you need the other methods then reference both webservices.<br />
The methods I have reproduced are:</p>
<ul>
<li>QueryEx</li>
<li>Query</li>
<li>Status</li>
<li>GetSearchMetadata</li>
</ul>
<p>I have only tested Status and QueryEx, so I would be keen to hear from anyone on whether the other methods work as expected.<br />
I have also had to make the following changes (all of them because the original code used internal classes):</p>
<ol>
<li>removed some logging code that was in the original webservice</li>
<li>changed an exception type</li>
<li>exceptions do not load messages from the resource file</li>
</ol>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eliasbland.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eliasbland.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eliasbland.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eliasbland.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eliasbland.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eliasbland.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eliasbland.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eliasbland.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eliasbland.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eliasbland.wordpress.com/195/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=195&subd=eliasbland&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eliasbland.wordpress.com/2009/12/10/search-webservice-for-sharepoint-search-server-with-configurable-timeout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cc7ffd9d99152f554e9779bb745d6c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rupert Bates</media:title>
		</media:content>
	</item>
		<item>
		<title>Find the level of index fragmentation in a Sql Server database</title>
		<link>http://eliasbland.wordpress.com/2009/12/04/find-the-level-of-index-fragmentation-in-a-sql-server-database/</link>
		<comments>http://eliasbland.wordpress.com/2009/12/04/find-the-level-of-index-fragmentation-in-a-sql-server-database/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 11:48:15 +0000</pubDate>
		<dc:creator>Rupert Bates</dc:creator>
				<category><![CDATA[Sql Server]]></category>
		<category><![CDATA[Systems Administration]]></category>

		<guid isPermaLink="false">http://eliasbland.wordpress.com/?p=189</guid>
		<description><![CDATA[This will return the level of fragmentation for every index in the current database:

SELECT b.NAME, [a].*
FROM sys.dm_db_index_physical_stats (DB_ID(), NULL,
     NULL, NULL, NULL) AS a
     JOIN sys.indexes AS b ON a.object_id = b.object_id AND a.index_id = b.index_id
WHERE [a].index_id &#60;&#62; 0
ORDER BY avg_fragmentation_in_percent desc

      [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=189&subd=eliasbland&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This will return the level of fragmentation for every index in the current database:</p>
<pre class="brush: sql;">
SELECT b.NAME, [a].*
FROM sys.dm_db_index_physical_stats (DB_ID(), NULL,
     NULL, NULL, NULL) AS a
     JOIN sys.indexes AS b ON a.object_id = b.object_id AND a.index_id = b.index_id
WHERE [a].index_id &lt;&gt; 0
ORDER BY avg_fragmentation_in_percent desc
</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eliasbland.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eliasbland.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eliasbland.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eliasbland.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eliasbland.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eliasbland.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eliasbland.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eliasbland.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eliasbland.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eliasbland.wordpress.com/189/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=189&subd=eliasbland&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eliasbland.wordpress.com/2009/12/04/find-the-level-of-index-fragmentation-in-a-sql-server-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cc7ffd9d99152f554e9779bb745d6c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rupert Bates</media:title>
		</media:content>
	</item>
		<item>
		<title>Color Brewer &#8211; colour schemes for data visualisations</title>
		<link>http://eliasbland.wordpress.com/2009/12/01/color-brewer-colour-schemes-for-data-visualisations/</link>
		<comments>http://eliasbland.wordpress.com/2009/12/01/color-brewer-colour-schemes-for-data-visualisations/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 21:44:56 +0000</pubDate>
		<dc:creator>Rupert Bates</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://eliasbland.wordpress.com/2009/12/01/color-brewer-colour-schemes-for-data-visualisations/</guid>
		<description><![CDATA[Found this nice online tool to generate colour schemes for data visualisations 
http://colorbrewer2.org/
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=187&subd=eliasbland&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Found this nice online tool to generate colour schemes for data visualisations </p>
<p>http://colorbrewer2.org/</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eliasbland.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eliasbland.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eliasbland.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eliasbland.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eliasbland.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eliasbland.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eliasbland.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eliasbland.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eliasbland.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eliasbland.wordpress.com/187/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=187&subd=eliasbland&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eliasbland.wordpress.com/2009/12/01/color-brewer-colour-schemes-for-data-visualisations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cc7ffd9d99152f554e9779bb745d6c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rupert Bates</media:title>
		</media:content>
	</item>
		<item>
		<title>Making IEnumerable Default Comparer work with your own types</title>
		<link>http://eliasbland.wordpress.com/2009/11/26/making-ienumerable-default-comparer-work-with-your-own-types/</link>
		<comments>http://eliasbland.wordpress.com/2009/11/26/making-ienumerable-default-comparer-work-with-your-own-types/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 11:22:24 +0000</pubDate>
		<dc:creator>Rupert Bates</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>

		<guid isPermaLink="false">http://eliasbland.wordpress.com/?p=180</guid>
		<description><![CDATA[As part of the Open Platform client library I have created a type for the tags that are returned by the api:

	//Attributes omitted for brevity
	public class Tag
	{
		public string Name { get; set; }
		public string Type { get; set; }
		public string Filter { get; set; }
		public string ApiUrl { get; set; }
		public string WebUrl { get; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=180&subd=eliasbland&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As part of the Open Platform client library I have created a type for the tags that are returned by the api:</p>
<pre class="brush: csharp;">
	//Attributes omitted for brevity
	public class Tag
	{
		public string Name { get; set; }
		public string Type { get; set; }
		public string Filter { get; set; }
		public string ApiUrl { get; set; }
		public string WebUrl { get; set; }
	}
</pre>
<p>The Filter property acts like a primary key so if two Tag objects have the same Filter then they should be considered equal.<br />
This test describes the behaviour I want:</p>
<pre class="brush: csharp;">
		[Test]
		public void Test_tag_equality()
		{
			Tag t1 = new Tag { Filter = &quot;/Rupert&quot; };
			Tag t2 = new Tag { Filter = &quot;/Rupert&quot; };
			Tag t3 = new Tag { Filter = &quot;/Harry&quot; };
			Tag t4 = t3;
			Assert.AreEqual(t1, t2);
			Assert.AreNotEqual(t1, t3);
			Assert.AreNotSame(t1, t2);
			Assert.AreSame(t3, t4);
		}
</pre>
<p>So I overrode Equals </p>
<pre class="brush: csharp;">
        public override bool Equals(object obj)
        {
            return Filter == ((Tag) obj).Filter;
        }
</pre>
<p>and my test passed.<br />
However later on I wanted to use IEnumerable.Intersection() to find all the elements from one list that were also in another list as follows:</p>
<pre class="brush: csharp;">
//Get the tags which match with music types
            var musicTypes = new[]
			{
				new Tag{Filter=&quot;/music/popandrock&quot;},
                new Tag{Filter=&quot;/music/classicalmusicandopera&quot;},
                new Tag{Filter=&quot;/music/electronicmusic&quot;},
                new Tag{Filter=&quot;/music/urban&quot;},
                new Tag{Filter=&quot;/music/folk&quot;},
                new Tag{Filter=&quot;/music/worldmusic&quot;}
            };

            //filter the results to get the ones which are tagged with the musicType tags
            var filtered = results.Results.Where(c =&gt; c.TaggedWith.Intersect(musicTypes).Count() &gt; 0);
</pre>
<p>but my intersection always returned 0 matches, in other words the way that Intersect() was comparing the equality of the elements of my IEnumerable was not using my Equals() override (or not exclusively anyway). There is an overload for this function that takes a custom EqualityComparer, but I didn&#8217;t want to use that.<br />
I investigated a bit more and found that IEnumerable uses the IEquatable interface to determine whether elements are equal so I implemented this and thought that would be that:</p>
<pre class="brush: csharp;">
	public class Tag : IEquatable&lt;Tag&gt;
	{
		...

		#region IEquatable&lt;Tag&gt; Members

		public bool Equals(Tag other)
		{
			return Filter == other.Filter;
		}

		#endregion
	}
</pre>
<p>but my intersection still failed to return any results.<br />
After quite a bit of head scratching I tried implementing GetHashCode() as well and finally it worked</p>
<pre class="brush: csharp;">
	//The final implementation
	public class Tag : IEquatable&lt;Tag&gt;
	{
		...

		public override bool Equals(object obj)
		{
			return Filter == ((Tag)obj).Filter;
		}
		public override int GetHashCode()
		{
			return Filter.GetHashCode();
		}
		#region IEquatable&lt;Tag&gt; Members

		public bool Equals(Tag other)
		{
			return Filter == other.Filter;
		}
		#endregion
	}
</pre>
<p>Stepping through the code with the debugger it seems that all of these methods are called. It actually works correctly without the IEquatable implementation, but I have left it in for completeness.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eliasbland.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eliasbland.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eliasbland.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eliasbland.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eliasbland.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eliasbland.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eliasbland.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eliasbland.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eliasbland.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eliasbland.wordpress.com/180/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=180&subd=eliasbland&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eliasbland.wordpress.com/2009/11/26/making-ienumerable-default-comparer-work-with-your-own-types/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cc7ffd9d99152f554e9779bb745d6c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rupert Bates</media:title>
		</media:content>
	</item>
		<item>
		<title>New .Net Client Library for Guardian Open Platform</title>
		<link>http://eliasbland.wordpress.com/2009/11/26/new-net-client-library-for-guardian-open-platform/</link>
		<comments>http://eliasbland.wordpress.com/2009/11/26/new-net-client-library-for-guardian-open-platform/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 10:30:04 +0000</pubDate>
		<dc:creator>Rupert Bates</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[guardian.co.uk]]></category>

		<guid isPermaLink="false">http://eliasbland.wordpress.com/?p=178</guid>
		<description><![CDATA[I&#8217;ve recently created a .Net client library for the Guardian&#8217;s Open Platform API which allows you to query guardian.co.uk, pull back content and &#8216;Build applications with the Guardian&#8217;.
The project is open source and hosted on codeplex.
You can find out more about the Open Platform API here:
http://www.guardian.co.uk/open-platform
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=178&subd=eliasbland&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve recently created a .Net client library for the Guardian&#8217;s Open Platform API which allows you to query guardian.co.uk, pull back content and &#8216;Build applications with the Guardian&#8217;.</p>
<p><a title="Guardian Open Platform on Codeplex" href="http://guardianopenplatform.codeplex.com/">The project</a> is open source and hosted on codeplex.</p>
<p>You can find out more about the Open Platform API here:</p>
<p><a title="Guardian Open Platform Home Page" href="http://www.guardian.co.uk/open-platform">http://www.guardian.co.uk/open-platform</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eliasbland.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eliasbland.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eliasbland.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eliasbland.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eliasbland.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eliasbland.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eliasbland.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eliasbland.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eliasbland.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eliasbland.wordpress.com/178/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=178&subd=eliasbland&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eliasbland.wordpress.com/2009/11/26/new-net-client-library-for-guardian-open-platform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cc7ffd9d99152f554e9779bb745d6c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rupert Bates</media:title>
		</media:content>
	</item>
		<item>
		<title>Use CacheProfile attribute with output caching in asp.net mvc</title>
		<link>http://eliasbland.wordpress.com/2009/11/22/use-cacheprofile-attribute-with-output-caching-in-asp-net-mvc/</link>
		<comments>http://eliasbland.wordpress.com/2009/11/22/use-cacheprofile-attribute-with-output-caching-in-asp-net-mvc/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 21:21:15 +0000</pubDate>
		<dc:creator>Rupert Bates</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://eliasbland.wordpress.com/?p=170</guid>
		<description><![CDATA[I&#8217;ve recently been setting up some caching on a new Asp.Net MVC site by using the OutputCache attribute on my controllers:


//cache this for an hour
 [OutputCache(Duration=60 * 60, VaryByParam=&#34;&#34;)]

This works really well except that it means hard codeding the cache time into my app so if I want to change it I need to recompile [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=170&subd=eliasbland&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve recently been setting up some caching on a new Asp.Net MVC site by using the OutputCache attribute on my controllers:</p>
<pre class="brush: csharp;">

//cache this for an hour
 [OutputCache(Duration=60 * 60, VaryByParam=&quot;&quot;)]
</pre>
<p>This works really well except that it means hard codeding the cache time into my app so if I want to change it I need to recompile and deploy my code which is obviously far from ideal. So I changed my code to load the value from the web.config and ran into this error:</p>
<p>&#8216;An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type&#8217;</p>
<p>Not very helpful.</p>
<p>But fortunately there is a better way of doing all this using cache profiles, I just set up a cache profile in my web.config:</p>
<pre class="brush: xml;">

&lt;system.web&gt;
&lt;caching&gt;
&lt;outputCacheSettings&gt;
&lt;outputCacheProfiles&gt;
&lt;add name=&quot;HomePage&quot; duration=&quot;3600&quot; varyByParam=&quot;None&quot; location=&quot;ServerAndClient&quot;/&gt;
&lt;/outputCacheProfiles&gt;
&lt;/outputCacheSettings&gt;

&lt;/caching&gt;

&lt;/system.web&gt;
</pre>
<p>And then reference this in my attribute:</p>
<pre class="brush: csharp;">
 [OutputCache( CacheProfile=&quot;HomePage&quot;)]
</pre>
<p>And bingo, we&#8217;re sucking diesel as a friend of mine says!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eliasbland.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eliasbland.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eliasbland.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eliasbland.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eliasbland.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eliasbland.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eliasbland.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eliasbland.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eliasbland.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eliasbland.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=170&subd=eliasbland&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eliasbland.wordpress.com/2009/11/22/use-cacheprofile-attribute-with-output-caching-in-asp-net-mvc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cc7ffd9d99152f554e9779bb745d6c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rupert Bates</media:title>
		</media:content>
	</item>
		<item>
		<title>Create an Asp.Net MVC HtmlHelper for use in unit tests</title>
		<link>http://eliasbland.wordpress.com/2009/11/17/create-an-asp-mvc-htmlhelper-for-use-in-unit-tests/</link>
		<comments>http://eliasbland.wordpress.com/2009/11/17/create-an-asp-mvc-htmlhelper-for-use-in-unit-tests/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 17:47:38 +0000</pubDate>
		<dc:creator>Rupert Bates</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://eliasbland.wordpress.com/?p=167</guid>
		<description><![CDATA[Here&#8217;s a utility factory class to create an HtmlHelper instance so that you can unit test extension methods written on it. It will take a controller and a model for methods which rely on those. I adapted it from this post, and changed it to work with Asp.Net version 1.0 and to accept a model.


class [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=167&subd=eliasbland&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Here&#8217;s a utility factory class to create an HtmlHelper instance so that you can unit test extension methods written on it. It will take a controller and a model for methods which rely on those. I adapted it from <a title="link to original post" href="http://forums.asp.net/t/1355902.aspx" target="_blank">this post</a>, and changed it to work with Asp.Net version 1.0 and to accept a model.</p>
<pre class="brush: csharp;">

class HtmlHelperFactory
 {
 public static HtmlHelper CreateInstance(RouteData route, Controller controller)
 {
 return CreateInstance(route, controller, null);
 }
 public static HtmlHelper CreateInstance(RouteData route, Controller controller, object model)
 {
 HttpContextBase httpContext = new HttpContextDummy();

 var cc = new ControllerContext(httpContext, route, controller);
 var vd = new ViewDataDictionary(model);
 ViewContext vc = new ViewContext(cc, new ViewDummy(), vd, new TempDataDictionary());
 return new HtmlHelper(vc, new ViewDataContainerDummy(vd), new RouteCollection());
 }

 // Dummy classes needed to be able to create HtmlHelper

 private class HttpRequestDummy : HttpRequestBase
 {
 public override string ApplicationPath
 {
 get { return &quot;&quot;; }
 }

 public override string AppRelativeCurrentExecutionFilePath
 {
 // Any shorter string here gives exception:
 // index larger than length of string
 get { return &quot;~/&quot;; }
 }

 public override string PathInfo
 {
 get { return &quot;&quot;; }
 }
 }

 private class HttpResponseDummy : HttpResponseBase
 {
 public override string ApplyAppPathModifier(string virtualPath)
 {
 return virtualPath;
 }
 }

 private class HttpContextDummy : HttpContextBase
 {
 public override HttpRequestBase Request
 {
 get { return new HttpRequestDummy(); }
 }

 public override HttpResponseBase Response
 {
 get { return new HttpResponseDummy(); }
 }
 }

 private class ViewDummy : IView
 {
 public void Render(ViewContext viewContext, System.IO.TextWriter writer)
 {
 throw new NotImplementedException();
 }
 }

 private class ViewDataContainerDummy : IViewDataContainer
 {
 public ViewDataContainerDummy()
 {
 }

 public ViewDataContainerDummy(ViewDataDictionary dataDictionary)
 {
 _data = dataDictionary;
 }

 private ViewDataDictionary _data;
 public ViewDataDictionary ViewData
 {
 get { return _data; }
 set { _data = value; }
 }
 }
 }
</pre>
<p>&nbsp;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eliasbland.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eliasbland.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eliasbland.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eliasbland.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eliasbland.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eliasbland.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eliasbland.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eliasbland.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eliasbland.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eliasbland.wordpress.com/167/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=167&subd=eliasbland&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eliasbland.wordpress.com/2009/11/17/create-an-asp-mvc-htmlhelper-for-use-in-unit-tests/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cc7ffd9d99152f554e9779bb745d6c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rupert Bates</media:title>
		</media:content>
	</item>
		<item>
		<title>Euclidean Distance and Similarity in C#</title>
		<link>http://eliasbland.wordpress.com/2009/10/22/euclidean-distance-and-similarity-in-c/</link>
		<comments>http://eliasbland.wordpress.com/2009/10/22/euclidean-distance-and-similarity-in-c/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 16:46:57 +0000</pubDate>
		<dc:creator>Rupert Bates</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://eliasbland.wordpress.com/?p=162</guid>
		<description><![CDATA[Here are a couple of functions to calculate Euclidean distance between 2 points and similarity based on that distance. These are useful in the sort of algorithms described in the excellent book Programming Collective Intelligence

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace Algorithms
{
 public class Distance
 {
 /// &#60;summary&#62;
 /// Return the distance between 2 points
 /// [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=162&subd=eliasbland&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Here are a couple of functions to calculate Euclidean distance between 2 points and similarity based on that distance. These are useful in the sort of algorithms described in the excellent book <a href="http://www.amazon.co.uk/Programming-Collective-Intelligence-Building-Applications/dp/0596529325/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1256230164&amp;sr=8-1" target="_blank">Programming Collective Intelligence</a></p>
<pre class="brush: csharp;">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace Algorithms
{
 public class Distance
 {
 /// &lt;summary&gt;
 /// Return the distance between 2 points
 /// &lt;/summary&gt;
 public static double Euclidean(Point p1, Point p2)
 {
 return Math.Sqrt(Math.Pow(p1.X - p2.X, 2) + Math.Pow(p1.Y - p2.Y, 2));
 }

 /// &lt;summary&gt;
 /// Calculates the similarity between 2 points using Euclidean distance.
 /// Returns a value between 0 and 1 where 1 means they are identical
 /// &lt;/summary&gt;
 public static double EuclideanSimilarity(Point p1, Point p2)
 {
 return 1/(1 + Euclidean(p1, p2));
 }
 }
}</pre>
<p>And some tests:</p>
<pre class="brush: csharp;">
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Algorithms.Test
{
 [TestClass]
 public class TestDistance
 {
 [TestMethod]
 public void Test_Euclidean()
 {
 var p1 = new Point(5, 4);
 var p2 = new Point(4, 1);

 Assert.AreEqual(3.1622776601683795, Distance.Euclidean(p1, p2));

 }
 [TestMethod]
 public void Test_EuclideanSimilarity()
 {
 var p1 = new Point(5, 4);
 var p2 = new Point(4, 1);

 Assert.AreEqual(0.2402530733520421, Distance.EuclideanSimilarity(p1, p2));

 }
 }
}
</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eliasbland.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eliasbland.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eliasbland.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eliasbland.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eliasbland.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eliasbland.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eliasbland.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eliasbland.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eliasbland.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eliasbland.wordpress.com/162/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=162&subd=eliasbland&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eliasbland.wordpress.com/2009/10/22/euclidean-distance-and-similarity-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cc7ffd9d99152f554e9779bb745d6c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rupert Bates</media:title>
		</media:content>
	</item>
		<item>
		<title>Access RouteData for the current Route from a library class in asp.net mvc</title>
		<link>http://eliasbland.wordpress.com/2009/10/07/access-routedata-for-the-current-route-from-a-library-class-in-asp-mvc/</link>
		<comments>http://eliasbland.wordpress.com/2009/10/07/access-routedata-for-the-current-route-from-a-library-class-in-asp-mvc/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 13:20:25 +0000</pubDate>
		<dc:creator>Rupert Bates</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://eliasbland.wordpress.com/?p=158</guid>
		<description><![CDATA[Sometimes it&#8217;s useful to be able to access the current RouteData from outside a controller, for instance in a library class. In webforms you could always do


HttpContext.Current

but in Asp.Net MVC it&#8217;s a bit less obvious how you get access to this data.
I&#8217;ve found the following code works:


RouteTable.Routes.GetRouteData(new HttpContextWrapper(HttpContext.Current));

Whether there is an easier way or not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=158&subd=eliasbland&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Sometimes it&#8217;s useful to be able to access the current RouteData from outside a controller, for instance in a library class. In webforms you could always do</p>
<pre class="brush: csharp;">

HttpContext.Current
</pre>
<p>but in Asp.Net MVC it&#8217;s a bit less obvious how you get access to this data.</p>
<p>I&#8217;ve found the following code works:</p>
<pre class="brush: csharp;">

RouteTable.Routes.GetRouteData(new HttpContextWrapper(HttpContext.Current));
</pre>
<p>Whether there is an easier way or not I don&#8217;t know, but this will do me for now&#8230;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eliasbland.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eliasbland.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eliasbland.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eliasbland.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eliasbland.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eliasbland.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eliasbland.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eliasbland.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eliasbland.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eliasbland.wordpress.com/158/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=158&subd=eliasbland&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eliasbland.wordpress.com/2009/10/07/access-routedata-for-the-current-route-from-a-library-class-in-asp-mvc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cc7ffd9d99152f554e9779bb745d6c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rupert Bates</media:title>
		</media:content>
	</item>
		<item>
		<title>Group By with Count in Linq</title>
		<link>http://eliasbland.wordpress.com/2009/09/29/group-by-with-count-in-linq/</link>
		<comments>http://eliasbland.wordpress.com/2009/09/29/group-by-with-count-in-linq/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 20:26:07 +0000</pubDate>
		<dc:creator>Rupert Bates</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>

		<guid isPermaLink="false">http://eliasbland.wordpress.com/?p=149</guid>
		<description><![CDATA[To group a sequence getting a count for each element of the grouped sequence using Linq:

            var wordList = new List&#60;String&#62; { &#34;test&#34;, &#34;one&#34;, &#34;test&#34;, &#34;two&#34; };
            var grouped = wordList
   [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=149&subd=eliasbland&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>To group a sequence getting a count for each element of the grouped sequence using Linq:</p>
<pre class="brush: csharp;">
            var wordList = new List&lt;String&gt; { &quot;test&quot;, &quot;one&quot;, &quot;test&quot;, &quot;two&quot; };
            var grouped = wordList
                .GroupBy(i =&gt; i) //Group the words
                .Select(i =&gt; new { Word = i.Key, Count = i.Count() }); //get a count for each
</pre>
<p>Which results in this sequence:</p>
<p><img class="alignnone size-full wp-image-153" title="watch" src="http://eliasbland.files.wordpress.com/2009/09/watch1.jpg?w=752&#038;h=288" alt="watch" width="752" height="288" /></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eliasbland.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eliasbland.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eliasbland.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eliasbland.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eliasbland.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eliasbland.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eliasbland.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eliasbland.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eliasbland.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eliasbland.wordpress.com/149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eliasbland.wordpress.com&blog=1089842&post=149&subd=eliasbland&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eliasbland.wordpress.com/2009/09/29/group-by-with-count-in-linq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cc7ffd9d99152f554e9779bb745d6c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rupert Bates</media:title>
		</media:content>

		<media:content url="http://eliasbland.files.wordpress.com/2009/09/watch1.jpg" medium="image">
			<media:title type="html">watch</media:title>
		</media:content>
	</item>
	</channel>
</rss>