<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress.com" -->
<rss version="0.92">
<channel>
	<title>Of Code and Me</title>
	<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>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>Search Webservice for SharePoint / Search Server with configurable timeout</title>
		<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>
		<link>http://eliasbland.wordpress.com/2009/12/10/search-webservice-for-sharepoint-search-server-with-configurable-timeout/</link>
			</item>
	<item>
		<title>Find the level of index fragmentation in a Sql Server database</title>
		<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>
		<link>http://eliasbland.wordpress.com/2009/12/04/find-the-level-of-index-fragmentation-in-a-sql-server-database/</link>
			</item>
	<item>
		<title>Color Brewer &#8211; colour schemes for data visualisations</title>
		<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>
		<link>http://eliasbland.wordpress.com/2009/12/01/color-brewer-colour-schemes-for-data-visualisations/</link>
			</item>
	<item>
		<title>Making IEnumerable Default Comparer work with your own types</title>
		<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>
		<link>http://eliasbland.wordpress.com/2009/11/26/making-ienumerable-default-comparer-work-with-your-own-types/</link>
			</item>
	<item>
		<title>New .Net Client Library for Guardian Open Platform</title>
		<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>
		<link>http://eliasbland.wordpress.com/2009/11/26/new-net-client-library-for-guardian-open-platform/</link>
			</item>
	<item>
		<title>Use CacheProfile attribute with output caching in asp.net mvc</title>
		<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>
		<link>http://eliasbland.wordpress.com/2009/11/22/use-cacheprofile-attribute-with-output-caching-in-asp-net-mvc/</link>
			</item>
	<item>
		<title>Create an Asp.Net MVC HtmlHelper for use in unit tests</title>
		<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>
		<link>http://eliasbland.wordpress.com/2009/11/17/create-an-asp-mvc-htmlhelper-for-use-in-unit-tests/</link>
			</item>
	<item>
		<title>Euclidean Distance and Similarity in C#</title>
		<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>
		<link>http://eliasbland.wordpress.com/2009/10/22/euclidean-distance-and-similarity-in-c/</link>
			</item>
	<item>
		<title>Access RouteData for the current Route from a library class in asp.net mvc</title>
		<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>
		<link>http://eliasbland.wordpress.com/2009/10/07/access-routedata-for-the-current-route-from-a-library-class-in-asp-mvc/</link>
			</item>
	<item>
		<title>Group By with Count in Linq</title>
		<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>
		<link>http://eliasbland.wordpress.com/2009/09/29/group-by-with-count-in-linq/</link>
			</item>
</channel>
</rss>
