Setup MySql on Ubuntu 11.04

Install MySQL
sudo apt-get install mysql-server-5.1
sudo mysql_install_db
sudo mysql_secure_installation
Then download and install JDBC (connector/J) driver.

MySQL Programming in Java

Connecting to Database:
String url = "jdbc:mysql://hostname:portNumber/databaseName";
String username = "dbuser";
String password = "secret";
Connection conn = DriverManager.getConnection(url, 
   username, password);

Setup MySQL on Fedora 15

yum install mysql-server
Start MySQL server and autostart on boot:
/etc/init.d/mysqld start  ## use restart after update
##OR##
service mysqld start ## use restart after update
chkconfig --levels 235 mysqld on

Acronyms of Programming Terms(DRAFT)

W3C — World Wide Web Consortium
XML — Extensible Markup Language 可扩展标示语言
SGML — Standard Generalized Markup Language
SMTP — Simple Mail Transfer Protocol 简单邮件传输协议
TCP — Transmission Control Protocol
IP — Internet Protcol

Configuration of Eclipse and Tomcat

1. Install Eclipse and Tomcat
Extract compressed files into your desired directories.
2. Create an Environment Variable JAVA_HOME for Tomcat if under Windows environment
Start --> Control Panel --> System --> Advanced --> Environment Variables
--> System Variables --> New :
name: JAVA_HOME
value: "Path to tomcat"

[Java] Renaming a batch of files

Due to some reason, the file names in my MP3 folder begin with two digits like this: 01 file.mp3. It is too tedious to rename them one by one since there are too many (hundreds of them). So I wrote a small program to remove the digits :) .