Archive

Archive for July, 2012

Windows 8 UX Virtual Training

July 31st, 2012 No comments

Get some training on Windows 8 app development.

URL: http://www.windowsuserexperiencetraining.com/sessions/wux-001.aspx

VN:F [1.9.18_1163]
Rating: 0.0/5 (0 votes cast)
Categories: General

Microsoft “Roslyn” CTP

July 20th, 2012 No comments

The Microsoft “Roslyn” June 2012 CTP installs as an extension to Visual Studio 2012 RC and Visual Studio 2010 SP1. “Roslyn” is a long lead project which we are considering for the post-Visual Studio 2012 timeframe. The CTP includes an early preview of the APIs exposed by the C# and Visual Basic compilers, and the C# Interactive window experience.

Download from here.

VN:F [1.9.18_1163]
Rating: 0.0/5 (0 votes cast)
Categories: C#, DOTNET, VB.NET

How to decode URLs which contains %20, %3A,%2F etc in PHP?

July 18th, 2012 No comments

Use rawurldecode() function.

rawurldecode ("http%3A%2F%2Fe%2Edigg%2Ecom%2Fa%...")
 
output will be: http://e.digg.com/a...
VN:F [1.9.18_1163]
Rating: 4.0/5 (3 votes cast)
Categories: PHP

Free e-book: Time Saving Features for Visual Studio 2012 RC (former VS11)

July 11th, 2012 No comments

Download from here.

Contents

  1. Intellisense help you discover JS and CSS features
  2. WAI Aria makes the web usable by all
  3. HTML5 and CSS3 are available out of the box
  4. WebAPI exposes data via HTTP service
  5. Strongly Typed Data Binding ensures runtime confidence
  6. Request Validation prevents yellow screens of death
  7. Page Inspector puts an end to layout headaches
VN:F [1.9.18_1163]
Rating: 0.0/5 (0 votes cast)
Categories: DOTNET, Useful Links

Display multiplication table with T-SQL: A demo of SQL WHILE loop

July 10th, 2012 No comments
DECLARE @i INT 
SET @i = 0;
 
-- Alternate syntax to club above two lines
DECLARE @j INT = 5 -- Multiplicaiton table for 5. Change this.
 
PRINT 'Multipliction table for ' 
    + CONVERT(VARCHAR, @j) + ':' + CHAR(13); -- newline
 
 
WHILE (@i < 10) -- show 1 to 10
BEGIN
	SET @i = @i + 1; -- Can be written as SET @i += 1; 
	PRINT CONVERT(VARCHAR, @i) + ' x 5 = ' + CONVERT(VARCHAR, @i*@j);
END

WHILE is not reccomended for looping bigger record sets as this will have performance impacts. Like in other languages, you can use BREAK and CONTINUE in WHILE block.

VN:F [1.9.18_1163]
Rating: 5.0/5 (2 votes cast)
Categories: Code Snippets, SQL

Read excel sheet from T-SQL

July 3rd, 2012 No comments

Majority of samples available on the net deals Jet oledb. Here is a query snippet based on ACE

SELECT 
  * 
FROM
  OPENDATASOURCE('Microsoft.ACE.OLEDB.12.0',
     'Data Source=C:\test1.xlsx;Extended Properties=Excel 8.0')...[MYSHEET$];

You may want to run below queries once, if you get ‘unspecified error’.

 
EXEC sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess', 1
GO
EXEC sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'DynamicParameters', 1
GO
VN:F [1.9.18_1163]
Rating: 5.0/5 (2 votes cast)
Categories: Code Snippets, SQL