Categories: Web, Catalyst, HTML, Javascript, YUI
Ruby Html Parser
October 23rd, 2010Java Html Parser
October 23rd, 2010In Java World, HTML Parsers play a role that change dirty, untidy html pages in real word into a well-formatted HTML files.
Pure-Java Solution
Here is a summary page: Open Source HTML Parsers in Java
Using Firefox-DLL
Besides all these, there is a method to using firefox-dll to parse html. This method can get best result.
But this method is very hard to deploy and easy to broken.
Benchmark
Here is a benchmark result, which shows that CyberNeko is winner.
Javascript and CSS2 support
However, if you want to support javascript and css2, Cobra could be a good answer. Please check following blog Using the Lobo Cobra Toolkit to Retrieve the HTML of Rendered Pages
Google Reader API
October 23rd, 2010There is no official Google Reader API. All we have is a un-official api.
The latest is in http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI, but some information are outdated.
Auth process are changed. Here is notification and here is detail document.
History
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 ]
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 );