上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
摘要: 有时候为了控制并发规模,我们需要对每次启动的线程做个数量上的限制,可以使用Executors.newFixedThreadPool(int)这个方法。 例子 一个线程类,运行中休息几秒为了观察现象更为明显 package com.nicchagil.study.thread.cnblogs.No01 阅读全文
posted @ 2015-08-19 21:30 nick_huang 阅读(1174) 评论(0) 推荐(0)
摘要: 公司最近会用MQ对某些业务进行处理,所以,这次我下载了apache-activemq-5.12.0-bin把玩下。 基于练习方便需要,使用Windows的版本。 参考的优秀文章: activemq的几种基本通信方式总结 Winsdows下安装 下载后得到zip文件,解压后用命令行启动即可使用,有两个 阅读全文
posted @ 2015-08-19 10:32 nick_huang 阅读(720) 评论(0) 推荐(0)
摘要: 最近,DBCP连接Oracle,数据库重启后现OALL8 is in an inconsistent state异常。 版本说明 commons-dbcp-1.4.jar commons-pool-1.5.4.jar 关键字 异常关键字为: 无法从套接字读取更多的数据 OALL8 处于不一致状态 I 阅读全文
posted @ 2015-08-17 16:09 nick_huang 阅读(7816) 评论(0) 推荐(0)
摘要: 不知大家有没有遇到,用jQuery Validation(本文讨论的版本为jQuery Validation Plugin 1.11.1)用remote方式做校验时,如果验证元素的值保持一致,进行多次验证时,第二次(含)请求并未发出,即沿用第一次远程调用的验证结果(即缓存、使用第一次请求的结果)。 阅读全文
posted @ 2015-08-12 18:15 nick_huang 阅读(476) 评论(0) 推荐(0)
摘要: 明天要做关于发送邮件的接口,虽然我之前已用Java Mail做过许多关于邮件的发送。但同事说有点难点,虽我还不知难点在哪,还是要复习下。凡事预则立,不预则废嘛~ 所需的包: Java Mail : 目前,可从如下地址下载:JavaMail API Activation : 目前,可从如下地址下载:J 阅读全文
posted @ 2015-08-08 18:36 nick_huang 阅读(6020) 评论(8) 推荐(4)
摘要: 公司刚使用nginx,预先学习下。鉴于机器没有Linux环境,在Windows熟悉下。 下载 目前(2015-07-11),nginx的稳定版本是1.8.0,在官网下载先,windows版的nginx1.8.0 这是一个zip文件,解压后即可使用 Windows下的安装与启动 绿色文件,无须安装,直 阅读全文
posted @ 2015-07-11 14:20 nick_huang 阅读(52500) 评论(5) 推荐(15)
摘要: 开发中,常有场景:遍历集合,依次判断是否符合条件,如符合条件则删除当前元素。 不知不觉中,有些陷阱,不知你有没有犯。 一、漏网之鱼-for循环递增下标方式遍历集合,并删除元素 如果你用for循环递增下标方式遍历集合,在遍历过程中删除元素,你可能会遗漏了某些元素。说那么说可能也说不清楚,看以下示例: 阅读全文
posted @ 2015-07-10 14:36 nick_huang 阅读(8042) 评论(2) 推荐(3)
摘要: drop procedure if exists p_hello_world; create procedure p_hello_world(in v_id int) begin if (v_id > 0) then select '> 0'; elseif (v_id = 0) then select '= 0'; else ... 阅读全文
posted @ 2015-07-07 11:45 nick_huang 阅读(656) 评论(0) 推荐(0)
摘要: 日志 阅读全文
posted @ 2015-07-02 22:54 nick_huang 阅读(307) 评论(0) 推荐(0)
摘要: ini文件 阅读全文
posted @ 2015-07-02 22:46 nick_huang 阅读(315) 评论(0) 推荐(0)
摘要: #coding=utf-8 #!/usr/bin/python import json; dict = {}; dict['name'] = 'nick'; dict['say'] = 'hello world...'; dict['age'] = '20'; dict_json = repr(dict); print dict_json; dict_json_2 = json.dum... 阅读全文
posted @ 2015-07-02 22:42 nick_huang 阅读(321) 评论(0) 推荐(0)
摘要: #coding=utf-8 #!/usr/bin/python import logging; a = 'abc'; print 'Y' if isinstance(a, str) else 'N'; 阅读全文
posted @ 2015-07-02 22:30 nick_huang 阅读(305) 评论(0) 推荐(0)
摘要: #coding=utf-8 #!/usr/bin/python a = 'abc'; print isinstance(a, str); 阅读全文
posted @ 2015-07-02 22:28 nick_huang 阅读(220) 评论(0) 推荐(0)
摘要: #coding=utf-8 #!/usr/bin/python def setConfig(): hello = 'world'; print 'The value has been setted.'; return hello; hello_cp = setConfig(); print 'print outside : ' + hello_cp; ... 阅读全文
posted @ 2015-07-02 22:26 nick_huang 阅读(287) 评论(0) 推荐(0)
摘要: select insert update delete 阅读全文
posted @ 2015-07-02 22:15 nick_huang 阅读(443) 评论(0) 推荐(0)
摘要: #coding=utf-8 #!/usr/bin/python final_list = ('a', 1, 'b', 2, 'c', 3); print final_list[0]; print final_list[1:3]; print final_list * 2; print final_list + final_list + final_list; # 原组不能被重新赋值 #... 阅读全文
posted @ 2015-07-02 22:11 nick_huang 阅读(277) 评论(0) 推荐(0)
摘要: #coding=utf-8 #!/usr/bin/python list = ['a', 1, 'b', 2, 'c', 3]; print list[0]; print list[1:3]; print list * 2; print list + list + list; # 遍历 print('for each method 1 : '); for data in list: ... 阅读全文
posted @ 2015-07-02 22:10 nick_huang 阅读(796) 评论(0) 推荐(0)
摘要: #coding=utf-8 #!/usr/bin/python str1 = None; str2 = ''; str3 = ' '; if str1 == None : print("str1 is none."); else : print("str1 is not none."); if str2 == None : print("str2 is none... 阅读全文
posted @ 2015-07-02 22:07 nick_huang 阅读(399) 评论(0) 推荐(0)
摘要: Right Wrong 阅读全文
posted @ 2015-07-02 21:59 nick_huang 阅读(209) 评论(0) 推荐(0)
摘要: 001.print_hello_world 002.print_chinese 阅读全文
posted @ 2015-07-02 21:58 nick_huang 阅读(206) 评论(0) 推荐(0)
摘要: >参考de优秀文章 写MySQL存储过程实现动态执行SQL Dynamic cursor in stored procedure MySQL通过视图(或临时表)实现动态SQL(游标)。 因在实现中,需要通过DDL语句创建视图(或临时表)、删除视图(或临时表),故,只适合在一些一次性的脚本中使用,比如 阅读全文
posted @ 2015-07-02 11:36 nick_huang 阅读(8481) 评论(0) 推荐(0)
摘要: drop procedure if exists p_hello_world; create procedure p_hello_world() begin declare id integer; declare username varchar(256); declare result varchar(4000) default ''; /* don't ... 阅读全文
posted @ 2015-07-01 18:42 nick_huang 阅读(530) 评论(0) 推荐(0)
摘要: drop procedure if exists p_hello_world;create procedure p_hello_world()begin declare v_number int; declare v_varchar varchar(32); set v_number = 1; se 阅读全文
posted @ 2015-07-01 18:40 nick_huang 阅读(1190) 评论(0) 推荐(0)
摘要: drop procedure if exists p_hello_world; create procedure p_hello_world() begin select sysdate(); end; call p_hello_world(); drop procedure if exists p_hello_world; create procedure p_hel... 阅读全文
posted @ 2015-07-01 18:38 nick_huang 阅读(621) 评论(0) 推荐(0)
摘要: 前补0的格式化方式在业务系统中经常使用,记录下此api。 Java: MySQL: 阅读全文
posted @ 2015-07-01 13:55 nick_huang 阅读(885) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页