http://www.youngzsoft.net/ccproxy/proxy-server-download.htm
CC Proxy
Tuesday, May 24, 2011
Monday, May 23, 2011
perl send email cgi
Lots of tutorials about sending email with perl depend on some uncommon libs.
There is a common way to do so:
use Net::SMTP::SSL;
sub send_mail {
my $to = $_[0];
my $subject = $_[1];
my $body = $_[2];
There is a common way to do so:
use Net::SMTP::SSL;
sub send_mail {
my $to = $_[0];
my $subject = $_[1];
my $body = $_[2];
perl session cgi
http://search.cpan.org/dist/ CGI-Session/lib/CGI/Session/ Tutorial.pm
$session = CGI::Session->load() or die CGI::Session->errstr;
if ( $session->is_expired ) {
die "Your session expired. Please refresh your browser to re-start your session";
}
if ( $session->is_empty ) {
$session = $session->new();
}
$session = CGI::Session->load() or die CGI::Session->errstr;
if ( $session->is_expired ) {
die "Your session expired. Please refresh your browser to re-start your session";
}
if ( $session->is_empty ) {
$session = $session->new();
}
print $session->header();
#save into session
$session->param('username',$username);
#read from session
$variable = $session->param('username');
Saturday, May 14, 2011
Dig into VIM
Input :h! in vim , what u find!?
Then :h 42 ....
quick command : http://jrmiii.com/attachments/Vim.pdf
vim cookbook: http://vim.runpaint.org/
U can also use vim in eclipse http://eclim.org/
Make vim easier to use: http://vim-taglist.sourceforge.net/installation.html (CTAGS needed)
Split screen :http://coolshell.cn/articles/1679.html
Make vim for perl : http://www.thegeekstuff.com/2009/01/make-vim-as-your-perl-ide-using-perl-supportvim-plugin/
Hot Keys : http://lug.fh-swf.de/vim/vim-perl/perl-hot-keys.pdf
#perltidy is a powerful tool to auto format the code, the hot key is \ry
Scripts : http://www.vim.org/scripts/script_search_results.php?order_by=rating
A modern vim for new guys: http://cream.sourceforge.net/index.html
Then :h 42 ....
quick command : http://jrmiii.com/attachments/Vim.pdf
vim cookbook: http://vim.runpaint.org/
U can also use vim in eclipse http://eclim.org/
Make vim easier to use: http://vim-taglist.sourceforge.net/installation.html (CTAGS needed)
Split screen :http://coolshell.cn/articles/1679.html
Make vim for perl : http://www.thegeekstuff.com/2009/01/make-vim-as-your-perl-ide-using-perl-supportvim-plugin/
Hot Keys : http://lug.fh-swf.de/vim/vim-perl/perl-hot-keys.pdf
#perltidy is a powerful tool to auto format the code, the hot key is \ry
Scripts : http://www.vim.org/scripts/script_search_results.php?order_by=rating
A modern vim for new guys: http://cream.sourceforge.net/index.html
Tuesday, May 10, 2011
Java sort list -- Collections.sort sample
public static void Sort(List<Movies> items) {
Collections.sort(items, SENIORITY_ORDER);
}
static final Comparator<Movies> SENIORITY_ORDER =
new Comparator<Movies>() {
public int compare(Movies e1, Movies e2) {
if (e1.getReleaseDate().after(e2.getReleaseDate()))
return 1;
else
return -1;
}
};
Thursday, April 14, 2011
Set Window on top of others
The correct way to implement a modal window is by setting this.Owner = Application.Current.MainWindow; in the XAML, and show the dialog by using DialogName.ShowDialog();
Subscribe to:
Posts (Atom)