Friday, July 27, 2012

Ultra fast HashTable (Dictionary) with direct indexing

One of the most common usages of hash tables is to count/group occurrences of different elements in it, something like this: dict[“key”]++ ...

Monday, July 23, 2012

Quick select algorithm - find the Kth element in a list in linear time

Quick select algorithm (Hoare's selection algorithm) – select the Kth element or  the first K element  from a list in linear time W...

Sunday, July 22, 2012

Optional HTML content based on screen resolution - mobiles and high resolution desktops

Displaying optional content for high resolution or mobile users on your web page The W3C Media Queries provide a great opportunity to dis...

Monday, July 9, 2012

Smooth scrolling on Google Chrome

If you ever envied Safari on Mac - or to be precise envied how smooth it's scrolling was compared to Google Chrome, it's time f...

Thursday, July 5, 2012

Faster division and modulo operation - the power of two

The power of two - fast division and modulo operations There are some - admittedly rare - cases, when the division and modulo operations ...

Sunday, July 1, 2012

Download and sync YouTube videos offline to iPad/iPhone (mp4)

First of all, let me try to highlight that if I’m downloading YouTube videos to watch offline I don’t feel I am stealing their conten...