HNHacker News
TopNewBestAskShowJobs

jamestnz

583 karma · joined September 14, 2012

submissionscomments
jamestnz··on Xerox to update scan software after switched number outcry
Original report: http://www.dkriesel.com/en/blog/2013/0802_xerox-workcentres_...?

Original HN discussion: https://news.ycombinator.com/item?id=6156238

jamestnz··on Dropbox Uploader: Bash script to upload, download, list, delete from Dropbox
Looks useful! And in regards to GP's specific request "...and then puts a link directly to the file on your clipboard", on the Mac at least you could do so like this:

$ wsend README.md | pbcopy

I mention it because I've found that many Mac users, including some fairly Terminal-savvy folks, are unaware of the pbcopy and pbpaste tools for manipulating the clipboard.

jamestnz··on Zynga to Lay Off 520 Employees and shutter NY and LA Offices
It is typical to briefly halt trading in a stock, if a company makes an announcement (or undergoes an unexpected external event) likely to have a non-trivial effect on its stock price. This is to allow time for significant news to disseminate into the marketplace. For this reason, you will frequently see companies make major announcements outside of trading hours.
jamestnz··on Why my startup failed
As an off-topic aside, it's worth noting that not all parts of the industry are so backwards in regards to bottle-sealing technology http://www.screwcapinitiative.com/ [edit: beware somewhat spammy industry-association link]

For instance, pretty much all New Zealand wine producers/exporters have been using screw-caps, even on expensive fine wines, since 2001.

jamestnz··on Be careful with JS numbers
This is not the only area in JS where it pays to be careful with numbers.

For example, the parseInt function mentioned in the article actually does magic base determination. Your string will be parsed into a base-10 number, unless it begins with '0x' in which case base-16 is used, or if it begins with a leading '0' then it is treated as base-8.

This last case has stung me on several occasions when parsing user input into numbers: User puts a leading-zero, and you magically end up with octal conversions. (I believe this whole octal thing has been deprecated in recent JS implementations).

In any case it's sensible to specify the 'radix' whenever using the parseInt function, as in parseInt(numberString, 10);

← PreviousPage 5 of 5