Tom's Blog

New features of node.js express 4.0

Express is a minimal and flexible Node.js web application framework, providing a robust set of features for building single and multi-page, and hybrid web applications. On 9th April 2014, new version 4.0 of Express web application framework has been released. There are some significant changes which you should be aware of before switching to the latest version.

Checksum calculation in Node.js

In this post, I am sharing an easy way of generating a checksum of arbitrary text or content of a file in Node.js. The checksum (aka hash sum) calculation is a one-way process of mapping an extensive data set of variable length (e.g., message, file), to a smaller data set of a fixed length (hash). The length depends on a hashing algorithm.

Automatic semicolon insertion in JavaScript

In this post, I am sharing a potential issue related to automatic semicolon insertion in JavaScript. Not that long ago I was helping one of my colleagues to investigate an issue where a method was always returning undefined value even though a literal object was used as a return value.

Basic authentication with jQuery AJAX

There are two ways of adding Basic Authentication to jQuery Ajax calls. You can use beforeSend in jQuery callback to add an HTTP header with the authentication details, e.g.: beforeSend: function (xhr) { xhr.setRequestHeader ("Authorization", "Basic XXXXXX"); }

JavaScript slice, substr and substring

JavaScript has three methods to perform substring operations: string.substr(start [, length]) string.substring(start [, end]) string.slice(start [, end]) Having three different methods of doing “very similar” things might be very confusing especially for people starting with JavaScript. I created this post to show some similarities and differences between those methods.

Windows Azure fault and upgrade domains

Windows Azure introduced concepts of fault and upgrade domains. Fault domains are related to the physical deployment of the roles whereas upgrade domains are related to the logical deployment of the roles.

Public IP of Windows Azure with Powershell

Windows Azure Cloud Service application can be accessed via either site URL or public virtual IP (VIP) address. Windows Azure IP Address Access The site URL is compose from either service name (for production deployment) or deployment id (for staging deployment) and domain name.