Author Archives: aidvu

Scratch Exercise

Since I’m teaching “Introduction to programming”  with Scratch, I’m going to make a new page called Lectures, and put the exercise we do in class there. I might upload some algorithm schemes with the exercises if I find the free time.

Tagged , ,

How to S-OFF and Root your HTC

Once you flash a ROM.. you can’t stop until you find a good one.. and of course root your phone and turn the security lock off. Specially if you are an open source person. Nothing helps you better than a console and a su command! So here’s the adventure of unlocking my HTC Desire (the same can be done on any of the listed phones):

  • HTC Desire (bravo) 0.93.0001, 1.02.0001
  • HTC Desire CDMA (bravoc) 1.06.0000
  • HTC Wildfire (buzz) 1.01.0001
  • HTC Aria (liberty) 1.02.0000
  • HTC Incredible S (vivo) 1.09.0000 and 1.13.0000
  • HTC Droid Incredible 2 (vivow) 0.97.0000 (Gingerbread only!)
  • HTC Desire S (saga) 0.98.0000 and 0.98.0002
  • HTC View (express) 1.09.0000 and 1.13.0000
  • HTC Flyer (flyer) 1.10.0000, 1.11.0003
  • HTC Sensation (pyramid) 1.17.0006, .0008, .0011 and .0012, 1.18.0000
  • HTC Evo 3D (shooter) 1.30.0000 and 1.40.0000
  • HTC EVO 3D GSM (shooteru) 1.49.0007, 1.49.0008
  • HTC Thunderbolt (mecha) 1.04.0000, 1.05.0000
  • HTC EVO 4G (supersonic) 2.15.0001, 2.16.0001
  • HTC myTouch Slide 4G (doubleshot) 1.44.0007

Just for the info, the first is the official name, in the brackets is the codename and the numbers after are the versions of HBOOT supported, which you can see by booting the phone in HTC fastboot mode. On HTC Desire it is done by holding the Volume down key while powering the phone.

Continue reading

Tagged , , , , ,

HTC Desire Android 2.3 Upgrade

Busy, busy… last 2 months. No time for writing. Schedule loosened. Figured HTC Desire has Android 2.2.. Decided to upgrade to 2.3. Sadly there is no automated upgrade process. Givin’ it a shot.

Continue reading

Tagged , , , ,

Generate QR Code for URLs using Google API

Since I want to implement QR codes into the URL shortener, I wrote a function in PHP that generates the link usin’ Google API.

 


/**
 * Class for QR Codes 
 *
 */
class QR {
	/**
	 * Function returns URL to Google API QR Generated image
	 * 
	 * @param url - The URL to be turned to QR Code
	 * @param size - Size of the QR image
	 * @param errorCorrection - Amount of reduntant information the QR code has (L - default, M, Q, H)
	 * @return Google API QR Generated image (to be used directly in img tag)
	 */
	public static function getQRforURL($url, $size, $errorCorrection = "L") {
		$link = "https://chart.googleapis.com/chart?" . 
				"cht=qr" . "&" .
				"chs=$size" . "x$size" . "&" .
				"chl=" . urlencode($url) . "&" .
				"choe=UTF-8" . "&" .
				"chld=$errorCorrection";
		return $link;
	}
}

Tagged , ,

How to make an URL Shortener (with code in PHP and MySQL database)


Considering the number of URL Shortening services, I decided to make a short review of the subject. URL Shorteners were made popular by micro-blog services which used limited number of characters for a message e.g. Twitter.

So, here’s what’s covered:

 
Update (2011-07-29):
Reorganized code. It’s now divided into classes, easier for understanding and reuse. Using PDO for database connection instead of mysql methods. Added QR Code for generated shortlinks. This tutorial won’t change anymore, since it’s on the basic level it needs to be. For more information, you can follow the URL Shortening project I started, named BooRL.

Continue reading

Tagged , , ,