2014年8月27日

Manacher算法

摘要: Manacher算法求回文子串,时间复杂度为O(n) 阅读全文

posted @ 2014-08-27 18:35 徐徐微风 阅读(170) 评论(0) 推荐(0) 编辑

2014年7月17日

win7下安装memcached

摘要: memcached server端服务在win7下的安装、启动图解1、首先下载解压memcached-1.2.6-win32-bin.zip到某一盘下,如下图2、通过管理员方式运行cmd.exe。这里如果没有使用管理员身份运行,会出现一个“failed to install service or s... 阅读全文

posted @ 2014-07-17 15:29 徐徐微风 阅读(290) 评论(0) 推荐(0) 编辑

2014年7月14日

Integer自动装拆箱

摘要: public static void main(String[] args) { Integer a1 = 1; Integer a2 = 1; Integer b1 = 127; Integer b2 = 127; Integer c1 = 128; Integ... 阅读全文

posted @ 2014-07-14 16:38 徐徐微风 阅读(164) 评论(0) 推荐(0) 编辑

2014年7月5日

XShell配色方案

摘要: 总感觉xshell 4的配色方案蓝色字体看不清楚,所以就自己设置了一个配色方案,仅供参考操作步骤:1、将一下代码复制出来,保存到以.xcs(例如:test.xcs)为后缀的文件中2、在菜单栏中点击 工具->配色方案3、在弹出的对话框中点击 导入[Names]count=1name0=zcj[zc... 阅读全文

posted @ 2014-07-05 15:13 徐徐微风 阅读(770) 评论(0) 推荐(0) 编辑

2014年6月20日

XShell上传和下载

摘要: 工具:XShell本地环境:win7操作系统远程服务器环境:linux系统1、将本地的文件上传到远程服务器上可以使用rz命令rz命令详细使用方法可以在xshell中输入:rz -h2、将远程服务器上的文件下载到本地可以使用sz命令rz命令详细使用方法可以在xshell中输入:rz -h 阅读全文

posted @ 2014-06-20 16:12 徐徐微风 阅读(185) 评论(0) 推荐(0) 编辑

2014年4月8日

基于注解的Spring AOP拦截含有泛型的DAO

摘要: 出错场景1、抽象类BaseDaopublic abstract class BaseDao {public BaseDao() {entityClass = (Class) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];}private Class entityClass; @Resource private SessionFactory sessionFactory;}2、applicationContext.xml文件中配置:需要引入aop的命名空间和增加如下配置... 阅读全文

posted @ 2014-04-08 21:47 徐徐微风 阅读(3729) 评论(0) 推荐(0) 编辑

2014年3月1日

PAT Advance 1020

摘要: 题目:1020. Tree Traversals (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueSuppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the corresponding bi 阅读全文

posted @ 2014-03-01 01:31 徐徐微风 阅读(191) 评论(0) 推荐(0) 编辑

2014年2月27日

PAT Advance 1014

摘要: 题目:1014. Waiting in Line (30)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueSuppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are:The space inside the yel 阅读全文

posted @ 2014-02-27 16:03 徐徐微风 阅读(245) 评论(0) 推荐(0) 编辑

2013年12月10日

JavaWeb中文乱码问题解决思路

摘要: 1、提交页面请求或者服务器端的响应时,需要确保页面编码当时与服务器编码方式是否一致。2、对于从服务器写入数据库中的数据和从数据库中读取到服务器中的数据,需要确保服务器编码方式与数据库编码方式是否一致。遇到乱码问题一般解决步骤,以UTF-8为例,首先浏览器编码方式是否为UTF-8(例如jsp页面本身是否设置pageEncoding="UTF-8",contentType="text/html; charset=UTF-8"是设置服务器发送给客户端时的内容编码,meta中的charset=utf8客户端的浏览器用utf-8字符集编码显示该页面,)紧接着看服务 阅读全文

posted @ 2013-12-10 01:54 徐徐微风 阅读(436) 评论(0) 推荐(0) 编辑

2013年12月9日

eclipse启动错误

摘要: 1、错误日志!SESSION 2013-12-09 12:24:33.826 -----------------------------------------------eclipse.buildId=M20130204-1200java.version=1.7.0_25java.vendor=Oracle CorporationBootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CNFramework arguments: -product org.eclipse.epp.package.jee.productCommand. 阅读全文

posted @ 2013-12-09 12:32 徐徐微风 阅读(11538) 评论(3) 推荐(1) 编辑

导航