How to find the height of a triangle in JavaScript if you only have the 3 vertexes/points of the triangle. Assuming that XY are the top of your triangle, and X1Y1, X2Y2 are the other two points, you can find the height of the triangle using Pythagorean theorem. This method works for Isosceles or Equilateral […]

Tagged:

I was reading 2600 on the bus recently and came across a credit generation algorithms which got me thinking… if you are building a web application that charges credit cards, at which point would card validation make most sense? I came to the conclusion that an efficient system, would check the credit card number was […]

Tagged:

Today, keyboard navigation went live on the new jQuery documentation site: api.jquery.com. Rick worked really hard on getting the interaction just right, and we think this makes using the documentation a faster and easier experience . We hope that this feature improves developers’ interaction with the documentation. We recently had the opportunity to work with […]

Tagged:

After a recent foreign top level domain registration binge aimed at some fun domain hacks, I got sick of spending money on foreign  TLDs, and started getting creative with subdomain hacks. TLD hacks are fun, but feel a little less natural to me, and certainly don’t tend to read as well; my eyes tend to stop at […]

Tagged:

Ever wonder how many files or lines of code are sitting in your project? Hop on the command line and run the following find commands in your bash Find the number of files in the current directory (runs recursively down into all subdirectories): find . | wc -l Find how many lines of code are […]

Tagged:

The path to httpd on redhat 9 is /etc/init.d/httpd You can run the following commands on it: /etc/init.d/httpd configtest /etc/init.d/httpd graceful /etc/init.d/httpd restart /etc/init.d/httpd stop /etc/init.d/httpd start I always run configtest before restarting to make sure I haven’t messed anything up.

Tagged:

As a follow up to my previous post regarding Javascript Web Workers, I’m pleased to announce the release of PollenJS, the first worker-specific javascript library: PollenJS on github PollenJS offers the following: Utility Methods fn trim each to_array in_array clone last unique merge filter map keys values isArr isFn isStr isNum isUndef isNull extend JSON […]

Tagged:

Yesterday, I was introduced to Javascript Web Workers during a bad-ass FireBug console hack-session with Al MacDonald (http://hyper-metrix.com). I have to say… this is the coolest thing I’ve seen in a very long time… Workers are currently available in FireFox 3.5, Safari 4 and (according to John Resig) the Chromium Nightlies. I’d like to consider […]

Tagged: