摘要: 多线程使用场景 1、同时需要做两件以上事情时需要开多个线程(例如:上传功能附带进度条显示,一边做上传,一边更新进度条状态。) 2、大量同类型数据需要进行处理(导入导出大量数据) 3、office文档转换pdf比较慢 4、一个任务的执行进度,比如我们常看到的进度条,实现方式可以是在任务中加入一个整型属 阅读全文
posted @ 2016-07-06 10:57 N神3 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 一、android:id="@+id/button1" 与 android:id="@id/button1" 区别 android:id="@+id/button1" 控件添加一个id这个新的id会自动生成在 R.java文件里面,在你的Activity里面通过 Button btn1 = (But 阅读全文
posted @ 2016-07-06 09:25 N神3 阅读(4163) 评论(0) 推荐(1) 编辑
摘要: 1、request.setCharacterEncoding只对POST请求起作用。GET请求用new String(paramterData.getBytes("iso8859-1"),"UTF-8"); 2、response.setContentType指定HTTP 响应的编码,同时指定了浏览器 阅读全文
posted @ 2016-07-05 12:11 N神3 阅读(1421) 评论(0) 推荐(0) 编辑
摘要: public class Test{ /*FileReader/FileWriter读写乱码,待处理*/ public static void main(String[] args) throws IOException{ FileReader fileReader = null; FileWrit 阅读全文
posted @ 2016-07-01 15:58 N神3 阅读(212) 评论(0) 推荐(0) 编辑
摘要: public class Test{ public static void main(String[] args) throws IOException{ FileInputStream in = null; BufferedInputStream bis =null; FileOutputStre 阅读全文
posted @ 2016-07-01 14:54 N神3 阅读(640) 评论(0) 推荐(0) 编辑
摘要: public class Test{ public static void main(String[] args) throws Exception{ /*DecimalFormat参数,如果是0则会显示0,如果是#怎不显示0*/ DecimalFormat df = new DecimalForm 阅读全文
posted @ 2016-06-30 18:04 N神3 阅读(299) 评论(0) 推荐(0) 编辑
摘要: JSON操作借用JSON-lib包,JSON-lib包同时依赖于以下的JAR包: json-lib-2.4-jdk15.jar commons-logging.jar commons-beanutils.jar commons-collections.jar ezmorph.jar /** *jso 阅读全文
posted @ 2016-06-30 12:00 N神3 阅读(152) 评论(0) 推荐(0) 编辑
摘要: /** * 排序控制* @author Mr.chen 2016-6-1 */ public class OrderItem { //列名(对应实体的属性命名规范) String columnName; //排序方式 OrderOption option = OrderOption.DESC; pu 阅读全文
posted @ 2016-06-30 10:03 N神3 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 一、上传按钮样式 1.1id="show_filebutton"是显示给用户操作按钮,id="filebutton"是flash上传按钮完成用户上传操作。id="show_filebutton"按钮样式不需要变,只需要将id="filebutton"按钮覆盖在id="show_filebutton" 阅读全文
posted @ 2016-06-27 10:06 N神3 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 一、单点登陆分两种 1.1子域单点登陆/二级域单点登陆 例如:site1.domain.com和site2.domain.com相同域之间单点登陆 子域单点登陆实现比较简单。利用cookie就行 1.2完全跨域单点登陆 例如:www.baidu.com和www.jd.com不同域之间单点登陆。 跨域 阅读全文
posted @ 2016-06-24 18:51 N神3 阅读(363) 评论(0) 推荐(0) 编辑