Click here to Skip to main content
15,909,896 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Someone down-voting my answers counterfeit.. Pin
OriginalGriff15-Sep-14 22:57
mveOriginalGriff15-Sep-14 22:57 
GeneralRe: Someone down-voting my answers counterfeit.. Pin
Bergholt Stuttley Johnson15-Sep-14 23:00
professionalBergholt Stuttley Johnson15-Sep-14 23:00 
GeneralRe: Someone down-voting my answers counterfeit.. Pin
Thanks787215-Sep-14 23:37
professionalThanks787215-Sep-14 23:37 
GeneralRe: Someone down-voting my answers counterfeit.. Pin
BillWoodruff15-Sep-14 23:52
professionalBillWoodruff15-Sep-14 23:52 
GeneralRe: Someone down-voting my answers counterfeit.. Pin
Roger Wright16-Sep-14 11:25
professionalRoger Wright16-Sep-14 11:25 
AnswerRe: Someone down-voting my answers counterfeit.. Pin
RedDk16-Sep-14 7:40
RedDk16-Sep-14 7:40 
AnswerRe: Someone down-voting my answers counterfeit.. Pin
Awadhendra Tripathi16-Sep-14 21:45
professionalAwadhendra Tripathi16-Sep-14 21:45 
GeneralObserve and learn Pin
virang_2115-Sep-14 17:58
virang_2115-Sep-14 17:58 
I am no guru in Javascript but I do know that I can use parseInt to convert textbox value to int. So I used it in one of the application I am working on that detects robot number and take action accordingly. We have 25 robots and application works fine with all of them except no 8 and 9. The textbox was displaying robot number as 01,02,03,...25. When robot no 8 turn up at the launch pad application simply did not fire any function it suppose to. My first thought was it must be something to do with number less then 10 but it was working fine with robots 1 to 7 so next I put a debugger on to see what is going on and watch parseInt convert 08 and 09 to 0. In Javascript parseInt consider strings starting with 0 as base 8 and that was the culprit.

JavaScript
parseInt("01") returns 1
parseInt("02") returns 2
parseInt("03") returns 3
parseInt("04") returns 4
parseInt("05") returns 5
parseInt("06") returns 6
parseInt("07") returns 7
parseInt("08") returns 0
parseInt("09") returns 0


Lesson learned : use parseInt(textvalue,base) function
Zen and the art of software maintenance : rm -rf *

Math is like love : a simple idea but it can get complicated.

GeneralRe: Observe and learn Pin
Agent__00715-Sep-14 19:00
professionalAgent__00715-Sep-14 19:00 
GeneralRe: Observe and learn Pin
harold aptroot15-Sep-14 19:06
harold aptroot15-Sep-14 19:06 
GeneralRe: Observe and learn Pin
Kornfeld Eliyahu Peter15-Sep-14 19:28
professionalKornfeld Eliyahu Peter15-Sep-14 19:28 
GeneralTwo point five billion reasons for PooperPig to get finished Pin
_Maxxx_15-Sep-14 17:52
professional_Maxxx_15-Sep-14 17:52 
JokeRe: Two point five billion reasons for PooperPig to get finished Pin
ZurdoDev16-Sep-14 1:17
professionalZurdoDev16-Sep-14 1:17 
GeneralRe: Two point five billion reasons for PooperPig to get finished Pin
Slacker00716-Sep-14 5:56
professionalSlacker00716-Sep-14 5:56 
GeneralRe: Two point five billion reasons for PooperPig to get finished Pin
Roger Wright16-Sep-14 11:27
professionalRoger Wright16-Sep-14 11:27 
GeneralRe: Two point five billion reasons for PooperPig to get finished Pin
_Maxxx_16-Sep-14 12:10
professional_Maxxx_16-Sep-14 12:10 
GeneralPlaying Doom on printer Pin
Robert Vandenberg Huang15-Sep-14 13:20
professionalRobert Vandenberg Huang15-Sep-14 13:20 
GeneralRe: Playing Doom on printer Pin
PIEBALDconsult15-Sep-14 13:53
mvePIEBALDconsult15-Sep-14 13:53 
GeneralRe: Playing Doom on printer Pin
Mark_Wallace15-Sep-14 17:49
Mark_Wallace15-Sep-14 17:49 
GeneralRe: Playing Doom on printer Pin
Kent Sharkey15-Sep-14 18:06
staffKent Sharkey15-Sep-14 18:06 
GeneralRe: Playing Doom on printer Pin
Mark_Wallace15-Sep-14 17:53
Mark_Wallace15-Sep-14 17:53 
GeneralRe: Playing Doom on printer Pin
Nagy Vilmos15-Sep-14 22:26
professionalNagy Vilmos15-Sep-14 22:26 
GeneralRIP Angus Lennie Pin
Dalek Dave15-Sep-14 10:57
professionalDalek Dave15-Sep-14 10:57 
GeneralRe: RIP Angus Lennie Pin
  Forogar  15-Sep-14 11:22
professional  Forogar  15-Sep-14 11:22 
GeneralRe: RIP Angus Lennie Pin
Slacker00715-Sep-14 13:59
professionalSlacker00715-Sep-14 13:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.