Sunday 30 November 2008

Pet Spanish caterpillar goes stir crazy (or does it?)

Finished watching the last episode of Lost season 1 with Maccy and Ben this mroning, then went to church. After church I started writing my plans for a music video to accompany 50 cent's 'In Da Club'.

After dinner I finished writing my plans for a music video to accompany 50 cent's 'In Da Club'. Then I went on the internet, checked my email, hotukdeals, Luminous landscape, deviantart, No Cropping Zone, and the dpreview canon lens forum. I also spent a while watching my pet caterpillar, and got him various leaves from the garden since I don't know what he likes apart from iceberg lettuce, which we don't have any more of. He did start digging around in the mud a bit, so I thought he might be going into hibernation, but then he stopped and now he just keeps trying to get out of the tank.

I checked the websqueeze and looked at the caterpillar running about and trying to escape a bit more. He tunnelled through the mud, but then came out again. So I put a pair of jeans over the end of the tank with the mud, so it would be dark if the caterpillar dug down into the mud at the side of the tank.

After tea I looked through some gallerys of good website designs to try and find ones that were similar to my site to give me an idea on how to design my site. Then I started doing a mockup of a design for my site in photoshop. I did a bit of that, then started watching National Treasure 2 with Maccy & Ben. Ben had to go to bed before we finished watching it, then me & Mac watched IACGMOOH.

The weather today was overcast with a slight bit of mist all day.

Food
Breakfast: Blood orange marmalade toast sandwich; cup o' tea.
After church snack: Choc chip cookie; malted milk; coffee.
Dinner: Curry; rice. Pudding was banana and butterscotch whip with sliced banana. Coffee; Sainsbury's caramel chocolate.
Tea: Cheddar cheese sandwich; ½ scotch egg; mandarin; bit of gingerbread house; cup o' tea.
Supper: Bit of gingerbread house; cup o' tea.

Saturday 29 November 2008

Being rubbish at doing my website

This morning I checked my email and hotukdeals, then did some work on my website, just finishing up the query to store the information submitted from the edit form in the database.

After lunch I did more work on my website, making it so that if you didn't fill the form in correctly, then it will highlight what you did wrong and also refill the form with the information you typed in (just in php, still have all the javascript form validation to write). A problem I had with this is that the select box of countries normally chooses the country that should initially be selected when the edit form button is clicked by using javascript. But if someone doesn't fill the form in, then the form is automatically displayed and they don't have to click the edit button. This means the javascript isn't fired and so the country select box is left at 'Please select' rather than whatever country you'd chosen when you submitted the form. To fix this I just changed the javascript so it will select the country when the page loads, rather than when you click the edit button.

Then I thought that having javascript select the country wouldn't be useful if you don't have javascript enabled. So I ran some tests to see how quick a hardcoded version of the countries select, with javascript selecting the correct country compared to building the country select with php and php selecting the correct country. It was a lot quicker with javascript, so I'll keep it with javascript for the moment. I don't think many people are likely to be browsing my site using a screen reader, although I do like to keep usability and accessability in mind.

Before and straight after dinner I tried to get my surround sound speakers working properly as the sounds were coming out the wrong speakers. It took quite a while as I had problems with the computer crashing, then not starting up when I reset it, the sound not working at all, and the sound not working when I plugged/unplugged any of the plugs from the soundcard.

After getting that working properly I checked hotukdeals, and then watched Lost with Maccy and Ben. I went on the canon lens forum on dpreview for a bit, watched IACGMOOH with Mac, then finished reading the new threads I was interested in on the canon lens forum on dpreview.

The weather today was foggy all day, didn't see any hint of the sun at all.

Food
Breakfast: Blood orange marmalade toast sandwich; cup o' tea.
Lunch: Peppered ham sandwich; apple; pieces of gingerbread house; cup o' tea.
Dinner: Slice of Pepperoni pizza; chips; mixed veg. Pudding was: banana whip; butterscotch whip; sliced banana; pineapple chunks. Coffee; Sainsbury's chocolate caramel.

Friday 28 November 2008

Testing query Vs. prepared statement for login script

I got up this morning about 8.10am, then after breakfast went into the garden to see if it was frosty as they had said it would be on the HFM weather last night. It certainly didn't look frosty from my bedroom window. Looking (and feeling) the grass close up I could see there weren't any ice crystals as you'd expect with frost, but the grass was covered with water droplets that were frozen. So I guess either the dew fell and then the temperature dropped below zero, or there wasn't any dew and the frozen water drops were from the rain last night.

After that I came back inside and watched some photography at the summit videos. Then I checked my emails, hotukdeals and thewebsqueeze. I also did some googling to see if I could find Ben's christmas present that I want to get him at a reasonable price anywhere. In the end I couldn't, the cheapest place was play-asia.com, which was £20 including P&P so I ordered from there.

After lunch I did some testing comparing a normal query Vs. a prepared statement for the login script for my site. The normal query was about twice as fast, so after testing that I went through my site and changed the couple of places where I'd used prepared statements to use a query instead.

I added the php.net manual search to Firefox, which meant I had to sign up to FF add-ons to be able to add it. I didn't need to do that in the past to install ad blocker or google translate add-ons. Anyway, I signed up and added the search, as I quite often search the php manual as I can't remember the exact spelling and format of most of the functions I use.

I checked my email and hotukdeals again. I also checked deviantart, moosenewsblog and the canon lens forum on dpreview.

Ben came home from school and I watched an episode of MacGyver with him. After that I decided to try and record a tape to my PC, but on the list of recording devices I only had SPDIF and 'What U hear' listed. I looked around on my PC for a bit to try and find where the settings would be to enable Line-ins 1, 2 & 3, but couldn't see it anywhere, so I went on the creative website and downloaded the latest drivers.

Luckily the latest drivers did work and let me choose from the range of recording inputs. I started recording tracks from the tape, then after I had done a couple it was dinner time.

After dinner I finished recording from the tape while reading the dpreview forums. Interestingly Nikon have (kind of) announced the D3X, 24MP ISO 50-6400. They haven't officially announced it, but in their Nikon Pro magazine that they've sent out to some people, it has an article about the camera in it. Rumors are that it will cost $5,000, so pretty cheap compared to the Canon 1ds MkIII. It will be interesting to see how well it does at higher ISOs (and lower ISOs) compared to the Canon 5D MkII. If I was rich enough I think a Nikon D3 for low light/action shots and a D3X for studio/landscape work would make a good combo.

I finished reording the tape, I only actually recorded about 5 tracks off it as most of the songs I either already had or could just download. I practised doing up my Soviet coat, and weirdly the buttons seemed to do up without too much trouble (though still quite hard). I tidied my bedroom a bit and then watched IACGMOOH in Maccy's room.

The weather started off today as cloudy and overcast. Then fog rolled in, at lunchtime the sun started shining through the fog a bit, but after about 30mins-hour it disappeared again. The rest of the day was foggy and overcast with no sign of the sun. Rad had asked me if I wanted to go out on a walk with him in the morning, but seeing as the sky was a flat grey colour with no sun I couldn't be bothered. When he got back home (about lunchtime) he said it had actually been nice and sunny where he had been walking. Oh well.

Food
Breakfast: Blood orange marmalade sandwich; cup o' tea.
Lunch: Peppered ham sandwich; most of a packet of chilli flavour Doritos; clementine; gingerbread house; cup o' tea.
Dinner: Breaded fish; tartare sauce; peas; potatoes. For pudding I just had a little bit of gingerbread house. Coffee.
Supper: Small Cherry Bakewell; cup o' tea.

Thursday 27 November 2008

Testing different ways of inserting NULL

This morning I checked hotukdeals and then watched For a few dollars more with Mac.

After lunch finished watching For a few dollars more with Mac, then copied some chrimbo music to his SD card for him. Then Mac went to Mansfield. After that I wrote a test script to see about inserting NULL values into a mysql database using php. That took most of the afternoon. I posted a few days ago saying that you can't have a field that's NOT NULL and has default values. Not sure what gave me that idea, probably I was doing something wrong so I thought it didn't work and then read something on the internet that I didn't understand that I thought meant you can't have a field that's NOT NULL and has default values.

Doing quick tests with the test scripts I wrote it seems that prepared statements are very slow compared to normal querys (when only performing a query once or twice, which is what I normally do). I'll probably have to do some more testing on this, as there's not much point using prepared statements if a simple query would be quicker.

In the evening I checked my email, hotukdeals, deviantart and dpreview canon lens forum. I also tried to take some photos of a moth I'd caught in an empty (and clean) coffee jar, but the photos came out rubbish, which I think must be due to shooting through the round glass of the jar. I took the lid off the jar and it flew away.

Then I got my pet Spanish caterpillar out of his house. He's pretty big now, I took a few photos of him. Luckily he didn't move round much so it was easy to focus on him, the focusing lights on the MT-24EX were essential for me to focus. I find the focusing lights being on don't actually effect the E-TTL flash exposure at all (well the exposure comes out okay anyway).

The weather was overcast and cloudy all day and it rained quite heavily in the evening.

Food
Breakfast: Blood orange marmalade toast sandwich; cup o' tea.
Lunch: Peppered ham sandwich; banana; pieces of gingerbread house; breakaway; cup o' tea.
Dinner: Chicken, white wine & mushroom pie; carrots; peas; cauliflower; potatoes. Pudding was a slice of home-made treacle (golden syrup) tart with custard. Coffee.

Wednesday 26 November 2008

Reading forums, decorating gingerbread house, and watching TV

This morning I checked hotukdeals, my email and deviantart, then watched A fistfull of dollars with Mac.

After lunch I checked the istockphoto forums. There was a good thread about taking self portraits and someone linked to an article about taking self portraits, although I didn't bother reading the article as I'm not interested in taking self portraits at the moment. Someone had also posted a link to a kodak booklet about Wintertime Picture Taking, again I didn't read it, but looks quite good and may be useful for future reference.

Then I checked the dpreview canon lens forum and thewebsqueeze forum. I also tried out eclipse with the PHP IDE. I only had a quick look at it, but I couldn't really see any benefit of using it over Dreamweaver or SciTE.

I also had a read of the D300 and Nikon lens forums on dpreview, and found a thread about Nikon equivalents of the MP-E 65mm lens. Alex (SiFu) suggests using a reversed lens with a Nikon BR-6 ring, Nikon AR-10 double cable release and Nikon MC-25. I checked the prices on these parts and they seem to be about £50 each, so quite expensive. I think this would only work with non G Nikon lenses as well (i.e. lenses with an aperture ring). It seems that the BR-6 would let you use a macro flash on reversed lenses though, at least according to David H. Hartman on this thread over at photo.net: Best way to obtain high magnifications. The thread also contains some pictures of the BR-6 and similar adapters.

Of course, an alternative to the BR-6 would be the method I saw someone posted on deviantart, which involved a Kenko Extension tube broken in half, with computer cable connecting the contacts on the camera side to the contacts on the lens. This has the advantage of being cheaper than a BR-6 (assuming you already have the extension tubes, otherwise it's more expensive but you do get the extension tubes you don't break as well) and it would also work with G lenses. I expect the Nikon 16-85mm f3.5-5.6G ED VR AF-S DX NIKKOR would make a nice lens for reversing like this.

Going back to the dpreview thread, another poster suggested the 120mm f5.6 APO macro Nikkor. Looking at Bjørn Rørslett's review of this lens, it sounds very good. While I would like to experiment with macro on my Nikon camera, I can't really afford it at the moment (as well as being busy doing other things anyway).

I also found out there was a manual version of the Nikon 200-400mm/4 lens made, which I didn't know about. Possibly may be able to get it cheap, although from Bjørn's review it sounds like it would be quite expensive.

When Ben came home from school, me, Mac and Ben watched an episode of Lost.

After dinner me, Mac and Ben finished off the gingerbread house, it's totally covered in sweets now. Then Me and Mac watched IACGMOOH.

The weather was overcast and cloudy all day.

Food
Breakfast: Blood orange marmalade toast sandwich; cup o' tea.
Lunch: 2x cheese on toasts; clementine; slice of chocolate swiss roll; breakaway; cup o' tea.
Dinner: Southern fried chicken; chips; baked beans. Pudding was ice cream with toffee and chocolate sauce. Coffee.
Supper: Cup o' tea; malted milk; choc chip cookie.

Tuesday 25 November 2008

Reading about SEO and NULL

This morning I read more about SEO and checked my email, hotukdeals. I also read on Wikipedia about Sheba and Ophir - 2 ancient countries mentioned in the bible. Then from there I ended up reading an article about how Jewish priests have a common ancestor (probably Aaron) although I can't remember what that article was called, sumat weird I Tom Hink.

One of the SEO articles said about RDFa, and how it can be used to make your search listing look good (at least in Yahoo). I didn't read about it really, so I'll have to come back to that at a later date.

I finished watching Night of the living dead with Mac, was quite good. I gave it 7/10 on IMDB.

Jon and Clare went out for a walk about 11.30am and Clare said I had to put the washing out and vacuum the downstairs hallway, so I did that. Then I checked my email and hotukdeals again.

After lunch I did a bit more work on my website. I found that when I was adding a record to the database, if a record didn't have a date (i.e. it inserted a blank string as the date) then the date would be entered as 0000-00-00 (and subsequently retrieved like that when you pull the date out). So I did some googling and read a lot about NULL.

I wasn't sure about when to use NULL and when not to use it (in practical terms) so I posted to the websqueeze to see what people's opinions were. Then I started making a lemon meringue as Clare was too busy doing the dinner to make it for pudding. I got the base and lemon stuff done and then left it to cool, but then it was dinner time before I could make the meringue.

After dinner I did the washing up as usual while Clare finished off making the lemon meringue and Ben & Mac stuck the jinga bredren haus 2gether. After I finished doing the washing up I helped Ben & Mac with the house, but it was pretty trashed as the gingerbread sides had gone all rounded when they cooked in the oven and I think they might have used a roof slab for one wall and a wall slab for the other wall. If we make another gingerbread house in the future I think it would be best to just cook a trayfull, then cut it into slabs as soon as it comes out of the oven, rather than cutting seperate slabs before cooking it.

Mac made a skill face on the side of the house and I stuck a bunny head on the side of the house with some blood running down from it. Ben put some christmas lights on a rubbish tree and made Santa.

After doing that for a bit we stopped to let the icing dry while we watched Lost. Then I went on my comp and checked deviantart and the canon lens forum on dpreview. On dpreview someone had linked to this skill video:


The weather today was a pretty clear blue sky all day, but in the evening there was a really nice sunset with the whole sky beng lit up orange.

Food
Breakfast: Blackcurrant jam sandwich; cup o' tea.
Lunch: Mature cheddar cheese sandwich; ½ baby beetroot sandwich; ½ banana; slice of chocolate swiss roll; Fox's triple; cup o' tea; Roses.
Dinner: Pasta; chicken tonight style sauce stuff; green beans; sweetcorn; black pepper. Pudding was Lemon meringue crunch. Coffee.

Monday 24 November 2008

Watching films with Mac & reading mod_rewite/SEO stuff

Woke up this morning when it was still dark and my alarm went off, but was sleepy so went back to sleep. I got up about 7.10am, it was lighter but still quite dark. After my shower it had lightened up enough to see the sky was covered in cloud.

After breakfast I carried on reading about mod_rewrite and managed to write myself a simple rule that worked. So I uploaded it to the server and it didn't work. I checked phpinfo() on the server and it didn't say that mod_rewrite was loaded. So I sent a support ticket to the Hosting company.

While I was waiting for them to reply (they're always pretty quick though) I checked my email and hotukdeals. Evohosting replied to say that the ownership of the .htaccess file was incorrect and that they had fixed this. They also said that you cannot see mod_rewrite in the php info page since it is a apache module and not a php module.

So I checked phpinfo() again, and as they said couldn't see mod_rewrite. But I uploaded my simple rewrite rule, and it worked. It seems that phpinfo() on the server doesn't include the 'apache2handler' (which says which apache modules are loaded) and 'HTTP Headers Information' information blocks.

I checked the rewrite rule on all my domains and it worked on all of them, although I did find that a rewrite rule in the base public_html folder (which contains the files for brighton360.com and then subfolders for all the other 'addon' domains) would affect all the other domains. I guess there must be a way to restrict the rewrite rules so they don't affect subfolders or don't affect certain folders. It doesn't matter that much though since I don't really intend using the brighton360.com domain, so it shouldn't need any rewrite rules in there anyway.

After that I vacuumed my room, then checked my email and hotukdeals again.

After lunch I tried to do up my Soviet coat, but it caned my thumb too much trying to push the buttons through the holes. Then I watched Jade Warrior with Maccy. After that I checked my email, Andy Rouse's blog, deviantart and the canon lens forum on dpreview. After that I did a bit more reading about mod_rewrite and SEO friendly URLs. A good mod_rewrite guide I read was easymodrewrite.com. I also read an article saying why you should seperate keywords by hyphens rather than underscores. An SEO blog I came across had quite a good article on the Top 10 Fatal URL Design Mistakes and lots of other articles that looked quite good, although I only read a couple more of them.

In the evening I read a bit more SEO stuff, then started watching Night of the Living Dead with Maccy. About half an hour through Ben finished his homework so we watched an episode of Lost. By the time that had finished it was about 9pm so me and Mac watched IACGMOOH.

Food
Breakfast: Blood orange marmalade toast sandwich; cup o' tea.
Lunch: Mature cheddar cheese sandwich; packet of Chilli flavour Doritos; Clementine; Slice of jam swiss roll; mint kitkat; cup o' tea.
Afternoon snack: Malted milk; choc chip cookie; cup o' tea.
Dinner: Shepherd's pie; carrots; cauliflower; Tom Ketch. Pudding was apple pie with custard and cream. Coffee.
Supper: Hot chocolate; malted milk; choc chip cookie.

Sunday 23 November 2008

Making gingerbread and watching Lost

When I woke up this morning there was an ever so slight bit of snow outside, mainly on the rooftops. So not the large amount of snow they reckoned we were likely to get on the local weather.

Before church it started raining and changed between rain, snow and sleet. I put on my Soviet coat (although I could only do up 2 buttons on it, and it took me about 15 minutes just to do up those 2) and Ushanka hat, but when we actually went to church it wasn't raining at all. On the way back from church it was actually sunny.

After church I geocoded the images from the North Kilworth walk I did with Rad on 12th November. Whilst I was waiting for them to process I checked hotukdeals, deviant art and the canon lens forum on dpreview.

After dinner I went on the canon lens forum on dpreview a bit more, then watched Lost with Maccy and Ben. Then we made some gingerbread to make a gingerbread house with. That took all afternoon. After tea we watched another episode of Lost, then I named all the pics from the North Kilworth walk. Looking back through the processed pics I had more that needed exposure blending than just processing from a single pic.

I got outbid on ebay for a Lowepro lens case 1N, it ended up at £6.50 + £3 P&P, which I'm sure must be around new price (assuming you buy it from somewhere with free postage). I checked panoguide and backed up pictures.

I got my webhost to enable mod_rewrite for me, so I need to write a quick test script to make sure it's working, so I read a bit about mod_rewrite. I still haven't written any rewrite rules yet though, I'll need to take a look at it tomorrow. I watched IACGMOOH with Mac, David Van Day made up a weird rubbish song in it, which was quite funny. And Timmy Mallet did a trial where he got covered in 50,000 insects, then when he came back to camp he gave out some insects that were still on him to the other celebrities as souvenirs.

On ebay I got outbid for another Lowepro lens case, this time a 1W, which went for £8 + £2.66 P&P. A hardly used Canon 500mm/4 IS lens with case, hardly used went for £3,150.00, which is a pretty good price, the cheapest new at the moment seems to be £4100, and that's a good price considering it's a UK seller, actually cheaper than HK sellers where you'd have to pay VAT as well.

I'm hoping that the price of super-teles will drop as we get further into recession, although with the pound tanking and the possibility of the UK becoming another Iceland the price may go up as any lenses sold in GBP will be much cheaper for those in other countries.

Food
Breakfast: Asda honey nut loops; cup o' tea.
After church snack: Dark chocolate digestive; coffee.
Dinner: Stir fry; rice; noodles; 2x chicken nuggets; soy sauce. Pudding was jam swiss roll with pineapple chunks & juice and custard. Coffee; Sainsbury's caramel chocolate.
Tea: Mature cheddar cheese sandwich; clementine; slice of cherry genoa cake; Fox's triple; cup o' tea.
Supper: Blackcurrant jam toast sandwich; cup o' tea.

Saturday 22 November 2008

Editing photos

I didn't get up early enough today to see the sunrise, but the end of it was nice. The sky was covered with clouds, but they didn't extend as far as the horizon so the sun lit them up from below. After a couple of hours the sun had risen high enough so it was above the clouds and for the rest of the day it was cloudy with the sun occasionally peeking through a gap in the clouds or shining through thinner clouds.

In the morning I checked my email and hotukdeals and got granny breakfast. Then I bought some Chrimbo presents for Rad, Clare asked me to buy him one from her as well as he wanted stuff off the pinternet, so I did. Ben and Matthew nicked Maccy's room so Maccy came in my room and read his Kurosawa book while we listened to Christmas music.

After lunch I got a trowelfull of mud from the garden and put it in Ben's ex-stick insect tank. I put a fresh piece of iceberg lettuce (which is all finished now) and the bit of old iceberg lettuce and the spanish iceberg lettuce caterpillar in the tank as well. The caterpillar is quite a bit bigger now than it was when we first found it, and its pooed all over my shelf where it was living under the old iceberg lettuce leaf.

Then I finished off editing the pics from the walk I did with Rad in North Kilworth on 12th Nov. The pics still need to be geotagged and named though. I sorted/edited a few other pics in my newpics folder as well.

After dinner I watched the rest of the episode of Lost that me, Ben and Maccy were watching yesterday and then we watched another episode. Then after that I sorted/edited a few more pics that in my newpics folder, then backed up some stuff and watched IACGMOOH with Mac.

Food
Breakfast: Asda Honey nut loops; cup o' tea.
Elevenses: Dark chocolate digestive; coffee.
Lunch: Mature cheddar cheese with iceberg lettuce sandwich; packet of Chilli flavour Doritos; ½ baby beetroot sandwich; slice of Jumbo chocolate swiss roll; Fox's triple; cup o' tea.
Dinner: Beef burger in a bun with mature cheddar cheese, tomato ketchup and mustard; Tomato cup-a-soup style soup. Pudding was a Cherry Muller corner. Coffee; Roses; Piece of Sainsburys caramel chocolate.
Supper: Dark chocolate digestive;cup o' tea.

Friday 21 November 2008

Agent Cody Banks at Halifax

Got up about 8am this morning. After breakfast started checking my emails, then had to get Granny breakfast and do a bit of washing up. Finished checking my emails and also did some reading about developing websites that work on mobile browsers. Dreamweaver has a thing called 'device central' where you can test how your site works on a phone, but it doesn't seem to give you any error messages so it's hard to tell what the problem is when your site doesn't work properly.

There is a good article on sitepoint about Designing for the Mobile Web, and that has a link to a mobile browser emulator, although I'm not sure how useful that emulator would be since it seems to be based on a mobile browser that isn't used in any handsets. At the moment only offline browsers are of any use to me since I'm developing my site on my own PC.

I checked hotukdeals, and then deviantart and dpreview canon lens forum while I was waiting for the Adobe Design CS4 to install. Unfortunately it wouldn't install as I don't have Vista x64 SP1 installed. I don't really want to install SP1 as it will break peerguardian, so I think I'll stick with CS3 for the moment.

I did a bit more work on my website, and was wondering if you can use labels for non form elements like divs. I googled and found this useful article: Inaccessible Label-Wrapped Form Inputs, while not directly answering my question is helpful. It says that you shouldn't wrap inputs inside a label (I always thought that was weird), as whilst it is standards compliant, some screenreaders and Safari for Mac sometimes don't interpret it properly. Another good article about accessible forms is: Creating Accessible Forms.

After lunch I did more work on my website. I had a problem with an sql query, and it took me quite a while and a quite a bit of testing to find out what the problem was. The problem was that I had a field that was set to not null with a default value of '0'. So I thought this meant if you try to insert a null value, it will default to 0. But actually, you can't have default values on non null fields, so it didn't work. After finding this out I just changed the field so it doesn't have a default value, and changed my php code so the value to be inserted is checked and given a value of 0 or 1 before it is inserted.

Another problem I had was inserting a date into the mysql database, after some testing and googling I found you have to use STR_TO_DATE() (which is the same format as DATE_FORMAT()) to do it.

I was trying to do some checks to make sure that the date entered was valid and in the correct format, then I found there was a php function checkdate() that can do this, much easier and less code than checking the date manually.

After dinner I watched The Office (US) with Mac. Then I did a little bit more work on my website, then watched part of an episode of Lost until Ben had to go to bed partway through, then watched HIACGMOOH with Maccy. All the people on it were annoyed with Timmy Mallet because he thought it was funny (it was) when Robert Kilroy-Silk got covered in gunge. The show is sponsored by Iceland, and they have these short ads at the start and end of every ad break (About 1/3 or 1/4 of the show is ad breaks). For some cheesun they decided to set their ads up so that Kerry Katona and some old fat bloke who apparently won it last year are drunk at some rubbish party. The old fat bloke also has magic powers and can make plastic spoons with prawns on them appear! I think it's what you'd call de-advertising, although as Maccy said quite a lot of ads seem to be anti-ads, trying to persuade you not to buy a product.

Food
Breakfast: Strawberry jam toast sandwich; cup o' tea.
Lunch: Mature cheddar cheese with iceberg lettuce sandwich; clementine; slice of cherry genoa cake; Fox's triple; cup o' tea.
Dinner: Quiche Lorraine (thankfully not Kelly); potatoes; baked beans; peas. Pudding was a big choc chip chocolate cookie. A monetary payment for the sudden noisy expulsion of air from the lungs that clears the air passages.

Thursday 20 November 2008

Not much

This morning I got up quite early, about 6.20am had a shower etc. but then I had a headache so I went back to bed. There was a bit of a sunrise, there were clouds on the horizon so you couldn't actually see the sun rise, but it did light up some clouds that were higher up. It was very windy and was cloudy most of today.

I got up again at about 9am, though I didn't really get any sleep and still had a headache. I checked HotUKdeals, my email, and the dpreview canon lens forum. Then I did a bit of work on my website, checked thewebsqueeze, ebay, hotukdeals, deviantart and my email.

After lunch I checked Moose News Blog, and a couple of sites he linked to about using High Speed Sync Flash. It was funny how many flash units they needed to get a decent exposure in HSS - between 4 and 8 flashes. The resulting pictures by Joe McNally were pretty good though. I checked Luminous Landscape as well.

I did a bit more work on my website and checked web squeeze again. I decided to hardcode the select box of countries into the form (rather than generate it using php and mysql). When I did this though, I found that for countries with non standard letters in them, the non standard letter wouldn't appear (when previously it did). I found this great website that lists all the different HTML codes for different characters, so I just searched it for the chars I needed (was only about 3) and then replaced those chars in the code with the HTML code.

I looked at some really good photos by someone on dpreview.

After dinner I watched Lost with Maccy and Ben, then I wrote this blog entry, then watched I'm a celebrity GMOOH with Maccy, then went to bed.

Food
Breakfast: Grapefruit marmalade toast sandwich; cup o' tea.
Lunch: 2x cheese on toasts; mandarin; Cherry Genoa cake; mint kitkat; cup o' tea.
Dinner: Battered fish portion; chips; peas; tartare sauce; vinegar; ground black pepper. Pudding was bread & butter pudding with cream. Coffee.
Supper: ½ Strawberry jam toast sandwich; cup o' tea.

Wednesday 19 November 2008

Testing 450D with 100mm macro & javascript inserting form

This morning it was nice and sunny. I installed some windows updates and uninstalled some programs I don't use. That took quite a while. Then I did a quick autofocus test with my 100mm f/2.8 Macro and 450d, it seemed to work although I was shooting something quite near (so not further than 10m away which is where I had the focus problems with the 18-55mm IS lens before).

Then I googled to see if there was any info on fixing the problem of the camera thinking there is an external flash attached and so not popping up the internal flash. I found this useful thread that tells you how to fix it: Pop up flash won't pop up. There's just a little switch in the flash hot shoe that you have to get to pop up, so was quite easy to fix really.

After fixing the flash I went out on a short walk to test the Autofocus on the 450d/100mm f/2.8 Macro. I got back home, copied the pics to my comp and processed them (plus lots of other pics that were on the memory card). I checked HotUKDeals while I was waiting for them to process. After they finished processing I loaded up a couple of the pics and they looked pretty decent.

I opened them in Canon DPP (Digital Photo Professional) so I could see where the focus point was when I looked at them. I looked on the various menus and in the options but couldn't see an option anywhere to show the focus points, so I googled to find out. I found that DPP doesn't have an option to view the focus points, and you need Canon Zoom Browser EX to do this. So I googled for that, and found a download for it after a bit of searching, downloaded it and installed it.

By 12pm the sky had clouded over and was grey.

After lunch I loaded up Canon Zoom Browser EX, it did let you view the autofocus points, but wouldn't let you zoom in on the image unless you process it (save to TIFF), which takes ages and means you can't view the autofocus points anymore. I looked through the images, one was quite obviously front focused, while the rest generally looked okay. They probably did have a bit of front focus but you had to zoom in quite a bit and be look at the plane of focus on the ground to see it. So probably okay, especially since all the shots were at f/2.8 where DOF is pretty shallow. I will have to try some portraits of Ben with it and see how it does.

I checked devianart, Andy Rouse's blog and my email. I noticed that play.com are selling a swearing turtle, what a great idea.Then I checked hotukdeals again and the web squeeze.

After that I did the speed tests on my site for adding the pogInfo form to a page using javascript.



Form as javascript string in page
Variables as javascript in page and form created in external js file
Form in HTML comment tags in page
Run Javascript PHP
Javascript PHP
Javascript PHP
Load (Pogs series 1) 616 -0.857728
189 0.031177
61 0.027013
Refresh 256 0.030574
224 0.028019
219 0.025946
Refresh 269 0.028654
243 0.030197
270 0.024961
Change page (pogs series 1 France) 39 0.028038
40 0.025669
39 0.024771
Refresh 44 0.026172
30 0.023173
41 0.024883
Refresh 41 0.027052
29 0.025426
28 0.021829
Change page (Hawaiian milkcaps) 28 0.023727
33 0.025262
36 0.026263
Refresh 28 0.023162
29 0.025512
27 0.022368
Refresh 28 0.027198
30 0.027173
52 0.022493
Change page (Pogs series 1) 359 0.028812
184 0.028129
180 0.024817
Refresh 232 -0.974759
224 0.030610
283 0.023591
Refresh 268 0.029023
245 0.030709
141 0.028573
Average (calculated without timings in red): 144.73 0.027241
125 0.027588
119.64 0.024792
JS avg as secs, PHP avg as millisecs 0.14 27.241200
0.13 27.588000
0.12 24.792333



Although my tests weren't really comprehensive, I was surprised at the timing results for the javascript. The PHP timings don't vary much, as PHP has the same work to do in writing variables each time. When the form is written as a javascript string, PHP escapes the whole string, whilst when the form is written in an external .js file PHP escapes each variable seperately. I guess this test shows there's not a lot of difference between escaping one long string or lots of short strings. PHP is quite a bit faster when the form is written in HTML comment tags - this is probably because the variables don't need escaping when they're not passed to javascript.

All the methods take the longest time on the Pogs Series 1 page, probably because this has lots of images on it and the other 2 pages don't have any images on them (the javascript times from the first script block to after the last script has run after page onload).

I'm still not sure what method to use. I like the method of writing the variables to javascript in the page and then building the form in an external .js file best, just because it is tidy. There's not much difference in the time taken by javascript between them, and although it is quite a bit more work for php (11% longer than writing the form in HTML comment tags), php still does it very quickly (at least on my PC, might be different on the server).

After dinner I watched Lost with Maccy and Ben. Then I went on my comp again and re-ran the javascript speed tests, except timing only the function that inserts the HTML. All scripts ran about the same speed, which I surprised about since the script that builds the form (rather than just getting the ready built form from a variable or inside some HTML comment tags) I would have thought would run much slower since it has much more work to do.

I posted a new topic on the websqueeze to see what people's thoughts were there on writing clean looking code or fast executing code. I think the main thing slowing php down when the form is written as javascript variables/ a string is that it has to real escape the countries select box, which is quite large. Since the countries aren't going to be changed very often, it would make sense to hardcode this rather than create it using php/mysql, then it won't need to be escaped.

After that I read some other threads on thewebsqueeze, mainly design ones and looked at some nice design sites. The design of my site is pretty rubbish, so I'll probably do some work on that once the site is working properly.

Food
Breakfast: Grapefruit marmalade toast sandwich; cup o' tea.
Lunch: Mature cheddar cheese with iceberg lettuce sandwich; clementine; slice of Jamaica ginger cake; Tesco's fake caramel Rocky (not that nice, the caramel was all hard); cup o' tea.
Dinner: 2x sausages; potato; baked beans; brown sauce. Pudding was strawberry whip with tinned apricot halfs. Coffee; 2x malteasers; Roses.

Tuesday 18 November 2008

Javascript & PHP Testing

This morning I got up about 7.30am. It was grey and raining, although the rain cleared up by about 10am and by 1.30pm the sun even shone through the clouds a bit.

After breakfast I checked my email and opened a parcel which had arrived while I was still in the shower. It was my canon 100mm f/2.8 Macro lens, which I had bought from the Canon outlet shop on ebay. They must have shipped it yesterday with next day delivery, so very quick, I only bought it on Sunday, so was delivered in 1 working day.

The packaging box the lens was delivered in was quite large, much larger than the actual box containing the lens. The lens' box looked a bit mucky with a few black marks and dirty glue marks where stickers had been removed. But the marks on the box certainly don't detract £10 from its value (at least for me they don't). Because it was raining and there's not a lot of urgency, I haven't taken the lens out of its box yet to test it.

I was about to vacuum my floor when I saw a van pulled up outside, so I waited a few secs and then the doorbell rang, it was Clare's christmas present, which again was delivered in a box quite a bit larger than the item. The book's cover was different to the one pictured on the website, and I was suprised to see the RRP on the back of the book, which is a lot. The same book (albeit with the same cover that was on the website, different cover to the one I received) finished on ebay yesterday for more than I paid for it new.

I vacuumed my floor and then did some work with my website. Yesterday I changed it so that the pogsInfo form was written by php as a javascript variable, and then inserted into the page by javascript. Today I changed it so that the majority of the form is written in the external .js file, and javascript writes the form in the same way that php does. The only difference is that the variables used in creating the form are javascript variables rather than php variables.

PHP writes the variables used in making the form to the page as javascript variables, so it looks like this (php):
echo 'var myvariable = \'' . $conn->real_escape_string($myvariable) . '\';';
Then in the external .js file, the form would be put together like this (javascript):
var HTML = '<p>Blah Blah Blah said ' + myvariable + '.</p>\n';
HTML += '<br>';
document.writeln(HTML);
Whereas previously the HTML string was built up directly in the page like this(php):
$html = '<p>Blah Blah Blah said ' . $myvariable . '.</p>
<br>';
echo 'var HTML = \'' . $conn->real_escape_string($html) . '\';
Then the external .js file would just have
document.writeln(HTML);
So my new method of generating the form in an external .js file and just having the variables that vary per page written into the page means that the code written into the page is much less than the previous method of generating the form in the page. But much more code is written in the external .js file. Also line breaks (\n) need to be hard coded in the external .js file and all the php variables need to be escaped seperately, whereas when writing the form in the page line breaks don't need to be hardcoded and you only need to escape the string once, when you've finished writing it.

The purpose of changing my code so the form is created in an external .js file instead of directly in the page is that the .js file only needs to be loaded once, then it is the same for all pages and only the variables change. But when the form is created in the page then the whole form needs to be loaded each time. My logic there is probably wrong, but I wanted to do some speedtests anyway to see which way worked best.

The first thing I did was to google 'javascript speed test' so I could see how you find out how fast a javascript function runs. I found this page that talks about how fast javascript runs on different browsers. Rather obviously, the way you time how fast a function runs is by setting a variable holding the time when you start the function, then when the function has finished running take that time away from the time now.

So I edited my .js file (this is the first javascript loaded on the page) to record the time at the top of the file: var time = new Date();. Then after all the other javascript I added an onload function (most of the js doesn't run until after onload) that alerts the time taken addOnload(function(){alert(new Date() - time);});

I also edited the page to find out how long PHP took, so at the top of the page I had $time = microtime(); and at the bottom of the page echo microtime() - $time;.

When I was looking at wikis yesterday, I downloaded a javascript based wiki. Looking at the (javascript) code I noticed that they had some code structured as
object = {
property: value,
property2: value
};
I'd not seen this sort of code before (or maybe I had but just didn't understand it). It seems to be a nice way of assigning lots of properties (and methods if you want) to an object, and being as you assign them to an object avoids just using lots of vars instead.

So I wrote the javascript variables for creating the form in this format. When I got to the country data, this needed to be stored in an array since there may be multiple country records per page. First I did a quick test to see if you can add properties to an array item, and you can. Next I googled to see if you can make an Associative array in javascript, and you can. Then I googled to see if there was a javascript equivalent of the foreach loop in PHP. It turns out there is, I expect I did learn about it before but never used it and so forgot about it. Anyway, it's a for in loop:
for(myKey in myArray)
{
document.writeln(myArray[myKey])
}
So slightly different to a foreach loop, but the same functionality. I read this page that says you shouldn't use Associative Arrays in javascript, but use an object to hold the array. It was also a useful example in how to create an Associative array and how the for in loop works. So I changed the Array to an object. I now had a javascript object called pogInfoData, which had various properties holding all the variables needed to build the form. One of the properties was another object, which held all the data for the countries as an associative array.

Next, I wanted to unset the variable used in the for.. in loop, the same way I unset the variable after the foreach loop had run in PHP. So I googled, and found out you can use delete varname.

I finished off writing the rest of the form and variables, and then added it as an onload event. I did the same with the version of the page where the form is coded into the page. I did a couple of quick runs of each version, and it seems that php runs about the same speed for both versions, with javascript running much faster for the version where the form is coded into the page. The timings seemed to vary wildly whenever I would reload the page though. I will have to do some proper tests and put the timings in a table and then compare them.

Before I do that though, I will try another version where the form is coded into the correct place in the page (rather than coded as a javascript variable in the page head), but is placed within HTML comment tags so it does not appear. Then I can (hopefully) use javascript to remove the comment tags to make the form appear.

Some other random things I read was about Object Orientated CSS and that you can md5 hash in mysql (Probably better than hashing in php).

I stitched up some tears in the lining of my coat and probably did some other stuff and typed it here, but then Firefox crashed and blogger hadn't saved the stuff I'd typed so I can't remember what it was.

After dinner I watched 16 blocks with Maccy, then checked hotukdeals and dpreview canon lens forum. After that I did some more work on my site and made a version of the page that gets the form from inside some HTML comment tags. I will probably do the speed test comparison tomorrow.

Then I opened my Canon 100mm f/2.8 macro lens. I found that unfortunately the tripod collar ring from the MP-E 65mm f/2.8 macro lens doesn't fit it, and you need a tripod collar adaptor to fit it. After doing some googling and reading I found this useful page that says where you can buy it in the UK and also has a guide to fitting it.

I will probably test the lens tomorrow, although I just found a problem with the camera - it thinks an external flash is attached even when it's not. I think having the heavy MT-24EX flash attached to it for so long must have bent something out of place in the flash shoe, although it looks okay. I'll have to look into that tomorrow as well.

Food
Breakfast: Grapefruit marmalade toast sandwich; cup o' tea.
Lunch: Baby beetroot sandwich; clementine; slice of cherry madeira cake; cup o' tea.
Dinner: Bolognese; pasta twirls; mixed veg. Pudding was a Muller fruit corner. Coffee; Roses.

Monday 17 November 2008

[innerHTML Vs. DOM] [PHP MySQL extensions]

I woke up this morning about 7am and there was a really nice sunrise outside with the cloudy sky lit up all orange, but I was too sleepy to get up so I went back to sleep and got up about 7.45am.

After breakfast I checked my email, deviantart, hotukdeals and thewebsqueeze. Clare found a small catterpillar in the iceberg lettuce (which was from Spain), so I took some photos of it. It looked like it was dead, but after I took a few photos of it it woke up and started wandering around.

Then I tried to look at some wiki sites to see how they work with editing the data and displaying the data.

After lunch I checked hotukdeals and my email. Then I did some work on my website, making the pogInfo form so it would be generated as javascript rather than coded sraight into the page. Basically I just copied the form as I had previously written it in php/html and made it into a string in php. In php I then escaped the string, which escapes any line breaks/new lines and ' chars, which would break javascript otherwise. Keeping the line breaks in there also means that the code when generated by javascript is easy to read. Then I echoed the string as a javascript variable. I made a new container div (coded into the page) to hold the form, then changed the javascript function so that when the edit button is clicked, the container div has its innerHTML changed to the variable holding the form HTML. I did searched on google, and found that using innerHTML is much faster (as well as loads less code to write) than using DOM methods.

I also changed the sql query used to get the tags. Previously I was getting all the tags row by row and putting them in an array. Then I was using a loop to stick the tags together in a string seperated by a comma and a space. Now the query uses GROUP_CONCAT to stick the tags together instead.

I was waiting for a lowepro lens case to finish on ebay, unfortunately it finished before I thought it would. I think what happened was when I refreshed the page to see how long was left, the page didn't actually refresh. So I thought there was still an hour left on the auction. Then I refreshed the page again about half an hour later and it said the auction had finished. Very annoying. I did bid on another lens pouch that hadn't finished, but got outbid for that. I'm hoping at the moment that the person who won the 5 lowepro lens pouches auction won't actually pay, and then I might get a 2nd chance offer.

I don't think I said in yesterday's blog, but I bid on (and won) a canon 100mm/2.8 Macro lens from the canon refurbished shop on ebay. It ended up about £320, only about £10-20 less than a brand new one, but since you get a year's warranty and it should have been checked by canon and be in working order (which a new lens may not be) I think it's still worth it. I hope I get a box and instructions with it though. The main reason for buying it now is not that I'm going to be doing a lot of macro soon, but that I won't be. So I can test the AF on it with the 450D and see if the AF is working properly. Then if it isn't, I can send it and the camera back to canon to get fixed and won't miss the camera because I don't have anything to shoot with it at the moment anyway.

I went on the rowing machine for a few minutes and watched an episode of MacGyver with Ben. After that I googled for 'Mysql mysqli PDO' to see which extension was best. A few threads/blogs said that PDO was slow, but one of the results said that in their initial tests PDO was much slower, but when they re-ran the tests, mysql, mysqli and PDO all worked at similar speeds. Anyway, on the official mysql site it says you should use mysqli php extension, and that you shouldn't use the mysql extension anymore as it's outdated. It suggests only using PDO if want your site to work with database systems other than mysql.

After dinner I watched Lost with Maccy and Ben, then watched the Gadget Show, then checked HotUKdeals. The weather today was grey skies raining slightly all day (apart from at sunrise where I don't think it was raining and the clouds were orange instead of grey).

Food
Breakfast: Strawberry crisp cereal; orange juice.
Lunch: Mature cheddar cheese sandwich; packet of Chilli flavour Doritos; banana; slice of cherry madeira cake; breakaway; cup o' tea.
Dinner: Chicken & mushroom pie; baked beans; poatoes; roast parsnips; cauliflower. Pudding was Bread pudding (made in the miguelwave) with custard.

Sunday 16 November 2008

Editing photos

This morning it was foggy and slightly rainy. Went to church, only to find the service didn't start until 11am, so we (me & Mac) got there about 20 minutes early.

I spent most of the rest of the day going on the internet and editing photos from the walk near North Kilworth on 12th Nov.

After lunch I watched an episode of Lost with Maccy and Ben. Later in the afternoon we watched 'A Christmas story'. Then in the evening I watched 'I'm a celebrity get me out of here' with Mac.

Food
Breakfast: Grapefruit marmalade toast sandwich; orange juice.
Dinner: Chilli con carne; rice; tortilla chips; cheese. Pudding was a Muller fruit corner. Coffee; Roses.
Tea: Mature cheddar cheese sandwich; toasted crumpet with butter and honey; satsuma; breakaway; cup o' tea.

Saturday 15 November 2008

Editing photos

I woke up this morning at 7am and there was a nice sunrise outside with the clouds lit up orangey yellow. By about 7.15am though the sky was covered in thicker grey clouds. Then by about 8.30am these clouds had dispersed a bit and the weather looked quite nice. But by 9.20am the sky had clouded over again with a single monotone grey cloud.

After that I did a tiny bit of work on my website, but then found that I'm displaying a date just as a year, the in the database its a date. And it would be better to have the full date (well at least year and month) stored in the database. So I'm not sure what to do there at the moment.

Then I went on thewebsqueeze and tried to do a regex, which took me a few hours. Really I need to get a book on regex or sumat because it seems to be quite a large subject. I also posted a question on thewebsqueeze about how to find out where a node is in its parent's childnodes index.

After that I did some googling about date formatting in mysql, and found the following page, which is quite useful: http://davidwalsh.name/format-date-mysql-date_format. I would hope you can use the same terminology to reverse the formatting when inserting dates.

After lunch I did some processing of the pics I took the other day when I went out on a walk with Rad.

After dinner I edited a couple more photos and then watched Shooter with Maccy.

Food
Breakfast: Grapefruit marmalade toast sandwich; cup o' tea.
Lunch: Ham sandwich; Mature cheddar cheese sandwich; banana; slice of iced lemon madeira layer cake; chocolate digestive biscuit bar; cup o' tea.
Dinner: Chicken; chicken soup; gravy; mixed veg; potatoes; cheesy dumplings. Pudding was a small cherry bakewell. Coffee.

Friday 14 November 2008

More cross browser troubles

Got up this morning at about 7.45am, and it was actually sunny outside! Had a shower etc. then checked my email, hotukdeals, deviantart and Luminous landscape. Then I backed all my stuff up and read dpreview forums while the backups were comparing/backing up.

After that I tried to fix a problem with my lightbox script in IE7. If you made the window really small, then scrolled down near the bottom of the page, clicked the an image to lightbox it, then resized the window so it was longer (but still thin enough heightwise that the whole image wouldn't fit in the window), the image would stay in exactly the same position, while the content above it would move to fit the expanded space, thus leaving a giant gap between the page content and the lightboxed image at the bottom of the page.

My lightbox script removes the lightbox image (well sets display: none) when it calculates the pagesize, so that the above problem shouldn't occur. I did quite a bit of testing and found that if I did an alert() after the lightbox image was hidden, I could still see the lightbox image even though it was meant to be hidden. So this is why the pagesize calculation was wrong.

I did some more testing and tried using the DOM to actually remove the lightbox image and then add it again, but still the same problem - setting an alert after the image is removed you can see it is still there and has not been removed. Then I noticed in my code a bit for IE6 and I'd written a note saying what the problem was in IE6 that required this specific code, and it was the same problem as in IE7. So I tried setting that script to happen if the browser was IE6 or IE7, but still no luck.

I had lunch and then came back to the problem. Did some more testing and then noticed that in the pagesize calculation again I had some different code for IE6. So I set that to work for IE7 as well, and it fixed the problem. It seems that document.body.clientWidth and document.body.clientHeight will give you the width/height that the page should be with the hidden image actually hidden in IE6 and IE7.

After this I tried getting the formatting of the form that displays the information a bit nicer. I did some testing and found that setting each set of label-input tags in a span with display set to inline-block worked well, and in all browsers (didn't test IE8 though, I've kinda given up on it for now). I spent the rest of the afternoon changing the formatting of the form and testing it in different browsers.

At the moment I'm reasonably happy with how the information looks, although the Info is displayed in a textarea and in Opera the textarea renders with a greyed out scrollbar, which it seems there is nothing you can do to remove.

After dinner I watched Lost with Maccy and Ben, then listened to my top rated songs in winamp:
1. Paul Gordon - Hey Digimon (2:29)
2. Doc Watson - Lonesome Banjo (1:36)
3. MC Hammer - Too Legit To Quit (5:35)
4. Love Loves to Love (1967) (1:37)
5. Uncle Dave Macon - Go Along Mule (3:04)
6. Alma Cogan - Bell Bottom Blues (2:33)
7. Lulu - Love Loves to Love Love (2:03)
8. Elvis Presley - Spinout (2:34)
9. MC Pea Pod - Digi Rap (3:09)
10. Flatt and Scruggs - Foggy Mountain Breakdown (2:40)
11. The Avalon Boys - At The Ball,That's All.mp3 (2:18)
12. Rev. D.C. Rice & His Sanctified Congregation - In The Battlefield For My Lord (3:20)
13. Jimmy Castor Bunch - King Kong (3:30)
14. The Champs - Tequila (2:10)
15. Elias & His Zigzag Jive Flutes - Tom Hark (2:16)
16. MAKO - DANCER (1:19)
17. Vengaboys - Boom, boom, boom, boom!! (Eurobeat mix) (5:29)
18. Rock Steady Crew - (Hey You) The Rock Steady Crew (3:46)
19. Nothing Shakin' (From 1958) (3:10)
20. Punk&Ska Covers - Walking On Sunshine (1) (3:26)
21. Eddie Cochran - C'Mon Everybody (1:55)
22. Hideki Naganuma - Sweet Soul Brother (2:56)
23. Bruce Willis - Soul Shake (2:53)
24. The Hepcats - Les Paul (Instrumental) (Bonus) (1:59)
25. The Happy Time Nursery Ensemble - Hansel and Gretel (3:36)
26. Woody Guthrie - Lost John (4:08)
27. Henry Thomas - Fishing Blues (2:45)
28. Modjo - Chillin' (3:47)
29. David Guetta Vs The Egg - Walking Away Vs Love Dont Let (3:41)
30. Peggy Lee, Nat "King" Cole and Nancy Wilson - Toys for Tots (2:33)
31. Alf Poier - Weil Der Mensch Zaehlt (2:57)
32. 12 - It's Holiday (Nuage) (2:51)
33. Bomb The Bass - Don't Make Me Wait (3:48)
34. Bomb the Bass - Beat dis (3:24)
35. Bomb The Bass - Megablast (Hip Hop On Precinct 13) (2:09)
36. Bachman Turner Overdrive - Takin´care of business (4:47)
37. Uncle Dave Macon - Way Down The Old Plank Road (3:01)
38. Grandpa Jones - Old Rattler (2:51)
39. Alma Cogan - Dreamboat (1:45)
40. Ayumi Hamasaki - is this LOVE? -Original Mix- (4:55)
41. Bobby Darin - A Nightingale Sang in Berkeley Square (3:00)
42. Arlene Phillips & Pagoda - A2 Give Me Some Action (Stretch Out) (8:18)
43. Rammstein - Moskau (4:18)
44. MIKE_REID___UGLY_DUCKLING (3:33)
45. Ash - Shining Light (4:08)
46. Frank Sinatra - You'll Never Walk Alone (2:29)
47. Daft Punk - Oh Yeah (2:01)
48. McVaffe - Zelda 3 TheDarknessAndTheLight OC ReMix (5:54)
49. Guy Marks - Loving You Has Made Me Bananas (2:53)
50. Estelle Ft Kanye West - American Boy (TS7 Remix Radio Edit) (3:51)
51. HIDEKI NAGANUMA - SHAPE DA FUTURE (3:48)
52. John Frusciante & Josh Klinghoffer - Walls (6:19)
53. DJArcas - Bubble Bobble DjArcas Bubbl Techno OC ReMix (6:05)
54. Various Artists - Rap All Stars-Last Christmas (4:12)
55. The Kingston Trio - Rider (2:51)
56. Souljahz - Let Go (4:10)
57. KJ-52 feat. Knowdaverbs - Keep It Moving (4:18)
58. Wave8 (3:52)

I had the playlist on shuffle mainly, so I probably didn't listen to all those songs and listened to some more than once (Rev. D.C. Rice & His Sanctified Congregation - In The Battlefield For My Lord is probably my favourite song on there, Rev DC Rice sounds like a croaky old woman). While I was listening to them I did a bit of work on my website. I also went in Maccy's room for a bit and played/watched Ben play some flash games, both of which were quite good.

I received my Lowepro S&F deluxe waistbelt today, it only just tightens enough to fit when I'm wearing a t-shirt, but plenty of room to loosen it if I'm wearing a thick coat. Unfortunately due to not bidding enough on the lens cases auction on ebay I don't actually have any lens pouches to attach to it and test it with.

The sunset today was really nice, but unfortunately both Clare and Brian were out in the afternoon so I couldn't go out to the fields to get any photos as it would have meant leaving granny at home by herself and there would have been no-one in when Ben got back home from school.

Food
Breakfast: Coco pops; cup o' tea.
Lunch: Mature cheddar cheese sandwich; bag of Barbeque flavour crisps; apple; country slice; digestive chocolate biscuit bar; cup o' tea.
Dinner: Breaded fish portion; peas; broccoli; mixed veg; potatoes; malt vinegar; salt. Pudding was chocolate sponge with chocolate custard. Coffee; Roses.

Thursday 13 November 2008

IE8 annoying me possible even more than IE6

Got up this morning about 8.15am and it was cloudy outside. It stayed cloudy and rainy all day. After a shower etc. and breakfast I checked my email, hotukdeals, andy rouse's blog and deviantart.

After that I checked my site on IE8 and first thing I noticed was the layout was broken, the adverts box had quite a large margin on its right hand side, and was overlapping with the content text. This was quite easy to fix though, just by setting a left margin for the advert box. However, I thought IE8 was meant to be standards compliant and would work the same as Firefox, Opera and Safari.

Next I noticed that a checkbox on the login form wasn't aligned with the label text correctly in all the IEs, so I fixed that with a negative top margin. So now I have 5 stylesheets - standard, IE6, IE7, IE8, IE-all. The IE-all sheet is not strictly neceasary as I could put the rule in each of the seperate IE stylesheets, but it makes it easier for me to have an IE-all sheet.

Then I discovered a major problem with my site in IE8 - the lightbox function would just make the screen turn black (rather than darkening the screen and displaying an image). After quite a bit of testing to try and find out why the image wasn't appearing I decided to try and fix the solid black background in case the image was being hidden behind the lightbox background. I did some searching on google for opacity in IE8 and found that you need to either put
filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
or
ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
Both worked for me, so I have used the top one. I found that the image still wasn't apprearing. I did lots more testing and found that even if I applied sizing to the image, its offsetWidth was always 0.

I checked whether my code (including code generated via javascript) validated and it didn't. There were 2 problems - the lightbox image needed to be inside a container, rather than just appended to the body, and it needed an alt attribute. So I fixed this, the page validated, but still the same problem in IE8.

After much messing around, deleting and adding code, writing test pages etc. I finally found the problem was due to the lightbox background having 'position: fixed'. But without 'position: fixed' the background didn't appear at all. So I tried changing the javascript code so that the lightbox background was appended to the document hierarchy after the lightbox image container, and this fixed it - I now had both the image and background appearing in IE8. However, the image wasn't being centred in the screen correctly.

So next I did some messing about with the code trying to fix this problem, and it seems the problem is due to IE8 reporting a very small page height.

I tried the following, and all are very small, much less than the actual page height:
alert('window.innerHeight' + window.innerHeight + '\n'
+ 'document.body.clientHeight' + document.body.clientHeight + '\n'
+ 'document.documentElement.clientHeight' + document.documentElement.clientHeight + '\n'
+ 'window.scrollMaxY' + window.scrollMaxY + '\n'
+ 'document.body.scrollHeight' + document.body.scrollHeight + '\n'
+ 'document.documentElement.scrollHeight' + document.documentElement.scrollHeight + '\n'
+ 'document.body.offsetHeight' + document.body.offsetHeight + '\n'
+ 'document.documentElement.offsetHeight' + document.documentElement.offsetHeight);
The VHD of IE8 came with a developers tools program, which can show you the outline of various elements, so I highlighted the body and it is really small. I guess everything else on the page must be overflowing out of it.
I tried setting the body height to 100%, but it was still really small, it reached to nearly the bottom of the window when you were scrolled up to the top of the page. If I tried highlighting the HTML, this seemed to highlight the whole page. So I tried 'document.body.parentNode.offsetHeight', but this still gave a very small figure (possibly the window height). I did some googling but couldn't see anything about how to get the pageHeight in IE8. You can also see in the above image that IE8 messes up the login form if you scroll the page at all.

Trying to get these things working in IE8 took me from about 9.30am until about 5.30pm. I had a look on the MS webpages about IE8, but couldn't see anything about how near to release the beta2 (which I'm testing on) is meant to be, or when a release candidate or final version will be released.

Something weird I noticed when logging onto Blogger was that it said 'connecting to noetic.org'. No idea why it wanted to connect there, I couldn't see any links to them or anything on the landing page.

After dinner I checked my email and hotukdeals again and then watched an episode of Lost. Then I read various threads and the Pentax 50/1.4 review on dpreview.

Food
Breakfast: Coco pops; orange juice.
Lunch: 2x cheese on toasts; white grapes; satsuma; slice of iced lemon madeira layer cake; chocolate digestive biscuit bar; cup o' tea; Roses.
Dinner: Slice of pepperoni pizza; green beans; chips; salt. Pudding was a small cherry bakewell tart with custard. Coffee; Roses.

Wednesday 12 November 2008

Being annoyed

I got up this morning at 6.50am. The sunrise was at 7.21am, but I didn't see it because I wasn't out in the field where it's visible from. I'm pretty sure there was a visible sunrise though because after my shower I looked out my bedroom window and saw a slight hint of red on the underbelly of a cloud. I looked out my window again later (at 8.30am I think, although maybe earlier), and the sky was now covered in cloud. But now (10.15am) the sky is mostly blue with a few clouds and the sun is shining.

This morning I tried to find how to solve the 'IE6 png alpha transparency filter makes form elements disappear' problem. Last time I found that changing the id of the element using js would fix it. But this means the the element looses its CSS styling as I had set the CSS via the element id. So I added the new ids that I was setting to the CSS styling for the username and password inputs, which were the ones being affected by the problem. But now the fix no longer worked. So I removed the new ids from the CSS and created a CSS class with the same settings. But this still meant the fix no longer worked.

So I set the style of the elements with changed ids directly through javascript, starting with setting the width. This worked, so I copied all the other style settings and set them using javascript. Now the fix didn't work again. So I removed the javascript line setting 'postion: relative', and it worked again. Next I changed the javascript so it didn't do anything about the inputs (didn't change their ids or set any css properties), and commented out the line setting 'postion: relative' in the CSS and it worked. So I uncommented the line in the CSS and in the IE6 specific CSS sheet I set 'position: auto'. But this didn't work. So it seems that setting the CSS position of the form elements, even if you're just setting the position to 'auto', which it is anyway, will break it. I have just deleted the CSS line setting the position of those form elements and it is now working fine. I will have to check whether the form still looks okay in other browsers, but I think it should still look the same.

I noticed another problem in IE6 that appeared after quite a bit of the above testing. When you click a lightbox image the screen should be darkened, this is done by a div that covers the whole screen, and is coloured black with an opacity filter. But at the end of my testing I found that the opacity filter wasn't working for it, and it was just rendering as solid black, which isn't that great. I closed IE6 and then opened it again and the problem was gone. So I don't think there is anything I can do about this bug. I would guess that the problem is that IE6 ran out of memory to apply the filter or sumat, this would explain why closing and opening it again fixed it anyway. The test virtual machine is XP SP3 with 128MB Ram, 16GB HD with 14GB free, and Core2Duo 6700 processor (the defaults).

After that I checked ebay, and I'd been outbid for the Lowepro toploader bag I was watching, yesterday evening (before I bid for it) it was £5 with no bidders, but it ended up £6.23 with 4 bidders. It ended at 8.30am in the morning as well, so I guess 3 people must have bid for it early this morning.

I started checking my email, went and put the washing out, and then had a quick look round the back garden. The 2 bushes near the fence seem to have lost all their leaves really quickly. I was also surprised that the Willow bush had lost most of its leaves since I last saw it (which I think was probably just a couple of days ago). I carried on checking my email (I had a lot of email, about 80 messages), then it was lunch.

After lunch I checked my email a bit more then went out on a walk with Rad. The weather was very nice, warm (color temperature and actual temperature) sunlight with clouds in the sky that would sometimes block out the sun but didn't most of the time. I got quite hot so I took my jumper off and attached it to the back of my bag with a clip, but later on found my jumper wasn't on the bag any more. So I had to run back quite a bit and found it a field a and a bit away (so could have been much worse). That made me totally worn out. I think whenever I attach a jumper to the back of the bag I will have to make the clip as tight as it will go, or otherwise try and stuff my jumper inside the bag.

When we got back home I copied all the pics to my comp, tagged them with the lens and filters used and then processed them to jpegs/tiffs as I thought appropriate. While I was waiting for them to copy over and process I finished off checking my emails.

Annoyingly I got outbid at the last second for some Lowepro lens cases on ebay. I bid about a minute before the auction since often ebay doesn't put your bid through if you bid too near the end of the auction. I guess people who outbid you at the last second must use one of those ebay sniping tools. Probably I should have bid a bit more for them, I was thinking of how much I wanted to spend on them, rather than how much it would cost me to buy the cases seperately. I had a look on ebay and froogle after the auction had ended, and the same deal would cost me probably at least £60, while the auction ended at £37 in total.

After dinner I watched the Extras Christmas Special with Maccy.

Food
Breakfast: Coco pops; Bacon (with Tom Ketch) butty; orange juice.
Lunch: Mature cheddar cheese sandwich; cherry tomato; white grapes; slice of iced lemon madeira layer cake; mince pie; chocolate digestive biscuit bar; cup o' tea.
Dinner: Chicken; mixed veg; potatoes; gravy. Pudding was strawberry creamy yoghurt.

Tuesday 11 November 2008

Moving stuff about in my bedroom & received 682B monopod

This morning I was going to go on my comp and have a quick look at the IE6 png transparency Alpha Filter & form elements problem, but decided that I might as well move my PC, subwoofer and UPS before switching the PC on.

I was planning to move the stuff around in my room yesterday, but didn't have the time. I moved the unit with a cupboard and a drawer to where the PC, subwoofer and UPS were, then put the UPS and subwoofer on top of that cupboard and the PC on my desk next to the monitor, where my tape deck was. I moved the tape deck to the other side of the monitor.

I took the 2 boxes of pog stuff (mainly pog games) that were underneath the shelf in the middle of my room and put them behind the cupboard/drawer unit. I also put the DJXII keyboard, Guitar Hero II and the white cardboard box or 12"s behind there.

After I'd moved those I thought I might as well finish off the moving stuff around job as I'd intended to do yesterday. I found there were some spare long Ikea shelves (just the shelf bits, not the legs) in the garage. So I took all the small ikea shelf bits down and moved the wide ikea shelf to where the small ones previously were (between the door and en-suite door). I reorganised some of the tubs of pog stuff so they took up less space.

In one of the pog boxes there were loads of plastic food bags, most of them I threw away but there were also lots of the bags with a seal at the top, so I kept all them. It was amaxing how many bags there, and shows how I must have bought totally loads of pogs when I bought lots of pogs.

In the cupboard part of the cupboard/drawer unit I put the box of 7"s and Soviet poster prints that were in there before. I also put in there all my books that were previously in a couple of piles near the door and in a white bread rolls box. In the drawer bit I put small random stuff that was lying in various places around the room: my tin of Roses; a Roses tin of odd small stuff; batteries; money pot/elastic bands; bottle of Melatonin; nose/ear hair trimmer; hole punch; small LED lantern; and a glass jar of pennies.

The folders of various stuff that were just on the floor by the shelves previously, I put in the wall cupboards on the shelves along with all the folders that were already in there.

The big box of padding/bubble wrap/jiffy bags/small cardboard boxes I threw away. I had to stand out in the cold wind peeling sellotape off the boxes and jiffy bags filled with shredded paper so they could go in the reycling bin. All the selotape and other jiffybags and bubble wrap I threw in the normal bin, which had just been emptied. I filled it up about half way. Doing this took quite a while and hands looked quite trashed after being out in the cold wind for so long so I took some photos of them when I got back inside.

By the time I finished moving everything round, tidying up and vaccuming it was about 3.30pm. I went in the garden and tested my new Manfrotto 682B Self standing monopod, which arrived today. I found that:
  • It swayed around a bit in the wind, so won't be much good for outdoors HDR.
  • On unlevel ground (tried it on the grass) it won't stand upright by itself. I read this thread at dpreview which suggests pushing on one of the legs with your foot to use it on uneven ground.
  • It's quite big and heavy compared to my Manfrotto 676B monopod, though quite a bit lighter than my tripod.
  • It wouldn't fit into the centre column hole of my tripod. Probably it would fit with the 678 removed, but then the pole would be too thin for the centre column grippy thing to grip.
I will probably test it out a bit more tomorrow.

After testing my new monopod I went on ebay and saw that the Lowepro 1N lens case that I was watching would be finishing soon, and it had gone up to (and ended at) £6.95 + £2.50 P&P. I checked ebay and froogle to see what the going price for Lowepro lens pouches is and it seems to be £10-£15, with digitalrev on ebay being the cheapest. Digitalrev website actually came out cheapest on froogle, but with P&P was more expensive than their ebay shop which was offering free P&P. I was surprised how much they cost, up until yesterday the 1N lens pouch I was watching on ebay was only 99p (with no bidders I think). So I guess that £31 for the belt with a few pouches that finished on ebay the other day was actually a good deal.

Then I googled to see what camera pouches are available that fit on the Lowepro belt. On the Lowepro website all the beltpacks are packs that have the belt built into them, not packs to fit onto an existing belt. It seems that what you need to look for is toploaders. The one I read that someone else uses in a dpreview thread was the Toploader Zoom AW. It looks like this is the biggest one they do, and so probably the most flexible. I had a look on ebay and froogle to see the cheapest price for it, and it seems to be £35 + P&P from Warehouse express. On ebay most people seemed to be selling it for about £50. That's a bit expensive, so I'll see if I can get a cheaper one from ebay for the moment.

At dinner time Maccy said that Moley from HFM had come into his work and talked to him! And then Ben said that someone in his class said that DJ Brain from HFM was his dad! HFM is everywhere!!

After dinner me, Ben and Maccy watched Iron man, but it didn't say 'I am Iron Man' in the computerised voice like it does in the trailer, and his voice wasn't even very computery sounding when he was in the suit.

After that I checked the Warehouse express forums, then HotUKdeals, then went to bed. My room is now a lot more roomy than it was before.

The weather today was sunny nearly all day with a bit of cloud around, though very windy (which made it cold). Made a nice change from the last couple of weeks (which has been overcast and rainy). I didn't get up until 8am, so I didn't see whether there was a visible sunrise, I'm guessing there was. There was a sunset, but it wasn't that great as there weren't any clouds around to be lit up by the sunset.

Food
Breakfast: Coco pops; orange juice.
Lunch: Grated mature cheddar cheese with babyleaf salad sandwich; satsuma; mince pie; chocolate digestive biscuit bar; cup o' tea.
Dinner: Ham quiche; peas; potatoes. Pudding was ginger sponge with golden syrup and vanilla sauce (like custard).
Supper: Choc chip chewy cereal bar; cup o' tea.

Monday 10 November 2008

Trying to get Virtual hosts accessable via the LAN

Woke up this morning at 6am, but it was cloudy outside and I was sleepy so I went back to sleep. Got up at 7am, had a shower etc then had breakfast with Ben. After that I checked my email, deviantart, dpreview canon lens forum, Andy Rouse's blog and thewebsqueeze. Then I did a japanese lesson.

Did a bit of work on my website and got the Pogs info edit form working properly. Then I wanted to test it on IE6 so I tried to get my Apache virtual hosts working so the sites could be accessed over the local network.

My original httpd-vhosts.conf file looked like this:

NameVirtualHost 127.0.0.1

<virtualhost 127.0.0.1>
ServerName localhost:80
DocumentRoot "C:/xampp/htdocs"
</virtualhost>

<virtualhost 127.0.0.1>
ServerAdmin webmaster@site1.com
DocumentRoot "C:/xampp/htdocs/VHosts/public_html/Site1"
ServerName site1.com
ServerAlias www.site1.com
PHPIniDir "C:/xampp/htdocs/VHosts/public_html/"
</virtualhost>

<virtualhost 127.0.0.1>
ServerAdmin webmaster@site2.com
DocumentRoot "C:/xampp/htdocs/VHosts/public_html/Site2"
ServerName site2.com
</virtualhost>

<virtualhost 127.0.0.1>
ServerAdmin webmaster@milkcapmania.co.uk
DocumentRoot "C:/xampp/htdocs/VHosts/public_html/PogSiteV3"
ServerName PogSiteV3.com
</virtualhost>

And my windows hosts file (on my local machine, the server) looked like this:
127.0.0.1 localhost
127.0.0.1 site1.com
127.0.0.1 site2.com
127.0.0.1 PogSiteV3.com
::1 localhost
First I tried changing NameVirtualHost and the VirtualHost block for PogSiteV3.com to *. But that didn't work. I tried other variations e.g. *:80, but they didn't work either. When I say 'didn't work' I mean that on the machine acting as the server pogsiteV3.com went to the same directory as localhost rather than the pogsiteV3 directory. I also tried removing the last entry from the windows hosts file, but still no difference. I also found that simply saving the .conf file and restarting Apache didn't work, for some reason the changes I made would only work if I restarted the whole PC, which is annoying and takes a few minutes each time.

So I did some googling and found this thread where some shows how they setup their Apache so they could access Virtual Hosts from another machine on a local network.

So I copied what they did and it worked. After changing stuff around bit by bit (and having to restart my PC each time to check) I ended up with the following in my httpd-vhosts.conf file:
NamevirtualHost localhost
NamevirtualHost site1.com
NamevirtualHost site2.com
NamevirtualHost pogsitev3.com

<virtualhost localhost>
Servername localhost
DocumentRoot "C:\xampp\htdocs"
</virtualhost>

<virtualhost site1.com>
ServerName site1.com
ServerAlias www.site1.com
DocumentRoot "C:/xampp/htdocs/VHosts/public_html/Site1"
PHPIniDir "C:/xampp/htdocs/VHosts/public_html/"
</virtualhost>

<virtualhost site2.com>
ServerName site2.com
DocumentRoot "C:/xampp/htdocs/VHosts/public_html/Site2"
</virtualhost>

<virtualhost pogsitev3.com>
ServerAdmin webmaster@milkcapmania.co.uk
DocumentRoot "C:/xampp/htdocs/VHosts/public_html/PogSiteV3"
ServerName pogsitev3.com
ErrorLog C:/xampp/htdocs/VHosts/Logs/PogSiteV3-error.log
CustomLog C:/xampp/htdocs/VHosts/Logs/PogSiteV3-access.log common
</virtualhost>
And my hosts file (on both my local PC (the server) and the Virtual PC looked like this:
127.0.0.1 localhost
192.168.0.4 site1.com
192.168.0.4 site2.com
192.168.0.4 pogsitev3.com
With this setup I could access the sites both from my local machine (the server) and the Virtual PC. And of course so long as I setup the hosts file on any other PC in the Local Network, I would be able to access the sites from those machines as well.

But, Apache was giving me an error:
[Mon Nov 10 14:48:27 2008] [warn] NameVirtualHost site2.com:80 has no VirtualHosts
[Mon Nov 10 14:48:27 2008] [warn] NameVirtualHost pogsitev3.com:80 has no VirtualHosts
[Mon Nov 10 14:48:28 2008] [notice] Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.3 configured -- resuming normal operations
[Mon Nov 10 14:48:28 2008] [notice] Server built: Mar 5 2007 11:23:00
[Mon Nov 10 14:48:28 2008] [notice] Parent: Created child process 2992
[Mon Nov 10 14:48:28 2008] [warn] NameVirtualHost site2.com:80 has no VirtualHosts
[Mon Nov 10 14:48:28 2008] [warn] NameVirtualHost pogsitev3.com:80 has no VirtualHosts
[Mon Nov 10 14:48:29 2008] [warn] NameVirtualHost site2.com:80 has no VirtualHosts
[Mon Nov 10 14:48:29 2008] [warn] NameVirtualHost pogsitev3.com:80 has no VirtualHosts
[Mon Nov 10 14:48:30 2008] [notice] Child 2992: Child process is running
[Mon Nov 10 14:48:30 2008] [notice] Child 2992: Acquired the start mutex.
[Mon Nov 10 14:48:30 2008] [notice] Child 2992: Starting 250 worker threads.
[Mon Nov 10 14:48:30 2008] [notice] Child 2992: Starting thread to listen on port 443.
[Mon Nov 10 14:48:31 2008] [notice] Child 2992: Starting thread to listen on port 80.


I did a bit more googling and reading and experimenting, and ended up with my conf file like this:
NameVirtualHost *:80

<VirtualHost *:80>
ServerName localhost:80
DocumentRoot "C:/xampp/htdocs"
</VirtualHost>

<VirtualHost *:80>
ServerAdmin webmaster@site1.com
DocumentRoot "C:/xampp/htdocs/VHosts/public_html/Site1"
ServerName site1.com
ServerAlias www.site1.com
PHPIniDir "C:/xampp/htdocs/VHosts/public_html/"
</VirtualHost>

<VirtualHost *:80>
ServerAdmin webmaster@site2.com
DocumentRoot "C:/xampp/htdocs/VHosts/public_html/Site2"
ServerName site2.com
</VirtualHost>

<VirtualHost *:80>
ServerAdmin webmaster@milkcapmania.co.uk
DocumentRoot "C:/xampp/htdocs/VHosts/public_html/PogSiteV3"
ServerName PogSiteV3.com
ErrorLog C:/xampp/htdocs/VHosts/Logs/PogSiteV3-error.log
CustomLog C:/xampp/htdocs/VHosts/Logs/PogSiteV3-access.log common
</VirtualHost>


I changed my hosts file on my local machine to:
127.0.0.1 localhost
127.0.0.1 site1.com
127.0.0.1 site2.com
127.0.0.1 PogSiteV3.com


And the hosts file on the Virtual PC to:
127.0.0.1 localhost
192.168.0.4 site1.com
192.168.0.4 site2.com
192.168.0.4 PogSiteV3.com


And it worked! Now I just need to see if I can do anything the make the Wii resolve those domain names to my machine's local IP address as well.

Blogger is quite annoying with posting the above code - it messes it up, even if you put the code in <pre> tags. So I found this handy website that encodes (and decodes) HTML characters.

Another error I noticed in the apache error log was that my site didn't have a favicon, so I googled about that and followed this guide to making favicons. The only thing missing from the tutorial is it doesn't tell you how to change the color depth of the image when saving. In photoshop you need to make sure your current Color mode is RGB, then go to Image > Mode > Indexed Color...
  1. Then in the pop up box you need to choose Local (Selective) for the palette.
  2. Colors - mess around with it choosing the fewest amount of colors you need to still get a good result. I only needed 32 colors (5 bits) for my icon.
  3. Forced set to Black & white.
  4. Transparency ticked as needed (I didn't have any transparency in my icon)
  5. Matte was greyed out and set to none
  6. Dither was set to Diffusion
  7. Amount set to 75%
  8. And Preserve exact colours not ticked.
Adobe has an article about changing the color bit depth in photoshop, but I needed to turn CSS off in my browser to be able to see it, otherwise the text was covered by a big grey box.

After getting that working properly I tested the site on IE6. The layout was messed up, but that was pretty easy to fix. Then I found that when you clicked on a menu item to expand it, an extra space would be added to the item title each time. It was easy to fix that as well, but strange that it should happen since normally multiple spaces in a row in HTML will render as a single space on the page.

Then I found a more serious problem - when you click on one of the pog images to load up the larger image in the lightbox, the login form at the top right hand corner of the page gets messed up. Both the input boxes in the form dissapear (well, they're still there but you can't see or access them). So I spent a long time trying to fix this. The problem seems to be with the IE filter for handling transparency in PNGs, which I am using in IE6. I found that if I change the id of the input, or insert a new input with a different id, then that input will display ok. But if I change the id of the input and then change it back to the original id, or insert a new input with the same id as the original input, then they won't display. I will have to look into this a bit more tomorrow.

About 9pm I finished watching Zulu with Maccy and Ben, then I went on hotukdeals and downloaded the latest VHD of IE6 for Microsoft Virtual PC 2007 since my current one kept saying it was past its expiration date.

The weather today was overcast all day and it rained most of the day.

Food
Breakfast: Coco pops; Banana; cup o' tea.
Lunch: Grated matured cheddar cheese with baby leaf salad sandwich; cherry tomato; apple; cup o' tea.
Dinner: Beef burger in bun with grated cheese, tomato ketchup and babyleaf salad; Chicken & vegetable soup in a mug; bun. Pudding was cheesecake with mandarin slices. Coffee.
Supper: Coffee; Mince pie.