- 浏览: 82623 次
- 性别:
- 来自: 南京
文章列表
删除重复记录
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 的区别
...
JNDI 配置
第一种:全局配置
在tomcat的conf文件夹下的context.xml配置文件中加入:
<!--全局配置-->
<!--
<Resource name="jndi/mybatis"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql:// ...
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 ...
#!/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 = <SRCFILE>;
my $count=$#reads;
my $curr_index= 0;
while($curr_index &l ...
[SYSTEM1]
#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/ ...
CREATE TYPE IDList AS INTEGER ARRAY[1000];
CREATE TYPE Projects AS VARCHAR(100) ARRAY[50];
CREATE TYPE Resumes AS XML ARRAY[];
1. 创建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;}
...
log4j.properties配置详解
stone 的 log4j配置详解
Log4J的配置文件(Configuration File)就是用来设置记录器的级别、存放器和布局的,它可接key=value格式的设置或xml格式的设置信息。通过配置,可以创建出Log4J的运行环境。
1. 配置文件
Log4J配置文件的基本格式如下:
#配置根Logger
log4j.rootLogger = [ level ] , appenderName1 , appenderName2 , …
#配置日志信息输出目的地Appender
log4j.appender.app ...
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.Un ...
#计算时间间隔
sub gettimemun(){
my ($time,$timelc,$sec,$min,$hour,$mday,$mon,$year);
$time = @_[0];
my @time = reverse(split /-|:|\s|\//,$time);
foreach(@time){
s/^0//;
$timelc .= $_.",";
}
$timelc =~ s/,$//;
($sec,$min,$hour,$mday,$mon,$year) = split /,/,$time ...
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; ...