http://ln.hixie.ch/?start=1037910467&count=1
http://ln.hixie.ch/?start=1137740632&count=1
| /** | |
| * Return a timestamp with the format "m/d/yy h:MM:ss TT" | |
| * @type {Date} | |
| */ | |
| function timeStamp() { | |
| // Create a date object with the current time | |
| var now = new Date(); | |
| // Create an array with the current month, day and time |
| function scrollDown( options ) { | |
| var settings, winHeight, elementTop; | |
| // override settings by passing in the options object | |
| settings = $.extend({ | |
| 'offset': 70, | |
| 'selector': 'footer', | |
| 'speed': 'fast' | |
| }, options); |
| /** | |
| * Get the current date and the date 30 days ago. | |
| * Then format the dates like this: M/D/YYYY. | |
| */ | |
| var diff = 2592000000; | |
| var now = new Date(); | |
| var diffDate = new Date( now.getTime() - diff ); | |
| var nowPrint = [ now.getMonth() + 1, now.getDate(), now.getFullYear() ].join("/"); | |
| var diffPrint = [ diffDate.getMonth() + 1, diffDate.getDate(), diffDate.getFullYear() ].join("/"); |
| // Jonathan's placeholder polyfill | |
| // *Requires jQuery | |
| (function () { | |
| function PlaceholderDefaults() { | |
| return { | |
| 'placeholderText': '', | |
| 'className': '' | |
| }; | |
| } |
| function isEmpty(val) { | |
| return (!/\S/.test(val)); | |
| } |
| function getDecimalLimit2(mnt) { | |
| return (Math.round(mnt * 100)) / 100; | |
| } |
| // Validation method for US currency | |
| $.validator.addMethod("currency", function (value, element) { | |
| return this.optional(element) || /^\$(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$/.test(value); | |
| }, "Please specify a valid amount"); |
| var args = process.argv.slice(2); | |
| var total = 0; | |
| for (var i = 0, len = args.length; i < len; i++) { | |
| total += Number(args[i]); | |
| } | |
| console.log(total); |