Why is it that parseInt(8,3) == NaN and parseInt(16,3) == 1?

This is something people trip over all the time, even when they know about it. 🙂 You’re seeing this for the same reason parseInt(“1abc”) returns 1: parseInt stops at the first invalid character and returns whatever it has at that point. If there are no valid characters to parse, it returns NaN. parseInt(8, 3) means … Read more

JSLint says “missing radix parameter”

It always a good practice to pass radix with parseInt – parseInt(string, radix) For decimal – parseInt(id.substring(id.length – 1), 10) If the radix parameter is omitted, JavaScript assumes the following: If the string begins with “0x”, the radix is 16 (hexadecimal) If the string begins with “0”, the radix is 8 (octal). This feature is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)