03 2014 档案

Walking on the path of Redis --- Data structure
摘要:相比于其他内存数据库,Redis最大的特点就是拥有丰富的数据结构, 经常被称为Date Structure Server。Redis支持的数据结构包含strings, hashes, lists, sets and sorted sets。可以说能包含的基本都包含了,哈哈。 阅读全文

posted @ 2014-03-19 20:12 RobertC 阅读(510) 评论(0) 推荐(0)

Walking on the path of Redis --- Redis configuration
摘要:Redis的安装是非常简单易操作的,但是配置就有点复杂了,要想得到高性能的Redis数据服务,深入了解下如何配置是很重要的。 阅读全文

posted @ 2014-03-19 16:41 RobertC 阅读(288) 评论(0) 推荐(0)

Why string is immutable in Java ?
摘要:This is an old yet still popular question. There are multiple reasons that String is designed to be immutable in Java. A good answer depends on good understanding of memory, synchronization, data structures, etc. In the following, I will summarize some answers. 阅读全文

posted @ 2014-03-19 16:35 RobertC 阅读(368) 评论(0) 推荐(0)

Walking on the path of Redis --- Introduction and Installation
摘要:以前从来没听说过有Redis这么个玩意,无意间看到一位仁兄的博客,才对其有所了解,所以决定对其深入了解下。有不对的地方还请各位指正。 阅读全文

posted @ 2014-03-19 16:01 RobertC 阅读(279) 评论(0) 推荐(0)

哈希表以及解决冲突的方法
摘要:哈希法又称散列法、杂凑法以及关键字地址计算法等,相应的表称为哈希表。这种方法的基本思想是:首先在元素的关键字k和元素的存储位置p之间建立一个对应关系f,使得p=f(k),f称为哈希函数。创建哈希表时,把关键字为k的元素直接存入地址为f(k)的单元;以后当查找关键字为k的元素时,再利用哈希函数计算出该元素的存储位置p=f(k),从而达到按关键字直接存取元素的目的。 阅读全文

posted @ 2014-03-16 22:08 RobertC 阅读(1035) 评论(0) 推荐(0)

Java Collections Source Code Series 2 ---接口
摘要:自己学完Java Collections框架之后,其中的一个较大的收获就是接口对于层次的重要性。Java Collections的最终实现至少有几十个,其中很多都有非常相似的功能(method), 如果各个实现中部分代码都是相同的,就没有做到代码reused。想想吧,开发JDK的那些大牛们,怎么可能会犯这么低级的错误呢,说远了,回到正题上:接口。 阅读全文

posted @ 2014-03-16 21:29 RobertC 阅读(571) 评论(0) 推荐(0)

Java Collections Source Code Series 1 --- 简介
摘要:Java Collections 框架主要包含interfaces, implementations, aggregate operations and algorithms四个部分........... 阅读全文

posted @ 2014-03-16 20:57 RobertC 阅读(347) 评论(0) 推荐(0)

Concurrency Series 1
摘要:Computer users take it for granted that their systems can do more than one thing at a time. They assume that they can continue to work in a word processor, while other applications download files, manage the print queue, and stream audio. Even a single application is often expected to do more than one thing at a time. For example, that streaming audio application must simultaneously read the digital audio off the network, decompress it, manage playback, and update its display. Even the word proc 阅读全文

posted @ 2014-03-15 16:26 RobertC 阅读(189) 评论(0) 推荐(0)

Java并发编程实战---第六章:任务执行
摘要:今天开始学习Java并发编程实战,很多大牛都推荐,所以为了能在并发编程的道路上留下点书本上的知识,所以也就有了这篇博文。今天主要学习的是任务执行章节,主要讲了任务执行定义、Executor、线程池和Executor生命周期等内容 阅读全文

posted @ 2014-03-15 10:05 RobertC 阅读(775) 评论(0) 推荐(0)

在Java如何保证方法是线程安全的
摘要:开门见山,今天看到别人写的一段关于方法是否线程安全的文章,比较简单,但是由于自己也是刚开始入门,所以就迈下了第一步。由于注释还算比较详细,所以就不废话了,直接上code。 阅读全文

posted @ 2014-03-14 20:31 RobertC 阅读(2839) 评论(0) 推荐(0)

多线程中,static函数与非static函数的区别?
摘要:最近在学习多线程,刚入门,好多东西不懂,下面这段代码今天想了半天也没明白,希望看到的兄弟姐妹能解释下。public class NotThreadSafeCounter extends Thread { private static int counter = 0; public void run() { System.out.println("counter:" + getCount()); } public static int getCount() { try { Thread.sl... 阅读全文

posted @ 2014-03-14 20:09 RobertC 阅读(748) 评论(0) 推荐(0)

Git fetch和git pull的区别
摘要:Git中从远程的分支获取最新的版本到本地有这样2个命令:1.git fetch相当于是从远程获取最新版本到本地,不会自动mergegit fetch origin mastergit log -p master..origin/mastergit merge origin/master以上命令的含义:首先从远程的origin的master主分支下载最新的版本到origin/master分支上,然后比较本地的master分支和origin/master分支的差别,最后进行合并。上述过程其实可以用以下更清晰的方式来进行:git fetch origin master:tmpgit diff tmp 阅读全文

posted @ 2014-03-03 13:01 RobertC 阅读(221) 评论(0) 推荐(0)

git add 命令详解
摘要:git add command 阅读全文

posted @ 2014-03-03 12:41 RobertC 阅读(4535) 评论(0) 推荐(0)

第1章——算法在计算机中的作用
摘要:算法(algorithm)简单来说就是定义良好的计算机过程,它取一个或一组值作为输入,并产生出一个或一组值作为输出。即算法就是一系列的计算步骤,用来将输入数据转换成输出数据。 阅读全文

posted @ 2014-03-02 19:58 RobertC 阅读(380) 评论(0) 推荐(0)

导航