Binary search tree
A binary search tree (BST) is a node-based tree data structure in which each node can have at most two children, it supports several operations common to any search tree such as search, insert and delete.
A binary search tree (BST) is a node-based tree data structure in which each node can have at most two children, it supports several operations common to any search tree such as search, insert and delete.
In response to Ron’s comment on the attr('id')
vs [0].id
post last week asking about the jQuery.fn.prop
’s vs jQuery.fn.attr
’s performance, I extended the program to include prop
and enabled profiling across all browsers (thanks to time.js). The program also does the tests a little more thoroughly, running 1000000 operations 5 times per each operation and averages the result.
In version 12 of Chrome they added the ability to de-obfuscate (un-minify?) the JavaScript on the sources tab by right clicking the code area. Today that feature lives on in the “pretty print” feature located at the curly brace icon on the bottom of the debugger.
So I was wondering for a while exactly what the performance difference is between the jQuery function attr('id')
and getting the native JavaScript object and grabbing the id that way was. Surely attr('id')
was slower but how much slower… I decided to write a little HTML page that tested each method by doing 1 million operations of each. In interest of being complete I added the getAttribute
and get(0).id
methods also.
www.webplatform.org was launched 5 days ago and people seem to be really keen to get it up and going.
Here’s a cool little effect that can be applied to buttons/images/etc. on hover, it slides the button down using top/bottom margins and fades the button slightly into the background. Subtle effects like this really add to a web site in my opinion.
Was bored so I thought I’d try my hand at remaking the Chrome Gmail logo in pure CSS. It uses CSS3 border-radius and rotation transform. Turned out pretty well, I’ve tested it to work in Firefox, Chrome and IE9.
I put together a CodePen demonstrating a method for creating a ‘trail’ effect using canvas. The method involves drawing a slightly transparent rectangle over the canvas every time the program loops. This creates the fading gradient effect.