Saturday, April 9, 2016

Getting started with Node.js

What is Node.js?

Node.js is a buzzword in the software development industry and it has become a trend to develop enterprise level applications using Node. Some of the big companies are already converting their applications to Node. This seems to be good point to start to look in to Node.js.
This is an Open Source JavaScript runtime environment for developing server-side networking applications using JavaScript developed by Ryan Dahl in 2009. This uses Google Chrome V8 JavaScript Engine as Interpreter and libuv as the abstraction layer. Core libraries in Node.js itself are written in JavaScript. There is huge number of Packages available to use in Node.js with Node Package Manager (NPM). Node.js is cross platform, which can be deployed on Windows, Linux and OS X.

Sunday, January 12, 2014

How to simulate WAN (Wide Area Network) in LAN (Local Area Network)



Anyone ever needed to test the web application on a low bandwidth WAN link? But u can’t afford create a link using actual routers and other networking equipment.  I came across such situation where, a web application works fine within the development environment which is a LAN. But when application is deployed in the actual environment which is a WAN with low bandwidths like 128Kbps it becomes very slow to response. My solution was WINEM.

Saturday, July 20, 2013

Oracle Trigger to Log column level changes of Table

The requirement was to log changes to columns on any table to a common table. The information to be recorded was Table Name, Column Name, Action (Deletion, Insertion, and Modification), Old Value, New Value, Modified User, Modified Time and Modified PC.
The solution I came up with is to create the triggers on table using a script that trigger that fires on Update Delete and Insert. This trigger sends the information to a function that checks for changes. In the function if there are changes it will be logged to the Audit table. When calling the function I checked for the ‘Action’ and according to that change the information send to it.

Saturday, July 13, 2013

How to prevent user from double clicking button on a web application

I faced with situations where users click a button on a web application, and before the request was processed and response comes to the client user clicks again. This may produce inconsistent and unexpected results. A calculation will be performed twice or an entry is posted twice.
In order to prevent this I used was disabling the button until the response using java script.

Tuesday, December 25, 2012

Merry Christmas

Wish you all Peaceful & Joyful Christmas !!!

Sunday, December 9, 2012

How to Insert Data in Text file to SQL Database



Problem:
Insert large amount of data in text file to a SQL database table with minimum time.
 
Solution:
Using ‘Bulk Insert’ is the solution.

I had to import large amount of data in text file to SQL database. If I programmatically insert this data, it would take more time and memory. Therefore, I use SQL bulk insert to import this data. If the fields in the data files are separated using a special character (comma – ‘,’) they can be directly insert in to columns in the database with one query. In addition, it can be fields are not separated, but have known lengths. Then you have to substring them according to lengths.

Monday, June 4, 2012

How to Import data in Excel sheet to SQL Express Database using AD-HOC Query

This something I got to do, Import data in Excel 2007 sheet to table in MS SQL database in SQL Express 2005. So I'm blogging it anyone who need can quickly get it done.
Here are the details you need to know:
Excel File: D:\MyTable.xls
Excel Sheet: Sheet1
SQL database: NewTestDB
Database Table: TestTable (This doesn't exist yet)