<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[思考，思考，再思考~      ]]></title><description><![CDATA[每天学习一个新知识，写一个小程序...   ]]></description><link>https://blog.csdn.net/insistGoGo</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; insistGoGo]]></copyright><item><title><![CDATA[web.xml 中的listener、 filter、servlet 加载顺序及其详解]]></title><link>https://blog.csdn.net/insistGoGo/article/details/22598665</link><guid>https://blog.csdn.net/insistGoGo/article/details/22598665</guid><author>insistGoGo</author><pubDate>Sun, 30 Mar 2014 18:21:19 +0800</pubDate><description><![CDATA[在项目中总会遇到一些关于加载的优先级问题，近期也同样遇到过类似的，所以自己查找资料总结了下，下面有些是转载其他人的，毕竟人家写的不错，自己也就不重复造轮子了，只是略加点了自己的修饰。

        首先可以肯定的是，加载顺序与它们在 web.xml 文件中的先后顺序无关。即不会因为 filter 写在 listener 的前面而会先加载 filter。最终得出的结论是：listener -]]></description><category></category></item><item><title><![CDATA[在web.xml中classpath和classpath*的区别]]></title><link>https://blog.csdn.net/insistGoGo/article/details/22598391</link><guid>https://blog.csdn.net/insistGoGo/article/details/22598391</guid><author>insistGoGo</author><pubDate>Sun, 30 Mar 2014 18:17:37 +0800</pubDate><description><![CDATA[写spring的代码到现在，一直都很习惯性的拷贝web.xml中的内容，没怎么在意里面的内容，最近认真研究了下，很多东西都不是很理解，特别是classpath和classpath*的区别，研究了许久才搞明白，记录下备忘。

classpath 和 classpath* 区别：
classpath：只会到你指定的class路径中查找找文件;
classpath*：不仅包含class路径，还包]]></description><category></category></item><item><title><![CDATA[读Tomcat源码确定加载web.xml中节点元素的顺序]]></title><link>https://blog.csdn.net/insistGoGo/article/details/22598001</link><guid>https://blog.csdn.net/insistGoGo/article/details/22598001</guid><author>insistGoGo</author><pubDate>Sun, 30 Mar 2014 18:11:19 +0800</pubDate><description><![CDATA[转载于点击打开链接



有时候面试时会被问tomcat启动时web.xml中节点（类似listener,filter等）被加载的顺序，死记硬背那多没品，正好手里有tomcat7的源码，找了点时间翻了翻。

让我们先来喵一眼tomcat的架构，大致了解下tomcat启动的顺序，那我们目前关心的仅仅是web.xml中的加载顺序，按照架构来讲肯定是在Context中，架构如下图：]]></description><category></category></item><item><title><![CDATA[Spring源代码解析(二)：IoC容器在Web容器中的启动]]></title><link>https://blog.csdn.net/insistGoGo/article/details/22597595</link><guid>https://blog.csdn.net/insistGoGo/article/details/22597595</guid><author>insistGoGo</author><pubDate>Sun, 30 Mar 2014 17:58:50 +0800</pubDate><description><![CDATA[以下引用自博客：http://jiwenke-spring.blogspot.com/ 

上面我们分析了IOC容器本身的实现，下面我们看看在典型的web环境中，Spring IOC容器是怎样被载入和起作用的。 
简单的说，在web容器中，通过ServletContext为Spring的IOC容器提供宿主环境，对应的建立起一个IOC容器的体系。其中，首先需要建立的是根上下文，这个上下文持有的]]></description><category></category></item><item><title><![CDATA[Spring: DispacherServlet和ContextLoaderListener中的WebApplicationContext的关系]]></title><link>https://blog.csdn.net/insistGoGo/article/details/22596971</link><guid>https://blog.csdn.net/insistGoGo/article/details/22596971</guid><author>insistGoGo</author><pubDate>Sun, 30 Mar 2014 17:49:29 +0800</pubDate><description><![CDATA[.在Web容器（比如Tomcat）中配置Spring时，你可能已经司空见惯于web.xml文件中的以下配置代码：


        contextConfigLocation
        /WEB-INF/applicationContext.xml
    
                             
    
        
            org.spri]]></description><category></category></item><item><title><![CDATA[第三章 DispatcherServlet详解 ——跟开涛学SpringMVC]]></title><link>https://blog.csdn.net/insistGoGo/article/details/22596811</link><guid>https://blog.csdn.net/insistGoGo/article/details/22596811</guid><author>insistGoGo</author><pubDate>Sun, 30 Mar 2014 17:40:32 +0800</pubDate><description><![CDATA[3.1、DispatcherServlet作用

DispatcherServlet是前端控制器设计模式的实现，提供Spring Web MVC的集中访问点，而且负责职责的分派，而且与Spring IoC容器无缝集成，从而可以获得Spring的所有好处。 具体请参考第二章的图2-1。

 

DispatcherServlet主要用作职责调度工作，本身主要用于控制流程，主要职责如下：]]></description><category></category></item><item><title><![CDATA[使用FastDateFormat来代替JDK自带的DateFormat]]></title><link>https://blog.csdn.net/insistGoGo/article/details/22393441</link><guid>https://blog.csdn.net/insistGoGo/article/details/22393441</guid><author>insistGoGo</author><pubDate>Fri, 28 Mar 2014 13:12:29 +0800</pubDate><description><![CDATA[SimpleDateFormat来做Date到String的类型转换，建议使用Apache commons-lang中的FastDateFormat。
因为JDK里自带的SimpleDateFormat存在线程不安全问题。
maven依赖：

    commons-lang
    commons-lang
    2.5
代码：
 private String initDate() {]]></description><category></category></item><item><title><![CDATA[JUnit 4 常用的几个annotation 介绍]]></title><link>https://blog.csdn.net/insistGoGo/article/details/22189427</link><guid>https://blog.csdn.net/insistGoGo/article/details/22189427</guid><author>insistGoGo</author><pubDate>Wed, 26 Mar 2014 16:24:39 +0800</pubDate><description><![CDATA[★ @Before：初始化方法，在任何一个测试执行之前必须执行的代码;
★ @After：释放资源，在任何测试执行之后需要进行的收尾工作;
★ @Test：测试方法，表明这是一个测试方法。对于方法的声明也有如下要求：名字可以随便取，没有任何限制，但是返回值必须为void，而且不能有任何参数。如果违反这些规定，会在运行时抛出一个异常。至于方法内该写些什么，那就要看你需要测试些什么了;在这里可以测]]></description><category></category></item><item><title><![CDATA[JSP/Servlet 工作原理（转载）]]></title><link>https://blog.csdn.net/insistGoGo/article/details/20788749</link><guid>https://blog.csdn.net/insistGoGo/article/details/20788749</guid><author>insistGoGo</author><pubDate>Sat, 08 Mar 2014 23:20:09 +0800</pubDate><description><![CDATA[Servlet
Servlet 没有 main 方法，不能够独立的运行，它的运行需要容器的支持，Tomcat 是最常用的 JSP/Servlet 容器。
Servlet 运行在 Servlet 容器中，并由容器管理从创建到销毁的整个过程。
对于用户到达Servlet的请求，Servlet容器会创建特定于这个请求的ServletRequest对象和ServletResponse对象，然后调用S]]></description><category></category></item><item><title><![CDATA[SQL实例]]></title><link>https://blog.csdn.net/insistGoGo/article/details/20556423</link><guid>https://blog.csdn.net/insistGoGo/article/details/20556423</guid><author>insistGoGo</author><pubDate>Wed, 05 Mar 2014 17:26:47 +0800</pubDate><description><![CDATA[一、题目：
图书表
id book_id author_id book_name pages press
奖项表
id book_id author_id cup_type cup_time
作者表
id author_id author_name content
一、设计表，写出建表语句
二、设计索引,写出创建索引的语句
三、完成以下SQL
1. 查询姓王的作者有多少
2.]]></description><category></category></item><item><title><![CDATA[Java_List元素的遍历和删除]]></title><link>https://blog.csdn.net/insistGoGo/article/details/19619645</link><guid>https://blog.csdn.net/insistGoGo/article/details/19619645</guid><author>insistGoGo</author><pubDate>Fri, 21 Feb 2014 14:40:08 +0800</pubDate><description><![CDATA[1、创建一个ArrayList
List list = new ArrayList();
2、List常用的遍历方法有三种：
（1）下标循环


for (int i = 0, len = list.size(); i < len; i++) {
            System.out.print(list.get(i).toString());
        }
（2）fo]]></description><category></category></item><item><title><![CDATA[打印蛇形矩阵]]></title><link>https://blog.csdn.net/insistGoGo/article/details/12972997</link><guid>https://blog.csdn.net/insistGoGo/article/details/12972997</guid><author>insistGoGo</author><pubDate>Wed, 23 Oct 2013 16:18:49 +0800</pubDate><description><![CDATA[题目来自小米校招笔试题
题目：打印蛇形矩阵
思路：一次打印一个斜杠
代码：

#include 
using namespace std;

void PrintUp(int **pArrMatrix,int nCurX,int nCurY,int nLen,int& nCount);
void PrintDown(int **pArrMatrix,int nCurX,int nCurY]]></description><category></category></item><item><title><![CDATA[Reservoir Sampling - 蓄水池抽样]]></title><link>https://blog.csdn.net/insistGoGo/article/details/12350641</link><guid>https://blog.csdn.net/insistGoGo/article/details/12350641</guid><author>insistGoGo</author><pubDate>Sun, 06 Oct 2013 16:43:43 +0800</pubDate><description><![CDATA[文章转载于HappyAngle，在此谢过。
问题起源于编程珠玑Column 12中的题目10，其描述如下：


　　How
 could you select one of n objects at random, where you see the objects sequentially but you do not know the value of n beforehand? F]]></description><category></category></item><item><title><![CDATA[Manacher's ALGORITHM]]></title><link>https://blog.csdn.net/insistGoGo/article/details/12287805</link><guid>https://blog.csdn.net/insistGoGo/article/details/12287805</guid><author>insistGoGo</author><pubDate>Fri, 04 Oct 2013 18:33:18 +0800</pubDate><description><![CDATA[文章转载于Felix's Blog,在写谢过，便于理解，文章有稍微改动。
Manacher's ALGORITHM: O(n)时间求字符串的最长回文子串

首先用一个非常巧妙的方式对子串预处理，：
(1)将所有可能的奇数/偶数长度的回文子串都转换成了奇数长度：在每个字符的两边都插入一个特殊的符号。比如 abba 变成 #a#b#b#a#， aba变成 #a#b#a#。 
(2)为了进一步]]></description><category></category></item><item><title><![CDATA[每日一题(97) - 找出大于某值的最小的不重复数]]></title><link>https://blog.csdn.net/insistGoGo/article/details/12240495</link><guid>https://blog.csdn.net/insistGoGo/article/details/12240495</guid><author>insistGoGo</author><pubDate>Wed, 02 Oct 2013 20:45:29 +0800</pubDate><description><![CDATA[题目来自百度14年校招天津站笔试题，当时思路混乱导致被虐。
题目：n为正整数，求比这个数大且最小的不重复数，重复数为相邻两位数字相同，如1101为重复数，1231为不重复数。
举例：当n = 2222时，输出2301
思路：
代码：
(1)暴力解决
(2)O(n)算法

#include 
#include 
using namespace std;

char* IntToStr]]></description><category></category></item><item><title><![CDATA[C/C++ 内存泄漏检测工具 Visual Leak Detector(转载)]]></title><link>https://blog.csdn.net/insistGoGo/article/details/12224395</link><guid>https://blog.csdn.net/insistGoGo/article/details/12224395</guid><author>insistGoGo</author><pubDate>Tue, 01 Oct 2013 21:17:45 +0800</pubDate><description><![CDATA[转载于http://www.perfect-is-shit.com/2013/03/21/visual-leak-detector/

C/C++ 内存泄漏检测工具 Visual Leak Detector

这几天在用VLD(Visual Leak Detector)来检查内存泄露，感觉很好、很强大，所以推荐给大家。
下面的博文不会面面俱到，这也不是我的目的。我的目的是再看了这篇文章以]]></description><category></category></item><item><title><![CDATA[Visual Leak Detector 2.2.3 Visual C++内存检测工具(转载)]]></title><link>https://blog.csdn.net/insistGoGo/article/details/12224371</link><guid>https://blog.csdn.net/insistGoGo/article/details/12224371</guid><author>insistGoGo</author><pubDate>Tue, 01 Oct 2013 21:15:50 +0800</pubDate><description><![CDATA[转载于http://blog.csdn.net/akof1314/article/details/7549979，在此谢过。 
Visual Leak Detector是一款免费的、健全的、开源的Visual C++内存泄露检测系统。相比Visual C++自带的内存检测机制，Visual Leak Detector可以显示导致内存泄露的完整内存分配调用堆栈。
主页地址：http://vld.]]></description><category></category></item><item><title><![CDATA[每日一题(96) - 线段最多覆盖的点数]]></title><link>https://blog.csdn.net/insistGoGo/article/details/12219903</link><guid>https://blog.csdn.net/insistGoGo/article/details/12219903</guid><author>insistGoGo</author><pubDate>Tue, 01 Oct 2013 15:09:24 +0800</pubDate><description><![CDATA[题目来自百度14年校招天津站笔试题，当时各种原因导致被虐。
题目：数轴上从左到右有n个点a[0],a[1],…a[n-1]，给定一根长度为L的绳子，求该绳子能覆盖几个点。
举例：数组为{2,6,6,6,6,6,15,16,17,18,19}，线段程度为6，最多被覆盖的点数为6.
思路：可以设置两个指针pSlow和pFast,根据两个端点之间的距离来决定pSlow还是pFast向前走。
(1]]></description><category></category></item><item><title><![CDATA[每日一题(95) - 两个有序数组元素之积、和的最小K个值]]></title><link>https://blog.csdn.net/insistGoGo/article/details/12187329</link><guid>https://blog.csdn.net/insistGoGo/article/details/12187329</guid><author>insistGoGo</author><pubDate>Mon, 30 Sep 2013 10:56:22 +0800</pubDate><description><![CDATA[题目来自阿里面试题目
题目
(1)已知A B两个数组，元素有序，构造新的集合S={x*y | x属于A, y属于B} 求S中最小的k个元素，最优解法。

(2)已知A B两个数组，元素有序，构造新的集合S={x+y | x属于A, y属于B} 求S中最小的k个元素，最优解法。
思路：这两个题本质上属于同一个题目，可以使用同一个思路做。
思路(1) 暴力解决，此时时间复杂度为O(n^2)]]></description><category></category></item><item><title><![CDATA[每日一题(94) - 堆排序]]></title><link>https://blog.csdn.net/insistGoGo/article/details/11853883</link><guid>https://blog.csdn.net/insistGoGo/article/details/11853883</guid><author>insistGoGo</author><pubDate>Fri, 20 Sep 2013 20:17:05 +0800</pubDate><description><![CDATA[题目：基于数组的堆排序
思路：主要分为两步
（1）对无序数组调整成大根堆（从小到大的排序）
 对非叶子结点进行调整 
 从最后一个非叶子结点开始，一直到根结束
 每次调整，都调整一条路径，从待调整元素的位置开始，一直到叶子结点为止。
（2）把堆顶与待排序的最后一个元素交换，之后调整堆
代码：

void Swap(int& nFirst,int& nSec)
{
	int nTm]]></description><category></category></item></channel></rss>