Posts

Showing posts from June, 2014

Visual Studio ALL keyboard shortcuts

Ctrl+S Save current file Ctrl+Shift+S Save all files Ctrl+Shift+N Create new project Ctrl+O Open file Ctrl+Shift+O Open project Ctrl+Shift+A Add item to project Esc Close menu or dialog Ctrl+P Print Shift+Alt+Enter Toggle full screen mode Ctrl+F4 Close current tab Ctrl+F6/Ctrl+Shift+F6 Go to next / go to previous window Ctrl+Tab, then Arrow keys Press and hold Ctrl+Tab, then using arrow keys gives a small task manager with all open files and views For keystrokes with two keys such as Ctrl+k+k, keep holding the Ctrl key until releasing the last key. Ctrl+K+K Toogle bookmark Ctrl+K+N Goto next bookmark Ctrl+K+P Goto previous bookmark Ctrl+Shift+K+N Goto next bookmark in folder Ctrl+Shift+K+P Goto previous bookmark in folder Ctrl+K+W Put focus on bookmark window Esc Leave bookmark window and focus on editor Ctrl+K+H Toggle code shortcut at current line* Ctrl+K+L Clear all bookmarks Ctrl+\+T Show Task List (including c...

Chandra Bhushan Prasad: How To Get IP & Locations details of client machin...

Chandra Bhushan Prasad: How To Get IP & Locations details of client machin... : Using JQuery Add this code in head section <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/j...

How To Get IP & Locations details of client machine in asp.net

Using JQuery Add this code in head section <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>     <script type="text/javascript">         $.get("http://ipinfo.io/66.87.90.80", function (response) {             document.getElementById("<%=Label1.ClientID %>").innerHTML = "";             document.getElementById("<%=Label1.ClientID %>").innerHTML = "IP is : " + response.ip + "<br> Host Name is : " + response.hostname             + "<br> Host Name is : " + response.hostname             + "<br> City Name is : " + response.city             + "<br> Region Name is : " + response.region             + "<br> Country Name is : " + response.country   ...

C# Downloading website into string using C# WebClient or HttpWebRequest

1st Method............ ---------------------------------------- public void ReadPage()     {         HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create( "https://www.kickass.to/");         req.Method = "GET";         req.UserAgent = "Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))";             string source;         var response = req.GetResponse();         var stream = response.GetResponseStream();         try         {             if (response.Headers.AllKeys.Contains("Content-Encoding")                 && response.Headers["Content-Encoding"].Contains("gzip"))             {                 stream = new System.IO.Compression....

Chandra Bhushan Prasad: Concatenate column's in sql server...

Chandra Bhushan Prasad: Concatenate column's in sql server... : declare @s varchar(8000) select @s=coalesce(@s +',"' ,'"') + ProjectName +'"' from ProjectMaster se...

Remove time by datetime in SQL Server

SELECT DATEADD(dd, DATEDIFF(dd, 0, GETDATE()), 0)

How do I get a file size in bytes using .NET?

public string GetFileSize(string filename)     {         string[] sizes = { "B", "KB", "MB", "GB" };         double len = new FileInfo(filename).Length;         int order = 0;         while (len >= 1024 && order + 1 < sizes.Length)         {             order++;             len = len / 1024;         }       return String.Format("{0:0.##} {1}", len, sizes[order]);     }