Posts in the 'Technology' category

Feb
1
2007

Dynamic Form Submit



I've just released iZeit v1.7, a calendar written in PHP. One of the things I added to this version was JavaScript forms created on the fly to replace image links. There was a problem recently with Google Web Accelerator, which preloaded all links on the current page so they'd load faster when they were needed. That might sound like a good idea, until you get a page full of delete links that use variables passed via the GET method. Creating a form on the fly and submitting it using POST looks nicer, is alot more secure and isn' subject to Google's interfering web accelerator. Instead of using the href of an anchor, you use an onclick event in the anchor instead.

‹a title="Delete Category" onclick="var f = document.createElement('form');
f.style.display = 'none'; this.parentNode.appendChild(f);
var h = document.createElement('input'); h.type = 'hidden'; h.name = 'act'; h.value = 'admin'; f.appendChild(h);
var h2 = document.createElement('input'); h2.type = 'hidden'; h2.name = 'setadmin'; h2.value = 'delcat'; f.appendChild(h2);
f.method = 'POST';
f.action = 'index.php';
f.submit();
return false;"›
‹img border="0" src="delete.gif" alt="Delete category" /›‹/a›
Jan
28
2007

Things you didn’t know about PHP



Posted in Programming and Technology

I've been developing in PHP for a while now, mostly iZeit, my PHP calendar script, but also the odd smaller script and I've picked up a few things along the way.

Quotes vs. Double Quotes

Anything in double quotes is parsed by PHP and variables are replaced. So if you’re concatenating things, use single quotes instead:

$name = 'Bob';
echo 'Name is '.$name;   // Name is Bob
echo "Name is $name";   // Name is Bob
echo 'Name is $name';   // Name is $name
echo "Name is ".$name;   /* Name is Bob, but wastes processing
time because the non dynamic part of the statement is parsed for variables. */

Check whether a variable's set first

There are times when if you try to use a variable that isn't set, PHP will throw an error at you.

$param = isset($_GET['param']) ? $_GET['param'] : NULL;

Using shorttags

I have no idea why they even added shorttags. Using <?php ?> instead of <? ?> will make your scripts run on alot more servers which don't have short tags enabled in php.ini.

Jan
23
2007

iPhone announced



Posted in Latest news and Technology

Steve Jobs announced the iPhone at his Macworld keynote speech today, rumored to exist for the last year, it'next big thing from Apple. It has a widescreen multi-touch screen, which isn't a touch screen but a "revolutionary user interface". It’s anyone's guess what Apple mean by that, but it certainly looks interesting.
iPhone
The iPhone has an impressive specification and runs a slimmed down version of OSX, so it’s sure to offer plenty of eye candy. It has built in WiFi, Bluetooth and EDGE aswell as a 320×480 screen and a 2Megapixel camera. Two versions will be available, a 4GB for £257 and an 8GB for £309.

Pictures at Gizmodo

Jan
9
2007

Change drive letter on a boot device



Posted in Technology

I've been running Vista and XP side by side for a few months now, and what I designated as a small partition has slowly got bigger and bigger until there was no space left on my Vista partition, so today I decided to re-jig my partitions. No problem, but due to the lack of partition managers for Vista, I had to boot back to XP and fire up Partition Magic. The problem started when I tried to boot back to Vista, which gave me loads of errors about files not being found before refusing to boot. I was pretty baffled by this point, because from XP I could see that the files that Vista was complaining were missing were right there where they were supposed to be. To fix Vista, I had to boot from the install CD and use the automated recovery tool, but then when I started Vista, my drive letters were all wrong. Now I could see which partitions matched which drive letters, but windows wouldn’t let me change them because they were for the system drive. After a good two hours of trawling through technet, I eventually found a solution:

1. Go to the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
2. Find the drive letter you want to change to (new). Look for "\DosDevices\C:".
3. Rename it to an unused drive letter "\DosDevices\Z:".
This frees up drive letter C.
4. Find the drive letter you want changed. Look for "\DosDevices\D:".
5. Rename it to the appropriate (new) drive letter "\DosDevices\C:".
6. Click the value for \DosDevices\Z:, click Rename, and then name it back to "\DosDevices\D:".

MS KB article

Jan
2
2007

MechanoBugs



Posted in Technology

MechanoBug
Each bug is a real bug, with it's carbon guts removed, and metal/silicon guts put in their place by artist Mike Libby. “He spent his youth developing a keen understanding of the material world looking under rocks, dismantling appliances and practicing alchemy with ingredients found under the kitchen sink.”

Insect Labs [Via: HackedGadgets]

Oct
6
2006

Pacman on Excel



Posted in Internet and Technology

Pacman

All actions are expressed by rewriting of a cell background color. Each one of cells as a dot, and move it by make cell's background color high-speed rewriting. Although I did not think it's possiblele, but now it's possiblele by the favor of the improvement in a performance of a personal computer. The window zoom is 10%, so the each cell can not be seen. But it is A CELL.”

Even works on Excel 2007, and there's a version of space invaders available aswell.

Download [Via: SchrankMonster]

Sep
26
2006

Sony Hyperdragging Desktop



Posted in Technology

Sony's Hyperdragging desktop lets you drag things off your monitor and onto a table. I can't really see where you'd use it, but it's a nice gimmick.

Digg link [Via: HackedGadgets]

Sep
13
2006

1980 vs. 2004



Posted in Technology

1980-2004
Starwars.com hat eine Sammlung von Bildern, die die unterschiede zwischen The Empire Strikes Back (1980) und The Empire Strikes Back (2004) zeigt. Die meisten der Szenen sind kaum verbessert, aber es gibt manche, die ganz anders sind.

StarWars.com

Sep
13
2006

1980 vs. 2004



Posted in Technology

1980-2004
Starwars.com has a gallery of the differences between the 1980s version of The Empire Strikes Back and thr 2004 version. Most are just subtle touchups, but there's the occasional total remake.

StarWars.com

Sep
12
2006

8GB iPod Nano available



Posted in Latest news and Technology

2nd generation iPod Nanos

Apple have announced the latest versions of the iPod, Nano and Shuffle. The news shuffle looks great, but they still haven't learnt their lesson with the Shuffle.

Nano5G iPod:

  • 60% brighter screen.
  • Gapless playback.
  • New earphones.
  • New quick scrolling feature using letters.
  • Games added - Bejewled, Cubis 2, Mahjong, Mini golf, Pac Man, Tetris, Texas Hold Em, Vortex and Zuma.v (Available from iTMS for $4.99
  • 30GB - £189
  • 80GB - £259

NanoSecond-generation iPod nano (Advert below):

  • Aluminum, thinner - looks like thin iPod mini.
  • Green, silver, black, blue, pink available.
  • 24 hour battery life.
  • New charger, armband, lanyard headphones.
  • 2GB - £99
  • 4GB - £129
  • 8GB - £169

Apple also gave us a peak into their secret laboratory, to showcase a future media device. Apple will releasing a wireless box for the TV, tenatively called iTV.

  • Box is like 1/2 the size of Mac mini.
  • USB, ethernet, 802.11 wireless, component video, optical audio, HDMI ports.
  • Works with Apple Remote.
  • Interface is like next-generation Front Row software.
  • Hi-res artwork, movie text.
  • Video access is instantaneous.
  • Looks like watching a DVD.
  • Same videos play on iTunes, iPod and TV now.
  • iTV works with iTunes on PC or Mac - available Q1 2007
  • $299

Via: UneasySilence
Read more »

Sep
3
2006

The Great Ball Contraption



Posted in Technology and Weird

Wer dieses gerät hergestellt hat, hat viel zu viel zeit zu verschwinden, und muss aufhören mit Lego zu spielen und eine Freundin suchen.

Great Ball Contraption

Link 1
Link 2
Link 3
Durch: HackedGadgets

Sep
3
2006

The Great Ball Contraption



Posted in Technology and Weird

Whoever made this has way too much time on their hands and needs to stop playing with lego and get a girlfriend.

Great Ball Contraption

Link 1
Link 2
Link 3
Via: HackedGadgets

Aug
28
2006

42-string Guitar to intimidate Jimmy Page



Posted in Technology

Uberguitar

Double neck guitars are old hat, so make way for the Pikasso, a 42-sting guitar that was borne out of a challenge to make a guitar with “as many strings as possible.” The guitar has four necks and two sound holes. The Pikasso took two years and over a thousand man hours to build.

Product page [Via: Gizmodo]

Aug
16
2006

AjaxOS



Posted in Technology

There was a demo a few months ago of an online OS which ran from your browser. AjaxOS is a similar project, but much more developed. AjaxOS offers:

  • Automatic launch of AJAX software when clicking on a supported filetype.
  • Ability to save files to virtual storage.
  • Ability to navigate through a file browser to the files uploaded to virtual storage as well those on your local computer.

Read More

Aug
14
2006

Make your own keyboard



Posted in Technology

Leet keyboardYou can convert a standard MS keyboard to a Minority Report style touch pad by removing the outer case.

There are 3 plastic layers. Two, on top and bottom, have the contacts that touch each other to form a keypress. The middle one has holes where the keys were, so if you leave the keyboard flat, the contacts are a quarter of a millimeter away from each other, held there by the middle layer. However, press any spot, and the contacts touch, the equivalent of a keypress.

More pics: Flickr [Via: HackedGadgets]


5 Pages«12345»