- 博客(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 1487 1
原创 hibernate使用懒加载时,mvc转json时因为session已经关闭报错
用的是spring mvc+hibernate,spring mvc使用responseBody时会转成son对象,然后就会报错。使用open session解决,但是这样就和没有使用lazy加载一样了。使用jsonignore注解,但是这样也不好,当我想使用这个字段时就用不了。最后找到一个方法,会自动判断对象是不是hibernate代理的对象,然后再判断这个对象有没有初始化过,如果没有初始化
2015-12-14 17:08:01 1143
原创 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 2568
原创 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 3118 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 7302
原创 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 12514 8
原创 MAC 命令行 查看硬盘和文件夹大小(占用空间)
df -h 命令查看整个硬盘的大小 ,-h表示人可读的du -d 1 -h 命令查看当前目录下所有文件夹的大小 -d 指深度,后面加一个数值
2015-09-15 10:26:31 68442
原创 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 3342
原创 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 2298 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 688 1
原创 Ubuntu 下 chromium 标签栏出现 乱码
sudo apt-get install ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy
2014-12-22 10:02:12 1281
转载 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 529
转载 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 410
转载 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 547
转载 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 523
原创 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 479
原创 UVA 10635 - Prince and Princess (LCS转成LIS DP)
这题因为长度为n*n,n最大为250,所以会O(N…)
2014-05-14 19:01:30 697
原创 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 631
原创 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 173
原创 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 121
原创 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 119
原创 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 169
原创 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 124
原创 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 107
原创 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 105
原创 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 126
原创 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 113
原创 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 483
转载 SPFA算法详解
适用范围:给定的图存在负权边,这时类似Dijkstra等算法便没有了用武之地,而Bellman-Ford算法的复杂度又过高,SPFA算法便派上用场了。 我们约定有向加权图G不存在负权回路,即最短路径一定存在。当然,我们可以在执行该算法前做一次拓扑排序,以判断是否存在负权回路,但这不是我们讨论的重点。算法思想:我们用数组d记录每个结点的最短路径估计值,用邻接表来存储图G。我们采取的方法是
2014-04-18 10:53:18 544
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人