Backspace and Delete keys problem in vim

When I press arrow,backspace,del buttons in text editor, I expect something like "backspace" deletes the character to the left[of the cursor], "delete" deletes the character to the right and "arrow" should move cursor to correct direction in document.

Since I move to Feisty Fawn. I just notice that Backspace and Delete Keys are not act as it should be in VIM editor e.g. ,

In insert mode, the arrow buttons will insert the letters A, B, C, D each followed by a CR.
If I press backspace, the cursor moves back, but the letter doesn't go away.
Also delete button will deletes all letters that on the right of cursor and change case of previous letter.
Below is a pic when I type up, down, right, left, some text, backspace and del

[Some web said] "backspace key" will sent ASCII character 8[decimal] and "delete key" sent 127[decimal] [try man ascii for a list of the ASCII characterset].
The backspace key also has the representation ^H [Ctrl-H][use for open help in some app] and the DEL key has the representation ^[[3~.

First I guess may be it mess between terminal function and character issued when press problem key. Type "stty -a" on will show terminal line settings e.g. functions and it's character.

pnix@pnix-a7n:~$ stty -a
speed 38400 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?;
swtch = M-^?; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc ixany imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
For me erase is ^?. Then check terminal emulator settings to see character it sends when we press the backspace and delete keys. At a shell type ^V[backspace] e.g. Ctrl-V then Backspace and you will see either ^H or ^?. Mine backspace is ^? humm..it's not mess may be it vim configuration.

After some search, I found that vim will run in compatibility mode by default. [Compatibility mode means making vim act like the original vi, which you might want if you were used to working in other versions of Unix.]To make vim bahave as I expect, I create a file .vimrc in home directory and put "set nocompatible" in it.
pnix@pnix-a7n:~$ cat>.vimrc<> set nocompatible

Now backspace button would would only delete characters to the left of the cursos up to the point where you entered insert mode. So I add "set backspace=2"
pnix@pnix-a7n:~$ echo "set backspace=2">>.vimrc

That's it. All keys now work as I want.

set backspace=2 <==allows for backspace of items not inserted in this "insert session"
set nocompatible <==fix behaviour of Backspace and DEL keys
set smartindent <==umm.. for smart indent:)


Firewall with iptables

This post is how to set iptables rule as a linux firewall to avoid brute force attack. Few days ago on my old fedora core4 server, When I monitored in /var/log/messages to verify does my cronjob still running? I found something like..

May 23 15:04:18 fedev sshd(pam_unix)[6037]: check pass; user unknown
May 23 15:04:18 fedev sshd(pam_unix)[6037]: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=adsl-70-248-31-102.dsl.snantx.swbell.net
May 23 15:04:23 fedev sshd(pam_unix)[6040]: check pass; user unknown
May 23 15:04:23 fedev sshd(pam_unix)[6040]: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=adsl-70-248-31-102.dsl.snantx.swbell.net
May 23 15:04:29 fedev sshd(pam_unix)[6043]: check pass; user unknown
May 23 15:04:29 fedev sshd(pam_unix)[6043]: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=adsl-70-248-31-102.dsl.snantx.swbell.net

and in /var/log/secure
May 23 15:04:15 fedev sshd[6035]: Failed password for invalid user develop from ::ffff: port 47109 ssh2
May 23 15:04:18 fedev sshd[6037]: Invalid user webdeveloper from ::ffff:
May 23 15:04:20 fedev sshd[6037]: Failed password for invalid user webdeveloper from ::ffff: port 47529 ssh2
May 23 15:04:23 fedev sshd[6040]: Invalid user services from ::ffff:
May 23 15:04:26 fedev sshd[6040]: Failed password for invalid user services from ::ffff: port 47941 ssh2
May 23 15:04:29 fedev sshd[6043]: Invalid user ircd from ::ffff:

uhh.. look like I'm under attack.

Many one who use the public ip address server always face with this problem. These two iptables command will reject any request that make more than 3 new connection from same address every 5 mins.
[root@fedev ~]# iptables -I INPUT -p tcp -i eth+ --dport 22 -m state --state NEW -m recent --set
[root@fedev ~]# iptables -I INPUT -p tcp -i eth+ --dport 22 -m state --state NEW -m recent --update --seconds 300 --hitcount 3 -j DROP

However, the rules that I just apply will lost after restart. To make it permanent you can put above commands into /etc/rc.local or use command "service iptables save" that will save rules to /etc/sysconfig/iptables
[root@fedev ~]# service iptables save
Saving firewall rules to /etc/sysconfig/iptables: [ OK ]
[root@fedev ~]#

iptables-saves and iptables-restore command are used to save and restore iptables rules to STDIN and from STDOUT[we can redirect to file]. Following are examples.
[root@fedev ~]# mkdir /backup
[root@fedev ~]# iptables-save > /backup/iptables.nobrute
[root@fedev ~]# cat /backup/iptables.nobrute
# Generated by iptables-save v1.2.11 on Fri May 25 18:24:00 2007
:INPUT ACCEPT [1923:874178]
:OUTPUT ACCEPT [1380:533607]
-A INPUT -i eth+ -p tcp -m tcp --dport 22 -m state --state NEW -m recent --update --seconds 300 --hitcount 3 --name DEFAULT --rsource -j DROP
-A INPUT -i eth+ -p tcp -m tcp --dport 22 -m state --state NEW -m recent --set --name DEFAULT --rsource
# Completed on Fri May 25 18:24:00 2007
[root@fedev ~]# iptables-restore < /backup/iptables.backup

Note: In ubuntu I'm not see iptables service in /etc/init.d so we need to manually create script file to run those two commands.

chm file in ubuntu

To open chm file in ubuntu, you need need to install gnochm[for ubuntu] or kchmviewer[for kubuntu]. Packages are already in repos.

pnix@pnix-a7n:~$ sudo aptitude install gnochm
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following NEW packages will be automatically installed:
libchm1 python-chm
The following NEW packages will be installed:
gnochm libchm1 python-chm
0 packages upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 210kB of archives. After unpacking 1077kB will be used.
Do you want to continue? [Y/n/?] y
Writing extended state information... Done
Get:1 http://th.archive.ubuntu.com feisty/universe libchm1 2:0.39-2 [28.0kB]
Get:2 http://th.archive.ubuntu.com feisty/universe python-chm 0.8.4-0.1 [34.5kB]
Get:3 http://th.archive.ubuntu.com feisty/universe gnochm 0.9.9-0ubuntu1 [147kB]
Fetched 210kB in 3s (57.7kB/s)
Selecting previously deselected package libchm1.
(Reading database ... 90880 files and directories currently installed.)
Unpacking libchm1 (from .../libchm1_2%3a0.39-2_i386.deb) ...
Selecting previously deselected package python-chm.
Unpacking python-chm (from .../python-chm_0.8.4-0.1_i386.deb) ...
Selecting previously deselected package gnochm.
Unpacking gnochm (from .../gnochm_0.9.9-0ubuntu1_all.deb) ...
Setting up libchm1 (0.39-2) ...

Setting up python-chm (0.8.4-0.1) ...

Setting up gnochm (0.9.9-0ubuntu1) ...



No miracle at Athen.

"We can be proud of ourselves. We've done so well getting to the final and I know we'll play in another one of these finals," said Gerrard.(from BBC Sport)

Last night I watched this match until 4AM(Bangkok time) and felt that it's not liverpool's day. Red had more chances in first half but couldn't turn it to score furthermore Milan's goal from Inzaghi's deflection on injury time(a bit of luck IMHO) change rest of the match. Second half was now easily for MILAN hold the ball, wait for second goal and it's come. Liverpool's consolation goal from kuyt bring me some hope but no miracle at athen.

Anyway Final Score UEFA Champions league 2007


IE6 on Ubuntu[Feisty Fawn]

Another thing on XP that I still need is IE. coz my internet banking use VBScripts that not allow on firefox. So ..

if !(already_have_wine_on_Feisty())

//install cabextract, download IEs 4 Linux and install

pnix@pnix-a7n:~$ sudo apt-get install cabextract
pnix@pnix-a7n:~$ wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
pnix@pnix-a7n:~$ tar zxf ies4linux-latest.tar.gz
pnix@pnix-a7n:~$ cd ies4linux-*
pnix@pnix-a7n:~$ ./ies4linux



How I deal with linux agp interrupt problem on A7N8X-E

My box use asus motherboard[a7n8x-e] with asus agp card[n6200d]. Yes, it work great on windows but A7N8X-e acpi bios or acpi module on linux bring me a lot of problem.
I can't remember how many attempts I try to get nvidia linux driver work with a7n8x-e and n6200td card. Every time I try will end with

(EE) NVIDIA(0): The NVIDIA kernel module does not appear to be receiving
(EE) NVIDIA(0): interrupts generated by the NVIDIA graphics device.
(EE) NVIDIA(0): Please see the FREQUENTLY ASKED QUESTIONS section in the
(EE) NVIDIA(0): README for additional information.
(EE) NVIDIA(0): Failed to initialize the NVIDIA graphics device!
(EE) NVIDIA(0): *** Aborting ***
(II) UnloadModule: "nvidia"
(EE) Screen(s) found, but none have a usable configuration.

Xwindow go to black screen. This error, from faq and in my understand, is dealing with agp interrupts and the answer(w/o any bios update from asus) should be something between

After some experimental in combine those params I found irqpoll is require to take care of agp interrupts and acpi=off give me minimal ERR.

Here is the result when boot with acpi=off and irqpoll parameter.
pnix@pnix-a7n:~$ cat /proc/interrupts
0: 18977 XT-PIC-XT timer
1: 69 XT-PIC-XT i8042
2: 0 XT-PIC-XT cascade
3: 532 XT-PIC-XT NVidia nForce2
5: 74 XT-PIC-XT eth0, ohci_hcd:usb3
6: 5 XT-PIC-XT floppy
7: 100030 XT-PIC-XT ohci_hcd:usb1, nvidia
8: 3 XT-PIC-XT rtc
9: 3 XT-PIC-XT ohci1394
11: 6229 XT-PIC-XT ehci_hcd:usb2, libata
12: 1088 XT-PIC-XT i8042
14: 116 XT-PIC-XT ide0
15: 269 XT-PIC-XT ide1
NMI: 354
LOC: 18861
ERR: 53
MIS: 0
pnix@pnix-a7n:~$ cat /proc/driver/nvidia/cards/0
Model: GeForce 6200
IRQ: 7
Video BIOS: 05.44.a2.03.00
Card Type: AGP
DMA Size: 32 bits
DMA Mask: 0xffffffff
pnix@pnix-a7n:~$ cat /proc/driver/nvidia/agp/status
Status: Enabled
AGP Rate: 8x
Fast Writes: Disabled
SBA: Enabled

Still has some error. Look like nvidia share interrupt with usb controller. Anyway I test all six usb ports and it work, for Xwindow, gdm start fine, so I think it's good to have graphic driver. That's mean no more nv driver, Full video acceleration.:D


Adding new partition to Ubuntu(UUID in fstab)

Last night,on my dual boot machine, I formated old ntfs partition to fat32 partition(in XP). After reboot to Feisty, it can't mount that partition anymore. I edited /etc/fstab by changed ntfs to vfat not work. I notice that fstab file in Feisty, the field /dev/abcd have changed to UUID=xxxx. I try google it and found some info.

UUID(Unique unit ID) came since edgy I guess(I never try edgy at all). Some reason to use UUID are

a)Disk labels aren't guaranteed to be unique.
b)The kernel's device paths aren't constant enough -- move your SCSI interface card to a different slot and system doesn't boot any more.
c)Device names aren't constant either -- they depend on module load order.

To find out the UUID, use the following command

$ /sbin/blkid
$ sudo vol_id -u device


Football Manager on Ubuntu

Yesterday I posted like no way to play FM2007 on linux. That's not true and it's my fault. Today I just found that many guys can play FM2007 on their linux box with wine. Here is how i install FM on Feisty.
Software require
jre [windows version to install under wine]
FM2007 CD file

I've been downloaded FM2007 from bittorrent last year as bin/cue file. So first, I convert it to iso then mount to dir

pnix@pnix-a7n:/media/hda5/downloads$ sudo aptitude install bchunk
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following NEW packages will be installed:
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 13.5kB of archives. After unpacking 69.6kB will be used.
Writing extended state information... Done
Get:1 http://th.archive.ubuntu.com feisty/universe bchunk 1.2.0-4 [13.5kB]
Fetched 13.5kB in 0s (18.6kB/s)
Selecting previously deselected package bchunk.
(Reading database ... 89972 files and directories currently installed.)
Unpacking bchunk (from .../bchunk_1.2.0-4_i386.deb) ...
Setting up bchunk (1.2.0-4) ...
pnix@pnix-a7n:/media/hda5/downloads$ mkdir ~/.fm2007
pnix@pnix-a7n:/media/hda5/downloads$ bchunk rzr-fm07.bin rzr-fm07.cue ~/.fm2007/fm2007.iso
binchunker for Unix, version 1.2.0 by Heikki Hannikainen
Created with the kind help of Bob Marietta ,
partly based on his Pascal (Delphi) implementation.
Support for MODE2/2352 ISO tracks thanks to input from
Godmar Back , Colas Nahaboo
and Matthew Green .
Released under the GNU GPL, version 2 or later (at your option).

Reading the CUE file:

Track 1: MODE1/2352 01 00:00:00

Writing tracks:

1: /home/pnix/.fm2007/fm2007.iso01.iso 503/503 MB [********************] 100 %
pnix@pnix-a7n:/media/hda5/downloads$ cd ~/.fm2007
pnix@pnix-a7n:~/.fm2007$ ls
pnix@pnix-a7n:~/.fm2007$ mkdir cdfm
pnix@pnix-a7n:~/.fm2007$ sudo mount -o loop -t iso9660 fm2007.iso01.iso cdfm

Next, the installation part
run winecfg set windows version to 'Windows 2000'
install jre then FM
pnix@pnix-a7n:~/.fm2007$ cd ~/.wine
pnix@pnix-a7n:~/.wine$ wine jre-1_5_0_09-windows-i586-p-s.exe
[Follow the instructions.]
pnix@pnix-a7n:~/.wine$ cd ~/.fm2007/cdfm
pnix@pnix-a7n:~/.fm2007/cdfm$ wine Setup\ FM2007\ PC.exe -console
[Follow the instructions.]

This will install fm in ~/.wine/drive_c/Program Files/.
After installation finish, To start game run winecfg again set windows version to 98. Now you can start game from menu or by
pnix@pnix-a7n:~/.fm2007/cdfm$ wine ~/.wine/drive_c/Pr*s/Sport*e/F*7/fm.exe --cache_skin=0

Some interesting arguments
--windowed=true to launch the game in windowed mode
--load_game="my game.fm"to load a given savegame

wine app db:Running Football Manager 2007 under Wine by Romain


Windows app on Ubuntu[Feisty Fawn]

Although I rarely run Windows these days [still use for FM2007], others Windows programs I prefer to run with Wine on my Ubuntu.I'm not try VMWare yet because I worry about system resource.

Installing Wine
Add extra repos. deb http://wine.budgetdedicated.com/apt feisty main
Add the repository key, get package cache update and install Wine.

pnix@pnix-a7n:~$ wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -
pnix@pnix-a7n:~$ sudo aptitude update
Get:1 http://th.archive.ubuntu.com feisty Release.gpg [191B]
Fetched 50.1kB in 11s (4212B/s)
Reading package lists... Done
pnix@pnix-a7n:~$ sudo aptitude install wine alltray
Reading package lists... Done
Setting up alltray (0.69-1) ...

Setting up wine (0.9.36~winehq0~ubuntu~7.04-1) ...


Note: alltray is for dock app icon on system tray.

Install Windows apps
get executable file(.exe)
use terminal cd to that dir and Type wine [exe file]

This will start the .EXE using Wine. If it is an installer, it should then run as it would in Windows. If the application asks for a directory to install the application to, select put it under C:\Program Files. The fake C drive is created under .wine after a user runs wine in the terminal for the first time.

Here I will show what I do to run utorrent on Feisty.
pnix@pnix-a7n:~$ mkdir .utorrent
pnix@pnix-a7n:~$ cd .utorrent
pnix@pnix-a7n:~/.utorrent$ wget http://download.utorrent.com/1.6/utorrent.exe
--18:30:36-- http://download.utorrent.com/1.6/utorrent.exe
=> `utorrent.exe'
Resolving download.utorrent.com...
Connecting to download.utorrent.com||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 174,163 (170K) [application/octet-stream]

100%[=================================================================================================================>] 174,163 35.26K/s ETA 00:00

18:30:42 (35.20 KB/s) - `utorrent.exe' saved [174163/174163]

pnix@pnix-a7n:~/.utorrent$ wget http://img400.imageshack.us/img400/5093/utorrenteh8.png
--18:31:25-- http://img400.imageshack.us/img400/5093/utorrenteh8.png
=> `utorrenteh8.png'
Resolving img400.imageshack.us...
Connecting to img400.imageshack.us||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 25,853 (25K) [image/png]

100%[=================================================================================================================>] 25,853 20.83K/s

18:31:27 (20.80 KB/s) - `utorrenteh8.png' saved [25853/25853]

pnix@pnix-a7n:~/.utorrent$ wine utorrent.exe

You can also create menu by create /usr/share/applications/utorrent.desktop file
[Desktop Entry]
GenericName=BitTorrent Client
Exec=alltray --icon /home/[username]/.utorrent/utorrenteh8.png wine /home/[username]/.utorrent/utorrent.exe

Ubuntu Community Doc
HOWTO: wine + uTorrent with native Tray icon


Ubuntu Mobile and Embedded Edition

"At the heart of the Ubuntu project lies a belief that open source software
and technology can play a key role in enabling individuals to achieve their
potential. A central goal has been the creation of a world-class, free and
open source operating system that we have worked to make accessible across
notebooks, desktops, thin clients and servers.

Three years on, it is clear that new types of device - small, handheld,
graphical tablets which are Internet-enabled are going to change the way we
communicate and collaborate. These devices place new demands on open source
software and require innovative graphical interfaces, improved power
management and better responsiveness.

Intel, specifically, have announced a new low-power processor and chipset
architecture which will be designed to allow full internet use on these
mobile Internet devices.

To fulfil the aims of our mission and in response to the technical
challenges that these devices pose, we are announcing the Ubuntu Mobile and
Embedded project.

We will start more detailed planning at the Ubuntu Developer Summit next
week in Seville and the first release of this edition will be in October
with Ubuntu 7.10
. If you are interested in the project, please get involved.
We will be working through our normal development processes on Launchpad,
the developer mailing lists and IRC.

Finally, we are delighted to be working with Intel on this version of
Ubuntu. Intel are making significant contributions of technology, people and
expertise to the project. We hope that others who are interested in
producing an easy-to-use and open source environment for this class of
device will join us in making this a success."

Matt Zimmerman

Original published on ubuntu-devel mailing list


How to make Firefox2 to open link in new tab

After upgrade to Feisty Fawn, one thing that's annoyed me is opening a link in new tab need to right click. Here is how to "force link that open new window to open in new tab".

Open your firefox to about:config then set

browser.link.open_external -> 3
browser.link.open_newwindow -> 3
browser.link.open_newwindow.restriction -> 2

that's it.


Sil3112 v4.2.83 SATA bios for A7N8X-E

== this post is specific for my case[Asus A7N8X-E Deluxe with Seagate SATA2] ==

What's happens before?

After try many options in bios, grub. I found the way to install winxp on SATA2 and A7N8X-E.

To enable booting winxp from bios, I need to flash neoplus mod bios, link below.
Asus A7N8X-E Deluxe 1013 BIOS with added v4.2.83 Sil3112 (SATA) BIOS by NeoPolus (based on Trats BIOS)

This bios come with new SATA bios(v4.2.83) make xp installation go smooth but afterthat I can't restore grub. Very strange, even I try to reinstall ubuntu. Live cd's not recognize prepartition on the drive. Actually I have sda1 is winxp(just install it),sda5 is ext3(/),sda6 is swap and sda7 is data(ntfs).All partition can be seen in winxp but for live cd the drive appear as a 80GB drive no partition on it.

UPDATE[10/05/2007]: Last night I use Computer management in xp to see partition table on SATA drive and found that there is something wrong i.e. look like it has 25GB excess free space go between swap(sda6) and data(sda7). Live cd think SATA is about 100GB (actually it's only 80GB) and go crazy. I delete that partition include / and swap to make free space on drive, restart and boot with Live CD again. This time every everything work fine.


Apache Harmony - Open Source Java SE

Apache Harmony, previously made available as "snapshot r533500", announce the first stable build "5.0 M1".

Apache Harmony is the Java SE project of the Apache Software Foundation.
The aim of the project is to produce a large and healthy community of those interested in runtime platforms tasked with creation of:
* A compatible, independent implementation of the Java SE 5 JDK under the Apache License v2
* A community-developed modular runtime (VM and class library) architecture.

support platforms

Dual boot,A7N8X-E,SATA,WINXP and me

Last week, I’ve got serious problem with my system at home. It has 2 drives, ide and sata. The ide one(4 years old), used as system drive,'s partition table was crash.

The last environments before it crashed are
Ide drive's 4 partitions. hda1 is winxp(ntfs,loss partition table),hda5 is data(ntfs,loss partition table),hda6 is ubuntu /(fine) and hda7 is swap(fine).
Sata drive's 3 ntfs partitions (sda1,5,6) all fine and its store movies and programs I've downloaded from bittorrent.
Motherboard is ASUS A7N8X-E Deluxe with Sillicon SATA chip(Sillicon 3112a I guess)

Ubuntu on hda6 still can boot. I have some data on hda5 need to restore(with 'EasyRecovery', it works great, restores everything as the same folder structure.). My plan is reinstall both XP and ubuntu on SATA drive, use last partition on SATA to store importance data. For old 60 GB IDE, I will use as download drive store data downloaded from bittorrent network.

I have followed other instructions found on the web to install XP on SATA drive A7N8X-E m/b with regards to changing the boot order to CDROM,SCSI,HDD (this tries to boot an SATA HD) and also for loading the SATA drivers.

Funny things are here...
First, I try to install XP on sda1, boot from the CD drive, load the sata drivers, select the partition to install and copy files ready for installation. However, after copying the files and rebooting the PC (required by the windows installer) the PC fails to boot from the SATA drive to proceed the installation. It just sits there with a blank screen.

I try to think of what's causing this problem. I don't think that the m/b is broken as the windows installer manages to detect the drive and copy the necessary files ready for install, but then it refuses to boot from the SATA drive to continue the OS install. No way to go further.

I decided to install XP again on hda1. So, changed boot order back to CDROM,HDD,SCSI, after reboot(during installation process) I noticed that it had menu said two winXP to boot in my system. I just let it go and finished installation on ide.

After reboot, I tried another menu of winXP. Guess? What it is? it started to continuing install winXP on SATA drive until it's finished. I confuse that WINXP(SATA) partition that can’t boot direct from BIOS(like no NTLDR on SATA) but it can access by go through winXP booting menu(NTLDR on ide).

Anyway, if I change boot order let SCSI come before HDD, I'll receive a message in the BIOS that reads "Disk read error, press ctrl+alt+del to restart". Only way two boot XP from SATA drive is use NTDLR from IDE drive. This make me think about maybe sth wrong with SATA MBR. Maybe install linux and write grub to SATA will help.

OK. Just leaves the WINXP thing like that. I unplugged IDE drive then installed Feisty Fawn on sda5. Everything just work fine include grub install on SATA MBR. After reboot grub menu show ubuntu and XP(on sata). From that menu, new installation ubuntu is boot but not winxp. hmmmm...

I don't think it's NTLDR problem and I already check that NTLDR,boot.ini and ntdetect.com are present on SATA root(c:/ on SATA). Someone said "Deleting partition with XP setup is not sufficient. A disk reset will do the trick.". I can’t try low-level format now because there're importance data on sda6 and I don't have enough space to swap it.

Maybe when i've got a new drive i'll try. For now I'll install ubuntu on SATA as a primary drive, install winxp on IDE as secondary drive and use grub to be boot loader.

at last I found solution of this problem

Note: from answer.com
NTLDR (abbreviation of NT Loader) is the boot loader for Windows NT, including some of its later versions (2000/XP/Server 2003).
NTLDR requires, at the minimum, the following two files to be on the system volume: NTLDR, which contains the main boot loader itself, and boot.ini, which contains configuration options for a boot menu. To load an NT-based OS, ntdetect.com must also be present.


Fowler missed Penalty Shootout in Champions League Semi-Finals

Match Stat
Match fact
Liverpool reach UEFA Champions League final second time in three seasons.
Liverpool win 1:0(Agg. 1:1), scored by Daniel Agger in the 22nd minute.
Liverpool almost get second goal by Kuyt header(denied by bar).
Dirk Kuyt should end the game in extra time first half(denied by line man).
Pepe reina is incredible in the two saves in penaty shootout.
Robbie Fowler miss his penalty shootout(denied by Robben and Geremi)..ha ha.


Collector class in java

Arrays, in java language, has fix size, member must be same type. We must known size of it before create array.

This post is note about some collector classes in package java.util
Vector will use to collect 'instance of class', can vary size, member doesn't need to be same type. Vector use much memory, not suitable to store or transfer over network. So use Vector to store data, after finish change Vector to Enumeration by

Enumeration e = v.elements();

Stack is order oriented data structure i.e. 'pop' and 'push' data from one side of stack. It based on the principle of Last In First Out. Member in stack must be instance of class like vector, data in primitive type need to change to be instance of 'type wrapper class' before pop into it.
import java.util.*;
class StackTest1 {
public static void main(String[] args) {
String t[] = {"Hello", "how", "do", "you", "do?"};
Stack s = new Stack();
for (int i = 0; i < t.length; i++)
while (!s.empty())
System.out.print(s.pop() + " ");

Hashtable use to store pair (key,value).
Properties extends from Hashtable and more popular. It use to store pair value of String and String.
example below show the usage
import java.util.*;
import java.io.*;
class PropertyTest {
public static void main(String[] args) throws IOException {
Properties p1 = new Properties();
p1.put("500", "John Rambo");
p1.put("123", "Jack Ripper");
p1.put("741", "Bill Gate");
/*use getProperty, getPropertyNames*/
//return default value if no key
System.out.println(p1.getProperty("999", "Bob Dylan"));
Enumeration e = p1.propertyNames();
while (e.hasMoreElements())
/*save/get properties with file*/
FileOutputStream fo = new FileOutputStream("tmp");
p1.store(fo, "My Properties File");
FileInputStream fi = new FileInputStream("tmp");
Properties p2 = new Properties();