geeky · javascript

Javascript ES6 Highlights

Total credit to the ES6 quiz that you should take but I’m creating a poster version of the information shared on the quiz. I love straight forward code examples for learning. As a Java developer, these updates feel very natural. Let Introduces block scoping. Variables defined with let are available only in the nearest enclosing… Continue reading Javascript ES6 Highlights

geeky · javascript

Screen scraping census baby name data with nodeJs, cheerio(jQuery) and promises

—->My Soure Code<—- Goal Screen scrape census baby names data for the 51 states and produce a single CSV file. These data are in html table via sites such as http://www.ssa.gov/cgi-bin/namesbystate.cgi post {state: ‘AL’, year: 2012} http://www.ssa.gov/cgi-bin/namesbystate.cgi post {state: ‘AK’, year: 2012} http://www.ssa.gov/cgi-bin/namesbystate.cgi post {state: ‘CA’, year: 2012} …. Script must translate all of the… Continue reading Screen scraping census baby name data with nodeJs, cheerio(jQuery) and promises

geeky

jQuery.each vs Javascript for loop

Being a big jQuery fan, I use jQuery.each method a lot in my Javascript code. Until recently I didn’t think too hard what jQuery.each really is. Its description says it’s an iterator but it certainly is NOT a true iterator. For example: Let me know what you expect the code below to return. Before I… Continue reading jQuery.each vs Javascript for loop

geeky · non php code

QUnit – test your javascript

After over ten years of javascript programming, I’m finally seriously considering writing at least unit tests for my javascript. Since I’m such a big fan of jQuery, QUnit seems like the obvious choice. It’s sad but better late than never. The truth is, in my opinion, the fact that javascript test frameworks do not yet… Continue reading QUnit – test your javascript

geeky · non php code

Javascript Error: submit is not a function

Just my luck and I ran into the dreaded submit is not a function javascript error. Here’s the scenario. While coding javascript along, you get a form via id or name on your html page and calls the submit() function on it. You think it should just behave as expected (submits the form) instead nothing… Continue reading Javascript Error: submit is not a function

geeky · non php code

jQuery plugin – tableRowCheckboxToggle

So since I’ve been playing with jQuery on my spare time while putting together an ajax site, I’ve decided to tackle a design issue I’ve run into many times at work with jQuery. This idea originally comes from phpMyAdmin. If you’ve used that software, you know that when you click on any table row, it… Continue reading jQuery plugin – tableRowCheckboxToggle