Monday, 28 September 2009

Still trying to get Shaz's old laptop setup

Today I was still trying to get the Garmin map programs working with my GPS on Shaz's old laptop. I installed Garmin Nroute on the laptop, which allows you to view realtime gps data on the map. I installed the Asian language pack for Windows XP on the laptop, and while Mapsource would display Kanji okay, Nroute just displayed garbled letters and characters instead of the Japanese.

Then I had another problem in that whenever I tried to export the Korea map from Mapsource, it would take absolutely ages and then say it an error had occured and it couldn't do it. Annoying.

Also, I did a virus check on my PC, which took a few hours. In the morning I wrote a very simple perl script that embeds the info from xmpsidecar files into the relevant jpg/nef/cr2 files (using exiftool), and then deletes the xmp sidecar files. And I took some photos of a moth.

In the evening I watched a raddish film 'Through the Olive trees' with Moccle.

The weather was overcast nearly all day, though there was a bit of sun for an hour or so in the afternoon.

Breakfast: Tangerine marmalade toast sandwich.
Lunch: Mature yet mellow cheddar cheese with iceberg lettuce sandwich; 2x plums; Rocky; cup o' tea.
Dinner: Slice of bacon quiche; potatoes; peas; ground black pepper. Pudding was a slice of the delee carrot cake that Moccle and L made yesterday.

Sunday, 27 September 2009

Getting Shaz's old laptop set up

This morning I went on Animal Crossing, went to Church, then went on Animal a bit more.

In the afternoon I tried to get Shaz's laptop setup for taking to Korea and Japan. It probably would have been best to just format it and re-install windows from scratch, but McRad probably wouldn't be too happy with that since he uses the laptop sometimes.

Firefox was taking up about 60MB of RAM with only one tab open, so I tried to see if there were any better browsers to run on underpowered netbook/laptops. According to the info I found (I didn't find any benchmarks, just people's opinions), Opera is the best mainstream browser in terms of memory usage, but K-meleon is even better. So I downloaded K-meleon, and it was only using about 8MB of RAM. Windows XP uses lots of memory, but not a lot you can do about that.

According to the comments I read, Google Chrome is fast, but uses a lot of RAM and CPU. A lightweight webkit implementation suggested was Arora. I haven't downloaded it to the laptop, but have downloaded it to my PC so I can check it out for general use.

In the evening I looked at the Market Harborough and Rutland Living magazine that came through the door, which had this skill picture in it:

Also, when uploading that picture, I had to agree to Google Picassa's new TOS, which says that Google can use your uploads for promotional purposes:
In addition, by submitting, posting or displaying Content which is intended to be available to the general public, you grant Google a worldwide, non-exclusive, royalty-free license to reproduce, adapt, distribute and publish such Content for the purpose of displaying, distributing and promoting Google services. Google will discontinue this licensed use within a commercially reasonable period after such Content is removed from Picasa Web Albums.
Bit cheeky of them, but I'm okay with that. The photo in question isn't actually mine (obviously since I scanned it from a magazine), but I did use tineye to see if it was already available on the web, and couldn't find it.

I also watched quite a bit of a rubbish film called 'Comrades' with Moccle. It was too confusing to tell who the different characters were and how they were related.

I also did some image processing, and tried to get it so I can write the xmp sidecar files Bridge creates to the .nef raw files. I think I can probably work out how to do that with exiftool okay, but I also need to delete the .xmp files after the xmp has been embedded into the NEFs. I did some searching on windows shell scripting, and read that windows shell scripting is quite poor and you should use something like perl instead. So I guess I'll have to look into that tomorrow.

The weather started off warm and sunny, then in the afternoon it became overcast, and stayed that way for the rest of the day.

Breakfast: Tangerine marmalade toast sandwich; cup o' tea.
Dinner: Chicken curry; bit of sausage; rice; sultanas. Pudding was: Piece of bread pudding; hobnob; chocolate crinkle crunch cream; coffee.
Tea: Mature yet mellow cheddar cheese with mixed leaf salad sandwich; 4x plums; Large choc chip cookie; cup o' tea.
Supper: Large slice of delee carrot cake that Moccle and L made today.

Saturday, 26 September 2009

Trying to do stuff

This morning I was trying to get Robogeo to install, but didn't have any luck. So I installed GeoSetter instead, which has similar features to RoboGeo, but is free. Previously when I had tried it, it had been very buggy and kept crashing, but the latest version that I installed today worked fine, and I geocoded a batch of images using the google maps functionality that GeoSetter has built in (RoboGeo uses Google Earth instead of Google Maps).

In the afternoon and a bit of the evening, I was trying to get some Korean and Japanese maps installed on my GPS and in Garmin Mapsource. Unfortunately my GPS doesn't have the Korean or Japanese languages installed, so all the road, place, etc names are garbled. The Korean map though, I couldn't get to install in Mapsource, and just got errors about 'Error E032 Layer 0 cannot be empty' or something similar.

I did find a Japanese map that seems to be in English, but it just has the roads and railways, and is missing all the info about restaurants, shops, etc. that the Japanese language map has on it.

In the evening I watched Star Trek: First Contact, which I thought was overall a good film and also had those skill trash bits you come to expect from Star Trek, (e.g. Marina Sirtis trying to act drunk), which made it even better.

The weather was overcast most of the day, though before sunset the sky cleared, so there was a nice (if quite plain and boring) sunset.

Breakfast: Tangerine marmalade toast sandwich; cup o' tea.
Lunch: Ham with mustard and salad sandwich; 3x plums; satsuma; Rocky; cup o' tea.
Dinner: Baked bean and sausage plait; mashed potatoes; baked beans; ground black pepper. Pudding was bread pud with custard. Coffee; Happy Hippo.

Friday, 25 September 2009


This morning I was still doing work on my photo website, trying to fix some display quirks that were happening in some browsers, but not others.

One of the things I tried, which I think works quite well, is to use the CSS text-shadow property to slightly bold text. With the font I'm using (font-family: 'Lucida Sans Unicode', 'Lucida Sans', 'Lucida Grande', Verdana, Arial, Sans-Serif;), it seems to only display either thin and spindly or bold and thick, with no in-between. However, using text-shadow with the offset to to zero, and the colour the same as the font colour, you can use it to bold your text slightly e.g.

font-weight: 400;
text-shadow: #FFF 0 0 0;
This makes the text slightly bolder than normal, but not as thick as true bold text. I also found a tutorial on how to get a similar effect to text-shadow in IE. I didn't want to duplicate my text, so I tried just the glow filter on my text. It did work in bolding the text, but without the blur looked a bit rough. Also it seems the minimum amount of glow you can have is 1px, which might be a bit too thick (depending on your font size). I decided that the text looked better in IE just bolded normally, and then I decided that actually it looked better in IE as just normal weight text.

I carried on working on my website the rest of the morning and most of the afternoon.

Also in the afternoon, I did a Japanese lesson, and also went out in the garden for a bit. I saw three different flies that I tried to take photos of, but they all flew away. Oh, and I went on Animal Crossing, of course.

In the evening I did a bit more work on my photo website blog, then did a backup (which took a long time).

The weather today started off very nice, then it gradually clouded over, and was overcast quite a bit of the afternoon. Around 6pm, the sun was low enough in the sky to give a nice golden glow to everything, but by about 6.30pm there was a bank of cloud in front of the sun, so no actual sunset. Still, the sky (not the clouds though) was quite a nice orange-purple twilight colour after the sun had set.

Breakfast: Tangerine marmalade toast sandwich; cup o' tea.
Lunch: Ham with mustard and salad sandwich; 4x plums; a few red grapes; Rocky; cup o' tea.
Dinner: Battered fish portion; potatoes; peas; tinned plum tomato; ground black pepper. Pudding was: Custard cream; Chocolate crinkle crunch cream; 1⅙ Chocolate Eclairs; coffee.

Thursday, 24 September 2009


This morning I went out in the garden and took a few photos of the dew.

I came back inside, did a backup, and checked my email. After that I did some work on my photo website.

I am using Ryan Fait's Sticky Footer technique on my site. But in IE8, the footer wasn't sticking to the bottom of the page. Saving my page in Firefox, then bringing it into IE8 and editing it until it worked, I found out what the problem was.

In the page code saved from firefox, the .push div looked like this:
<div class=".push"/>
Changing this to
<div class=".push"></div>
fixed the footer in IE8. In the actual code that gets sent to the browser, the div looks like
<div class=".push"></div>
. So why is the div getting converted to a self closing element? The answer is because in IE8 I am sending it XML with an XSL Stylesheet to convert the XML to XHTML.

I posted about using an XSL Stylesheet to send XHTML/HTML/XML to browsers that don't support XHTML natively the other day. Because in my XSL stylsheet I wasn't using the output processing command, it seems that the XSL stylesheet was processing the page as XML, so an empty element like
<div class=".push"></div>
would be converted into
<div class=".push"/>
, thus causing the problem with the footer in IE8.

However, what is strange is that the same page works in IE6 and IE7 okay, even though they receive the same as IE8. I guess something has changed in the XSL processing in IE8, though I thought that IE didn't come with XML processing built in, but instead used whatever version of MSXML you had installed. Possibly the Virtual PC disk image of IE8 I downloaded has a different version of MSXML to the one installed on the IE6 Virtual PC disk image (and a different version to the one I have installed in Vista).

Another strange thing is that with the page I had saved from Firefox, the code for a textarea was saved as a self closing tag like <textarea/>. Viewing the page in IE8, this meant that all code after the textarea appeared in the textarea, and the page ended there (since the textarea wasn't closed with a separate </textarea> tag). However, this doesn't happen when the actual page is served to IE8 with the XSL Stylesheet.

Similarly, when the page is saved from Firefox, all the script tags become self closing <script type="text/javascript" href="/path/to/file.js"/>. Loading the saved page in IE, none of the scripts are included because the closing </script> tags are missing (as far as IE's concerned). Yet with the page served from the server with the XSL Stylesheet, IE8 will load all the scripts okay.

So it's not just a simple case of the XSL Stylesheet converting empty tags to self closing tags in IE8. Why the empty div doesn't work in IE8 when served XML with an XSL Stylesheet, but empty textareas and script tags do work, I don't know.

Anyway, the answer of how to get IE8 to make the sticky footer work properly is to use the output processing command in your XSL Stylsheet, and make sure you set the method attribute of the output to "html".

After that I changed my photo website to use .xhtml as the file extension (after only changing the file extensions from nothing to .xml a few days ago). I thought xhtml actually gave a better description of the page content, and also lets me save a page along with its associated javascript and css files in firefox. With the .xml file extension, you can only save the page.

Being able to save a page along with the associated javascript and css files is very useful in helping to debug problems (normally in IE). It means you can remove all excess code until you're left with the very basics, which is much easier to debug and also much better for posting on forums for advice on what the problem you're having is.

After getting that working, I tested the website in Konqueror. The first problem I had was that when I tried my website in Konqueror, while the homepage would load okay (albeit without javascript loaded), any other page I tried to access, I would get prompted to download an xml file. Obviously Konqueror doesn't accept XHTML or XML. So I changed my page to send xhtml if supported, then xml if supported, then html as a last resort.

After changing this I still had some problems in Konqueror - I had forgotten to add the DOCTYPE declaration for browsers being sent html, so Konqueror was rendering the page in BackCompat (Quirks) mode. After fixing that, Konqueror rendered the page okay (no rounded borders though).

I did a bit of work on the photosite blog, then it was lunch time.

After lunch I went on Animal Crossing, then did some more work on my photosite blog.

It seems that my fix for Konqueror to send text/html to browsers that don't support xhtml or xml didn't work too well. In IE8, now if you refresh the page, you will be greeted with an xml view of the page code rather than the actual page.

It's very strange. When you first request the page, IE8 sends the following headers (xml is in the Accept string):
GET /blog/ HTTP/1.1
Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/, application/xaml+xml, */*
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
Cookie: __utma=121171401.1818035883.1253039791.1253789572.1253805469.7; __utmz=121171401.1253039791.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmb=121171401.2.10.1253805469
The server sends these headers back to IE8 (sends xml):
HTTP/1.1 200 OK
Date: Thu, 24 Sep 2009 15:21:26 GMT
Server: Apache/2.2.11 (Ubuntu) DAV/2 SVN/1.5.4 mod_ssl/2.2.11 OpenSSL/0.9.8g
X-Powered-By: PHP/5.2.6-3ubuntu4.2
Set-Cookie: PHPSESSID=c8ef0107e12cdbedcacc41b52937e300; path=/
Cache-Control: private, must-revalidate, post-check=0, pre-check=0
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/xml; charset=utf-8
When you refresh the page IE8 now sends these headers (xml isn't in the Accept string now):
GET /blog/ HTTP/1.1
Accept: */*
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
Pragma: no-cache
Cookie: __utma=121171401.1818035883.1253039791.1253805469.1253805688.8; __utmz=121171401.1253039791.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmb=121171401.1.10.1253805688; __utmc=121171401; PHPSESSID=c8ef0107e12cdbedcacc41b52937e300
So the server sends back these headers (sends html)
HTTP/1.1 200 OK
Date: Thu, 24 Sep 2009 15:22:34 GMT
Server: Apache/2.2.11 (Ubuntu) DAV/2 SVN/1.5.4 mod_ssl/2.2.11 OpenSSL/0.9.8g
X-Powered-By: PHP/5.2.6-3ubuntu4.2
Cache-Control: private, must-revalidate, post-check=0, pre-check=0
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 3196
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=utf-8
So it's as if when you refresh a page in IE, it doesn't let the server know what content type it will accept, and whatever it receives, it will treat the same as what it received when it first requested the page.

To fix this, I changed my code so it will serve xml to any browser that doesn't accept xhtml and does accept xml or only accepts '*/*' (which I think is IE8 when refreshing a page).

In the evening I did a Japanese lesson, and then carried on working on my photo website. I spent quite a bit of time trying to get IE6 to apply a min-width to the page. Googling found a few answers, but the ones that didn't use javascript or CSS expressions didn't seem to work for a full page. e.g. IE6 min-width example
- if you make the window small, the boxes that have min-width applied will shrink to the minimum width correctly, but all other content on the page will carry on shrinking past the min-width. When I tried to apply it to the whole page, I couldn't get it to work.

However, I did find an answer on how to make min-width work in IE6, which involves extra markup of 3 divs that contain your whole page. I tried using html, body, and one div instead, but that didn't work. My page seems to be getting a bout of divitis, with all the extra divs needed for making things work in IE6, and the sticky footer.

Also, while doing this, I found that IE6 was now rendering in standards mode. It's obviously due to changing the XSL Stylesheet to omit the xml declaration, but strange how when I tried the same thing the other day, IE6 would still render in quirks mode.

I did another Japanese lesson with Moccle, then did some more work on my photo website. Until now I'd managed to get away with only having a separate CSS stylesheet for IE6, but I found that IE7 doesn't render inline-block list items correctly - it renders them as block level elements. So I had to add a conditional stylesheet for IE7.

I did a backup, then went to bed.

The weather today started off with a clear blue sky, and nice and sunny. During the day cloud started to build up, though it was still mostly sunny. By sunset it was mostly overcast, and though there was a bit of a sunset, there wasn't much to see (especially compared to yesterday).

Breakfast: Blackberry and apple jam toast sandwich; cup o' tea.
Lunch: Ham with mustard and salad sandwich; banana; 3x plums; Rocky; cup o' tea.
Dinner: Slice of pepperoni pizza; chips; salad; ground black pepper. Pudding was Jamaica Ginger cake with golden syrup and custard (again). Coffee; Piece of Tesco's cheapo chocolate.

Wednesday, 23 September 2009

Changing pog website url structure

I spent most of today changing my pog website so that the urls would end in .html rather than without a file extension. Why? Most websites use a structure where urls end in a file extension or a trailing slash. Some popular websites like certain pages on google, and all of wikipedia are an exception though.

Anyway, I asked about this on the web squeeze, and the recommendation from other users there (though I only got replies from 2 different people), was to end urls in a trailing slash or file extension, so I thought I best follow their advice. Also, in the server logs I found what looked like a real user (and also some spambots) who were automatically adding forward slashes on the end of my urls that didn't end with a file extension or forward slash. So I think that ending your urls in a forward slash or file extension should also make them more accessible.

In the afternoon I also went on Animal Crossing and did a Japanese lesson.

After dinner I went out on a walk and there was a really nice sunset, a large cloud with a textured underside got lit up really bright pink on the bottom after the sun had set. Unfortunately I didn't have my camera with me.

When I got back home I watched 'The Black Shield of Falworth' with Moccle and L. Then I did the same Japanese lesson that I'd already done earlier with Moccle, as he hadn't done it before, and I thought it might be helpful to do it again anyway.

The weather was a mixture of cloud and sun throughout the day, then ended with a really nice after sunset.

Breakfast: Apple and Blackberry jam toast sandwich; cup o' tea.
Lunch: Mature yet mellow cheddar cheese sandwich; packet of Chilli flavour Doritos; Apple; plum; cup o' tea.
Dinner: Beef pie; green beans; carrots; potatoes. Pudding was a slice of Jamaica ginger cake with golden syrup and custard. Coffee.
Supper: Chocolate crinkle crunch cream biscuit; cup o' tea.

Tuesday, 22 September 2009

This morning I did some work on my website, trying to fix some CSS problems in IE6. I also tried changing my XSL stylesheet for IE so that it would add the doctype using an output processing command. Currently I am adding the doctype like so:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="" version="1.0">
<xsl:template match="/">
<xsl:text disable-output-escaping="yes">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "" >
<xsl:copy-of select="."/>

Instead, I tried using:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="" version="1.0">
doctype-public="-//W3C//DTD XHTML+RDFa 1.0//EN"
<xsl:template match="/">
<xsl:copy-of select="."/>

I found the method of the output had to be set to html, otherwise IE7 would go into quirks mode. Sadly, IE6 was still in quirks mode, even with the omit-xml-declaration set to yes (IE6 goes into quirks mode if there is anything before the doctype).

After that I took a pano in the front garden to test how well calibrated the NN3 was, after the calibration I attempted to do on it/the camera lens combo the other day.

While PTGUI was processing I watched this video, which I though was good:

Manchester Orchestra "I can barely breathe" from clay lipsky on Vimeo.

When I tried to open the photoshop .psb file that PTGUI had created though, it brought my computer to a grinding halt. I had quite a few things running - an IE6 Virtual machine, Ubuntu Virtual Machine, Firefox, Thunderbird, Capture NX, PTGUI, and a folder open in Windows Explorer. So I slowly closed them down. It took ages because the computer was being so slow it would take about 5 minutes to close each one.

Eventually I got task manager open, and could see that all 8GB of my RAM was being used, so photoshop must have been thrashing the disk, slowing everything down so much. I think the lesson is - don't process panos with multiple exposure levels into one file - instead try and process each exposure level into a separate file. Then you can process your files separately and only bring the merged versions of the other exposures into your main file when needed. My pano was only 8 bit as well, imagine how bad it would have been with a 16bit output pano!

After lunch I went on Animal Crossing, then I did some more NN3 calibration testing, just taking panos at various offsets along the top rail to see what gave the best control point optimisation figures when optimised in PTGUI.

I checked dpreview and the canon lens forums on dpreview, then installed the FastPictureViewer WIC Codec Pack 1.20. Amazingly, this lets you view CR2 and NEF files as thumbnails in Windows Explorer on an x64 system. I had previously downloaded the Canon RAW codecs and Nikon RAW Codecs from the Canon and Nikon websites respectively, but neither worked on my Vista x64 system, whilst the FastPictureViewer WIC Codec Pack does work.

The rest of the afternoon and evening I worked on a mockup of my blog (not this one, the one for my photo website) in photoshop. I also did another Japanese lesson with Moccle.

Breakfast: Bowl of Harvest Morn Chocolate crunch oat cereal; cup o' tea.
Lunch: Mature cheddar cheese sandwich; apple; 3x plums; cup o' tea.
Dinner: Spaghetti; meatballs; mixed veg; grated parmesan style cheese; ground black pepper. Pudding was a slice of chocolate swiss roll with mandarin segments and coffee custard. Coffee.

Monday, 21 September 2009

Got Sphinx search working

A few days ago I was wondering how to indent/tab a whole block of text/code in gedit. Turns out it's pretty simple:
  1. In gedit go to Edit > Preferences
  2. In the gedit preferences dialog, click on the plugins tab, and then make sure the 'Indent Lines' plugin is ticked'.
  3. Close the preferences dialog. You can now indent lines or whole blocks of text in gedit using Ctrl+T, or un-indent (tab to the right) text using Shift+Ctrl+T. These two options will also now appear on gedit's Edit menu

Also recently, I've been working on getting Sphinx configured for my website.

Sphinx doesn't come with any stopwords as standard. Stopwords are common words that are excluded from search queries, like 'the'. By excluding common words you make your search engine faster, as it doesn't need to bother searching for the stop words. MySQL has a list of english stop-words that I could use, however, I found a list of google english stopwords, and used that instead.

Reading this article Google Stopwords Patent though, it seems that Google no longer uses a straight stopwords list, bust instead uses phrase based matching to determine how much weight should be given to a stopword.

After getting my stopwords list sorted out, I wanted to ensure that the search would work for foreign characters/phrases. Sphinx has a list of characters you need to add to your charset_tables parameter in the sphinx.conf file to support other languages: Unicode Character Set Tables. After looking at that, I decided that there wasn't much point adding all the different character sets, but instead I would be better off to only add the character sets I needed. After all, I could always add more characters sets in the future.

I found a page that listed the charset_tables you need to support Japanese in Sphinx, and I think the CJK (Chinese Japanese Korean) character set listed in the Unicode Character Set Tables should work okay as well.

I didn't enable ngram indexing, as I intend putting spaces between different Japanese/Korean words. If I change my mind, then I can always enable ngram indexing.

I got Sphinx working, and then wanted to have a 'taster' of the page/image description in my search results. Looking into this, the recommendation seemed to be to use SUBSTRING(description, 0, 100) or LEFT(description, 100) in the mysql query when fetching the description, so you only got the 1st 100 characters of the description, then use PHP to remove the rest of the string after the last space, so you get a string that ends on a word.

Then I found out that Sphinx actually already has the ability to to create excerpts, where it will also highlight the word(s) that were searched for.

Next I needed to make Sphinx work okay when there was both an exact phrase and another search term, like
word "exact phrase"
The answer to this was to set the matching mode to SPH_MATCH_EXTENDED2. There is also a lot of different parameters/options your users can use with the extended query syntax.

In the evening I did some more work on my website, trying to get the google search javascript to load dynamically (it wouldn't work), and also did another Japanese lesson with Moccle.

The weather was mostly overcast today, though it was sunny for a bit in the afternoon. Around sunset, it looked quite overcast, but then actually the bottom of the clouds got lit up orange quite nicely, while it was raining a little bit.

Breakfast: Bowl of chocolate oat crunch cereal and fake Cheerios; cup o' tea.
Lunch: Mature cheddar cheese sandwich; banana; a few grapes; Cranberry and Muesli bar; cup o' tea.
Dinner: Eggy bread with bovril; baked beans; potatoes; bacon. Pudding was an apple pie with custard and cream.

Sunday, 20 September 2009

Having a headache

This morning I went on Animal Crossing, then went to Church with Moccle and L. After church I made dinner for me and Moccle a everyone else was having dinner at Church.

After dinner me and Moccle did a Japanese lesson, then I processed some more photos from the 2nd day of holiday we had in Shropshire in July.

In the evening I checked my email, did some more photo processing, and did another Japanese lesson with Moccle. Also, I watched some photoshop CS4 videos.

The weather today was quite hot an sunny, though clouded over around sunset (there was a bit of a sunset, but not much).

Breakfast: Apple and blackcurrant jam toast sandwich; cup o' tea.
Lunch: Chilli con carne; rice; tortilla chips; grated mature cheddar cheese. Pudding was a Cadbury's chocolate fudge ice cream. Cup o' tea.
Afternoon snack: Scone with strawberry jam, butter, and cream; cup o' tea.
Tea: Ham sandwich; 3x plums.

Saturday, 19 September 2009

Harborough Hoards and History day

This morning I started looking at affiliate ads I could put on my photo site. I noticed both Zenfolio and smugmug use commission junction. I tried to check if you can put both Amazon affiliate ads and Commission junction partner ads on the same page, but instead found lots of reviews on Amazon about how bad Commission Junction are.

I did some googling to see if there were any alternatives, and didn't find any. After that I did a bit more work on my website. I got a google custom search through my google AdSense account, and this seems to work far better than the google site search, despite being essentially the same thing (except that you also earn commission on the ads displayed). It's xhtml compatible at least (google site search I tried wasn't). I haven't tried loading the javascript it requires dynamically yet though.

After lunch I went on Animal Crossing for a bit, then me, Moccle, and L went down town. On the way there we saw Ethan (from Lost). When we got to the town square we saw some people dressed on Roman Legionnaires, then after that some Civil War re-enacters. They didn't re-enact the civil war, but were saying about the different attack and defense methods they used, the different weapons they had, etc. There was also a fight between a Parliamentarian and a Royalist, which was quite good. After that Moccle went to the Cashpoint and I saw someone with a T-shirt that said 'Hurley' on it!

Then we came back home, and I went in the garden for a bit and saw tiny little caterpillars that had just hatched out of a load of eggs on the washing line. They seemed to jump off the washing line and float through the air. I'm not sure if this is just because they were so small and light that they were carried on the wind, but I would guess they were hanging from super thin silken threads.

After that I started watching 'Speed Racer' with Moccle and L.

After dinner we finished watching Speed racer. It had a good twist in it, Racer X (who you thought was going to be Speed Racer's brother), is actually Matthew Fox, and me and Moccle didnae even notice it was him until L said it was Jack (which was as soon as he saw him). Also, the music was done by Michael Giacchino, who does the music for Lost. Another good twist was that E. Honda from Street Fighter the Movie is in it as a race commentator.

I went on my comp a bit, then went on Animal again and saw KK.

The weather started off overcast, then became sunny by mid morning, then became overcast again later in the afternoon.

Breakfast: Lemon marmalade toast sandwich; cup o' tea.
Mid-morning snack: Fox's Chocolate crunch biscuit; cup o' tea.
Lunch: Ham with iceberg lettuce sandwich made with fresh bread-maker-made bread; ½ mature cheddar cheese sandwich made with fresh bread-maker-made bread; crust of fresh bread-maker-made bread with Apple and Blackberry jam; cup o' tea.
Dinner: 2x delee sausages; baked beans; mashed potatoes; brown sauce. Pudding was a couple of home grown grapes, sliced banana, butterscotch whip, and crumbled flake. Coffee; Oreo.
Supper: Shortbread finger; Gingernut; cup o' tea.

Friday, 18 September 2009

Finishing xsl stylesheet for sitemap

This morning I did some more work on the XSL Stylesheet for my sitemap.

I wanted to change the format of the date from the W3C DateTime format to a more human friendly format. I was hoping that I could use the XPath DateTime functions to format the date, but unfortunately these didn't work (at least in Firefox 3.0.14 on Ubuntu), I got a message saying it was an unsupported extension.

So instead I had to resort to string functions (mainly substring) to format the date.

Another problem I had today was that <xsl:import href="/path/to/stylesheet.xsl"> didn't work (at least in Firefox). Instead I had to use <xsl:include href="/path/to/stylesheet.xsl">.

Also in the morning I put the washing out and took a few caterpillar photos. After lunch I went on Animal Crossing, then did some more website stuff.

I did some Japanese, checked my email, and then tried to calibrate my pano setup using John Houghton's tutorial on finding the No Parallax Point (NPP).

After dinner I watched a video that was a featured download on Azuerus with Moccle and L about the 10th anniversary of the dreamcast. Then I did some more website stuff the rest of the evening, mostly reading about sphinx and also how it compares to other search engines (mainly Lucene).

I did a backup and checked dpreview, then went to bed.

The weather today started off cloudy, then gradually cleared, being sunny and cloudy most of the day. By sunset the cloud had all gone.

Breakfast: Lemon marmalade toast sandwich; cup o' tea.
Lunch: Ham with iceberg lettuce sandwich; banana; Chocolate digestive bar; cup o' tea.
Dinner: Beef burger with puszta, tomato ketchup, fajita spice mix, and grated mature cheddar cheese in a bun; Bowl of minestrone soup. Pudding was Jamaica ginger cake with golden syrup and custard. Coffee.

Thursday, 17 September 2009

Correct format for <title>s and XSL Stylsheets for sitemaps

This morning I spent some time looking at separators in website <title>s. I had started a thread on the websqueeze yesterday, and got some helpful info there. I also did some googling, which came up with a few blog posts, though the separator to use seemed to mostly be down to personal preference.

For the moment I've settled on the Interpunct·, though of course I may change my mind any time.

I also found this video on the Google Webmasters channel on youtube: Should I use pipes or dashes in my titles?

One of the comments there said about phrases with pipes | in not being found if someone searches for the exact phrase (except without the pipe |). I tried this, and found it to be true. For my test I used a page with the title The Man in Blue > Code & Beauty
Googling for "man in blue Code & Beauty" brings up approx 679 results with the real page at the top. Googling for "man in blue > Code & Beauty" brings up the same. Googling for the same phrase but with various different non-alpha-numeric characters instead of the > brings up the same results. But if I use a pipe | instead of a > I get no results (well actually you do get a page of results, as google shows the results for searching it not as a phrase. I checked my interpunct, and that worked okay.

The rest of the day I was mainly working on making an XSL Stylesheet to convert my sitemap to display as nicely formatted HTML in a browser. I did loads of googling to help me, but here are some resources that were particularly helpful:

Discussion about using an XSL Stylesheet to style your xml sitemap for web browsers: Sitemap Stylesheet (XSL).

Example XML Sitemap that is styled with an XSL Stylesheet for web browsers: Google Sitemaps Stylesheet 1.5 beta.

Google XML Sitemaps Wordpress plugin that uses an XSL Stylesheet to style the xml sitemap it creates for web browsers.

How you should format your sitemap/what it should include: Sitemaps XML format.

How to include other xml files in your page/XML file using an XSL Stylesheet: Reading Multiple Input Documents.

XPath substring function, useful for removing the domain of your site from all the urls listed in your sitemap when displaying them on a webpage using an XSL Stylesheet: XPath function: string substring (string, number, number?)

How to stop html elements you create in your XSL Stylesheet having a namespace attribute like xmlns=" ": [xsl] xmlns="" ?? (the answer is to add the html namespace as the default namespace in your XSL Stylesheet like
xmlns:xsl="" version="1.0">

Adding DOCTYPE to XSL for output to XHTML file. The way I've been doing it on the main part of the website for IE is quite different to what is suggested there, though the method I was using for IE doesn't seem to work in Firefox. Using the method suggested at that link,
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
When I viewed the generated source in Firefox, the Doctype declaration wasn't there, so I'm not sure if it worked or not. I also found that having method="html" as an attribute of the output, made Firefox not be able to load the page (it would just have the loading thing forever).

I spent a lot of time trying to figure out why things weren't working as well. Normally it was a syntax error, though one of the problems was also that I needed to specify the namespace that a document was in to be able to access the elements in that document.

Also today I went on Animal Crossing, went in the garden a few times (though didn't see any insects that would stay still), topped up the pond, put the washing out, did the washing up as usual (including scrubbing a saucepan with burnt on milk for ages), did 2 Japanese lessons, watched L go on Sims, and showed some photos to Shaz, L, Moccle, and Clare.

The weather was overcast all day.

Breakfast: Lemon marmalade toast sandwich; cup o' tea.
Lunch: 2x cheese on toasts; salad; clementine; Caramel Rocky; cup o' tea.
Dinner: Chicken pie; green beans; carrots; roast potatoes; gravy. Pudding was 2x large Raisin and oat cookies. Coffee.

Wednesday, 16 September 2009

Looking at SEO

This morning I was looking at SEO for my photo website. First I was looking for a keyword tool, the sites I found via Google all seemed to be pay/subscription based ones.

Then I remembered that I had probably downloaded a keyword tool as part of one of those 'Give us your email address and you'll get access to 20 ebooks with a total value of $21,253' promotions that internet marketeers are so fond of using.

Looking through my ebooks, I found one called 'My Profitable Niche Revealed' by Chris Freville. While the guide is aimed at setting up a site with affiliate links, and getting all your traffic via google adwords, I still found it quite useful.

The guide suggests checking clickbank to see what products are being offered, and if there is a profitable niche there you can exploit. So I checked clickbank for 'photography', and there were about 50 results, though I didn't see any for macro photography. Most seemed to be something like 'Digital photography for beginners' or 'Make money from your digital camera'.

Unfortunately, I couldn't see how you can actually tell which products are selling well and which aren't.

Next the guide suggested using SpyFu to see what keywords you can use to advertise and what keywords your competitors are using. I didn't find this very useful, though maybe because I'm not interested in running ads at the moment.

The guide also suggested using the Google Keyword Tool, so I took a look at that, and found it quite useful. You can enter a keyword(s), and then it will give you a list of similar keywords and show the amount of searches for that keyword, along with advertiser competition for that keyword. So If you're interested in advertising, you can find keywords getting a decent amount of hits, but with little advertiser competition.

In my case, I'm not interested in advertising at the moment, so I just looked for the keywords getting a decent amount of hits so I can try and optimise my site for them.

Next I did a google search for 'SEO'. I remember a few years ago, a good way to get a high ranking on google was to put a bunch of links in the footer of your site, so I wanted to see what format the links should take to get a good weighting from Google. The third ranked site for 'SEO' in google was Looking at their front page, they didn't have a bunch of links in the footer, however they did have very keyword rich text. I also noticed that their homepage contains tons of text (all keyword rich).

What they've done is within their homepage they include 5 tabbed sections, each tab contains quite a bit of text. The text of each tab is actually included in the homepage, they just use javascript to turn the divs containing each section into a tabbed format, so if you browse the page with javascript you don't get overloaded by the length of text.

I spent the rest of the morning in the garden taking photos, mainly of a caterpillar that McRad found on a geranium.

After lunch I went on Animal Crossing, then did some reading up on SEO. I thought this article Avoid the Mistakes New SEOs Make was quite good.

After dinner I watched a French film about a circus called 'Parade' with Moccle and L. I did a Japanese lesson, and then tried to do some Kanji cards with Moccle.

The weather was overcast most of today, though there was a bit of sun in the afternoon. It was overcast at sunset.

Breakfast: Bowl of Mornflake Chocolate Oat parcel things; cup o' tea.
Lunch: 2x Cheese on toast with iceberg lettuce; 2x plums; clementine; Rocky; cup o' tea.
Dinner: Lasagne; salad. Pudding was a Strawberry Muller Rice. Coffee.

Tuesday, 15 September 2009


This morning I first did a Windows Update, and also tried to update RoboGeo. However, when trying to update RoboGeo I got an error message:
Error 1402. Could not open key:
UNKNOWN\Components\A101D793267A2D119BE70006794CED42\85DB9E4D3EB2EA74AB1C4355EACFB2F3. Verify that you have sufficient access to that key, or contact your support personnel.

I did some googling, but still couldn't fix the error. I tried uninstalling RoboGeo from 'add/remove programs', but got the same error message. I ran the 'Windows Install Clean Up' program, and removed the entries for Robogeo, but still got the same error. I also looked in the Registry manually using regedit, but there wasn't an 'UNKNOWN' section.

After that, I decided to change the url structure of my photo website so that pages had a file extension. My current url structure is like
I had noticed in the logs for my pog website that some requests were coming in to (note the extra forward slash on the end). Looking up the IP addresses on google, the requests were mostly from spam-bots (trying to access the login page), however there was also a visit from an IE5 user trying to visit the normal pages, where the pages they were requesting were ending in a forward slash (and so they would get a 404).

So it seems that some browsers/bots try and add a forward slash on to the end of a url if it doesn't have a file extension. Obviously, I'm not concerned about the spam-bots accessing the pages (I'd rather they didn't), but I am concerned about

I was wondering what file extension I should give my pages. At first I thought maybe I should use .htm, as this should be compatible with older windows systems using the 8.3 file naming convention. But then I thought about how I'm serving the pages as xhtml/xml, and thought maybe I should use the .xml extension as this more accurately describes the actual content type of the page.

So that got me wondering whether IE5 would display xml okay. A quick bit of googling and I found this article about XML in IE5. So it seems that xml will work in IE5 okay. According to the article, it seems the XSL support in IE5 might not adhere to the current XSL standards. However, I have no way of checking (no access to a copy of IE5), so I'll just have to hope that my XSL stylesheet will successfully convert the xml to html in IE5 (it does in IE6 upwards).

The article was quite interesting, being so old as well. I also just tried my website in Lynx (with the current url structure), and it worked fine, so Lynx obviously doesn't have any trouble. I couldn't find out how to see if Lynx was getting the page as xhtml, so I just added some code in the page to check
<?php if(stristr($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml'))
{echo 'xhtml';}
else{echo 'xml';}?>
Reloading the page I could see Lynx was getting the page as xml. Next I tried disabling the XSL Stylesheet that transforms xml into html for browsers who don't support xhtml. With the XSL Stylesheet disabled, Lynx still rendered the page as a webpage, with working links etc. I would guess that Lynx doesn't use XSL Stylesheets, though I can't be sure.

I did a bit of work on my website changing the various bits to use .xml as the file extension, and changing the urls around a bit.

After lunch I went on Animal Crossing, then did some more work on website. I spent a bit of time trying to work out why an SQL query was failing - the answer was that I had a section where if a variable wasn't empty, then I would set some variables to certain values, and if it was empty, then I'd set the variables to different values. I had added a new variable to be inserted into the database, but had only added it in the section for if the variable had a value, so if it didn't, the script would try and insert nothing into the database, instead of NULL or a blank string, thus breaking it.

I wanted to protect my image upload page so only I could access it, but couldn't remember what rules I needed to put in my .htaccess file. I found the answer in an Apache article on Authentication, Authorization, and Access Control.

I did some more website work, then went in the garden for a bit and saw a couple of bees, but they both flew away when I took their photos. I came back inside and did a Japanese lesson. I checked my email, then did some more website work.

In the evening I did more website work, mainly trying to work out why my sticky footer wasn't working in IE8 and IE6 (it worked in IE7). I also went on Animal Crossing while doing a Japanese lesson with Moccle.

Agent S was supposed to come round my house at 8pm, but she didn't, so I went out looking for her. When I found her, she said that she had come to my house, but I wasn't in. Annoying lying little squirrel!

The weather was overcast most of today and was also quite windy. It was overcast around sunset time, so there wasn't any sunset to see.

Breakfast: Bowl of Mornflake chocolate oat parcels (or sumat like that); cup o' tea.
Lunch: Grated mature cheddar cheese with iceberg lettuce sandwich; Clementine; apple pie; Caramel Rocky; cup o' tea.
Dinner: Ham and mushroom thin pizza; chips; mashed potato; peas. Pudding was: Strawberries with cream and sugar; Shortbread finger; Dark chocolate digestive. Coffee; piece of Tesco's cheapo chocolate.
Supper: Cup o' tea; Gingernut; dark chocolate digestive.

Monday, 14 September 2009

More looking at search

Yesterday I was trying to find out how Wordpress' search function works in the hope I could write something similar for the rest of my photo website.

Doing some googling, I found this post Make WordPress' search function suck Less (must admit, I haven't actually used Wordpress' search function, so didn't actually know it wasn't meant to be any good).

Anyway, following on from there I found a Wordpress search plugin called wpSearch, which according to the info:
wpSearch is a very powerful search plugin for Wordpress. It is based on the open source search engine "Lucene" which means its fast and relevant. If you need an awesome blog search, you've come to the right place.
So next I searched for Lucene, and found this post Creating A Fulltext Search Engine In PHP 5 With The Zend Framework's Zend Search Lucene.

Reading through that article it seemed like all it does is to take info already existing in your mysql database, and then index it itself.

So I looked on the mysql website, and found out how to search text fields using mysql. I spent quite a long time reading the various pages and comments on the MySQL Full-Text Search Functions this morning.

One of the comments near the bottom of the main MySQL manual page on Full-Text Search Functions, suggested using Sphinx, so I took a look at that. After installing it, I spent most of this morning and this afternoon trying to work out how to write the MySQL query needed to get Sphinx to index all the database fields I wanted to be searchable.

As an aside, I also noticed that the mnogosearch domain seems to have expired, not sure if they're not working on it any more.

As well as trying to work out the MySQL query I needed, after lunch I also went on Animal Crossing. Sahara was there, but only one Animal had any old wallpapers they would give me. I already had 2 old wallpapers though from Sahara's previous visits, so I took the three wallpapers to Sahara and got a rare wallpaper in extension.

After dinner I did some Japanese with Moccle. I did some work trying to use Sphinx, watched The Gadget Show with Rad, watched a bit The Ballad Of Narayama (1983 version), and did some more japanese with Moccle.

The weather was overcast all day today, though the cloud started to break around sunset, resulting in a nice sunset.

Breakfast: Lemon marmalade toast sandwich; cup o' tea.
Lunch: Mature yet mellow cheddar cheese with iceberg lettuce sandwich; 2x plums; clementine; Rocky; cup o' tea.
Dinner: 1⅓ Sausage roll; mashed potato; baked beans; brown sauce. Pudding was pluk crumble with custard. Coffee.

Sunday, 13 September 2009

Didn't take any photos of Arts Fresco

This morning I went on Animal Crossing for a bit, then went to Church. After church me and L walked back home through the town as the Arts Fresco was just starting. We saw a small stage with lots of black doors on it, seemed the act hadn't started yet, and also some dancers warming up in the square. Further up the road we saw a bloke dressed as a nun driving a small motorised piano, then some blokes covered in gold paint on stilts. They were kind of like statue people, but they would move occasionally.

Then a bit further up there was a box running around, then at the top of the road there was some dancing workmen, who had quite a large crowd watching them.

When we got home we had lunch, then after that I went out in the garden and took a few pictures of a bumble bee who was on a dandelion.

After that I cut out some pogs in photoshop to add to my pog website, then updated the pog website. I also read a few articles on The Luminous Landscape while I was waiting for the pog images to upload to the server.

After dinner I watched an episode of The Equalizer.

Then I looked at search engines for my website again, did a backup, then went to bed.

The weather today started off sunny, but then was overcast by midday, and stayed overcast the rest of the day.

Breakfast: Blackcurrant jam toast sandwich; cup o' tea.
Lunch: Mature cheddar cheese with iceberg lettuce sandwich; Banana; Rock Cake; Caramel Rocky; cup o' tea.
Dinner: Chilli con carne; rice; tortilla. Pudding was ice cream. Coffee; Piece of Cheapo Tesco chocolate.

Saturday, 12 September 2009

Lubenham Scarecrow Festival

This morning I went out in the garden, but only saw one fly, and it flew away.

I did some more work getting mnogosearch setup, but it seems that the php extension/interface/front-end for mnogosearch probably won't work with the mysql native driver (mysqlnd), which is what I'm using on the web server.

So I posted on the mnogosearch forums to see if using the php extension when php was compiled with the mysql native driver was possible.

Next I looked at the perl front end. It seems that to get the search results on my page, I would need to call the perl front-end from php (as I need my php includes to be printed as part of the page), and then probably re-process the perl output in PHP - not terribly efficient.

So I decided to stop looking at search for a bit, and looked for a new compactFlash card, to make sure I had plenty of memory for our trip to Korea and Japan. The Sandisk Extreme III 4GB CompactFlash memory cards seem to be £20 now, when about a year ago they were £15. So instead I bought a Sandisk Extreme III 8GB CompactFlash memory card, which was £33. It was the same price at Amazon and 7dayshop, so I bought it from 7dayshop as they explicitly stated that it was the newer 30MB/s version, whereas the amazon listing didn't state the speed.

I also checked ebay, but most of the cards on there seemed to be more expensive (and there's always the possibility of getting fakes from ebay).

After lunch I went on Animal Crossing, then went to the Lubenham Scarecrow festival with Mark, Shaz, Clare, and L.

Yesterday I was trying to find out a good way to get CGI working with Nginx. I already had setup the perl fast-cgi cgi script, but the problem with this is that it doesn't include a way to check if it's running or not. What I would like to do is to have a cron job that tries and starts it every half hour or so, this means that if the process gets killed for some reason, it will automatically be restarted within half on hour.

Trying to find out how to do this, I found this post nginx cgi, which suggests using thttpd, another (lightweight and reasonably popular) web server that I'd never heard of before. Then after that I read a post on the WebFaction forums about how you can check whether a program is running or not in a shell script.

In the evening I sorted and processed the scarecrow photos I'd taken today and did a backup. I also did a bit of work on my photo website blog.

The weather today was warm and sunny all day, and there was a sunset with a clear sky.

Breakfast: Blackcurrant jam toast sandwich; cup o' tea.
Lunch: Mature cheddar cheese with iceberg lettuce sandwich; 3x plums; home-made rock cake; Caramel Rocky; cup o' tea.
Afternoon snack: Ring doughnut; can of Fanta Fruit Twist.
Dinner: Re-heated Fish & chip shop chips; 2x delee sausages; baked beans. For pudding I had the last slice of Rad's birthday Blackforest Gateaux from yesterday. Coffee.

Friday, 11 September 2009

Trying to install a search engine for my website

This morning I checked my email and tried to get wget to download my website so I could use swish++'s httpindex program. On the Ubuntu forums someone suggested using httrack instead of wget to download the site, but I couldn't get that working either.

Shaz and Clare came back from holiday in the Philippines, and we watched a slideshow of the photos they had taken.

Before lunch I went in the garden for a few minutes and took a couple of photos about a cranefly.

After lunch I played on Animal Crossing as usual, then checked my email again. After that I tried installing a different search engine to use on my website, but found that I didn't have enough hard drive space in my Ubuntu Virtual machine. I spent ages trying to get to the boot screen in the Virtual Machine when starting it up, but the time you get to press the button (esc) was too short for me to ever hit it on time.

Then I did some googling and found this helpful post: Tricks for getting a VM to boot from CD – bios.bootDelay. After adding bios.bootDelay = "10000" to the Virtual Machine's .vmx file I finally managed to get into the boot menu so I could boot gparted from CD.

After getting the Virtual Machine's hard drive size increased, I tried to install OpenWebSpider. It requires Mono, so I first tried installing that. However, that requires bison, so I installed that.

After getting bison installed, I tried installing Mono again. However, I still got the error that bison wasn't installed. I did some googling to see what you should do if a program is in a non-standard location. I did find some info (add LDFLAGS=-L/path/to/app/lib to your configure command), but this didn't seem to work, so posted on the Mono forums (which seems to actually be a mailing list) to see if I could get some help there.

So out of the three search engines I've tried (Google site search, Swish++, OpenWebSpider), I haven't been able to get any of them to work. :(

I downloaded another search engine to try out, mnoGoSearch. But I got an error when trying to make it, something like
In file included from spell.c:997:
/usr/include/mysql/my_global.h:710:1: warning: "closesocket" redefined
In file included from ../include/udm_common.h:21,
from spell.c:23:
../include/udm_config.h:87:1: warning: this is the location of the previous definition
spell.c:1000:20: error: plugin.h: No such file or directory
spell.c:1118: error: expected ')' before '*' token
spell.c:1191: error: expected ')' before '*' token
spell.c:1215: error: expected ')' before '*' token
Using google I found someone else who had had the same problem, and luckily they had worked out how to fix it: mnoGoSearch 3.3.8: compiling with --enable-mysql-fulltext-plugin fails.

So first I had to see what version of mysql I had installed. mysql -version told me I had 5.0.75.

Next I had to find where I could download the source for an old version of mysql. Luckily google had the answer again, and I found a link to the 5.0.75 mysql version.

After downloading and untarring mysql 5.0.75, I found it didn't contain a plugin.h file, so I configured and make'd it, but it still didn't contain a plugin.h (find ./ -name plugin-h returned no results). Then I looked at the MnoGoSearch Manual page for the MySQL fulltext parser plugin, and realised that the Mysql pluggable fulltext parsers interface is only available from MySQL 5.1 onwards. Doh!

After a while I got bored and tried making a custom bokeh piece of card thing and taking some photos with my 50/1.4.

I also saw that Warehouse express are taking pre-orders for the Sony Alpha 850 for £1898, which is actually more expensive than the Canon 5D Mk II at £1879. It seems there is a greater discrepancy of prices in the US (with the Sony Alpha 850 being cheaper than the Canon 5D Mark 2). For some reason the Sony Alpha 850 is a lot more expensive here than it is in the US, On the Luminous Landscape they said:
As you've read in the headline, the Sony A850 is going to sell in the US for around $2,000. This undercuts the 5D MKII and A900 by some $700, or 25%.
Quite a different story to the UK pricing.

The weather today was nice and sunny. Around sunset the sky got filled with thin wispy clouds, making for a very nice sunset. A shame I had to be inside trying to get mnoGoSearch installed.

Breakfast: Blackcurrant jam toast sandwich; cup o' tea.
Elevenses: Cheese cake (Philippino cheese flavoured small sponge cake); cup o' tea.
Lunch: 2x cheese on toasts with iceberg lettuce; 2x (home-grown) plums; 2x (home-grown) grapes; home-made Rock cake; Caramel Rocky; cup o' tea.
Dinner: Fish & chips (from fish and chip shop); salt. For pudding I had a dark chocolate digestive and a shortbread finger.
Supper: Slice of Blackforest Gateaux (Rad's birthday cake); cup o' tea.

Thursday, 10 September 2009

Went on a walk

This morning I went out on a walk with Rad. After we got home I took a few photos of a dead beetle and some little weird beetle things that were with it (I'm guessing they were mites that had been living on the beetle).

After lunch I did some washing up, then went on Animal Crossing for a bit. After that I took a few more photos of the dead beetle and the little weird beetle things that were with it. I downloaded the pics to my PC and then processed them. I uploaded some of the beetle and weird little things that were with it photos to WAB to see if anyone could tell me what they were.

After that I checked my email, then I tried installing Swish++. I had some trouble in that I when I ran make, I was getting an error message similar to
User.c: In member function ‘virtual void User::parse_value(char*)’:
User.c:55: error: ‘::exit’ has not been declared
make: *** [User.o] Error 1
After doing some googling I found that I needed to add #include <cstdlib> to the file mentioned in the error (in the above example User.c). The C++ Standard library includes the definition/declaration of exit, so by including the library this fixes the problem.

When I ran make again, I would get notified of the same error, i.e.
error: ‘::exit’ has not been declared
But in a different file. So I just kept adding #include <cstdlib>to the file that needed it, running make again, etc etc until eventually I had added #include <cstdlib> to all the files that required it and make ran successfully.

I'm guessing the compiler I used (g++) is meant to either add cstdlib automatically, or maybe should include the definition of exit automatically, as the INSTALL.unix file that comes with Swish++ says
Don't complain to me or bother asking me for help if you get either "No such
file or directory" for or errors in the standard C++ headers. It means that
your C++ compiler and/or libraries are improperly installed. I know nothing
about your OS or how your system is (mis)configured. Complain to your
sysadmin: the person who botched the installation and whose job it is to fix

After installing Swish++ I tried to find out how to actually use it. I went on the Swish++ website, read the FAQ, and saw that it was only designed to work with English. My website has the latin/scientific names for stuff, and after I've been to Korea and Japan, it will also have things in Romanji (Romanised Japansese), and probably Kanji as well.

I posted on the web squeeze to see what other people would recommend for adding search to your website, then tried to get Swish++ working. I read the docs on httpindex, but couldn't get wget to download the website for swish++ to index, so posted on the Ubuntu forums to ask for help with this.

The weather today started off cloudless, then during the morning clouds started to roll in, creating a mix of clouds and sun. In the evening all the clouds rolled away, and there was a sunset with a clear sky.

Breakfast: Blackcurrant jam toast sandwich; cup o' tea.
After walk snack: Dark chocolate digestive; shortbread finger; coffee.
Lunch: Sliced pickled beetroot sandwich; packet of Smoky bacon flavour crisps; 3x plums; cup o' tea.
Dinner: Pasta; Cheese sauce stuff; Chicken nuggets; ground black pepper. Coffee.
Supper/pudding: Rock cake; cup o' tea.

Wednesday, 9 September 2009

Getting scared by behaviour at the rear end of a moth

Last night I caught a moth that was in my bedroom, so this morning I tried to take some photos of it. However, when I came to photograph it, there was loads of little bits in the jar with it.

I wasn't sure if the bits were scales that the moth had shed, eggs, or something else. Looking at them at 5x magnification with the MP-E, they looked eggs. They didn't seem to be stuck to the paper though, and rolled around when I moved the paper.

The moth was a bit flighty and went on the carpet, so I didn't really get any good photos of her. I downloaded the memory card to my PC, did a quick process of the moth and egg photos, then posted them to the WAB forums to try and get some advice on what I should do with the eggs.

After that I processed and sorted all the other photos that were on the memory card. Then I did a backup. By the time I had done that, I had had a reply on WAB, so I followed the advice given and put the eggs under a bush outside. I found that actually some of the eggs were stuck on the paper, so I cut out the bit of paper with the eggs on and put that under the bush.

Then I came back inside and tried to take some photos of the moth, but it kept walking around. After a bit it looked like it was starting to lay eggs again, so I thought it would be great if I could get a photo of it laying eggs. But actually, it didn't seem to be laying eggs (though it did have stuck just below its rear end).

Whatever it was it was doing, it was pretty disgusting. It looked like an alien was trying to escape from the moth's rear end. This thing was poking out of the moth's abdomen and waggling around, then going back inside the moth's abdomen, then coming out and waggling around again etc. It was too weird for me to bear, so I put a jar over the moth again and took it outside to the garden, though by the time I got it there, it seemed like it might be dead.

I just left it on the piece of paper under the bush. I'm not sure what the moth was doing, but I posted the photos I had taken to WAB to see if anyone there knew.

After lunch I went on Animal Crossing, did another backup, then went in the garden to take some photos as it was nice and sunny. I saw the moth wasn't on the paper any more, it was under the bush on the soil (quite well camouflaged). So I guess it wasn't dead since it must have walked off the paper.

I found a shieldbug in the grass, I tried taking a close-up of its head, but then it started 'running' across the grass, so it was too hard to get it in focus.

I got a couple of fly photos (though they both flew away after a couple of shots), then I came back inside.

I checked my email, and one of the emails had a link to the link about photographing orchids, which has some great photos in it. I especially like the one with loads of wasps flying towards the flower.

I wanted to see why IE7 seemed to be parsing my test page that I was using yesterday as HTML instead of xml. However, when I loaded the page today, I found that it was being parsed as xml (I got an xml parsing error due to the <> I had put in the page). Deleting the <> from the page, and refreshing it, I was greeted by the same error.

So I cleared the cache and refreshed the page, and this time the page did load, with the page displayed using IE's xml view (so not as a webpage). Using Fiddler I could also see that IE was requesting all the modules used by the DTD I was using (XHTML+RDFa 1.0):
200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK

200 OK
Note that IE requested the entity lists, so it didn't complain about the &nbsp; I had in the page.

I removed the doctype declaration, cleared the cache, refreshed the page, and now did get an error about the &nbsp;. I removed the &nbsp;, cleared the cache, refreshed the page and now got an xml view of the page again.

So I'm not sure why IE was displaying the page as HTML yesterday. I tried adding the &nbsp; entity declaration into the doctype declaration that an XSL stylesheet that could be loaded into IE (This solves the problem of IE downloading the DTD on each page view but also gives a doctype declaration so as to prevent quirks mode in IE7 and IE8). However (unsurprisingly), I still got an error that

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

The operation completed successfully. Error processing resource ''. Li...

        <p>This is content in the XHTML &nbsp; namespace</p>

So it seems that you can't add named entity support to XHTML. Unless you want to use a custom DTD (which would need to include the XHTML DTD), which IE will download on every page view. Or otherwise you may be able to include the entities in an empty doctype declaration, but IE will print "]> >" at the top of all your pages.

I checked dpreview to see if they had any news on Leica's announcement that was scheduled for today (the m9 I guess).

I read about the m9 on dpreview, then made dinner and ate dinner. After dinner I had a look round the garden, but there weren't any insects around (well, a couple of moths flying around and maybe one fly). I did the washing up, then played on the Swordplay Showdown on Wii Sports Resort, and finally completed it. Unfortunately, I got hit once, so I still I need to try and complete it without getting hit if I want to get all the badges.

After that I finished reading the Leica M9 preview on dpreview, then checked the canon lens forum on dpreview.

I had another look to try and find out why google site search wasn't working on my site, and I think I found out why. I was loading the google javascript api ( only when the search button on my site was clicked on. The idea being that there wasn't much point loading the google js on every page (as the search button appears on every page on my site), so better to load it only when someone actually clicks on the search button.

However, it seems that google.load('search', '1'); must be called before the page has finished loading. This, of course means that the google js api must also be loaded before the page has finished loading (So you must use an inline script block to load and trigger the google search js to ensure the google.load method is called before the page finishes loading. Pretty annoying.

So it seems that google site search:
  • Requires javascript
  • Isn't XHTML Compatible
  • Can't be loaded dynamically

So I decided to see if there are any other ways to add search to your website. I found this list of Open Source Search Tools, and then downloaded Swish++. I haven't installed it yet, I'll maybe take a look at that tomorrow, though I might go out on a walk with Rad tomorrow.

Breakfast: Blackcurrant jam toast sandwich; cup o' tea.
Lunch: 2x cheese on toasts; salad; 3x plums; slice of yoghurt and raisin cake; Penguin wafer bar; cup o' tea.
Dinner: Breaded chicken burger with Chilli mix that was meant to be for putting on chicken when you fry it, iceberg lettuce, tomato ketchup and grated cheese in a bun; mushroom flavour fake cup a soup; slice of toast. Pudding was a Cadbury's dream ice cream (like a white chocolate Magnum). Coffee; piece of Fairtrade fudge.
Supper: Dark chocolate digestive; cup o' tea.

Tuesday, 8 September 2009

Trying to add named entities support to XHTML

This morning I checked my email then took some photos in the garden.

I did some more work on my website the rest of the morning and afternoon, still trying to get Wordpress and Google site search to work.

One of the things I was looking at was if it was possible to add named entities support to XML/XHTML. In my googling I came across this article The perils of using XHTML properly, which while it doesn't cover what I was looking for, is an interesting read. I was particularly interested in the bit about adding stylesheets correctly:
<?xml-stylesheet href="stylesheet1.css" type="text/css"?>
<?xml-stylesheet href="#stylesheet2" type="text/css"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="" xml:lang="en" lang="en">
<title>XML stylesheet declaration</title>
<style type="text/css" id="stylesheet2">
@import “stylesheet2.css";
I'm using the same syntax as I would in an HTML page, and it doesn't seem to cause any problems:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="" xml:lang="en" lang="en">
<title>XML stylesheet declaration</title>
<link rel="stylesheet" href="./stylesheet1.css" type="text/css" />
<link rel="stylesheet" href="./stylesheet2.css" type="text/css" />

After dinner I played on the sword thing on Wii Sports Resort again, still haven't completed Reverse Volcano yet.

After that I tried out an example for extending XHTML, in the hope that it would be possible to extend XHTML to include common named entities. However, while the browser would render the example (served as application/xhtml+xml or application/xml), using Fiddler I could see that the browser didn't make any attempt to access the custom schema. This meant that while I could try and add named entities to a schema, they wouldn't be respected by the browser as the browser wouldn't attempt to read the schema, and so knew nothing about them.

Still, it was interesting to see that page rendered in IE7 as html rather than xml. The example page doesn't have a doctype declaration, in IE7 this put the browser in quirks mode (BackCompat), but in Firefox the page was rendered in standards mode (CSS1Compat).

After that, I read an article on using a custom DTD. Downloading the example from there, I found that the page would render in standards mode (CSS1Compat) in both Firefox and Internet Explorer 7, however neither browser requested the DTD so I'm guessing if you tried to use this method to add named entites support to xhtml it wouldn't work.

I tried the other method suggested in that article of writing the entity declarations inline in the doctype declaration of the page. This worked in Firefox, and allowed me to use &nbsp;. In IE it printed the ]> characters, like the article says happens.

Strangely, it seemed that IE wasn't using an xml parser to parse the page, but was parsing it as html. I added <> to the page, Firefox complained about the invalid xml, but IE didn't. The page was definitely being sent to IE7 with the header Content-Type: application/xml; charset=utf-8 though (I checked in Fiddler).

The weather was sunny and quite windy most of today. It clouded over in the evening, and there wasn't a sunset to be seen.

Breakfast: Lemon marmalade toast sandwich; cup o' tea.
Lunch: ½ Cheese toastie; Packet of Barbecue flavour crisps; some Cherry tomatoes; banana; clementine; 2x plums; Slice of Yoghurt and raisin cake that McRad made a few days ago; Chocolate Orange Montana; cup o' tea.
Dinner: Slice of pepperoni pizza; chips; salad. Pudding was a Slice of Yoghurt and raisin cake that McRad made a few days ago with instant custard that had the consistency of water. Coffee; Piece of Tesco's cheapo chocolate.

Monday, 7 September 2009

Didn't get any stuff done

This morning I went out in the garden to try and take some photos of insects. I saw a wasp, a crane fly, and a normal fly, but they all flew away so I didn't actually get any pics.

I came back inside and calibrated my monitor, then tried to do some more work on my photo website.

Komodo Edit seems to crash quite frequently, so I thought I'd check if there were any updates. I did think that Komodo Edit would automatically alert you when updates were available, but I decided to check for updates in case in didn't. Well, there was an update available, so it seems that Komodo Edit doesn't check for updates automatically.

Unfortunately, Komodo Edit couldn't download the update itself - it just got stuck at 'Connecting to Server'. So I downloaded the latest version from the Activestate website. I untared it, and got a load of errors about missing files. I tried to install it anyway, but that didn't work, I got an error about missing files.

So I thought I'd carry on using the current crashy version (5.1.1), but it wouldn't start. So I restarted the Ubuntu virtual machine, but still couldn't get Komodo Edit to start. I opened Firefox to try and download Komodo Edit again, but the search button wasn't working, neither the top right hand corner search built into the browser, nor the search on the default webpage ( Ubuntu version) that Ubuntu starts up with.

So I had to restore the Ubuntu Virtual Machine Image from my last backup. I tried downloading the latest version of Komodo Edit again, but then had the same problem when extracting it. However, I noticed that one of the messages said about there not being enough space, rather than it just couldn't find a file/directory.

I tried using Google from Firefox again, but again the search wasn't working. After emptying my deleted items, I found I could now search in Firefox. Seems the problem was just that I didn't have enough hard drive space. I extracted Komodo Edit again, and it installed fine.

After getting the latest version of Komodo Edit installed (it still crashes though), I tried to do some more work getting Wordpress working. However, I came across a few problems I couldn't find answers to on Google, so I posted on the websqueeze to try and get help there.

I went in the garden and actually managed to get a few photos of a wasp, though I had to keep running away whenever it started flying. I didn't get any great photos, though I did at least get some in focus.

I read while doing backups, then I tried to see if I could add Google Search to my site.

At dinner time, L ate one of his corn cobs that he'd been growing in the garden, but it was quite weird as most of the cob didn't have any corn on it, and the bits of corn that were on it were really big and fat.

After dinner I played on the Sword challenge thingy on Wii Sports Resort for ages. I was just trying to complete the reverse Volcano level. The furthest I got was to the last bloke, he only had one heart left, but then he killed me.

I did some more work on my website, but found that the Google javascript was breaking. Doing some googling I found a thread about a similar problem with the Google Maps javascript. It seems the problem is due to Google using innerHTML and document.write, which doesn't work with XHTML documents.

One of the posts there pointed to a fix that overwrites the document.write method to an XHTML compatible document.write. (Currently their page is powered by Wordpress, and served as XHTML, so it can't be pasred due to the problem with Wordpress using named entities that don't exist in XML - I needed to view source to read the page).

However, while I now wasn't getting any javascript errors, the google.setOnLoadCallback function didn't seem to be working - the callback function never fired.

Also, I was getting a javascript error in IE, but the IE script debugger wouldn't show me where the error was, just saying
A debugger break at "JScript anonymous function" could not be handled because the source document could not be found.
Check the class path in the Debug Options dialog. The application will continue.
I tried googling, but couldn't see how to fix this. I also tried deleting all the headers to do with Cache/expires etc. in Fiddler 2 for the google javascript files (all javascript files served from my site have long expires headers), but still got the same error.

It seems that XHTML is causing quite a problem for me with this site, with both Wordpress and Google not supporting it (at least Wordpress doesn't support XHTML in its default configuration, not sure if it can be modified to support XHTML). Unfortunately, I want to use RDFa on the site, and I think this is only available with XML/XHTML, though it seems there is a proposal to add RDFa support to HTML.

The weather today was overcast most of the morning, then it was sunny a bit and got quite hot in the afternoon. In the evening it clouded over again, but unlike yesterday, there wasn't any visible sunset.

Breakfast: Bowl of choco rice; cup o' tea.
Lunch: Mature yet mellow cheddar cheese with iceberg lettuce sandwich; a few cherry tomatoes; clementine; 3x plums; slice of ginger cake me and lad made last week; Orange Montana; cup o' tea.
Dinner: 2x Lincolnshire sausages; mustard; gravy; potatoes; green beans; carrots. Pudding was plum crumble with custard. Coffee; Piece of Tesco's cheapo chocolate - tasted alright actually.

Sunday, 6 September 2009

Not much

This morning I went on Animal Crossing, then did some more working cutting out pog series 2 in photoshop.

On the way back from church we saw a totally skill gangsta disguised as a Chav. He was wearing white trousers, white trainers, a white jacket, and a white cap. How did I know that he was gangsta? Moccle saw that it said 'gangsta' on the back of his jacket. Mmm Maniacal!!!!!

After Church I carried on cutting out pog series 2 in photoshop. Also, I forgot to mention, but the fix that I tried for stopping windows Vista from increasing the screen resolution when I start/restart the PC didn't work. It still quite often starts up with the maximum resolution possible, and then I have to change to display settings to put the resolution back down to a more appropriate level.

After dinner I finished cutting out Pogs Series 2 in photoshop, then went in the garden for a bit to try and take some photos. There was a wasp feeding on a plum that I tried to take some photos of, but it kept going inside the plum, and also I quite scared of it, so I didn't get any good photos.

After that I uploaded the Series 2 pogs images to the website, and then had to fix something on the website. I also cut out some other pogs in photoshop and added them to the website as well.

Before tea I tried to guess what some Kanji meant with Moccle. After tea we looked at Japan and Korea books on Amazon, ebay and some other book websites.

After that I listened to some music and checked all the usual websites.

The weather started overcast, though when we were walking to Church the sun came out and I got quite hot. Then it clouded over again and was overcast the rest of the day. Before sunset, about 7.30pm, the sky got lit up quite a nice pinky orange, though only for about a minute.

Breakfast: Bowl of choco rice; ½ banana; chocolate digestive; cup o' tea.
Dinner: Chilli sauce stuff; Chicken breast; 2x fajitas. Pudding was a slice of blackcurrant cheesecake. Coffee.
Afternoon snack: Slice of cake that McRad made (maybe sultana cake); cup o' tea.
Tea: Packet of smoky bacon flavour crisps; Clementine; 3x plums; Orange flavour Montana; cup o' tea.

Saturday, 5 September 2009

Photo editing

Today I was just finishing off the processing of the photos I took on the walk with Rad yesterday morning.

Also in the afternoon I played on Animal Crossing and watched 'Torn Curtain' with Moccle, Alfred Hitchcock's critique on how Americans don't have any original ideas and have to steal them from other people. It was pretty boring, and it's weird how Hitchcock often makes his sets very visible as being a set. I guess there's a reason why he did it (it's obvious he does it on purpose), but it just seems strange to me.

I also read a critique of French films, which was funny because it's true
In your typical French drama, things start gloomy, then something goes wrong, someone will think things are going to become better, then everything actually get worse and in the end everyone is dead or lost in a state of complete desperate misery.

In the evening I also started cutting out (in photoshop) pog series 2.

The weather today was sunny in the morning, then had clouded over by lunchtime. It was overcast the rest of the day. It was quite cold and windy, though not quite as windy as it has been other days this week.

Breakfast: Bowl of choco rice; cup o' tea.
Lunch: 2x cheese on toasts; bit of iceberg lettuce; cherry tomato; 3x plums; slice of ginger cake that me and L made the other day; Montana; cup o' tea; 3x pieces of Sainsbury's caramel chocolate; 2x pieces of Sainsbury's Turkish delight chocolate.
Dinner: Shepherd's pie; carrots; tomato ketchup. Pudding was a pancake with lemon juice and sugar. Coffee.