Skip to main content

Posts

Grunt - A command line JavaScript task runner.

Grunt is a JavaScript task runner that will help you to mini-fy the various JS files. It will make your work really less while performing repetitive tasks like minification, compilation, unit testing, linting, etc with just few lines of code you need to write in command prompt. Grunt is a task-based command line build tool for JavaScript projects. If you have a Javascript and html based project that used MVVM model and you have millions of lines of code to minimize then grunt is the key for you. Some of the p lugins Grunt can enjoy. Some of the big IT companies that uses grunt.. and Below is the starter guide provided by grunt official website to keep you jump started. have fun in grunting.  Getting started: Grunt and Grunt plugins are installed and managed via  npm , the  Node.js  package manager. Grunt 0.4.x requires Node.js version  >= 0.8.0 . Installing the CLI In order to get started, you'll want to in...

Tips to increase your Transact-SQL efficiency Part 2

First Part :  http://www.developerscloud.org/2013/09/tips-to-increase-your-transact-sql.html 11. Use 'BETWEEN' operator instead of >= and <= operators to select data in range. 12. Wisely use the EXISTS, IN clauses in sub query select statement. - IN has the slowest performance as data is filtered between the range. - IN is efficient when most of the filter criteria is in the sub-query. - EXISTS is efficient when most of the filter criteria is in the main query. 13. Avoid 'NOT IN' in select clause. Because when we use “NOT IN” in SQL queries, the query optimizer uses 'Nested table scan' technique  to perform the activity 14. Use Stored Procedure, functions(UDF) and views instead of heavy-duty queries. - The application must first convert the binary value into a character string (which doubles its size, thus increasing network traffic and taking more time) before it can be sent to the server. And when the  server receives the charac...

Tips to increase your Transact-SQL efficiency Part 1.

Given below are little known tips that you can use to ensure your Transact-SQL queries are performing in the  most efficient manner possible. 1. Avoid '*' in select query.      Restrict the queries result set by returning only the particular columns from the table and not all the  table's columns. The sql query becomes faster if you use the actual column names in SELECT  statement instead of than '*'. 2. Avoid COUNT(*) in select statement to check the existence of records in table.       Instead use IF EXISTS() to check records. - Write the query as: IF EXISTS (SELECT * FROM table_name WHERE column_name = ‘xxx’) - Instead of : SELECT COUNT(*) FROM table_name WHERE column_name = ‘xxx’ 3. Use alternate of SELECT COUNT(*).      Use an alternative way instead of the SELECT COUNT(*) statement to count the number     of records in  table.         - SELECT CO...

Importing the Excel into the Database (SQL).

We can import the excel into the Database by using the following query. Suppose we have a table named as Address_Temp and it has three column. 1. Name 2. State 3. Zip Here we need to update the zip code with the new value and to update that zip code we need to check the excel. So we can use that excel in our sql server by importing it using the following command. Its very easy query but make sure that it won't work in following two scenarios. 1. The file need to be in local machine. 2. The file should not be password protected. Declare @ ZipTemp NVarchar ( 255 ) set @ ZipTemp = ( SELECT * FROM OPENROWSET ( 'Microsoft.Jet.OLEDB.4.0' , 'Excel 8.0;Database=C:\Addresses.xls;IMEX=1' , 'SELECT top 1 ZIP FROM [Sheet1$] where ZIP = "328301"' ))

Simple Pyramid in Csharp .Net

    *   ***  ***** ******* Updated  As you can see below the code for simple pyramid has two for loop nested in each other. So for each row it enter, it increment the counter and draw the star against forming a pyramid like figure. You can use  different special counter, play with the loop and enjoy the coding. Simple Pyramid in Csharp    class Program     {          static void Main( string [] args)         {             int row, col = 0, n = 5;                                 for (row = 0; row <= n; row++)             {           ...

Rise, Fall and Struggle of Microsoft .Net [Article]

Some years ago there was a guy named Vinod Khosla from IIT- Delhi and Stanford. This awesome guy co-founded Sun Microsystem. Sun Microsystem as we all know is fully undertaken by Oracle. But Sun Microsystem came up with a fantastic language called Java. This language was becoming too famous and popular since its birth and by 90's its JAVA, JAVA and only JAVA everywhere. Microsoft who was struggling with the PC market at that time want's to capture the opportunity and Microsoft was building everything like the OS  and Office and Java was taking the credit of so called windows application so then MICROSOFT plans to launch its own language. Yes, so think back a decade or so ago. As you may recall, .Net was supposed to be much more than just the next version of Windows DNA or COM+ or COM. It was supposed to destroy Java, extend the Windows platform, and secure the Microsoft monopoly for another decade or two. But then what happened after the DOT COM BUBBLE. Rise Like m...

Send a Fax in windows using faxcomexlib and TAPI in VB code .Net

An application that provides sending fax from faxmodem, connected to the computer, will be explained in the following post.  We can use Telephony Application Programming Interface (TAPI) and the Fax Service Extended Component Object Model (COM) API to send fax. The fax service is a Telephony Application Programming Interface (TAPI)-compliant system service that allows users on a network to send and receive faxes from their desktop applications. The service is available on computers that are running Windows 2000 and later. The fax service provides the following features: Transmitting faxes Receiving faxes Flexible routing of inbound faxes Outbound routing Outgoing fax priorities Archiving sent and received faxes Server and device configuration management Client use of server devices for sending and receiving faxes Event logging Activity logging Delivery receipts Security permissions The following Microsoft Visual Basic code example sends a fax. Note that...