- 博客(77)
- 资源 (1)
- 收藏
- 关注
原创 eclipse 启动 tomcat htt://localhost:8080 不能访问
症状:tomcat在eclipse里面能正常启动,而在浏览器中访问http://localhost:8080/不能访问,且报404错误。同时其他项目页面也不能访问。关闭eclipse里面的tomcat,在tomcat安装目录下双击startup.bat手动启动tomcat服务器。访问htt://localhost:8080/能正常访问tomcat管理页面。症状原因: ...
2016-02-03 14:48:50 824
原创 reading ***.jar; error in opening zip file
Archive for required library: **.jar' in project *** cannot be read or is not a valid ZIP file错误: 读取 ***.jar时出错; error in opening zip file[ERROR] error: error reading ***.jar; error in opening ...
2015-12-30 07:01:14 1765
原创 maven 公网 setting.xml 配置(apache-maven-3.0.3)
公网配置项目,不是很方便,总是需要等待很长时间....下面是我自己调试过,比较好使的数据源配置、加载方式<?xml version="1.0" encoding="UTF-8"?><settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xs...
2015-12-29 14:19:00 987
原创 tomcat6-maven-plugin 配置(已经调试OK)
[1]tomcat-users.xml<role rolename="admin"/> <role rolename="admin-gui"/> <role rolename="manager"/> <role rolename="manager-script"/> <role
2015-12-28 14:50:58 452
原创 pdf 页面中嵌入展示
1.嵌入code <iframe id="pdf" src="#springUrl('')/static/demo/demo.pdf" width="100%" height="800" allowtransparency="true" ></iframe> 2.iframe 显示pdf时,显示到最前端,覆盖弹出框。解决方法如下。
2015-12-20 13:25:49 425
原创 iText watermark(pdf 新增水印,有一页总是新增不了)
pdf 新增水印,有个总是新增不了:水印能选中,但是就是不能复制~最后真是没辙了~~跟pdf主人沟通,说不能新增的那个页是一张粘贴的图片。 总结:1.出现问题的原因很多,其实离自己解决的方法很近,要相信自己的判断。2.解决的方向:A 首选还原错误的场景,这个真是首选,只要很好沟通就能快速找到真正的原因!B 分析异常页面的组成内容,最好能拆分展示,这个是逆向能找到...
2015-10-21 12:11:40 696
原创 JDBC userenv('LANG')
select userenv('LANGUAGE') ,userenv('LANG') from dual;SIMPLIFIED CHINESE_CHINA.UTF8 ZHS 1.想修改JDBC所在tomcat端的值userenv('LANG')为 US;2.在tomcat 启动脚本中,设置 NLS_LANG=AMERICAN_AMERICA.UTF8 没有什么作用3...
2015-08-25 15:51:09 722
原创 java 处理 BLOB OutputStream(插入空的Blob字段到表中)
1.插入占位数据:insert into TEST_CUICF(t1,t2) values(12,empty_blob())2.获得占位数据:select t1,t2 from TEST_CUICF t for update BLOB oracleBlobMockIn = oracleBlobMockIn = control.createMock(BLOB.class);...
2015-07-08 18:45:06 1113
原创 getResourceAsStream Returning Null
在单元测试时:Maven + Junit + getResourceAsStream Returning Null经过验证:*.properties 在 src/test/main 下,一会能找到,一会找不到。 问题解决方法:在maven pom.xml 中,设置文件字段导入。 <testResources> <testResource> ...
2015-03-24 15:42:21 163
Oracle中求出本星期第一天和第七天的日期
<1>西方应用是周日是first day,中国人思维则为,周日是最后一天。其实,只需要计算到周一,就可直接获得周日。<2>应用实例--Sundayselect to_date(next_day(to_date('2015-02-09 22:00:00', 'yyyy-mm-dd hh24:mi:ss') - 7, 2)) 周一,to_date(next_day...
2015-03-03 10:17:31 228
原创 Maven 的classifier的作用(转)
http://blog.csdn.net/lovingprince/article/details/5894459
2013-06-13 13:33:08 251
原创 回调函数理解
http://www.cnblogs.com/wangchenyang/archive/2011/08/16/2140744.html <1>所谓回调,就是客户程序CLIENT调用服务程序SERVER中的某个函数SA,然后SERVER又在某个时候反过来调用CLIENT中的某个函数CB,对于CLIENT来说,这个CB便叫做回调函数。例如Win32下的窗口过程函数就是一个典型...
2013-05-17 17:07:53 90
原创 Hive配置参考
安装环境: 机器 只需要安装一台机器 操作系统:Ubuntu 11.04 64操作系统 hadoop:版本是1.0.2,安装在/usr/local/hadoop sun jdk:版本是1.6.0_31 64bit,安装在/usr/local/jdk hive:版本是0.8.1,安装在/usr/local/hive安装步骤:1...
2013-01-25 21:55:43 104
原创 CentOS-5.5中文设置
我是在VM安装的。 在ISO包中找到这两个文件:fonts-chinese-3.02-12.el5.noarch.rpmfonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm一 个是中文字体,一个是字体显示包。安装:#rpm -ivh XXXX ( XXXX 代表上面那两个包的全名, rpm 不会不知道怎么用吧?)CentOS系统安装完成后,重新启动即可。...
2012-09-04 14:26:41 353
原创 Nagios项目参考
<1>Nagios项目中文文档http://nagios-cn.sourceforge.net/nagios-cn/index.html<2> Nagios 安装完毕,Map部分无法显示,这个的问题是没有安装 gd gd-delev 直接安装这两个包,删除原来的Nagios安装文件,然后按照官方文档安装就会正确生成:statusmap.cgi 等cgi文...
2012-02-14 11:42:26 76
原创 25-设计模式学习总结
在学习Thinking in patterns之前,我认真学习了Thinking in Java。承前启后的学习,让我对OO有了更近一步的认识, 继承、多态等面向对象的概念,不是仅仅了解概念就OK。一些深层次的知识是需要在实际操作后才能真正明白,很多知不是简单样例讲解能够代表的,最主要的是自己在实际项目参与时,或者在平时的开源代码学习、应用中,将编程思想贯彻进去,这才是软件开...
2012-02-06 15:42:40 74
原创 24-Prototype
Prototype(原型模式):用原型实例指定创建对象的种类,并且通过拷贝这些原型创建新的对象。 该模式允许一个对象再创建另外一个可定制的对象,根本无需知道任何如何创建的细节,工作原理是:通过将一个原型对象传给那个要发动创建的对象,这个要发动创建的对象通过请求原型对象拷贝它们自己来实施创建。由于Java提供clone()方法来实现对象的克隆,所以Prototype模式实...
2012-02-06 14:56:26 73
原创 23-Interpreter
If theapplication user needs greater run time flexibility, for example to createscripts describing the desired behavior of the system, you can use the Interpreterdesign pattern. Here, you c...
2012-02-05 14:51:52 62
原创 22-Visitor
The assumption is that you have a primary class hierarchy that is fixed; perhaps it’s from another vendor and you can’t make changes to that hierarchy. However, you’d like to add new polym...
2012-02-05 11:12:43 61
原创 21-Memento
Use serialization to create an undo mechanism.这是教材中唯一一句讲解!正如Memento(纪念物)的含义提示一样,该设计模式有记忆效果,能恢复原状态!准确来说就是:在不破坏封装性的前提下,捕获一个对象的内部状态,并在该对象之外保存这个状态。这样以后就可将该对象恢复到原先保存的状态。 该设计模式实际...
2012-02-03 17:57:05 140
原创 20-Chain of responsibility
Chain ofResponsibility might be thought of as a dynamic generalization of recursionusing Strategy objects. You make a call, and each Strategy in alinked sequence tries to satisfy th...
2012-02-03 16:25:34 67
原创 19-Command: choosing the operation at run-time
A Command is a function object in its purest sense: a method that’s an object. By wrapping a method in an object, you can pass it to other methods or objects as a parameter, to tel...
2012-02-01 17:45:04 56
原创 2011总结
2011年总结 很早就想来总结一下,算是对过去一年作回顾。正所谓:有总结才有所得、方可展望。 这个时间段内,经历过很多挫折,主要是来自专业学习、技术深入等。 从专业知识方面来说: 先是学习C,然后是Java,期间反复有C应用,最有确定了专注Java方向。原因是,作为最流行语言...
2012-01-31 20:45:05 61
原创 18-Facade
Facade模式: 为子系统中的一组接口提供一个一致的界面.简言之,就是为凌乱、繁杂的接口(或者是类)构造一个统一的接口(或者是类),便于使用、很多时候达到了复用的目的。这在教材中的例子能够看出来,有一句是很好的总结:A tax adviser is a Façade between you and the tax code, anda mediator between you and...
2012-01-15 15:22:17 75
原创 17-Mediator
Mediator模式:用一个中介对象来封装一系列的对象交互,使各对象不需要显示地相互调用。简单而言就是封装了多个对象之间的复杂操作,使的两个对象解耦! http://www.jdon.com/designpatterns/mediator.htm http://gary0416.iteye.com/blog/913462 ...
2012-01-14 19:40:59 47
原创 16-Observer
好久之前看过Observer,但是,当时不是很清楚,应该是Java刚刚入门的原因....现在看来啊,是比较优秀、很好的设计模式! Like the otherforms of callback, this contains a hook point where you can change code. Thedifference is in the obser...
2012-01-12 21:35:19 56
原创 15-Composite
Composite模式,有时又叫做部分-整体模式(Part-Whole)。它将对象组织到树结构中,可以用来描述整体与部分的关系。合成模式可以使客户端将单纯元素与复合元素同等看待。 这个模式的具体含义是很好理解的,教材中讲解的还行。具体再参考这个案例一下就更好了!!主要是在具体的实际的中用总结一下!后续...... ...
2012-01-12 10:11:40 52
原创 14-Bridge
思考了好一阵,总是没有一个合适的答案,感觉没有办法继续往下写了.... 先展示一下Bridge设计模式的目的就是:将抽象与其实现解耦,使它们可以独立的适应变化,这是在Gof中的描述(很是通用,但是没有感觉....) 老实说,教材中的例子比较抽象啊,不是很容易理解,但是讲解还算可以,毕竟是外文啊,参考了一些博客内容,感觉这个讲解比较集中,好理解。 ...
2012-01-11 17:06:42 80
原创 13-Adapter
接下来的两个模式目的就是:Connecting different typesAdapter takes one type and produces an interface tosome other type. When you’ve got this,and you need that, Adapter solves the problem. The only...
2012-01-10 21:38:58 54
原创 12-Decorator:too many classes
呵,从翻译这个标题开始这个模式学习吧:The use of layered objects to dynamically and transparently addresponsibilities to individual objects is referred to as the decoratorpattern.--利用多层对象动态、透明地给一个对象添...
2012-01-06 20:17:40 425
原创 五年java人的一点感悟(转)
恍然间,发现自己在这个行业里已经摸爬滚打了五年了,原以为自己就凭已有的项目经验和工作经历怎么着也应该算得上是一个业内比较资历的人士了,但是今年在换工作的过程中却遭到了重大的挫折。 详细过程我就不再叙述,在此,只想给大家说一说被拒绝的原因,看看大家有没有相似的经历,和类似的感悟。面试官对我的答复大致是这样的,我们不需要熟练工,我们需要在某领域...
2012-01-06 16:37:17 85
原创 11-Flyweight: too many objects
The odd thing about flyweight, in the company of the otherdesign patterns, is that it’s a performance hack. It’s generally ideal tosimply make an object for every item in your system, but some pro...
2012-01-06 16:10:52 137
原创 10-Builder
The goal of builder is to separate the construction from the“representation,” to allow multiple different representations. The constructionprocess stays the same, but the resulting object has di...
2012-01-06 09:14:23 66
原创 9-Factory method(Simple Factory method&Abstract factories)
//工厂方法的理解比较容易,重要还是如何在实践中应用。以下范例比较经典: 基本概念 FactoryMethod是一种创建性模式,它定义了一个创建对象的接口,但是却让子类来决定具体实例化哪一个类.当一个类无法预料要创建哪种类的对象或是一个类需要由子类来指定创建的对象时我们就需要用到FactoryMethod 模式了.简单说来,FactoryMethod可...
2012-01-03 19:16:47 72
原创 8-Template method
An applicationframework allows you to inherit from a class or set of classes and create a newapplication, reusing most of the code in the existing classes and overridingone or more methods in or...
2012-01-01 20:50:34 83
原创 7-Policy: generalized strategy
Although GoF says that Policy is just another name forstrategy, their use of Strategy implicitly assumes a single method in thestrategy object – that you’ve broken out your changing algorithm as a...
2012-01-01 15:58:57 105
原创 计算机程序的执行过程理解
<第一部分>学过任何一门程序语言的人都会知道,一个可执行程序的形成要经过的步骤是:编辑--->编译形成.obj文件--->链接形成.exe文件。那么计算机程序到底是怎样运行的呢?上面的简单过程我相信都可以想到。但是其实质,需要这些步骤的理由是什么?我们有没有想过呢?首先当然是编程,需...
2011-12-31 10:00:09 966
原创 6-Strategy: choosing the algorithm at run-time
Strategy: choosing thealgorithm at run-timeStrategyalso adds a “Context” which can be a surrogate class that controls theselection and use of the particular strategy object—just like Sta...
2011-12-29 10:40:15 132
原创 5-Iterators: decoupling algorithms from containers
In the process,he realized that iterators are central to the use of algorithms, because they decouplethe algorithms from the specific type of containe...只看这个,不是很好理解。找了两个资料,感觉是比较好的例子:<1>...
2011-12-27 15:39:44 63
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人