Wednesday, June 22, 2011

Play song synchronously between 2 androids

http://developer.android.com/reference/android/media/MediaPlayer.html#setVolume%28float,%20float%29

http://www.helloandroid.com/tutorials/simple-udp-communication-example

http://www.helloandroid.com/tutorials/musicdroid-audio-player-part-i

Saturday, May 14, 2011

Chromium and Thai language.

1. Download Tahoma font. หลังจากนั้น
sudo apt-get install msttcorefonts
cd ~
wget http://www.stchman.com/tools/MS_fonts/tahoma.zip
sudo unzip -d /usr/share/fonts/truetype/msttcorefonts ~/tahoma.zip
sudo fc-cache -f -v
rm -f ~/tahoma.zip
2.จากนั้นเข้าไปที่ .config/google-chrome/Default เปิดไฟล์ Preferences ขึ้นมา แล้วเพิ่มบรรทัดนี้เข้าไปตามรูป
“minimum_font_size”: 13,
“minimum_logical_font_size”: 13,

Friday, April 15, 2011

Hide index.php in Yii on XAMPP

Hiding index.php in yii

1.Go to your project directory i.e. htdocs/projectname create a .htaccess file
copy this in .htaccess file

Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php

2.Go to \xampp\apache\conf folder then open httpd.conf file uncomment the line

LoadModule rewrite_module modules/mod_rewrite.so

3. We need to change the AllowOverride directive also


Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Satisfy all


to


Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Satisfy all



5.Now restart the server and try the url.

Saturday, March 12, 2011

Install PHPUnit on XAMPP

Try:
pear install --force pear
pear channel-discover pear.phpunit.de
pear install --force --alldeps phpunit/PHPUnit

Post a comment if it doesn't work and i'll investigate further
Pear update Problems?

To update your PEAR installation, request http://pear.php.net/go-pear.phar in your browser and save the output to a local file go-pear.php. You can then run

php go-pear.php

if that doesn't work start the shell with admin privileges (rightclick -> run as admin).

Credit: http://stackoverflow.com/questions/5160228/unable-to-install-phpunit-pear-package-in-xampp