Adding and Removing classes for a DOM node without JQuery

Now one may ask why do one need to add/remove classes from DOM nodes, and why not do it the easy way with JQuery. The answer to the first part of (why add/remove the classes from DOM nodes), the primary reason is to modify the behavior of the DOM node on the fly. For example, […]

Singleton websocket publisher with Autobahn pubsub & Crossbar.io Meta events

In the bigdata analytics architectures centered around Hadoop ecosystem, Zookeeper plays an important role of coordinating the resources and resource ownership. For example, in a distributed cluster with multiple nodes serving the same resource, you can implement fault-tolerance by selecting a dormant node as active resource-owner whenever the active node goes down. How do you […]

How to use Handlebars.precompile API in Javascript

There are many resources on the internet that explain how to compile Handlebars templates on the fly in Javascript, but not much explanation can be found on how to use Handlebars precompile through API (and not through CLI command-line interface). Below is the right way of doing it. Assuming you have your Handlebars template as […]

C/C++ interoperability with other languages

C is close to the heart of many system programmers, and then there is this object oriented variant of it, namely C++, which once again has proven its worth in building large scale systems. Now with the emergence of plethora of languages out there (some of those even making the white-space as a valid token […]

Prevent Form Submission when Pressing Enter Key in Meteor Templates

Form layout is nice and if you are using Meteor Templates with forms to collect some data just for internal processing, then the chances are your forms may be come with unwanted submit behaviors for Enter key presses. For example, consider this below template: <template name=”InputForm”> <form id=”URIForm” class=”form-horizontal”> <div class=”form-group”> <label class=”col-md-2 control-label” for=”esURI”>URL</label> […]