Saturday 28 February 2009

Taking photos of dead flowers

This morning I took some more flower photos (of dead/dry flowers). Then this afternoon I took more flower photos. I mainly used long exposures and light painting with a small torch as I thought this gave nicer results than flash. I also got what I think is quite a nice image by putting my face in front of the camera near the end of the exposure, and this gave the image a nice warm pinkish hue.

I found that I liked the images with coloured backgrounds. However, I didn't have many coloured backgrounds big enough to go behind the larger flowers like tulips. I tried clothespegging 2 pieces of A3 coloured sugar paper together, but you could clearly see the line where they overlapped each other. I also tried hanging up my yellow plastic poncho/kagool, but you could see the lines where it had been folded, even when I opened up the lens aperture relatively wide. So I went on ebay and bought 4 coloured bed sheets for about £16 including postage. Hopefully they will make good backgrounds, though I expect I'll have to iron the fold marks out of them before I can use them.

After dinner I read some threads on the canon lens forum on dpreview, then I went on Animal Crossing for a bit and saw K.K. After that I tidied my room a bit and vaccumed it (there were lots of small dead leaves and petals on the floor).

Food
Breakfast: Pink grapefruit marmalade toast sandwich; cup o' tea.
Lunch: ½ Red Leicester Cheese with sweet crunchy salad sandwich made with Fresh Bread-maker-made bread; Honey sandwich made with Fresh Bread-maker-made bread; banana; ½ slice of home-made fruit flapjack; cup o' tea.
Dinner: Swede; Broccoli; Gravy; Toad-in-the-hole; potato; mustard. Pudding was an American style chocolate brownie cookie. Coffee.

Friday 27 February 2009

Being rubbish at website design

This morning I did some work trying to design a photo website for myself.

After lunch I carried on working on the website design. Then after I'd done a few (rubbish) designs I posted them to the websqueeze to get some help and advice.

Ben came home from school and opened his birthday present from me, which arrived today, it was Pogman. I finished checking the web squeeze, then went on Animal for a bit, and the annoying Deena was walking around again. I did stab her a couple of times with my silver spade, but sadly the spade just bounced right off her fat belly.

After that I took some more photos of Clare's plant, then it was dinner time.

After dinner I took some more plant photos, then checked my email. Then I finished watching Deewaar with Mac and Ben. After that I went on an Eee PC that Mac had brought home from work.

Food
Breakfast: Strawberry jam toast sandwich; cup o' tea.
Lunch: Wiltshire ham with sweet crunchy salad sandwich; Clementine; slice of cherry genoa cake; cup o' tea.
Dinner: Battered fish portion; Roast potato; potato; baked beans. Pudding was a slice of jam swiss roll with custard. Coffee.
Supper: Coffee; Oreo.

Thursday 26 February 2009

Annoying stuff (Deena) and Good stuff (Lost)

I didn't get much sleep last night, I didn't get to sleep until after 12am, then woke up at 4.30am and it took me a while to get back to sleep again, then I got up at 7am.

In the morning I did a little bit of work on my website, just changing the text on the index page really. I then checked a couple more websites to see what anti-spam measures they had in place:


Again, both sites don't seem to have any spam prevention methods. I wrote up a post about spam prevention in website forms / email address available on websites and whether it was necessary since major sites don't seem to use any spam prevention methods (I guess they just use the spam filters on their email).

Then after that I started vectoring a picture of pogman slamming pogs.

After lunch I finished off vectoring the pogman image, then modified my site logo to use the new hand traced image I'd just done instead of the old one, which was done using Illustrator's live trace and live paint functions. I uploaded the new image to my site and modified the index text a bit more.

About 2.30pm Uncle Gez left to go back to the Philippines.

I checked my email and the websqueeze, and looked for domain names that I could use for my photography website that I want to get done ASAP. Then I went on Animal about 4pm.

I was extremely disappointed, annoyed and angry that Deena was walking around, and not only was she alive and well, she was happily singing a song! She didn't even say anything about her cold. So it seems she just magically got better and doesn't even remember being ill. What on cheese-earth?!?!

After that I took one of Clare's plants to take some photos of the flowers.

After dinner I watched some more of the Indian film with Mac and Ben that we were watching yesterday, then we stopped watching that and watched Lost s05e07, so Ben could see it before he had to go to bed. It was ultimate as usual. One of the good points is it has Matthew Abadon in it, but unfortunately he gets killed. Well, he gets shot at least. I'm hoping he's not really dead and will appear again before Lost finishes (or at least appear in some flashbacks).

After that I took some more photos of Clares flowers. I don't think they're that good really (my photos that is), hopefully I can try and take some better ones tomorrow. I was looking for examples of good floral photography, and found this site, which I think has great photos: Andy Small Fine Art Photography.

The weather was overcast all day, though the cloud thinned out slightly around sunset letting a bit of sun through.

Food
Breakfast: Pink grapefruit maramalade toast sandwich; cup o' tea.
Lunch: Cheese on toast; salad; clementine; banana; cup o' tea.
Dinner: Beef burger with salad and Piccililli (we don't have any Tom Ketch at the mo') in bun; ¼ Beef burger in ¼ bun; Fake cup a soup. Pudding was a slice of Ben's Birthday cake from yesterday with squirty cream. Coffee.

Wednesday 25 February 2009

Websiting

Today I was mainly working on my website.

In the process of working on my site I read a few articles that were useful:
Securing log in and 'Remember Me' option using cookies in PHP
Creating Scalable Websites (Mainly focusing on scaling databases)
Split a string in MySQL (I decided to just split the string in PHP in the end).

Also, thanks to Christopher over at the web squeeze I managed to solve my problem with my local web environment rewriting urls even when mod_rewrite wasn't on. The answer was that in my site config as one of the Options I had Multiviews enabled. Multiviews means that if a directory doesn't exist, Apache will look for files with the same name and serve up the file that best matches the browser's request.

I also went on Animal, checked my email and the websqueeze a couple of times, and watched a bit of an Indian film with Mac and Ben.

Food
Breakfast: Pink grapefruit marmalade toast sandwich; cup o' tea.
Lunch: Smoked ham with salad sandwich; clementine; slice of cherry Genoa cake; cup o' tea.
Dinner: Chicken nuggets; peas; lemon couscous. Pudding was a big slice of Ben's chocolate Birthday cake that Clare made with squirty cream. Coffee.
Supper: Coffee; Oreo.

Tuesday 24 February 2009

Spring cleaning and contact forms

This morning I checked my email, then read about PHP Session security. I read a Sitepoint article: Notes on PHP Session Security and then The Truth about Sessions by Chris Shiflett.

I thought the article by Chris Shiflett was well written and easy to understand, however after reading all the comments I don't understand how his method actually adds any security at all. Basically, it's unlikely that a hacker will guess a user's session id, but they may gain it by intercepting information sent between the user and the server. Now if they can intercept the session id, it is highly likely that they are also intercepting all other headers and requests sent, and so will also spoof all the other headers as well as the session cookie, thus making your checking of the HTTP_USER_AGENT or whatever useless. All it will do is make more work for the server and more work for you to code. Comment #69 on the article seems to sum it up perfectly: Why Sessions can't be secured.

After lunch I played on Animal Crossing for quite a while. I spent most of my time clearing out my basement and cupboards to make room for my Pave collection. After that I did some work on my website, then I went on Animal Crossing again. Unfortunately the Annoying Ben Poyo wouldn't swap a Mario item for his Pave lamp. He wouldn't even swap a Pave Bureau (that he didn't have) plus a Mario item for the lamp. He said he needed a lamp and only wanted Pave or Mario stuff, so he'd only swap it for a Mario lamp or he'd swap it for the Pave Bureau if I agreed to sell him all my Mario stuff for 20,000 bells per item.

After dinner I went on Animal a bit more, then re-named/tagged some ELO albums I'd bought/downloaded. I checked my email and looked at some websites to see how they deal with contact forms. dpreview and Amazon just have plain forms - no captchas, no turing tests, no honeypots and no hidden fields with a session hash. Play.com seemed to have some hidden fields with hashes in.

I also checked deviantart, they don't display a contact form if you're not logged in, but do a have an email address complete with mailto: link in the page (I checked the source and it was there, so not inserted by javascript).

Ford's contact form seemed pretty simple as well. It did include multiple fields, where which ones were displayed depended on the Email Topic you choose, so I guess fields that shouldn't be filled out depending on the option you choose could be used as a honeypot. I didn't see any fields with session identifiers in them.

I was thinking about adding a turing test (random simple question that is easy to answer like 'What colour is an orange?') and a honeypot (input field hidden with CSS that spambots will fill out but humans won't), and a hash stored also in the $_SESSION variable (so you can check the form is being submitted from your site) to my contact form. I was also thinking of printing all links to my email address as a link to the contact form, then use javascript to convert these into my email address (and change the link as well). Then people without js can use the contact form and everyone else can email me or use the contact form if they prefer. However, since these large sites that I've checked don't seem to take these precautions I'm not sure if there's not much point. Adding the turing test would take the most time since ideally you want a few random questions and answers so a spambot can't be sure which question it is that the form is going to ask.

The weather today was overcast all day.

Food
Breakfast: Pink grapefruit marmalade toast sandwich; cup o' tea.
Lunch: Smoked ham with salad sandwich; clementine; cup o' tea.
Dinner: Minced Beef; gravy; cheese scones; green beans; potatoes; carrots; tomato ketchup. Pudding was a pancake with lemon juice and sugar. Coffee.
Supper: Double choc chip Fairtrade cookie; coffee.

Monday 23 February 2009

Festivale

This morning I checked my email and the web squeeze, then I did some more work trying (and failing) to find out why my localhost was re-rewriting urls even though I wasn't telling it to.

After that I went on Animal Crossing for a bit, and it was Festivale. I was wearing my grape hat and grape shirt and small sunglasses (as I have been for the last few days), and the Animals all seemed to love it today and gave me a piece of yellow candy when I first saw them.

After lunch I did some work on panachallengetest and checked my email again, then about 3.30pm until dinner time I played on Animal Crossing more, trying to get different coloured candies to give to Pave, the dancing peacock, who would give you Pave furniture in exchange for 3 of a specific colour of candy.

When doing some work on the website I tried opening a .cgi file just to see what it was, but got an error message saying it was a binary file. I googled to see how you can open them, and it seems that while you can open them, they won't make any sense. A good article is Ascii vs. Binary files.

I also saw that one of the tickets said about implementing geotagging, and using the geo microformat. I hadn't heard about the geo microformat, so I looked it up and it sounds quite good and easy to write: Geo (microformat).

Another link I'd like to post here is for a Linux equivalent of Peerguardian, called Moblock. I haven't installed it as it sounds like it's not as easy to use as Peerguardian though.

After dinner I watched Ben play on Animal for a bit, and I finished off the ticket I was working on on panachallengetest. Then I went on Animal for the rest of the evening. I got most Pave items quite a few times, but never got the Pave lamp. Ben has it though, he said he didn't want to swap it with me, but I got a 1-up mushroom, so I'm hoping he'll swap it with that since he's collecting Mario stuff.

The weather today was overcast all day except for about 30 minutes in the late morning when the sun came out for a bit.

Food
Breakfast: Pink grapefruit marmalade toast sandwich; cup o' tea.
Lunch: Farmy cheddar cheese with salad sandwich; clementine; slice of cherry genoa cake; cup o' tea.
Dinner: Spaghetti; creamy sauce; bacon; parmesan style cheese (actually called parmegrannio or sumat); black pepper. Pudding was a slice of Lemon Meringue - yummyy. Coffee; Oreo.

Sunday 22 February 2009

Websiting, internetting and Animaling

Went on Animal Crossing this morning and bought a red turnip seed. Also sold my red turnip that I planted last week. After church I cannae remember what I did, then we had dinner.

After dinner I watched Ben play on Animal for a bit, then I played on it and bought a High end stereo off one of the Animals. It was Flea Market day, and the Animals sell their possessions at a good discount to Nook (the items cost a bit more than Nook would buy them from you for, so probably ⅓ of the normal Nook's price). If you had full pockets or no money the Animals would just say that they didn't want to sell any of their stuff, rather than saying that you didn't have any room or money.

I also found that the Animals were charging different prices for the same things (there were 2 Animals with a High end stereo for sale), though the difference wasn't much.

For the rest of the afternoon I did a bit more work on my website. I bid on a Sigma 300-300mm/5.6 lens on ebay. It went up to £1,716.00, which was about my maximum bid (actually the maximum I wanted to pay really was £1,500, but I bid a bit more to try and avoid getting outbid by a relatively small amount). Unfortunately this didn't meet the seller's reserve price. I'm kind of hoping they'll offer me the lens at the top bid. Considering that the Sigma 300-300mm/5.6 is/was about £3000 new from Digitial Rev on ebay with no tax, and that a couple of Canon 500mm/4 IS lenses have been sold for about £2400, a reserve price of £2,000 for the lens (I'm guessing this is what they set the Reserve price at) seems unrealistic to me.

In the evening I watched an episode of 'Nature's Great Events', which was about Pacific Salmon. After tea I watched Lost s05e06 with Mac and Ben again.

After that I checked Andy Rouse's blog, Moose Peterson's blog, and the canon lens forum on dpreview.

Food
Breakfast: Pink grapefruit marmalade toast sandwich; cup o' tea.
Dinner: Chilli con carne; rice; tortilla chips; grated cheese. Pudding was a slice of cherry genoa cake. Coffee; 2x Oreos.
Tea: Seriously Strong Farmy cheddar cheese with baby leaf salad sandwich; most of a packet of Roast Chicken flavour crisps; ⅔ banana; a few white grapes; Sainsbury's Chocolate Jaffa Bar (bit like a Rocky); cup o' tea.
Supper: Sainsbury's caramel chocolate; cup o' tea; Fairtrade double choc chip cookie.

Saturday 21 February 2009

Websiting

Today I was just doing some work on my website. I thought I had nearly finished most of the work, but then realised I hadn't done the page/script to handle it if you've forgotten your password, then when writing that I realised I hadn't done a page/script to let you update your email address or password.

The weather was nice and sunny all day. Weird!

Food
Breakfast: Pink Grapefruit marmalade toast sandwich; cup o' tea.
Lunch: Peppered Beef with mustard and baby leaf salad sandwich; cup o' tea; Kit Kat Chunky.
Dinner: 3x sausages; mashed potato; baked beans; grated cheese. Pudding was a slice of jam swiss roll with tinned pear half and custard. Coffee.

Friday 20 February 2009

Granny's funeral

This morning we went to Granny's funeral, and I had to drive Ben and Mac home because Mac said he couldn't drive because his shoes were too big. I haven't driven for about a year and when I got in the car I couldn't even remember what way round the pedals were. Thankfully God protected me and we got home okay. Shaz Mat-ee-az's boyfriend came up (from Sussex) this morning to come to the funeral as well. He must have got up really early since he arrived here about 9.15am.

There were probably about 15 other people at the funeral, and they were all Church regulars. After the service there were some biscuits and tea/coffee.

After we got home I looked through the focus stacks of my dead moth's body that I took yesterday when I was testing my Chinese ebay focusing rail. All the different methods looked pretty similar, and I couldn't really see any artifacts produced by the stacking process either.


After lunch I played on Animal Crossing for a bit, then I checked my spleenmail. After that I tested my YongNuo SC-27a TTL flash cable that I bought off ebay. Unfortunately it didn't work with the flash in TTL mode, and the flash would always fire on full power, like it does when in TTL mode and connected via PC sync cord. I did some googling and found this thread about connecting 2 SB-800s via sync cord, where someone says
the SB-800 manual also states that 'multiple TTL flash using cords is not possible on digital cameras' P72.


The mir.com Additional information relating to Nikon SB800 AF-TTL Speedlight- Part V page also says:
With cameras compatible with CLS and digital SLRs not compatible with CLS, Manual flash operation only is possible.


So it seems I've wasted my money on this SC-27 cord. I wanted it so I could use it on the SB800s in my fisheye portrait setup in TTL (and also use FPsync to shoot at over 1/250s), but I guess I'll have to continue using the off-camera SB-800 in Manual mode.

After testing that I packed all my camera stuff away, and then washed out the container the moth had been living in.

I made dinner, then after dinner I checked my spleenmail again. After that I watched an episode of 'The Blues' with Mac, then went on Animal, and FOUND MR RESETTI'S RESET CENTRE!!!! He gave me a silver spade, but there wasn't really anything else you do there. I had already got my bell rock today, so looking forward to trying out the silver spade on a bell rock tomorrow.

Food
Breakfast: Pink grapefruit marmalade toast sandwich; cup o' tea.
After funeral snack: Chocolate digestive; cup o' tea; Weird fairtrade corn snack things (like slightly salted monster munch).
Lunch: 2x cheese on toasts; clementine; ½ plain scone with Utterly butterly and raspberry jam; cup o' tea.
Dinner: Quarter pounder burger in bun with baby leaf salad, grated cheese and tomato ketchup; ½ bun. For pudding I had a slice of chocolate sponge sandwich cake. Coffee with Dooleys in it; Sainsbury's caramel chocolate.

Thursday 19 February 2009

My website breaks and ebay Chinese Macro Focusing Rail Review

This morning I did some more work on my website. I found that when I went to the page /sitemap, /sitemap.xml was being loaded when it should have been /sitemap.php. In trying to find out what the problem was I commented out my rewrite rule, and found that the url was still being rewritten. I posted a question to the web squeeze to see if anyone can help me.

Just before and after lunch I tested the macro focusing rail that I received yesterday. I bought it from the ebay seller jiakgong. It cost US $35.99 + $13.90 postage (£34.75 when I paid). Luckily the seller put the value on the customs declaration as $20, which meant I didn't have to pay any VAT/tax on it. I'm not against paying tax on imports, but am against the massive £10 post office charge whenever you have to pay tax. So if the seller had marked the real price on the item, I would have had to pay £5.21 tax and the £10 Post Office charge, which is a nearly 44% increase on the price I paid.

The first thing I noticed about the focusing rail was how it mounts on to your tripod - it has 2 1/4" screw threads, both at the side of the base mount rather than in the center of the mount as you would expect. I think this makes it a bit less stable than if it mounted with a center screw thread.

The next thing I noticed was that the knobs used for moving the focusing rails had a bit of play in them before they started actually adjusting the rail position:

I haven't used the focusing rail much, but can't see this being much of problem.

Here's the focus rail mounted on an arca-swiss compatible quick release plate on a ballhead on a tripod. I don't have a spare quick release clamp, so on top of the macro focusing rail I have mounted another ball head that has an arca-swiss compatible quick release clamp, this makes it easy to connect/disconnect the camera to the macro focusing rail, and easy to connect/disconnect the macro focusing rail from the tripod.

I think it would actually be better to connect the macro focusing rail directly to the tripod, and then use a head (preferably a geared head) on top of the macro focusing rail to adjust the angle you want the camera at. Unfortunately my main ballhead has a 3/8" thread and the macro focusing rail has a 1/4" thread so swapping between the two involves dismantling the tripod slightly to swap the screw thread size.

I tried using the ballhead so the macro focusing rail could be used to adjust the camera's position vertically. Normally to do a vertical adjustment you would need to play with the tripod legs or the center column height - not very easy to adjust accurately.

Here I have the camera facing down, using the vertical rail for adjusting focus, though more likely you would use the 2nd ball head to orient the camera to face forwards (like normal), then you would use the macro focusing rail for precise positioning on the vertical and horizontal axis, and then use the focus ring on the lens to adjust focus.

However, it seems this rail is no good for when you put it in a vertical position like this. The cog that moves the rail along no longer grips the 'track' (not sure what the correct name is). This happens because the weight of the camera hanging off the rail pulls the top section of the rail away from the bottom:


So to get the rail to move when in a vertical position, you need to push the top section of the rail back into the bottom section, so the cog can grip the track again. Not ideal. I googled for 'ebay focusing rail' and came across this thread where someone says the same thing.

For applications where you need to make small vertical adjustments I would not recommend this rail. I would expect that a more expensive rail like the Novoflex Castel-Q should work okay, though I've not used it (and obviously it's a lot more expensive).

I didn't have any problems moving the rail when mounted in a normal upright position or upside down for low shots (useful if your tripod doesn't collapse right down to the ground, mine would collapse to the ground except the center column is too long):


And here's a random photo of how to mount a full size flash unit (SB800 in this case) to the front of the MP-E:

It consists of a hot shoe bubble level attached to the MT-24EX adapter ring, then attached to the hot shoe bubble level is a Kaiser adjustable hot-shoe adapter, attached to that is the Nikon Speedlight Stand AS-19, and then the flash is attached to that. Not a very practical setup and I would worry about the hot shoe on the MT-24EX mount ring snapping.

I googled to see if you could purchase the MT-24EX mount ring as a spare part from anywhere, but couldn't find it. Then I looked at the Nikon SX-1 ring (Nikon's equivalent), but this doesn't have hotshoes on it, it will only work with the SB-R200 units that have specially designed bases that fit into the adapter ring.

After that I checked my email and checked whether urls were being rewritten on the web server - they were, but only as my rewrite rules specified. So I checked the differences between phpinfo() on my local site and the web server. I couldn't see any differences between the two that would cause the URLs to be rewritten on my local site but not on the web server. The web server had Zend Optimiser installed and my localhost was using fast-cgi rather than just cgi, but I couldn't see that either of these would make any difference to url rewriting.

I had a look at couch db, and read about that for a bit, then it was dinner time. After dinner I watched Lost (s05e06), which was ultimate as always. It did have some things that will be stupid and annoying if they don't explain them though.

After that I went on Animal for a while, then I read a bit more about couchdb. I don't think there's much point learning it at the moment as you need to install it yourself, so I wouldn't be able to use it on the web server since I'm on shared hosting, and so can't install programs.

The weather today was sunny in the morning, then became overcast at lunchtime, then was overcast for the rest of the day. In the evening it rained.

Food
Breakfast: Pink grapefruit marmalade toast sandwich; cup o' tea.
Lunch: Cheese on toast; ½ peppered beef with mustard sandwich; slice of chocolate sandwich sponge cake; toffee chewee bar; cup o' tea.
Dinner: Chicken pie; asparagus; broccoli; potatoes; carrots; gravy. White wine. Pudding was waffles with golden syrup and squirty cream. Coffee. DELEE!!!

Wednesday 18 February 2009

Creating a sitemap

I did some more reading about sitemaps this morning. I started off reading Sitemap Tutorial, which used the
Sitemap Protocol 0.9 introduced by SiteMaps.org which is a standard, validated and used by Google and most other search engines.


So then I visited sitemaps.org and read the info there, which was very helpful.

I checked the w3c example of styling XML with a CSS stylesheet in IE, and it worked fine. However, you can't make the urls turn into real links using CSS or include the rest of the HTML page, so I started looking at XSL.

w3 schools has a good tutorial on using XSL to style XML documents, so I followed that, but found that the for-each section wasn't working for me. So I copied the w3schools example XML and XSLT, and then gradually changed them until it didn't work anymore. I found that when I added the xml namespace to the urlset node, it stopped the for-each section working (well it probably still works, just doesn't find any items to loop through.

So after that I tried using DOMDocument in PHP, but I couldn't work out how access the nodes.

Next I tried SimpleXML, which was nice and, well... simple to use.

Me and Rad had lunch by ourselves, then about 1.30pm Clare, Uncle Gez and Ben came back from Asda, and a bit later Rad came back from the train station with Shaz. I played on Animal Crossing for a bit after lunch, then after everyone had come back I had some cakes since I didn't have any when I ate my lunch.

Later in the afternoon I gave DOMDocument another try and did manage to get the gist of how to access nodes this time.

Here's an example of displaying my sitemap using simpleXML in PHP:
$xml = simplexml_load_file('sitemap.xml');
echo '<ul>';
foreach($xml->url as $url)
{
$loc = substr($loc->loc, 24);
echo '<li><a href="'.$loc.'" class="label">'.$loc.'</a> Last Modified '.date_format(date_create($url->lastmod), 'jS F Y').'</li>';
}
echo '</ul>';


and here's the same using DOMDocument in PHP:
$xml = new DOMDocument();
$xml->load('sitemap.xml');
$urls = $xml->getElementsByTagName('url');
echo '<ul>';
foreach($urls as $url)
{
$loc = substr($url->getElementsByTagName('loc')->item(0)->nodeValue, 24);
echo '<li><a href="'.$loc.'" class="label">'.$loc.'</a> Last Modified '.date_format(date_create($url->getElementsByTagName('lastmod')->item(0)->nodeValue), 'jS F Y').'</li>';
}
echo '</ul>';


I'm substringing the location to remove the http://mysite.com from the url.

As you can see, SimpleXML is much easier to write, read and uses less code. Using DOMDocument you have the same problem you get when traversing the DOM in javascript - white space is a text node, so to get the <loc> value you can't just do $loc = substr($url->childNodes->item(0)->nodeValue, 24);, you have to do a getElementsByTagName or otherwise check if item(0) is a text node and if it is then get item(1) instead.

After doing that I googled for 'sitemap XSL' to see if there were any examples of how to style a sitemap XML file using XSLT. I found this helpful thread where someone was having exactly the same problem as me: google sitemap XML/XSL problem. So I made the changes they say to there (adding the sitemaps namespace to the XSLT file), and it worked!

Then I read the w3Schools XSL Tutorial to see if it had a substr() or similar function, and it doesn't. You could use javascript or server side scripting to do this, but seems kind of pointless. I think what I will do is have a php sitemap file for people to view (that way I can include page titles rather than just urls) and an xml sitemap for the search engine. The two files will be seperate (so the PHP file won't get its data from the XML file), but both files will be created by PHP when I approve changes to the database, so they will both contain the same up-to-date info.

Here's what my XSLT file looked like, obviously I would actually need parse the file using PHP and add includes to the page template files you get it styled in the same way as the rest of my site:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:url="http://www.sitemaps.org/schemas/sitemap/0.9" exclude-result-prefixes="url">

<xsl:template match="/">
<html>
<head></head>
<body>
<ul>
<xsl:for-each select="url:urlset/url:url">
<li>
<a class="label"><xsl:attribute name="href"><xsl:value-of select="url:loc" /></xsl:attribute>
<xsl:value-of select="url:loc"/>
</a>
<xsl:value-of select="url:lastmod"/>
</li>
</xsl:for-each>
</ul>
</body>
</html>
</xsl:template>

</xsl:stylesheet>


For the rest of the afternoon and evening I did more work on my website, just writing a script to create a PHP/html and xml sitemap.

In the evening I also watched the latest episode of The Office (US) and Flight Of The Conchords, I didn't think either of them were as good as usual, and gave them both a 5/10 on IMDB. I played on Animal for 15 minutes or so while I was waiting for Mac to get The Office ready to watch as well.

The weather today was overcast all day. It drizzled lightly most of the day I think and was also quite foggy all day.

Food
Breakfast: Pink grapefruit marmalade toast sandwich; cup o' tea.
Lunch: Medium cheddar cheese with crunchy salad sandwich; 2x clementines; Chorley cake; Asda triple chocolate Rocky style biscuit; cup o' tea.
Dinner: 2 slices pepperoni pizza; chips. Pudding was a creamy yoghurt. Oreo; coffee; Oreo; coffee. (That's not a mistake).

Tuesday 17 February 2009

Websiting

This morning I did some more work on my website and also had a look into whether cameras encode the timezone into the EXIF. It seems there isn't a timezone option in EXIF, and most camera's don't allow setting the timezone anyway.

After lunch I did some more work on my website, then me and Ben put the bird boxes up in the garden and tidied away the Snowtorro pieces that weren't snow (stones, straws and bamboo canes). Ben also jumped on and squashed what was left of the snow part of Snowtorro.

In the afternoon and evening I did some more work on my website. Rakuli had answered one of my questions on the web squeeze about elements overflowing and how to get a footer at the bottom of the page. The answer to the footer question was here: Make the Footer Stick to the Bottom of a Page, though I found I needed to remove the height: auto !important; height: 100%; values as they were breaking it in IE7, and instead just add the height: 100%; for IE6. I also had to change it like .footer, .push {height: 4em; clear:both;} to avoid the push element being floated in IE rather than at the bottom of #wrapper.

Later in the evening I looked into RDFa, I found a good article on it: RDFa, Web Development Standards, & SEO, but it seems it is only compatible with XHMTL, and my site uses HTML4, so I will have to leave that for now.

Then I looked at creating a sitemap. I did quite a bit of googling, and got a bit confused as different sites seem to use different XML Schemas, e.g.
SitemapDoc - Google Sitemap Generator and Editor has
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">


xml-sitemaps.com Sitemap Generator has
<urlset xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">


On the google website it says they have a sitemap generator that you can run on your server, but it needs Python installed. I thought it would be a good idea to run the google sitemap generator and see what the sitemap that that generated looked like. I went on my site's cpanel, it didn't have anything about python or a sitemap, but did a SSH/Shell access item. I went on that and it had a video of how to use it but the buttons for the Java SSH program weren't there.

So I generated an SSH Key, and then googled about how to connect to the server using SSH. I came across this article, which is very helpful: Ubuntu SSH How to. But when I looged into the server it kept rejecting the password that the SSH Key generator in the cPanel had created for me. After a few tries, I tried my normal password, and it accepted the password, but said shell access was disabled for my account.

I went back on the cpanel, and my SSH key was listed, but listed as not activated. So I activated it and tried to log into the server via SSH again, but it still wouldn't accept the SSH password that the cPanel had generated for me.

I checked my webhosts website and support and googled for my webhosts name and 'python' to see if they did have python installed, but couldn't find anything to say they did have python installed, so I presume they don't.

I went back on the google website, and found that actually they have an article on how your XML Sitemap should be structured. Google seem to use
< urlset xmlns="http://www.google.com/schemas/sitemap/0.84">


I will have to see if Yahoo and Microsoft have different suggestions. I am hoping that after generating the sitemap I can also use the same XML file to generate an html sitemap. There's some info on styling XML on the W3C website: How to add style to XML, but I don't think XML will display normally in IE.

I think my pet moth probably died today, it seems pretty dead anyway. I'll probably throw it away tomorrow if it doesn't move at all during the night. It lived quite along time for a moth though I think. Also I got my ballhead from DealExtreme today, seems pretty good, though it was covered in dust (not human skin dust, just wood dust or sumat).

The weather today was overcast all day.

Food
Breakfast: Pink grapefruit marmalade toast sandwich; cup o' tea.
Lunch: 1½ cheese on toasts; 2x clementines; slice of Madeira cake; mint penguin style biscuit; cup o' tea.
Dinner: Shepherd's pie; mixed veg; tomato ketchup; ground black pepper; grated cheese. Pudding was spotted dick with custard. Coffee; Sainsbury's caramel chocolate; Cadbury's Dairy Milk Turkish.

Monday 16 February 2009

Websiting

Today I just worked on my website. I was mainly just working on error message handling, changing the forms action to '#msg', where #msg was a named anchor at the top of the error/success message box. I also changed the javascript form checking functions so that they would add links to the errors, so when you click on the error message it will focus on the element where the error occured.

I did have trouble with it though, the only way I could get the link to focus on the correct item when clicked was to specify the exact element to focus on. So when looping through form elements I couldn't make the link work since I had no way of specifying the exact element. I could pass it something like el[i], but of course when you click on the element to run the function, el[i] (if it even exists) no longer refers to the same element it did when you were setting the function.

The weather today was overcast all day.

Food
Breakfast: Chocolate crunch oat cereal; cup o' tea.
Lunch: Tiger roll; ½ breaded ham sandwich; 2x clementines; slice of Madeira cake; mint penguine style biscuit; cup o' tea.
Dinner: Slice of ham quiche; mashed potato; baked beans; mixed veg. Pudding was 2x American style chocolate brownie cookies.

Sunday 15 February 2009

Not doing much

This morning I watched Mac go on Animal for a bit, and then I went on it for a bit and bought a red turnip seed from Sow Joan and sold my old red turnip to Nook.

After that we went to church, then when we got home I went on Animal again. After dinner I sat around in Mac's room for quite a while wanting to watch a film but Mac always said he didn't want to watch any films I suggested.

Then we watched a couple of Simpsons episodes on T4 in Mac's room. After that I checked ebay, my email, Moose News Blog and The Web Squeeze. Then I sorted/processed the Moth photos from yesterday and also some Succulent flower photos from quite a while ago.

Uncle Gez arrived just before tea. After tea we watched The Elephant Man, then I finished sorting/processing the Succulent flower photos.

The weather today was overcast all day and it rained a bit. Most of the snow melted, but there's still some piles and a bit left on the hills.

Food
Breakfast: Chocolate crunch oat cereal, cup o' tea.
Dinner: Rice; chicken curry; raisins; bit of pita bread. Pudding was ice cream with wafer and toffee sauce. One of Ben's home-made chocolate truffle balls; coffee.
Tea: Breaded ham with crunchy salad sandwich; plain scone with butter and raspberry jam; clementine; cup o' tea.

Saturday 14 February 2009

Sorting photos and taking new ones

After breakfast this morning I went out in the back garden with Ben and we saw how thick the ice was on the pond - it was thick, probably about 2 inches. Then I took some macro photos of air bubbles in a piece of ice.

I came back in and copied the pics to my comp along with the photos of the bird I took yesterday. Then I processed them and checked my email. I sorted the bird photos and looked up what type of bird it was - it was a Redwing, a type of Thrush. Then I started re-arranging all my bird photos into families, orders, genuses etc. since before they were all just in a folder called 'birds'.

After lunch I went on Animal Crossing, and did a bit of fishing as it was the fishing Tourney. I did catch a Sea Bass, but it wasn't as big as Mac's. I scoured the river for quite a while, but never saw a pike. And I didn't see any really big fish (presume they are Tuna) in the sea either.

Then I finished re-arranging my bird photos, then I checked my email and again and also checked deviant art and the Luminous Landscape. I also processed/sorted the ice photos and a few other photos as well.

After dinner I started sorting my photos of my pet moth that I took ages ago, then I took some new photos of it, and it is really ragged now.

Then I watched a blues documentary/film with Mac.

Food
Breakfast: Pink grapefruit marmalade toast sandwich; cup o' tea.
Lunch: Grated cheese with crunchy salad sandwich made with fresh bread-maker-made bread; slice of fresh bread-maker-made bread with honey; slice of Madeira cake; Mint chocolate Penguin style biscuit; cup o' tea.
Dinner: Delee Cumberland sausage; delee Prok & herb sausage; roast potatoes; roast parnsips; sliced carrots. Pudding was rice pudding with raspberry jam. Coffee; chocolate.

Friday 13 February 2009

Doing some work on my website

This morning I did some more work on my website and also took some photos of a bird I've not seen before in the back garden.

I was trying to find a way to stop spambots picking up my email address from the website. I found a good article on all the different methods available: Methods to hide email addresses from page source. After reading this article: Hide email address from spammers it seems that hex coding email addresses doesn't work. I didn't see the point in using a javascript solution since you're still going to need your email address in the page for people who don't have javascript enabled.

In the end I cut up my email address using <span> tags and encoded part of it in ASCII Hex, part in Unicode Hex and part not encoded. I put all this as a php variable, so I just need to echo the variable when I want to print my email address. I didn't include an anchor tag with mailto: href, just it's just plain text. If I want to add the link I'll probably do that via javascript. I doubt this will actually stop spammers picking up my email, but worth a try.

After that I had some trouble getting my registration script working. Eventually I found the problem was that I was calling $id = $stmt->insert_id() when it should be $id = $stmt->insert_id (No brackets).

Then when I got the script working I noticed that the PEAR debug info for sending the registration email looked a bit weird, for the html email links it had href=3D"http://mysite.com". I checked my email and the actual email seemed to have correct links (didn't view source, just hovered over them). I googled for it and found this useful thread explaining it: <A HREF=3D"http://........". It seems it's just a term used in links in emails.

After lunch I went on Animal for about an hour, then did some more work on my website.

I was still working on getting my registration script fixed, I had some trouble with not being able to login that took me a while to work out why - it was because I'd changed the hash method from md5 to sha256, and my database field was only 32 chars, when sha256 is 64 chars.

Then I had some trouble trying to make a link so if you try and login but haven't validated your email address, you can click the link and it will send you the validation email again. I did some googling, and it seems the only way to pass POST data from one page to another is by using a form. I guess I could have used $_SESSION or $_GET variables instead.

Making the form invisible and the submit button look like a link took quite a while, and then I decided to try and style my error messages. I googled and found this very nice tutorial: CSS Message Boxes for different message types, so I basically just copied the error box they'd done. I looked through my pog images to see if there was a suitable pogman picture to use for an error icon, but couldn't really see one, so I decided to just make a standard style error icon.

After dinner I finished making my error icon (just an exclamation mark in a triangle), then put it in the error message box. While I was looking for examples of icons, I found this page that has a lot of examples: Web 2.0 Icons.

After that I made a tick in a green box (success) icon and added some css to my site to style the success messages (again, based on CSS Message Boxes for different message types. Then I did some googling to see if I could find any other good examples of error/success messages styling.

The weather today was sunny most of the day, but a bank of cloud built up in front of the sun at sunset, so there wasn't much of a sunset.

Food
Breakfast: Pink grapefruit marmalade toast sandwich; cup o' tea.
Lunch: Breaded ham with crunchy salad sandwich; apple; milk chocolate fake kitkat; cup o' tea.
Dinner: Battered fish portion; peas; potatoes; salt; ground black pepper. Pudding was a small apple pie with custard. Coffee.

Thursday 12 February 2009

Reading The Web Squeeze

This morning I watched some more jQuery tutorial videos and my question on the web squeeze about the PEAR Mail class not working on the web server had been answered, so I ticketed my host to get that fixed. I also checked my email a few times.

After lunch I checked my email again and my host had fixed the include_path for PHP so that it would look where the PHP Mail classes were stored. Unfortunately the fix was in a PHP.ini file that they put inside the site's directory. I like to keep both my client side copy of the site and the live site the same, as otherwise I have to make sure not to select certain files when performing an update.

I downloaded the php.ini from the live site into my local site, and my local site would no longer work because the directory the extensions were stored in was different on the live site to my test site. I started creating symbolic links on the local site so the extension directories in the php.ini file would point towards where the extensions were actually stored on my local system.

But then after doing a couple I realised that actually I could probably just comment out the lines about the extension directories and the site would probably just use the extension directories specified in the main php.ini file. So I tried this and indeed mysqli still worked when the extension directories were commented out (it didn't work on my local site when the extension directories weren't commented out).

After getting that working I read nearly all the new threads on the web squeeze. I also googled a bit about encryption/hash algorithms and form spoofing, but it seemed I was already doing the stuff form spoofing articles talked about (basically just making sure you validate any data server side).

After dinner I watched 'The Day The Earth Stood Still' and the latest episode of Lost with Mac and Ben. Then I checked the web squeeze again.

Food
Breakfast: Pink grapefruit marmalade toast sandwich; cup o' tea.
Lunch: Breaded ham with crunchy salad sandwich; banana; milk chocolate fake kitkat; cup o' tea.
Dinner: 2x Burritos; rice; crunchy salad. Pudding was ice cream with yoghurt and wafers. Sainsbury's caramel chocolate; Cadbury's Dairy Milk Turkish; coffee.

Wednesday 11 February 2009

Websiting

This morning I did some work on panachallengetest, just finishing off the ticket I was working on yesterday that I thought I'd finished but hadn't. I also checked my email a couple of times and my flash gels that I bought off ebay arrived. A couple of the sheets had some marks on them of different colours, like different coloured sheets had been put next to them and then pressed hard against them with a pencil or something, rubbing the colours from the darker sheet onto the lighter sheet. Weird, but other than that they seem okay, though not really checked anything other than that I have 2 coloured sheets and 8 white sheets.

After lunch I went on Animal for a bit, then I checked the websqueeze and a couple of people had replied to my question about how to get the php mail() function working in Ubuntu.

The answer was to install the PEAR Mail and Mime_Mail classes. It took me quite a while to get it working, but these sites were useful: PEAR Manual - Mail, How to send email with php - tutorial & example, and Sending mixed-type messages with PEAR::Mail Mime. Unfortunately it seems that you can't view your emails as plain text in Hotmail, so I couldn't really test whether the multipart encoding worked okay, but the HTML email text certainly showed okay (though I didn't include any actual HTML).

I also checked the email headers of the email in Hotmail, and it looked like the plain text part should show okay for plain text email readers.

I edited /usr/share/php/Mail/smtp.php and changed the default host to my ISP's smtp address so my email script will hopefully work both locally and on the web server without any modifications.

Then I wanted to upload the file to the web server so I could test it on there. I had already checked on the cpanel that both Mail and Mime_Mail were installed. I googled to see if there was an FTP included with Netbeans, as I thought there would be (there must be actually since it connects to subversion servers okay). I found this article: Netbeans for PHP - FTP support added, however the FTP options don't appear in my copy of Netbeans. I checked for updates, but it was up to date. I checked if there were any FTP plugins I needed to download to get it working, but couldn't see any. So I gave up.

After a few people had recommended it on a thread at the web squeeze lately, I decided to try fireFTP, an FTP plugin for Firefox. I installed it and it worked nicely. The good thing about it being a Firefox plugin is that you don't need to be logged in as an administrator to use it.

I uploaded the file to the web server, but then when I ran it, it didn't work. I think my host has their include_path pointed at the wrong directory, but I posted the error to the web squeeze to get confirmation that that's probably the error before I contact my host.

I read some threads on the web squeeze and checked Luminous Landscape. I started watching some jquery tutorial videos, then it was dinner time.

After dinner I watched Bruce Campbell Vs. The army of Darkness with Mac. It was really good, and reminded me quite a bit of Season 1 of Power Rangers with all the funny monsters. The best bit is when his face gets all stretched, it looks really good.

Then I watched some more jQuery tutorial videos and read some stuff about jQuery as well.

The weather today was a bit sunny in the morning, then overcast the rest of the day. It rained a bit in the afternoon, but there's still some snow left.

Food
Breakfast: Lemon marmalade toast sandwich; cup o' tea.
Lunch: Breaded ham with crunchy salad sandwich; banana; slice of Genoa cake; cup o' tea.
Dinner: Meatballs; spaghetti; sauce stuff; parmesan cheese; ground black pepper. For pudding I just had a fake kitkat (I think it was a dark chocolate one). Coffee.

Tuesday 10 February 2009

Wasting time

This morning I did some washing up, unloaded and loaded the dishwasher, sorted the washing and put some in the washing machine. Then I checked my email and did some work on panachallengetest. I wanted to edit the EXIF of a photo to remove the Program mode information and the Metering information, but EXIFToolsGUI couldn't do this.

After some googling I found a Photo management program digiKam for KDE on Linux. I didn't know if it could edit the EXIF fields I wanted to, but I thought I might as well install it and try it out. I spent quite a long time trying to install it and googling the various error messages to see how to fix it (not the actual program, just the other things it required to be installed in order to run).

Eventually I realised that I was wasting my time really going through all the trouble of trying to get it to install, when all I wanted to do was edit a couple of EXIF fields, and if I couldn't edit them it didn't really matter anyway.

After lunch I did more work on panachallengetest. The main problem I had was that I was checking whether stirpos() evaluated to true. It was evaluating to false because the string I was searching for was at position 0 (0 evaluates to false). It took my quite a long time to realise that was the script wasn't working properly, even though on the php.net page for stripos it has a warning about precisely this.

Then I found that I hadn't read the ticket for the job properly (again) and had coded some extra functionality that wasn't needed. Most of the images I had spent time creating with different EXIF info missing were for testing this unneeded stuff as well. I really should learn to read what things actually say rather than just reading them and doing what I think needs to be done based on the overall gist of the ticket.

After commiting the changes I read Please Excuse Me While I Clean My Lens for a bit, then went on Animal Crossing for a bit.

Just as we were having dinner the Hospital phoned Rad to say that Granny had died.

After dinner me, Mac and Ben watched The Bourne Ultimatum. Then me and Mac watched Flight Of The Conchords s02e04 and The Office (US) latest episode (whatever it was).

I googled about using Nikon flashes on Canon cameras, and it seems it's safe to do so even without taping the TTL pins on the flash: Nikon flash on Canon body, Can I use a nikon flash with canon, Will A Nikon Flash Work on Canon Body in Manual? and Nikon flash on a canon body?. I checked for images of the bottom of the SB-28DX flash unit mentioned to check it does have TTL pins on the bottom, like the SB-800, and it does: Nikon SB-28 AF-TTL Speedlight Instruction Manual.

Another thread is this one: Nikon Flash on Canon Body, where the last poster says there may be problems using Canon flashes on Olympus cameras and vice versa, however SteB used the MT-24EX on an Olympus Camera, so it seems like the TTL pins don't actually have any negative effects when using flashes designed for a different system.

It seems from these that it is also likely there wouldn't be a problem using Canon flash units on a Nikon body. The only thread I found about this though is this one: Canon Flash on Nikon Body, where someone says they've successfully used a few different Canon flashes on a Nikon body.

Food
Breakfast: Lemon marmalade toast sandwich; cup o' tea.
Lunch: 2x cheese on toasts with crunchy salad; clementine; cup o' tea.
Dinner: Beef burger in bun with crunchy salad, tomato ketchup and grated cheese. Bowl of chicken flavour and vegetable fake cup a soup. Pudding was an apple pie. Coffee.
Supper: Happy Hippo; Coffee.

Monday 9 February 2009

Trying to get mail working in local web development environment

This morning I read a bit more of the canon lens forums on dpreview, then I went on Flickr and noticed I had a big notice saying that because I'm only on a free account only my last 200 pics will be visible in my photostream. Any older photos I've linked to should still be visible on my blog etc. But I won't be able to access them from within Flickr.

I don't want to upgrade to a pro account since Flickr requires that you must link back to them, and on sites like dpreview you can't wrap images in links. I think I'll probably just use the blogger/google/picassa image storage for the moment, then when I get my photo website done (probably be ages until I get that done) I'll just upload the photos there. Then I can link to them and do whatever I want with them, and don't have to worry about Yahoo going bust or Blogger starting charging for image storage etc.

I bought a load of stuff this morning, so that took some time and cost loads. But I do love stuff.

I checked my spleenmail.

Then I tried to update my test site on the webserver, but when I tested the site it didn't work properly - the .htaccess file with the rewrite rules was missing. I had updated the site using FileZilla in Windows, I first downloaded the files from Ubuntu to Windows, then uploaded them from Windows to the web server. I found the problem was that Filezilla couldn't see the hidden .htaccess files in Ubuntu.

After doing some googling I found this helpful thread over at the Ubuntu forums: Howto: Easy FTP with vsftpd. I just needed to add force_dot_files=YES to /etc/vsftpd.conf.

But then I had trouble restarting vsftpd. I was getting an error 500 OOPS: vsftpd: cannot open config file:restart when I tried to restart it. Again, I found my answer in a helpful thread over at the Ubuntu Forums: vsftpd won't restart. You just need to include the full path to vsftpd when executing it.

I did a bit of work on my website, then it was lunchtime.

After lunch I did some more work on my website, then started checking my email, then played on Animal for a bit, and then finished checking my email. I did a bit more work on my website. I was trying to make it so that the contact form would automatically fill out your email address if you were logged in to the site. But I was having with AES_DECRYPT not decrypting the email address.

After much messing about, I found the problem was that I had manually changed the username in PHPMyAdmin, and since the username was used as part of the key for decrypting the email address, it wouldn't decrypt since the username was different to what the email address was originally encrypted with.

So then I had to try and register a new user (well actually I deleted my current user and tried to register the same one again). But when I tried to register, the email wouldn't send. First of all I tried to find the php.ini file so I could check the SMTP settings in it. But I didn't know where the php.ini file that was in use was. I found out where it was by running phpinfo(), then it has an entry for 'Configuration File (php.ini) path' and 'Loaded Configuration File'. I found it was saved in /etc/php5/cgi/.

After looking at php.ini it seemed the SMTP settings were just for windows, and the only setting for Linux was the sendmail path. So I did some googling and installed sendmail. However, after getting that setup and trying to register, the site said that the email was sent, but I didn't receive it.

I read that you probably need to send the mail to your ISP's SMTP Server for them to send out as they probably block you from sending mail yourself to prevent spam. So after some more googling I found this thread at the Ubuntu forums How to properly install SendMail.

I had to cook dinner as Rad had gone to Hospital to see Granny, so that took quite a while.

After dinner I watched 'The Bourne Ultimatum' with Mac and Ben. Then I did some more work trying to get email to work. I installed Exim following the instructions on the Ubuntu forums. Then I had to uninstall sendmail since it was using port 25 so Exim couldn't use it.

After getting that setup I tried to register again and the email still didn't send. I looked at the Exim log (/var/log/exim4/mainlog) and saw that Exim was working okay but my ISP was rejecting the email as it wasn't from a real domain name. I guess another anti-spam measure. But weirdly with windows you don't have to set a real domain name anywhere for email to work.

Anyway, after much more testing and googling I found that if I used a real domain name when configuring Exim, then the email would send okay. But this seems a bit weird to do this when you don't need to on windows, so I posted to the web squeeze in the hope that someone can help me there.

Food
Breakfast: Lemon marmalade toast sandwich; cup o' tea.
Lunch: ½ Bacon with Tom Ketch sandwich; clementine; banana; chocolate digestive bar; cup o' tea.
Dinner: Chicken & Asparagus pie; mixed veg; jacket potato. Pudding was a yoghurt with malted milks. Coffee; crinkle crunch biscuit; choc chip digestive.

Sunday 8 February 2009

Granny bes Ill and I process photos and go on the pinternet and watch a film

This morning I went on Animal quickly and bought a red tunrip seed from Sow Joan. I dug up my current red turnip and sold it to Nook for 16,000 bells.

Me, Mac and Ben didn't go to Church today, but stayed in and 'looked after granny'. We didn't really as she was just in bed so you couldn't really look after her, though I did ask if she wanted a drink a couple of times and got her a cup of tea.

While we weren't at church I finished processing the photos from yesterday.

At dinner time a paramedic came to see Granny since she wasn't very well.

After dinner I went on the pinternet. I checked The Luminous Landscape, Andy Rouse's blog, Moose Peterson's blog, deviant art, red bubble, my email, dpreview, and also read a couple of threads over at Juza's forums about macro photography.

Then I searched the pinternet to see if I could find any alternatives to the Manfrotto by Bogen Imaging #FP211 - Diffusion Filter Pack - 12x12" (30x30cm). The cheapest price I have found for the Manfrotto Diffusion pack is about £33 from MPEX ($22 + $26 shipping).
I found LxStore, who sell large sheets of diffusion Gels for £3.80 each.
Then there's Sabre International, who sell whole rolls of diffusion filter gels for £4.95 + VAT each. You could probably make some money buying rolls from them, then cutting them into smaller pieces and selling them on ebay or through a website like flashgels.co.uk.
There's a seller on ebay who sells 10 sheets of Lee Filters (you choose what sheets you want) for about £29 including postage, so I think I'll buy from them.

After tea an ambulance came to take Granny away to hospital. Clare also showed me how to use the washing machine and tumble drier as she's going away for a few todays tomorrow and wants me to do some washing while she's away.

Then I watched The Bourne Identity with Mac and Ben. I've seen it before, but on rewatching I noticed the main woman is Lola from 'Run, Lola Run', and the Nigerian (or whatever nationality he's meant to be) bloke is Mr Eko from Lost. I thought the boss of the department trying to kill Bourne should have been Michael Douglas though. Oh, it also had the bloke who comes in to do training in the UK Office episode where David Brent plays the guitar and sings skill songs (Mac noticed that one).

Me and Phyllis grab a coffee together

Surprised
Then I played on Animal a bit more.

Awww....
Unfortunately Phyllis didn't want to go on a date with me.

Sorry, can I hit you with a net instead?

Golden Slingshot
I managed to see a golden slingshot, held up by 3 golden balloons. So I shot it down and got it. It fires three stones at once. Seems a bit pointchee, but oh well.

The weather today was slightly sunny in the morning (well cloudy, but thin enough for the sun to shine through). Then it was overcast the rest of the day. In the evening at about 7pm until 8pm it snowed quite heavily, but although it settled at first, it didn't seem to build up at all. Annoying, I like snow! There's still some on the road at the moment, but it looks like most of the snow on the car (apart from on the windows) has melted.

Food
Breakfast: Lemon marmalade toast sandwich; cup o' tea.
Dinner: Chicken Tikka Masala; rice; mixed veg; poppadom. Pudding was Kiwi fruit with strawberry whip. Coffee.
Tea: Bag of smokey bacon flavour crisps; ½ cheddar cheese sandwich; ½ honey sandwich; banana; chocolate digestive biscuit bar; slice of Cherry Genoa cake; cup o' tea.

Saturday 7 February 2009

Going on a snowy walk

This morning after breakfast I went in the back garden with Ben and we checked how thick the ice on the pond was. It was probably a couple of cm thick, and then further down in the pond there was another lot of ice, probably about 1.5cm thick.

I did some more work on my website, trying to get some HTML entities to display in my menu. I was using javascript to append them, and it seems you can't write html entities using javascript, and need to use the unicode code for the character you want instead.

Then I found that whilst the characters would display in all my browsers in Vista, and Ubuntu, they weren't displaying on IE6 and IE8, which were on Windows XP virtual machines. I found to get the characters to work on the Windows XP virtual machines I had to wrap them in a span, and make the font-family for the span 'Lucida Sans Unicode' (or any other font that supports the characters I wanted to use).

Deena gets it right

Me and snowmen

Me & Baabara have a push the snowball competition

Ben is rubbish
After lunch I played on Animal for a bit, then me, Ben and Mac went out on a walk.

Mac throwing a snowball at me
We went up the alleyway after the bridge, across the fields to East Farnham, and then back home the same way.

Mac throws a snowball on Ben's head

Mac gets a snowball on his head

Mac kicking a snowball

Ben trying to duck a snowball from Mac

Ben in a snowy field

Ben head

Ben thumbs up

Mac karate chops a snowball on Ben's head

Ben karate chops a snowball on Mac's head

Kicking a snowball

I get a snowball
The snow on the fields near East Farnham was still a few inches deep. We saw what looked like probably hare tracks. On the way back we saw a small bird sitting in the wheat stalks that was quite near us, and didn't seem very bothered by us being there. Unfortunately my camera battery had run out so I couldn't take a photo of it, and even if the battery hadn't run out it probably wouldn't have been a very good photo since I only had my fisheye lens.

When we got home I did a bit more work on my website and sorted/processed the photos I'd taken. I was trying to find out how to get rid of the outline that appears round my checkbox image when you click on it (specifically in IE6, though the outline does appear in other browsers it doesn't look as bad as it does in IE6.

First I read this article: Hiding the Browsers Focus Borders. Should I, Or Shouldn’t I? Then there was a link in the comments on that article to Removing the active/focus borders, which seems a much simpler way of removing the outline. All you do is set a{outline: 0;} to remove the outline from all links.

However, this also removes the outline when you are tabbing with the keyboard, so if you tab to an element with outline: 0; set on it, you won't be able to see what element it is you've selected. This is obviously quite a major issue. I did read that if you set outline: 0; just for a:active pseudo class, then it would remove the outline from clicking on it, but keep it when you tabbed to it. However, this doesn't seem to be correct. I've not been able to find any way where you can remove the outline if the element is clicked, but not if it's tabbed to.

After dinner I played Excite Truck with Mac and Lil' LA. Then after that I processed some of the photos from today.

Food
Breakfast: Bowl of Frosties; cup o' tea.
Lunch: Mature cheddar cheese with salad sandwich made with fresh bread-maker-made bread; honey on slice of fresh bread-maker-made bread; banana; chocolate digestive biscuit bar; ⅔ cup o' mouldy tea (there was an old mouldy tea bag in the tea pot).
Dinner: 2x Delee sausages; mashed potato; baked beans. Pudding was Apple crumble with custard and squirty cream. Coffee; Piece of Sainsbury's caramel chocolate.

Friday 6 February 2009

Animal, checking email and websiting

I woke up this morning about 8.10am (well actually I woke up quite a few times before that but kept going back to sleep because I was too sleepy to get up). I was disappointed to see that it hadn't snowed overnight and wasn't snowing. Bu by the time I had finished my shower it was snowing, and by about 9.30am it was snowing quite heavily.

My correct title

The truth
I went on Animal for a while. Turnips have been low prices all week, so I hope they are a decent price this afternoon, otherwise I'll loose a load of money again. I had trouble with making a snowman - I was rolling one snowball along to move it to where the other snowball, but then the snowball mysteriously exploded. It wasn't mysterious actual-a-chee, there was a hole I'd dug, but it was behind a tree so I couldn't see it, and I rolled the snowball into the hole, thus causing its destruction. In future I think I'll try and cover up any holes I make to avoid this happening again. I had to run all over the whole map again trying to find the respawned snowball.

Me and 2 perfect snowmen
Eventually I did find it and made a new snowman next to the one I made yesterday. The one I made yesterday had melted loads, it was pretty small compared to my new one.

Apatosaurus complete
I also managed to find 3 fossils and 3 gyroids. 2 of the fossils were duplicates, but one completed the Apatosaurus. All 3 of the gyroids were new ones I hadn't had before. So that was a good haul.

I checked my email. By about 12.00pm it was still snowing, but very lightly. By 12.30pm it had stopped snowing and we had lunch.

Letter from Nintendo
After lunch I played on Animal again. As soon as I came out of my house, Pete was waiting outside my house and said he had a letter from Nintendo for me.

Letter from Captain Olimar
I opened the letter and it was actually from Captain Olimar.

Red Pikmin hat
I went to Nooks, and he was only paying about 45 bells for turnips, so my 10,000 bells investment is now worth 2,700 bells. I don't think I'll bother trading turnips any more, though I'll still buy the red turnip seeds when I can. Still, at least I got a Red Pikmin hat today.

After that I had a look outside and the snow has melted quite a bit, the road is looking quite slushy with puddles of water.

I did some more work on my website, trying to get the this keyword to work when attaching an Event in IE. Unfortunately it seems it's not easy, a good function to do it is here: The Ultimate addEvent(..) function, but if I'm going to use a giant pre-written javascript function like that, I might as well just use a javascript library (actually I do want to learn to use jquery but I really want to get my site finished before I take the time to learn jquery). So for now I think I'll just use element.onclick = function.

Then I googled to see if IE8 would still be broken in the same way, and apparently it will: Internet Explorer 8 - fix event handling, or don’t release it. I think it would be interesting to run IE8 and Firefox 1 or an old version of webkit or Opera through the Acid tests, and see which one wins. I'm sure IE8 must be about 3 years out of date already.

Then I carried on working on my website trying to make a custom checkbox. I spent ages trying to get it work in IE, I thought that when I fired the onclick event of an element from javascript it wasn't working. But actually it was working, it was just that I'd forgotten to change the settings in the relevant CSS classes for IE. (IE6 and 7 doesn't support the CSS pseudo classes :hover and :active properly so I had to duplicate these CSS classes in IE specific stylesheets to make it work properly in IE).

After dinner I did some more work on my website, and found that rounded corners on a fieldset weren't rendering properly in Chrome/Safari (webkit). It seems that this is a known bug, and a patch is available. I tried downloading the latest Webkit Nightly, but it was still displaying square corners on the fieldset. I guess you would have to compile webkit from source and apply the patch to get it to work.

I tried including 2 sets of corner images in a sprite, and got my rounded corner box working properly, but then decided against having 2 sets of images in one sprite. The problem with it is that when doing this I have to specify image offsets for each corner. If I want to change one of the sets of corners, or add another set of corners to the sprites, all the offsets are going to be wrong and I'd have to work them out again. With each set of images seperate I don't have this problem. I'll have more HTTP calls, but it's something I'm willing to live with for the moment.

I also found that I couldn't apply rounded corner images (using my javascript function) to text inputs. I think it's because text inputs are inline rather than block elements.

So the text inputs will stay blocky for Opera and IE. In IE6 the text inputs were quite long and breaking their container. IE6 doesn't support the input[type=text] CSS selector, so I searched to see if there was a way to do it in IE6. I didn't find anything, but did find a couple of pieces about why you shouldn't use CSS expressions in IE6: IE6 performance with CSS expressions and Stop using poor performance CSS expressions - Use JavaScript instead.

In that second article the author does seem to have a mistake with their javascript version of the CSS expression - they are only recalculating the element width when the window is resized. So they're not taking things like changes in text size into account, which could easily effect an element's size, especially if it is sized in ems.

Despite HFM saying there were likely to be snow/sleet showers later today, we haven't had any and it's been free of preciptation since lunchtime. The sky was overcast nearly all day, but near sunset there was a break in the cloud over where the sun was, and there was a really nice sunset lighting up the belly of the overcast sky a nice orange colour.

Food
Breakfast: Lemon marmalade toast sandwich; cup o' tea.
Lunch: Beef with mustard and salad sandwich; clementine; slice of Genoa cake; chocolate digestive bar; cup o' tea.
Dinner: ¾ battered fish portion; fish finger; potato; peas; salt; ground black pepper.

Thursday 5 February 2009

Loads of snow!!!!!!!

This morning I woke up about 6.15am, it was a bit more snowy outside.

Snowy cars parked in driveways
After I'd had my shower and wash it was even more snowy. I woke up Ben and Mac up about 7.00am, then we had breakfast, and then went out to play in the snow about 7.30am and it was even more snowy. There was probably 6 inches of snow!

Snowman
We rolled some big snowballs then I made them into a snowman while Ben, his mate Matthew, Mac and Clare tried to roll some snowballs down the road, and then went sledging somewhere.

Snow on branches
At about 8.30am I came in, then went on Animal Crossing. First of all Nook's was closed as it was only about 8.45am, and it only opens at 9.00am. So I ran around looking for fossils and snowballs. I found Sahara by the museum, so then I also looked for animals and asked them if they had any carpets. Unfortunately Groucho and Deena weren't in, and I didn't see them walking around anywhere either. Maybe they were in but were still in bed?

Eyelash Lady
Luckily bud gave me a carpet.

Space thing in Lolly's house
But Lolly was ill, and when I spoke to her she'd just moan about how ill she was. So I ran home and got my medicine in the hope that then she'd talk to me about carpets. However, after I gave her the medicine she still wouldn't talk to me about carpets, and just said she needed to rest and recover. This, despite doing a flip on the spot after taking the medicine!

I finished going on Animal about 9.20am, then went on my comp. It stopped snowing.

Snowy roofs
I looked outside and it looked like the snow was melting already. The weather forecast is for sleet or rain later, so I'm glad we got out and enjoyed it before it's all gone. Mac went to work as well, so it was good for him to enjoy the snow early since when he finishes work the snow might be gone (or just slush).

I checked my email, and that took until 11.45am!!! It started snowing again.

I checked the websqueeze, and did some more trying to fix a float problem in IE, then it was lunch time. After lunch I played on Animal Crossing again. I asked Rolf, Deena, and Groucho (the only animals I hadn't already asked apart from Lolly) if they had any old carpets, but none of them did.

Hide & Seek
I played hide and seek and then built a big snowman.

Perfect Snowman
I don't know why making snowmen isn't so easy in real life? In real life Mac came home from work about 1pm as well.

Then I checked the websqueeze a bit more and watched this video: Nicole Sullivan: "Design Fast Websites". In the video it suggests using PNG8 rather than PNG24/32, and that using the IE Alpha Image loader can be very bad for performance. So I had a look at PNG8, and read this article: PNG8 - The Clear Winner, which is about how you can have multiple transparent values with variable opacity in PNG8, which displays properly in modern browsers and IE7, and will display using 1-bit alpha, a la GIF.

I also noticed one of the comments said that PNGGauntlet gave them better compression than PNGCrush.

I did a bit more work on my website. First trying to get image rollover in CSS working in IE6. After much trial and error and googling I found that I needed to use an anchor <a> element AND give it a href for the CSS :hover pseudo class to work. I also needed to have an empty text node inside the anchor element for IE6 to display the background image with the correct image position.

After that I tried to find the CSS pseudo-class that's activated on the mousedown event. Unfortunately it seems the CSS pseudo class is :active, and this doesn't work in IE, it seems to use active as the default (or maybe it thinks the link is always active?), so no good. So I looked into doing a mousedown event with javascript, but unfortunately when you attach an event in IE, the this keyword doesn't refer to the element the event is attached to. So I looked into how to fix this. There's an article about it here: Fixing IE's .attachEvent(..) failures, but I haven't had time to digest it properly yet.

After dinner I watched Lost with Mac and Ben. The first part was quite boring, then the second part was great. It was totally gokos to see that Jin was still alive (I'd always hoped he wasn't really dead since you don't see him die and it wasn't obvious that he was dead since he was on the part of the boat that didn't explode). Having Rousseau's team on it and also some random people who don't know who they are was great as well.

Then me, Ben and Mac went in the backgarden to make another snowman. We made a snow Totoro, but that Macanae Moc went in before we'd finished, and he took ages before he came out as well!

Snow Totoro
We used big stones for eyes and a nose, small pebbles to outline his teeth, bamboo canes for his whiskers, and drinking straws for his claws.

I came in and copied the pics of the snow Totoro to my comp and processed them, then uploaded one to Flickr. After that I tried to copy the pic to Clare's laptop as she wanted to send pics to Uncle Gez. But although her laptop recognised the (micro) SD card, there was no way to access it. When I first put it in it came up with a box asking if I wanted to tag all the images on the card or copy them across, so I pressed 'cancel', thinking I could just copy the 2 pics I wanted through windows explorer. But on My Computer it wasn't listed. I checked My Network places, it wasn't there. I checked device manager, and it had an SD card adapter or sumat similar listed, but you could just change the settings/driver, not actually access the SD card. I tried taking the card out and re-inserting it, but it still didn't appear anywhere so you could access it.

So I just put the SD card in a usb SD card reader rather than using the laptop's built in SD card reader, and it worked fine. Seems a bit weird for acer to go to the trouble of putting an SD card slot in their laptops if it doesn't even work properly.

I was quite sleepy (well, I always am), so I went to bed about 10.30pm.

Food
Breakfast: Lemon marmalade toast sandwich; cup o' tea.
Lunch: Mature cheddar cheese sandwich; white grapes; slice of jam swiss roll; cup o' tea.
Dinner: Shepherds pie; grated cheese; carrots; green beans; tomato ketchup. Pudding was Cherry Piiiiiiiiie with cream. Coffee.