<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>lazygnome - A big jumble of words</title>
<link>http://www.lazygnome.net/</link>
<description>Nonsensical words from Iain Cuthbertson</description>
<language>en-gb</language>
<docs>http://www.rssboard.org/rss-specification</docs>
	<item>
  <title>My Rant</title>
  <link>http://www.lazygnome.net/diary/602</link>
  <guid>http://www.lazygnome.net/diary/602</guid>
  <description>It's been ages since I last did anything here.  And I find that I have little time for blog updating.&lt;br/&gt;&lt;br/&gt;That said, I've started a new site over here &lt;a href="http://myrant.net/" target="_blank"&gt;myrant.net&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;It's not to replace this site, more of a quick place for me to keep my semi-rants that are longer than twitter can cope with.&lt;br/&gt;&lt;br/&gt;My intention is that anybody can register and post their rants, though I've not had any takers yet.&lt;br/&gt;&lt;br/&gt;Peace out!</description>
  <comments>http://www.lazygnome.net/diary/602#comments</comments>
  <pubDate>Thu, 29 Oct 2009 17:42:03 +0000</pubDate>
</item>
<item>
  <title>Brand new specs</title>
  <link>http://www.lazygnome.net/diary/601</link>
  <guid>http://www.lazygnome.net/diary/601</guid>
  <description>It's hard to believe, but it's been 2 years since I 1st donned &lt;a href="http://www.lazygnome.net/diary/583"&gt;these prescription specs&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;Now, I have a new prescription and 2 new pairs of glasses. Having a deeper frame will allow me to start using them for night time driving.&lt;br/&gt;&lt;br/&gt;I took a photo, I look fat:&lt;br/&gt;&lt;center&gt;&lt;a href="http://www.flickr.com/photos/bigcuthy/3544808359/" title="New specs by Iain Cuthbertson, on Flickr"&gt;&lt;img src="http://farm3.static.flickr.com/2274/3544808359_fa6042eacf.jpg" width="375" height="500" alt="New specs" border="0" /&gt;&lt;/a&gt;&lt;/center&gt;&lt;br/&gt;&lt;br/&gt;&lt;strike&gt;No photo just yet, but&lt;/strike&gt; here's an image for the time being:&lt;br/&gt;&lt;center&gt;&lt;img src="http://www.lazygnome.net/images/austin_24084086.jpg" alt="Austin 24084086" border="0" /&gt;&lt;/center&gt;</description>
  <comments>http://www.lazygnome.net/diary/601#comments</comments>
  <pubDate>Mon, 18 May 2009 10:06:38 +0000</pubDate>
</item>
<item>
  <title>Snow in Malvern, who'd have thunk it?</title>
  <link>http://www.lazygnome.net/diary/600</link>
  <guid>http://www.lazygnome.net/diary/600</guid>
  <description>As I haven't posted anything here for a while, why not enjoy some &lt;a href="http://flickr.com/search/?w=34574952%40N00&amp;q=snow&amp;m=tags" target="_blank"&gt;wintery photos&lt;/a&gt; from my flickr account.&lt;br/&gt;&lt;br/&gt;I think that my fave has to be:&lt;br/&gt;&lt;center&gt;&lt;a href="http://flickr.com/photos/bigcuthy/3269265912/in/set-72157613589306222/" title="Police car slides into Great Malvern Post Office by Iain Cuthbertson, on Flickr" target="_blank"&gt;&lt;img src="http://farm4.static.flickr.com/3334/3269265912_92cc6b82a1.jpg" width="375" height="500" alt="Police car slides into Great Malvern Post Office" border="0"/&gt;&lt;/a&gt;&lt;br /&gt;Police car slides into Great Malvern Post Office&lt;/center&gt;</description>
  <comments>http://www.lazygnome.net/diary/600#comments</comments>
  <pubDate>Wed, 11 Feb 2009 12:19:03 +0000</pubDate>
</item>
<item>
  <title>Select the last word in a string with MySQL</title>
  <link>http://www.lazygnome.net/diary/599</link>
  <guid>http://www.lazygnome.net/diary/599</guid>
  <description>Following on from last month's &lt;a href="http://www.lazygnome.net/diary/597"&gt;Select the 1st letter of the last word in MySQL&lt;/a&gt;, I then needed a way to select the last word from string (or column).&lt;br/&gt;&lt;p class="code"&gt;SELECT REVERSE(LEFT(REVERSE('Iain Cuthbertson'), LOCATE(' ', REVERSE('Iain Cuthbertson')) -1));&lt;/p&gt;&lt;br/&gt;Now I can sort rows by surname when the full name is in just one cell!</description>
  <comments>http://www.lazygnome.net/diary/599#comments</comments>
  <pubDate>Thu, 20 Nov 2008 09:53:21 +0000</pubDate>
</item>
<item>
  <title>Fixing Ordered Lists in IE6</title>
  <link>http://www.lazygnome.net/diary/598</link>
  <guid>http://www.lazygnome.net/diary/598</guid>
  <description>IE6, oh how you destroy my will to code.&lt;br/&gt;&lt;br/&gt;1st Problem:&lt;br/&gt;List item numbers dissapear in IE6.&lt;br/&gt;&lt;br/&gt;Solution:&lt;br/&gt;&lt;div class="code"&gt;ol { margin: 0; padding: 0; }&lt;br/&gt;ol li { margin: 0 2em 0 2.5em; padding: 0 }&lt;/div&gt;&lt;br/&gt;&lt;br/&gt;2nd Problem:&lt;br/&gt;List item numbers are all set to 1.&lt;br/&gt;&lt;br/&gt;Solution:&lt;br/&gt;&lt;div class="code"&gt;ol li { zoom: 0; }&lt;/div&gt;&lt;br/&gt;</description>
  <comments>http://www.lazygnome.net/diary/598#comments</comments>
  <pubDate>Mon, 03 Nov 2008 13:29:07 +0000</pubDate>
</item>
<item>
  <title>Select the 1st letter of the last word in MySQL</title>
  <link>http://www.lazygnome.net/diary/597</link>
  <guid>http://www.lazygnome.net/diary/597</guid>
  <description>I recently had a need to select the 1st letter of the last word in a stored field.&lt;br/&gt;This is my 10min stumbling result:&lt;br/&gt;&lt;p class="code"&gt;select SUBSTRING(REVERSE('Iain Cuthbertson'), LOCATE(' ', REVERSE('Iain Cuthbertson')) - 1, 1) as result;&lt;/p&gt;&lt;br/&gt;MySQL only code I'm afraid folks.</description>
  <comments>http://www.lazygnome.net/diary/597#comments</comments>
  <pubDate>Mon, 20 Oct 2008 12:45:15 +0000</pubDate>
</item>
<item>
  <title>the experiment</title>
  <link>http://www.lazygnome.net/diary/596</link>
  <guid>http://www.lazygnome.net/diary/596</guid>
  <description>I've mentioned this on Facebook and Twitter, I guess I should say something here as well.&lt;br/&gt;&lt;br/&gt;Every now and then, I forget to shave.  Sometimes I can forget to shave for several weeks in a row.&lt;br/&gt;&lt;br/&gt;The most recent forgetting to shave lasted 4-5 weeks!&lt;br/&gt;In an effort to look a little more human, I made the effort to shave on Sunday morning.&lt;br/&gt;&lt;br/&gt;It's not that often that you get to try out a selection of different facial hair styles, so I took the chance to play around:&lt;br/&gt;&lt;br/&gt;&lt;center&gt;&lt;a href="http://www.flickr.com/photos/bigcuthy/sets/72157606644018228/"&gt;&lt;img src="http://farm4.static.flickr.com/3170/2748799905_5be7911c9c.jpg" width="333" height="500" alt="img_5258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Click for the full series!&lt;/center&gt;</description>
  <comments>http://www.lazygnome.net/diary/596#comments</comments>
  <pubDate>Tue, 12 Aug 2008 11:30:32 +0000</pubDate>
</item>
<item>
  <title>Note to self</title>
  <link>http://www.lazygnome.net/diary/595</link>
  <guid>http://www.lazygnome.net/diary/595</guid>
  <description>&lt;ol&gt;&lt;li&gt;Create amazing new blog with symfony.&lt;/li&gt;&lt;li&gt;Measure and cost tiling area around bath so a proper shower can be fitted.&lt;/li&gt;&lt;li&gt;Figure out where workstation will go in own bedroom if 2nd bedroom is to be sub-let.&lt;/li&gt;&lt;/ol&gt;With regard to blog: what to do with old entries?  allow commenting?  look for a designer?</description>
  <comments>http://www.lazygnome.net/diary/595#comments</comments>
  <pubDate>Sat, 29 Mar 2008 20:09:52 +0000</pubDate>
</item>
<item>
  <title>Trim whitespace from the beging and end of a string in javascript</title>
  <link>http://www.lazygnome.net/diary/594</link>
  <guid>http://www.lazygnome.net/diary/594</guid>
  <description>var elm = document.getElementById('foo');&lt;br/&gt;elm.value = elm.value.replace(/(^\s+|\s+$)/g, '');</description>
  <comments>http://www.lazygnome.net/diary/594#comments</comments>
  <pubDate>Mon, 10 Dec 2007 12:33:03 +0000</pubDate>
</item>
<item>
  <title>Sorting arrays of SimpleXML objects</title>
  <link>http://www.lazygnome.net/diary/593</link>
  <guid>http://www.lazygnome.net/diary/593</guid>
  <description>This is how I've tackeled the problem of changing the order of some SimpleXML objects.&lt;br/&gt;&lt;br/&gt;Adding an attribute to the top level of an object can add as the position reference.&lt;br/&gt;So Passing an array of SimpleXML objects to the following function will return the same array of objects, but reordered by the $key attribute.&lt;br/&gt;&lt;br/&gt;[Edited 26th Feb 2008]&lt;br/&gt;&lt;div class="code"&gt;function xmlSort($dataArray, $sortKey)&lt;br/&gt;{&lt;br/&gt;  $outputArray = array();&lt;br/&gt;&lt;br/&gt;  for ($i = 0; $i &lt; count($dataArray); $i++)&lt;br/&gt;  {&lt;br/&gt;    $sortArray[] = (int)$dataArray[$i]{$sortKey};&lt;br/&gt;  }&lt;br/&gt;&lt;br/&gt;  for ($i = 0; $i &lt; count($sortArray); $i++)&lt;br/&gt;  {&lt;br/&gt;    $outputArray[] = $dataArray[$sortArray[$i]];&lt;br/&gt;  }&lt;br/&gt;&lt;br/&gt;  for ($i = 0; $i &lt; count($outputArray); $i++)&lt;br/&gt;  {&lt;br/&gt;    $outputArray[$i]{$sortKey} = $i;&lt;br/&gt;  }&lt;br/&gt;  &lt;br/&gt;  return $outputArray;&lt;br/&gt;}&lt;br/&gt;&lt;/div&gt;&lt;br/&gt;See &lt;a href="http://uk2.php.net/manual/en/ref.simplexml.php"&gt;PHP.net SimpleXML&lt;/a&gt; for the dataset used.&lt;br/&gt;&lt;br/&gt;Adding 'pos="#"' to each &lt;movie&gt; element will allow for reordering.&lt;br/&gt;&lt;br/&gt;An example usage would be:&lt;br/&gt;&lt;div class="code"&gt;$sorted_xml = xmlSort($xml-&gt;movie, 'pos');&lt;br/&gt;&lt;/div&gt;</description>
  <comments>http://www.lazygnome.net/diary/593#comments</comments>
  <pubDate>Sun, 14 Oct 2007 17:55:47 +0000</pubDate>
</item>
</channel>
</rss>
	