上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页

2013年8月2日

摘要: Create Or Replace Trigger trg_view_report Instead Of Insert or update or delete on view_for_report for each rowDeclarebegin If Inserting Then if :new.temperature1 <= 250 then insert into originaldata_report (id, wid, wname, jurisdiction, jurisdiction_name, year, month, day, temperature, humidity) 阅读全文
posted @ 2013-08-02 18:12 世界之大追梦者 阅读(267) 评论(0) 推荐(0) 编辑
摘要: create or replace procedure proc_generate_report(in_date in varchar2) is v_retCode varchar2(20); v_retMsg varchar2(500);begin v_retCode:= ''; v_retMsg:= ''; insert into view_for_report select t.id, max(w.wid) wid, max(w.wname) wname, substr(max(t.time), 1, 4) year, substr(max(t.time) 阅读全文
posted @ 2013-08-02 18:09 世界之大追梦者 阅读(199) 评论(0) 推荐(0) 编辑
摘要: create or replace procedure proc_backup_originaldata(retCode out varchar2, -- 返回码 retMsg out varchar2) --返回信息isv_now varchar2(20):=to_char(sysdate,'yyyy-mm-dd');cursor c_backup is select * from originaldata t where t.time <=v_now;v_filename varchar2(50):=v_now||'.txt';v_datastr va 阅读全文
posted @ 2013-08-02 18:04 世界之大追梦者 阅读(251) 评论(0) 推荐(0) 编辑
摘要: //每次向originaldata表中插入数据就会触发该触发器create or replace trigger originaldata_to_alarm after insert on originaldata for each rowdeclare v_temperature num_array := num_array(1, 0); v_humidity num_array := num_array(1, 0); v_concentration num_array := num_array(1, 0);begin v_temperature.extend(10); v_humidity 阅读全文
posted @ 2013-08-02 17:53 世界之大追梦者 阅读(155) 评论(0) 推荐(0) 编辑
摘要: create or replace procedure proc_alarmlog(in_id in number, --采集器编码 ip_code in number, --采集器ip in_time varchar2, --采集时间 t_arr num_array, --温度数据 h_arr num_array, --湿度数据 c_arr num_array) --二氧化碳数据is min_table num_type := num_type(0); --仓库监控阈值范围最小值 max_table num_type := num_type(0); --仓库监控阈值范围最大值 state_t 阅读全文
posted @ 2013-08-02 17:49 世界之大追梦者 阅读(407) 评论(0) 推荐(0) 编辑

2013年7月31日

摘要: Date date=new Date();long hm=date.getTime(); //获取毫秒或者毫秒级:System.currentTimeMillis()纳秒级: System.nanoTime()用 System.nanoTime()public static long nanoTime()返回最准确的可用系统计时器的当前值,以毫微秒为单位。此方法只能用于测量已过的时间,与系统或钟表时间的其他任何时间概念无关。返回值表示从某一固定但任意的时间算起的毫微秒数(或许从以后算起,所以该值可能为负)。此方法提供毫微秒的精度,但不是必要的毫微秒的准确度。它对于值的更改频率没有作出保证。在取 阅读全文
posted @ 2013-07-31 19:15 世界之大追梦者 阅读(1785) 评论(0) 推荐(0) 编辑

2013年7月22日

摘要: byte[]字节数组的toString()获得的字符串和使用new String(byte[])构造一个新的字符串,这两个字符串是不一样的。Java对象都继承于Object,Object中提供了toString方法,用于简单返回该类的类签名。在Java中,数组也可以看作是一种对象,显然byte[]也是一种继承与Object的对象,并且它没有重写Object的toString方法,因此使用byte[]的toString返回的字符串也就是byte[]的类签名。但是使用new String()构造方法将byte[]转换为字符串得到的就会是一个根据字节数组内容构造的字符串。小小基础,常遗忘常忽略,留给 阅读全文
posted @ 2013-07-22 19:17 世界之大追梦者 阅读(1180) 评论(0) 推荐(0) 编辑

2013年7月18日

摘要: 标记一下比较重要的类:ExecutorService:真正的线程池接口。ScheduledExecutorService能和Timer/TimerTask类似,解决那些需要任务重复执行的问题。ThreadPoolExecutorExecutorService的默认实现。ScheduledThreadPoolExecutor继承ThreadPoolExecutor的ScheduledExecutorService接口实现,周期性任务调度的类实现。要配置一个线程池是比较复杂的,尤其是对于线程池的原理不是很清楚的情况下,很有可能配置的线程池不是较优的,因此在Executors类里面提供了一些静态工厂 阅读全文
posted @ 2013-07-18 14:44 世界之大追梦者 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 加载配置文件的方式Spring 中加载XML配置文件的方式,好像有3种, XML是最常见的Spring 应用系统配置源。Spring中的几种容器都支持使用XML装配bean,包括: XMLBeanFactory , ClassPathXMLApplicationContext , FileSystemXMLApplicationContext , XMLWebApplicationContext 一:XMLBeanFactory 引用资源 Resource resource = new ClassPathResource("appcontext.XML"); BeanFac 阅读全文
posted @ 2013-07-18 10:09 世界之大追梦者 阅读(158) 评论(0) 推荐(0) 编辑

2013年7月17日

摘要: Spring 利用PropertyPlaceholderConfigurer占位符 转载地址:http://www.cnblogs.com/yl2755/archive/2012/05/06/2486752.html 1. PropertyPlaceholderConfigurer是个bean工厂后 阅读全文
posted @ 2013-07-17 18:25 世界之大追梦者 阅读(281) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页

导航