<?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>That Scottish Engineer</title>
	<atom:link href="http://www.thatscottishengineer.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thatscottishengineer.co.uk</link>
	<description>Alistair Marshall&#039;s Personal Site</description>
	<lastBuildDate>Sat, 16 Feb 2013 11:32:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Skipping a gtk.Assistant Page Using set_forward_page_func()</title>
		<link>http://www.thatscottishengineer.co.uk/2013/02/skipping-a-gtk-assistant-page-using-set_forward_page_func/</link>
		<comments>http://www.thatscottishengineer.co.uk/2013/02/skipping-a-gtk-assistant-page-using-set_forward_page_func/#comments</comments>
		<pubDate>Sat, 16 Feb 2013 11:32:02 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[rednotebook]]></category>

		<guid isPermaLink="false">http://www.thatscottishengineer.co.uk/?p=229</guid>
		<description><![CDATA[A.K.A. Skipping Page 3! I regularly use the excellent rednotebook for my daily notes at work. I recently decided I wanted to add a feature to the export dialogue which would allow the user to export only a selection of &#8230; <a href="http://www.thatscottishengineer.co.uk/2013/02/skipping-a-gtk-assistant-page-using-set_forward_page_func/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<h2>A.K.A. Skipping Page 3!</h2>
<p>I regularly use the excellent <a title="rednotebook" href="http://rednotebook.sourceforge.net/">rednotebook</a> for my daily notes at work. I recently decided I wanted to add a feature to the export dialogue which would allow the user to export only a selection of text.   A code reviewer suggested that, if the user has selected this new export option on one page, the next page is not relevant and should be skipped. Easier said than done.</p>
<p>The export dialogue makes use of <code>gtk.Assistant</code>. Having looked at the <a title="pygtk documentation" href="http://www.pygtk.org/docs/pygtk/class-gtkassistant.html">documentation</a>, I found <code>def set_forward_page_func(page_func, data)</code> and got my hopes up. Unfortunately, I was unable to find any examples of this code in action. After much trial and error, I found that the <code>page_func</code> needs to accept <code>page</code> (the index of the current page) and needs to return the index of the next page to go to.</p>
<p>I found an example of <code>gtk.Assistant</code> from <a title="pygtk-tutorial Assistant.py" href="http://gitorious.org/pygtk-tutorial/pygtk-tutorial/blobs/master/examples/assistant.py">pygtk-tutorial</a> on gitorious.org and have edited it here to include the ability to skip page 3. I hope this helps someone!</p>
<pre class="brush: python; title: ; notranslate">
#!/usr/bin/env python

import gtk

class Assistant:
    def __init__(self):
        assistant = gtk.Assistant()

        assistant.connect(&quot;apply&quot;, self.button_pressed, &quot;Apply&quot;)
        assistant.connect(&quot;cancel&quot;, self.button_pressed, &quot;Cancel&quot;)

        vbox = gtk.VBox()
        vbox.set_border_width(5)
        page = assistant.append_page(vbox)
        assistant.set_page_title(vbox, &quot;Page 1: Starting Out&quot;)
        assistant.set_page_type(vbox, gtk.ASSISTANT_PAGE_INTRO)
        label = gtk.Label(&quot;This is an example label within an Assistant. The Assistant is used to guide a user through configuration of an application.&quot;)
        label.set_line_wrap(True)
        vbox.pack_start(label, True, True, 0)
        assistant.set_page_complete(vbox, True)

        vbox = gtk.VBox()
        vbox.set_border_width(5)
        assistant.append_page(vbox)
        assistant.set_page_title(vbox, &quot;Page 2: Moving On...&quot;)
        assistant.set_page_type(vbox, gtk.ASSISTANT_PAGE_CONTENT)
        label = gtk.Label(&quot;This is an example of a label and checkbox within a page. If this box is checked, the assistant will skip page 3.&quot;)
        label.set_line_wrap(True)
        self.checkbutton = gtk.CheckButton(&quot;Skip next page&quot;)
        vbox.pack_start(label, True, True, 0)
        vbox.pack_start(self.checkbutton, False, False, 0)
        assistant.set_page_complete(vbox, True)

        vbox = gtk.VBox()
        vbox.set_border_width(5)
        assistant.append_page(vbox)
        assistant.set_page_title(vbox, &quot;Page 3: The skipped page&quot;)
        assistant.set_page_type(vbox, gtk.ASSISTANT_PAGE_CONTENT)
        label = gtk.Label(&quot;This is an example of a page that contains information that may be skipped depending on the status of the previous pages.&quot;)
        label.set_line_wrap(True)
        button = gtk.Button(&quot;Button Example&quot;)
        vbox.pack_start(label, True, True, 0)
        vbox.pack_start(button, False, False, 0)
        assistant.set_page_complete(vbox, True)

        vbox = gtk.VBox()
        vbox.set_border_width(5)
        assistant.append_page(vbox)
        assistant.set_page_title(vbox, &quot;Page 4: The Finale&quot;)
        assistant.set_page_type(vbox, gtk.ASSISTANT_PAGE_CONFIRM)
        label = gtk.Label(&quot;This is the final page of the Assistant widget. It would be used to confirm the preferences we have set in the previous pages.&quot;)
        label.set_line_wrap(True)
        vbox.pack_start(label, True, True, 0)
        assistant.set_page_complete(vbox, True)

        assistant.show_all()
        # Set an alternative function to return the next page to go to
        assistant.set_forward_page_func(self.pageforward)

    def pageforward(self,page):
        &quot;&quot;&quot;
        Function called when the forward button is pressed,
        Arguments:
            page:
                integer index of the current page
        returns:
            integer index of the next page to display
        &quot;&quot;&quot;
        if page == 1 and self.checkbutton.get_active():
            return 3
        else:
            return page+1

    def button_pressed(self, assistant, button):
        print &quot;%s button pressed&quot; % button
        gtk.main_quit()

Assistant()
gtk.main()
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.thatscottishengineer.co.uk/2013/02/skipping-a-gtk-assistant-page-using-set_forward_page_func/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Graduate recruitment</title>
		<link>http://www.thatscottishengineer.co.uk/2012/05/graduate-recruitment/</link>
		<comments>http://www.thatscottishengineer.co.uk/2012/05/graduate-recruitment/#comments</comments>
		<pubDate>Tue, 15 May 2012 20:49:22 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[Chemical Engineering]]></category>

		<guid isPermaLink="false">http://www.thatscottishengineer.co.uk/?p=218</guid>
		<description><![CDATA[I was recently asked by a current student at Edinburgh University about my insight with finding a graduate job and the employment prospects someone in their final year would have. Below is my response: To be honest, I got very &#8230; <a href="http://www.thatscottishengineer.co.uk/2012/05/graduate-recruitment/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><strong id="internal-source-marker_0.904196065152064">I was recently asked by a current student at Edinburgh University about my insight with finding a graduate job and the employment prospects someone in their final year would have. Below is my response:</strong></p>
<p>To be honest, I got very lucky with my graduate job, I didn&#8217;t apply for nearly as many positions that I, in hindsight, should have done. I must stress that this is from my own personal experience and may not be the best answer for anyone else.</p>
<p>There are jobs out there and they must all be filled by someone. The main thing is to apply for as many jobs as you can. It does not matter how many people turn you down, it takes only one to accept you and you are sorted.</p>
<p>What worked for me was uploading my CV to different job sites like monster.co.uk and linkedin.com. The site that my graduate employer actually found me through was gradcracker.com. Once your CV and profile have been added, it is important to edit and update them. With some of these sites, they sort candidates by activity, so each time you update it, you go back to the top of the pile.</p>
<p>What also helped with both my graduate and current jobs was having my own website (not the current version, the one I had when graduating was lost when the server I was using died). I used my website as an extended CV. Where my CV had a short paragraph with only the most relevant work placements, my website had several paragraphs and covered more of my previous jobs and voluntary positions as well as a separate page detailing different projects and presentations I have been involved in (including the final reports for my research and group projects for my final years).</p>
<p>Once you get through to the interview stage, you want to come across as keen and interested. The most obvious way is to ask lots of questions.</p>
<p>I have only had a brief experience with graduate recruitment from a recruiter&#8217;s perspective where I was asked to give candidates a tour of the factory before their main interview. I was then asked by the main interviewers how they got on. They were looking for candidates that would happily have a conversation with other workers when introduced to them on the tour. Another thing they were looking for were those that were asking lots of extra questions (why does it do that? how do you get round this problem?).</p>
<p>Don’t get demoralised when you get a rejection. I remember getting really bothered by one company that turned me down early on. However once I found out which candidates they did take on, I was glad I hadn&#8217;t gotten the job. They were looking for people that were much more assertive and commanding, which did not suit me. I suspect that if I had gotten the job, I would not have enjoyed it. When you do get a rejection, ask what their reasons were. The worst they can do is ignore you and you might get some good feedback.</p>
<p>As I said at the beginning, the more places you apply to, the better your chances of finding someone who will give you an offer.</p>
<p>I wish you the best of luck with your search.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thatscottishengineer.co.uk/2012/05/graduate-recruitment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sudo = Please</title>
		<link>http://www.thatscottishengineer.co.uk/2011/12/sudo-please/</link>
		<comments>http://www.thatscottishengineer.co.uk/2011/12/sudo-please/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 18:52:52 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://thatscottishengineer.wordpress.com/?p=195</guid>
		<description><![CDATA[After a comment I made the other day, I remembered the sudo make me a sandwich xkcd comic It occured to me that commanding someone by saying &#8216;sudo make me &#8230;&#8217; is not very nice and it would be better &#8230; <a href="http://www.thatscottishengineer.co.uk/2011/12/sudo-please/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>After a comment I made the other day, I remembered the <em>sudo make me a sandwich</em> xkcd comic</p>
<p><a href="http://xkcd.com/149/"><img class="alignnone" title="XKCD: Sandwich" src="http://imgs.xkcd.com/comics/sandwich.png" alt="Proper User Policy apparently means Simon Says." width="360" height="299" /></a></p>
<p>It occured to me that commanding someone by saying &#8216;sudo make me &#8230;&#8217; is not very nice and it would be better to say &#8216;please make me &#8230;&#8217;. I wondered if my computers would appreciate the same politeness.</p>
<p>I have now set up my computers with an alias so that if you type &#8216;please&#8217;, it acts like you typed &#8216;sudo&#8217;.</p>
<p>The command to do this yourself is:</p>
<p><code>alias please='sudo'</code></p>
<div id="post_message_489909">To make these permanent you can put the alias lines to your ~/.bash_profile file. Now you can have fun and ask nicely:</div>
<p>&nbsp;</p>
<p><code>marshall@revo:/var/local$ mkdir stuff<br />
mkdir: cannot create directory `stuff': Permission denied<br />
marshall@revo:/var/local$ please mkdir stuff<br />
[sudo] password for marshall:<br />
marshall@revo:/var/local$<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thatscottishengineer.co.uk/2011/12/sudo-please/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Phone Dialer</title>
		<link>http://www.thatscottishengineer.co.uk/2011/11/phone-dialer/</link>
		<comments>http://www.thatscottishengineer.co.uk/2011/11/phone-dialer/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 17:37:59 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://thatscottishengineer.wordpress.com/?p=193</guid>
		<description><![CDATA[After having to use conference calling to an international number for work, then dial the meeting room code, I decided to have a go at a project idea I had over a year ago. I wanted to create a webapp &#8230; <a href="http://www.thatscottishengineer.co.uk/2011/11/phone-dialer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div>After having to use conference calling to an international number for work, then dial the meeting room code, I decided to have a go at a project idea I had over a year ago. I wanted to create a webapp that would, given a number, ‘dial’ that number using the touch tones through the computers speakers. Then you could hold your land line up to the computer and get the computer to dial for you.</p>
<p>I know this may sound like ultimate laziness but when you have to rejoin the conference call after a technical failure, it would have been nice just to copy and paste the number into a field and press dial and get a computer to do it for you rather than having to transcribe the numbers, mess it up, try again&#8230;</p>
<p>It would also be useful for when you look up a number online. Again this thing would be faster and avoid getting the wrong number.</p>
<p>Anyway, I tried again over the weekend and have created a quick demo. I used the files found on <a title="Wikipedia: Dual-tone multi-frequency signaling" href="http://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling#Keypad" target="_blank">wikipedia</a> and then converted them to mp3 and shortened them to .25seconds.</p>
<p>You can try the demo if you like, I make no guarantee anything but it should work.<br />
<a href="http://amar.homelinux.com/dialer">http://amar.homelinux.com/dialer</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.thatscottishengineer.co.uk/2011/11/phone-dialer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Impress Update</title>
		<link>http://www.thatscottishengineer.co.uk/2009/07/impress-update/</link>
		<comments>http://www.thatscottishengineer.co.uk/2009/07/impress-update/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 16:24:00 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[Impress]]></category>

		<guid isPermaLink="false">http://thatscottishengineer.wordpress.com/2009/07/27/impress-update</guid>
		<description><![CDATA[I have recently had some spare time and chose to use it updating impress adding some new features. For anyone who has not heard me talk about impress: it is a simple mass balance tool designed for chemical engineers to &#8230; <a href="http://www.thatscottishengineer.co.uk/2009/07/impress-update/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I have recently had some spare time and chose to use it updating impress adding some new features.</p>
<p>For anyone who has not heard me talk about impress: it is a simple mass balance tool designed for chemical engineers to use during the early stages of design. This application is simple and allows the user to generate approximate flowrates of different components through different streams. It is particularly useful when a number of recycle streams are used.</p>
<p>The main new feature added is a semi-natural language parser for new process descriptions. When generating a new process, the user first inputs all the components, then is directed to the &#8216;new process description&#8217; page. Here the user enters a text description about the process layout. Below the text, an image of the process layout is automatically updated.</p>
<p>Example: &#8220;A and B to C to D to E and F&#8221;</p>
<p style="text-align: left;"><a href="http://www.thatscottishengineer.co.uk/wp-content/uploads/2010/10/impress11.png"><img class="aligncenter" style="border-color: initial; border-style: initial; border-width: 0;" src="http://www.thatscottishengineer.co.uk/wp-content/uploads/2010/10/impress11.png?w=300" alt="" width="300" height="106" border="0" /></a>Example: &#8220;Main-feed and Recycle mix, react separate to Product-stream and Recycle&#8221;</p>
<p style="text-align: left;"><a href="http://thatscottishengineer.files.wordpress.com/2009/07/impress21.png"><img class="aligncenter" style="border-color: initial; border-style: initial; border-width: 0;" src="http://thatscottishengineer.files.wordpress.com/2009/07/impress21.png?w=300" alt="" width="300" height="71" border="0" /></a>The application will look for text such as &#8216;mix&#8217;, &#8216;react&#8217;, &#8216;separate&#8217;, &#8216;split&#8217; and use this information to identify the type of unit. Any word that is capitalised is converted into a unit name. Once the form is submitted, the units and associated streams are automatically generated, allowing the user to continue to input the extra information such as Component feed flowrates and reactions in reactors. This new feature allows for very fast process generation.</p>
<p>There has also been the introduction of many more smaller updates that should make the overall experience smoother including changing the default flowrate units to Kg/hr or Kmol/hr and adding JavaScript interactivity to the new component page.</p>
<p>Unfortunately as part of the update, there were difficulties with the database and as the previous version was considered alpha, it was decided to wipe the database and start again. I believe these new features should make the application more usable and welcome any feedback on any areas that still need improvement.</p>
<p><a href="http://impress.thatscottishengineer.co.uk/">http://impress.thatscottishengineer.co.uk</a> (link is dead, contact me if you wish to try it out)<br />
Share and Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thatscottishengineer.co.uk/2009/07/impress-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MythTV setup</title>
		<link>http://www.thatscottishengineer.co.uk/2009/06/mythtv-setup/</link>
		<comments>http://www.thatscottishengineer.co.uk/2009/06/mythtv-setup/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 11:12:00 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[MythTV]]></category>

		<guid isPermaLink="false">http://thatscottishengineer.wordpress.com/2009/06/13/mythtv-setup</guid>
		<description><![CDATA[So a few weeks ago I was having fun trying to set-up MythTV in my flat. I had a laptop [1] sitting plugged into my TV for a while. I have a Freecom Digital TV USB DVB-T Freeview Receiver [2] &#8230; <a href="http://www.thatscottishengineer.co.uk/2009/06/mythtv-setup/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>So a few weeks ago I was having fun trying to set-up MythTV in my flat. I had a laptop [1] sitting plugged into my TV for a while. I have a <span class="misspell">Freecom</span> Digital TV <span class="misspell">USB</span> <span class="misspell">DVB</span>-T <span class="misspell">Freeview</span> Receiver [2] plugged in and working fine under Kaffeine [3] however Kaffeine is not designed to be used on a TV screen.</p>
<p>I installed MythTV from the repositories and went through the setup. It went mostly without any problems (though some of the questions were kind of difficult to understand) and scanned to find the channels. My first major gripe was with this scan. It took ages! As in hours. Kaffeine manages to scan and receive the channels much faster than that. Surely there must be a timeout set wrongly somewhere.</p>
<p>Anyway &#8211; though it took ages, It did manage to find all the channels, I then finished up and attempted to enter the <span class="misspell">frontend</span>. All good. Now watch some TV. Whenever I selected &#8220;Watch TV&#8221;, the screen would just go blank for a fraction of a second then return me to the main menu. There is a thread on Ubuntu forums [4] that explains it nicely however the thread did not provide a nice solution. The only bit of &#8216;help&#8217; was the comment by <span class="misspell">ian</span> <span class="misspell">dobson</span> &#8220;What are the frequencies saved in the MySQL database? I had to manually correct the frequency in the channels table using <span class="misspell">MythWeb</span>.&#8221;</p>
<p>This comment was good because it pointed out that yes, whilst the scan for the channels worked fine, it failed to put the correct (or in fact any) frequencies in the database, if is utterly useless because as far as I can tell, there is no method of putting these frequencies in using <span class="misspell">mythweb</span>. What I had to do was install phpMyAdmin [5] and edit the tables using that. installing phpMyAdmin also proved to be rather difficult due to the fact that I had not set passwords correctly however that was a hole different saga which I can&#8217;t remember the finer details. However I was able to solve that issue with a bit of searching the web.</p>
<p>once phpMyAdmin was installed and I could log in and edit the tables, I found the two important tables were &#8216;channel&#8217; and &#8216;<span class="misspell">dtv</span>_multiplex&#8217;. <span class="misspell">AFAIKT</span>, digital TV is broadcast on about 6 different frequencies (or multiplex) with many channels on each multiplex. When scanning for channels, MythTV failed to insert the correct frequency for these multiplexes. I was able to work out the correct frequencies using Kaffeine. This is the tedious part.</p>
<p>Using the channels table, I was able to find one channel on each multiplex and write it down. Then find the correct frequency for that channel from Kaffeine. Then input the correct frequency into the <span class="misspell">dtv</span>_multiplex table and after much fiddling and hacking around (some swear words may have also been uttered) it worked!</p>
<p>[1] Kaylee &#8211; <span class="reviewArticleHead">Philips Freevents X56</span><br />[2] as shown <a href="http://www.reviewcentre.com/reviews96386.html">http://www.reviewcentre.com/reviews96386.html</a><br />[3] <a href="http://kaffeine.kde.org/">http://kaffeine.kde.org/</a><br />[4] <a href="http://ubuntuforums.org/showthread.php?t=752321">http://ubuntuforums.org/showthread.php?t=752321</a><br />[5] <a href="http://www.phpmyadmin.net/">http://www.phpmyadmin.net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thatscottishengineer.co.uk/2009/06/mythtv-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing IMPRESS</title>
		<link>http://www.thatscottishengineer.co.uk/2009/01/introducing-impress/</link>
		<comments>http://www.thatscottishengineer.co.uk/2009/01/introducing-impress/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 12:05:00 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Impress]]></category>

		<guid isPermaLink="false">http://thatscottishengineer.wordpress.com/2009/01/29/introducing-impress</guid>
		<description><![CDATA[Introducing IMPRESS: the Interactive Multi-user PRocess EngineeringSimulation Suite. As my final year ChemEng research project I have built a program that helps build a mass balance for processes. The program is accessed through a web page (so you don&#8217;t need &#8230; <a href="http://www.thatscottishengineer.co.uk/2009/01/introducing-impress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Introducing <span class="nfakPe">IMPRESS</span>: the Interactive Multi-user PRocess Engineering<br />Simulation Suite.</p>
<p>As my final year ChemEng research project I have built a program that helps build a mass balance for processes.</p>
<p>The program is accessed through a web page (so you don&#8217;t need to<br />install anything)  and can handle having more than one user working on<br />the same process.</p>
<p>The program allows the user to export the data as an excel spreadsheet to do with<br />as they wish.</p>
<p>The program can be accessed from:<br /><a href="http://impress.thatscottishengineer.co.uk/" target="_blank">http://<span class="nfakPe">impress</span>.thatscottishengineer.co.uk</a></p>
<p>I have uploaded a tutorial video explaining how to use the<br />program to youtube, though there are times in the video when the image<br />freezes. It should still be useful and I will try and create a<br />better copy at some point.<br /><a href="http://www.youtube.com/watch?v=UCtz0K8nJYI" target="_blank">http://www.youtube.com/watch?v=UCtz0K8nJYI</a></p>
<p>If you have any problems, suggestions or<br />comments feel free to email me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thatscottishengineer.co.uk/2009/01/introducing-impress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Time Entry Field</title>
		<link>http://www.thatscottishengineer.co.uk/2008/09/javascript-time-entry-field/</link>
		<comments>http://www.thatscottishengineer.co.uk/2008/09/javascript-time-entry-field/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 08:42:00 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[KRacer]]></category>

		<guid isPermaLink="false">http://thatscottishengineer.wordpress.com/2008/09/03/javascript-time-entry-field</guid>
		<description><![CDATA[For a project I am doing for my dad, I created a form that requires the user to input lots of times. This was to be done in the format &#8220;HH:MM:SS&#8221;. After I created the form and handed the project &#8230; <a href="http://www.thatscottishengineer.co.uk/2008/09/javascript-time-entry-field/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>For a project I am doing for my dad, I created a form that requires the user to input lots of times. This was to be done in the format &#8220;HH:MM:SS&#8221;. After I created the form and handed the project over for testing, it was mentioned that typing a colon is a pain and it would be nice if it was filled in automatically.</p>
<p>No problem!</p>
<p>So I set the default value of the field to &#8220;00:00:00&#8243;. This did not help, because you need to overwrite the existing information and it became a pain.</p>
<p>Ach well &#8211; I&#8217;ll use javascript</p>
<p>So I thought that this must be a fairly simple task and used quite regularly on the internet in different places so I started looking around for &#8220;javascript time data entry&#8221; and other searches. Unfortunately this only brought up many javascript calendars to enter dates and javascipt clocks to show an analogue or digital clock on your page.</p>
<p>I DON&#8217;T WANT THAT!!!</p>
<p>So instead I hacked myself.</p>
<blockquote><p>&lt;script type=&#8221;text/javascript&#8221; charset=&#8221;utf-8&#8243;&gt;<br />// &lt;![CDATA[<br />document.onkeyup = function keyPress(event)<br />{<br />field = document.getElementById('time');<br />str = field.value.split(":");<br />if (str.length  2) &amp;&amp; !(str.charAt(2)=='.')){<br />     indx = field.value.lastIndexOf(':')+3;<br />     field.value = field.value.slice(0,indx)+"." +<br />                   field.value.slice(indx);<br /> }<br />}<br />}<br />// ]]&gt;<br />&lt;/script&gt;</p></blockquote>
<p>with this script embedded in the  of the document (or an external js file), the field with id &#8220;time&#8221; would be checked every time a key (or click) has been pressed. If there are 2 characters after the last colon, then a colon is inserted until 3 blocks of characters have been entered. After this if the user keeps typing, a &#8220;.&#8221; is inserted after the first 2 characters after that last colon to allow inputting of sub second accuracy.</p>
<p>Unfortunatly am having issues with blogger displaying a demonstration but I can link you to <a href="http://www.thatscottishengineer.co.uk/code/time_entry.html">a simple html file</a> with all the code you need</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thatscottishengineer.co.uk/2008/09/javascript-time-entry-field/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More Fun With ImpAmp</title>
		<link>http://www.thatscottishengineer.co.uk/2008/07/more-fun-with-impamp/</link>
		<comments>http://www.thatscottishengineer.co.uk/2008/07/more-fun-with-impamp/#comments</comments>
		<pubDate>Sun, 20 Jul 2008 15:11:00 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[ImpAmp]]></category>

		<guid isPermaLink="false">http://thatscottishengineer.wordpress.com/2008/07/20/more-fun-with-impamp</guid>
		<description><![CDATA[After another afternoon of playing with impAmp, I have updated the version of soundmanager2. This versions main addition is the ability to use flash 9 (instead of the current flash 8). Unfortunately when using flash 9, the ID3 Tag information &#8230; <a href="http://www.thatscottishengineer.co.uk/2008/07/more-fun-with-impamp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>After another afternoon of playing with <a href="http://launchpad.net/impamp">impAmp</a>, I have updated the version of soundmanager2. This versions main addition is the ability to use flash 9 (instead of the current flash 8). Unfortunately when using flash 9, the ID3 Tag information doesn&#8217;t show so is not enabled by default at the moment.</p>
<p>In anticipation of flash 9 working, I added multiShot support. MultiShot is where you can overlay the same sound effect on top of itself, ie with a gunshot you can set 3 shots off in a row without having to wait for the previous shot to finish. This will be useful for short sound effects but for music etc, I will leave the default that pressing the play again will stop the sound. I have implemented it however there is still another bug when using flash 9 apart form the missing id3 tags mentioned earlier. When you have sounds overlayed on top of each other, stopAll (pressing space) only stops the first of the overlayed sounds (so it doesn&#8217;t actually stop all)</p>
<p>Another feature I added this afternoon was the properties window. To access the properties window, hold down CTRL and click on a button. This will display a window including information about the sound clip. There is a bug where sometimes not all the information is shown. This appears to happen when the sound has been stopped. So if a song has not been played since the last refresh or if it is currently playing, it shows all the information. Not too sure how I am going to fix this, but I&#8217;ll find a way.</p>
<p>Also whilst creating the properties window I noticed a bug whereby the keyboard would become unresponsive. This is to do with the way the keyboard is disabled whilst ctrl is being pressed. To fix, just tap ctrl again. I&#8217;ll try to find a proper fix at some point.<br /><span style="font-style:italic;"><span style="font-weight:bold;"></span></span><br />
<blockquote><span style="font-style:italic;"><span style="font-weight:bold;">EDIT</span> &#8211; Fixed simply add</span><br /><span style="font-weight:bold;">onfocus=&#8221;mpc.disableKeys = false;&#8221;</span><br /><span style="font-style:italic;">to the &lt;body&gt; tag in the index.html file</span></p></blockquote>
<p>All my changes have been uploaded to launchpad and can be downloaded from <a href="http://code.launchpad.net/%7Eimpamp-devs/impamp/trunk">the trunk</a>:<br />bzr branch lp:impamp</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thatscottishengineer.co.uk/2008/07/more-fun-with-impamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ImpAmp on the eeePC</title>
		<link>http://www.thatscottishengineer.co.uk/2008/06/impamp-on-the-eeepc/</link>
		<comments>http://www.thatscottishengineer.co.uk/2008/06/impamp-on-the-eeepc/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 18:45:00 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[eeePC]]></category>
		<category><![CDATA[ImpAmp]]></category>

		<guid isPermaLink="false">http://thatscottishengineer.wordpress.com/2008/06/13/impamp-on-the-eeepc</guid>
		<description><![CDATA[So I am sitting at an athletics event using my eeePC in the sun. The Mat finished screen makes life much easier to see than with the glossy screen Kaylee had. I decided to try ImpAmp out using the default &#8230; <a href="http://www.thatscottishengineer.co.uk/2008/06/impamp-on-the-eeepc/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>So I am sitting at an athletics event using my eeePC in the sun. The Mat finished screen makes life much easier to see than with the glossy screen Kaylee had.</p>
<p>I decided to try ImpAmp out using the default xandros operating system and it works great (as expected) the eeePC comes with firefox and flash installed and whilst the usual flash instalation error was seen, it was quickly fixed.</p>
<p>using the small screen is fine, the width is automaticaly adjusted and the hight fits the screen perfecaly when using full screen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thatscottishengineer.co.uk/2008/06/impamp-on-the-eeepc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
