随笔分类 - JAVA
摘要:DruidDataSource配置 https://github.com/alibaba/druid/wiki/DruidDataSource配置 DruidDataSource配置属性列表 https://github.com/alibaba/druid/wiki/DruidDataSource配
阅读全文
摘要:ExecutorService fixedThreadPool = Executors.newFixedThreadPool(5)创建一个定长线程池,可控制线程最大并发数,超出的线程会在队列中等待 package UnitTest; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Ex...
阅读全文
摘要:import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; public class test11 { public static void main(String[] args) {// TODO ...
阅读全文
摘要:【JavaScripst效果】全选、全不选、反选 选择列表 选项1 选项2 选项3 选项4 选项5 选项6 选项7 选项8 选项9 选项10 全选反选确定
阅读全文
摘要:/** * 获得指定文件的byte数组 */ private byte[] getBytes(String filePath){ byte[] buffer = null; try { File file...
阅读全文
摘要:nginx.conf location / { proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; ...
阅读全文
摘要:import com.alibaba.fastjson.JSONArray;import com.alibaba.fastjson.JSONObject;public class testJson { /** * @param args */ public static ...
阅读全文
摘要:import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.Date;/** * 日期工具类 默认使用 "yyyy-MM-dd HH:mm...
阅读全文
摘要:jar包:http://pan.baidu.com/s/11ikCY import net.sourceforge.pinyin4j.PinyinHelper;import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;impor...
阅读全文
摘要:ActiveMQ简介 1. 什么是ActiveMQ ActiveMQ是一种开源的,实现了JMS1.1规范的,面向消息(MOM)的中间件,为应用程序提供高效的、可扩展的、稳定的和安全的企业级消息通信。ActiveMQ使用Apache提供的授权,任何人都可以对其实现代码进行修改。 ActiveMQ的设计...
阅读全文
摘要:1、生成CSV jar包:http://pan.baidu.com/s/1xIL26 String csvFilePath = "d:\\test.csv";CsvWriter wr =new CsvWriter(csvFilePath,',',Charset.forName("UTF-8"))...
阅读全文
摘要:Cron 表达式包括以下 7 个字段 格式: [秒] [分] [小时] [日] [月] [周] [年]说明 是否必填 允许填写的值 允许的通配符秒 是 0-59 , - * /分 ...
阅读全文
摘要:http://fabien-d.github.io/alertify.js/
阅读全文
摘要:下载地址:http://pan.baidu.com/share/link?shareid=1894002026&uk=1829018343 这里出现第一步引导 这里出现第二步引导 这里出现第三步引导
阅读全文
摘要:官方地址:http://www.lingala.net/zip4j/(需要FQ) jar包:http://pan.baidu.com/s/145hwI 演示包:http://pan.baidu.com/s/1vbFIB 一、压缩 1、标准压缩 ZipFile zipFile = new ZipF...
阅读全文
摘要:Properties myProperty = new Properties();String jdbcPath = PathKit.getWebRootPath()+File.separator+"WEB-INF"+File.separator+"classes"+File.separator...
阅读全文
摘要:File f = new File(save_path+File.separator + resouce_id+".zip"); FileInputStream fis = new FileInputStream(f); String resource...
阅读全文
摘要:在JAVA7中提供了新的遍历文件的方法,比原有File类的递归遍历效率要好大约30%左右。 测试结果: 测试用的File类的递归,是经过对比测试几种方法,找出相对效率较好的来和JAVA7进行测试。 1、12749个文件夹,83805个文件,大小43.5 GB JAVA7:执行耗时 1.15 秒。 F...
阅读全文