826

导航

2021年1月17日 #

关于org.apache.poi 导出excel时引发的No such file or directory

摘要: java.lang.RuntimeException: java.io.IOException: No such file or directory at org.apache.poi.xssf.streaming.SXSSFWorkbook.createAndRegisterSXSSFSheet( 阅读全文

posted @ 2021-01-17 16:11 826 阅读(1329) 评论(0) 推荐(0) 编辑

2016年8月9日 #

MySQL查询本周、上周、本月、上个月份数据的sql代码

摘要: 查询当前这周的数据 SELECT name,submittime FROM enterprise WHERE YEARWEEK(date_format(submittime,'%Y-%m-%d')) = YEARWEEK(now()); 查询上周的数据 SELECT name,submittime 阅读全文

posted @ 2016-08-09 17:46 826 阅读(339) 评论(0) 推荐(0) 编辑

为mybatis mapper xml文件添加注释遇到问题

摘要: 出错原因 手动加注释标签时常常 会出现这个问题,还有 mysql的 --注释会与mybatis动态sql冲突所以尽量不要在mybatis动态标签内 写 mysq:“--”注释例如 : 写sql注释时候 尽量直接用eclipse 选中要加的注释【内容】 快捷键【 ctrl+shift+/】 这样会自动 阅读全文

posted @ 2016-08-09 16:08 826 阅读(19149) 评论(0) 推荐(1) 编辑

2016年6月19日 #

ubuntu使用中遇到问题及解决方法持续整理

摘要: 试图双击deb文件进行安装,点击install 按钮,提示“This software comes from a 3rd party and may contain non-free components”。 打开Terminal,输入以下命令: sudo apt install gdebi 安装完 阅读全文

posted @ 2016-06-19 12:58 826 阅读(492) 评论(0) 推荐(0) 编辑

2016年5月28日 #

常用sql

摘要: 可用alter table table_name AUTO_INCREMENT=n命令来重设自增的起始值。 阅读全文

posted @ 2016-05-28 14:30 826 阅读(140) 评论(0) 推荐(0) 编辑

2016年4月20日 #

给DataTable添加列默认值

摘要: "columnDefs": [ { "targets": "_all", "defaultContent": "" } ], 阅读全文

posted @ 2016-04-20 09:45 826 阅读(2530) 评论(0) 推荐(0) 编辑

2015年12月24日 #

JavaScript闭包的整理

摘要: 闭包是可访问上一层函数作用域里变量的函数,即便上一层函数已经关闭。 var add = (function () { var counter = 0; return function () {return counter += 1;}})();add();add();add();/... 阅读全文

posted @ 2015-12-24 08:38 826 阅读(200) 评论(0) 推荐(0) 编辑

2015年10月19日 #

java.lang.IllegalArgumentException: Can not set int field *** to null value

摘要: 在ssh 项目中 如果某个实体类 的字段属性为 基本数据类型,那么要注意对应的数据库中该属性 值不能为null 否则,在做相关查询时 会报该异常,具体的原理就是:hibernate 通过实体bean的set 为实体ben属性赋值 阅读全文

posted @ 2015-10-19 17:08 826 阅读(13150) 评论(0) 推荐(1) 编辑

2015年8月4日 #

Mysql全表替换 指定字符串

摘要: update 表名 set 字段名=replace(字段名,要替换的字符串,替换成的字符串) where 条件;例如: update user set sex=replace(sex,'男生','男人') where age>24; 阅读全文

posted @ 2015-08-04 16:12 826 阅读(2543) 评论(0) 推荐(0) 编辑

2015年4月27日 #

hibernate.用占位符写Like语句注意

摘要: Query query = session.createQuery("select count(*)from Privilege p where p.name like ?");query.setString(0, "%" + name + "%");//注意这里不能写成setStri... 阅读全文

posted @ 2015-04-27 13:23 826 阅读(974) 评论(0) 推荐(0) 编辑