1、httpclient总结:一、基本知识准备(1)构建URI工具类,URIBuilder(2)HttpResponse类,可以添加Header信息 获取所有Header信息的方法,调用HeaderIterator接口HeaderIterator it = response.head...
分类:
其他好文 时间:
2014-07-07 16:50:50
阅读次数:
243
Problem Description:Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.ge...
分类:
其他好文 时间:
2014-07-07 16:41:12
阅读次数:
237
http://www.acmerblog.com/leetcode-lru-cache-lru-5745.htmlacm之家的讲解是在是好,丰富import java.util.LinkedHashMap;public class LRUCache { private int capacit...
分类:
编程语言 时间:
2014-07-07 15:32:24
阅读次数:
281
##**关于乱序**首先需要明确一个很普遍,但却未必人人都注意到的事实:程序并不总是按照源码中的顺序被执行的,此谓之乱序,乱序产生的原因可能有好几种:1. 编译器出于优化的目的,在编译阶段将源码的顺序进行交换。2. 程序执行期间,指令流水被 cpu 乱序执行。3. cache 的分层及刷新策略使得有...
分类:
编程语言 时间:
2014-07-07 14:46:35
阅读次数:
238
header('HTTP/1.1 200 OK');//设置一个404头:header('HTTP/1.1 404 Not Found');//设置地址被永久的重定向header('HTTP/1.1 301 Moved Permanently');//转到一个新地址header('Location:...
分类:
其他好文 时间:
2014-06-30 11:25:04
阅读次数:
198
这篇打算直接告诉大家怎么用吧,其实这个也不是很难的框架,大致使用过程如下:
// 获取缓存图片目录
File cacheDir = StorageUtils.getOwnCacheDirectory(activity,
"imageloader/Cache");
ImageLoaderConfiguration config = new ImageLoaderConfigur...
分类:
移动开发 时间:
2014-06-30 08:13:12
阅读次数:
289
Linux下Nginx的安装 如果出现:error: 'ngx_http_file_cache_node_t' has no member named 'length'异常,可能是ngx_cache_purge-2.1.tar.gz版本太旧导致...
分类:
系统相关 时间:
2014-06-30 00:11:43
阅读次数:
401
【题目】
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.
get(key) - Get the value (will always be positive) of the key if the key exists in the cache, otherwise return -1.
se...
分类:
其他好文 时间:
2014-06-29 22:45:26
阅读次数:
358
Almost one year ago, I checked how different cache settings affected KVM storage subsystem performance. Results were very clear: to obtain good I/O sp...
分类:
系统相关 时间:
2014-06-29 19:47:59
阅读次数:
448
http://www.ilsistemista.net/index.php/virtualization/43-kvm-scalability-and-consolidation-ratio-cache-none-vs-cache-writeback.html?limitstart=0 In the...
分类:
其他好文 时间:
2014-06-29 19:37:42
阅读次数:
265