<?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>BritishIdeas &#187; Andy</title>
	<atom:link href="http://www.britishideas.com/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.britishideas.com</link>
	<description>Interesting Tech Projects</description>
	<lastBuildDate>Sun, 23 Oct 2011 20:05:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Radio Controlled Aircraft for Stroke Victims</title>
		<link>http://www.britishideas.com/2011/10/23/radio-controlled-aircraft-for-stroke-victims/</link>
		<comments>http://www.britishideas.com/2011/10/23/radio-controlled-aircraft-for-stroke-victims/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 20:05:43 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[nunchuck]]></category>
		<category><![CDATA[radio control]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/?p=436</guid>
		<description><![CDATA[This post introduces my open source radio control project. It allows an RC aircraft to be controlled from a Wii Nunchuk, i.e. with one hand! Videos will be posted when they are available but so far it is working great in the flight simulator and with a stationary aircraft.
All documentation, source files and binary files]]></description>
			<content:encoded><![CDATA[<p>This post introduces my <a href="http://www.britishideas.com/open-radio-control/" target="_self">open source radio control project</a>. It allows an RC aircraft to be controlled from a Wii Nunchuk, i.e. with one hand! Videos will be posted when they are available but so far it is working great in the flight simulator and with a stationary aircraft.</p>
<p>All documentation, source files and binary files are available for free from this site, so you can build your own. Be sure to read the disclaimer before you start however.</p>
<p>I would love to hear your success stories using this modular system!</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d436').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d436" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d436').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d436').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2011/10/23/radio-controlled-aircraft-for-stroke-victims/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Package Installers for MonoMac</title>
		<link>http://www.britishideas.com/2011/09/25/creating-package-installers-for-monomac/</link>
		<comments>http://www.britishideas.com/2011/09/25/creating-package-installers-for-monomac/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 04:22:52 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[MonoMac]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/?p=394</guid>
		<description><![CDATA[When developing applications with Mono/MonoMac it is very useful to create an installer that bundles Mono with your application. MonoMac includes a utility for creating an installer but unfortunately it is bug ridden and limited. Here are the steps that work for me.
Note: make sure you have Xcode installed.

Delete any existing bundle. For example MyApplication.app.]]></description>
			<content:encoded><![CDATA[<p>When developing applications with Mono/MonoMac it is very useful to create an installer that bundles Mono with your application. MonoMac includes a utility for creating an installer but unfortunately it is bug ridden and limited. Here are the steps that work for me.</p>
<p>Note: make sure you have Xcode installed.</p>
<ul>
<li>Delete any existing bundle. For example MyApplication.app. This is important because if the bundle already exists when you try to create it MonoMac will give you the cryptic error message &#8220;Unhandled error in packaging&#8221;</li>
<li>In MonoDevelop go to Project -&gt; Create Mac Installer&#8230; and choose to only create a bundle<br />
<a href="http://www.britishideas.com/wp-content/uploads/2011/09/CreateMacInstaller.png"><img class="aligncenter size-full wp-image-395" title="CreateMacInstaller" src="http://www.britishideas.com/wp-content/uploads/2011/09/CreateMacInstaller.png" alt="" width="404" height="333" /></a><br />
This should create a bundle with a name like MyApplication.app</li>
<li>Start PackageMaker by going to Spotlight and searching for it. It can also be found in /Developer/Applications/Utilities.</li>
<li>Drag your bundle MyApplication.app to the left hand side of PackageMaker.</li>
<li>Select the package, click on &#8220;Components&#8221; and uncheck &#8220;Allow Relocation&#8221;<br />
<a href="http://www.britishideas.com/wp-content/uploads/2011/09/PackageMaker.png"><img class="aligncenter size-medium wp-image-396" title="PackageMaker" src="http://www.britishideas.com/wp-content/uploads/2011/09/PackageMaker-300x234.png" alt="" width="300" height="234" /></a></li>
<li>Build and run the installer</li>
</ul>
<p>You may or may not want to uncheck the option to allow relocation. On your development Mac if you don&#8217;t uncheck this then the installer will find a version of your application inside your MonoDevelop solution and overwrite it rather than putting it into /Applications. This makes it appear as if the installer didn&#8217;t work. On non-development Macs this option allows the application to be overwritten even if the user has moved it after installing an older version.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d394').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d394" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d394').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d394').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2011/09/25/creating-package-installers-for-monomac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Global Objects With MonoMac</title>
		<link>http://www.britishideas.com/2011/09/24/global-objects-with-monomac/</link>
		<comments>http://www.britishideas.com/2011/09/24/global-objects-with-monomac/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 04:12:53 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[MonoMac]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/?p=387</guid>
		<description><![CDATA[When developing for C# and using Windows Forms creating and using global objects is trivial:

public static class Program
{
  public static Foo MyFoo = new Foo();

  static void main()
  {
    Main = new MainForm(MyFoo);
  }
}

The same can&#8217;t be said for MonoMac. The mistake is to equate the static MainClass]]></description>
			<content:encoded><![CDATA[<p>When developing for C# and using Windows Forms creating and using global objects is trivial:</p>
<pre class="brush: csharp;">
public static class Program
{
  public static Foo MyFoo = new Foo();

  static void main()
  {
    Main = new MainForm(MyFoo);
  }
}
</pre>
<p>The same can&#8217;t be said for MonoMac. The mistake is to equate the static MainClass class as being the same as the WinForms Program class in the example shown.</p>
<p>The solution is to put the global class instantiation inside the NSApplication delegate. MonoMac creates this automatically and calls it AppDelegate. The above example becomes:</p>
<pre class="brush: csharp;">
public partial class AppDelegate : NSApplicationDelegate
{
  MainWindowController mainWindowController;

  public Foo MyFoo = new Foo();

  public AppDelegate ()
  {
  }

  public override void FinishedLaunching (NSObject notification)
  {
    mainWindowController = new MainWindowController(MyFoo);
    mainWindowController.Window.MakeKeyAndOrderFront(this);
  }
}
</pre>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d387').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d387" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d387').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d387').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2011/09/24/global-objects-with-monomac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Not All Wii Nunchuks Are Created Equal</title>
		<link>http://www.britishideas.com/2011/08/29/not-all-wii-nunchuks-are-created-equal/</link>
		<comments>http://www.britishideas.com/2011/08/29/not-all-wii-nunchuks-are-created-equal/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 20:46:14 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[nunchuck]]></category>
		<category><![CDATA[wii]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/?p=379</guid>
		<description><![CDATA[What is the difference between the two Nunchuks below?

Quite a lot actually. The one on the left was bought on ebay for £3.50 and came with no packaging or information. The one on the right was bought from Amazon for £11.20 and came with Nintendo packaging and a warranty. Read on for details of all]]></description>
			<content:encoded><![CDATA[<p>What is the difference between the two Nunchuks below?</p>
<p><a href="http://www.britishideas.com/wp-content/uploads/2011/08/nunchuks.jpg"><img class="aligncenter size-full wp-image-384" title="nunchuks" src="http://www.britishideas.com/wp-content/uploads/2011/08/nunchuks.jpg" alt="" width="300" height="322" /></a></p>
<p>Quite a lot actually. The one on the left was bought on ebay for £3.50 and came with no packaging or information. The one on the right was bought from Amazon for £11.20 and came with Nintendo packaging and a warranty. Read on for details of all the differences I discovered.<span id="more-379"></span></p>
<p><strong>Wiring</strong></p>
<p>The wiring of the knock-off defied logic with the red wire being used for the I2C SDA signal rather than supply voltage (which is a worldwide convention). This causes a lot of confusion as all the Wii Nunchuk wiring information you will find on the Internet describes how the genuine item is wired. The knock-off used blue for 3.3V, brown for ground, red for SDA and yellow for SCL. The only consistency with a genuine item is yellow for SCL. All the other wires are different.</p>
<p>Another important difference is that the genuine version uses shielded cable but the knock-off does not. That&#8217;s not great if you are using your Nunchuk in an environment with lots of EMI.</p>
<p><strong>Performance</strong></p>
<p>If the knock-off Nunchuk was slowly moved in any direction then all three accelerometer values would freeze until either the Nunchuk was jerked or it had been moved more than 30 degrees from when it froze. This is a total disaster for the application I need the Nunchuk for.</p>
<p>The knock-off Nunchuk would reach the maximum and minimum values for the joystick when the joystick was half way between the center and the edge. The genuine Nunchuk uses the full range of motion.</p>
<p>Another issue was that the knock-off version would not return data when the I2C clock was at 400kHz regardless of delays inserted. Dropping to 100kHz fixed the issue. Intermediate frequencies were not tested. The genuine version works fine at 400kHz.</p>
<p><strong>Lifespan</strong></p>
<p>The knock-off version stopped functioning properly after about two hours of use. When power is applied it sends zeros for all data for a few seconds before switching to sending FFH instead. Note that I was supplying 3.3V to the Nunchuk before anyone suggests that 5V is bad.</p>
<p><strong>Conclusion</strong></p>
<p>I think many of the issues come down to the accelerometer used. Perhaps I bought a defective unit, but my advice is to save yourself some time and hassle and get a genuine Nunchuk for your project. I&#8217;m sure some knock-off versions work fine &#8211; the problem is how can you tell which are OK?</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d379').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d379" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d379').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d379').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2011/08/29/not-all-wii-nunchuks-are-created-equal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reading a Wii Nunchuck Using I2C</title>
		<link>http://www.britishideas.com/2011/08/20/reading-a-wii-nunchuck-using-i2c/</link>
		<comments>http://www.britishideas.com/2011/08/20/reading-a-wii-nunchuck-using-i2c/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 23:20:52 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[nunchuck]]></category>
		<category><![CDATA[waveform]]></category>
		<category><![CDATA[wii]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/?p=374</guid>
		<description><![CDATA[There are plenty of descriptions on how to read the joystick, accelerometer and button values from a Wii Nunchuck using I2C but I haven&#8217;t seen any waveforms. So here are mine. Click on the images to see them in full size.
The I2C bus was running at about 100kHz. The time between the handshake and the]]></description>
			<content:encoded><![CDATA[<p>There are plenty of descriptions on how to read the joystick, accelerometer and button values from a Wii Nunchuck using I2C but I haven&#8217;t seen any waveforms. So here are mine. Click on the images to see them in full size.</p>
<p>The I2C bus was running at about 100kHz. The time between the handshake and the first data read sequence is about 1.8ms and the time between each subsequent data read sequence is also about 1.8ms, although I feel that these times can probably be reduced.</p>
<p>Unlike many code examples I have seen there are no delays between each write operation in the handshake or between the write and read operations of the data read sequence.</p>
<p>First up is the handshake to send &#8220;unencrypted&#8221; data:</p>
<p style="text-align: center;"><a href="http://www.britishideas.com/wp-content/uploads/2011/08/NunchuckHandshake.png"><img class="aligncenter size-full wp-image-375" title="NunchuckHandshake" src="http://www.britishideas.com/wp-content/uploads/2011/08/NunchuckHandshake.png" alt="" width="729" height="76" /></a></p>
<p>Next is the data read sequence containing a six byte chuck of data with the values we need:</p>
<p style="text-align: left;"><a href="http://www.britishideas.com/wp-content/uploads/2011/08/NunchuckFrame.png"><img class="aligncenter size-full wp-image-376" title="NunchuckFrame" src="http://www.britishideas.com/wp-content/uploads/2011/08/NunchuckFrame.png" alt="" width="805" height="65" /></a></p>
<p style="text-align: left;">
<p style="text-align: left;">Hopefully these will be useful to people developing application with a Wii Nunchuck.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d374').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d374" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d374').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d374').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2011/08/20/reading-a-wii-nunchuck-using-i2c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fast Reading of XML Files</title>
		<link>http://www.britishideas.com/2011/07/14/fast-reading-of-xml-files/</link>
		<comments>http://www.britishideas.com/2011/07/14/fast-reading-of-xml-files/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 22:47:33 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/?p=372</guid>
		<description><![CDATA[I recently had the need to parse 780MB XML files, and quickly. My preferred language for PC development is C# because I can work quickly and efficiently with it, however I was a bit wary of the speed of XML file processing. Thankfully Mike Taulty has worked out a solution using LINQ and XmlReader, providing]]></description>
			<content:encoded><![CDATA[<p>I recently had the need to parse 780MB XML files, and quickly. My preferred language for PC development is C# because I can work quickly and efficiently with it, however I was a bit wary of the speed of XML file processing. Thankfully Mike Taulty has <a href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2007/09/08/9803.aspx" target="_blank">worked out a solution using LINQ and XmlReader</a>, providing the user friendliness of LINQ with the speed of XmlReader.</p>
<p>An initial test showed that a 39MB XML file is processed in 4.9 seconds using Mono on a quad core server running Ubuntu. This is about 8MB/second which means that my 780MB file should be processed in around 98 seconds. Nice!</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d372').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d372" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d372').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d372').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2011/07/14/fast-reading-of-xml-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert Any Audio Source Into MP3</title>
		<link>http://www.britishideas.com/2011/07/06/convert-any-audio-source-into-mp3/</link>
		<comments>http://www.britishideas.com/2011/07/06/convert-any-audio-source-into-mp3/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 13:10:47 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[mp3]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/?p=364</guid>
		<description><![CDATA[Here is my method that I know works. If you have a better one feel free to post it in the comments section. It may not produce the best quality audio but I&#8217;m sure it can be improved.
Obtain a 3.5mm to 3.5mm audio cable, for example this one. Connect one end to the audio source]]></description>
			<content:encoded><![CDATA[<p>Here is my method that I know works. If you have a better one feel free to post it in the comments section. It may not produce the best quality audio but I&#8217;m sure it can be improved.</p>
<p>Obtain a 3.5mm to 3.5mm audio cable, for example <a href="http://www.amazon.com/Cables-Unlimited-AUD-1100-06-6-Feet-Stereo/dp/B000SE6IV8" target="_blank">this one</a>. Connect one end to the audio source (for example a PC) and the other end to the microphone in on your linux box (I tried line in but that didn&#8217;t work for some reason).</p>
<p>Make sure ALSA utilities and ffmpeg are installed (at a console prompt):</p>
<pre class="brush: bash;">$ sudo apt-get install alsa-utils ffpmeg</pre>
<p>Start recording with:</p>
<pre class="brush: bash;">$ arecord -f cd -t wav test.wav</pre>
<p>Start the audio source and once complete press Ctrl-C to stop recording. Convert to MP3 with:</p>
<pre class="brush: bash;">$ ffmpeg -b 128k -i test.wav test.mp3</pre>
<p>I then run the file through <a href="http://mp3gain.sourceforge.net/" target="_blank">MP3Gain</a> as the recordings tend to be a bit quiet and add tags in iTunes.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d364').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d364" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d364').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d364').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2011/07/06/convert-any-audio-source-into-mp3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internationalization in Silverlight</title>
		<link>http://www.britishideas.com/2011/05/10/internationalization-in-silverlight/</link>
		<comments>http://www.britishideas.com/2011/05/10/internationalization-in-silverlight/#comments</comments>
		<pubDate>Tue, 10 May 2011 21:13:34 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/?p=362</guid>
		<description><![CDATA[For some reason Microsoft have made it difficult to work out how to support multiple languages in Silverlight. The solution isn&#8217;t hard, once you manage to work it out. It is complicated by the fact that accessing string tables in C# is completely different to accessing them in XAML. Plus there is a nasty bug]]></description>
			<content:encoded><![CDATA[<p>For some reason Microsoft have made it difficult to work out how to support multiple languages in Silverlight. The solution isn&#8217;t hard, once you manage to work it out. It is complicated by the fact that accessing string tables in C# is completely different to accessing them in XAML. Plus there is a nasty bug in Visual Studio which apparently still isn&#8217;t fixed.</p>
<p>However, never fear. After trying several approaches, all of which failed in some way, the solution can be found on <a href="http://timheuer.com/blog/archive/2009/08/26/silverlight-string-localization.aspx" target="_blank">timheuer.com</a>. Tim presents a clear and straightforward method without needing to do anything weird (except for the Visual Studio bug workaround).</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d362').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d362" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d362').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d362').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2011/05/10/internationalization-in-silverlight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Graphing Ping Times</title>
		<link>http://www.britishideas.com/2011/03/29/graphing-ping-times/</link>
		<comments>http://www.britishideas.com/2011/03/29/graphing-ping-times/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 21:14:33 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[networks]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/?p=355</guid>
		<description><![CDATA[I recently had the need to generate a graph of ping times between my PC and a British Telecom server. After a quick web search the only options I found were commercial programs or free software that was incredibly bloated, complex to configure and with lots of dependencies. There must be a simpler way, and]]></description>
			<content:encoded><![CDATA[<p>I recently had the need to generate a graph of ping times between my PC and a British Telecom server. After a quick web search the only options I found were commercial programs or free software that was incredibly bloated, complex to configure and with lots of dependencies. There must be a simpler way, and there is. Perl.</p>
<p>Here is my script:</p>
<pre class="brush: perl;">
#!/usr/bin/perl
# Converts ping output into a CSV file for graphing
# andy at british ideas dot com - March 29th 2011
# Public Domain
# Run using:
# ping -D 100.101.102.103 | ./pingtocsv.pl &gt; output.csv
# or:
# cat pingdump.txt | ./pingtocsv.pl &gt; output.csv
print &quot;Measurement Time,Ping Time\n&quot;;
while (&lt;STDIN&gt;) {
  if ($_ =~ m/^\[([0-9\.]+)\].*time\=([0-9\.]+).*/i) {
    print &quot;$1,$2\n&quot;;
  }
}
close(STDIN);
</pre>
<p><span id="more-355"></span>Run this using something like:</p>
<pre>ping -D 100.101.102.103 | ./perltocsv.pl &gt; pingtimes.csv</pre>
<p>This will generate a CSV file. Hit Ctrl-C to terminate. Now use LibreOffice to open the CSV file and generate a graph. Here is mine (click to enlarge):</p>
<p><a href="http://www.britishideas.com/wp-content/uploads/2011/03/badping.png"><img class="aligncenter size-medium wp-image-356" title="Ping Graph" src="http://www.britishideas.com/wp-content/uploads/2011/03/badping-300x150.png" alt="" width="300" height="150" /></a></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d355').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d355" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d355').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d355').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2011/03/29/graphing-ping-times/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Progress of Linux</title>
		<link>http://www.britishideas.com/2011/03/04/the-progress-of-linux/</link>
		<comments>http://www.britishideas.com/2011/03/04/the-progress-of-linux/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 11:51:21 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/?p=351</guid>
		<description><![CDATA[Back in 1998 I tried installing RedHat 6 on a spare PC. When the desktop loaded it was, ummm, wobbly. I then spent the best part of the next two weeks fighing with X configuration files setting obscure items such as front and back porches in a futile attempt to stabilize the display so it]]></description>
			<content:encoded><![CDATA[<p>Back in 1998 I tried installing RedHat 6 on a spare PC. When the desktop loaded it was, ummm, wobbly. I then spent the best part of the next two weeks fighing with X configuration files setting obscure items such as front and back porches in a futile attempt to stabilize the display so it would be usable. I gave up.</p>
<p>Fast forward to March 2011 and Ubuntu 10.10. I&#8217;ve used lots of different versions of Ubuntu since 2006 on a variety of machines including for CNC control, but the last time I installed in a dual boot system was two years ago. Ubuntu 10.10 works fine in a virtual machine inside Windows 7 but I wanted to run it at full speed.<span id="more-351"></span></p>
<p>I had a blank PC with two hard drives, both blank and installed Windows 7 on the first one. That went fine.</p>
<p>Next I installed Ubuntu 10.10 on the second blank drive choosing the option to install &#8220;alongside another operating system&#8221;. That&#8217;s when it went pear-shaped of course.</p>
<p>The first issue was when I was prompted to reboot. That produced a cascade of errors saying the hard drive that it just installed on wasn&#8217;t accessible. Eh? Then it stopped and I had to use the reset button.</p>
<p>Upon booting there was no grub bootloader! It went straight to Ubuntu. OK, fine. I know where /boot/grub/menu.lst is so this will be easy to fix. No such luck. Things have obviously changed and now I am back in 1998 searching web pages for possible solutions on how to avoid reinstalling Windows 7.</p>
<p>First attempt: gedit /etc/default/grub. Oops. Obscure error time again.</p>
<p>Second attempt: I know nano and at least that worked giving me access to the file. Sadly the contents of the file don&#8217;t show any references to kernels like I expected.</p>
<p>Third attempt: apt-get install startupmanager. Looks good. Shows Ubuntu as the only option though. No way to add additional operating systems &#8211; how useless is that?</p>
<p>The last issue I noticed is that Ubuntu failed to detect I had two monitors and stretch the desktop automatically. This is after installing the proprietary ATI drivers. I remember the Linux Action Show complaining of this exact issue with Ubuntu over two years ago!</p>
<p>At this point I am fed up and regretting venturing back into the Ubuntu world. I don&#8217;t want to spend hours working out how to get access back to Windows 7. Perhaps I am too stupid to use it?</p>
<p>If this is how the user experience is after years of hard work then I can&#8217;t see how Linux will ever make any significant gain on the desktop.</p>
<p>Some things never change.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d351').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d351" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d351').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d351').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2011/03/04/the-progress-of-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

