自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(49)
  • 资源 (2)
  • 收藏
  • 关注

原创 cxf Interceptor 转化 multipart/form-data类型数据

因为某个需求,需要在添加一个Interceptor,然后在Interceptor里面得到request里的parameter。但是发现数据的类型是multipart/form-data的。google了好久没找到好的办法,最后发现FormUtils中有一个方法。 public static Form readForm(FormEncodingProvider<Form> provider, M

2016-04-07 15:56:41 1452 1

原创 hibernate使用懒加载时,mvc转json时因为session已经关闭报错

用的是spring mvc+hibernate,spring mvc使用responseBody时会转成son对象,然后就会报错。使用open session解决,但是这样就和没有使用lazy加载一样了。使用jsonignore注解,但是这样也不好,当我想使用这个字段时就用不了。最后找到一个方法,会自动判断对象是不是hibernate代理的对象,然后再判断这个对象有没有初始化过,如果没有初始化

2015-12-14 17:08:01 1117

原创 maven debug时,第三方jar包 source not found

我是用maven的jetty插件启动项目,如果是项目中的源码可以通过添加项目源码去查看,添加完成后需要重启项目就行。但是如果是第三方jar包就无法通过这种方式查看源码。找了很多地方,最后找到一个叫sourcelookup的eclipse插件,已经添加到了maven development tools里,在eclipse里install new software,安装即可。 地址为 http://

2015-12-14 10:28:07 2524

原创 maven 出现 SunCertPathBuilderException错误

这是应该请求了https,需要证书,我看了一下是在请求https://repo.maven.apache.org的时候报的错误参考了这里https://www.liferay.com/web/neil.griffin/blog/-/blogs/fixing-suncertpathbuilderexception-caused-by-maven-downloading-from-self-s

2015-12-14 10:10:45 3021 1

原创 WIN7 活动窗口不能显示到最前端

我妹妹的电脑出了一个很奇怪的现象,比如我有任务栏有多个窗口,当我点击的一个窗口的时候,这个窗口变成了活动窗口,但是不能在最前端显示。百度了半天,没查到。最后用谷歌查到了: http://answers.microsoft.com/en-us/windows/forum/windows_7-performance/windows-7-explorer-window-does-not-appear-

2015-09-26 17:57:55 6953

原创 WINDOW 活动窗口不能显示到最前端

我妹妹的电脑出了一个很奇怪的现象,比如我有任务栏有多个窗口,当我点击的一个窗口的时候,这个窗口变成了活动窗口,但是不能在最前端显示。百度了半天,没查到。最后用谷歌查到了,http://answers.microsoft.com/en-us/windows/forum/windows_7-performance/windows-7-explorer-window-does-not-appear-in

2015-09-26 17:49:53 11337 8

原创 MAC 命令行 查看硬盘和文件夹大小(占用空间)

df -h            命令查看整个硬盘的大小 ,-h表示人可读的du -d 1 -h    命令查看当前目录下所有文件夹的大小 -d 指深度,后面加一个数值

2015-09-15 10:26:31 67288

原创 当js传的参数包含&时

先用encodeURIComponent( string )进行转换

2015-08-18 15:38:30 552

原创 mac 10.10.3 jdk 添加证书 cacerts文件路径

要添加证书,因为系统是mac,版本为10.10.3,终于找到cacerts文件的路径,这里做一下记录。/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/lib/security

2015-08-04 14:28:32 3246

原创 mysql 替换某个数据库里所有表所有字段的文字,存储过程

CREATE PROCEDURE do_replace(in orig_str varchar(100),in new_str varchar(100),in db_name varchar(100),in t_name varchar(100))BEGIN DECLARE cul_name VARCHAR(50); DECLARE done int default 0; DECLARE

2015-07-03 11:46:38 2224 2

原创 ubuntu gnome 系统的 ctrl+alt+down与eclipse冲突

找了半天,终于找到open a console window (terminal) with the same user you use to run eclipseexecute the following commands to free up the key bindinggsettings set org.gnome.desktop.wm.keybindings switch-

2015-02-03 16:15:01 653 1

原创 Ubuntu 下 chromium 标签栏出现 乱码

sudo apt-get install ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy

2014-12-22 10:02:12 1250

转载 telnet 服务的开启

刚安装的ubuntu12.04还没有telnet功能,需要配置一下我主要是想让ubuntu12.04开启telnet服务做服务器安装openbsd-inetd:#sudo apt-get install openbsd-inetd安装telnetd:#sudo apt-get install telnetd在etc/inetd.conf文件中可以看到这一行内容:

2014-08-26 22:21:31 503

转载 Ubuntu mysql install

三种安装方式:  1. 从网上安装 sudo apt-get install mysql-server。装完已经自动配置好环境变量,可以直接使用mysql的命令。    注:建议将/etc/apt/source.list中的cn改成us,美国的服务器比中国的快很多。  2. 安装离线包,以mysql-5.0.45-linux-i686-icc-glibc23.tar.gz为例。  

2014-08-15 13:03:38 381

转载 Ubuntu下Eclipse安装SVN插件

如果尚未安装Eclipse,先安装;也可以直接下载Google提供的ADT Bundle。sudo apt-get install eclipse安装Subversionsudo apt-get install subversion安装Subversion在Eclipse上的插件Get the Java bindings for Subversion:sudo

2014-08-15 12:46:09 526

转载 Ubuntu14.04 安装WineQQ 2013

1.csdn好像不能贴百度网盘的链接,所以我加了些空格在里面,请自行在浏览器输入网址下载WineQQ 2013下载地址:http://   pan.baidu.com/s/1nthXoRv2.安装Wine QQ前先确认系统有没有安装wine[html] view plaincopydpkg -l | grep wine    如果没有,只要输入下面的

2014-08-13 19:52:12 507

原创 ZOJ 3010 The Lamp Game

这题我是用的bfs做的,用到一个map,用来统计是否访问过和最大值的保存

2014-06-30 11:07:04 472

原创 UVA 11825 - Hackers' Crackdown(状态压缩DP)

这题全是二进制的运算啊,先是把连在一起的计算机看成一个

2014-05-14 22:47:40 484

原创 UVA 10891 - Game of Sum(DP)

http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=1832

2014-05-14 20:22:28 457

原创 UVA 10635 - Prince and Princess (LCS转成LIS DP)

这题因为长度为n*n,n最大为250,所以会O(N…)

2014-05-14 19:01:30 671

原创 UVA 1394 POJ 3517 And Then There Was One (双向循环链表和递推)

这题用双向循环链表的

2014-05-11 20:23:15 665

原创 取中文的拼音首字母

取中文的拼音首字母

2014-05-11 20:14:48 844

原创 UVA 1382 - Distant Galaxy

这题就不想说什么了,反正我是想不

2014-05-04 13:07:06 584

原创 UVA 1330 - City Game

这题做的方法我是参照着大白书做的,

2014-05-04 12:52:23 523

原创 Fedora 64 运行eclipse android

既然是x64位的,要安装32位的运行库# yum install glibc.i686 # yum install glibc-devel.i686 # yum install libstdc++.i686 # yum install zlib-devel.i686 # yum install ncurses-devel.i686 # yum install libX11-

2014-04-29 19:09:19 611

原创 UVA 1398 - Meteor

这题本来想自己试试的,然后是各种错加超时,没办法 ,只能看大白书的题解了,实力还是不够啊#include #include #include using namespace std;struct EVENT{ int time; int type;};bool cmp(EVENT a,EVENT b){ if(a.time!=b.time) return a.time<

2014-04-22 00:00:32 143

原创 UVA 1398 - Meteor

这题本来想自己试试的,然后是各种错加超时,没办法 ,只能看大白书的题解了,实力还是不够啊#include #include #include using namespace std;struct EVENT{ int time; int type;};bool cmp(EVENT a,EVENT b){ if(a.time!=b.time) ret

2014-04-22 00:00:24 99

原创 UVA 1398 - Meteor

这题本来想自己试试的,然后是各种错加超时,没办法 ,只能看大白书的题解了,实力还是不够啊#include #include #include using namespace std;struct EVENT{ int time; int type;};bool cmp(EVENT a,EVENT b){ if(a.time!=b.time) ret

2014-04-21 23:29:08 98

原创 UVA 1398 - Meteor

这题本来想自己试试的,然后是各种错加超时,没办法 ,只能看大白书的题解了,实力还是不够啊#include #include #include using namespace std;struct EVENT{ int time; int type;};bool cmp(EVENT a,EVENT b){ if(a.time!=b.time) return a.time<

2014-04-21 23:20:03 150

原创 UVA 1398 - Meteor

这题本来想自己试试的,然后是各种错加超时,没办法 ,只能看大白书的题解了,实力还是不够啊#include #include #include using namespace std;struct EVENT{ int time; int type;};bool cmp(EVENT a,EVENT b){ if(a.time!=b.time) return a.time<

2014-04-21 23:18:11 108

原创 UVA 1398 - Meteor

这题本来想自己试试的,然后是各种错加超时,没办法 ,只能看大白书的题解了,实力还是不够啊#include #include #include using namespace std;struct EVENT{ int time; int type;};bool cmp(EVENT a,EVENT b){ if(a.time!=b.time) ret

2014-04-21 23:17:27 87

原创 UVA 1398 - Meteor

这题本来想自己试试的,然后是各种错加超时,没办法 ,只能看大白书的题解了,实力还是不够啊#include #include #include using namespace std;struct EVENT{ int time; int type;};bool cmp(EVENT a,EVENT b){ if(a.time!=b.time) ret

2014-04-21 23:15:54 90

原创 UVA 1398 - Meteor

这题是在大白书上的题,一开始没有看题解,各种错,超时什么的,最后实在没法子,只能看了题解,唉,水平还是不够啊#include #include #include using namespace std;struct EVENT{ int time; int type;};bool cmp(EVENT a,EVENT b){ if(a.time!=b.time) retu

2014-04-21 23:12:51 106

原创 UVA 1398 - Meteor

这题是在大白书上的题,一开始没有看题解,各种错,超时什么的,最后实在没法子,只能看了题解,唉,水平还是不够啊#include #include #include using namespace std;struct EVENT{ int time; int type;};bool cmp(EVENT a,EVENT b){ if(a.time!=b.time) re

2014-04-21 23:12:46 99

原创 UVA 1398 - Meteor

这题是在大白书上的题,一开始没有看题解,各种错,超时什么的,最后实在没法子,只能看了题解,唉,水平还是不够啊#include #include #include using namespace std;struct EVENT{ int time; int type;};bool cmp(EVENT a,EVENT b){ if(a.time!=b.time) retu

2014-04-21 23:10:50 460

原创 UVA 11549 - Calculator Conundrum

这题可以用C++里的SET做,但是需要很大的空间,而且时间效率也低了点,

2014-04-21 19:20:12 572

原创 UVA 1267 - Network

要先把无根数转成有根数,然后不断的查找更新就行了

2014-04-18 15:19:55 516

原创 UVA 1335 - Beijing Guards

这道题当N等于偶数的时候,很方便,直接输出两个

2014-04-18 15:16:38 669

转载 SPFA算法详解

适用范围:给定的图存在负权边,这时类似Dijkstra等算法便没有了用武之地,而Bellman-Ford算法的复杂度又过高,SPFA算法便派上用场了。 我们约定有向加权图G不存在负权回路,即最短路径一定存在。当然,我们可以在执行该算法前做一次拓扑排序,以判断是否存在负权回路,但这不是我们讨论的重点。算法思想:我们用数组d记录每个结点的最短路径估计值,用邻接表来存储图G。我们采取的方法是

2014-04-18 10:53:18 524

原创 UVA 11078 - Open Credit System

这道题用两重循环很明显会超时

2014-04-18 10:43:14 629

WinToFlash0.7beta

能将系统光盘(ISO文件,可以用虚拟光驱)的系统文件,复制到U盘里,下次装系统时,就可以用U盘来装系统

2011-05-13

win7添加智能ABC

很多人喜欢打智能ABC,但是WIN7没有了智能ABC,这个软件,就可以安装智能ABC

2011-05-13

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除