Upgrading to Raspberry Pi Model B+

Often my OpenELEC Raspberry Pi would get stuck at pre-boot. The culprit turned out to be a faulty SD card connector. Unclipping the connector pins (as suggested in the elaborate diagnostic wiki on eLinux.org) and soldering on an alternate low-profile SD card adapter (that I ordered from crazypi.com) fixed it.

By that time, I had already ordered the new Raspberry Pi Model B+. My first impression – this is how the original Model B should have been designed!

Continue reading “Upgrading to Raspberry Pi Model B+”

Infinite Ways to Detect Array in JavaScript

JavaScript (ECMA script in general) is a miraculous language. It allows us to prove that coding is creativity. One reason for that is the numerous ways a single objective can be coded. For instance, checking whether a variable is an Array, can be done in four different ways. And probably more!

Some months back I had come across this Quora article: What’s the best way to tell the different between an Array and other kinds of objects in JavaScript? There were already five different methods available there from Tom, John, Rick, Ken and Eric. And even I was surprised that I could add one more! I would take some time and explain all the methods with its pros and cons and finally we can conclude upon the best method.

Continue reading “Infinite Ways to Detect Array in JavaScript”