Here's a little tip of how to launch Applications really quickly on your Mac. This makes use of the Spotlight feature to search for the application you want to launch, which saves you all the work of going through the finder and searching for the launch icon.
Tip: Hold the 'apple key' and press 'Space' this is really easy as they're next to each other and can easily be done with your left index finger and thumb. This opens the spotlight searchbox, now start typing the applications name. Within a couple of letters it should have selected the app you're after, so just hit Enter to open the app.
eg: 'Apple key' 'Space' 'i' 't' (searches and selects itunes and enter opens it straight away!
Monday, 21 September 2009
Sunday, 6 September 2009
Seventh Day - Skate Video
This video was made circa 2006 and reminds me of the time I spent living in Cornwall and riding long boards for the Christian Skate clothing label - BelieveClothing.
Particularly happy with capturing my 360 on film (at 17:21 mins)
A video about Skate-boarding in Cornwall. With a focus on long-boarding and downhill sliding.
The video documents a group of Christian Skaters as they reach out to young people of Falmouth Cornwall. I am both in this video as well as helping film for it. This video was edited and produced by David Renyard - davidjdesigns.me.uk
Thursday, 3 September 2009
WD500 External Hard Drive Stopped Working
Recently my Western Digital 500GB external drive stopped working. Fine one day, then no power the next.Symptoms: No Power at all, no noise or spinning. The power unit itself will light green when not connected to the drive, but as soon as it's attached the green light goes out. If connected the power light will stay light for 1 second, then no power.
This seems to be a common fault with this drive and it would seem obvious that the power supply has failed. However following through the problems these guys had, it would seem it's not the power supply, but the external casing that's causing the drive to fail.
Solution: Rest assured your data is probably still safe, as the hard-drive itself is likely to be fine. You have a couple of options:
- Buy a new external hard drive casing/enclosure, this costs around £20-30
- Fit the drive in you Desktop PC as an internal drive.
Seeing as you can buy a new 500GB for under £50, I didn't want to spend £30 on a case. So went with the internal drive method. It's easy to do and if your PC's not too old it'll probably have everything you need inside the case!
First take your external drive to peices, just strip off the outer case until you've freed the drive. It's a standard 3.5" SATA HDD. It has two connectors on the back, the smallest is the SATA DATA connection that connects it to the motherboard, and the longer connector is for power.In your desktop you'll probably have a spare power socket on a ribbon cable behind your existing drive, you can also use the small SATA cable to connect it to the motherboard.
Boot up your PC and your away! The drive will be recognised in the My Computer window. If your PC's a bit older it may only have IDE connectors, but all is not lost, you can pick up an IDE to SATA converter that'll allow you to connect it up.
I bought a SATA and Power connector from Maplin for just under £4.
Good Luck!
Friday, 21 August 2009
HTML Form input boxes clear when clicked
Here's a quick tip on clearing the default text from text boxes in a form.
First of all you can add the default text to a input box by declaring a value:
Now we can add an 'onfocus' event that will delete this value when the box is clicked, essentially by replacing it with nothing.
note: where it states the second this.value they're two single quotes ' ' and the statement is wrapped in double quotes. The two single quotes with no space between is for the value zero.
So now the text box appears with the tag 'Enter Name' inside it but when the user clicks the box the text disappears. This also works really well for search boxes eg- 'Search my site'.
First of all you can add the default text to a input box by declaring a value:
<input type="text" value="Enter Name" />
Now we can add an 'onfocus' event that will delete this value when the box is clicked, essentially by replacing it with nothing.
<input type="text" value="Enter Name" onfocus="if ( this.value=='Enter Name' ) { this.value = ''; }"/>
note: where it states the second this.value they're two single quotes ' ' and the statement is wrapped in double quotes. The two single quotes with no space between is for the value zero.
So now the text box appears with the tag 'Enter Name' inside it but when the user clicks the box the text disappears. This also works really well for search boxes eg- 'Search my site'.
Friday, 7 August 2009
Div containing floating divs collapses
After about an hour of trying to work out why the spacing between my posts was working in Internet Explorer but not in Firefox, I stumbled upon a common issue.
If a Div contains floating divs it will not resize the height to contain the floating divs. So adding padding to the containg div has no effect. This is how floating divs are supposed to behave. IE ignores this and contains them anyway, but most other modern browsers follow the rules and let the inner divs float 'uncontained'.
The simple solution to this problem is to include and empty div after the floating divs and within the container. This empty div must not have a floating property and must be set to clear the floating divs. This gives the container div something to wrap around. The code will look something like this:
So the magic bit is
If a Div contains floating divs it will not resize the height to contain the floating divs. So adding padding to the containg div has no effect. This is how floating divs are supposed to behave. IE ignores this and contains them anyway, but most other modern browsers follow the rules and let the inner divs float 'uncontained'.
The simple solution to this problem is to include and empty div after the floating divs and within the container. This empty div must not have a floating property and must be set to clear the floating divs. This gives the container div something to wrap around. The code will look something like this:
<div class="container">
<div class="float-left"> </div>
<div class="float-right"> </div>
<div style="clear:both;"> </div>
</div>
So the magic bit is
"<div style="clear:both;"> </div>" just insert it just before you close the container div.
Tuesday, 14 July 2009
apt-get install sendmail fails
I was getting an error message when trying to install sendmail on a linux server.
Using the command sudo apt-get install sendmail i was getting the following error:
press 'y' and let that install, then type:
and it'll install fine this time! hope this helps someone else out too!
Using the command sudo apt-get install sendmail i was getting the following error:
The following packages have unmet dependencies:
sendmail: Depends: sendmail-bin (= 8.13.8-3) but it is not going to be installed
E: Broken packages
Easy fix, just type:
sudo apt-get install sendmail-bin
press 'y' and let that install, then type:
sudo apt-get install sendmail
and it'll install fine this time! hope this helps someone else out too!
Wednesday, 1 July 2009
Create Strings from XML using PHP.
This code uses the simplexml function included in PHP 5.
It's purpose is to create string variables from XML.
It only works properly as long as every xml tag is unique, if a tag is repeated it will overwrite and be useless to you.
here's an example of what it does,
Sample XML:
the code would create two variables $username and $password, each containing the values from the XML, so print $username would display "John Smith"
Here's the PHP -
this code is presuming you've stored the XML data in a variable called $data. If the XML is a file you can replace the first line with this:
to load your external xml file.
It's purpose is to create string variables from XML.
It only works properly as long as every xml tag is unique, if a tag is repeated it will overwrite and be useless to you.
here's an example of what it does,
Sample XML:
<?xml version="1.0" encoding="utf-8" ?>
<newsignup>
<username>John Smith</username>
<password>p455w0rd</password>
</newsignup>
the code would create two variables $username and $password, each containing the values from the XML, so print $username would display "John Smith"
Here's the PHP -
$xml = simplexml_load_string($data);
foreach($xml->children() as $child)
{
$Name = $child->getName();
$$Name = $child;
}
this code is presuming you've stored the XML data in a variable called $data. If the XML is a file you can replace the first line with this:
$xml = simplexml_load_file("test.xml");
to load your external xml file.
Subscribe to:
Posts (Atom)