Archive for the ‘IT’ Category

Howto use vnkeys with TextField

vnkeys is originally designed to work with flash.text.TextField and you can feel it when typing. The replacement happens smoothly. It is easy to use and the code bellow will explain how to… package { import flash.display.Sprite; import flash.text.TextField; import flash.text.TextFieldType;   import org.vnmedia.vnkeys.KeyConverter; import org.vnmedia.vnkeys.mapping.VNIMap; // define swf dimension [SWF(width=160, height=60)] // this is an [...]

How to bootstrap, autoload modules and classes with Zend framework

This post is for you that have read this quick start from Zend and our goal is to create a bootstrap like this one. We assume that you know how to create a project, layout, module, controller and action by using zf.bat, zf.sh or manually and further that you are able to create a helloworld [...]

How to install a .deb file

To install package called package.deb type the following command (make sure that all dependencies are installed) sudo dpkg -i /path/to/folder/package.deb

How to provide users options to switch on/off when using vnkeys

The goal of this post is to show how we can create a radio button group so users can switch on and off when using vnkeys as the swf above. To create TextArea and TextInput we use input components that follows vnkeys (see this how to for details). Bellow is our code example where we [...]

how to use vnkeys with flex

In the package org.vnmedia.flex we find two subclasses of Flex controls class. FlexTextInput is extending TextInput and FlexTextArea extending TextArea. Those two inherit all functionalities from their parent. We just added some more code handling the typing since TextInput and TextArea behaves unlike TextField. It is simple to use. You just need to declare namespace [...]

How to type vietnamese with VNI input method that is implemented in vnkeys

Bellow is a table on how to hit the keyboard (left hand side) to get the vietnamese letter (right hand side) VNI => Vietnamese a1 => á a2 => à a3 => ả a4 => ã a5 => ạ a6 => â o7 => ơ a8 => ă d9 => đ We do not implement [...]

How to implement singleton pattern in actionscript 3

In actionscript 3 one can not use private scope for constructor and you need a workaround to implement simgleton pattern. Following is one way that I use package { public class Singleton { private static var instance:Singleton; private static var isAllowedInstance:Boolean;   public function Singleton() { if (!isAllowedInstance) { throw new Error("Please use " + [...]

How to get svn revision in ant using svn or svnversion

This article is aimed to you whom use svn in linux environment. If you are using windows and Tortoise this post may be more interesting. Here are two ways to get revision number when you build your project. The first one is a complete method to get this number and the second one will give [...]

How to run php script via putty or command line

If you need to run a php script in Linux environment via putty or other clients and want to close client without terminating the running process of php script you may need to do as bellow. The keyword is nohup … nohup php policyserver.php > /dev/null 2>&1 &

How to wrap your actionscript class/application and add it to flex application

Sometimes ago I started to learn actionscript 3 and the go was to code for the game nought and crosses with a simple AI. To save time I used Flex componnents to create button and other containers. I was running on problem to add my application to flex application. Flex refused to add my objects [...]