Bài đăng

Đang hiển thị bài đăng từ tháng 8 9, 2009

HOWTO – Apache2 + Subversion + SSL

sucess-subversion-apache2-ssl-ubuntu-710-with-users ubuntu-install-php5-mysql-apache2-ssl-pdo-pdo_mysql http://linuxhappy.wordpress.com/2008/01/21/sucess-subversion-apache2-ssl-ubuntu-710-with-users/ http://www.theatons.com/ubuntu-install-php5-mysql-apache2-ssl-pdo-pdo_mysql

Flashplayer for UBUNTU x32 & x64

To install it download from here: http://labs.adobe.com/downloads/flashplayer10.html cd tar xvzf libflashplayer-10.0.22.87.linux-x86_64.so.tar.gz mkdir -p .mozilla/plugins mv libflashplayer.so .mozilla/plugins Restart firefox. Go to about:plugins to check (^_^) cách khác: #!/bin/bash # Script created by # Romeo-Adrian Cioaba romeo.cioaba@spotonearth.com # Super minor updates by jason.melton[at]gmail[dot]com # Released under GPL echo "Stopping any Firefox that might be running" sudo killall -9 firefox echo "Removing any other flash plugin previously installed:" sudo apt-get remove -y --purge flashplugin-nonfree gnash gnash-common mozilla-plugin-gnash swfdec-mozilla libflashsupport nspluginwrapper sudo rm -f /usr/lib/mozilla/plugins/*flash* sudo rm -f ~/.mozilla/plugins/*flash* sudo rm -f /usr/lib/firefox/plugins/*flash* sudo rm -f /usr/lib/firefox-addons/plugins/*flash* sudo rm -rfd /usr/lib/nspluginwrapper echo "Installing ia32-libs and nspluginwrapper" s

Software RAID Ubuntu

Step 1: Prepare the Disks: http://forum.niit.vn/showthread.php?t=9201 http://vozforums.com/showthread.php?t=149812 http://ultimateedition.info/ root@iscsi:/# fdisk -l Disk /dev/sda: 5368 MB, 5368709120 bytes 255 heads, 63 sectors/track, 652 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x000185b0 Device Boot Start End Blocks Id System /dev/sda1 * 1 617 4956021 83 Linux /dev/sda2 618 652 281137+ 5 Extended /dev/sda5 618 652 281106 82 Linux swap / Solaris Disk /dev/sdb: 8589 MB, 8589934592 bytes 255 heads, 63 sectors/track, 1044 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x90f9feaa Device Boot Start End Blocks Id System /dev/sdb1 1 1044 8385898+ 7 HPFS/NTFS Disk /dev/sdc: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x4430ddbd Device Boot Start End Blocks Id System /dev/sdc1 1 131 1052226 7 HPFS/NTFS /dev/sdc2 132 2610 19912567+ 7 HPFS

Dispatching Custom Events in AS3 with data or object

detail here to send custom information or data to the listener object when a custom Event is going to be dispatched. So here is what i have done to achieve the same The flash new Event mechanism provides you a facility to create a new event and the default constructor call is something like this Event(type:String, bubbles:Boolean = false, cancelable:Boolean = false) so there is no by default parameter to send information across the dispatcher and listener objects ( Other than using event.target.*** method on listener end). Following is the code i have done for overcome this Create a CustomEvent.as Class as following package eventsSystem { import flash.events.Event; public class CustomEvent extends Event { public static const ONLOADED:String = “OnLoaded”; //———– Define your custom Event string constant public var data:*; //————- Define a data variable of * type to hold any kind of data object //———— Constructor public function CustomEvent(type:String, data:*) { this.data= dat

The Model-View-Controller Design Pattern in Actionscript 3

Hình ảnh
The-Model-View-Controller http://en.wikipedia.org/wiki/Model_view_controller The MVC Design Pattern Creates a separation of Class roles Adds a clear and logical communication structure Increases flexibility in larger applications Model Handles data storage and retrieval (eg. Store character x position) View Handles the display/communication (eg. Position character on stage) Controller Handles most the of the application logic (eg. Get current x position) MVC – basic structure Each model can have multiple views Each view has at least one matching controller Creates a separation between form, content and action The model becomes the base of the application Communication Model MVC planning example - Pacman Game Here is a simple application to show MVC in action Application abstract: A circle which changes colour randomly every time a button is pressed Designing the simple application Broken down into the MVC pattern this would look like: Download a basic Actionscri