孤独的猫

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2012年9月28日

摘要: #!/usr/bin/perl -wuse 5.010;my $dog='Spot';given ($dog) { when (/o/) { say 'The name has an "o"'; continue } when (/t/) { say 'The name has an "t"'; continue } when (/d/) { say 'The name has an "d"'; continue }} 阅读全文
posted @ 2012-09-28 22:20 孤独的猫 阅读(270) 评论(0) 推荐(0) 编辑

摘要: 文件Slurp使用File::Slurp可以只需一个函数把文件内容读入标量或者按行保存到数组中use File::Slurp;my $text=read_file('filename');my @lines=read_file('filename'); 阅读全文
posted @ 2012-09-28 22:14 孤独的猫 阅读(253) 评论(0) 推荐(0) 编辑

摘要: #!/usr/bin/perl -wuse File::Temp qw(tempdir);use File::Spec::Functions;use LWP::Simple qw(getstore);my ($temp_dir)=tempdir(CLEARUP => 1);my %searches = ( google =>'http://www.google.com/#h1=en&q=perl', yahoo => 'http://search.yahoo.com/search?p=perl', microsoft =>  阅读全文
posted @ 2012-09-28 22:11 孤独的猫 阅读(301) 评论(0) 推荐(0) 编辑

摘要: #!/usr/bin/perl -wuse 5.010;open my ($points),'<','points.txt' or die "couldn't read points data: $!\n";while (<$points>) { next if /^\s*#.*$/; #跳过注释 push @xyz,[split];}foreach my $pt (@xyz) { print "point ",$i++,": x=$pt->[0],y=$pt->[1], & 阅读全文
posted @ 2012-09-28 22:00 孤独的猫 阅读(306) 评论(0) 推荐(0) 编辑

摘要: Hibernate-Extension和Middlegen-Hibernate参考Hibernate 开发指南V1.0作者:夏昕 xiaxin(at)gmail.com=========Hibernate学习笔记========构建Hibernate 基础代码1、POJO2、Hibernate 映射文件数据库表通过Middlegen-Hibernate生成ORM(对象-关系型数据映射)再通过Hibernate-Extension生成POJO,对数据库的操作就可在POJO上完成1、首先用Middlegen-Hibernate生成ORM配置目标数据库参数进入MiddleGen 目录下的\confi 阅读全文
posted @ 2012-09-28 21:47 孤独的猫 阅读(745) 评论(0) 推荐(0) 编辑

摘要: 使用MiddleGen 产生hibernate的数据库表映射文件发布: 2007-7-04 13:34 | 作者: admin | 来源: 网友评论 | 查看: 14次 | 进入软件测试论坛讨论领测软件测试网 1:下载Middlegen-Hibernate-r5地址:URL http://voxel.dl.sourceforge.net/sourceforge/hibernate/Middlegen-Hibernate-r5.zip2:解压缩将下载的解压缩,如 D:\Middlegen-Hibernate-r53:配置数据库文件进入D:\Middlegen-Hibernate-r5 目录下的. 阅读全文
posted @ 2012-09-28 21:46 孤独的猫 阅读(115) 评论(0) 推荐(0) 编辑