Thursday, August 22, 2013

How to access Wamp Server running on Windows 2008 from other computer?

The firewall rules on Windows 7 or Windows 2008 or later version may not allow you access to your web site running by WampServer from other computer. To fix this problem:

Step 1: Update httpd.conf to add this line
Allow from 192.168.1.0/255.255.255.0 # for LAN
#or
Allow from all # for any computer in the world
Remember to restart Apache server after change the httpd.conf

Step 2: Check Windows Firewall.
  • Is the port 80 open?
  • Is the Apache Web Server (\wamp\bin\apache\Apache2.4.4\bin\httpd.exe allow to receive the request from other?

Saturday, August 17, 2013

WAMP

WAMP stands for Microsoft Windows operating system, Apache web server, MySQL database, and PHP general-purpose scripting language for server side Web development. Among WAMP server packages, I like WampServer since it easy to instal, have latest version from Apache, MySQL and PHP and it's free. Before you install the WampServer, you need to make sure your computer have:

  • Microsoft Visual C++ 2010 run-time. Without Microsoft Visual C++ 2010 run-time, you will see the error message "vcr100.dll missing" when install.
  • Microsoft .NET Framework 3.5.1. This fixed the problem 'aestan tray menu has stopped' when you start the WampServer

To install Microsoft Visual C++ 2010 Redistributable Package (x64) ( http://www.microsoft.com/en-us/download/details.aspx?id=14632 )

On Windows 2008R2 server, make sure .NET Framework 3.5.1 enable. It disable by default. ( http://social.technet.microsoft.com/Forums/windowsserver/en-US/ac1bf719-0a88-4b5d-be98-395f2623e805/what-version-of-net-framework-comes-with-windows-2008-r2 )

Friday, July 12, 2013

Failed to load libGL.so

Here is the solution for error message 'Failed to load libGL.so' when launch Android Virtual Device (AVD) from Android Studio 0.2 on Ubuntu 13.04 32 bit:

Install 'Free Implementation of the OpenGL API-GLX development files' (libgl1-mesa-dev) package from Ubuntu Software Center


or type this command at terminal
sudo apt-get install libgl1-mesa-dev

Credit: http://learnedstuffs.wordpress.com/2012/07/17/fixing-ubuntu-error-failed-to-load-libgl-so/

Tuesday, July 9, 2013

C# Questions and Answers – Part 3

What is an anonymous class?
An anonymous class is a class that does not have a name. An anonymous class created by using the new keyword and and a pair of brace defining the fields and values.

How to prevent a calculation overflowed in C#?
Use checked keyword. For example: checked (operand1 + operand2); checked and unchecked keyworks are for integer arithmetic such as int and long

What is a partial class?
When we split a number of methods, fields, and constructors of a class into many files, we can use partial keyword.

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

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 https://www.virtualbox.org/ticket/10792:
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.