Web项目开发
文章平均质量分 68
Zoe_Wong
这个作者很懒,什么都没留下…
展开
-
maven项目,代码正确的情况下,整个项目中的类报cannot be resolved to a type
eclipse中,导入maven项目, install后,仍有很多类报cannot be resolved to a type,这是因为未update maven, 并且项目的clean与maven的clean不同步的结果解决方案: step1. Project--clean step2:点击项目右键-->maven-->update project错误消失,感觉整个世界都清原创 2015-12-02 15:39:23 · 6908 阅读 · 3 评论 -
Storing Multiple Values in a Map--by Tim O'Brien 整理by博主
当我们需要实现key和value间的一对多关系时,MultiMap必不可少。 Maven项目使用前,加入下述依赖在你的项目pom.xml中。commons-collectionscommons-collections3.2.1 一个简单MutiMap实例:import java.util.Collection;import java.util.Iterator;impo原创 2016-02-18 11:56:41 · 420 阅读 · 0 评论 -
Java CookBook--Using a BlockingBuffer--by Tim O'Brien 整理by博主
BlockingBuffer的使用:在操作对象前需要等待输入的情况要用到BlockingBuffer Maven项目使用前,加入下述依赖在你的项目pom.xml中。commons-collectionscommons-collections3.2.1 在多线程的情况下,才能验证BlockingBuffer,以下是一个简单的BlockingBuffer使用实例,主线程往Block原创 2016-02-18 11:15:03 · 504 阅读 · 0 评论 -
Java CookBook Learning Day4th--HTTP (by Tim O'Brien)
You need to access information protected by HTTP Basic Authentication.You need to access a resource that is protected by Microsoft's NTLM authentication protocol.转载 2016-01-11 10:25:06 · 391 阅读 · 0 评论 -
Java CookBook--Creating a Priority Queue--by Tim O'Brien 整理by博主
按优先级排列的集合对象PriorityBuffer用法,来自org.apache.commons.collections.buffers.PriorityBuffer PriorityBuffer使用比较器Comparator来排列内容,若使用不包含比较器Comparator的PriorityBuffer,此时所有放入PriorityBuffer中的对象都要实现Comparable接口,Pr原创 2016-02-17 17:19:49 · 365 阅读 · 0 评论 -
Java CookBook Learning Day1st--HTTP (by Tim O'Brien)
Apache HttpClient, a set of utilities that simplifies the task of retrieving and sending information over HTTP.原创 2015-12-22 20:47:24 · 756 阅读 · 0 评论 -
Java CookBook--Using a Buffer--by Tim O'Brien 整理by博主
数据结构Buffer的使用 下面是一个最简单的Buffer实现UnboundedFifoBuffer的使用实例,UnboundedFifoBuffer是一个先进先出无大小限制的数据结构,如果无限制的添加,可能会耗尽内存。import org.apache.commons.collections.Buffer;import org.apache.commons.collections.b原创 2016-02-17 11:46:18 · 328 阅读 · 0 评论 -
Java CookBook Learning Day5th--HTTP (by Tim O'Brien)
You need to work with a system that uses cookies to store state, and you need to be able to set cookies as well as keep track of cookies set by the server.You need to access a server that may send an arbitrary number of redirects.You need to work with a转载 2016-01-11 15:30:01 · 624 阅读 · 0 评论 -
Java CookBook--Using a Bag--by Tim O'Brien 整理by博主
org.apache.commons.Collections.Bag的使用实例原创 2016-02-17 10:46:27 · 373 阅读 · 0 评论 -
Java CookBook Learning Day3rd--HTTP (by Tim O'Brien)
You need to supply parameters to a script or servlet using HTTP POST.You need to send the data from a file in an HTTP POST request.You need to upload a file or a set of files with an HTTP multipart POST.转载 2016-01-11 09:02:49 · 529 阅读 · 0 评论 -
Java CookBook Learning Day2nd--HTTP (by Tim O'Brien)
You need to see the low-level communications between the client and the server.转载 2016-01-08 16:21:32 · 564 阅读 · 0 评论 -
Retrieving a Key by a Value--by Tim O'Brien 整理by博主
有时我们不仅要以Key来获取Value,还要通过Value值获取Key,BidiMap实现了Key和Value的双向查找,但此时Key和Value必须一一对应。不可一个Key对应多个Value。 Maven项目使用前,请加入commons-collections依赖在你的项目pom.xml中。 下面为一个简单的应用,inverseBidiMap()方法的使用来实现反向获取:im原创 2016-02-18 16:12:46 · 462 阅读 · 0 评论