自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(34)
  • 收藏
  • 关注

转载 redhat 装载 fcitx

1.基本准备操作系统:redhat 5.2jdk:jdk-6u21-linux-i586-rpm.bin(安装1.6或以上版本,安装步骤请参考其他文)hadoop:hadoop-0.21.0.tar.gz硬件:三台机器,IP配置如下:node1:192.168.14.77node2:192.168.14.155node3:192.168.14

2015-09-29 12:55:14 482

原创 如何采用不加锁的方式实现线程同步

多线程访问共享内存,为了实现同步,常采用加锁的方式。那么,如何采用不加锁的方式实现线程同步呢?思路:1、保存两块共享内存,一块用于读操作,一块用于写操作。2、初始时,两块共享内存内容一致。读操作均是读取第一块共享内存的数据;写操作均是写第二块共享内存。3、在多个读操作一个写操作的情况下,读操作均从第一块共享内存读取,写操作修改第二块共享内存的数据。直至写操作

2015-09-23 14:08:37 2927

转载 kafka-客户端c接口

转自:https://github.com/edenhill/librdkafkakafka 客户端用c,服务器端用java,日志消息传输,get it!

2015-09-21 18:21:29 1298

转载 Kafka分布式消息系统

Kafka[1]是linkedin用于日志处理的分布式消息队列,linkedin的日志数据容量大,但对可靠性要求不高,其日志数据主要包括用户行为(登录、浏览、点击、分享、喜欢)以及系统运行日志(CPU、内存、磁盘、网络、系统及进程状态)。 当前很多的消息队列服务提供可靠交付保证,并默认是即时消费(不适合离线)。高可靠交付对linkedin的日志不是必须的,故可通过降低可靠性来提高性能,同时

2015-09-20 20:59:23 336

转载 HDFS浅析

HDFS是Hadoop Distribute File System 的简称,也就是Hadoop的一个分布式文件系统。一、HDFS的主要设计理念1、存储超大文件    这里的“超大文件”是指几百MB、GB甚至TB级别的文件。2、最高效的访问模式是 一次写入、多次读取(流式数据访问)    HDFS存储的数据集作为hadoop的分析对象。在数据集生成后,长时间

2015-09-18 10:54:00 401

转载 OPENSOC

OpenSOC初探Cisco在最近的BroCon大会上公布了旗下的OpenSOC项目即将开源的消息,在其GIT站点上也开始放出了部分代码,应该说OpenSOC对于当今大数据分析的“落地”有着重要的意义。一直以来各界都鼓吹大数据的神奇力量,但是却一直无法真正落实到实际中发挥作用,OpenSOC则为我们展现了一次大数据的成功应用。 OpenSOC是Cisco的安全大数据分析架构,其建立

2015-09-16 20:06:22 934

转载 大数据架构:flume-ng+Kafka+Storm+HDFS 实时系统组合

大数据架构:flume-ng+Kafka+Storm+HDFS 实时系统组合分类: big data综合知识2014-05-09 20:56 2474人阅读 评论(1) 收藏 举报大数据架构个人观点:大数据我们都知道hadoop,但并不都是hadoop.我们该如何构建大数据库项目。对于离线处理,hadoop还是比较适合的,但是对于实时性比较强的,数据量比较大的,我们

2015-09-16 20:03:52 897

转载 Restful与soap

Web 服务编程,REST 与 SOAP为什么选择 RESTREST 架构风格是一种全新的针对 Web 应用的开发风格,与 RPC 风格的 Web 服务(关于 RPC 风格的 Web 服务描述,请参见 Wikipeida )一样,是企业信息化的一个重要架构实践领域。本文从一个简单的应用场景出发,使用 REST 和 SOAP 两种不同的架构风格实现,通过对 RES

2015-09-15 23:26:15 737

转载 RestFul理解

REST(Representational State Transfer ),有中文翻译为"具象状态传输"(也有:"代表性状态传输")。是由 Roy Thomas Fielding博士 在2000年就读加州大学欧文分校期间在学术论文中提出的一个术语。他首次系统全面地阐述了REST的架构风格和设计思想。这篇论文是Web发展史上一篇非常重要的技术文献,他也为WEB架构的设计与评判奠定了理论基础。

2015-09-15 23:09:51 300

原创 leetcode - Reverse Words in a String

题意:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C programmers: Try to solve it in

2015-07-07 15:59:20 436

原创 leetcode Basic Calculator II

Implement a basic calculator to evaluate a simple expression string.The expression string contains only non-negative integers, +, -, *, / operators and empty spaces . The integer division shou

2015-06-27 16:11:12 364

原创 leetcode Basic Calculator

Implement a basic calculator to evaluate a simple expression string.The expression string may contain open ( and closing parentheses ), the plus + or minus sign -, non-negative integers and em

2015-06-27 11:42:41 356

原创 leetcode-Partition List

Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the original relative order of the nodes in each of

2015-06-24 00:13:33 306

原创 leetcode-Remove Duplicates from Sorted List II

Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2->3->3->4->4->5, return 1->2->5.Given 1->

2015-06-23 23:09:24 455

原创 leetcode-Simplify Path

Given an absolute path for a file (Unix-style), simplify it.For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c"思路:取得每个 文件夹名称,针对“..” 和 "."的情况通过栈进行存储更新;最后目录输出还要有一个栈用于文件夹

2015-06-19 09:23:36 318

原创 Permutations II

Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2] have the following unique permutations:[1,1,2], [1,2,1], and [2,1,1

2015-06-16 23:19:10 373

原创 Reverse Nodes in k-Group

Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is

2015-06-15 22:08:37 445

原创 Swap Nodes in Pairs

Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only constant space. Y

2015-06-15 18:04:10 423

原创 Letter Combinations of a Phone Number

iven a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.Input:Digit str

2015-06-14 22:11:30 354

原创 Roman to Integer

Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.按千位,百位,十位,个位依次按类型枚举;class Solution {public: int romanToInt(string s) {

2015-06-14 20:26:43 290

原创 Integer to Roman

Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.将千、百、十、个位数的值依次打表,将最终的字符串进行组合即可;class Solution {public: string get_bai(int

2015-06-14 18:30:33 391

原创 Container With Most Water

Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two

2015-06-14 17:51:41 314

原创 Regular Expression Matching

'.' Matches any single character.'*' Matches zero or more of the preceding element.The matching should cover the entire input string (not partial).The function prototype should be:bool isMatch(c

2015-06-13 23:01:23 349

原创 leetcode-jump Game2

Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Your goal i

2015-05-21 15:57:41 370

原创 leetcode-jump game

Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determine i

2015-05-21 10:58:18 325

原创 leetcode-Spiral Matrix II

Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example,Given n = 3,You should return the following matrix:[ [ 1, 2, 3 ], [ 8, 9, 4 ],

2015-05-18 20:07:05 483

原创 leetcode-Spiral Matrix

Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ]]

2015-05-18 19:41:52 292

原创 leetcode-Subsets II

Subsets II Given a collection of integers that might contain duplicates, nums, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not contain d

2015-05-18 19:06:36 405

原创 leetcode-Subsets

Given a set of distinct integers, nums, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.For

2015-05-18 18:51:43 378

原创 leetcode - Trapping Rain Water

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.For example, Given [0,1,0,2,1,0,1,3,2,1,2,1]

2015-05-18 18:06:41 340

原创 leetcode-triangle

Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[ [2], [3,4],

2015-05-18 16:51:23 322

转载 Linux多线程与同步

作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明。谢谢! 典型的UNIX系统都支持一个进程创建多个线程(thread)。在Linux进程基础中提到,Linux以进程为单位组织操作,Linux中的线程也都基于进程。尽管实现方式有异于其它的UNIX系统,但Linux的多线程在逻辑和使用上与真正的多线程并没有差别。 

2015-04-24 11:04:35 405

原创 leetcode-Valid Parentheses

Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" are all va

2015-04-21 19:04:11 328

原创 leetcode之旅-easy(House Robber)

最近,一直在科研与刷题之间周旋。正在研究第三篇论文,实验室同年级都已经出现RANK A的档次了,压力山大!对于不读博的我来说,还是抓紧刷题比较实在。leetcode还没有做多少,但是我希望这个能够成为激励我不断加速的动力。对于算法已经放下很久的同学,我想说:不要灰心,从easy开始刷起,不断增加信心。(PS:我一直认为心理战术远比技术重要的多,做一个内心强大的程序媛)进入正

2015-04-15 16:17:25 322

空空如也

空空如也

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

TA关注的人

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