摘要: int res = 1; DecimalFormat df = new DecimalFormat("0000"); String statistics = df.format(res); 阅读全文
posted @ 2017-07-05 13:23 馳騁衿琾 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 使用Date对象的getDay方法可以获取当前日期的星期数。 getDay() 方法可返回表示星期的某一天的数字。 示例: var date = new Date(); alert(date.getDay());//输出当前日期的星期数 //String转int var str='1250' ; a 阅读全文
posted @ 2017-07-03 11:39 馳騁衿琾 阅读(3328) 评论(0) 推荐(0) 编辑
摘要: 根据名称首字母排序: 实现 Comparable<Student> 接口 重写compareTo(Student stu)方法 Collator cmp = Collator.getInstance(java.util.Locale.CHINA); if (this.studentName.equa 阅读全文
posted @ 2017-06-29 09:36 馳騁衿琾 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 如果你想连接你的MySQL的时候发生这个错误: ERROR 1130: Host '192.168.1.3' is not allowed to connect to this MySQL server 1。 改表法。可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在local 阅读全文
posted @ 2017-05-10 15:17 馳騁衿琾 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 假设有JavaScript文件叫做:readproperties.js,这个文件需要读取config.properties这个配置文件,步骤如下: 1、 下载插件jquery.i18n.properties-min-1.0.9.js,在eclipse中放到合适的目录下。由于需要jQuery的支持,所 阅读全文
posted @ 2017-03-21 16:17 馳騁衿琾 阅读(1999) 评论(0) 推荐(0) 编辑
摘要: 展示:$("#id").show(); 隐藏:$("#id").hide(); 阅读全文
posted @ 2017-03-21 09:18 馳騁衿琾 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 获取项目名:request.getContextPath(); 获取IP:request.getServerName() 获取端口:request.getServerPort() pageContext.setAttribute("contextPath", request.getContextPa 阅读全文
posted @ 2017-03-20 14:13 馳騁衿琾 阅读(3427) 评论(0) 推荐(0) 编辑
摘要: 当字段为空则插入0,不为空则原来的值 UPDATE t_pm_scheduleSET lesson_room_id1 = IFNULL(lesson_room_id1, 0), lesson_room_id2 = IFNULL(lesson_room_id2, 0), lesson_room_id3 阅读全文
posted @ 2017-03-01 11:50 馳騁衿琾 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 注入方式读取: 1.新建配置文件resource.properties,添加内容server_url=http://192.168.0.158/ 2.在spring配置文件中加载<context:property-placeholder location="classpath:conf/resour 阅读全文
posted @ 2017-02-24 14:47 馳騁衿琾 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 只需要在Dao实现类中加入@Repositorypublic Class TestDaoImpl(){}在service层定义 @Autowired private TestDao testDao;不需要再写setDao方法就可以通过接口调用Dao了 在Service层加入@servicepubli 阅读全文
posted @ 2016-08-31 10:32 馳騁衿琾 阅读(127) 评论(0) 推荐(0) 编辑