自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(31)
  • 资源 (9)
  • 收藏
  • 关注

转载 Redis与Memcached的比较

本文转自NoSQL数据库:Redis适用场景及产品定位1.网络IO模型  Memcached是多线程,非阻塞IO复用的网络模型,分为监听主线程和worker子线程,监听线程监听网络连接,接受请求后,将连接描述字pipe 传递给worker线程,进行读写IO, 网络层使用libevent封装的事件库,多线程模型可以发挥多核作用,但是引入了cache coherency和锁的问题,比如,Memcache

2016-10-22 23:33:19 573

转载 Cassandra中的各种策略

转自董的博客:Cassandra中的各种策略1. 背景介绍Cassandra 使用分布式哈希表(DHT)来确定存储某一个数据对象的节点。在 DHT 里面,负责存储的节点以及数据对象都被分配一个 token。token只能在一定的范围内取值,比如说如果用 MD5 作为 token 的话,那么取值范围就是 [0, 2^128-1]。存储节点以及对象根据 token 的大小排列成一个环,即最大的 to

2016-10-22 22:12:17 1153

原创 Cassandra一些运维操作

1.查看集群是否使用了vnodes用途:使用了virtual nodes,删除了节点之后它会自动均衡数据,不要你手动处理。 主要看你的cassandra.yml配置文件中,是否配置了initial_token,如果没有配置,就是使用了vnodes。cassandra/conf$ less cassandra.yaml# initial_token allows you to specify to

2016-10-22 16:33:06 3812

原创 Cassandra介绍和一些常用操作

NoSQL数据库是为高扩展性系统设计的,采用了key/value模型,但它的缺点,正如NoSQL这个名字表明地那样,不支持SQL操作。这听起来像是一个很严重的缺陷。本文介绍了一些在SQL中常见的操作怎样在cassandra中自然而又有效的实现。0.示例column family表1:CREATE TABLE example ( id int, name ascii, age

2016-10-22 00:20:56 12413

原创 leveldb源码分析

我正在读leveldb的源码,如果你有问题,可以一起交流。 这篇文章是读完代码之后需要写的,先立一个flag。 2016.10.15 at Bunny Drop

2016-10-15 19:10:04 728

翻译 LevelDB使用指南

这篇文章是levelDB官方文档的译文,原文地址:LevelDB library documentation这篇文章主要讲leveldb接口使用和注意事项。 leveldb是一个持久型的key-value数据库。key,value可以是任意的字节数组,key之间是有序的。key的比较函数可以由用户指定。1. 打开数据库leveldb使用文件系统目录名作为name,并把数据库所有内容都存储在这个目录

2016-10-15 18:20:18 11027 1

翻译 levelDB实现细节

这篇文章是levelDB官方文档的译文,原文地址:Implementation notesFilesleveldb的实现和一个单点的Bigtable tablet (section 5.3)很相近。然而,文件的组织形式又有些不太一样,下文会解释这一点。 每一个数据库都是存储在一个目录的一系列文件的集合。有以下几种不同类型的文件:Log filesA log file (*.log) stores

2016-10-15 15:18:39 1755

翻译 leveldb日志文件格式

这篇文章是levelDB官方文档的译文,原文链接:Format of a log file日志文件是一系列32KB大小的记录块,唯一例外就是文件的末尾可能包含一个部分记录块。 block := record* trailer? // 译者注:多个record块,可能包含一块几个字节的空白。 record := checksum: uint32 // crc32

2016-10-15 14:44:06 1698

翻译 levelDB immutable Table的文件格式

这篇文章是levelDB官方文档的译文,原文地址文件格式概览: <beginning_of_file> [data block 1] [data block 2] ... [data block N] [meta block 1] ... [meta block K] [metaindex block] [index block] [Footer]

2016-10-15 13:59:43 1053

原创 leetcode 328. Odd Even Linked List

Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes.You should try to do it in

2016-10-11 09:45:38 498

原创 leetcode 189. Rotate Array

Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].Note:Try to come up as many solutions as yo

2016-10-11 09:06:32 519

原创 leetcode 234. Palindrome Linked List

Given a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space?这个问题可以用O(n)的空间来做,但是如果用O(1)的空间的话,只能考虑其他的方法了。链表经常用到的方法就是快慢指针,如果用快慢指针的话,把链表分为

2016-10-07 23:50:28 393

原创 leetcode 238. Product of Array Except Self

Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements ofnums except nums[i].Solve it without division and in O(

2016-10-07 22:27:16 362

原创 leetcode 152. Maximum Product Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4],the contiguous subarray [2,3] has the largest

2016-10-07 22:06:36 393

原创 leetcode 198. House Robber

You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent house

2016-10-06 18:29:34 405

原创 leetcode 220. Contains Duplicate III

Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] andnums[j] is at most t and the difference between i and

2016-10-06 17:26:54 476

原创 leetcode 219. Contains Duplicate II

Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j]and the difference between i and j is at most k.

2016-10-06 15:31:57 335

原创 leetcode 217. Contains Duplicate

Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element

2016-10-06 15:01:55 275

原创 leetcode 206. Reverse Linked List

Reverse a singly linked list.click to show more hints.Hint:A linked list can be reversed either iteratively or recursively. Could you implement both?递归:/** * Definition for singly-lin

2016-10-06 14:40:57 263

原创 leetcode 326. Power of Three

Given an integer, write a function to determine if it is a power of three.Follow up:Could you do it without using any loop / recursion?class Solution {public: bool isPowerOfThree(int n)

2016-10-04 20:21:40 332

原创 leetcode 242. Valid Anagram

Given two strings s and t, write a function to determine if t is an anagram of s.For example,s = "anagram", t = "nagaram", return true.s = "rat", t = "car", return false.Note:You may ass

2016-10-04 19:59:58 288

原创 leetcode 237. Delete Node in a Linked List

Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with value

2016-10-04 19:48:41 311

原创 leetcode 283. Move Zeroes

Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0, 1, 0, 3, 12], after calling you

2016-10-04 19:31:28 331

原创 Leetcode 226. Invert Binary Tree

Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspired by this original tweet by Max Howe

2016-10-04 19:06:58 292

原创 Leetcode-292. Nim Game

You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone will be the

2016-10-04 18:57:15 358

原创 Largest Submatrix of All 1’s--POJ3494

原题链接:http://poj.org/problem?id=3494DescriptionGiven a m-by-n (0,1)-matrix, of all its submatrices of all 1’s which is the largest? By largest we mean that the submatrix has the most elements.

2016-10-04 17:29:30 509

原创 Largest Rectangle in a Histogram-POJ2559

原题链接http://poj.org/problem?id=2559DescriptionA histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have differen

2016-10-04 15:44:20 460

原创 LevelDB使用入门

1,下载levelDB源码git clone https://github.com/google/leveldb.git2,编译LevelDBcd leveldb & make all编译完成之后在当前目录多了两个目录:out-shared和out-static在out-static目录下有我们需要的libleveldb.a3,在当前目录新建文件夹test

2016-10-03 12:17:59 13034 2

转载 Leveldb 实现原理

转自:http://www.cnblogs.com/haippy/archive/2011/12/04/2276064.htmlLevelDb日知录之一:LevelDb 101  说起LevelDb也许您不清楚,但是如果作为IT工程师,不知道下面两位大神级别的工程师,那您的领导估计会Hold不住了:Jeff Dean和Sanjay Ghemawat。这两位是

2016-10-03 00:18:20 1644

转载 LevelDB原理探究与代码分析

1. 概述Level DB(http://code.google.com/p/leveldb/)是google开源的Key/Value存储系统,它的committer阵容相当强大,基本上是bigtable的原班人马,包括像jeff dean这样的大牛,它的代码合设计非常具有借鉴意义,是一种典型的LSM Tree的KV引擎的实现,从它的数据结构来看,基本就是sstable的开源实现,而且针对

2016-10-03 00:13:43 781

转载 谈谈Memcached与Redis

1. Memcached简介Memcached是以LiveJurnal旗下Danga Interactive公司的Bard Fitzpatric为首开发的高性能分布式内存缓存服务器。其本质上就是一个内存key-value数据库,但是不支持数据的持久化,服务器关闭之后数据全部丢失。Memcached使用C语言开发,在大多数像Linux、BSD和Solaris等POSIX系统上,只要安装了libe

2016-10-02 15:36:22 407

数据挖掘引论-6.clustering.pdf

中国科学院 数据挖掘引论 刘莹 课件

2011-09-19

数据挖掘引论-5.classification.pdf

中国科学院 数据挖掘引论 刘莹 课件

2011-09-19

数据挖掘引论-4.ARM.pdf

中国科学院 数据挖掘引论 刘莹 课件

2011-09-19

数据挖掘引论-3.Preprocessing_upload.pdf

中国科学院 数据挖掘引论 刘莹 课件

2011-09-19

数据挖掘引论-2.Data_Warehouse.pdf

中国科学院 数据挖掘引论 课件 刘莹

2011-09-19

数据挖掘引论-1.Intro.pdf

中国科学院 数据挖掘引论 课件 刘莹

2011-09-19

Android获取运营商代码

Android获取运营商代码 IMSI MCC MNC MIN

2011-08-16

自动售货机的设计与实现

数字逻辑课程设计 自动售货机 VHDL

2009-08-31

数据结构 树和二叉树 ppt

我们老师的课件 ,是学数据结构的好东西,老师可是花了很多的心血啊, 树和二叉树。

2009-05-03

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除