Wednesday, 11 January 2012

Charlie don't surf - yet

"Nicholas Negroponte, the brains behind the One Laptop Per Child initiative, is detailing a new plan to inspire the world’s poorest children to teach themselves to read using tablet computers.

Negroponte said that within a year his team would be dropping tablets into remote villages by helicopter – without staff – and letting children teach themselves how to use them.
"

Sorry but I can't help thinking of Wagner being played through loudspeakers and some Yank shouting "Charlie don't surf - yet".

http://www.theregister.co.uk/2011/11/02/negroponte_tablet_airdrops/

Monday, 9 January 2012

YouTube RSS feed

The URL for an RSS feed from your YouTube channel is:
http://gdata.youtube.com/feeds/api/users/yourchannelname/uploads

Why YouTube make it impossible to find that I don't know.

Sunday, 6 November 2011

"Witness" to M25 Accident

With the news of the M5 pile-up fresh in my mind, on the way home from Brands Hatch last night I was witness to the resulting carnage, not the actual event, of what initially looked like quite a serious accident on the M25. Transit and trailer both on their sides, lanes 2 & 3 blocked, Armco levelled for about 100 yards and two lamp posts knocked over - one into the other carriageway. I was the only person not involved who actually stopped - everyone else casually drove round the wreckage and disappeared into the night.

I checked first to see if anyone was trapped or injured - fortunately not - and dialled 999. We ended up with five fire engines, an incident support unit, two police cars and an ambulance. And they shut the M25 in both directions. All this on bonfire night.

As I didn't witness the actual event, the police didn't want contact details, but Essex Police did actually ring me back later.

Out of interest, there are eight points listed in the Highway Code are as to what you should do:
* Turn on your hazard lights to warn approaching traffic of potential danger [I keep a reflective jacket in the car too].
* Make sure other drivers switch off their engines and extinguish cigarettes for fire safety reasons.
* Call the emergency services yourself or get someone else to do so. Give full details of the location of the accident and any casualties. The operator will advise you on what to do before the services arrive.
* Make sure that any uninjured passengers move to safety, away from their own vehicle and passing traffic [the hard shoulder should be a safe haven, but unfortunately some drivers think that if the road is blocked, the emergency lane is for them].
* Leave anyone with injuries where they are – you could do more harm than good – except if they are in danger from fire or explosion.
* Do not take off a motorcyclist's helmet unless you have no option. Again you could cause serious injury.
* Give First Aid if needed.
* Wait until the emergency services arrive.

Monday, 17 October 2011

Line breaks in Drupal

If you're tearing your hair out trying to make Drupal keep line breaks and new paragraphs in the body of your Posts, Stories, etc. make sure Drupal itself isn't filtering out your <p> and <br /> tags.

* Go to Administer > Site configuration > Input formats
* For each one that you're using, in the Operations column click Configure
* Click Configure in the title line menu
* Go down to the Allowed HTML tags box and add the tags <p> and <br />

If you don't do this, even though your chosen WYSIWYG editor will happily add tags to your text, and even save them in the database, but Dupal will then filter them out again when displaying the page.

Wednesday, 25 May 2011

QuickTime Player 7

Perhaps Apple have realised the new QuickTime player that comes with Snow Leopard is pants because they provide, on the Snow Leopard install DVD, a version of the old player. Follow this URL to find out how to install it:

http://support.apple.com/kb/ht3678

If you're installing Snow Leopard as an upgrade, it will retain your QuickTime Pro license key.

Snow Leopard Sucks

The more I use Snow Leopard the more I come to realise that its a lesson in how to abandon over 15 years of development of useful, easy-to-use software that people actually want to use in favour of something that might be prettier but is actually vastly more complex but yet with reduced functionality and a horrendous user interface. I have to wonder what's happened to all the designers and developers at Apple who actually knew what they were doing?

Friday, 11 February 2011

Its alright - we know where you've been...

These are the permissions you are expected to grant to Yahoo just so that your Flickr images can automatically be posted to your Facebook account. Sorry but I really don't think you need to know any of my information, let alone my friends' information.

Friday, 5 November 2010

Apache websever configuration

In configuring Apache to allow various directives in an .htaccess file, if you find yourself banging your head against a wall since you have used:

AllowOverride All

...and some directives still are not accepted, its because this line doesn't actually allow everything - to do that you need to use:

AllowOverride AuthConfig FileInfo Indexes Limit Options=All,MultiViews

Obviously the more things you allow, the less secure your server...

Friday, 8 October 2010

JW Player API

Thanks, authors of JW Player, for wasting at least 3 hours of my life because you have changed your JavaScript API and not published any documentation for it!

Quoting an entry buried in the help forum:

The v4 [and v5] player uses a completely different API, details here: http://code.longtailvideo.com/trac/wiki/FlashAPI

Sadly, that URL doesn't work. Now I expect Open Source software to have either completely useless, or just plain absent documentation, but we (and a great many others) have paid for this player - so its not acceptable.

Friday, 19 February 2010

Build a menu bar on-the-fly with JavaScript

Its not necessary to use either PHP or SHTML to include a dynamic menubar in a set of web pages - you can do it with JavaScript.

First define arrays containing all the links and the link text you want for the links - make certain the two arrays have the same number of elements!

Then have a loop that goes through these arrays, displaying them on the screen in order. You can do a bit of string testing to work out what page you're on and have that link displayed differently - perhaps in bold or just not underlined. Output all the HTML using document.write

Here's an example:

var textArray=new Array('home','news','people','places','views', 'faq');
var linksArray=new Array('index.html','news.html','people.html','places.html','views.html','faq.html');

for (i=0;i < textArray.length; i++) {
var str = window.location.toString();
var urlbits = str.split('/');
if (urlbits[urlbits.length-1]!=linksArray[i]) {
document.write(''+textArray[i]+'');
} else {
document.write(''+textArray[i]+'');
}
if (i!=textArray.length-1) document.write(' | ');
}

Note how the last line in the loop misses off the delimiter for the last item.

Save this JavaScript in a separate file - something like menubar.js - and include it in the same place in all of your HTML pages using a conventional link to an external JavaScript file:

<script type="text/javascript" src="menubar.js"></script>

My links here are just straightforward links, but they could equally be styled bullet list items, buttons, images, whatever.

Thursday, 18 February 2010

Parsing RSS with Dubin Core using PHP5

With the built-in XML functions of PHP5, its now pretty straightforward to parse well-formed RSS data, eg:

$link = $node->getElementsByTagName('link')->item(0)->nodeValue;

But when using getElementsByName you run into problems if you want to grab data in Dublin Core fields - this won't work:

$creator = $node->getElementsByTagName('dc:creator')->item(0)->nodeValue;

To solve this you have to use the getElementsByTagNameNS function and declare the namespace you are using - obviously in this case Dublin Core:

$creator = $node->getElementsByTagNameNS('http://purl.org/dc/elements/1.1/','creator')->item(0)->nodeValue;

Sunday, 1 November 2009

Air tax increase comes into force

"BBC NEWS | UK | Air tax increase comes into force
The first of two rises in UK airport departure tax has come into effect, adding up to £30 to the cost of flying. The price of the shortest flights rises by £1, with Air Passenger Duty on business and first class journeys over 6,000 miles up from £80 to £110."

Isn't the idea of environmental taxes to encourage people to use less harmful forms of transport? If so, surely the tax should be higher for internal flights - where you could take the train instead - and lower for trans-continental flights, where you don't have a choice. Or perhaps this tax is just to raise money...?

BBC NEWS | UK | Air tax increase comes into force

Tuesday, 27 October 2009

Canon 1D Mk.IV "launch"


Well, not exactly a launch - more of a preview - today at Pro Photo Solutions, held at the Design Business Center in London. All courtesy of the nice people (Colin) at SimplyDV.

I was hoping for a proper "hands on", particularly to do a proper test of the flash metering - which to date on Canon is complete pants. Unfortunately Canon UK only had two pre-production samples of the new camera, both tied very firmly to the deck and with card doors sealed, so you couldn't actually take any photos. All very disappointing.

Due to catching too late a train, I missed most of the initial press briefing, but attended a half-hour seminar later in the day. I was a bit worried what Canon UK were saying about the camera being more "susceptible" to blurred photos due to the resolution being so high and the pixels so densely packed. Not sure I entirely believe their argument - if it happens with this camera, why not also on the D1S Mk.III ?

There was much talk about the various Custom Functions that can be used to tailor the operation of the AF system. You can control how fast the AF reacts to changes, how many of the 45 AF sensors are used, how the selected AF point can be expanded, how large the AF areas are (that's a new one), etc. etc. "Do read the manual", the Canon UK man says, as you can basically duff up the AF operation completely. Let just hope all the AF issues that plagued the Mk.III (and some - including my - Mk.IIn) bodies are firmly behind us now.

Much was also made of the hiked ISO range. The standard range available without recourse to yet further custom functions is 100 to 12800. With a bit of fiddling, however, this can be expanded to 50 to a staggering 102400! Canon reckon the quality is "two stops better" than the already impressive Mk.III - meaning that if you were happy to work with ISO 800, you'd be equally happy with 3200 on the new body. Why hide this extra range away? Canon say its because the quality isn't really what they consider acceptable - I can live with that. Of course, the proof is in the pudding and I was miffed I couldn't see the quality for myself.

I asked, for the benefit of SimplyDV, about the camera's HD video capabilities. Via custom function (there are a lot of them) you can pick between full HD at 25fps or lower the resolution to 720 pixels or even VGA to get 50fps - could be useful for scientific or educational applications,as well as straight-forward slow motion. You can also switch from PAL to NTSC to get different frame rates.

Sadly, in the questions section at the end, predictable - and pointless - questions came from the floor regarding the camera's crop factor and the choice of resolution. Why is it that people cannot understand that if you want a "full frame" (35mm-sized) sensor, you simply buy a different camera? This new body is aimed primarily at sports, news and wildlife photographer who need the extra reach that a crop sensor body provides.

So, what's my verdict? Well, sadly I can't give one. Nowhere near enough real hands-on for my liking - the lack of real cameras for us media types to play with rendered the whole exercise somewhat pointless.