Skip to main content


Showing posts from January, 2014

Starhub TV Free Preview for Chinese New Year 2014

Starhub is offering 30 FREE TV channels this Lunar New Year from 30 Jan, 12pm to 3 Feb, 3pm.

And if you are on the move, download StarHub TV Anywhere App which is available on both Android and iOS.

Isaac Asimov’s Three Laws

The Three Laws of Robotics (often shortened to The Three Laws or Three Laws) are a set of rules devised by the science fiction author Isaac Asimov. The rules were introduced in his 1942 short story "Runaround", although they had been foreshadowed in a few earlier stories. The Three Laws are:

A robot may not injure a human being or, through inaction, allow a human being to come to harm.A robot must obey the orders given to it by human beings, except where such orders would conflict with the First Law.A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.
» Three Laws of Robotics | Wikipedia

Share Your Android Screen to PC or Laptop

I came across this BBQScreen app few months back and I thought it worth a mention to blog it. With BBQScreen, it is possible to share your Android screen right onto your PC or laptop. What you need to do is to install the app on your Android and also on your PC or laptop. BBQScreen support Windows, Linux and Mac OS. What's most important is that it is absolutely free of charge!

15 jQuery Tips and Tricks to Increase Performance

jQuery has been widely used in several websites to make use of available libraries. Though the API itself is already optimised, it is still possible to enhance its performance.

Here are 15 tips and tricks by the Web Revisions.
Always Use the Latest jQuery VersionAlways load CDN-hosted copy of jQueryAlways use ID as Selector Instead of Classes or NameAlways Cache jQuery Objects before useAlways use Tags Before ClassesUse ChainingJust give your Selectors a ContextStoring DataPreloading imagesTry to make code simpler using group queriesjQuery Lazy LoadingAlways Return FalseUse join() for Longer StringsTry to avoid DOM ManipulationCheck if an Element Exists

Typography: Care about how sentences are looked, read and understood

Do you care about words and how they look, read, and are understood? 24 Ways mentioned the need to manicure the right rag. There are 5 possible violations that we should be mindful of.

Violation 1. Never break a line immediately following a preposition
Solution 1: Are there any prepositions in the text? If so, add a   after them.

Violation 2. Never break a line immediately following a dash
Solution 2: Are there any dashes? If so, add a   after them.

Violation 3. No small words at the end of a line
Solution 3: Are there any words of fewer than three characters that you haven't already added spaces to? If so, add a   after them.

Violation 4. Hyphenation
Solution 4: Are there any emphasised groups of words either two or three words long? If so, add a   in between them.

Violation 5. Don't break emphasised phrases of three or fewer words
Solution 5: Are there emphasised phrases of three or fewer words? If so, try not to break the line among them.…

How to defer loading of javascript efficiently using the Google way?

If there is a piece of code that is intended to be loaded after a webpage finishes loading, one efficient method as recommended by Google is to use listeners. An article on feedthebot illustrates the Google's method. The following code should be placed in your HTML just before the </body> tag. Also, all code blocks supposed to be delayed are to be placed in an external js file (defer.js in this case).

<script type="text/javascript"> function downloadJSAtOnload() { var element = document.createElement("script"); element.src = "defer.js"; document.body.appendChild(element); } if (window.addEventListener) window.addEventListener("load", downloadJSAtOnload, false); else if (window.attachEvent) window.attachEvent("onload", downloadJSAtOnload); else window.onload = downloadJSAtOnload; </script>