Skip to main content

Posts

Showing posts from April, 2011

Randy Pausch Last Lecture

Convert Number To Words in SQL Sever

Ref: http://www.novicksoftware.com/udfofweek/Vol2/T-SQL-UDF-Vol-2-Num-9-udf_Num_ToWords.htm SET QUOTED_IDENTIFIER ON SET ANSI_NULLS ON SET NOCOUNT ON GO CREATE FUNCTION dbo.NumToWords ( @Number Numeric (38, 0) -- Input number with as many as 18 digits ) RETURNS VARCHAR(8000) AS BEGIN DECLARE @inputNumber VARCHAR(38) DECLARE @NumbersTable TABLE (number CHAR(2), word VARCHAR(10)) DECLARE @outputString VARCHAR(8000) DECLARE @length INT DECLARE @counter INT DECLARE @loops INT DECLARE @position INT DECLARE @chunk CHAR(3) -- for chunks of 3 numbers DECLARE @tensones CHAR(2) DECLARE @hundreds CHAR(1) DECLARE @tens CHAR(1) DECLARE @ones CHAR(1) IF @Number = 0 Return 'Zero' -- initialize the variables SELECT @inputNumber = CONVERT(varchar(38), @Number) , @outputString = '' , @counter = 1 SELECT @length = LEN(@inputNumber) , @position = LEN(@inputNumber) - 2 , @loops = LEN(@inputNumber)/3 -- make sure there is an ext

122nd Birthday Charlie Chaplin

5 Rupees - Short film tamil

Visual Studio shortcut keys

http://www.dofactory.com/ShortCutKeys/ShortCutKeys.aspx 1. CTRL + ".": This is actually a shortcut for a shortcut. it is the same as CTRL + SHIFT + F10 which opens the smart tag window and allows you to add Using statements 2. CTRL + "k" + "f" and CRTL + "k" + "d": these two will format the code in the window to be nicely indented. using "d" will format all the document while using "f" will format only selected text. The formatting is for all types of documents, HTML, Xaml, XML, C#… This one is my favorite. 3. SHIFT + Del: This one will cut the entire row from the document and past it to the clipboard. No need to select the row, just put the marker there and click SHIFT + Del and it is gone. 4. CTRL + "k" + "c" and CTRL + "k" + "u": These two are for commenting selected text (the "c" options) and uncommenting selected text (the "u" option). 5. ALT