<feed xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
    <title>The Ninja's Blog</title>
    <link rel="self" type="application/xml" href="http://geekswithblogs.net/TheNinja/Atom.aspx" />
    <subtitle type="html">The Tao begets the one, the one begets the two......</subtitle>
    <id>http://geekswithblogs.net/TheNinja/Default.aspx</id>
    <author>
        <name>Dave "The Ninja" Lawton</name>
        <uri>http://geekswithblogs.net/TheNinja/Default.aspx</uri>
    </author>
    <generator uri="http://subtextproject.com" version="Subtext Version 0.0.0.0">Subtext</generator>
    <updated>2008-05-08T12:25:38Z</updated>
    <entry>
        <title>Updated CV</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/TheNinja/archive/2008/05/08/cv.aspx" />
        <id>http://geekswithblogs.net/TheNinja/archive/2008/05/08/cv.aspx</id>
        <published>2008-05-08T12:23:13-05:00:00</published>
        <updated>2008-05-08T12:25:38Z</updated>
        <content type="html">download: &lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/TheNinja/David_Lawton_-_CV_-_Personal_Resume_UK.pdf"&gt;Download&lt;/a&gt;&lt;img src="http://geekswithblogs.net/TheNinja/aggbug/121983.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/TheNinja/comments/121983.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/TheNinja/comments/commentRss/121983.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/TheNinja/services/trackbacks/121983.aspx</trackback:ping>
    </entry>
    <entry>
        <title>WTF - 39098 days to burn a 200mb DVD - VISTA ROCKS!</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/TheNinja/archive/2008/03/09/wtf---39098-days-to-burn-a-200mb-dvd.aspx" />
        <id>http://geekswithblogs.net/TheNinja/archive/2008/03/09/wtf---39098-days-to-burn-a-200mb-dvd.aspx</id>
        <published>2008-03-09T18:58:31-05:00:00</published>
        <updated>2008-03-09T18:58:31Z</updated>
        <content type="html">&lt;p&gt;Well, you be the judge - 39098 days to burn a dvd&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;img height="227" width="472" alt="" src="/images/geekswithblogs_net/TheNinja/WTF.jpg" /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The Ninja&lt;/p&gt;&lt;img src="http://geekswithblogs.net/TheNinja/aggbug/120402.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/TheNinja/comments/120402.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/TheNinja/comments/commentRss/120402.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/TheNinja/services/trackbacks/120402.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Calculate Distance Between Geocodes in C# and JavaScript </title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/TheNinja/archive/2008/02/05/calculate-distance-between-geocodes-in-c-and-javascript.aspx" />
        <id>http://geekswithblogs.net/TheNinja/archive/2008/02/05/calculate-distance-between-geocodes-in-c-and-javascript.aspx</id>
        <published>2008-02-05T10:43:02-06:00:00</published>
        <updated>2008-02-05T10:43:02Z</updated>
        <content type="html">Chris Peitschmann has posted an exelent blog on calculating the distance between two geocodes using javascript.&lt;br /&gt;
&lt;br /&gt;
http://pietschsoft.com/Blog/Post.aspx?PostID=1452&lt;br /&gt;
&lt;br /&gt;
The Ninija&lt;img src="http://geekswithblogs.net/TheNinja/aggbug/119297.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/TheNinja/comments/119297.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/TheNinja/comments/commentRss/119297.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/TheNinja/services/trackbacks/119297.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Programming nightmares</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/TheNinja/archive/2008/01/20/programming-nightmares.aspx" />
        <id>http://geekswithblogs.net/TheNinja/archive/2008/01/20/programming-nightmares.aspx</id>
        <published>2008-01-20T12:35:57-06:00:00</published>
        <updated>2008-01-20T12:35:57Z</updated>
        <content type="html">&lt;p&gt;Well, the un-imaginable has happened to me (or my workstation for that matter) very late on Saturday morning (about 3am).&lt;/p&gt;
&lt;p&gt;While testing a new web application, I noticed IE was playing up, so I fired up FireFox and tried again - to the same result.&lt;/p&gt;
&lt;p&gt;My computer kept lagging and crashing all browsers, then the apps started to crash until....................&lt;/p&gt;
&lt;p&gt;complete C: drive failure!&lt;/p&gt;
&lt;p&gt;I have spend the best part of 2 days now installing a new SATA drive, reconfiguring software and recovering data from the dead disk.&lt;/p&gt;
&lt;p&gt;Sometimes a I really hate computers which reminds me of a classic geek saying:&lt;/p&gt;
&lt;p&gt;"To err is human, but to really f*%k things up you need a computer"&lt;/p&gt;
&lt;p&gt;I have finally got most of my software back and running, but I now need to recover my brain as i have had nearly no sleep for 2 days and now my head feels like it is going to explode!&lt;/p&gt;
&lt;p&gt;The Ninja - near defeated in battle.&lt;/p&gt;&lt;img src="http://geekswithblogs.net/TheNinja/aggbug/118718.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/TheNinja/comments/118718.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/TheNinja/comments/commentRss/118718.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/TheNinja/services/trackbacks/118718.aspx</trackback:ping>
    </entry>
    <entry>
        <title>What music do you listen to while coding?</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/TheNinja/archive/2008/01/19/what-music-do-you-listen-to-while-coding.aspx" />
        <id>http://geekswithblogs.net/TheNinja/archive/2008/01/19/what-music-do-you-listen-to-while-coding.aspx</id>
        <published>2008-01-19T01:21:40-06:00:00</published>
        <updated>2008-01-19T01:22:26Z</updated>
        <content type="html">&lt;p&gt;I was just thinking about what drives me while coding, coffee? - no.&lt;/p&gt;
&lt;p&gt;The way/pace of my coding is determined by what music I am listening to. Today I realised that the best music IMHO is techno, and banging techno at that!&lt;/p&gt;
&lt;p&gt;Repetitive, yes, but so is coding &lt;img alt="" src="/Providers/BlogEntryEditor/FCKeditor/editor/images/smiley/msn/teeth_smile.gif" /&gt;&lt;/p&gt;
&lt;p&gt;With every key stroke theres a kick drum, and it sends me into a coding trance making me oblivious to any distractions and my good ladies ranting about "are you nearly finished?", "what time do you think you will finish?".&lt;/p&gt;
&lt;p&gt;Techno FM, &lt;a target="_blank" href="http://www.techno.fm"&gt;www.techno.fm&lt;/a&gt;, is my all time favourite radio station for my programming requirements. kind of an unwritten rule of my coding practices.&lt;/p&gt;
&lt;p&gt;To enhance the experience i recommend Sennheiser HD25 headphones, excellent for bass, djing and ignoring your Mrs &lt;img alt="" src="/Providers/BlogEntryEditor/FCKeditor/editor/images/smiley/msn/wink_smile.gif" /&gt;&lt;/p&gt;
&lt;p&gt;What is your favourite music for coding?&lt;/p&gt;
&lt;p&gt;Answers on a post card!&lt;/p&gt;
&lt;p&gt;The Ninja&lt;/p&gt;&lt;img src="http://geekswithblogs.net/TheNinja/aggbug/118688.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/TheNinja/comments/118688.aspx</wfw:comment>
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/TheNinja/comments/commentRss/118688.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/TheNinja/services/trackbacks/118688.aspx</trackback:ping>
    </entry>
    <entry>
        <title>How to calculate the distance in calculate the distance in miles between 2 latitude/longitude points. </title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/TheNinja/archive/2008/01/17/how_to_calculate_the_distance_in_calculate_the_distance_in_miles_between_2_latitude_longitude_points.aspx" />
        <id>http://geekswithblogs.net/TheNinja/archive/2008/01/17/how_to_calculate_the_distance_in_calculate_the_distance_in_miles_between_2_latitude_longitude_points.aspx</id>
        <published>2008-01-17T22:24:57-06:00:00</published>
        <updated>2008-01-17T22:30:44Z</updated>
        <summary type="html">I have just had the requirement to calculate the distance between 2 locations for a client project.

At first I was going down the route of rolling my own within the C# domain model and then I found this amazing piece of code in the form of an SQL function (sql server 2000/20005) courtesy of Troy DeMonbreun 
</summary>
        <content type="html">&lt;p&gt;I have just had the requirement to calculate the distance between 2 locations for a client project.&lt;/p&gt;
&lt;p&gt;At first I was going down the route of rolling my own within the C# domain model and then I found this amazing piece of code in the form of an SQL function (sql server 2000/20005) courtesy of Troy DeMonbreun (&lt;font face="Arial"&gt;&lt;a target="_blank" href="http://blog.troyd.net/PermaLink,guid,847b0f1f-498c-43d4-80de-d29902fbd2eb.aspx"&gt;http://blog.troyd.net/PermaLink,guid,847b0f1f-498c-43d4-80de-d29902fbd2eb.aspx&lt;/a&gt;).&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Thanks Troy, you just saved me!&lt;/p&gt;
&lt;p&gt;The Ninja&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;font face="Courier New" size="2"&gt;CREATE FUNCTION [dbo].[LatLon&lt;span class="searchword"&gt;Radius&lt;/span&gt;Distance] &lt;br /&gt;
(&lt;br /&gt;
@lat1&lt;span class="searchword"&gt;Degree&lt;/span&gt;s decimal(15,12),&lt;br /&gt;
@lon1&lt;span class="searchword"&gt;Degree&lt;/span&gt;s decimal(15,12),&lt;br /&gt;
@lat2&lt;span class="searchword"&gt;Degree&lt;/span&gt;s decimal(15,12),&lt;br /&gt;
@lon2&lt;span class="searchword"&gt;Degree&lt;/span&gt;s decimal(15,12)&lt;br /&gt;
)&lt;br /&gt;
RETURNS decimal(9,4)&lt;br /&gt;
AS&lt;br /&gt;
BEGIN&lt;br /&gt;
&lt;br /&gt;
DECLARE @earthSphere&lt;span class="searchword"&gt;Radius&lt;/span&gt;NauticalMiles as decimal(10,6)&lt;br /&gt;
DECLARE @nauticalMileConversion&lt;span class="searchword"&gt;To&lt;/span&gt;MilesFac&lt;span class="searchword"&gt;to&lt;/span&gt;r as decimal(7,6)&lt;br /&gt;
SELECT @earthSphere&lt;span class="searchword"&gt;Radius&lt;/span&gt;NauticalMiles = 6366.707019&lt;br /&gt;
SELECT @nauticalMileConversion&lt;span class="searchword"&gt;To&lt;/span&gt;MilesFac&lt;span class="searchword"&gt;to&lt;/span&gt;r = .621371&lt;br /&gt;
&lt;br /&gt;
-- convert &lt;span class="searchword"&gt;degree&lt;/span&gt;s &lt;span class="searchword"&gt;to&lt;/span&gt; radians&lt;br /&gt;
DECLARE @lat1Radians decimal(15,12)&lt;br /&gt;
DECLARE @lon1Radians decimal(15,12)&lt;br /&gt;
DECLARE @lat2Radians decimal(15,12)&lt;br /&gt;
DECLARE @lon2Radians decimal(15,12)&lt;br /&gt;
SELECT @lat1Radians = (@lat1&lt;span class="searchword"&gt;Degree&lt;/span&gt;s / 180) * PI()&lt;br /&gt;
SELECT @lon1Radians = (@lon1&lt;span class="searchword"&gt;Degree&lt;/span&gt;s / 180) * PI()&lt;br /&gt;
SELECT @lat2Radians = (@lat2&lt;span class="searchword"&gt;Degree&lt;/span&gt;s / 180) * PI()&lt;br /&gt;
SELECT @lon2Radians = (@lon2&lt;span class="searchword"&gt;Degree&lt;/span&gt;s / 180) * PI()&lt;br /&gt;
&lt;br /&gt;
-- formula for distance from [lat1,lon1] &lt;span class="searchword"&gt;to&lt;/span&gt; [lat2,lon2]&lt;br /&gt;
RETURN ROUND(2 * ASIN(SQRT(POWER(SIN((@lat1Radians - @lat2Radians) / 2) ,2)&lt;br /&gt;
        + COS(@lat1Radians) * COS(@lat2Radians) * POWER(SIN((@lon1Radians - @lon2Radians) / 2), 2)))&lt;br /&gt;
        * (@earthSphere&lt;span class="searchword"&gt;Radius&lt;/span&gt;NauticalMiles * @nauticalMileConversion&lt;span class="searchword"&gt;To&lt;/span&gt;MilesFac&lt;span class="searchword"&gt;to&lt;/span&gt;r), 4)&lt;br /&gt;
&lt;br /&gt;
END&lt;br /&gt;
&lt;/font&gt;&lt;/p&gt;&lt;img src="http://geekswithblogs.net/TheNinja/aggbug/118651.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/TheNinja/comments/118651.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/TheNinja/comments/commentRss/118651.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/TheNinja/services/trackbacks/118651.aspx</trackback:ping>
    </entry>
</feed>