TypeScript Language Features

Ts
Optional Static Typed TypeScript is a typed superset of JavaScript. However it is optional.  So to be specific , TypeScript has optional static type annotation, which will in turn transform JavaScript into a strongly typed programming language. This typing is applicable to variables, functions and properties.  The objective is to provide better verification and assistance (such as IntelliSense) during software development. Moreover Strong Typing will allow programmers to express his intentions... more →
Posted in: Programming

TypeScript Design Goals and Components

Ts
Type Script Design Goals TypeScript is designed and developed by Microsoft. Following are some of the design goals behind TypeScript Strongly Typed Programming Language As JavaScript is not strongly typed it cannot prevent potential run time errors.  A strongly typed programming language and perform static type checking at compile time can prevent these potential run time errors. High Compatibility TypeScript is highly compatible with existing JavaScript code. It is designed as a super set... more →
Posted in: Programming

How MySQL auto log can help performance related troubleshooting?

mysql
We are heavily dependent on ORM (Object Relational Mapping ) frameworks for application development. Hibernate is a popular ORM in the Java realm where as ActiveRecords in Ruby in Rails support inbuilt ORM capability.  Many times developer depends only on ORM and use it for all purposes, without trying to understand the advantages and its disadvantages, where to use  and where not to use etc. Many times developers who are addicted to ORM also believes that it is not necessary to know SQL as it... more →
Posted in: Database, Programming

MySql tables containing keyword behaving weird!!!

mysql
Here are some queries that will behave weird Consider the following table. [code] mysql> desc person; +———-+————-+——+—–+———+—————-+ | Field | Type | Null | Key | Default | Extra | +———-+————-+——+—–+———+—————-+ | id | int(11) | NO | PRI | NULL | auto_increment | | name |... more →
Posted in: Database, Programming

JavaScript: Firing alerts once per column

js
In our application there was a HTML table which is like an Excel Grid, where users can enter data. Each cell contains a textbox through which user can enter data. There are alerts and remainders which can be configured and they get fired when the focus comes to the cell. However the business wants the alert to be fired only once per column. Assume that the table contains 10 rows and 10 columns. User has set alert for all even columns – 2,4 ,6 8 and 10. So when focus comes to this fied, system... more →
Posted in: Programming

SQL Update Statement can go crazy!!!

sql-logo
We had a production issue today and to rectify it i need to update some  records in production. As I dont have access to production database , I  raised a help desk ticket with the SQL statements. I have to provide two statement which are as follows [1] Update the “active”  column value to 1 and reference id column to NULL for for ONE  payer (example payer with primary Key : 100). [2] Mark the “active” column to 0 and referenced id column to 100 (referencing payer with... more →
Posted in: Programming

Java 7 : Using String in switch statement

Java
At last java 7 started supporting String object as a parameter to switch statement. Previously it was numbers and enumerations. I am sure this will be a welcoming change to the Java community. [code] public class WeekTeller { public static void main (String [] args) { String weekCode = args[0]; switch (weekCode) { case "M": { System.out.println("Monday"); break; } case "T": { System.out.println("Tuesday"); break; } case "W": { System.out.println("Wednesday"); break; } case... more →
Posted in: Java, Programming

Node Inspector for Debugging Node.js application

NJS
Bugs are often a part of software development and as developers we often need good tools to debug and fix these bugs effeciently. Node Inspector is one of the power debugging tools available for node.js. Let us install this debugger globally so it will be available to all nodejs application in the system. [code] npm install -g node-inspector [/code] To demonstrate the usage of debugger let us create a simple Express based web application. [code]</pre> express debugeg cd debueg npm install node... more →
Posted in: Programming

Jade – The Template Engine

jade
Template Engines are widely used in web frameworks to generate HTML. Some of the popular template engines are Smarty (PHP) and ERB (Ruby). Templates are often be part of the views in MVC architecture. Express web framework module for node.js uses Jade as the template engine. It is an indentation based template engine and hierarchy of the HTML structure is based on the indentation. There is no need to write tags as it will be automatically created. Example : In the following example (–> )... more →
Posted in: Frameworks, Programming

Node.Js = { Asynchronous + Non-blocking + Events + Callbacks }

NJS
Synchronous and Asynchronous I/O Before getting into how to use Node.js let us brush up our memory about synchronous and asynchronous I/O operations To understand better consider the case of a File I/O operation in synchronous and asynchronous mode. In Synchronous mode, the thread waits for I/O to complete before proceeding further. The thread will be in a “wait” state. However in the case of asynchronous operation, the thread will not wait for I/O to finish. It will continue with the processing... more →
Posted in: Frameworks, Programming
1 2