JavaScript – Nuances of myArray.forEach vs for loop

The most substantive difference between the for loop and the forEach method is that, with the former, you may break out of the loop. You can simulate continue by simply returning from the function passed to forEach, but there is no way to stop looping altogether. Aside from that, the two accomplish effectively the same … Read more

HTML embedded PDF iframe

It’s downloaded probably because there is not Adobe Reader plug-in installed. In this case, IE (it doesn’t matter which version) doesn’t know how to render it, and it’ll simply download the file (Chrome, for example, has its own embedded PDF renderer). If you want to try to detect PDF support you could: !!navigator.mimeTypes[“application/pdf”]?.enabledPlugin (now deprecated, … Read more

Dependency Walker reports IESHIMS.DLL and WER.DLL missing?

ieshims.dll is an artefact of Vista/7 where a shim DLL is used to proxy certain calls (such as CreateProcess) to handle protected mode IE, which doesn’t exist on XP, so it is unnecessary. wer.dll is related to Windows Error Reporting and again is probably unused on Windows XP which has a slightly different error reporting … Read more

ie8 var w= window.open() – “Message: Invalid argument.”

This is an old posting but maybe still useful for someone. I had the same error message. In the end the problem was an invalid name for the second argument, i.e., I had a line like: window.open(‘/somefile.html’, ‘a window title’, ‘width=300′); The problem was ‘a window title’ as it is not valid. It worked fine … Read more

Should I use single or double colon notation for pseudo-elements?

Do not use both combined with a comma. A CSS 2.1 compliant (not CSS3 capable) user agent will ignore the whole rule: When a user agent cannot parse the selector (i.e., it is not valid CSS 2.1), it must ignore the selector and the following declaration block (if any) as well. CSS 2.1 gives a … Read more

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