- 博客(29)
- 资源 (23)
- 收藏
- 关注
原创 菜鸟学习之:solr环境搭建
何为solr敢为solr为何物,先google下吧!官方原版说明:http://lucene.apache.org/solr/中文说明:http://www.oschina.net/p/solr准备工作以下讲述的事在windows下solr的搭建过程。假设你是一位java工作者,java的开发环境依然可用。1,下载solr:http://lucene.apach
2012-12-01 23:18:02
3417
翻译 redis:string类型的原理及实现
redis作为一个key-value数据库,string是其基本数据类型。redis所有的keys都是字符串类型,同时字符串类型也是values的基本数据类型。以及其他更为复杂的数据类型——lists,sets,sorted sets,hashes——也是使用字符串来实现的。redis string数据类型的实现包含在sds.c(sds,即为Simple Dynamic Strin
2011-12-01 13:34:02
4169
原创 redis: sorted set数据类型与操作
redis支持有序集合,即sorted sets数据类型。基本格式为:key --> member -- score | --> member -- score sorted set类型的实现采用了两个数据结构:hash table 和 skip list(跳跃表),其中hash table是具体使用redis中的dict来实现的,主要是为了保证查询效率为O(1)
2011-11-28 18:53:43
6902
原创 redis:set数据类型与操作
set是集合。我们可以向一个集合中“插入”,“删除”元素,也可以计算两个集合的“交集”,“并集”,及“作差”。如:假设有集合A,B。其中,A={1,2,3,4,5},B={4,5,6,7,8}。那么,交集:inter(A,B)= {4,5}并集:union(A, B)= {1,2,3,4,5,6,7,8}差集:diff(A,B)= {1,2,3},即属于集合A,但不属于集合
2011-11-25 13:55:37
6026
原创 redis:list数据类型与操作
redis数据类型之list:redis list数据类型是一个双向循环链表。redis.conf中的相关配置如下:428 # Similarly to hashes, small lists are also encoded in a special way in order429 # to save a lot of space. The special representation i
2011-11-24 19:03:32
6408
原创 redis:hash数据类型与操作
Redis hash是一个string类型的field和value的映射表.一个key可对应多个field,一个field对应一个value。将一个对象存储为hash类型,较于每个字段都存储成string类型更能节省内存。新建一个hash对象时开始是用zipmap(又称为small hash)来存储的。这个zipmap其实并不是hash table,但是zipmap相比正常的hash实现可以节省不
2011-11-22 18:51:49
99278
原创 redis:string数据类型与操作
redis的基本数据类型之一:string。类型说明定义:src/sds.h 39 struct sdshdr { 40 int len; 41 int free; 42 char buf[]; 43 };sds是Simple Dynamic Strings的缩写,即简单的动态字符串。其中,len:buf数组的长度。free:数组
2011-11-21 17:22:37
4436
原创 初识redis:安装与配置
redis是一个开源的key-value存储引擎。它支持string、hash、list、set和sorted set等多种数值类型。提供了Python,Ruby,Erlang,PHP等客户端。它跟memcached类似,不过数据可以持久化,支持在服务器端计算集合的并,交和补集(difference)等,还支持多种排序功能。所以Redis也可以被看成是一个数据结构服务 器。 Red
2011-11-19 18:47:26
1171
原创 红黑树(red-black tree)
红黑树是一种自平衡二叉查找树,它能保证在最坏的情况下,基本的动态集合操作(search,insert,delete,predecessor,successor,minimum,maximum)的时间复杂度为o(lgN)。基本性质 树中每个结点包含5个域:colo
2011-10-16 14:08:28
1159
转载 Linux slab分配器
内存管理的目的转自:https://www.ibm.com/developerworks/cn/linux/l-linux-slab-allocator/内存管理的目标是提供一种方法,为实现各种目的而在各个用户之间实现内存共享。内存管理方法应该实现以下两个
2011-09-24 18:51:23
2198
原创 Linux下编译C程序
Linux下编译C程序常见文件:.a .o .so .ls虽然Linux下的文件类型不依赖于文件后缀,但通常来说:文件后缀说明.o目标文件,相当于windows下的.obj.so共享库,是shared object,
2011-08-30 19:56:31
1463
原创 C++与Java的区别
<br /> Java与C++都是当前比较流行的面向对象编程语言,它们都具有面向对象的三大特性——继承,封装,多态。从总体上来讲,C++兼容了C,在C语言的基础上加上了面向对象的,所以C++同时具有面向过程和面向对象的特点。而Java是一种完全面向对象的语言,它借鉴了C/C++的许多成功经验,但也摒弃了C++的许多难点与“不足”,因此它显得更为简单易学。下面主要谈谈它们之间的区别:<br /> <br />1.Java编译成字节码,然后通过Java虚拟机(JVM)解释执行,这使得Java具有更强的跨平台性
2010-11-01 15:21:00
1851
原创 大数运算
大数运算 大数运算的实现方法主要有以下几种:1) 用字符串表示大数。将大数用十进制字符数组表示,然后按照“竖式计算”的思想进行计算。这种方法比较容易理解,但是计算效率很低。2) 将大数看成二进制流进行处理。使用各种位运算和逻辑操作来实现打算的运算。该方法设计复杂,可读性较差,而且难以调试。3) 将大数表示成一个n进制数组
2010-10-03 18:54:00
16038
原创 POJ 1125 Stockbroker Grapevine
<br /><br />Description<br />Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your employer the tactical edge in the stock market. For maximum effect,
2010-10-02 22:45:00
1260
原创 POJ 1183排列
排列Time Limit: 1000MS Memory Limit: 30000KTotal Submissions: 8821 Accepted: 3948Description题目描述: 大家知道,给出正整数n,则1到n这n个数可以构成n!种排列,把这些排列按照从小到大的顺序(字典顺序)列出,如n=3时,列出1 2 3,1 3 2,2 1 3,2 3 1,3 1 2,3 2 1六个排列。 任务描述: 给出某个排列,求出这个排列的下k个排列,如果遇到最后一个排列,则下1排列为第1个排列,即排列1 2 3…
2010-09-07 09:38:00
2628
原创 POJ Moving Tables
Time Limit: 1000MS Memory Limit: 10000K DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the north side and south side along the corridor. R
2010-08-25 17:51:00
843
原创 POJ to The Max
Time Limit: 1000MS Memory Limit: 10000K <br />DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within the whole array. The sum of a rectangle is the sum o
2010-08-24 22:00:00
800
原创 POJ Occurrence of Digits
Time Limit: 1000MS Memory Limit: 65536K <br />Description<br />Every fraction can be converted to a repeatin decimal. For example 1/2 = .5, 1/3 = .(3) and 1/6 = .1(6). Given an integer n, Tom wants to know how many digit k occurs totally in the repeating d
2010-08-24 12:50:00
897
原创 C语言位操作符的使用
C语言的设计具备了汇编语言的运算能力,它支持全部的位操作符。位操作符是对字节或字中的位进行测试、置位或移位处理,在对微处理器的编程中,特别适合对寄存器、I/O端口进行操作。6种伟操作符:(1) & :按位“与”——仅当两个操作数为1时,结果为1,否则为0。如:1000 1000 & 1000 0001 = 1000 0000;(2) | :按位“或”——仅当两个操作数为0时,结果为
2010-08-02 20:29:00
30414
原创 POJ Parencodings
ParencodingsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 9010 Accepted: 5321DescriptionLet S = s1 s2...s2n be a well-formed string of parentheses. S ca
2010-04-21 12:42:00
2271
原创 POJ Ugly number
Ugly NumbersTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 11120 Accepted: 4886DescriptionUgly numbers are numbers whose only prime factors are 2, 3 or 5
2010-04-09 13:51:00
822
原创 POJ Web Navigation
Web NavigationTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 15001 Accepted: 6552DescriptionStandard web browsers contain features to move backward and f
2010-04-05 19:36:00
1146
原创 POJ 时间日期格式转换
时间日期格式转换Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2571 Accepted: 1221Description世界各地有多种格式来表示日期和时间。对于日期的常用格式,在中国常采用格式的是“年年年年/月月/日日”或写为英语缩略表示的”yyyy/mm
2010-04-02 21:39:00
866
原创 POJ 字母旋转游戏
字母旋转游戏Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3271 Accepted: 1163Description给定两个整数M,N,生成一个M*N的矩阵,矩阵中元素取值为A至Z的26个字母中的一个,A在左上角,其余各数按顺时针方向旋转前进,依次递增放置
2010-04-02 20:44:00
992
原创 POJ 滑雪
滑雪Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 35399 Accepted: 12399DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升
2010-03-31 18:27:00
4477
原创 DNA Sorting
DNA SortingTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 42532 Accepted: 16513DescriptionOne measure of ``unsortedness in a sequence is the number of pairs of entries that are out of ord
2010-03-24 21:57:00
1066
原创 POJ Dividing
DividingTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 28488 Accepted: 6968DescriptionMarsha and Bill own a collection of marbles. They want to split the
2010-03-24 16:26:00
813
原创 Number Sequence
Number Sequence Time Limit: 1000MS Memory Limit: 10000K Description A single positive integer i is given. Write a program to find the digit located in the position i in the sequence of number g
2010-03-17 12:51:00
724
转载 Java程序员的推荐阅读书籍
Java程序员的推荐阅读书籍作为Java程序员来说,最痛苦的事情莫过于可以选择的范围太广,可以读的书太多,往往容易无所适从。我想就我自己读过的技术书籍中挑选出来一些,按照学习的先后顺序,推荐给大家,特别是那些想不断提高自己技术水平的Java程序员们。 在这份推荐阅读书籍的名单中,我没有列举流行的软件框架类学习书籍,例如Struts,Hibernate,Spring之类,也没有列举AJA
2009-10-03 09:49:00
571
java程序设计 TCP文件传输程序 JFileChooser实现文件选择 可以设置路径
2009-11-28
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人