luogen33的博客
luogen33 · 共 48 篇文章
ORACLE 数据库
删除重复记录 delete from acc a1 where rowid != (select max(rowid) from acc a2 where a1.name = a2.name and a1.age = a2.age) 分页 select a2.* from (select a1.*, rownum rn from acc a1) a2 where a2.rn > 1 and rownum <= 2 Rownum 与 rowid 的区别 select * from acc where rownum > 0 // 查出全部结果 select * from acc where ro…
2013-08-13 10:50 · 评论(0)
Tomcat 配置 JNDI
JNDI 配置 第一种:全局配置 在tomcat的conf文件夹下的context.xml配置文件中加入: <!--全局配置--> <!-- <Resource name="jndi/mybatis" auth="Container" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/test" username="root" password="123456" maxActive="50" maxIdle="25" maxWait="500…
2013-05-06 15:51 · 评论(1)
JBOSS 配置指南
jboss7体验及配置入门1、jboss 7.0.2.Final 发布arc版本了,抢先体验下。下载地址:http://www.jboss.org/jbossas/downloads,下载Web Profile Only (Java EE6 Certified)版本。 2、把jboss-as-web-7.0.2.Final解压缩到D:\j2ee目录下,完整目录是D:\j2ee\jboss-as-web-7.0.2.Final。 3、安装jdk1.6到D:\j2ee\jdk目录。设置环境变量如下: 系统变量->新建->变量名:JAVA_HOME 变量值:D:\j2ee\jdk 系统变量->新建…
2013-04-26 10:15 · 评论(0)
perl读写文件
#!/usr/bin/perl my $SRC_FILE="/home/lgg/t.txt"; my $DEST_FILE="/home/lgg/dest.txt"; if (open (SRCFILE ,"<$SRC_FILE")) { open (DESTFILE ,">$DEST_FILE"); my @reads = ; my $count=$#reads; my $curr_index= 0; while($curr_index <=$count) { my $line = $reads; $line=~s/^\s+|\s+$//g; if ( nil ne $line && ""…
2012-05-23 10:03 · 评论(0)
perl 学习
#config the country No. COUNTRY_CODE= 7 #config the MMSCID of the MMSC Server MMSC_ID= MMS #config the host name of the MMSC Server HOST_NAME = HUAWEI #config the dir of logs LOG_PATH= $HOME/mms_home/cdr/changeBill/log #config the source bill file's path. SRC_CDR_PATH = $HOME/mms_home/cdr/bill/send…
2012-05-11 11:19 · 评论(14)
DB2 数组
CREATE TYPE IDList AS INTEGER ARRAY; CREATE TYPE Projects AS VARCHAR(100) ARRAY; CREATE TYPE Resumes AS XML ARRAY;
2012-05-02 22:41 · 评论(7)
soap开发
创建web工程。编写java接口文件。 Com.Java.pojo User.java Public class User{ Private String name; Private int age; Public void setName(String name){this.name=name;} Public String getName{return this.name;} Public void setAge(int age){this.age=age;} Public String getAge{return this.age;} } Public class Result{ Pr…
2011-12-28 16:22 · 评论(0)
log4j配置
log4j.properties配置详解 stone 的 log4j配置详解 Log4J的配置文件(Configuration File)就是用来设置记录器的级别、存放器和布局的,它可接key=value格式的设置或xml格式的设置信息。通过配置,可以创建出Log4J的运行环境。 配置文件 Log4J配置文件的基本格式如下: #配置根Logger log4j.rootLogger = , appenderName1 , appenderName2 , … #配置日志信息输出目的地Appender log4j.appender.appenderName = fully.qualified.na…
2011-12-23 23:51 · 评论(1)
JAVA获得硬件使用信息
http://sharejava.iteye.com/blog/1221048 采用singar.jar实现,需要将sigar-x86-winnt.dll、sigar-x86-winnt.lib放到系统的ClassPath中,同样支持Linux系统,需要加入libsigar-x86-linux.so到类路径中, singar项目网站:http://support.hyperic.com/display/SIGAR/Home 代码: Java代码 1.import java.net.InetAddress; 2.import java.net.UnknownHostException; 3. …
2011-12-22 14:42 · 评论(1)
perl 计算时间间隔
#计算时间间隔 sub gettimemun(){ my ($time,$timelc,$sec,$min,$hour,$mday,$mon,$year); $time = @ ; my @time = reverse(split /-|:|\s|//,$time); foreach(@time){ s/^0//; $timelc .= $ .","; } $timelc =~ s/,$//; ($sec,$min,$hour,$mday,$mon,$year) = split /,/,$timelc; $year -= 1900; $mon -= 1; $timelc = timeloca…
2011-12-16 17:39 · 评论(0)
FilenameFilter文件过滤
import java.io.File; import java.io.FilenameFilter; public class ImageFilter implements FilenameFilter{ public boolean isGif(String file) { if (file.toLowerCase().endsWith(".gif")){ return true; }else{ return false; } } public boolean isJpg(String file){ if (file.toLowerCase().endsWith(".ff")){ ret…
2011-12-15 10:42 · 评论(0)