- 浏览: 266596 次
- 性别:
- 来自: 苏州
最新评论
-
honey_fansy:
你这是使用,不是实现吧。。。
java 简单实现AES/DES加解密 -
www314599782:
厉害,知道怎么横向了
JXLS Demo -
lijiejava:
...
Hessian 简单例子 -
dxqrr:
good..........
Spring 生命周期 -
zhaokai2daisai:
你需要先在iReport-5.6.0\iReport-5.6. ...
JasperReport 简单使用(数据库源为数据库)
文章列表
jedis.RedisOperationCollection.java
package jedis;
import org.apache.log4j.Logger;
import redis.clients.jedis.Jedis;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class RedisOperationCollection {
private static Logger logger = Logger.getLogger(RedisOp ...
1. 下载 redis for windows https://github.com/MSOpenTech/redis(github上的要用Visual Studio做build,还是用我上传的吧).
2.解压缩redisbin_x64
3. 启动 redis server (启动是可指定redis.conf)
4. 启动client
1. 安装memcached server
a. 下载memcached-1.2.6-win32-bin.zip
b. 解压缩,dos 窗口切换到 memcached.exe所在目录,运行memcached.exe -d install
c.启动memcached Server,直接在dos窗口键入 net start "memcached Server" (也可在windows服务列表中手动启动)
2. memchached client
memcached.People.java
package memcached;
import java. ...
hello.hessian.MyCar.java
package hessian.pojo;
import java.io.Serializable;
public class MyCar implements Serializable {
private static final long serialVersionUID = 4736905401908455439L;
private String carName;
private String carModel;
public String getCarName( ...
reflect.ClassInformationUtil.java
package reflect;
import javassist.ClassPool;
import javassist.CtClass;
import javassist.CtMethod;
import javassist.Modifier;
import javassist.bytecode.CodeAttribute;
import javassist.bytecode.LocalVariableAttribute;
import javassist.bytecode.MethodInfo;
i ...
velocity.VelocityUtil
package velocity;
import org.apache.velocity.Template;
import org.apache.velocity.app.Velocity;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.context.Context;
import org.apache.velocity.tools.ToolManager;
import java.io.StringWriter;
/* ...
grep [options] [regex] [files]
/var/root # grep -n "o" *
hello.c:1:/* This C source can be compiled with:
hello.c:3: tcc -o hello hello.c
hello.c:5: ...
1. SSLServer.java
package ssl;
import java.io.FileInputStream;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.security.KeyStore;
import java.util.logging.Logger;
import javax.net.ServerSocketFactory;
import javax.net.ssl.KeyManagerFacto ...
1. XmlValidation.java
package xml.validation;
import java.io.InputStream;
import javax.xml.XMLConstants;
import javax.xml.transform.stream.StreamSource;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import javax.xml.validation.Validator;
public class X ...
一 创建JavaBean数据源
二 创建Report模板
三 生成报表
jasperreport.javabean.User.java
package jasperreport.javabean;
import java.util.Date;
public class User {
private String username;
private Date birthday;
public User(String username, Date birthday) {
this.username = username;
...
一 创建数据库数据源
二 创建Report模板
1. 文件 -> 新建
2. 编辑SQL
3. 创建元素
三 生成报表
jasperreport.datasource.ConnectionProvider.java
package jasperreport.datasource;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class ConnectionProvider {
p ...
1. 创建一个maven项目
2. 创建com.CoberturaStart.java
package com;
public class CoberturaStart {
public void helloEveryone(){
System.out.println("============================================================");
System.out.println("hello everyone!!!");
System.out.println(&qu ...
1. 下载(http://archive.apache.org/dist/jakarta/jmeter/binaries/)
2. 启动JMeter(版本2.11)
3. 创建线程组
创建的线程组如下。
名称:线程组的名字
线程数:线程启动的数量
Ramp-Up Period : 代表启动全部的线程数需要的时间
循环次数:代表循环的次数
4. 创建http 请求
创建的http请求如下:
在服务器名称或IP中填入要测试的主机名或IP
在端口号上填入指定的端口
在路径上填入指定的url path
5. 添加监听器
6. ...
1. 创建线程池
ExecutorService executorService = Executors.newCachedThreadPool();
2. 执行一次线程,调用Runnable接口实现
Future<?> future = executorService.submit(new DefaultRunnable());
System.out.println(future.get());
当线程池执行Runnable后,返回的Future.get()总是null
DefaultRunnable代码如下:
package threadpool; ...
package jfreechart;
import java.awt.Color;
import java.awt.Font;
import java.io.File;
import java.io.IOException;
import java.util.Random;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.StandardChart ...