I used GTK-recordMyDesktop to record step by step guide. The new recordMyDesktop produce .ogv as the output of the recording session. I tried to convert it to .flv using ffmpeg to the outcome is unusable. Finally, I use combination of mencoder and ffmpeg:-
mencoder -oac mp3lame -ovc lavc input.ogv -o middle.avi
ffmpeg -i middle.avi output.flv
This does what I want.
Monday, August 16, 2010
Tuesday, August 10, 2010
Enabling Logitech C250 Webcam in Skype 2.1 Beta (Ubuntu 10.04)
My Logitech C250 Webcam works with guvcviewer, but does not working directly with my Skype 2.1 Beta. When tested on the Video Device it just gave me a blank screen.
To make it work, I perform the following steps:-
And in the new skype file, type in the followings and saved:-
close gedit and change the new skype file access:-
Restart your Skype and test again with Video Device.
To make it work, I perform the following steps:-
cd /usr/bin
sudo mv skype skype.real
sudo touch skype
sudo gedit skype
And in the new skype file, type in the followings and saved:-
#!/bin/bash
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so XLIB_SKIP_ARGB_VISUALS=1 skype.real
close gedit and change the new skype file access:-
sudo chmod 755 skype
Restart your Skype and test again with Video Device.
Friday, August 6, 2010
Including Styles & Resources in Multi-Modules Flex Application
I have been developing KZLite http://www.kzlite.com which handle modularization with LoaderInfo class. The purpose of the modularization is simple, a module (a swf file which contains multiple class definition) will be loaded only when necessary. We need that as we have a lot of modules in HRMS software.
One of the confusing bumper when loading external swf with LoaderInfo is that control's styles and resource bundles information is not loaded in the main application. For example, my main application use RSL for the flex framework, the RSL will load class definition for ComboBox, DateField, but not their styles and resource bundles information (such as the format string), unless you used the particular component in the main application itself. This is because when compiling the main application, the Flex compiler will find and include only styles and resource bundles information for controls that are used in the main application. However, in case where a control is used in a module but not in the main application (e.g. my main application is just a place holder to load module, and my module may use a DateField control), it will cause a lot of funny runtime errors, something like 'One of the properties is invalid' or 'cannot operate on null' etc.
To solve this, I usually have a IncludeClasses.as in my main application that include all control classes that my other modules will use. The following is my example IncludeClasses.as : -
And in the init() of the Application, add in this line:-
This will make the Flex compiler to think that those classes are in use and include their styles and resource bundle information.
One of the confusing bumper when loading external swf with LoaderInfo is that control's styles and resource bundles information is not loaded in the main application. For example, my main application use RSL for the flex framework, the RSL will load class definition for ComboBox, DateField, but not their styles and resource bundles information (such as the format string), unless you used the particular component in the main application itself. This is because when compiling the main application, the Flex compiler will find and include only styles and resource bundles information for controls that are used in the main application. However, in case where a control is used in a module but not in the main application (e.g. my main application is just a place holder to load module, and my module may use a DateField control), it will cause a lot of funny runtime errors, something like 'One of the properties is invalid' or 'cannot operate on null' etc.
To solve this, I usually have a IncludeClasses.as in my main application that include all control classes that my other modules will use. The following is my example IncludeClasses.as : -
package
{
import mx.charts.BarChart;
import mx.charts.PieChart;
import mx.controls.Button;
import mx.controls.CheckBox;
import mx.controls.ColorPicker;
import mx.controls.ComboBox;
import mx.controls.DataGrid;
import mx.controls.DateField;
import mx.controls.HSlider;
import mx.controls.HorizontalList;
import mx.controls.Image;
import mx.controls.LinkButton;
import mx.controls.List;
import mx.controls.MenuBar;
import mx.controls.NumericStepper;
import mx.controls.ProgressBar;
import mx.controls.RadioButton;
import mx.controls.TextArea;
import mx.controls.TextInput;
import mx.controls.TileList;
import mx.controls.Tree;
import mx.controls.VSlider;
internal class IncludeClasses
{
internal var button:Button;
internal var checkBox:CheckBox;
internal var colorPicker:ColorPicker;
internal var comboBox:ComboBox;
internal var dataGrid:DataGrid;
internal var dateField:DateField;
internal var linkButton:LinkButton;
internal var horizontalList:HorizontalList;
internal var hSlider:HSlider;
internal var image:Image;
internal var progressBar:ProgressBar;
internal var list:List;
internal var menuBar:MenuBar;
internal var numericStepper:NumericStepper;
internal var radioButton:RadioButton;
internal var textArea:TextArea;
internal var textInput:TextInput;
internal var tileList:TileList;
internal var tree:Tree;
internal var vSlider:VSlider;
internal var pieChart:PieChart;
internal var barChart:BarChart;
public function IncludeClasses()
{
}
}
}
And in the init() of the Application, add in this line:-
new IncludeClasses();
This will make the Flex compiler to think that those classes are in use and include their styles and resource bundle information.
Monday, August 2, 2010
Configuring ${DOCUMENTS} variable in Flash (Flex) Builder
When adding library reference in FB, if the particular .swc file is within the workspace, the FB will use ${DOCUMENTS} variable to refer to the targeted .swc file.
I had a problem when I created a maintenance branch in my SVN, being lazy to check out from the branch and re-setup my projects, I copied over my current working copy of trunk and do a quick switch. Every things work well except the ${DOCUMENT} variable is still referring to the old workspace directory.
Fortunately, I soon read from here that the ${DOCUMENTS} variable is actually set in the Workspace Preferences:-
Window -> Preferences -> General -> Workspace -> Linked Resources
You can also configure your custom variable there.
I had a problem when I created a maintenance branch in my SVN, being lazy to check out from the branch and re-setup my projects, I copied over my current working copy of trunk and do a quick switch. Every things work well except the ${DOCUMENT} variable is still referring to the old workspace directory.
Fortunately, I soon read from here that the ${DOCUMENTS} variable is actually set in the Workspace Preferences:-
Window -> Preferences -> General -> Workspace -> Linked Resources
You can also configure your custom variable there.
KZLite Payroll : The Quick Start Guides
KZLite Payroll comes with a set of Quick Start Guide (QSG) to assist the user to setup and maintain KZLite according to their own company requirements. The following lists the (QSG) available:-
Initial System Setup
-Company Setup
-Payroll Setup
Staff Record
-New Staff Joining
-Staff Resignation
-Staff Confirmation
-Staff Promotion / Transfer / Salary Adjustment
Payroll Process
-Create Payout Record
-Pay Salary Twice a Month (Mid Month & Month End Payroll Process)
-Payroll Statutory Export & Report (Monthly)
-Salary Crediting - Autopay & Report
-Advance Salary Processing
-Bonus Processing
When opened, a QSG shows a booklet style window that will guide you through the process step by step:-

For each step, they normally will have a 'Open Screen' link that will open the related screen. This convenient navigation way can greatly improve user's productivity when dealing with complex HR processes.
To try it, you can logon to our Online Demo.
Initial System Setup
-Company Setup
-Payroll Setup
Staff Record
-New Staff Joining
-Staff Resignation
-Staff Confirmation
-Staff Promotion / Transfer / Salary Adjustment
Payroll Process
-Create Payout Record
-Pay Salary Twice a Month (Mid Month & Month End Payroll Process)
-Payroll Statutory Export & Report (Monthly)
-Salary Crediting - Autopay & Report
-Advance Salary Processing
-Bonus Processing
When opened, a QSG shows a booklet style window that will guide you through the process step by step:-

For each step, they normally will have a 'Open Screen' link that will open the related screen. This convenient navigation way can greatly improve user's productivity when dealing with complex HR processes.
To try it, you can logon to our Online Demo.
Tuesday, July 27, 2010
KZLite Payroll is now Available
It has been a while since I updated this blog, I have been working full-force to reach a release point for the HRMS project written in Flex-Java.
The final project name is now fixed : KZLite for the suite name, and KZLite Payroll is currently available.
The website URL is http://www.kzlite.com.
There's a Online Demo version available (http://www.kzlite.com/demo), or you can download the installer to try it out on your local machine.
KZLite Payroll handles Malaysian Payroll Statutory requirements, and has ported many features from our Enterprise version of HRMS system (http://www.kzensolutions.com).
I will write about some useful tips in coming blogs.
The final project name is now fixed : KZLite for the suite name, and KZLite Payroll is currently available.
The website URL is http://www.kzlite.com.
There's a Online Demo version available (http://www.kzlite.com/demo), or you can download the installer to try it out on your local machine.
KZLite Payroll handles Malaysian Payroll Statutory requirements, and has ported many features from our Enterprise version of HRMS system (http://www.kzensolutions.com).
I will write about some useful tips in coming blogs.
Saturday, April 11, 2009
Learning Scala 1 : A Hello World
Scala is a powerful and interesting language to learn. Personally, I like it as the next generation of my daily written Java programming language.
To getting started with Scala is easy. Get a Scala distribution from http://www.scala-lang.org and unzip it to, for say C:\scala-2.7.3.final and set C:\scala-2.7.3\bin into your PATH environment variable. It requires Java runtime environment version 1.5 or later installed on your machine, I am having Sun JDK 6 Update 13 installed on my Windows XP machine.
After the above setup, you can start Scala Interpreter by entering 'scala' in command prompt:-
Alternatively, you can start the Scala Interpreter also by double clicking 'scala.bat' under the 'bin' folder. You should after the Scala Interpreter waiting for your command now:-
Now, let's type 3 + 5 into it:-
The 'res0' is a generated name to refer to the calculated value. You can try to print it out by using println():-
You can declare 'val' (value) or 'var' (variable) in Scala, 'val' works similar like 'final' in Java, which reassignment is not allowed. You can try reassign the 'res0' to something else and you should get an error:-
Now, let's declare a value call 'myValue':-
You can see that I do not declare any type for myValue, the Scala compiler is smart enough to infer the value type to String, optionally, you can write it in the following way:-
Now, let's print it out:-
That's complete my 'Hello World' in Scala!. ;-)
To getting started with Scala is easy. Get a Scala distribution from http://www.scala-lang.org and unzip it to, for say C:\scala-2.7.3.final and set C:\scala-2.7.3\bin into your PATH environment variable. It requires Java runtime environment version 1.5 or later installed on your machine, I am having Sun JDK 6 Update 13 installed on my Windows XP machine.
After the above setup, you can start Scala Interpreter by entering 'scala' in command prompt:-
C:\>scala
Alternatively, you can start the Scala Interpreter also by double clicking 'scala.bat' under the 'bin' folder. You should after the Scala Interpreter waiting for your command now:-
scala>
Now, let's type 3 + 5 into it:-
scala> 3 + 5
res0: Int = 8
The 'res0' is a generated name to refer to the calculated value. You can try to print it out by using println():-
scala> println(res0)
8
You can declare 'val' (value) or 'var' (variable) in Scala, 'val' works similar like 'final' in Java, which reassignment is not allowed. You can try reassign the 'res0' to something else and you should get an error:-
scala> res0 = 9
:5: error: reassignment to val
res0 = 9
Now, let's declare a value call 'myValue':-
scala> val myValue = "Hello World"
myValue: java.lang.String = Hello World
You can see that I do not declare any type for myValue, the Scala compiler is smart enough to infer the value type to String, optionally, you can write it in the following way:-
val myValue:String = "Hello World"
Now, let's print it out:-
scala> println(myValue)
Hello World
That's complete my 'Hello World' in Scala!. ;-)
Subscribe to:
Posts (Atom)
