摘要: Exception Handling 异常处理 Exception handling is such an important issue that we should develop a consistent strategy for it before we begin to implement our framework proper. 异常处理是如此的重要,在我们开始实现我们自己的框... 阅读全文
posted @ 2012-12-06 23:41 sqtds 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 一个通用jdbc抽象框架 It's not enough to understand the JDBC API and the issues in using it correctly. Using JDBC directly is simply too much effort, and too error-prone. We need not just understanding, but a... 阅读全文
posted @ 2012-12-03 23:10 sqtds 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 为什么要用python,开发效率高,可移植. 语法: 字符串: 1,使用单引号(')==使用双引号(")==java双引号(") 2,使用三引号('''或""") ,可以合并多行 3,转义,与java的‘\’类似。注意(在一个字符串中,行末的单独一个反斜杠表示字符串在下一行继续,而不是开始一个新的行。) 4,自然字符串通过给字符串加上前缀r或R来指定。 5,... 阅读全文
posted @ 2012-12-02 22:42 sqtds 阅读(330) 评论(0) 推荐(0) 编辑
摘要: We live in interesting times. As development gets distributed across the globe, you learn there are lots of people capable of doing your job. You need to keep learning to stay marketable. Otherwise, y... 阅读全文
posted @ 2012-11-30 22:44 sqtds 阅读(180) 评论(0) 推荐(0) 编辑
摘要: By Tom Kytehttp://www.oracle.com/technetwork/issue-archive/2006/06-sep/o56asktom-086197.htmlOur technologist explains how ROWNUM works and how to make it work for you.This issue's Ask Tom column is a little different from the typical column. I receive many questions about how to perform top- N a 阅读全文
posted @ 2012-11-28 15:45 sqtds 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 昨天做完项目后让测试测试了一把,测试说分页查询貌似不起作用,翻到第4页以后,看到的数据结果都是相同的。当时我就觉得很纳闷,不可能啊,分页组件应该是好的,咋可能有问题呢。带着疑问,我打开了自己的ide,在自己的机器上跑了一把,果然有问题。有问题就要找问题:首先把2条查询结果相同的sql打印出来到数据库中执行:sql1: select * from (select t.*, rownum rn from (select t_e_id, t_e_name, t_e_tel, t_e_areacode from (select t.eid t_e_... 阅读全文
posted @ 2012-11-28 13:52 sqtds 阅读(1442) 评论(15) 推荐(0) 编辑
摘要: Using checked exceptions exclusively leads to several problems: 使用checked异常会导致一些问题: Too much code 太多的代码Developers will become frustrated by having to catch checked exceptions that they can't reason... 阅读全文
posted @ 2012-11-27 23:14 sqtds 阅读(287) 评论(0) 推荐(0) 编辑
摘要: Tomcat6的服务器配置文件放在 ${tomcat6}/conf 目录底下。我们可以在这里找到 server.xml 和 context.xml。当然,还有其他一些资源文件。但是在在本文中我们只用得上这两个,其他的就不介绍了。如果仅限某个web项目范围内可用,可在web项目的META-INF下添加context.xml。例如webapps\call\META-INF下添加1. 首先,需要为数据源配置一个JNDI资源。我们的数据源JNDI资源应该定义在context元素中。在tomcat6版本中,context元素已经从server.xml文件中独立出来了,放在一个context.xml文件中 阅读全文
posted @ 2012-11-27 14:53 sqtds 阅读(215) 评论(0) 推荐(0) 编辑
摘要: Consider Consolidating Method Parameters 完善方法的参数 Sometimes it's a good idea to encapsulate multiple parameters to a method into a single object. This may enhance readability and simplify calling cod... 阅读全文
posted @ 2012-11-26 22:44 sqtds 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 观察者模式 Like the use of interfaces, the Observer design pattern can be used to decouple components and enable extensibility without modification (observing the Open Closed Principle). It also contribut... 阅读全文
posted @ 2012-11-25 22:30 sqtds 阅读(174) 评论(0) 推荐(0) 编辑