Originally posted as an answer[1] at StackOverflow, which was too long[2] and become a blog post.<p>[1]: <a href="http://stackoverflow.com/a/34828465/2751621" rel="nofollow">http://stackoverflow.com/a/34828465/2751621</a><p>[2]: <a href="http://meta.stackoverflow.com/q/316012/2751621" rel="nofollow">http://meta.stackoverflow.com/q/316012/2751621</a>