When to use the different log levels

I generally subscribe to the following convention: Trace – Only when I would be “tracing” the code and trying to find one part of a function specifically. Debug – Information that is diagnostically helpful to people more than just developers (IT, sysadmins, etc.). Info – Generally useful information to log (service start/stop, configuration assumptions, etc). … Read more

When should I use double or single quotes in JavaScript?

The most likely reason for use of single vs. double in different libraries is programmer preference and/or API consistency. Other than being consistent, use whichever best suits the string. Using the other type of quote as a literal: alert(‘Say “Hello”‘); alert(“Say ‘Hello'”); This can get complicated: alert(“It’s \”game\” time.”); alert(‘It\’s “game” time.’); Another option, new … Read more

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