<?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>Daniel Durrans&#039; Blog &#187; Life in code</title>
	<atom:link href="http://durrans.com/blog/category/life-in-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://durrans.com/blog</link>
	<description>Life, thoughts, cooking, food, mmm food.</description>
	<lastBuildDate>Sun, 16 Oct 2011 11:58:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Computer Fun</title>
		<link>http://durrans.com/blog/2011/07/07/computer-fun/</link>
		<comments>http://durrans.com/blog/2011/07/07/computer-fun/#comments</comments>
		<pubDate>Thu, 07 Jul 2011 08:00:18 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Homepage]]></category>
		<category><![CDATA[Life in code]]></category>

		<guid isPermaLink="false">http://durrans.com/blog/?p=256</guid>
		<description><![CDATA[When I was at my parents house this week my Mum presented me with box loads of my old stuff. Apparently now that I own a house I can no longer use the parental storage facility. While digging through the &#8230; <a href="http://durrans.com/blog/2011/07/07/computer-fun/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://durrans.com/blog/wp-content/uploads/2011/07/ComputerFun-FrontCover.jpg"><img src="http://durrans.com/blog/wp-content/uploads/2011/07/ComputerFun-FrontCover-287x300.jpg" alt="" title="ComputerFun-FrontCover" width="287" height="300" class="alignright size-medium wp-image-260" /></a>When I was at my parents house this week my Mum presented me with box loads of my old stuff. Apparently now that I own a house I can no longer use the parental storage facility.</p>
<p>While digging through the various books, papers and momentos I discovered a 1984 edition of the Usborne Computer Fun programming book. My parents got me this book when I was playing with my Dad&#8217;s BBC Micro (a model B) and I vividly remember typing these programs into the computer.</p>

<a href='http://durrans.com/blog/2011/07/07/computer-fun/computerfun-frontcover/' title='ComputerFun-FrontCover'><img width="150" height="150" src="http://durrans.com/blog/wp-content/uploads/2011/07/ComputerFun-FrontCover-150x150.jpg" class="attachment-thumbnail" alt="ComputerFun-FrontCover" title="ComputerFun-FrontCover" /></a>
<a href='http://durrans.com/blog/2011/07/07/computer-fun/computerfun-page4-5/' title='ComputerFun-Page4-5'><img width="150" height="150" src="http://durrans.com/blog/wp-content/uploads/2011/07/ComputerFun-Page4-5-150x150.jpg" class="attachment-thumbnail" alt="ComputerFun-Page4-5" title="ComputerFun-Page4-5" /></a>
<a href='http://durrans.com/blog/2011/07/07/computer-fun/computerfun-page10-11/' title='ComputerFun-Page10-11'><img width="150" height="150" src="http://durrans.com/blog/wp-content/uploads/2011/07/ComputerFun-Page10-11-150x150.jpg" class="attachment-thumbnail" alt="ComputerFun-Page10-11" title="ComputerFun-Page10-11" /></a>
<a href='http://durrans.com/blog/2011/07/07/computer-fun/computerfun-page28-29/' title='ComputerFun-Page28-29'><img width="150" height="150" src="http://durrans.com/blog/wp-content/uploads/2011/07/ComputerFun-Page28-29-150x150.jpg" class="attachment-thumbnail" alt="ComputerFun-Page28-29" title="ComputerFun-Page28-29" /></a>

]]></content:encoded>
			<wfw:commentRss>http://durrans.com/blog/2011/07/07/computer-fun/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Installing irssi using macports</title>
		<link>http://durrans.com/blog/2009/03/22/installing-irssi-using-macports/</link>
		<comments>http://durrans.com/blog/2009/03/22/installing-irssi-using-macports/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 23:58:41 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Life in code]]></category>

		<guid isPermaLink="false">http://www.durrans.com/blog/2009/03/22/installing-irssi-using-macports/</guid>
		<description><![CDATA[To install irssi using macports issue the command: sudo port install irssi +perl This will ensure that you get the necessary perl scripting support. Most people using irssi are going to want this. Note that if you use scriptassist to &#8230; <a href="http://durrans.com/blog/2009/03/22/installing-irssi-using-macports/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>To install irssi using macports issue the command:</p>
<p>sudo port install irssi +perl</p>
<p>This will ensure that you get the necessary perl scripting support. Most people using irssi are going to want this.</p>
<p>Note that if you use scriptassist to help you load irssi scripts then you will want some extra perl stuff:</p>
<p>sudo port install p5-libwww-perl</p>
]]></content:encoded>
			<wfw:commentRss>http://durrans.com/blog/2009/03/22/installing-irssi-using-macports/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Migrating reporting server database with SQL Server 2005 Standard</title>
		<link>http://durrans.com/blog/2009/02/12/migrating-reporting-server-database-with-sql-server-2005-standard/</link>
		<comments>http://durrans.com/blog/2009/02/12/migrating-reporting-server-database-with-sql-server-2005-standard/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 17:29:49 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Life in code]]></category>

		<guid isPermaLink="false">http://www.durrans.com/blog/2009/02/12/migrating-reporting-server-database-with-sql-server-2005-standard/</guid>
		<description><![CDATA[If you are moving reporting services to a brand new SQL Server machine (such as setting up a UAT environment or test server) then you may backup and restore the reporting server database from your production machine. You will probably &#8230; <a href="http://durrans.com/blog/2009/02/12/migrating-reporting-server-database-with-sql-server-2005-standard/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you are moving reporting services to a brand new SQL Server machine (such as setting up a UAT environment or test server) then you may backup and restore the reporting server database from your production machine. You will probably then backup and restore the encryption keys. However you will probably get the error:</p>
<p>&#8220;Reporting server can&#8217;t be used as part of a scale-out deployment&#8221; or something along those lines.</p>
<p>Fear not! Because you aren&#8217;t using enterprise you need to remove the key for the old server from the config using:</p>
<p><span class="userInput">rskeymgmt -l</span></p>
<p>and then</p>
<p><span class="userInput">rskeymgmt -r</span></p>
]]></content:encoded>
			<wfw:commentRss>http://durrans.com/blog/2009/02/12/migrating-reporting-server-database-with-sql-server-2005-standard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server Service Broker and Backup Exec</title>
		<link>http://durrans.com/blog/2008/11/27/sql-server-service-broker-and-backup-exec/</link>
		<comments>http://durrans.com/blog/2008/11/27/sql-server-service-broker-and-backup-exec/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 13:35:44 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Life in code]]></category>

		<guid isPermaLink="false">http://www.durrans.com/blog/2008/11/27/sql-server-service-broker-and-backup-exec/</guid>
		<description><![CDATA[I had a problem today where whenever a full backup of the master database was taken by Backup Exec the Service Broker would say in the SQL Server error logs: Could not start Service Broker for database id Google didn&#8217;t &#8230; <a href="http://durrans.com/blog/2008/11/27/sql-server-service-broker-and-backup-exec/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I had a problem today where whenever a full backup of the master database was taken by Backup Exec the Service Broker would say in the SQL Server error logs:</p>
<p><code>Could not start Service Broker for database id</code></p>
<p>Google didn&#8217;t really know what was going on but I found that if you delete the master4IDR file on the offending server (probably in the default database directory) then do another few backups the problem vanishes.</p>
<p>master4IDR is a copy of the master database that is taken when Backup Exec backs up the database. It is used to do disaster recovery on the server.</p>
]]></content:encoded>
			<wfw:commentRss>http://durrans.com/blog/2008/11/27/sql-server-service-broker-and-backup-exec/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What if Facebook could auto-tag uploaded photos?</title>
		<link>http://durrans.com/blog/2008/01/29/what-if-facebook-could-auto-tag-uploaded-photos/</link>
		<comments>http://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[Cool stuff]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Life in code]]></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 &#8230; <a href="http://durrans.com/blog/2008/01/29/what-if-facebook-could-auto-tag-uploaded-photos/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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 &#8211; it&#8217;s the way forward, and you heard it here first!</p>
]]></content:encoded>
			<wfw:commentRss>http://durrans.com/blog/2008/01/29/what-if-facebook-could-auto-tag-uploaded-photos/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Check constraints that access the table you are inserting into</title>
		<link>http://durrans.com/blog/2008/01/18/check-constraints-that-access-the-table-you-are-inserting-into/</link>
		<comments>http://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 &#8230; <a href="http://durrans.com/blog/2008/01/18/check-constraints-that-access-the-table-you-are-inserting-into/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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://durrans.com/blog/2008/01/18/check-constraints-that-access-the-table-you-are-inserting-into/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

