Increase VirtualBox hard drive size

3. August 2012
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://ttcshelbyv... [More]

Windows8

[Web]My Javascript function snippets

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

ASPNET, Web

[DotNet]Sql Server connection string format

6. July 2012
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]

DotNet

[Windows Phone]Live SDK Development links

8. May 2012
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]

Windows Phone

[.NET]Word Frequency Calculation

3. May 2012
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]

DotNet

[Windows Phone]Application Bar

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

Windows Phone

[WPF][Update]Use Dispatcher

27. April 2012
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]

Windows Phone, WPF

[.NET]Read RSS by C#

17. April 2012
I searched around the net for a C# rss reader, but samples are either too complicated or errors prone. DataSet.ReadXml() gets a bug...So, finnaly I realized that write one of my own rss reader would be a quick and better than use one from the internet. And I think this one is the BEST:)No more words... [More]

DotNet

[WIndows Phone7]List pictures in ListBox

16. April 2012
1. Add reference to Microsoft.Xna.Framework dll . 2. Replace Grid xaml code with the following code:  <Grid x:Name="LayoutRoot">     <!--ContentPanel - place additional content here-->     <Grid x:Name="ContentP... [More]

Windows Phone

[Windows Phone]A implement of Multi-Touch drawing in Windows Phone7

7. April 2012
InkPresenter only allow on point drawing, To achieve multi-touch draw, in other words, draw with more than one finger. we'd implement the Touch.FrameReported event. here is what I have done: public MainPage() {    InitializeComponent();     Touch.FrameReported ... [More]

Windows Phone