Saturday, March 25, 2006
Wednesday, March 22, 2006
Chess Project Protocol Spec
The following listed the table of contents for the protocol specification:
1. Chess Project Description
2. Chess Background
2.1 Rules of chess
2.1.1 The King
2.1.2 The Queen
2.1.3 The Rook
2.1.4 The Bishop
2.1.5 The Knight
2.1.6 The Pawn
2.2 Special Moves
2.2.1 Castling
2.2.1 En Passant
3. Notational System
4. Rating System
Rating system example
5. Time chess
5.1 n/k game
5.2 Game/k game
5.1 Daily game
6. Other functionalities
7. Customer Story Cards (3 x 5 cards)
8. Appendix
9. Reference
Furthermore, I have built a list of command as well. Based on our project requirement, I created a list of sample command:
REG USERNAME [blogger]
REG PASSWORD [Bl0gMe2006]
REG EMAIL [foo@bar.com]
LOGON USERNAME [blogger]
LOGON PASSWORD [Bl0gMe2006]
N/K_TIMEOUT_LOSER=[8899]
DAILY_TIMEOUT_LOSER=[3401]
NEXT_TIMED_ALLOTMENT=[00:03:25]
REQUEST_REMAIN_MOVE
REQUEST_REMAIN_TIME
REMAIN_MOVE [21]
REMAIN_TIME [01:30:13]
MOVE [e4]
LOG_MOVE [on]
SECRET_CODE [rcblog], USERNAME [blogger], PASSWORD [SanDiego]
WINNER [Player ID: 8899], RANK [1513]
LOSER [Player ID: 4444], RANK [1587]
TIE_GAME
ACCEPT [message]
ERROR [message]
REQUEST_GAME_ID
REPLY_GAME_ID [002831]
REQUEST_PLAY [002831]
ACCEPT [002831]
REJECT [002831]
AVAILABLE_TIME [2006-3-21] [19:20]
GAME_TYPE [n/k]
DISPLAY_NAME [on]
AVAILABLE_TIME [2006-3-22] [11:50]
GAME_TYPE [game/k]
DISPLAY_NAME [on]
AVAILABLE_TIME [2006-7-1] [21:35]
GAME_TYPE [daily]
DISPLAY_NAME [off]
LIST_ONLINE_PLAYERS
RANK [2503], GAME_ID [002831], GAME_TYPE [game/k]
RANK [2499], GAME_ID [341932], GAME_TYPE [n/k]
…
…
RANK [1587], GAME_ID [314883], GAME_TYPE [daily]
RANK [1513], GAME_ID [039188], GAME_TYPE [n/k]
LIST_ALL_PLAYERS
RANK [2579], PLAYER_NAME [ChessGrandMaster]
RANK [2503], PLAYER_NAME [SDSU_Student]
…
…
RANK [1587], PLAYER_NAME [UNKNOWN]
RANK [1513], PLAYER_NAME [Beginner]
Tuesday, March 21, 2006
Sunday, March 19, 2006
How to turn on the LAMP in 30 minutes
This is a how-to tutorial for LAMP (Linux, Apache, MySQL, PHP)!
Requirement: either you are running Linux on your physical machine or try VMWare Player (Free) and following step 0 to setup the environment.
Step 1: First go to http://www.thoughtpolice.co.uk/vmware/, download FC4:
Step 2: After you boot up the FC4 VM, login by root with password "thoughtpolice". Be sure to find out the IP address of the VM (default IP loads from DHCP):
Requirement: either you are running Linux on your physical machine or try VMWare Player (Free) and following step 0 to setup the environment.
Part A: Environment Setup (Optional):
Step 1: First go to http://www.thoughtpolice.co.uk/vmware/, download FC4:
Fedora Core 4, minimal install.It only takes me 11 minutes for the direct download. (BT could be much faster). Next, extract to wherever you like. Then, fire VMWare Player and open fedora-fc4-i386.vmx.
fedora-fc4-i386.zip, 283M
Download: fast torrent!, direct (60 second delay)
md5sum: 8e46e5ac5fe813cf83454febed2cfdef
Notes: Root password is "thoughtpolice". Remember
that a standard install means selinux
enabled, firewall on.
Step 2: After you boot up the FC4 VM, login by root with password "thoughtpolice". Be sure to find out the IP address of the VM (default IP loads from DHCP):
[root@localhost ~]# ifconfig eth0Step 3: The FC4 VM has SELinux enabled and firewall on by default. We need to modify some firewall rules here.
eth0 Link encap:Ethernet HWaddr 00:0C:29:89:3B:D3
inet addr:192.168.1.110 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe89:3bd3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:39409 errors:0 dropped:0 overruns:0 frame:0
TX packets:28155 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:49994259 (47.6 MiB) TX bytes:2735995 (2.6 MiB)
Interrupt:10 Base address:0x1080
[root@localhost ~]# vi /etc/sysconfig/iptablesStep 4: You should have EXACTLY the same iptable configuration as the following:
# Firewall configuration written by system-config-securitylevelStep 5: Just add these 5 lines (highlighted), which open FTP, SSH, HTTP, HTTPS, and MySQL
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Firewall configuration written by system-config-securitylevelStep 6: Let’s restart the firewall, by launching this command:
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
[root@localhost ~]# service iptables restartStep 7: Now you can at least use SSH to connect to this FC4 VM and other ports is going to be needed by LAMP.
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: [ OK ]
Part B: LAMP (Linux, Apache, MySQL, PHP) Setup:
[root@localhost ~]# wget http://easynews.dl.sourceforge.net/sourceforge/xampp/xampp-linux-1.5.1.tar.gzStep 2: You can follow http://www.apachefriends.org/en/xampp-linux.html#377 or my step as following:
--01:32:48-- http://easynews.dl.sourceforge.net/sourceforge/xampp/xampp-linux-1.5.1.tar.gz
=> `xampp-linux-1.5.1.tar.gz'
Resolving easynews.dl.sourceforge.net... 69.16.168.245
Connecting to easynews.dl.sourceforge.net[69.16.168.245]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 47,380,489 [application/x-tar]
100%[=============================>] 47,380,489 510.83K/s ETA 00:00
01:34:19 (509.66 KB/s) - `xampp-linux-1.5.1.tar.gz' saved [47,380,489/47,380,489]
[root@localhost ~]# tar xvfz xampp-linux-1.5.1.tar.gz -C /optStep 3: Now let’s turn on our LAMP
lampp/
lampp/bin/
lampp/bin/CA
lampp/bin/DB/
lampp/bin/DB/scripts/
lampp/bin/DB/scripts/DB_DataObject_createTables.bat
......
......
......
lampp/phpsqliteadmin/SPSQLite.class.diff
lampp/phpsqliteadmin/phpsla.css
lampp/cgi-bin/
lampp/cgi-bin/test-cgi
lampp/cgi-bin/printenv
[root@localhost ~]# /opt/lampp/lampp startStep 4: Finally, fire up your favorite web browser, go to http://[your linux box IP]/. In my case, I would type in http://192.168.1.110/. Then choose you language, definitely English for now since you’re reading my steps in English, right? :)
XAMPP: SELinux is activated. Making XAMPP fit SELinux...
Starting XAMPP for Linux 1.5.1...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.
WAMP (Windows, Apache, Mysql, php)
I have heard LAMP (Linux, Apache, MySQL, PHP), BAMP (BSD, Apache, MySQL, PHP), and now I found a step by step WAMP , which was published January 28th, 2006 (not really up-to-date)
QRIO Dance
I am currently taking advanced robtoic class, but japanese robotic rocks! (compare to what we build sucks...)
Saturday, March 18, 2006
Outlook 2002 bug (gmail)
I fixed roommate's laptop couple days ago. I spent more than an hour to setup my roommate gmail account on his outlook 2002. The problem was some bug "built-in" with MS Outlook 2002, so after I found that out from a forum, someone suggest to update the Office could solve the problem. Therefore, I did update the Office to SP3 and another update on security, it REALLY solved the gmail problem (complain SMTP connection).
FYI: I don't like to use Outlook for my mail client, I prefer web mail. Everyone knows most virus target on outlook. HOWEVER, I do love the calendar under outlook, where I keep track of my schedules. (iCal under Mac OS X also pretty good, I tried it under my Tiger VM)
FYI: I don't like to use Outlook for my mail client, I prefer web mail. Everyone knows most virus target on outlook. HOWEVER, I do love the calendar under outlook, where I keep track of my schedules. (iCal under Mac OS X also pretty good, I tried it under my Tiger VM)
CentOS net-snmp
Couple days ago, I have played around net-snmp package (previously UC-Davis SNMP) where manipulating SNMP, SMI, MIB etc.
I was trying to install on my FreeBSD 6 VM... which failed for unknown reason (I am not BSD fans yet, but soon) then I tried to install the rpm version on my CentOS (my favorite enterprise linux) where I was having trouble on PHP package. Finally, I realized that the version I got was OUTDATE. The correct file should be "php-snmp-4.3.9-3.9.i386", then I follow this article. They recommended "php-snmp-4.3.9-3.8.i386", which is WRONG. Anyway, they did a good job on teaching me the overall installation.
I was trying to install on my FreeBSD 6 VM... which failed for unknown reason (I am not BSD fans yet, but soon) then I tried to install the rpm version on my CentOS (my favorite enterprise linux) where I was having trouble on PHP package. Finally, I realized that the version I got was OUTDATE. The correct file should be "php-snmp-4.3.9-3.9.i386", then I follow this article. They recommended "php-snmp-4.3.9-3.8.i386", which is WRONG. Anyway, they did a good job on teaching me the overall installation.
Chess Project Protocol
Since spring break, I've busy on VM and study Solaris/Linux/BSD. Now, I need to do my homework on designing Chess Project Protocol, which is a class project for my Client-Server class. I did some sample command but I've not officially written any protocol. My guess is something base on HTTP/1.1 or POP3, which has been taught in class.
The worst thing is ... I don't know how to play chess! hahahhaaaa...
The worst thing is ... I don't know how to play chess! hahahhaaaa...
Friday, March 17, 2006
Live CD
I have tried several Live CD:
I ran the wireless tools with Kismet, where it has detail analysis of each AP around my house. Another nice touch is BackTrack comes with VM Player, where I can load my pre-build VM and start working from there, really convenient.
In addition, Xen 3.0 Demo Live CD is also another nice choice. On my T40 with 512MB RAM, I can only run 2 x 96MB CentOS 4.1 guest VM... Umm... why, I don't know yet, I bet Xen takes up twice as much. I am gonna search further information tomorrow.
FYI, Xen runs faster than VMware. (at least on my laptop)
- BackTrack beta-05022006
- FreeSBIE-unionfs-i386-20060210
- Xen-3.0-demo-livecd-3.0
- Kanotix-2005-04
- adios-4.15
- 3Anopix-20030704
I ran the wireless tools with Kismet, where it has detail analysis of each AP around my house. Another nice touch is BackTrack comes with VM Player, where I can load my pre-build VM and start working from there, really convenient.
In addition, Xen 3.0 Demo Live CD is also another nice choice. On my T40 with 512MB RAM, I can only run 2 x 96MB CentOS 4.1 guest VM... Umm... why, I don't know yet, I bet Xen takes up twice as much. I am gonna search further information tomorrow.
FYI, Xen runs faster than VMware. (at least on my laptop)
Desktop Linux Summit
I received the e-mail about Desktop Linux Summit from my professor:
"The Summit aims to educate about Linux and open source
software initiatives and solutions. This event is full
of IT sessions plus opportunities to meet and network
with some of the biggest growth companies in the industry
including HP, Novell, and Red Hat."