<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/strivehard</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; strivehard]]></copyright><item><title><![CDATA[java中使用gzip对响应信息压缩]]></title><link>https://blog.csdn.net/strivehard/article/details/8597378</link><guid>https://blog.csdn.net/strivehard/article/details/8597378</guid><author>strivehard</author><pubDate>Thu, 21 Feb 2013 10:43:13 +0800</pubDate><description><![CDATA[笔者将response内响应给使用者的内容，使用GZIP压缩的方式回传给浏览器，而IE5和NS6也都有支持Gzip的压缩格式。
这个方法在之前就有人提出过，因为是让网页在输出时经过压缩，可以让传输量变小很多，虽然现在的网络频宽对于用来看网页已经绰绰有余，但是档案大小太大的网页还是会造成一定的影响。
经过Gzip压缩过的网页，档案大小可以到原本压缩前的20%。
package com.jspt]]></description><category></category></item><item><title><![CDATA[SQL提高查询效益之in、not in、between、like等条件讲述]]></title><link>https://blog.csdn.net/strivehard/article/details/8595509</link><guid>https://blog.csdn.net/strivehard/article/details/8595509</guid><author>strivehard</author><pubDate>Wed, 20 Feb 2013 17:42:02 +0800</pubDate><description><![CDATA[在使用SQL语句查询数据库记录时，如果要查询相同的内容，有着不同的多种方法。
　　仍然，尽管使用多种方法可以得到相同的结果，但是，如果您使用不同的方法，在执行效益上是截然不同的。因此，我们得仔细考虑，如果要查询相同结果，该使用哪种语句，执行效益比较好。
　　这就是SQL语句的优化。
　　以下优化语句，针对MS Sql数据库。
　　1、对查询进行优化，应尽量避免全表扫描，首先应考虑在 whe]]></description><category></category></item><item><title><![CDATA[exists\like\in\=效率比较]]></title><link>https://blog.csdn.net/strivehard/article/details/8595448</link><guid>https://blog.csdn.net/strivehard/article/details/8595448</guid><author>strivehard</author><pubDate>Wed, 20 Feb 2013 17:33:32 +0800</pubDate><description><![CDATA[like最差，特别是以%（有的数据库是*）开头的匹配，是无法进行索引的，只有顺序扫描。in和=的本质是一样的，效率相同，都是走索引。当然，如果进行判断的那个字段没有建立索引，那么都是顺序查找，效率完全一样。
LIKE很差的，速度最慢IN也非常差，IN的本质是N个＝，中间用OR连起来万幸的是IN能用EXISTS代替，EXISTS的效率比IN提高了不止一点点，我曾经将IN换为EXISTS，查询的效率]]></description><category></category></item><item><title><![CDATA[会引起全表扫描的写法]]></title><link>https://blog.csdn.net/strivehard/article/details/8595433</link><guid>https://blog.csdn.net/strivehard/article/details/8595433</guid><author>strivehard</author><pubDate>Wed, 20 Feb 2013 17:30:44 +0800</pubDate><description><![CDATA[1、模糊查询效率很低：　　原因：like本身效率就比较低，应该尽量避免查询条件使用like；对于like ‘%...%’（全模糊）这样的条件，是无法使用索引的，全表扫描自然效率很低；另外，由于匹配算法的关系，模糊查询的字段长度越大，模糊查询效率越低。
　　解决办法：首先尽量避免模糊查询，如果因为业务需要一定要使用模糊查询，则至少保证不要使用全模糊查询，对于右模糊查询，即like ‘…%’，是会使]]></description><category></category></item><item><title><![CDATA[sql效率]]></title><link>https://blog.csdn.net/strivehard/article/details/8595294</link><guid>https://blog.csdn.net/strivehard/article/details/8595294</guid><author>strivehard</author><pubDate>Wed, 20 Feb 2013 17:04:53 +0800</pubDate><description><![CDATA[很多人不知道SQL语句在SQL SERVER中是如何执行的，他们担心自己所写的SQL语句会被SQL SERVER误解。比如： 

select * from table1 where name='zhangsan' and tID > 10000 

和执行: 

select * from table1 where tID > 10000 and name='zhangsan']]></description><category></category></item><item><title><![CDATA[sql效率]]></title><link>https://blog.csdn.net/strivehard/article/details/8595169</link><guid>https://blog.csdn.net/strivehard/article/details/8595169</guid><author>strivehard</author><pubDate>Wed, 20 Feb 2013 16:43:07 +0800</pubDate><description><![CDATA[一、关于索引的知识

要写出运行效率高的sql，需要对索引的机制有一定了解，下面对索引的基本知识做一介绍。

1、        索引的优点和局限
索引可以提高查询的效率，但会降低dml操作的效率。
所以建立索引时需要权衡。对于dml操作比较频繁的表，索引的个数不宜太多。

2、        什么样的列需要建索引？
经常用于查询、排序和分组的列（即经常在where、order或]]></description><category></category></item><item><title><![CDATA[weblogic启动报错，登录失败。]]></title><link>https://blog.csdn.net/strivehard/article/details/8594572</link><guid>https://blog.csdn.net/strivehard/article/details/8594572</guid><author>strivehard</author><pubDate>Wed, 20 Feb 2013 14:57:06 +0800</pubDate><description><![CDATA[在公司做测试环境更新的时候有一个端口的服务启动时经常会报错，之前的错误只需要将servers/AdminServer/security目录下的boot.properties删除掉，并新增一个boot.properties文件内容如下
username=weblogic
password=weblogc
然后重新启动即可，但是有一次这样也不行，可能密码被修改了，所以不行，只能使用weblogi]]></description><category></category></item><item><title><![CDATA[strategy(策略设计模式)]]></title><link>https://blog.csdn.net/strivehard/article/details/7268105</link><guid>https://blog.csdn.net/strivehard/article/details/7268105</guid><author>strivehard</author><pubDate>Fri, 17 Feb 2012 15:36:41 +0800</pubDate><description><![CDATA[1、策略设计模式它定义了一系列的算法，并将每个算法封装起来，而且使他们可以互相替换。策略设计模式让算法的变化不会影响到使用算法的客户。
2、uml图如下]]></description><category></category></item><item><title><![CDATA[observer(观察者设计模式)]]></title><link>https://blog.csdn.net/strivehard/article/details/7267908</link><guid>https://blog.csdn.net/strivehard/article/details/7267908</guid><author>strivehard</author><pubDate>Fri, 17 Feb 2012 14:55:30 +0800</pubDate><description><![CDATA[1、观察者设计模式定义了一种一对多的依赖关系，让多个观察者同时监听某一对象，在这个对象发生变化的时候会通知观察者，使得观察者可以自动更新自己。
2、uml图如下


3、java代码如下
public interface Observer {
public void update(NumberGenerate numberGenerate);
}



public clas]]></description><category></category></item><item><title><![CDATA[hibernate缓存]]></title><link>https://blog.csdn.net/strivehard/article/details/7257101</link><guid>https://blog.csdn.net/strivehard/article/details/7257101</guid><author>strivehard</author><pubDate>Tue, 14 Feb 2012 10:25:44 +0800</pubDate><description><![CDATA[1、hibernate的缓存主要分为 一级缓存，二级缓存和查询缓存。
2、hibernate缓存机制对hibernate的性能发挥一直处于一个极其重要的作用，它是持久层性能提升的一个关键。
3、hibernate缓存处于hibernate和数据库之间，缓存中存放了数据库的拷贝，他的作用是减少对数据库的访问频率，从而提高应用程序的性能。
4、hibernate在进行数据查询时，根据缓存机制在相]]></description><category></category></item><item><title><![CDATA[Java异常处理原则，check and Unchecked Exception]]></title><link>https://blog.csdn.net/strivehard/article/details/7236463</link><guid>https://blog.csdn.net/strivehard/article/details/7236463</guid><author>strivehard</author><pubDate>Mon, 06 Feb 2012 12:21:35 +0800</pubDate><description><![CDATA[异常的概念  
       任何的异常都是Throwable类（为何不是接口？？），并且在它之下包含两个字类Error
 / Exception，而Error仅在当在Java虚拟机中发生动态连接失败或其它的定位失败的时候，Java虚拟机抛出一个Error对象。典型的简易程序不捕获或抛出Errors对象，你可能永远不会遇到需要实例化Error的应用，那就让我们关心一下Exception。]]></description><category></category></item><item><title><![CDATA[builder(生成器设计模式)]]></title><link>https://blog.csdn.net/strivehard/article/details/7231716</link><guid>https://blog.csdn.net/strivehard/article/details/7231716</guid><author>strivehard</author><pubDate>Fri, 03 Feb 2012 16:13:19 +0800</pubDate><description><![CDATA[1、生成器设计模式是将产品的内部表象和产品的生成过程分割开来，从而使一个建造过程生成具有不同内部表象的产品对象，生成器模式使得对象内部可以独立变化，客户不必知道产品内部的组成细节，他还可以强制实行一种分步骤进行的建造过程。
2、uml图如下


3、java代码如下
public class Director {
private Builder builder;


public]]></description><category></category></item><item><title><![CDATA[prototype(原型设计模式)]]></title><link>https://blog.csdn.net/strivehard/article/details/7231496</link><guid>https://blog.csdn.net/strivehard/article/details/7231496</guid><author>strivehard</author><pubDate>Fri, 03 Feb 2012 15:09:43 +0800</pubDate><description><![CDATA[1、原始模型设计模式 通过给出一个原始对象来指明要创建的对象的类型，然后用复制这个对象的原型来创建更多的同类型的对象，缺点是每一个需要被复制的类都必须提供一个克隆的方法，克隆还分深度克隆和浅克隆。
2、uml图如下


3、java代码如下
public class Manager {
private Hashtable hashtables = new Hashtable();]]></description><category></category></item><item><title><![CDATA[singleton(单例设计模式)]]></title><link>https://blog.csdn.net/strivehard/article/details/7063737</link><guid>https://blog.csdn.net/strivehard/article/details/7063737</guid><author>strivehard</author><pubDate>Mon, 12 Dec 2011 15:28:44 +0800</pubDate><description><![CDATA[1、单例模式是指一个类只有一个实例，而且自行实例并像整个系统提供这个实例单例模式。单例模式只应在有“单一实例”的需求时才可使用。
2、uml图如下


3、java代码如下
public class Singleton {
private static Singleton singleton = new Singleton();


private Singleton() {]]></description><category></category></item><item><title><![CDATA[factory method(工厂方法设计模式)]]></title><link>https://blog.csdn.net/strivehard/article/details/7063700</link><guid>https://blog.csdn.net/strivehard/article/details/7063700</guid><author>strivehard</author><pubDate>Mon, 12 Dec 2011 15:22:58 +0800</pubDate><description><![CDATA[1、工厂方法设计模式主要是核心的工厂类不在去负责产品的创建，而是将具体的创建的工作交给子类去做，而不接触具体应该哪个产品被创建以及如何创建的细节。
2、uml图如下
﻿﻿

3、java代码
public abstract class Factory {
public Product create(String owner){
Product p = createProduct(ow]]></description><category></category></item><item><title><![CDATA[template method(模版方法设计模式)]]></title><link>https://blog.csdn.net/strivehard/article/details/7056800</link><guid>https://blog.csdn.net/strivehard/article/details/7056800</guid><author>strivehard</author><pubDate>Fri, 09 Dec 2011 14:05:12 +0800</pubDate><description><![CDATA[1、模版方法就是定义一个抽象类，然后自己实现一个顶级的逻辑方法，在声明一些其余的细节的逻辑方法，这些方法细节的方法交给子类去实现。
2、uml图如下


3、java代码如下
public abstract class AbstractDisplay {
public void display() {
open();
for (int i = 0; i 
print();
}]]></description><category></category></item><item><title><![CDATA[adaptor(适配器设计模式)]]></title><link>https://blog.csdn.net/strivehard/article/details/7056663</link><guid>https://blog.csdn.net/strivehard/article/details/7056663</guid><author>strivehard</author><pubDate>Fri, 09 Dec 2011 13:30:49 +0800</pubDate><description><![CDATA[1、adaptor(适配器设计模式)就是把原有的类进行包装在利用，也叫wrapper(包装设计模式)，实现可以通过继承和委托的方式实现。
2、uml图如下


3、java代码如下
public interface Print {
public void printWithAsterick();
public void printWithParent();
}



pub]]></description><category></category></item><item><title><![CDATA[iterator设计模式(迭代模式)]]></title><link>https://blog.csdn.net/strivehard/article/details/7056146</link><guid>https://blog.csdn.net/strivehard/article/details/7056146</guid><author>strivehard</author><pubDate>Fri, 09 Dec 2011 11:25:38 +0800</pubDate><description><![CDATA[1、迭代模式主要实现的就是容器与遍历的分离解耦，为容器提供了一个统一遍历的接口，开发人员调用容器遍历的时候不需要知道容器内部如何实现，只需要调用相应的接口就可以，不至于暴漏内部细节。符合单一职责原则的设计方法。
2、uml图如下

3、java代码实现如下
public class FclListIterator implements Iterator {
private FclList]]></description><category></category></item><item><title><![CDATA[java.nio 基础知识]]></title><link>https://blog.csdn.net/strivehard/article/details/7012781</link><guid>https://blog.csdn.net/strivehard/article/details/7012781</guid><author>strivehard</author><pubDate>Fri, 25 Nov 2011 17:11:37 +0800</pubDate><description><![CDATA[http://www.iteye.com/topic/834447
http://www.cnblogs.com/rollenholt/archive/2011/09/29/2195730.html]]></description><category></category></item><item><title><![CDATA[单点登陆]]></title><link>https://blog.csdn.net/strivehard/article/details/7012354</link><guid>https://blog.csdn.net/strivehard/article/details/7012354</guid><author>strivehard</author><pubDate>Fri, 25 Nov 2011 15:30:08 +0800</pubDate><description><![CDATA[http://zhanjia.iteye.com/blog/746437]]></description><category></category></item></channel></rss>