woensdag 3 juni 2009

My display rotated, how to turn this display back?


Many laptops / notebooks nowadays have the option to rotate the display (not physically!). It allows you to read documents or PDFs very nicely, but often it is very annoying.
If you got this service without asking for it, try the following key combination:
CTRL + ALT + ARROWUP.

You have to press the control key, the alt key and the upper arrow key all at the same time. You can tilt your screen in other directions with another arrow-key! Give it a try, sometime it may become of use.

If it DOES NOT WORK try SHIFT instead of ALT!

See also eHow

zondag 15 maart 2009

Uploading with PHP

The form
1. make sure you have a form with a file field:
<form action="upload.php" enctype="multipart/form-data" method="POST" >
<input type="hidden" value="30000" name="MAX_FILE_SIZE">
<input type="file" name="userfile">
<input type="submit" value="Upload now">
</form>


The script

$target = "uploads/";
$target = $target. filename_safe(basename($_FILES["userfile"]["name"]));

if(move_uploaded_file($_FILES["userfile"]["tmp_name"], $target)) {
// upload succesfull
echo "upload successful";
}
else {
// upload not successfull
echo "upload unsuccesful";
}


Extra information

If things don't work correctly:

* check for the right PHP version: echo phpversion();
From PHP 4.10 you can use $_FILES, otherwise use $HTTP_POST_FILES.

* the actual files you try to upload may be too big, try it with smaller files!

woensdag 25 februari 2009

Getting eGPS (enhanced GPS) to work for Google Maps on you Samsung Omnia I900




In Google Maps you can determine your location with GPS. But on the Samsung Omnia this doesn't work by default. The Omnia has a special version of GPS, called enhanced GPS. This type of positioning is using GSM or GPRS signals to find locations faster.

1. So, first you need to make sure you have an internet connection.

2. Next, you need to set a few settings in Windows Mobile: go to 'settings' / 'control panel', then the tab 'system' and click on 'external GPS'.
In the first tab you need to select COM3
In the second tab (hardware) select COM9 and 4800 as baudrate
In the third tab (access) make sure the box is checked.
Click OK.

3. Then, you select 'Enhanced GPS' in the control panel (settings) and make sure you enable the first option (XTRA), disable the second (Automatic download).
(If things not work at the end you may need to click the button to download XTRA stuff.
Click OK.

4. Start Google Maps (from the programs) and enable the GPS by clicking menu (bottom right) and check the GPS option.
(Under options you may select manual settings for COM port and baudrate, but this is not necessary).

5. It may take a while before your position is determined. But in the end the blue circle should get smaller (meaning that the possible error in location determination becomes lower).
It works best if you take your device outside or close to the window in order to keep visual contact with satellites.

I hope it works!