Pages

Tuesday, September 30, 2014

Âm lịch


Tuesday, October 8, 2013

Some useful features never used frequently in Emacs

Some useful features never used frequently in Emacs. This post includes these features for you.

[01] Reload or refresh a current file reading
If you are configuring your emacs via editing .emacs file, it should use this feature to refresh a reading file without closing and reopening it. This means that we want to keep Emacs running and to reload the files opening. Currently, I have found two ways:
The 1st way: C-x C-v Return/Enter
The 2nd way: M-x revert-buffer

[02] Set the underscore ("_") is as a part of word
You recognize the underscore not to be a part of words in Emacs. By double-clicking on the words containing underscores, you never choose whole word because the underscore is not considered as a part of word. That also shows at moving the cursor word by word. More especially, Emacs gives a incorrect result in counting the number of words in a selected region. For instance, Emacs will give 4 in the text "Agv Tgdh_p ATP".

We change Emacs by adding the line: (modify-syntax-entry ?_ "w") into .emacs configuration file.

Thursday, January 24, 2013

Working with Windows Boot Loader in Windows 7

If google just the keywords "Windows Boot Loader", you will get so many results so that you don't know which should be chosen. I met the problem with Windows Boot Loader after installing EasyBCD.  As described in a recent post, I wanted GRUB2 to manage boot menu of dual boot system. Although I had installed EasyBCD in Windows 7 to manage both, it didn't recognize Ubuntu's partition.

After fixing GRUB2 successfully, I removed EasyBCD out Windows 7. However, at the moment the boot menu displayed, I chose Windows 7 and Windows boot loader still existed to request me choosing more (because EasyBCD was managing Windows boot loader). Thus an idea emerged in my mind to edit or customize Windows Boot Loader. I found a good solution and shared it for somebody.

The utility I had ever used is Visual BCD Editor. You should read carefully guides on the website before conducting experiments. Actually this tool is very easy to use. The other way to see the list of the bootable partitions is the command bcdedit

Below are some useful links I thought good for you to use for fixing your system.

  1. Modifying the Windows 7 boot loader with the Boot Configuration Data Editor tool
  2. Windows 7 - Dual Boot - Change OS Name in Windows Boot Manager
  3. How to Dual Boot Windows 7 and Linux using BCDEdit
  4. Windows 7 - Adding Ubuntu to the boot manager


How to fix GRUB2: customize boot menu

GRUB2 is an upgraded version of GRUB. It has a lot of improvements such as scripting support including conditional statements and functions, dynamic module loading, rescue mode, etc. GRUB2 is the default boot loader and manager since Ubuntu version 9.0 (Karmic Koala).

Here I concretely present how to customize boot menu of GRUB2. First we can edit the file /etc/default/grub. The parameters can be studied from the link as I have just mentioned above. Then we run the command update-grub to update the file /boot/default/grub.cfg
I think that the solution of this issue is not really hard if we understand mechanism and structure of boot manager.

See more details from the following links:

  1. http://www.webupd8.org/2009/12/how-to-recover-grub2-linux.html
  2. http://www.webupd8.org/2011/02/live-cd-to-fix-restore-grub-and-grub2.html
  3. Which partition to install boot loader on?

Thursday, January 17, 2013

Synchronize MySQL databases between Ubuntu and Windows

Solution 1:  Unify the folder data of XAMPP on Ubuntu and Windows. Both of the operating systems point to the same folder. See more details in the following post:
http://stackoverflow.com/questions/4638981/is-it-possible-to-use-the-same-mysql-database-for-windows-xampp-and-linux-mysql/14368403#14368403

Solution 2:  Install a mini Linux distribution such as Slitaz, Alpine, etc.  that plays a role of a dedicated server. Of course, it will operate like a virtual server using VMWare or Oracle VirtualBox. After that, we set up MySQL server into this server. In the case of using SQL Server, Windows XP is a suitable choose. But we must face to the problem of copyright as well as license. See more details in the following link:
http://ubuntuforums.org/showthread.php?t=776077

Solution 3: Run a portable XAMPP on USB or External HD. The problem is that how can we do the same version.