<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2" -->
<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/"
	>

<channel>
	<title>The Blog of Daniel Durrans, Web Systems Developer</title>
	<link>http://www.durrans.com/blog</link>
	<description>My life, thoughts, cooking, food, mmm food.</description>
	<pubDate>Tue, 29 Jan 2008 12:07:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2</generator>
	<language>en</language>
			<item>
		<title>What if Facebook could auto-tag uploaded photos?</title>
		<link>http://www.durrans.com/blog/2008/01/29/what-if-facebook-could-auto-tag-uploaded-photos/</link>
		<comments>http://www.durrans.com/blog/2008/01/29/what-if-facebook-could-auto-tag-uploaded-photos/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 12:07:44 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[Life in code]]></category>

		<category><![CDATA[Cool stuff]]></category>

		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.durrans.com/blog/2008/01/29/what-if-facebook-could-auto-tag-uploaded-photos/</guid>
		<description><![CDATA[Facebook could become the ultimate platform for training facial recognition systems. Almost every photo uploaded to the site is of someone. The first thing that you do is to tag the people in the photo, creating a link between the photo and the related person.
But what would happen if the tagging process worked in conjunction [...]]]></description>
			<content:encoded><![CDATA[<p>Facebook could become the ultimate platform for training facial recognition systems. Almost every photo uploaded to the site is of someone. The first thing that you do is to tag the people in the photo, creating a link between the photo and the related person.</p>
<p>But what would happen if the tagging process worked in conjunction with facial recognition technology? Every time a person was tagged in an image you could help the system learn what that person looks like. Eventually the system could become &#8220;smart&#8221; enough to recognise people on its own.</p>
<p>Auto-tagging photos - it&#8217;s the way forward, and you heard it here first!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.durrans.com/blog/2008/01/29/what-if-facebook-could-auto-tag-uploaded-photos/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Check constraints that access the table you are inserting into</title>
		<link>http://www.durrans.com/blog/2008/01/18/check-constraints-that-access-the-table-you-are-inserting-into/</link>
		<comments>http://www.durrans.com/blog/2008/01/18/check-constraints-that-access-the-table-you-are-inserting-into/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 09:25:49 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[Life in code]]></category>

		<guid isPermaLink="false">http://www.durrans.com/blog/2008/01/18/check-constraints-that-access-the-table-you-are-inserting-into/</guid>
		<description><![CDATA[In SQL Server 2005 you can write a check constraint that can include a function call. For example:

ALTER TABLE [dbo].[TestTable1]
ADD CONSTRAINT [TestConstraint1]
CHECK  ([dbo].[TestFunction1]([PrimaryKeyColumn1],[Column1],[Column2]) = 0)

However if the function you are calling tests the contents of that table you must be aware that the row you are trying to insert or update will already be [...]]]></description>
			<content:encoded><![CDATA[<p>In SQL Server 2005 you can write a check constraint that can include a function call. For example:<br />
<code><br />
ALTER TABLE [dbo].[TestTable1]<br />
ADD CONSTRAINT [TestConstraint1]<br />
CHECK  ([dbo].[TestFunction1]([PrimaryKeyColumn1],[Column1],[Column2]) = 0)<br />
</code><br />
However if the function you are calling tests the contents of that table you must be aware that the row you are trying to insert or update will already be in the table. Therefore if part of the test is, for example, duplicate checking or date range checking (in the case of writing scheduling software) then you must pass into the function the primary key of the row you are inserting and add that as a where clause to your function:<br />
<code><br />
CREATE FUNCTION [dbo].[TestFunction1]<br />
(<br />
@param1 int,<br />
@param2 int,<br />
@param3 int,<br />
)<br />
RETURNS bit<br />
AS<br />
BEGIN<br />
DECLARE @ClashesFound int<br />
DECLARE @Result bit<br />
SET @ClashesFound = 0<br />
SET @Result = 0<br />
SET @ClashesFound = (<br />
SELECT COUNT(*)<br />
FROM [dbo].[TestTable1]<br />
WHERE<br />
[PrimaryKeyColumn1] &lt;&gt; @param1<br />
)<br />
IF (@ClashesFound &gt; 0)<br />
SET @Result = 1<br />
RETURN @Result<br />
END<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.durrans.com/blog/2008/01/18/check-constraints-that-access-the-table-you-are-inserting-into/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Researchers put circuits on contact lenses, freak out rabbits</title>
		<link>http://www.durrans.com/blog/2008/01/18/researchers-put-circuits-on-contact-lenses-freak-out-rabbits/</link>
		<comments>http://www.durrans.com/blog/2008/01/18/researchers-put-circuits-on-contact-lenses-freak-out-rabbits/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 07:33:35 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[Cool stuff]]></category>

		<guid isPermaLink="false">http://www.durrans.com/blog/2008/01/18/researchers-put-circuits-on-contact-lenses-freak-out-rabbits/</guid>
		<description><![CDATA[Engadget have been writing that researchers have discovered a way to embed electrical circuits including lights and logic into contact lenses. This sounds pretty cool to me and I think it would be great to have a head-up display as you walk around. It could tell you where you are, the time, how to get [...]]]></description>
			<content:encoded><![CDATA[<p>Engadget have been writing that researchers have discovered a way to <a href="http://www.engadget.com/2008/01/17/researchers-put-circuits-on-contact-lenses-freak-out-rabbits/">embed electrical circuits including lights and logic into contact lenses</a>. This sounds pretty cool to me and I think it would be great to have a head-up display as you walk around. It could tell you where you are, the time, how to get somewhere, information about the person you are talking to (good for business meetings where I can never remember a persons name)  or even allow you to watch TV.</p>
<p>I wonder if Specsavers will be selling them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.durrans.com/blog/2008/01/18/researchers-put-circuits-on-contact-lenses-freak-out-rabbits/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SQL code to test a date range against existing ranges in a table</title>
		<link>http://www.durrans.com/blog/2008/01/17/sql-code-to-test-a-date-range-against-existing-ranges-in-a-table/</link>
		<comments>http://www.durrans.com/blog/2008/01/17/sql-code-to-test-a-date-range-against-existing-ranges-in-a-table/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 16:45:29 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.durrans.com/blog/2008/01/17/sql-code-to-test-a-date-range-against-existing-ranges-in-a-table/</guid>
		<description><![CDATA[The following slice of code will search a table and return any rows where there is a clash between the date range in the row (ValidFrom and ValidTo) and the date range in the variables (@InTo and @InFrom).
Null dates are treated as either infinite past or infinite future accordingly.

WHERE
NOT (
(@InTo &#60; ValidFrom AND @InTo IS [...]]]></description>
			<content:encoded><![CDATA[<p>The following slice of code will search a table and return any rows where there is a clash between the date range in the row (ValidFrom and ValidTo) and the date range in the variables (@InTo and @InFrom).</p>
<p>Null dates are treated as either infinite past or infinite future accordingly.<br />
<code><br />
WHERE<br />
NOT (<br />
(@InTo &lt; ValidFrom AND @InTo IS NOT NULL AND ValidFrom IS NOT NULL)<br />
OR<br />
(@InFrom &gt; ValidTo AND @InFrom IS NOT NULL AND ValidTo IS NOT NULL)<br />
)<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.durrans.com/blog/2008/01/17/sql-code-to-test-a-date-range-against-existing-ranges-in-a-table/feed/</wfw:commentRss>
		</item>
		<item>
		<title>From my windowpane</title>
		<link>http://www.durrans.com/blog/2007/08/10/from-my-windowpane/</link>
		<comments>http://www.durrans.com/blog/2007/08/10/from-my-windowpane/#comments</comments>
		<pubDate>Fri, 10 Aug 2007 07:37:28 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.durrans.com/blog/2007/08/10/from-my-windowpane/</guid>
		<description><![CDATA[I woke up this morning, opened the blinds in my bedroom and was slightly surprised to find over thirty hot air balloons hovering over Bristol.

And then I remembered it was the Bristol International Balloon Fiesta this weekend  Still, nice to wake up to all those hot air balloons. More photos here:
http://gallery.durrans.com/v/events/other/hot-air-2007/
It looks best if [...]]]></description>
			<content:encoded><![CDATA[<p>I woke up this morning, opened the blinds in my bedroom and was slightly surprised to find over thirty hot air balloons hovering over Bristol.</p>
<p style="text-align: center"><img src="http://gallery.durrans.com/d/23940-2/IMG_2241.JPG" height="300" width="400" /></p>
<p>And then I remembered it was the <a href="http://www.bristolfiesta.co.uk/">Bristol International Balloon Fiesta</a> this weekend <img src='http://www.durrans.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Still, nice to wake up to all those hot air balloons. More photos here:</p>
<p><a href="http://gallery.durrans.com/v/events/other/hot-air-2007/">http://gallery.durrans.com/v/events/other/hot-air-2007/</a></p>
<p>It looks best if you look at the high rez photos.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.durrans.com/blog/2007/08/10/from-my-windowpane/feed/</wfw:commentRss>
		</item>
		<item>
		<title>When was the last time you changed a plug?</title>
		<link>http://www.durrans.com/blog/2007/08/05/when-was-the-last-time-you-changed-a-plug/</link>
		<comments>http://www.durrans.com/blog/2007/08/05/when-was-the-last-time-you-changed-a-plug/#comments</comments>
		<pubDate>Sun, 05 Aug 2007 19:44:22 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.durrans.com/blog/2007/08/05/when-was-the-last-time-you-changed-a-plug/</guid>
		<description><![CDATA[I was pondering this question earlier today while I rewired a 4-way adaptor to have a longer lead. When was the last time that I actually had to change a plug. While I was a child I changed plugs all the time. I loved to play around with electrical gadgets that I had acquired through [...]]]></description>
			<content:encoded><![CDATA[<p>I was pondering this question earlier today while I rewired a 4-way adaptor to have a longer lead. When was the last time that I actually had to change a plug. While I was a child I changed plugs all the time. I loved to play around with electrical gadgets that I had acquired through jumble sales and alike. These items often required a plug to be connected and therefore I spent quite a number of weekends messing around with screwdrivers, wire clippers and even in some cases soldering irons.</p>
<p>I remember that in school, both primary and secondary, I was taught how to change a plug. I was taught the colours of the wires inside a cable and how they related to the electrical mains supply. I understood which terminals within a plug these had to be connected to and I knew how to strip the cable to the correct lengths.</p>
<p>These days most electrical items come with a plug moulded onto the wire. It is rare that you have to change a fuse let alone rewire the plug. Before today I really can&#8217;t remember the last time that I saw the inside of a plug.  Are children even taught, what was once considered a necessary life skill, in schools?</p>
<p>So  I ask you, when did you last wire a plug? What colour is the earth wire? Does blue connect to the neutral terminal or the live terminal? Finally, is it the earth or the live terminal that has the fuse?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.durrans.com/blog/2007/08/05/when-was-the-last-time-you-changed-a-plug/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mamma Mia at Bristol Hippodrome</title>
		<link>http://www.durrans.com/blog/2007/07/19/mamma-mia-at-bristol-hippodrome/</link>
		<comments>http://www.durrans.com/blog/2007/07/19/mamma-mia-at-bristol-hippodrome/#comments</comments>
		<pubDate>Thu, 19 Jul 2007 09:54:58 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[Friends]]></category>

		<guid isPermaLink="false">http://www.durrans.com/blog/2007/07/19/mamma-mia-at-bristol-hippodrome/</guid>
		<description><![CDATA[Is anyone interested in seeing the touring production of Mamma Mia at the Bristol Hippodrome in December? I am thinking the first weekend of the month, either the Friday or the Saturday.
]]></description>
			<content:encoded><![CDATA[<p>Is anyone interested in seeing the touring production of Mamma Mia at the Bristol Hippodrome in December? I am thinking the first weekend of the month, either the Friday or the Saturday.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.durrans.com/blog/2007/07/19/mamma-mia-at-bristol-hippodrome/feed/</wfw:commentRss>
		</item>
		<item>
		<title>+1 Brother-in-law</title>
		<link>http://www.durrans.com/blog/2007/07/09/1-brother-in-law/</link>
		<comments>http://www.durrans.com/blog/2007/07/09/1-brother-in-law/#comments</comments>
		<pubDate>Mon, 09 Jul 2007 20:49:00 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[Holiday]]></category>

		<category><![CDATA[Family]]></category>

		<guid isPermaLink="false">http://www.durrans.com/blog/2007/07/09/1-brother-in-law/</guid>
		<description><![CDATA[I have aquired myself a brother-in-law. Last week my younger, and only, sister Hannah married Stuart Munn on the Greek island of Rhodes. I flew out to the island to be a guest at their wedding. It didn’t feel very holiday like was I was only there for four nights however it was a lovely [...]]]></description>
			<content:encoded><![CDATA[<p>I have aquired myself a brother-in-law. Last week my younger, and only, sister Hannah married Stuart Munn on the Greek island of Rhodes. I flew out to the island to be a guest at their wedding. It didn’t feel very holiday like was I was only there for four nights however it was a lovely ceremony and the island itself, while excessively hot at the moment, was nice.</p>
<p style="text-align: center"><a href="http://gallery.durrans.com/v/events/weddings/hannah-stuart/"><img src="http://www.durrans.com/blog/wp-content/uploads/2007/07/img_1969.JPG" alt="img_1969.JPG" class="imageframe" height="533" width="400" /></a></p>
<p>Stuart managed to leave the rings in the hotel room safe and had to run up many flights of stairs in order to rescue them. In 30’c heat. Just before the ceremony was due to start. Oh how we laughed. He returned saying “Don’t anybody tell Hannah, she will kill me”.</p>
<p>On the day before I was due to fly back to the UK my parents and I visited Rhodes town, looking around the harbour and also the old town. The Knights of St John spent over two hundred years in Rhodes and built a large castle, called the Grand Master’s Palace, next to the harbour. This building, and in fact the entire walls of the old town, were very impressive and you could imagine soldiers having sword fights on the <a href="http://gallery.durrans.com/v/holidays/rhodes-2007/IMG_1989.JPG.html">huge marble covered staircase</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.durrans.com/blog/2007/07/09/1-brother-in-law/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Real life Banksy</title>
		<link>http://www.durrans.com/blog/2007/07/05/real-life-banksy/</link>
		<comments>http://www.durrans.com/blog/2007/07/05/real-life-banksy/#comments</comments>
		<pubDate>Thu, 05 Jul 2007 10:51:45 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[Holiday]]></category>

		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.durrans.com/blog/2007/07/05/real-life-banksy/</guid>
		<description><![CDATA[I have just got back from a short holiday on the Greek island of Rhodes. More on that later but for now I thought I would share this photo that I took while in the Valley of the Butterflies. It reminded me of the Banksy painting shown on the right.
 
]]></description>
			<content:encoded><![CDATA[<p>I have just got back from a short holiday on the Greek island of Rhodes. More on that later but for now I thought I would share this photo that I took while in the <em>Valley of the Butterflies</em>. It reminded me of the Banksy painting shown on the right.</p>
<p style="text-align: center;"><a href="http://www.durrans.com/blog/wp-content/uploads/2007/07/img_1947.JPG" title="img_1947.JPG"><img src="http://www.durrans.com/blog/wp-content/uploads/2007/07/img_1947.thumbnail.JPG" alt="img_1947.JPG" class="imageframe" height="225" width="300" /></a> <a href="http://www.durrans.com/blog/wp-content/uploads/2007/07/cctv.jpg" title="cctv.jpg"><img src="http://www.durrans.com/blog/wp-content/uploads/2007/07/cctv.thumbnail.jpg" alt="cctv.jpg" class="imageframe" height="225" width="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.durrans.com/blog/2007/07/05/real-life-banksy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wrong side of the tracks</title>
		<link>http://www.durrans.com/blog/2007/06/27/wrong-side-of-the-tracks/</link>
		<comments>http://www.durrans.com/blog/2007/06/27/wrong-side-of-the-tracks/#comments</comments>
		<pubDate>Wed, 27 Jun 2007 20:36:47 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.durrans.com/blog/2007/06/27/wrong-side-of-the-tracks/</guid>
		<description><![CDATA[What is loud, fast, very hard, and makes this happen to cars:



A train going over a level crossing when the car shouldn&#8217;t have been there. Don&#8217;t play on the railways kids!
This car was left in the car park at work by Network Rail. It was recently used as part of their campaign to convince drivers [...]]]></description>
			<content:encoded><![CDATA[<p>What is loud, fast, very hard, and makes this happen to cars:</p>
<p align="center"><img src="http://www.durrans.com/blog/wp-content/uploads/2007/06/img_1928.JPG" alt="Car train 1" class="imageframe" height="300" width="400" /></p>
<p align="center"><img src="http://www.durrans.com/blog/wp-content/uploads/2007/06/img_1929.jpg" alt="Car Train 2" class="imageframe" height="300" width="400" /></p>
<p align="center"><img src="http://www.durrans.com/blog/wp-content/uploads/2007/06/img_1930.jpg" alt="Car Train 3" class="imageframe" height="300" width="400" /></p>
<p align="left">A train going over a level crossing when the car shouldn&#8217;t have been there. Don&#8217;t play on the railways kids!</p>
<p align="left">This car was left in the car park at work by Network Rail. It was recently used as part of their campaign to convince drivers that driving over level crossings when the lights are flashing is generally considered a bad idea.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.durrans.com/blog/2007/06/27/wrong-side-of-the-tracks/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
