摘要: 在安装使用Tomcat前需安装jdk(Java 2 Software Development Kit),安装jdk可以参考我之前的blog。 安装Tomcat 1)下载apache-tomcat-7.0.59.tar.gz 2)#tar -zxvf apache-tomcat-7.0.59.tar. 阅读全文
posted @ 2016-03-28 11:30 jiayongchao 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 使用命令:drop database xxx;删除本数据库时却删除失败,系统提示出现了错误,错误代码为: ERROR 1010 (HY000): Error dropping database(can't rmdir './xxx/',errno:17); 解决方法: 1.find /  -name 阅读全文
posted @ 2016-03-14 10:31 jiayongchao 阅读(686) 评论(0) 推荐(0) 编辑
摘要: 常用的有两种方法,第一种就是select distinct name from table。但是有时候我们要返回多个字段时就用第二种方法select *, count(distinct name) from table group by name 阅读全文
posted @ 2015-06-09 11:20 jiayongchao 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 一、什么是事务我们通常会认为事务与数据库有关。事务是访问数据库的一个操作序列,数据库应用系统通过事务集来完成对数据库的操作。事务的正确执行使得数据库从一种状态转换成另外一种状态。事务必须服从ISO/IEC所制定的ACID原则。ACID是原子性(atomicity)、一致性(consistency)、... 阅读全文
posted @ 2015-03-30 16:23 jiayongchao 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 声明式事务:在配置文件中将事务配置好,通过bean的方式,调用Spring的事务,在程序中不需要做代码性的事务管理,例如commit,backroll等。编程式事务:需要在代码中加入处理事务的逻辑,可能需要在代码中显示调用beginTransaction(),commit(),rollback()等... 阅读全文
posted @ 2015-03-30 16:11 jiayongchao 阅读(577) 评论(0) 推荐(0) 编辑
摘要: select * from tablename where id in ( select id from tablename group by id having count(id) > 1 ) 阅读全文
posted @ 2015-02-04 11:48 jiayongchao 阅读(307) 评论(0) 推荐(0) 编辑
摘要: window.onload = function (){ document.body.onkeydown=function(event){ if(event.keyCode==13){ event.keyCod=0; return false; } ... 阅读全文
posted @ 2015-01-21 10:28 jiayongchao 阅读(2374) 评论(0) 推荐(0) 编辑
摘要: /** * 判断str1中包含str2的个数 * @param str1 * @param str2 * @return counter */ public static int countStr(String str1, String... 阅读全文
posted @ 2014-12-03 11:27 jiayongchao 阅读(13032) 评论(0) 推荐(1) 编辑
摘要: 本文由ImportNew-孙 波翔翻译自nicolasbize。欢迎加入翻译小组。转载请参见文章末尾的要求。大约一个月前,我发表了一篇博客,其中介绍了对Eclipse的爱与恨。 有些人问我如何给Eclipse提速,这篇文章就来讨论这个问题。顺带提一下,这篇文章不是比较IDE,所以不要说你讨厌某个ID... 阅读全文
posted @ 2014-12-02 09:54 jiayongchao 阅读(309) 评论(1) 推荐(0) 编辑
摘要: select group_concat(字段名)from 表名 阅读全文
posted @ 2014-11-24 14:33 jiayongchao 阅读(9497) 评论(0) 推荐(2) 编辑