Sunday, June 30, 2013

Install Windows 8.1 Preview on VirtualBox

When I installed Windows 8.1 Preview on VirtualBox 4.2.14 hosted on Mac OS/X machine, I got this error:
“Your PC need to restart, Please hold down the power button Error Code : 0x000000C4”.

Here is a solution I found at
Open terminal windows and execute this command:
VBoxManage setextradata [vmname] VBoxInternal/CPUM/CMPXCHG16B 1
where [vmname] is your Windows 8.1 virtual machine name.

Here is my screenshot: Install Visual Studio 2013 Preview on Windows 8.1 Preview

Update on July 10: You need to the Oracle VirtualBox 4.2.16 or later to install VirtualBox Addition in order to make the full screen, shared folder and other features.

Monday, June 24, 2013

Notes on MVC Music Part 7 Tutorial

When using Visual Studio 2012 and MVC 3 to practice the MVC Music Store tutorial, you may get this error on part 7:
‘CompareAttribute’ is an ambiguous reference between ‘System.ComponentModel.DataAnnotations.CompareAttribute’ and ‘System.Web.Mvc.CompareAttribute’

Here is the solution:
Remove the reference using System.Web.Mvc;
from MvcMusicStore\Models\AccountModels.cs

Friday, June 21, 2013

Change Privacy Settings on Flickr

Recently Flickr increased the capacity of free plan to 1 terabyte. It’s great. Flickr is one of the best photos hosting web site. However, you need to review and change its default settings.

The default settings before change

Only myself can access to original file

Default settings for upload

Change it to myself

After the change of default upload.

Tuesday, June 11, 2013

C# Questions and Answers – Part 2

What is a constructor?
A constructor is a special method with the same name as the class. It is executed when an instance of the class is created and can contain code to initialize the instance.
What is the difference between public, static and void?
All these are access modifiers in C#. Public declared variables or methods are accessible anywhere in the application. Static declared variables or methods are globally accessible without creating an instance of the class. Void specifies that the method does not return a value.
What is an interface?
An interface contains only the signatures of methods, delegates or events. The implementation of the methods is done in the class that implements the interface. Read more
What is a delegate?
Delegate is a reference type that can be used to encapsulate a named or an anonymous method. Delegates are similar to function pointers in C++; however, delegates are type-safe and secure. Read more

Previous posts:
C# Questions and Answers
C# Questions and Answers – Part 2
C# Questions and Answers – Part 3

Monday, June 10, 2013

Scan a whole drive for virus in Windows 8

  1. Go to desktop screen to using Windows Explorer or open command prompt windows.
  2. Change to folder C:\Program Files\Windows Defender
  3. Execute program c:msascui.exe