上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页
摘要: java 中的 拷贝分为浅拷贝 和 深拷贝浅拷贝需要实现Cloneable接口,深拷贝需要实现Serializable接口。public class Square implements Cloneable, Serializable{ private Point location = new Point(0, 0); private float sideLength = 1F; @Override public Object clone() { Square tmp = null; try { tmp = (Square) supe... 阅读全文
posted @ 2014-01-25 12:00 coreWars 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 1. 这条语句主要是用来修复一个表中的数据 , 在另一个统计表中没有统计时,进行修改统计表的操作 update expert_count ec inner join ( select sum(e.EFFECT_SCORE) es_count, sum(e.ATTITUDE_SCORE) as_count, sum(e.PROMOTE_REASONABLE_SCORE) pro_count, sum(e.PRICE_REASONABLE_SCORE) pri_count, sum(e.ENVIRONMENT_... 阅读全文
posted @ 2014-01-25 10:39 coreWars 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 1.Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Queries and reconnect. 解决方式: SETSQL_SAFE_UPDATES= 0; // 重要的是这一句 update T set col = 'xxx' where conditio.. 阅读全文
posted @ 2014-01-25 10:34 coreWars 阅读(122) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2014-01-23 18:28 coreWars 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2014-01-23 18:26 coreWars 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 有时候,我们希望一个集合只能读,不能写。像.NET语言就提供了只读的集合,可惜Java中却没有。 还好集合工具类Collections为我们提供了静态工厂方法来生成只读集合,包括Collection,List,Map,Set,SortedMap和SortedSet,下面给出了各自的方法签名。Collection unmodifiableCollection(Collection collection)List unmodifiableList(List list)Map unmodifiableMap(Map map)Set unmodifiableSet(Set set)SortedMa.. 阅读全文
posted @ 2014-01-23 10:28 coreWars 阅读(426) 评论(0) 推荐(0) 编辑
摘要: sonar 默认是英文的界面1.下载http://repository.codehaus.org/org/codehaus/sonar-plugins/l10n/sonar-l10n-zh-plugin/1.2/sonar-l10n-zh-plugin-1.2.jar2.把下载的压缩包放到sanar安装目录下的/extensions/plugins 中3.重启Sonar server ./sonar.sh restart 阅读全文
posted @ 2014-01-19 17:13 coreWars 阅读(2777) 评论(0) 推荐(0) 编辑
摘要: 1) 下载 从sonar官网http://www.sonarsource.org/下载 (版本当然是最新的了) 在官网上是不分系统的,一个zip包,下下来之后,包里包含 windows 、linux 和mac的版本2)解压 执行 我用的是sonarqube-4.1 解压出这么一个文件夹后,打开bin/macosx-universal-64 ( 注: 我的系统是mac 64位的,所以选的这个目录 ) ./sonar.sh start 出现下面字样,说明运行成功 Starting sonar... Started sonar. 打开浏览器,http://localhos... 阅读全文
posted @ 2014-01-19 10:37 coreWars 阅读(362) 评论(0) 推荐(0) 编辑
摘要: Hibernate 参数设置一览表属性名用途hibernate.dialect一个HibernateDialect类名允许Hibernate针对特定的关系数据库生成优化的SQL.取值full.classname.of.Dialecthibernate.show_sql输出所有SQL语句到控制台. 有一个另外的选择是把org.hibernate.SQL这个log category设为debug。eg.true|falsehibernate.format_sql在log和console中打印出更漂亮的SQL。取值true|falsehibernate.default_schema在生成的SQL中, 阅读全文
posted @ 2014-01-18 16:23 coreWars 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 配置:一.在src目录下加入ehcache.xml:在使用ehcache的页面缓存之前,我们必须要了解ehcache的几个概念,1 timeToIdleSeconds,多长时间不访问该缓存,那么ehcache就会清除该缓存。2 timeToLiveSeconds,缓存的存活时间,从开始创建的时间算起。SimplePageCachingFilter是缓存的名字,maxElementsInMemory表示内存中SimplePageCachingFilter缓存中元素的最大数量为10,maxElementsOnDisk是指持久化该缓存的元素到硬盘上的最大数量也为10(),eternal=false意 阅读全文
posted @ 2014-01-18 16:22 coreWars 阅读(262) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页