Monthly Archives: January 2012

jQuery: Simple Optimization – save jQuery selections to variables

Save selections into variables: each $() represent a query, so if you’re doing multiple actions on the same ID, save the initial $() query to a variable and then use the variable to do actions on it later. For example: … Continue reading

Posted in jQuery | Leave a comment

Book: JavaScript & jQuery The missing manual

This is an excellent book. Learning quite a bit from it. Has nice tutorials that step you through examples like a photo gallery or tooltips.

Posted in Book, HTML5 | Leave a comment

Book Review: SAMS Teach Yourself SQL

Wouldn’t use this book if I was trying to learn SQL because it’s soo basic. It’s pretty good as a refresher of basic queries. The book’s examples are way too simple. Coverage of the different types of joins aren’t great … Continue reading

Posted in Book, SQL | Leave a comment

HTML5: Slides at html5rocks

http://www.html5rocks.com The slides and tutorials here are pretty neat. One should definitely check it out. Here’s an example that I did. http://mitchellfang.com/html5/trip_meter.html Tomorrow’s goal is to be able to change the starting location using input box that takes in a … Continue reading

Posted in HTML5 | Leave a comment

Git, a VCS

Noticed that Git is the new king of VCS . Downloaded Git and installed it and going through the manual. http://progit.org/book/ch1-3.html The KEY difference with Git is that most operations are local. ¬†Operations like diff ing between previous version of … Continue reading

Posted in Git | Leave a comment

Android: AdMob integrated

Had trouble dispalying ListView and the ad on the same Layout so settled. The ad now displays when a restaurant details are selected. Looks pretty neat.

Posted in Android | Leave a comment

Android: AdMob

Setup my AdMob account and went through the basic tutorials. Wasted some time figuring out where the API key was. Aye but up and running now. Haven’t done anything with my app lately but figured I should figure out how … Continue reading

Posted in Android | Tagged , , | Leave a comment

Java: Comparator

Writing a Comparator for Integer for use with Arrays.sort: Arrays.sort(Integer[], new Comparator<Integer>() { public int compare(Integer a, Integer b) { if (function(a) != function(b)) return function(a)-function(b); } } Normal compare return values: if (a < b) return -1; if (a … Continue reading

Posted in Coding, Java | Leave a comment

TopCoder: Ceil trick

Little tricks to help on time: To round up: aka ceil(a/b) int num = a+(b-1) / b

Posted in TopCoder | Leave a comment