DALLASCAO.COM

Site of Cao Shouguang, English to Chinese translator


Warning: Missing argument 1 for shapeshifter_archive_page_title(), called in /var/www/dallascao.com/en/wp-content/themes/shapeshifter/category.php on line 10 and defined in /var/www/dallascao.com/en/wp-content/themes/shapeshifter/includes/functions-do-actions.php on line 142

Category: Coding Frenzy

jquery post

jquery post
Use html5 to validate email before submit. Forget your username/password? Simply type your email address below and click Submit and you will receive them in an email.Read More

php mysqli store_result

php mysqli store_result
When using prepare to prepare a statement to retrieve LOBs the method order matters. Also, method ‘store_result()’ must be called and be called in correct order. Failure to observe this causes PHP/MySQLi to crash or return an erroneous value. The proper procedure order is: prepare -> execute -> store_result -> bind -> fetchRead More

Install phpsh on ubuntu

Install phpsh on ubuntu
apt-get install python-setuptools python-dev build-essential apt-get install python2.6-pysqlite2 git clone git://github.com/facebook/phpsh.git cd phpsh python setup.py build python setup.py install phpshRead More

learn java: set classname as method type

learn java: set  classname as method type
public class SavingsAccount { /** * output: * * 3000 * 7000 * 10000 */ int balance; static int totalBalance; //constructor SavingsAccount(int balance) { this.balance = balance; } //Classname as method type. User return this SavingsAccount deposit(int amount) { balance += amount; totalBalance = totalBalance + balance; return this; } //method void type void printBalance() […]Read More

Learn java: Contructors vs methods

Learn java: Contructors vs methods
public class Car { /**Output: My car has 4 doors Your car has 3 doors Your car is driven by your wife */ String make; String model; int numDoors; // constructor, applying to all cars Car(String make, String model, int numDoors) { this.make = make; this.model = model; this.numDoors = numDoors; } //constructor set default […]Read More