Posts

Popular Visual studio add-ons/plugins

SQL Prompt   for Database Projects (works inside your SQL Management Studio as well) SmartPaster   - (FREE) Copy/Paste code generator for strings   AnkhSvn  - (FREE) SVN Source Control Integration for VS.NET VisualSVN Server   - (FREE) Source Control ReSharper  - IDE enhancement that helps with refactoring and productivity CodeRush  - Code gen macros on steroids Refactor  - Code refactoring aid CodeSmith  - Code Generator PowerCommands  is a Microsoft-created plugin that offers a variety of new features that one would think probably should have been in Visual Studio in the first place. GhostDoc  - (FREE) Simple code commenting tool DXCore  (FREE) and its many awesome plugins:  DxCore Community Plugins ,  CR_Documentor , CodeStyleEnforcer ,  RedGreen TestDriven.Net  - (FREE/PAY) Unit Testing Aid Reflector  - (PAY) Feature rich .Net Disassembler  Reflector AddIn's Web...

SQL Server 2008 MERGE statement

One Statement for INSERT, UPDATE, DELETE In earlier versions of SQL Server we had to write separate statements for Insert,update and Delete based on certain conditions but now, using MERGE statement we can include the logic of such data modifications in one statement that even checks when the data is matched then just update it and when unmatched then insert it. One of the most important advantage of MERGE statement is all the data is read and processed only once. In previous versions three different statement has to be written to process three different activity (INSERT, UPDATE or DELETE), however using MERGE statement all update activity can be done in one pass of database table. This is quite an improvement in performance of database query. Syntax of MERGE statement is as following: MERGE [ TOP ( expression ) [ PERCENT ] ] [ INTO ] target_table [ WITH ( ) ] [ [ AS ] table_alias] USING ON [ WHEN MATCHED [ AND ] THEN ] [ WHEN NOT MATCHED [ BY TARGET...

Facebook, Twitter and Google Plus shortcuts keys

Facebook Facebook shortcut keys are based on browser. Shortcuts for Facebook will vary from browser to browser. In Firefox, you will need to add a Shift key before the key combinations given below, whereas in Internet Explorer, you need to hit Enter after the combination. Same goes for a Mac, except that for Firefox, you need to press Ctrl instead of Shift. Rest of the keys should be same. Facebook key combinations Key     Function Alt + M Compose new message Alt + /    Main site search Alt + 1   Go to home page Alt + 2   Go to Timeline Alt + 3   See friends requests Alt + 4   Go to message inbox Alt + 5   See all notifications Alt + 6   Go to Account Settings Alt + 7   Go to Privacy Settings Alt + 8   Go to Facebook's Profile Page Alt + 9   Go to Facebook's Terms of Service Alt + 0   Go to Facebook Help Center Twitte...

IPL 2014 live streaming

Watch your favorite teams playing.... Just put the below code in your blog or website   

App_Offline.htm feature in ASP.NET 2.0

Image
"App_Offline.htm" feature in ASP.NET 2.0 provides a super convenient way to bring down an ASP.NET application while you make changes to it (for example: updating a lot of content or making big changes to the site where you want to ensure that no users are accessing the application until all changes are done). This is very handy when we do deployments manually. This allows you to remove the locks from those files and replace them, without the need to do a full IISRESET, taking down other sites on the server How this is implemented? We just need to put App_Offline.htmfile in root directory of web application and the ASP.NET runtime will detect the existence of  App_Offline.htm, if it exists, then the ASP.NET runtime will shut-down the application, unload the application domain from the server, and stop processing any new incoming requests for that application. When all Web site files have been copied, you can delete the App_offline.htm. Once remo...

Parallel programming in c# 4.0

In our daily programming routine we use thread mechanism to parallelize your code to distribute work across multiple processors .  To take advantage of the hardware of today and tomorrow Visual Studio 2010 and the .NET Framework 4 enhance support for parallel programming by providing a new runtime, new class library types, and new diagnostic tools. Let’s start with a simple concept in parallel programming. Data Parallelism (Task Parallel Library) Data Parallelism describes how to create parallel for and foreach loops. In this article we will look into simple for loop in parallel programming world. In this application I wrote a simple method to calculate the Root of a given number. Let’s look into the executing time of for and Parallel.For loop methods. The below code took me 16 seconds to execute. I am using 2.8-Ghz dual core 64 bit processor with 4 GB of RAM. for (int i = 2; i < 20; i++) { var result = SumRootN(i); ...

Decorating code snippets in blogger

Follow the below steps to highlight you content (code) in blogger posts. Step 1: Go to Blogger Dashboard -> Template ->Edit Html Paste the below code into your Blogger Template inside the <head>   </head> tag Step2: Use the <pre> tag to highlight your code snippet Example: <pre  class = "brush: csharp" > RequestToken GetRequesttoken()         {             var requestToken = (RequestToken)Session["RequestToken"];             Session.Remove("RequestToken");             return requestToken;         } </pre>  output looks like: RequestToken GetRequesttoken() { var requestToken = (RequestToken)Session["RequestToken"]; Session.Remove("RequestToken"); return requestToken; }