The error was produced by something like
$software = isset($xmp['Software']) ? $xmp['Software'] : isset($exif['Software']) ? $exif['Software'] : null;
Eventually I found out that the problem was two ternary if statements together. Changing the code so the second ternary if statement is evaluated by adding brackets round it like the following fixed it:$software = isset($xmp['Software']) ? $xmp['Software'] : (isset($exif['Software']) ? $exif['Software'] : null);
In the afternoon I was doing more work on my website, but client side stuff instead of server side. First I needed to change the way that that a div was being forced to shrink wrap to its contents using javascript.Because I'd changed the way that the contents of the div in question were spaced out, this meant I had to change the points at where the div is forced to shrink wrap by the javascript. Getting the points was just a case of disabling javascript, shrinking the window until the contents of the div popped onto the next line, leaving a large gap on the right hand side of the div because it wasn't shrinkwrapped, and then getting the window width using firebug. Then I could put that width into the javascript to force the div to shrinkwrap when the window got below that size.
After that I tried changing my slideshow javascript so that it would just display an image at its original size, instead of re-sizing the image to fit the window. Why I wanted to do this is that although internet browsers are far better at resizing images than they used to be, they're still not as good as photoshop or the windows picture viewer, or just about any other program you can use to view resized images. And for a photography website, you really want the images to look their best, so it's best if they're not resized by the browser.
The first problem I had was getting images to overlap each other - the answer to this was to use absolute positioning and z-indexes (it doesn't work with relative positioning).
The next problem was that when the images were fading in, the image being faded in would appear to the right or below the image being faded out, until the fade was complete, then it would move up to where the other image had been. I found this was because I was using the jQuery fadeIn() and fadeOut() methods, and this was causing the image's display css property to be set to inline rather than block.
So to fix it, I set the display property of the images to block in the css, and used the jQuery animate() method to animate the opacity of the images instead of using the fadeIn() and fadeOut() methods.
I still have a problem that when the first image is loaded, the browser window gets a scrollbar momentarily. I tried debugging this, but using firebug to debug it just means that the first image doesn't load (no idea why), and I couldn't get the script to exit in the correct place (so I can see what's going on and where the problem is) by throwing an error either.
Also today, I got an email about the 'MoneyWeek Alliance'. Joining gets you lifetime (or as long as the services are running for) access to:
- Weekly e-bulletin updates of Paul Hill's Precision Guided Investments
(Normally costs £749 per year) - Weekly e-bulletin updates of James Ferguson's Model Investor service
(Normally costs £496 per year) - Fortnightly e-bulletin updates of Tim Price's The Price Report
(Normally costs £496 per year) - Weekly e-bulletin updates and monthly newsletter of Stephen Bland’s The Dividend Letter service
(Normally costs £159 per year) - Weekly e-bulletin updates of Riccardo Marzi’s Events Trader service
(Normally costs £496 per year) - Weekly issues of MoneyWeek (51 issues per year) delivered to your door
(Normally costs £79 per year)
Yes, I would like to become a member of MoneyWeek Alliance. I understand I will pay a one-time "last chance" fee of £2,957. From this date forward, my only payment will be an annual charge of £79 to cover the costs of postage, printing, and administration.Hmm... how strange that the annual charge for 'postage, printing, and administration' is exactly the same cost as the annual subscription to MoneyWeek magazine. So basically, you are paying £2878 for lifetime subscriptions to the e-letters. Whether the e-letters are any good or not, I don't know.
Googling for 'Precision Guided Investments' (the most expensive e-letter you get as part of the package), all I found was pages from Agora publication/Fleet Street Publications and one forum thread where someone was asking about it, but didn't get any replies.
Personally, I can't see the point in subscribing to so many investment advice services. For me, the free Money Morning email has loads more investment advice than I can actually make use of (not actually having any money to invest), and even if you had loads of spare money to invest, I'm pretty sure the MoneyWeek magazine would give you enough investment ideas.
In the evening I did more work on my website, trying to work out how to get Wordpress to display comments including nested comments in alternate colours. Eventually I figured out a way to do it. I did try to find examples of other blogs with hierarchical comments and alternate colours per comments, but couldn't find any.
The weather today was overcast all day and rained in the evening.
Food
Breakfast: Lime marmalade toast sandwich; cup o' tea.
Lunch: Ham with mustard sandwich; 2x clementines; Slice of sultana cake; Caramel Rocky; cup o' tea.
Dinner: Shepherd's Pie; Chilli Sausage; Green Beans; Baked Beans; Carrots. Pudding was a choc ice and a Fox's chocolate coated crinkle crunch. Coffee.
Supper: Bowl of Honey Cheerios.
No comments:
Post a Comment