- 博客(32)
- 收藏
- 关注
原创 [Maven]添加新仓库或者新发布依赖后却获取不到问题的解决方案
tags: maven[ERROR] Failed to execute goal on project settings: Could not resolve dependencies for project com.netease.mail:settings:war:1.0.0: The following artifacts could not be resolved: newbee:c
2014-04-11 14:49:39
1730
原创 cURL如何只获取http请求的code信息
参考:http://beerpla.net/2010/06/10/how-to-display-just-the-http-response-code-in-cli-curl/仅获取结果响应码curl -s -w "%{http_code}" 'url' -o /dev/null命令解释-s表示slient,不显示进度或错误信息。如:$ curl -w
2014-04-11 12:45:46
6757
原创 [Maven]如何构建依赖图
主要是参考 http://stackoverflow.com/questions/4084669/how-to-generate-a-graph-of-the-dependency-between-all-modules-of-a-maven-project 中提供的几种工具。Maven Graph Plugin:Link使用该插件首先需要安装Graphviz,msi安装会将执
2013-11-05 22:48:57
2296
原创 [iBatis]加载xml时的异常
10:10:45 ERROR org.springframework.web.context.ContextLoader - Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mysqlMapClient' def
2013-07-30 10:22:23
1111
原创 Windows下tomcat jvm参数设定
http://stackoverflow.com/questions/286007/how-to-tune-tomcat-5-5-jvm-memory-settings-without-using-the-configuration-progr背景:软件版本D:\Program Files\tomcat\apache-tomcat-6.0.36\bin> .\version.bat
2013-07-23 11:20:10
808
原创 Evernote语法高亮
参考博文:http://myfairland.net/evernote-code-highlight/Evernote本身不支持语法高亮,这让经常做技术类积累的人着实苦恼。但是evernote粘贴是会对源格式进行保留,复制源是已语法高亮的,复制过来可以保留格式。这也提供了一些其他途径来做语法高亮标记。参考博文中提到了一些在线语法高亮的站点,提供了将未格式化的文本进行相应语言的高亮转换服务:
2013-07-18 10:35:29
2415
原创 eclipse启动server时异常
具体异常内容见下:Could not load the Tomcat server configuration at \Servers\Tomcat v6.0 Server at localhost-config. The configuration may be corrupt or incomplete.创建的server与之前可以正常运行的server稍有不同。如下为正常的serve
2012-12-30 16:01:06
1134
原创 eclipse执行编译后的类文件抛出Could not find the main class: 异常解决方案之一
写一些测试代码后执行的时候,抛出找不到main方法的异常。当时感觉很奇怪,因为之前编译运行还是没有问题的。参考了stackoverflow的一些方法,但是得不到解决。如下链接中所提供的方法:http://stackoverflow.com/questions/10356854/eclipse-cant-find-load-main-class关闭eclipse,删除workspac
2012-12-29 21:46:29
1486
原创 virtualbox快捷键
上次不小心把显示改成了Scale Mode,导致菜单栏找不见了。。。这个样子,然后启动时也没有提示修改的地方,查手册又不知道查哪,就只好重新装了一个虚拟机,看一下上次到底是做了哪个操作,然后百度一下,才把菜单调出来。现在记一下快捷键:host键windows下为右ctrl
2012-12-11 21:05:33
1037
翻译 ATP 5 apt.conf
用apt安装chromium-browser的时候,会出现如下错误提示:E: 无法立即对 python-minimal 进行配置。请查看 man 5 apt.conf 中的 APT::Immediate-Configure (2)如下为man中的参考:原文:Immediate-ConfigureDefaults to on which will cause
2012-11-05 09:58:53
2581
原创 [USACO]Party Lamps
Party LampsIOI 98To brighten up the gala dinner of the IOI'98 we have a set of N (10 N.The lamps are connected to four buttons:Button 1: When this button is pressed, all the lamps change t
2012-10-17 16:01:54
604
原创 线程协作测试
题目来自今年某公司一次笔试试题。大致题目要求为:一个线程A及一组线程B,令线程A触发B线程执行后进行等待,待线程B全部执行完毕后,A继续执行,求方案。最简单的用wait/notify:/*** 线程A*/import java.util.ArrayList;import java.util.Iterator;public class ThreadA
2012-10-11 09:59:39
455
原创 [NIO]利用内存映射文件以及普通通道进行文件拷贝效率分析
//测试代码, 用来验证内存映射文件、使用缓冲及流的文件读写的效率。可见内存映射文件的效率最高。package com.nio.test;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOExceptio
2012-09-27 17:26:07
668
原创 [USACO]Runaround Numbers
Runaround NumbersRunaround numbers are integers with unique digits, none of which is zero (e.g., 81362) that also have an interesting property, exemplified by this demonstration:If you start a
2012-09-26 14:48:30
555
原创 [USACO]Subset Sums
Subset SumsJRMFor many sets of consecutive integers from 1 through N (1 For example, if N=3, one can partition the set {1, 2, 3} in one way so that the sums of both subsets are identical:{3}
2012-09-19 21:40:05
564
原创 [USACO]Healthy Holsteins
Healthy HolsteinsBurch & KolstadFarmer John prides himself on having the healthiest dairy cows in the world. He knows the vitamin content for one scoop of each feed type and the minimum daily vita
2012-08-29 09:21:00
721
原创 [USACO]checker
八皇后问题,要求输出按数值排序的前三种布局方式(用一个数组代表每行皇后放置位置),以及布局的种类。写了两个方案,第一个为循环,第二个为递归。循环复杂度超了一点,没有通过。递归做了优化,可以通过。两个方案都贴出来,做些对比:方案一:循环,用一个数组保存前几行皇后摆放情况以及未放置皇后的列信息。第二种方法也是用同样的数组进行信息保存,这样做不知道算不算是个偷巧,因为这样并不能保证得到全部的
2012-08-21 14:33:05
416
原创 [USACO]clocks
提交了15次,一直超时。后来参考别人的解题思路,和自己的做了对比,复杂度一致,差在一个常数倍上。采用BFS算法,和别人的想法有些不太一样。用一个树来代表全部有效的操作步骤,从根到每个叶的路径为一个有效的操作,每个节点的value为一个二维数组,数组的第一个元素代表该节点子节点值的取值下限,如若为4,则第一个子树的值应当为4,第二个为5,一次类推;第二个元素代表从根节点到本节点第一个元素值出
2012-08-21 14:07:48
832
原创 Weblogic 12c 运行使用Slf4j日志框架应用解决方案
Weblogic 12c版本使用slf4j作为logging facade,bind的logger为jdk14。这样在引擎(Weblogic)中加载的应用如果使用了slf4j+其他binder,运行时就会出现问题。有人提出如下解决方案为:删除weblogic lib中的slf4j相关jar文件(org.slf4j.api_1.6.1.0.jar\org.slf4j.ext_1.6.
2012-08-14 12:56:18
8361
1
原创 [USACO]Arithmetic Progressions
Arithmetic ProgressionsAn arithmetic progression is a sequence of the form a, a+b, a+2b, ..., a+nb where n=0,1,2,3,... . For this problem, a is a non-negative integer and b is a positive integer.
2012-08-08 08:56:02
1010
原创 [USACO]Prime Cryptarithm
Prime CryptarithmThe following cryptarithm is a multiplication problem that can be solved by substituting digits from a specified set of N digits into the positions marked with *. If the set of pr
2012-07-25 10:45:29
518
原创 [USACO]Calf Flac -- 时间复杂度还是略高
Calf FlacIt is said that if you give an infinite number of cows an infinite number of heavy-duty laptops (with very large keys), that they will ultimately produce all the world's great palindromes
2012-07-18 10:45:48
556
原创 [USACO]Barn Repair
Barn RepairIt was a dark and stormy night that ripped the roof and gates off the stalls that hold Farmer John's cows. Happily, many of the cows were on vacation, so the barn was not completely ful
2012-07-16 22:44:40
431
原创 [USACO]Palindromic Squares
Palindromic SquaresRob KolstadPalindromes are numbers that read the same forwards as backwards. The number 12321 is a typical palindrome.Given a number base B (2 <= B <= 20 base 10), print all the
2012-07-16 22:40:51
569
原创 [USACO]Name That Number
Name That NumberAmong the large Wisconsin cattle ranchers, it is customary to brand cows with serial numbers to please the Accounting Department. The cow hands don't appreciate the advantage of th
2012-07-02 15:36:52
559
原创 [USACO]Transformations
TransformationsA square pattern of size N x N (1 <= N <= 10) black and white square tiles is transformed into another square pattern. Write a program that will recognize the minimum transformation
2012-06-29 17:57:53
846
原创 [USACO]Milking Cows
Three farmers rise at 5 am each morning and head for the barn to milk three cows. The first farmer begins milking his cow at time 300 (measured in seconds after 5 am) and ends at time 1000. The second
2012-06-28 22:52:31
565
原创 【USACO】PROB Friday the Thirteenth
Friday the ThirteenthIs Friday the 13th really an unusual event?That is, does the 13th of the month land on a Friday less often than on any other day of the week? To answer this question, wr
2012-06-12 23:58:43
593
原创 【USACO】PROB Broken Necklace
Broken NecklaceYou have a necklace of N red, white, or blue beads (3 1 2 1 2 r b b r b r r b r
2012-06-12 14:40:56
584
原创 格雷码推导
今日看百度百科上关于位运算的内容,里面提到格雷码的一个计算公式,引文:Gray码的第n个数(从0算起)是n xor (n shr 1)。看起来有点抽象,也可能是不够聪明,一眼看不出来,就拿纸笔推导了一下。百度百科原文链接:http://baike.baidu.com/view/379209.htm#7
2012-06-04 09:36:54
1130
翻译 【linux命令学习】之top/ps
【linux命令学习】之top先上man:name: top - display Linux taskssynopsis: top -hv | -bcHisS -d delay -n iterations -p pid [, pid ...]description:The top program provides a dynamic real-time view of
2012-05-23 15:19:08
446
转载 Redis 起步
原文链接Redis 起步Rdis和JQuery一样是纯粹为应用而产生的,这里记录的是在CentOS 5.7上学习入门文章:1.Redis简介 Redis是一个key-value存储系统。和Memcached类似,但是解决了断电后数据完全丢失的情况,而且她支持更多无化的value类型,除了和string外,还支持lists(链表)、sets(集合)和zsets
2012-05-02 14:40:26
995
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人