上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: Timer定时器package com.ttpod.task;import java.util.Date;import java.util.Timer;import java.util.TimerTask;public class TaskManager { //对象 SomeService someService = new SomeService(); //日期 Date date = new Date(); //每次提前3秒钟执行任务 long three_second = 3000; //定时器 Timer timer = new Timer(); //执行任务 public void 阅读全文
posted @ 2012-08-14 18:19 维唯为为 阅读(363) 评论(0) 推荐(0) 编辑
摘要: java笔记1(策略、代理模式、枚举、反射、注解)一个简单策略模式示例的实现1.策略模式的组成2.策略模式的实现3.策略械的编写步骤注:java中的Collections 就是策略模式的一个实现, 其中的很多方法通过传入不同的比较器,实现不同形式的比较。4.定义一个实体类package com.vvvv.strategy;public class Person{ private int id; private String name; private int age; …………get/set方法…………}5.定义策略接口package com.vvvv.strategy;import java 阅读全文
posted @ 2012-07-31 21:37 维唯为为 阅读(624) 评论(0) 推荐(0) 编辑
摘要: 说明 把配置信息,存储在配置的Bean中,再把Bean以集合的形式存储于Map当中,再将Map转成Json字符串,存储于集合当中。 配置工具类 配置工具类,用于获得配置信息存储配置信息 ConfigUtil.javapackage com.vvvv.musicsns.util; import com.google.gson.Gson; ... 阅读全文
posted @ 2012-07-30 20:13 维唯为为 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 1.经典的创建线程与启动线程1.建一个如下的Runable子类:Runnable runnable =new Runnable(){ publicvoid run(){ System.out.println("Run"); }}2.实例化一个Thread来执行这个线程More info see: Java Concurrency Tutorial2.运用线程池1.示例1,Future存于list中This is very simple and clean, but what if you’ve several long running tasks that you want 阅读全文
posted @ 2012-07-28 15:00 维唯为为 阅读(452) 评论(1) 推荐(0) 编辑
摘要: mysql 脚本: sql脚本use information_schema; drop database if exists lampssell; create database lampssell; use lampssell; /********系统部分**********//*** 用户表 */drop table ... 阅读全文
posted @ 2012-07-16 22:06 维唯为为 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 1.定义任务执行者2.构造任务、调度任务/** 26 * job service implements 27 * User: luowei 28 * Date: 12-7-8 29 * Time: 下午12:58 30 */31 @Service("jobService") 32 public class JobServiceImpl implements JobService { 33 34 @Autowired 35 NewestMusicService newestMusicService; 36 37 @Autowired 38 HotestMusicService 阅读全文
posted @ 2012-07-15 15:50 维唯为为 阅读(750) 评论(0) 推荐(0) 编辑
摘要: 1.使用TreeMap<K,V>实现对Map<K,V>排序TreeMap中,是实现了对key的排序,不能根据value的大小来排序,其中的K,必须实现一个可比较的接口。1. TreepMap通过传入比较器的构造方法 public TreeMap(Comparator<? super K> comparator) { this.comparator = comparator; } 2.也可以通过comparator()方法传入 public Comparator<? super K> comparator() { return comparator 阅读全文
posted @ 2012-07-15 15:15 维唯为为 阅读(1008) 评论(0) 推荐(0) 编辑
摘要: The Quartz JAR Files The Quartz package includes a number of jar files, located in root directory of the distribution. The main Quartz library is named quartz-all-xxx.jar (where xxx is a version number). In order to use any of Quartz's features, this jar must be located on your application's 阅读全文
posted @ 2012-06-25 12:29 维唯为为 阅读(712) 评论(0) 推荐(0) 编辑
摘要: 此毕业设计做的一个灯具销售系统。。。。链接:此文链接 阅读全文
posted @ 2012-06-20 19:58 维唯为为 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 网络配置 方案一 tip 1使用ifconfig : ifconfig eth0 新ip然后编辑/etc/sysconfig/network-scripts/ifcfg-eth0,修改ip一、修改IP地址 [aeolus@db1 network-scripts]$ vi ifcfg-eth0DEVICE=eth0ONBOOT=yesBOOTPROTO=staticIPADDR=2... 阅读全文
posted @ 2012-05-05 13:50 维唯为为 阅读(938) 评论(0) 推荐(1) 编辑
摘要: come form: http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos This post will cover installation and configuration of Tomcat 6 on CentOS 5.We will also show how to run Tomcat as a servi... 阅读全文
posted @ 2012-05-04 19:32 维唯为为 阅读(393) 评论(0) 推荐(0) 编辑
摘要: 以前的方式(getResourceAsStream)直接读取资源文件 public class CreateVvvvid { public static Map<String, AtomicInteger> vvvvidCreateMap = new HashMap<String, AtomicInteger>(); static { ... 阅读全文
posted @ 2012-04-30 11:47 维唯为为 阅读(603) 评论(0) 推荐(0) 编辑
摘要: 介绍:EHCache 是一个快速的、轻量级的、易于使用的、进程内的缓存。它支持 read-only 和 read/write 缓存,内存和磁盘缓存。是一个非常轻量级的缓存实现,而且从 1.2 之后就支持了集群。配置:EHCache的配置非常灵活,可以在声明里配置,也可以在xml、程序中、构造函数中配置。下面在程序中动态的改变Cache的配置,如下:Cache cache = manager.getCache("sampleCache");CacheConfiguration config = cache.getCacheConfiguration();config.setT 阅读全文
posted @ 2012-04-24 16:01 维唯为为 阅读(3816) 评论(0) 推荐(1) 编辑
摘要: 信息系统的分析与设计(The Information Systems: Analysis and Design)数据流图(Data flow diagrams)流程图(Flowcharts)参考:Software Design and Modeling实体联系图(Entity-relationship diagrams) 阅读全文
posted @ 2012-04-11 13:44 维唯为为 阅读(671) 评论(0) 推荐(0) 编辑
摘要: js、css以及html 获得当前应用的路径 System.out.println("request.getContextPath():"+request.getContextPath());System.out.println("request.getSession().getServletContext().getContextPath():"+request.getSession()... 阅读全文
posted @ 2012-03-19 15:19 维唯为为 阅读(561) 评论(0) 推荐(0) 编辑
摘要: 作者:维唯为为 简单介绍 Hudson是一个可扩展的持续集成引擎(Continuous Integration Engine)。主要用于:持续、自动地构建/ 测试软件项目. 监控一些定时执行的任务; Sonar是一个开源的质量管理平台,专注于从项目到类方法的持续的分析和测量技术质量,它把代码质量相关软件集成到一起统一管理。 简单来说: hudson 是持续、自动地构建/ 测试软件项目;而sonar 则是持续,自动地统计并分析软件项目的相关质量数据,例如单元测试的通过率,覆盖率,代码的复杂度,代码的行数等等,用于评估和度量软件项目质量。 Sonar是一个开源的代码质量管理平台,专注于对从... 阅读全文
posted @ 2012-03-16 19:34 维唯为为 阅读(6691) 评论(0) 推荐(1) 编辑
摘要: windows 在Windows系统中,环境变量可分为用户变量和系统变量。用户变量可以被当前用户修改,而系统变量则只能由具有管理员权限的用户进行添加或修改。 配置环境变量 除了直接在"系统属性"窗口中修改,还可以在命令提示符或注册表编辑器中修改,甚至可以使用专门的程序函数进行修改。改变环境变量和环境变量中的值时,注意不要含有空格,也不要用中文。 方法一: 通过命令提示符修改。这... 阅读全文
posted @ 2012-03-14 18:24 维唯为为 阅读(1137) 评论(0) 推荐(0) 编辑
摘要: js学习参考博客:http://www.cnblogs.com/wzmaodong el表达式 <c:iftest="${NonEasouDown_flagnenull }"> <divstyle="background:#D2ECED;font-size:16;width:60%;">非宜搜歌曲</div> <div> ... 阅读全文
posted @ 2012-02-27 21:26 维唯为为 阅读(624) 评论(0) 推荐(0) 编辑
摘要: 获得当前应用的路径 System.out.println("request.getContextPath():"+request.getContextPath());System.out.println("request.getSession().getServletContext().getContextPath():"+request.getSession().getServletCont... 阅读全文
posted @ 2012-02-27 20:31 维唯为为 阅读(507) 评论(0) 推荐(0) 编辑
摘要: 用Jdk中的类解析xml xml/plant_catalog.xml <?xml version="1.0" encoding="ISO-8859-1"?> <!-- Edited with XML Spy v2007 (http://www.altova.com) --> <CATALOG> <PLANT> ... 阅读全文
posted @ 2012-02-20 23:43 维唯为为 阅读(1753) 评论(1) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页