<?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>Pages From My Head &#187; Software</title>
	<atom:link href="http://www.craig-russell.co.uk/category/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.craig-russell.co.uk</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 03 Sep 2010 11:40:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Configuring Inkscape Default Template</title>
		<link>http://www.craig-russell.co.uk/configuring-inkscape-default-template/</link>
		<comments>http://www.craig-russell.co.uk/configuring-inkscape-default-template/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 19:34:54 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Papercraft]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.craig-russell.co.uk/?p=534</guid>
		<description><![CDATA[When I open up a new document in Inkscape, the first thing I usually do is set up the grids and page layout in mm for printing. This gets pretty boring having to do this with every new document. Fortunately it&#8217;s pretty easy to configure the default template so you don&#8217;t have to do this. [...]]]></description>
			<content:encoded><![CDATA[<p>When I open up a new document in Inkscape, the first thing I usually do is set up the grids and page layout in mm for printing. This gets pretty boring having to do this with every new document.</p>
<p>Fortunately it&#8217;s pretty easy to configure the default template so you don&#8217;t have to do this.</p>
<ol>
<li>Open Inkscape</li>
<li>Set up your blank sheet however you like</li>
<li>Save the file in <code>/home/username/.config/inkscape/templates/default.svg</code></li>
</ol>
<p>That&#8217;s it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.craig-russell.co.uk/configuring-inkscape-default-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Geo Relevent Mobile Messaging</title>
		<link>http://www.craig-russell.co.uk/geo-relevent-mobile-messaging/</link>
		<comments>http://www.craig-russell.co.uk/geo-relevent-mobile-messaging/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 11:31:50 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.craig-russell.co.uk/?p=522</guid>
		<description><![CDATA[I have just this minute heard about a company, Xtify, which produces a communication framework for sending messages to mobile users based upon their location. This could be seriously amazing! You know when you hear something and it sends ideas pinging off in different directions like a particle collision? Reading about this gave me one [...]]]></description>
			<content:encoded><![CDATA[<p>I have just this minute heard about a company, <a href="http://xtify.com/">Xtify</a>, which produces a communication framework for sending messages to mobile users based upon their location. This could be seriously amazing!</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-523" title="xtify" src="http://www.craig-russell.co.uk/wp-content/uploads/2010/07/xtify.png" alt="" width="499" height="242" /></p>
<p>You know when you hear something and it sends ideas pinging off in different directions like a particle collision? Reading about this gave me one of those moments.</p>
<p>Think about any scenario where you&#8217;d want real-time location specific information pushed to you. There&#8217;s the obvious stuff, like retailers notifying customers of up-to-the minute promotions and offers. Imagine getting a message from the Deli round the corner, telling you that there&#8217;s only two peri-peri chicken baguettes left?</p>
<p>This could really take off for events organisers. Wouldn&#8217;t it be great  getting info about bands in the signing tent right now? But more  importantly not getting the info if you&#8217;re on the other side of the  site?</p>
<p>But what about calling for help when you need it? In disaster situations, spreading information is essential. You can be told, not where all the heath centres are, but the nearest one to you, right now. This could make managing resources much easier. Messages directing people to the better equipped centres can be sent out over a larger area than the less equipped ones.</p>
<p>These are a few thoughts from a few minutes thinking. My brain&#8217;s going to be chewing on this for a while&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.craig-russell.co.uk/geo-relevent-mobile-messaging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Loop in a Widget</title>
		<link>http://www.craig-russell.co.uk/wordpress-loop-in-a-widget/</link>
		<comments>http://www.craig-russell.co.uk/wordpress-loop-in-a-widget/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 14:33:36 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[WebApps]]></category>

		<guid isPermaLink="false">http://www.craig-russell.co.uk/?p=502</guid>
		<description><![CDATA[When I was writing a WordPress widget plugin to display information from a sub set of my posts (that&#8217;s it on the side, with the paper toys&#8230;) I noticed that the WordPress Loop doesn&#8217;t quite behave itself when widgetized in the 2.8+ style. When using the following code, inside a widget, to return posts from [...]]]></description>
			<content:encoded><![CDATA[<p>When I was writing a WordPress widget plugin to display information from a sub set of my posts (that&#8217;s it on the side, with the paper toys&#8230;) I noticed that the <a href="http://codex.wordpress.org/The_Loop">WordPress Loop</a> doesn&#8217;t quite behave itself when widgetized in the <a href="http://codex.wordpress.org/Widgets_API#Developing_Widgets_on_2.8.2B">2.8+ style</a>.</p>
<p>When using the following code, inside a widget, to return posts from a custom query, you&#8217;ll find that the post title and perma-link are returned, but the post ID is not.</p>
<pre class="brush: php;">
&lt;?php $loop = new WP_Query($query);
while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); ?&gt;
	&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;?php echo $post-&gt;ID.' : @; the_title(); ?&gt;&lt;/a&gt;
&lt;?php endwhile; ?&gt;
</pre>
<p>Adding a global call to the $post variable at the top of the loop fixes this issue.</p>
<pre class="brush: php;">
&lt;?php $loop = new WP_Query($query);
while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post();
	global $post;?&gt;
	&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;?php echo $post-&gt;ID.' : @; the_title(); ?&gt;&lt;/a&gt;
&lt;?php endwhile; ?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.craig-russell.co.uk/wordpress-loop-in-a-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inkscape: Masking with Clone and Clip</title>
		<link>http://www.craig-russell.co.uk/inkscape-masking-with-clone-and-clip/</link>
		<comments>http://www.craig-russell.co.uk/inkscape-masking-with-clone-and-clip/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 17:01:12 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Papercraft]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.craig-russell.co.uk/?p=408</guid>
		<description><![CDATA[Lets say you want to have some pattern displayed within the bounds of a shape, as the blobs are to this rectangle. There are a number of ways you can do this in Inkscape, with crops and masks etc, but I&#8217;m going to show you a far more effective way that allows you to resize [...]]]></description>
			<content:encoded><![CDATA[<p>Lets say you want to have some pattern displayed within the bounds of a shape, as the blobs are to this rectangle. There are a number of ways you can do this in Inkscape, with crops and masks etc, but I&#8217;m going to show you a far more effective way that allows you to resize the shape, without having to worry about re-cropping the pattern.</p>
<p class="alignc" style="text-align: center;"><img class="aligncenter" src="http://www.craig-russell.co.uk/wp-content/uploads/2010/03/Screenshot5.png" alt="" width="450" height="335" /></p>
<p><span id="more-408"></span><br />
Lets start with our two objects, a blobby object and a rectangle below it.</p>
<p class="alignc" style="text-align: center;"><img class="aligncenter" src="http://www.craig-russell.co.uk/wp-content/uploads/2010/03/Screenshot1.png" alt="" width="450" height="335" /></p>
<p>Crate a clone of the rectangle (Alt+C), the cloned shape will appear on top of the others. A cloned object is linked to the original, so any changes you make to the original will also happen to the clone.</p>
<p class="alignc" style="text-align: center;"><img class="aligncenter" src="http://www.craig-russell.co.uk/wp-content/uploads/2010/03/Screenshot2.png" alt="" width="450" height="335" /></p>
<p>Select the cloned rectangle and the blob object (Shift + Click to multi-select). Then clip the blobs with the clone (from the menu select Object &gt; Clip &gt; Set). This will only show the portion of the blob object that is covered by the cloned rectangle, the cloned rectangle itself will become invisible.</p>
<p class="alignc" style="text-align: center;"><img class="aligncenter" src="http://www.craig-russell.co.uk/wp-content/uploads/2010/03/Screenshot3.png" alt="" width="450" height="335" /></p>
<p>Now you have the pattern displayed on the shape. But more than that, you can resize the rectangle and the pattern will expand to fit it!</p>
<p class="alignc" style="text-align: center;"><img class="aligncenter" src="http://www.craig-russell.co.uk/wp-content/uploads/2010/03/Screenshot4.png" alt="" width="450" height="335" /></p>
<p>TaDa!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.craig-russell.co.uk/inkscape-masking-with-clone-and-clip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Inkscape for CMYK on Ubuntu Linux</title>
		<link>http://www.craig-russell.co.uk/configuring-inkscape-for-cmyk-on-ubuntu-linux/</link>
		<comments>http://www.craig-russell.co.uk/configuring-inkscape-for-cmyk-on-ubuntu-linux/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 10:58:44 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.craig-russell.co.uk/?p=377</guid>
		<description><![CDATA[I&#8217;ve been climbing a steep learning curve recently with Inkscape, and now I&#8217;m scalling the peak of CMYK Colour Profiles (I&#8217;ll be alternating the British/American spelling where appropriate). If, like me, you&#8217;ve never known which colour space you were working in, chances are it was RGB. CMYK is an alternative, commonly used in the printing [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been climbing a steep learning curve recently with Inkscape, and now I&#8217;m scalling the peak of CMYK Colour Profiles (I&#8217;ll be alternating the British/American spelling where appropriate).</p>
<p>If, like me, you&#8217;ve never known which colour space you were working in, chances are it was RGB. CMYK is an alternative, commonly used in the printing industry. I&#8217;ll spare you further details, but if you want to know more, <a href="http://lmgtfy.com/?q=RGB+CMYK">you know where to go</a>.</p>
<p>Support for CMYK in Inkscape is ongoing, as is the discussion surrounding it. <a href="http://wiki.inkscape.org/wiki/index.php/InkscapeColor">Click</a> <a href="http://codewideopen.blogspot.com/2008/11/svg-chicken-and-cmyk-egg.html">Click</a> <a href="http://en.flossmanuals.net/Inkscape/ColorManagement">Click</a> But we cans till configure Inkscape for CMYK to make things easier further down the road.</p>
<p>Before I go on, a disclaimer: I am in no way an expert in Inkscape nor CMYK colour profiles. These settings seemed to work for me, they may also work for you. I am more than happy to accept comments &amp; criticisms in the comments below.</p>
<p>Download the Adobe Color Profiles and copy them all in to /usr/share/color/icc<br />
<a href="http://www.adobe.com/digitalimag/adobergb.html">http://www.adobe.com/digitalimag/adobergb.html</a></p>
<p>Follow the instructions on this page to generate an ICC profile for your monitor<br />
<a href="http://www.ubuntufieldmanual.com/?q=node/38">http://www.ubuntufieldmanual.com/?q=node/38</a></p>
<p>Copy the icc file in to one of the locations that Inkscape searches<br />
/home/username/.local/share/color/icc<br />
/usr/share/gnome/color/icc<br />
/usr/local/share/color/icc<br />
/usr/share/color/icc (best for all users)</p>
<p>Open/restart Inkscape<br />
Go to Inkscape preferences (Shift+Ctrl+P)<br />
In &#8216;Color management&#8217;<br />
Set &#8216;Display Profile&#8217; to your monitor profile (lcms RGB Virtual Profile)<br />
Tick &#8216;Simulate output on screen&#8217;<br />
Tick &#8216;Mark out of gamut colors&#8217;<br />
Select a highly visible color for the warning color (I prefer a bright green)<br />
Set &#8216;Device profile&#8217; to an apropriate output profile for your region (US Euroscale etc) and print medium (Coated, Uncoated etc)</p>
<p>Open the Document Properties (Shift+Ctrl+D)<br />
Click the Color Management tab<br />
Link the &#8216;lcms RGB Virtual Profile&#8217;</p>
<p>Now, if you enable Color Managed View (in the view menu), colours that are out of the printers range will show up on the page. You&#8217;ll also be looking at colours more-or-less as they come out the printer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.craig-russell.co.uk/configuring-inkscape-for-cmyk-on-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top Inkscape Tutorials for Beginners</title>
		<link>http://www.craig-russell.co.uk/top-inkscape-tutorials-for-beginners/</link>
		<comments>http://www.craig-russell.co.uk/top-inkscape-tutorials-for-beginners/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 11:31:27 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.craig-russell.co.uk/?p=372</guid>
		<description><![CDATA[Recently I&#8217;ve been getting to grips with Inkscape, the vector graphics editor, and mighty good it is too. To ease my climb up the learning curve I&#8217;ve been following a few tutorials. If, like me, you want to get a handle on Inkscape, try these bad boys out for size. Working with Colour and Gradients [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been getting to grips with <a href="http://www.inkscape.org/">Inkscape</a>, the vector graphics editor, and mighty good it is too. To ease my climb up the learning curve I&#8217;ve been following a few tutorials. If, like me, you want to get a handle on Inkscape, try these bad boys out for size.</p>
<h3>Working with Colour and Gradients</h3>
<p>If you&#8217;ve never touched Inkscape before, this tutorial is a total must.<br />
<a href="http://www.kendraschaefer.com/2009/06/inkscape-tutorial-color-and-gradients-for-absolute-beginners/">http://www.kendraschaefer.com/2009/06/inkscape-tutorial-color-and-gradients-for-absolute-beginners/</a></p>
<h3>Spiro Swirls</h3>
<p>A new feature in the latest version, this video tutorial (no sound) shows you haw to create killer spirals. Push the algorithm to the edge to see what it comes up with.<br />
<a href="http://verysimpledesigns.com/vectors/inkscape-tutorial-spiro-swirls.html">http://verysimpledesigns.com/vectors/inkscape-tutorial-spiro-swirls.html</a></p>
<h3>Text Styling</h3>
<p>This tutorial runs through the great range of control that Inkscape gives you with text, and shows you how to make a great page title.<br />
<a href="http://troy-sobotka.blogspot.com/2008/04/inkscape-tutorial-2-text-and-simple.html">http://troy-sobotka.blogspot.com/2008/04/inkscape-tutorial-2-text-and-simple.html</a></p>
<h3>Creating Icons</h3>
<p>This tutorial takes you through the process of creating a Tango style icon. Even if you&#8217;re not interested in creating icons, there&#8217;s a lot of good tips about working with paths in here.<br />
<a href="http://vector.tutsplus.com/tutorials/illustration/how-to-create-a-vector-light-bulb-icon-with-inkscape/">http://vector.tutsplus.com/tutorials/illustration/how-to-create-a-vector-light-bulb-icon-with-inkscape/</a></p>
<p>I found all these tutorials through the <a href="http://inkscapetutorials.wordpress.com/">Inkscape Tutorials Blog</a>, jump on in!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.craig-russell.co.uk/top-inkscape-tutorials-for-beginners/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Neural Network Class for C++</title>
		<link>http://www.craig-russell.co.uk/c-neural-network/</link>
		<comments>http://www.craig-russell.co.uk/c-neural-network/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 15:58:27 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.craig-russell.co.uk/?p=253</guid>
		<description><![CDATA[Here&#8217;s a simple little file I knocked up for handling the basic data types required for coding neural networks in C++.  The tar contains two files neuralNetwork.h and nnXOR.cpp. Click Here To Download XOR.zip File neuralNetwork.h This is the file that handles the datatypes. The model I&#8217;ve used here represents the neuron output values as [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a simple little file I knocked up for handling the basic data types required for coding neural networks in C++.  The tar contains two files neuralNetwork.h and nnXOR.cpp.</p>
<p><strong>Click Here To Download <a href="http://www.craig-russell.co.uk/wp-content/uploads/2009/08/XOR.zip">XOR.zip</a></strong></p>
<p><strong><a href="../wp-content/uploads/2009/08/XOR.tar.gz"><span id="more-253"></span></a></strong></p>
<h3>File neuralNetwork.h</h3>
<p>This is the file that handles the datatypes. The model I&#8217;ve used here represents the neuron output values as a float array, the connections between neurons as a 2D boolean array and the connection weights as a 2D float array. To work with the data, the class contains the following functions.</p>
<ul>
<li><strong>neuralNetwork()</strong> &#8211; Default constructor, creates network with 10 neurons.</li>
<li><strong>neuralNetwork(int n)</strong> &#8211; Constructor creates network with <em>n </em>neurons.</li>
<li><strong>~neuralNetwork()</strong> &#8211; Destructor, cleans up data objects.</li>
<li><strong>getSize()</strong> &#8211; Returns an integer representing the number of neurons in the network.</li>
<li><strong>setSize(int n)</strong> &#8211; Creates the data structures for a network of size <em>n</em>. Calls to this function are not required if using the neuralNetwork() constructor.</li>
<li><strong>zeroData() </strong>- Sets all the values of data in the network to zero, effectively clearing the network. Calls to this function are not required unless resetting the network at run-time.</li>
<li><strong>setVal(int n, float val)</strong> &#8211; Set&#8217;s that value of neuron <em>n</em> to <em>val</em>.</li>
<li><strong>getVal(int n) </strong>- Gets that vlue of neuron <em>n</em>.</li>
<li><strong>addConn(int i, int j)</strong> &#8211; Creates a connection in the network from neuron <em>i</em> to neuron <em>j</em>.</li>
<li><strong>addConn(int i, int j, float weight)</strong> &#8211; Creates a connection in the network from neuron <em>i</em> to neuron <em>j</em> with weight <em>weight</em>.</li>
<li><strong>delConn(int i, int j)</strong> &#8211; Removes the connection between neuron <em>i</em> and neuron <em>j.</em></li>
<li><strong>is Conn(int i, int j)</strong> &#8211; Returns a boolean, true if there is a connection from neuron <em>i</em> to neuron <em>j</em>.</li>
<li><strong>setWeight(int i,  int j,  float weight)</strong> &#8211; If there is a connection from neuron <em>i</em> to neuron <em>j</em>, the weight is set to <em>weight</em>.</li>
<li><strong>getWeight(int i, int j)</strong> &#8211; Returns a float representing the weight of the conneciton from neuron <em>i</em> to neuron <em>j</em>.</li>
<li><strong>printVals()</strong> &#8211; Prints to screen the data in the output value array</li>
<li><strong>printConns() </strong>- Prints to screen the data in the connections array</li>
<li><strong>printWeights()</strong> &#8211; Prints to screen the data in the weights array</li>
<li><strong>printAll()</strong> &#8211; Prints to screen all of the data, with headings.</li>
</ul>
<h3>File nnXOR.cpp</h3>
<p>This file uses the neuralNetwork class as an example to create a neural network to compute the <a href="http://library.thinkquest.org/29483/neural_index.shtml">XOR relationship</a>.</p>
<p>At the top of the file, the class nnXOR is created extending the neuralNetwork class, it contains the following functions:</p>
<ul>
<li><strong>nnXOR(int n)</strong> &#8211; Constructor, creates the network of size <em>n</em>, note the use of setSize().</li>
<li><strong>updateNeuron(int n)</strong> &#8211; The update process for neuron <em>n</em>. This process multiplies each input neuron value by the conneciton weight, sums these values then performs a simple threashold function to determine the output value of neuron <em>n</em>.</li>
<li><strong>update(int epoch)</strong> &#8211; Sequentially updates each neuron in the network <em>epoch</em> times.</li>
</ul>
<p>The bottom half of the file contains the main method, calculating the XOR relationship between variables <em>a</em> and <em>b</em>.</p>
<ol>
<li>Set the variables <em>a</em> and <em>b</em> from the command line, if no data was supplied from the command line, prompt the user.</li>
<li>Create the neural network object with 5 neurons.</li>
<li>Create connections and set weights between neurons in the network.</li>
<li>Set the input neuron values to <em>a</em> and <em>b</em>. Values can be either 1 or 0.</li>
<li>Print the initial state of the network.</li>
<li>Update every neuron in the network once.</li>
<li>Print the final state of the network.</li>
<li>Print the XOR result.</li>
</ol>
<p>Feel free to use and abuse as you wish.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.craig-russell.co.uk/c-neural-network/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MyLineup Festival Band Tracker for Android</title>
		<link>http://www.craig-russell.co.uk/mylineup-festival-band-tracker-for-android-phones/</link>
		<comments>http://www.craig-russell.co.uk/mylineup-festival-band-tracker-for-android-phones/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 13:28:10 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.craig-russell.co.uk/?p=221</guid>
		<description><![CDATA[MyLineup is a simple app for Android phones which allows you to keep track of the artists you want to see at all the festivals your going to this summer. Please note, this is still in (very early) beta, so if you encounter any bugs, let me know in the comments below. To install, visit [...]]]></description>
			<content:encoded><![CDATA[<p class=alignc><a href="http://www.craig-russell.co.uk/wp-content/uploads/2009/07/mlineup-ss1.JPG"><img class="aligncenter size-medium wp-image-222" title="mlineup-ss1" src="http://www.craig-russell.co.uk/wp-content/uploads/2009/07/mlineup-ss1-199x300.jpg" alt="mlineup-ss1" width="199" height="300" /></a></p>
<p>MyLineup is a simple app for Android phones which allows you to keep track of the artists you want to see at all the festivals your going to this summer.</p>
<p>Please note, this is still in (very early) beta, so if you encounter any bugs, let me know in the comments below.</p>
<p>To install, visit this page on your android phone and click the link below.</p>
<p class=alignc><strong><a href="http://www.craig-russell.co.uk/wp-content/uploads/2009/07/myLineup.apk">Click Here To Download myLineup</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.craig-russell.co.uk/mylineup-festival-band-tracker-for-android-phones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BASH Variable Scope in While Loop</title>
		<link>http://www.craig-russell.co.uk/bash-variable-scope-in-while-loop/</link>
		<comments>http://www.craig-russell.co.uk/bash-variable-scope-in-while-loop/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 16:12:41 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.craig-russell.co.uk/?p=164</guid>
		<description><![CDATA[Here&#8217;s an annoying little foible of BASH shell scripting. I&#8217;ve been trying to writea script to test authorization against a list of servers, and fire off an email if any of the servers doesn&#8217;t respond. The lis tof servers is in a text file, and I&#8217;ve got a while loop to itterate through, testing line [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an annoying little foible of BASH shell scripting.</p>
<p>I&#8217;ve been trying to writea script to test authorization against a list of servers, and fire off an email if any of the servers doesn&#8217;t respond. The lis tof servers is in a text file, and I&#8217;ve got a while loop to itterate through, testing line by line. If any of the tests fails then, I&#8217;d change a flag variable from its default value of &#8220;FALSE&#8221; to &#8220;TRUE&#8221;. After the loop I can test the value of the flag variable, and send an email accordingly.</p>
<p>The problem I was having is that the variable scope didn&#8217;t seem to extend beyond the while loop, so the final check always showed that the flag was set to FALSE, even if it was changed within the loop.</p>
<p>My original script looked something like this&#8230;</p>
<pre class="brush: bash;">
SENDMAIL= grep &quot;^server:&quot; servers.file | while read line; do
    if [ testauth() ]; then
        SENDMAIL=&quot;TRUE&quot;
    fi
done

if [ SENDMAIL ]; then
    sendMail()
fi
</pre>
<p>The problem is that, I&#8217;ve piped my file through grep and in to the while loop. Because of the way the shell handles piped commands, the variable scope is limited to within the while loop. To get around this problem, you have to remove the pipe in to the while loop. In this case I chose to output to a temp file then read it in, but you can also pipe to a variable, then loop over the variable.</p>
<pre class="brush: bash;">
SENDMAIL= grep &quot;^server:&quot; servers.file &gt; servers.tmp

while read line; do
    if [ testauth() ]; then
        SENDMAIL=&quot;TRUE&quot;
    fi
done &lt; servers.tmp

if [ SENDMAIL ]; then
    sendMail()
fi
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.craig-russell.co.uk/bash-variable-scope-in-while-loop/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Xming the Xmerciless</title>
		<link>http://www.craig-russell.co.uk/xming-the-xmerciless/</link>
		<comments>http://www.craig-russell.co.uk/xming-the-xmerciless/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 16:08:26 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.craig-russell.co.uk/?p=11</guid>
		<description><![CDATA[For a while now I&#8217;ve been looking for an X server for Windows, so that I can start X applications from within a secure shell. Up until now Hummingbird has a been a fair solution, but I&#8217;ve never been too impressed with it. I&#8217;d never been able to get it working with PuTTY, so I [...]]]></description>
			<content:encoded><![CDATA[<p>For a while now I&#8217;ve been looking for an X server for Windows, so that I can start X applications from within a secure shell. Up until now Hummingbird has a been a fair solution, but I&#8217;ve never been too impressed with it. I&#8217;d never been able to get it working with <a href="http://www.putty.org/">PuTTY</a>, so I have had to revert to Hummingbird&#8217;s mediocre terminal client when I needed to run X apps. And when it&#8217;s running it sits in the way on my (already over cluttered) task bar.</p>
<p>But not any more! I&#8217;ve found <a href="http://www.straightrunning.com/XmingNotes/">Xming</a>, which is brilliant. It&#8217;s hardly new, but it&#8217;s new to me, so I&#8217;m excited. It works wonderfully with <a href="http://www.putty.org/">PuTTY</a>. It starts when I log in and runs in the background with nothing but a system tray icon. It does all sorts of other X&#8217;y stuff, but all I want from my X server, is for it to stay out the way until needed. Hummingbird didn&#8217;t, <a href="http://www.straightrunning.com/XmingNotes/">Xming </a>does. Lovely stuff.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.craig-russell.co.uk/xming-the-xmerciless/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
