<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.1" -->
<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/"
	>

<channel>
	<title>The Back Burner</title>
	<link>http://www.archetype-it.com/thebackburner</link>
	<description>Occasional articles about our "back burner" projects, and handy technical tips</description>
	<pubDate>Tue, 29 Sep 2009 09:53:27 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
	<language>en</language>
			<item>
		<title>Preventing hotlinking of images</title>
		<link>http://www.archetype-it.com/thebackburner/2009/09/29/preventing-hotlinking-of-images/</link>
		<comments>http://www.archetype-it.com/thebackburner/2009/09/29/preventing-hotlinking-of-images/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 09:53:27 +0000</pubDate>
		<dc:creator>veronica</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Web development]]></category>

		<category><![CDATA[hotlinking]]></category>

		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://www.archetype-it.com/thebackburner/2009/09/29/preventing-hotlinking-of-images/</guid>
		<description><![CDATA[Using an .htaccess file to prevent people stealing bandwidth by linking directly to your images from another website is a popular and well-known technique. I needed to do this, but decided to take it a step further with a little added PHP.
Most solutions simply display another image (as polite or as rude as you like) [...]]]></description>
			<content:encoded><![CDATA[<p>Using an .htaccess file to prevent people stealing bandwidth by linking directly to your images from another website is a <a href="http://altlab.com/htaccess_tutorial.html">popular</a> and <a href="http://underscorebleach.net/jotsheet/2004/11/stop-image-hotlinking-tutorial-htaccess-apache">well-known</a> <a href="http://www.htaccesstools.com/hotlink-protection/">technique</a>. I needed to do this, but decided to take it a step further with a little added PHP.</p>
<p>Most solutions simply display another image (as polite or as rude as you like) in place of the hotlinked image. But I was curious to know <em>who</em> was linking to <em>which</em> images. Some of them might be legitimate users, in which case I could unblock them. Others might need to get a stiff warning about copyright.</p>
<p>For the .htaccess file, I used the technique <a href="http://underscorebleach.net/jotsheet/2004/11/stop-image-hotlinking-tutorial-htaccess-apache">here</a>. But the author was actually redirecting to another page with the requested image embedded in it. Hey, I&#8217;m trying to save bandwidth here! So I wrote a PHP script that would log the access and then display a small generic image advertising the website from which the image had been, er, &#8220;borrowed&#8221;. Here&#8217;s the .htaccess file:<br />
<code><br />
RewriteEngine On<br />
# hotlinked images<br />
RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g|png)$ [NC]<br />
RewriteCond %{HTTP_REFERER} !^$<br />
RewriteCond %{HTTP_REFERER} !mydomain\.com [NC]<br />
RewriteCond %{HTTP_REFERER} !myotherdomain\.com [NC]<br />
RewriteCond %{HTTP_REFERER} !alegitimatedomain\.com [NC]<br />
RewriteRule (.*) /blockimage.php?imagename=$1 [NC,L]<br />
# end hotlinked images<br />
</code><br />
This file, placed in the images directory, blocks all but the authorised domains and any blank referrers from accessing images. Notice that the image requested is passed to my blockimage.php script in the query string (that&#8217;s what the $1 does), because I&#8217;m going to use it later.</p>
<p>I could have logged accesses to a text file, but I have a MySQL database so I might as well use it; it will let me do further statistical analysis of the accesses too. I created the following table:<br />
<code><br />
CREATE TABLE Hotlinks (<br />
  hotlinkid int(10) unsigned NOT NULL auto_increment,<br />
  referrer varchar(255) NOT NULL default '',<br />
  imagename varchar(255) NOT NULL default '',<br />
  linktime timestamp NOT NULL default CURRENT_TIMESTAMP,<br />
  PRIMARY KEY  (hotlinkid)<br />
) ENGINE=InnoDB;<br />
</code><br />
I used INNODB for the table type because I reckoned it would be quicker for frequent writes and infrequent reads, but you can use MyISAM if INNODB isn&#8217;t available on your server.</p>
<p>Now the PHP code:<br />
<code><br />
&lt;?php<br />
// called when an image  is hotlinked<br />
// ... snipped code to connect to database ...<br />
// get the referrer and image name<br />
// first initialise an empty array to hold them<br />
$values = array();<br />
$values['referrer'] = mysql_real_escape_string($_SERVER['HTTP_REFERER']);<br />
// get the image name from the query string thanks to .htaccess<br />
$values['imagename'] = mysql_real_escape_string($_GET['imagename']);<br />
// write it to Hotlinks table using my own insertrow function<br />
$result = insertrow($DB, 'Hotlinks', $values);<br />
// show a nice image advertising my site<br />
$mimetype = 'image/jpeg';<br />
$filename= $_SERVER['DOCUMENT_ROOT'].'/images/sitelogo.jpg';<br />
header('content-type: '.$mimetype);<br />
header('content-length: '.filesize($filename));<br />
readfile($filename);<br />
?&gt;<br />
</code><br />
So after silently logging the access, the PHP code sets the mime type to what the calling page is expecting (an image) and then returns the specified image to the browser. Remember you can&#8217;t have any other output (including white space) before the calls to the header function.</p>
<p>Now I can check the database table to see who is accessing what, and if I see any legitimate domains there, I can add them to the &#8220;allowed&#8221; list in .htaccess.</p>
<p>Ironically I ended up not using this code on the site it was intended for, for various reasons. But I think it&#8217;s an interesting and potentially useful technique, so I&#8217;m posting it here anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.archetype-it.com/thebackburner/2009/09/29/preventing-hotlinking-of-images/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Who knew Javascript could be fun?</title>
		<link>http://www.archetype-it.com/thebackburner/2009/02/02/who-knew-javascript-could-be-fun/</link>
		<comments>http://www.archetype-it.com/thebackburner/2009/02/02/who-knew-javascript-could-be-fun/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 12:44:43 +0000</pubDate>
		<dc:creator>veronica</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://www.archetype-it.com/thebackburner/2009/02/02/who-knew-javascript-could-be-fun/</guid>
		<description><![CDATA[It gave me migraines till I discovered jQuery. Now I can validate a form with some simple CSS and a couple of lines of jQuery code. And today I had a rather odd requirement to toggle the colour of cells in a table when you click on them. In the old days, I wouldn&#8217;t even [...]]]></description>
			<content:encoded><![CDATA[<p>It gave me migraines till I discovered <a href="http://jquery.com/">jQuery</a>. Now I can validate a form with some simple CSS and a couple of lines of jQuery code. And today I had a rather odd requirement to toggle the colour of cells in a table when you click on them. In the old days, I wouldn&#8217;t even have attempted this. In my new jQuery heaven, I did this:</p>
<p><code><br />
(document).ready(function() {<br />
$("td.standard").click(<br />
function(){<br />
var currentclass = $(this).attr("class");<br />
if (currentclass.indexOf("highlightcell") == -1) {<br />
$(this).addClass("highlightcell");<br />
}  else {<br />
$(this).removeClass("highlightcell");<br />
}<br />
}<br />
);<br />
});<br />
</code></p>
<p>Voilà!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.archetype-it.com/thebackburner/2009/02/02/who-knew-javascript-could-be-fun/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP: is it a leap year?</title>
		<link>http://www.archetype-it.com/thebackburner/2009/01/29/php-is-it-a-leap-year/</link>
		<comments>http://www.archetype-it.com/thebackburner/2009/01/29/php-is-it-a-leap-year/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 10:39:01 +0000</pubDate>
		<dc:creator>veronica</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.archetype-it.com/thebackburner/2009/01/29/php-is-it-a-leap-year/</guid>
		<description><![CDATA[I&#8217;ve written about date manipulation in PHP before. There are some truly horrible hacks out there. Today I needed to detect whether a given year was a leap year, in order to write future-proof code for a calendar. PHP has got to have a way of doing this. I Googled and found this. And this, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve written about <a href="http://www.archetype-it.com/thebackburner/2007/09/20/downright-slippery-time/">date manipulation</a> in PHP <a href="http://www.archetype-it.com/thebackburner/2007/11/06/date-handling-in-php-and-mysql/">before</a>. There are some truly horrible hacks out there. Today I needed to detect whether a given year was a leap year, in order to write future-proof code for a calendar. PHP has got to have a way of doing this. I Googled and found <a href="http://www.codewalkers.com/c/a/Miscellaneous-Code/PHP-Date-Validation-including-leap-year/">this</a>. And <a href="http://www.weberdev.com/get_example-4296.html">this</a>, which is almost as bad. Urgh. Sorry, but that is one of those occasions when the coder should have asked him/herself if there wasn&#8217;t a better way, and at least considered looking at the manual for the <a href="http://de2.php.net/manual/en/function.date.php">date function</a>. There is of course a quick and simple way. <a href="http://www.electrictoolbox.com/leap-year-php/">Here it is</a>.</p>
<p>So I wrote one line of code:<br />
<code>$maxfebday = date('L', strtotime("$currentyear-01-01")) ? 29 : 28;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.archetype-it.com/thebackburner/2009/01/29/php-is-it-a-leap-year/feed/</wfw:commentRss>
		</item>
		<item>
		<title>From one blog to another</title>
		<link>http://www.archetype-it.com/thebackburner/2008/08/21/from-one-blog-to-another/</link>
		<comments>http://www.archetype-it.com/thebackburner/2008/08/21/from-one-blog-to-another/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 15:11:57 +0000</pubDate>
		<dc:creator>veronica</dc:creator>
		
		<category><![CDATA[Blogging]]></category>

		<guid isPermaLink="false">http://www.archetype-it.com/thebackburner/2008/08/21/from-one-blog-to-another/</guid>
		<description><![CDATA[I have been through quite a few different ways of blogging over the years. The personal blog I started back in 2001 originally used the ur-blogging tool GreyMatter, written by photographer Noah Grey &#8212; this was before such idiot-proof tools as Blogger and Typepad came along, so you had to be comfortable editing impenetrable Perl [...]]]></description>
			<content:encoded><![CDATA[<p>I have been through quite a few different ways of blogging over the years. The personal blog I started back in 2001 originally used the ur-blogging tool <a href="http://www.noahgrey.com/greysoft/">GreyMatter</a>, written by photographer Noah Grey &#8212; this was before such idiot-proof tools as <a href="http://www.blogger.com/">Blogger</a> and <a href="http://www.typepad.com/">Typepad</a> came along, so you had to be comfortable editing impenetrable Perl code to use it.</p>
<p>Later, when development of GreyMatter became stagnant and its shortcomings were evident, I moved on to <a href="http://www.movabletype.org/">MovableType</a>, which for a while was the undisputed king in the increasingly crowded blogging software realm. It still required a certain level of expertise to install, but it was easier and more flexible than GreyMatter. All went well until many A-list bloggers had a falling out with SixApart, the creators of MovableType, because they decided to &#8212; gasp &#8212; charge for their software, which while free of charge had never been open-source.</p>
<p>Meanwhile, open-source application <a href="http://www.wordpress.org/">WordPress</a> had been creeping up on the inside, and MovableType bloggers deserted to it in droves. That seems to have been the beginning of the end for MovableType. It was still free for single-user, non-commercial blogs, worked well, and I happily went on using it for my personal and recipe blogs.</p>
<p>Eventually, SixApart saw the error of their ways and released a version with an open-source licence. I made the mistake of upgrading <a href="http://www.larecettedujour.org/">my recipe blog</a> to the latest version a few weeks ago. All of a sudden things that used to be easy became difficult. The admin area wouldn&#8217;t even work in my browser of choice (Opera on Linux) &#8212; so I had to go and use a Windows PC every time I wanted to write a post. Templates had become hugely complicated, and the back office used a fancy Ajaxified interface so that you could no longer simply type or paste in the code for your templates. Rebuilding the blog after making changes to the individual entry template became impossible.</p>
<p>I was reluctant to change systems, and thought I might wait for the bug-fix release that was supposed to cure many of the reported problems with templates. But I started to ask around, and WordPress expert <a href="http://brassblogs.com/">Shelly</a> told me &#8220;But exporting from MovableType to WordPress is a doddle!&#8221;</p>
<p>She was right; it was a 5-minute job to export 200 posts from MovableType and import them into WordPress. I then spent a few hours working through an <a href="http://www.wpdesigner.com/2007/02/19/so-you-want-to-create-wordpress-themes-huh/">excellent tutorial</a> in order to convert my MovableType theme to a WordPress one. <a href="http://www.jestro.com/web-design/convert-xhtml-css-to-wordpress/">This article</a> was useful too. It really was that easy.</p>
<p>Although this blog runs on WordPress, I have spent no time customising it; I just installed it, added a ready-made theme, and started posting, without bothering to explore further. Converting my food blog means I&#8217;ve had a chance to get much more familiar with the way WordPress works.</p>
<p>I can&#8217;t say I like the way it mingles PHP with HTML in the templates; in my own code I have achieved almost complete separation, and it looks much tidier that way.</p>
<p>But on the plus side, once you&#8217;ve understood the famous WordPress loop, and the template variables, there are many advantages.</p>
<ul>
<li>Creating and modifying themes is child&#8217;s play compared to MovableType.</li>
<li>The admin area is simple to use and get around in (just remember to turn off the visual editor!).</li>
<li>It&#8217;s written in PHP (as opposed to Perl for MovalbeType), which means I should be much more comfortable with it. </li>
<li>It&#8217;s dynamic &#8212; no need to wait for ages for it to rebuild after a simple template change.</li>
<li>There is a host of plugins if it doesn&#8217;t work the way you want it to out of the box, opening the way to adding all sorts of extra features. </li>
</ul>
<p>Plugins I have found useful so far:</p>
<ul>
<li>AKismet: for trapping comment spam</li>
<li>BadBehavior: also traps spam; most people seem to use it in conjunction with AKismet.</li>
<li>Simple-Tags: The one thing the import didn&#8217;t do was pick up my MovableType tags. I hadn&#8217;t used many (because tags are a relatively recent feature in MovableType), but it would be a pain to have to go into every single post and add tags individually. This plugin lets you bulk-tag posts &#8212; an essential feature I would have thought.</li>
</ul>
<p>And finally, WordPress has become so ubiquitous that I had no excuse not to learn more about it; this was a great opportunity to try it in a risk-free way on my own site before unleashing it on clients.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.archetype-it.com/thebackburner/2008/08/21/from-one-blog-to-another/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Another tiny new toy: MP3 players for the over-40s</title>
		<link>http://www.archetype-it.com/thebackburner/2008/06/01/mp3-players-for-the-over-40s/</link>
		<comments>http://www.archetype-it.com/thebackburner/2008/06/01/mp3-players-for-the-over-40s/#comments</comments>
		<pubDate>Sun, 01 Jun 2008 15:47:37 +0000</pubDate>
		<dc:creator>veronica</dc:creator>
		
		<category><![CDATA[Gadgets]]></category>

		<guid isPermaLink="false">http://www.archetype-it.com/thebackburner/2008/06/01/another-tiny-new-toy-mp3-players-for-the-over-40s/</guid>
		<description><![CDATA[
I wouldn&#8217;t say I was a gadget freak, but some gadgets do appeal to me. Nor am I a fan of listening to music on the move; I originally got an MP3 player to listen to audio books and podcasts while out walking. My first was a cigarette-lighter sized Creative Zen, which worked so well [...]]]></description>
			<content:encoded><![CDATA[<p><img alt="Meizu miniplayer" src="http://www.archetype-it.com/thebackburner/wp-content/uploads/2008/06/meizu.jpg" /></p>
<p>I wouldn&#8217;t say I was a gadget freak, but some gadgets do appeal to me. Nor am I a fan of listening to music on the move; I originally got an MP3 player to listen to audio books and podcasts while out walking. My first was a cigarette-lighter sized Creative Zen, which worked so well it was pinched by my husband to use as a dictaphone when he was out walking <img src='http://www.archetype-it.com/thebackburner/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I replaced it with a pretty red iRiver the same size as the Creative. The sound quality on this one was superb, even better than the Creative (which was pretty good), but it had two flaws which meant I eventually stopped using it:</p>
<p>1) because of the size and shape of the player, the display was tiny. I found that even with my glasses on, I simply couldn&#8217;t read it (to be fair, this was a problem with the Zen too, for the same reason). So the only way to find what I wanted to listen to was to scroll through listening to the beginning of each item. Couple that with tiny, invisibly labelled buttons, and it became problematic.</p>
<p>2) It was designed to work with Windows Media Player. Problem: I don&#8217;t use Windows. A firmware upgrade meant I could use it like a standard removable drive in Windows, instead of having to go through the painful, clunky WMP to transfer files, but it wouldn&#8217;t play with my Linux PC at all.</p>
<p>Of course if you are a Windows user with very good eyesight, these problems won&#8217;t apply to you, and the iRiver is a very good player for its size.</p>
<p>Anyway, I allowed myself to be tempted by a special offer from Amazon, and snapped up a 2Gb Meizu. This has a completely different form factor: the size and shape of a credit card, only thicker (just thick enough to fit a headphone jack on one side, along with the mini USB connector). The aesthetics are beautifully thought out: mine is glossy black, with a mirror-finished back that can be used as &#8230; a mirror! Of course it picks up fingerprints very easily, but a little cloth is thoughtfully provided for polishing it up to a beautiful lustre and it has a little case to protect it from scratches.</p>
<p>The big plus is the bright, high-resolution 2.4 inch screen, intended for watching videos. I&#8217;ve never understood why people want to watch video on a screen that size, but I&#8217;m obviously just too old. In any case, for me it means that menus and track information are easy to read, even in sunlight. Alongside the screen is a touchpad which you use for navigation, scrolling, and volume control. It takes a little bit of getting used to, but after a skim of the manual I found it easy and intuitive; for example when listening to something you can increase the volume by simply sliding your finger up the touchpad. The same technique is used for navigating menus; tapping &#8220;Enter&#8221; at the bottom of the pad selects an option. Again, the sensitive areas are big and well-labelled enough for it not to be fiddly to use.</p>
<p>There are lots of possibilities for customization, including pre-set EQs for jazz, classical, pop etc. &#8212; or you can choose your own custom settings. The sound quality seems pretty good to me, from what I&#8217;ve listened to so far.</p>
<p>The other excellent feature is that it is OS-agnostic. To transfer files you simply plug it into you computer with the supplied USB cable and drag and drop files (videos have to be converted using Windows-only software, but I haven&#8217;t bothered with that). This works just as smoothly in Linux as it does in Windows, and you can organize the files in a way that suits you. It even supports the open-source OGG format, which neither of my other players did. Note that you should make sure MP3s and other audio files are tagged appropriately, then they will automatically be organized by artist, album etc. You can create your own directories in addition to the default ones for videos, music, and pictures &#8212; for example I created one called Podcasts &#8212; and use the built-in browser to access them. And of course you can create playlists, though I haven&#8217;t tried that yet.</p>
<p>Like both the iRiver and the Zen, it has a dictaphone feature, so I will have to keep it hidden from my husband <img src='http://www.archetype-it.com/thebackburner/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> Unlike them, it doesn&#8217;t use standard AAA batteries (which didn&#8217;t seem to last long and were always running out at inconvenient times). Instead it has a non-user-serviceable internal battery and charges via the USB port. We&#8217;ll see whether this proves to be a problem in the long term. Battery life is said to be excellent, but I haven&#8217;t used it enough to know yet. Some people complain about lack of an option to charge directly from the mains, but as I am rarely far from a computer, I don&#8217;t see that as a problem. If it were, I believe there are USB-to-mains adapters available.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.archetype-it.com/thebackburner/2008/06/01/mp3-players-for-the-over-40s/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Amarok and network shares on the eee PC</title>
		<link>http://www.archetype-it.com/thebackburner/2008/05/25/amarok-and-network-shares-on-the-eee-pc/</link>
		<comments>http://www.archetype-it.com/thebackburner/2008/05/25/amarok-and-network-shares-on-the-eee-pc/#comments</comments>
		<pubDate>Sun, 25 May 2008 14:29:44 +0000</pubDate>
		<dc:creator>veronica</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[amarok]]></category>

		<category><![CDATA[eee pc]]></category>

		<category><![CDATA[samba]]></category>

		<guid isPermaLink="false">http://www.archetype-it.com/thebackburner/2008/05/25/amarok-and-network-shares-on-the-eee-pc/</guid>
		<description><![CDATA[The eee now spends most of its time being used as a convenient way to play music through the stereo. This means it needs to mount the shared directory on the server downstairs that contains all the music. This caused a few problems initially because Amarok doesn&#8217;t seem to like Samba shares and it just [...]]]></description>
			<content:encoded><![CDATA[<p>The eee now spends most of its time being used as a convenient way to play music through the stereo. This means it needs to mount the shared directory on the server downstairs that contains all the music. This caused a few problems initially because Amarok doesn&#8217;t seem to like Samba shares and it just wouldn&#8217;t build the collection even though I could access the tracks by simply browsing the file system. It took me some expert help and a few goes to get the syntax of the mount command right, and what I ended up with was rather a mouthful:<br />
<code><br />
sudo mount -t cifs //silver/music /home/user/silvermusic -o username=samba_username,password=samba_password,iocharset=utf8,<br />
file_mode=0777,dir_mode=0777<br />
</code></p>
<p>Thank goodness you can use the up-arrow to recall terminal commands! But it does work, and Amarok can build the collection correctly. Helpful Mike S explained to me how to set up fstab to load it automatically:</p>
<p>The following line would do it:</p>
<p><code>//silver/music /home/user/silvermusic cifs username=samba_username,password=samba_password,iocharset=utf8,<br />
file_mode=0777,dir_mode=0777 0 0<br />
</code><br />
But it would be better to not put the login details in fstab, so you should create a credentials file to hold the username and password:<br />
<code>sudo nano /root/.sambacred</code></p>
<p>Then add the following to it:<br />
<code><br />
username=samba_username<br />
password=samba_password<br />
</code><br />
Then make it read/writeable only by root in order to keep other people out of it:<br />
<code>sudo chmod 600 /root/.sambacred</code></p>
<p>Then use the following line in fstab:<br />
<code><br />
//silver/music /home/user/silvermusic cifs credentials=root/.sambacred,iocharset=utf8,<br />
file_mode=0777,dir_mode=0777 0 0<br />
</code></p>
<p>Note: I have introduced line breaks for formatting here, but it&#8217;s very important to avoid extraneous spaces in these lines <img src='http://www.archetype-it.com/thebackburner/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> After <tt>cifs</tt> there should be <em>no spaces</em>. Unfortunately in my case it doesn&#8217;t work, I think because the wireless interface doesn&#8217;t come up until after fstab has been read, in fact it isn&#8217;t activated until after the GUI has loaded. So I ended up just putting the original unwieldy line in a shell script called loadmusic.sh so I can easily run it from the shell prompt. I imagine Mike&#8217;s way would work if I was using a wired connection.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.archetype-it.com/thebackburner/2008/05/25/amarok-and-network-shares-on-the-eee-pc/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SQL query to find duplicate rows</title>
		<link>http://www.archetype-it.com/thebackburner/2008/04/15/sql-query-to-find-duplicate-rows/</link>
		<comments>http://www.archetype-it.com/thebackburner/2008/04/15/sql-query-to-find-duplicate-rows/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 12:30:36 +0000</pubDate>
		<dc:creator>veronica</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<guid isPermaLink="false">http://www.archetype-it.com/thebackburner/2008/04/15/sql-query-to-find-duplicate-rows/</guid>
		<description><![CDATA[This is one of those things I can never remember how to do when I need to do it. I don&#8217;t know why, it&#8217;s really quite simple:

SELECT emailaddress, firstname, lastname,
COUNT(emailaddress)
FROM customers
GROUP BY emailaddress
HAVING COUNT(emailaddress) &#62; 1

]]></description>
			<content:encoded><![CDATA[<p>This is one of those things I can never remember how to do when I need to do it. I don&#8217;t know why, it&#8217;s really quite simple:<br />
<code><br />
SELECT emailaddress, firstname, lastname,<br />
COUNT(emailaddress)<br />
FROM customers<br />
GROUP BY emailaddress<br />
HAVING COUNT(emailaddress) &gt; 1<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.archetype-it.com/thebackburner/2008/04/15/sql-query-to-find-duplicate-rows/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Chocs To Go is here!</title>
		<link>http://www.archetype-it.com/thebackburner/2008/02/29/chocs-to-go-is-here/</link>
		<comments>http://www.archetype-it.com/thebackburner/2008/02/29/chocs-to-go-is-here/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 14:33:05 +0000</pubDate>
		<dc:creator>veronica</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://www.archetype-it.com/thebackburner/2008/02/29/chocs-to-go-is-here/</guid>
		<description><![CDATA[ The goal for students on the intermediate PHP and MySQL course that I&#8217;m running for IWA/HWG is to create a working shopping cart. The course starts in only three days, and I decided I&#8217;d better walk the walk and prove I could do it. So I have quickly mocked up a working version of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://chocstogo.archetype-it.com/" title="Chocs To Go"><img src='http://www.archetype-it.com/thebackburner/wp-content/uploads/2008/02/luxury-box.thumbnail.jpg' alt='Chocs To Go' align="left" hspace="5" vspace="5" /></a> The goal for students on the <a href="http://www.archetype-it.com/thebackburner/2008/01/24/intermediate-php-and-mysql-course/">intermediate PHP and MySQL course</a> that I&#8217;m running for IWA/HWG is to create a working shopping cart. The course starts in only three days, and I decided I&#8217;d better walk the walk and prove I could do it. So I have quickly mocked up a working version of the cart they are expected to build and put it online <a href="http://chocstogo.archetype-it.com/">here</a>. I think it will be helpful to students to see what they are aiming at, and it will make it easier for them to work out the logic if they can click through a real example. The design may not win any prizes, but the basics are all there.</p>
<p>All course materials now written and double-checked, quiz questions written and checked, SQL scripts generated and tested &#8230; just need to put week one&#8217;s materials up now!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.archetype-it.com/thebackburner/2008/02/29/chocs-to-go-is-here/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Another handy SQL Server utility</title>
		<link>http://www.archetype-it.com/thebackburner/2008/01/24/another-handy-sql-server-utility/</link>
		<comments>http://www.archetype-it.com/thebackburner/2008/01/24/another-handy-sql-server-utility/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 17:30:31 +0000</pubDate>
		<dc:creator>veronica</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<guid isPermaLink="false">http://www.archetype-it.com/thebackburner/2008/01/24/another-handy-sql-server-utility/</guid>
		<description><![CDATA[Why doesn&#8217;t SQL Server come with a built-in method for generating SQL dump files so you can easily port your data to another database? Microsoft in its own little walled garden I suppose; while the facilities in Enterprise Manager for exporting to Excel, Access, ODBC, CSV etc. can be very useful, sometimes you just need [...]]]></description>
			<content:encoded><![CDATA[<p>Why doesn&#8217;t SQL Server come with a built-in method for generating SQL dump files so you can easily port your data to another database? Microsoft in its own little walled garden I suppose; while the facilities in Enterprise Manager for exporting to Excel, Access, ODBC, CSV etc. can be very useful, sometimes you just need a bunch of SQL statements <i>&lt;whisper&gt;so you can export your data to Oracle&lt;/whisper&gt;</i>.</p>
<p><a href="http://www.ruizata.com/">SQLDumper</a> to the rescue; a handy little free utility that does just that, with a neat user interface that lets you select which database/tables you want to dump. Windows only, but hey, it&#8217;s a SQL server tool after all! Downside: you have to download and install the .NET framework if you don&#8217;t already have it, but the setup program handles that itself &#8212; just something to be aware of if you have a slow connection.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.archetype-it.com/thebackburner/2008/01/24/another-handy-sql-server-utility/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Intermediate PHP and MySQL course</title>
		<link>http://www.archetype-it.com/thebackburner/2008/01/24/intermediate-php-and-mysql-course/</link>
		<comments>http://www.archetype-it.com/thebackburner/2008/01/24/intermediate-php-and-mysql-course/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 14:38:13 +0000</pubDate>
		<dc:creator>veronica</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://www.archetype-it.com/thebackburner/2008/01/24/intermediate-php-and-mysql-course/</guid>
		<description><![CDATA[Since 1999 I&#8217;ve been teaching online for the Open University. It may not pay brilliantly, but it&#8217;s regular income and I really enjoy doing it; OU students often overcome major barriers to achieve a qualification they missed out on earlier in life, for whatever reason, so they can be very rewarding to teach. And the [...]]]></description>
			<content:encoded><![CDATA[<p>Since 1999 I&#8217;ve been teaching online for the <a href="http://www.open.ac.uk/">Open University</a>. It may not pay brilliantly, but it&#8217;s regular income and I really enjoy doing it; OU students often overcome major barriers to achieve a qualification they missed out on earlier in life, for whatever reason, so they can be very rewarding to teach. And the fact that it&#8217;s online means I can conveniently fit it around other work. Currently I <a href="http://www3.open.ac.uk/courses/bin/p12.dll?C01TT282">teach</a> <a href="http://www3.open.ac.uk/courses/bin/p12.dll?C01TT380">three</a> <a href="http://www3.open.ac.uk/courses/bin/p12.dll?C01TT381">courses</a> in the <a href="http://telemat.open.ac.uk/webapps/">Certificate in Web Application Development</a>.</p>
<p>I can now announce that I&#8217;m also going to start teaching an online course with <a href="http://www.eclasses.org/">eClasses.org</a>, the online learning branch of <a href="http://www.iwanet.org/">IWA/HWG</a>. The course uses PHP and MySQL to build a shopping cart, and is aimed at intermediate PHP developers (you don&#8217;t have to know anything about MySQL, but it certainly helps if you do). I&#8217;m really lookng forward to this; you can see the <a href="http://www.eclasses.org/cgi-bin/ql/search.cgi?template0=listing/nomatch.htm&amp;template1=listing/course_main_info.htm&amp;template2=listing/course_main_info.htm&amp;listing.services=P104&amp;listing.services_option=1&amp;listing.ref=Main_eClasses">full course description here</a>, and registration is now open.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.archetype-it.com/thebackburner/2008/01/24/intermediate-php-and-mysql-course/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
