Archives for: April 2009
Setup Perl project
April 30th, 2009Using h2xs to generate skeleon
h2xs -A -X -n name_of_project
Git 中文教程
April 29th, 2009Link: http://www.bitsun.com/documents/gittutorcn.htm
Git 中文教程
Config Catalyst
April 27th, 2009Catalyst Configure Schema
1, App class will load config option into self.
2, Other class query App class about its config option. For example, Model::DB will try to query its option in $config->{Model}->{DB}.
3, Catalyst default uses Config::General to load config from {app_name}.conf
4, Class can setup configure item in its source file by __PACKAGE__->config( {info} ), and this config function will return the current package level configure options.
Local config
By default, Catalyst try to local appname.conf, but it also try to load a local config file: appname_local.conf, which contains high priority value than appname.conf.
The __PACKAGE__->config() has lowest priority.
So use __PACKAGE__->config() to setup default configuration.
Use appname.conf to setup configure wish included into version manager system.
Use appname_local.conf to complete items in release mode.
User can use envoriment variable CONFIG_LOCAL_SUFFIX to change 'local' to other value.
Config::General config format
<name1> will map to a named field: $parent->{name1} = { value inside block }.
<name1 name2> will map to $parent->{name1}->{name2}
name = value will match to name=>value
name = value1 will match to
name = value2name => [ value1, value2 ]
Build perl for android platform
April 27th, 2009Find a google project for building perl in android: perldroid which has a wiki page.
I follow the instruction of it and try it on ubuntu 8.10 machine. But unfortunatly, I am failed. I checked the compile error, I guess the reason is that bonic (Android's verion libc) lack the define of div_t. I will try to build it later.
Extract and Remake android YAFSS image
April 26th, 2009Android use YAFFS2 as its root filesystem.
For extract it, you can use a tool named "unyaffs", which can be found in http://code.google.com/p/unyaffs/.
This tool will extract content of image file into current directory. You'd better to create a new directory to hold them.
For making YAFFS2 image, please use binary tool mkyaffs2image. The tool is built in ./out/host/linux-x86/bin/mkyaffs2image
Using LD, the GNU linker - Table of Contents
April 23rd, 2009publications:perl-on-android-2 [gtmp.org]
April 23rd, 2009Main Page - AndroidInternals
April 23rd, 2009Link: http://www.android-internals.org/index.php?title=Main_Page
Android wiki
Closure in JavaScript
April 16th, 2009var tag;
var func = function(){
return afunc( tag );
}
is not a correct usage.
The correct one is:
var genFunc = function( ptag ){
var ltag = ptag;
return function(){afunc( ltag )};
};
genFunc( tag );
YUI Test
April 16th, 20091, Add message to Assert statement to make code easy.
2, Use subscribe() listen custom event of TestRunner.
3, Use YAHOO.log() to output log.
4, var Assert = YAHOO.util.Assert to use YAHOO's assert.
A Javascript stacktrace in any browser - Eric Wendelin%u2019s Blog
April 16th, 2009Link: http://eriwen.com/javascript/js-stack-trace/
Nice article.
Linux 设备驱动 Edition 3
April 14th, 2009Link: http://www.deansys.com/doc/ldd3/index.html
Linux 设备驱动 Edition 3
GNU Compact Disc Input and Control Library (libcdio)
April 13th, 2009Link: http://www.gnu.org/software/libcdio/
CDImage/ISO9660 manipulate library