[VS2012]VS2012 stop working and walk round

When debug a ASP.NET Site, which is host in IIS, from Visual Studio 2012, VS stop working like this. "Microsoft Visual Studio 2012 has stopped working" Exception info: "System.AccessViolationException" A work round to solve this problem. Go to IIS and open the advance setting of related App... [More]

[Windows]Clean windows, free up disc

It is the last day of Chinese New Year holiday. I cleaned my Working machine and free up almost 20g space, (120g ssd total). There are two simple ways to clean c driver. 1. disable hibernation and limit virtual memory 2. User WinDirStat to detect and view which file or folder occupy your disc, ... [More]

[.NET]Send email with smtp

Code here:         static void SendMail3() {             MailMessage message = new MailMessage("from@microsoft.com", "to@microsoft.com", "subject", "test body");             message.To.Add("new@microsoft.com");  ... [More]

[VM]Increase VirtualBox hard drive size

I installed Windows 8 RC in VirtualBox with 25G virtual disk size, which squeezed with Office 2013 and Visual Studio 2012. Then, only 2G disk space is available. Now, I have two options, 1. Reinstall the Win8 2. Inscrease VHD size. Thanks for this blog entry, I found the solution.http://ttcshelbyvi... [More]

[Web]My Javascript function snippets

1. Get host URL function getHostUrl() {     var protocol = window.location.protocol;     var host = window.location.host;     return protocol + "//" + host; } 2.Timer fu... [More]

[DotNet]Sql Server connection string format

I found myself always forget the connection string format. this is a memo for it. 1. User Id and password style Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword; Initial Catalog can also be replaced by database 2. User Id and password with Trusted_Con... [More]

[Windows Phone]Live SDK Development links

1. Live Connect Developer Center http://msdn.microsoft.com/en-us/live/ 2.SignIn Scopes and permissions(wl.xxx) http://msdn.microsoft.com/en-us/library/live/hh243646 3.Sigining Users in(c#) http://msdn.microsoft.com/en-us/library/live/hh826543#csharp 4.Get Live Client Id http://manage.dev.live... [More]

[.NET]Word Frequency Calculation

As the title indicates, the following code can calcuate words appearance frequence in a text file. to use this code, 1. run it and input a file name, 2. Press Enter, few seconds later, a result file will be created which contains the word frequence information. class Program {   ... [More]

[Windows Phone]Application Bar

1. Xaml Code inside root Grid element  <phone:PhoneApplicationPage.ApplicationBar>      <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True"                  &nb... [More]

[WPF][Update]Use Dispatcher

1. When do we use Dispatcher? For example, if we create a new thread that will deal some time cost stuff. After the thread finish its work, we want to update the WPF UI. Then, it is time to use Dispatcher.      Dispatcher.Invoke(new Action(MethodName), null); If ... [More]