自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Hooting的码农笔记本

Enjoy the little things, for one day you may look back and realise they were the big things (Robert)

  • 博客(45)
  • 资源 (4)
  • 收藏
  • 关注

原创 浅谈Git与SVN的使用感受

作为版本控制工作,两者的做大的区别应该在于:Git属于分布式版本控制工具,而SVN属于集中式的版本控制工具。分布式的好处是什么呢?举个例子来说,当你在火车上离线状态下编程工作,在某个阶段会需要先保存正确的代码状态(以便后续出问题时可以回滚),再开始后续的编码,这个时候Git就会发挥它的优势。因为它的分布式特性,可以同时拥有远程仓库和本地仓库,在火车上,即使不联网,也可以将程序的修改commit至本地

2015-08-10 22:54:16 1430

原创 Java Exception和Error的区别

Java中异常的抽象类是Throwable,在此基础上,派生出两大类:Error和Exception。Error是程序中的严重错误,不应该用try…catch包括。Javadoc的说明如下: An Error is a subclass of Throwable that indicates serious problems that a reasonable application shoul

2015-07-19 16:47:56 1007

原创 Fail Fast与Fail Safe的区别

Fail FastFail Fast Iterator在遍历集合时,若该集合发生了结构性的改变,则将抛出 ConcurrentModification 异常。例如: Map<String, String> premiumPhone = new HashMap<String, String>(); premiumPhone.put("Apple", "iPhone");

2015-07-12 13:57:32 2557

原创 Iterator与Enumeration的区别

Iterator是一个接口,包含三个方法:hasNext()next()remove()Enumeration也是一个接口,它是一个遗留类,集合类中只有Vector和HashTable实现了该接口。它包含了两个方法: 1. hasMoreElements() 2. nextElement()由接口定义可知,Iterator在遍历时可以对元素进行删除操作,当遍历过程中,有其他线程对集合类的

2015-07-12 12:35:20 2678 2

原创 HashMap与HashTable的区别

同步与线程安全HashMap是不同步,是非线程安全的;而HashTable是同步,是线程安全的。该区别决定了他们的使用场景。HashMap适合在单线程模式下使用,而HashTable适合在多线程模式下使用。

2015-07-12 10:57:43 589

原创 Spring事务管理学习笔记

1.      主要接口介绍在Spring中,与事务相关的类或接口有以下三个:Ø  TransactionDefinitionTransactionDefinition的作用是定义一个事务的属性,比如传播属性、隔离属性、超时属性等。Ø  TransactionStatusTransactionStatus记录一个运行时的事务。Ø  Platfor

2015-05-01 16:10:48 1189

原创 垃圾回收算法简介——JVM读书笔记<二>

垃圾回收的过程主要包括两部分:找出已死去的对象、移除已死去的对象。确定哪些对象存活有两种方式:引用计数算法、可达性分析算法。方案一:引用计数算法给对象中添加一个引用计数器,每当有一个地方引用它时,计数器值加1;当引用失效时,计数器值减1;计数器的值为0时即表明对象已经死去(可被回收)。优点:实现简单,判定效率高。缺点:难解决对象之间互相引用的问题。如:对象objA和

2015-03-14 22:36:45 888

原创 Java内存区域——JVM读书笔记<一>

Java虚拟机运行时数据区运行时数据区主要包括:方法区、堆、虚拟机栈、本地方法栈、程序计数器。其中方法区和栈是线程共享的区域,另外三块区域是每个线程私有的区域。各个数据区的功能简单说明如下:程序计数器:当前线程所执行的字节码的行号指示器。虚拟机栈:描述Java方法执行的内存模型——每个方法在执行的同时都会创建一个栈帧用于存储局部变量表、操作数栈、动态链接、方法出口等信息。每一个方法

2015-03-13 21:15:33 955

原创 数据结构 二叉堆 & 堆排序

二叉堆,是一个满二叉树,满足堆的性质。即父节点大于等于子节点(max heap)或者是父节点小于等于子节点(min heap)。二叉堆的如上性质常用于优先队列(priority queue)或是用于堆排序。由于max heap 与min heap类似,下文只针对min heap进行讨论和实现。如上图,是根据字母的ASCII码建立的最小堆。我们用数组对满二叉树采用宽度优先遍历存储

2015-03-07 15:14:55 1155

翻译 Java垃圾回收

Java垃圾回收的步骤:标记(Marking)垃圾回收器标记堆中的对象,哪些依然被引用,哪些不再被引用。2. 删除(Deleting)删除不再被引用的对象3. 压缩(Compacting)压缩依然被引用的对象,使空闲的堆空间连接在一起,以便加快后续的空间申请若每一次垃圾回收器在标记过程中,将堆中的对象逐个遍历并对依旧使用的对象进行压缩

2015-03-06 15:30:56 786

原创 Java HashMap的实现

HashMap是Java中经常使用的集合类。

2014-10-09 09:15:34 3005 2

原创 Java Iterable interface[Algorithm]

Q:为什么要用数据结构Iterable?A:Java支持you'ya

2014-09-25 16:59:15 1114

原创 Search a 2D Matrix ——Leetcode系列(十八)

Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted from left to right.The first integer of each

2014-09-24 15:29:29 758

原创 Quick-Union[Algorithm]

Q. Is there a path connecting p and q ?

2014-09-23 23:01:33 2633

原创 正则表达式实例

正则表达式就是记录文本规则的代码。

2014-09-22 10:34:55 688

原创 Sum Root to Leaf Numbers ——Leetcode系列(十七)

Sum Root to Leaf NumbersGiven a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which represents th

2014-09-10 22:31:01 789

原创 Gas Station——Leetcode系列(十六)

Gas Station Total Accepted: 14176 Total Submissions: 57777My SubmissionsThere are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car w

2014-07-08 10:18:01 768

原创 分配糖果问题——Leetcode系列(十五)

Candy There are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requirements:Each child must

2014-07-04 18:58:26 1263

原创 查找数组中只出现一次的数(一)——Leetcode系列(十四)

Single Number Total Accepted: 24874 Total Submissions: 55282My SubmissionsGiven an array of integers, every element appears twice except for one. Find that single one.Note:Your algor

2014-06-30 20:18:47 777

原创 深度复制链表——Leetcode系列(十三)

Copy List with Random Pointer A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy of the

2014-06-30 19:32:46 887

原创 判断字符串是否能分割成字典中的单词(二)——Leetcode系列(十二)

Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.Return all such possible sentences.For example, givens = "

2014-06-29 22:27:10 3345

原创 判断字符串是否能分割成字典中的单词(一)——Leetcode系列(十一)

Word BreakGiven a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For example, givens = "leetco

2014-06-22 19:04:53 3983

原创 查找列表是否含有环(二)——Leetcode系列(十)

Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:Can you solve it without using extra space?Proof:

2014-06-18 13:53:29 753

原创 查找列表是否含有环(一)——Leetcode系列(九)

Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?My Answer:/** * Definition for singly-linked list. * class ListNode { *

2014-06-16 10:42:11 682

原创 列表重新排序——Leetcode系列(八)

Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For example,Given {1,2,3,4}, reorder it to 

2014-06-13 14:58:14 733

原创 使用迭代法对二叉树进行前序遍历——Leetcode系列(七)

Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,2,3].Note: Recursive soluti

2014-06-11 09:53:25 1027

原创 使用迭代法对二叉树进行后序遍历——Leetcode系列(六)

Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [3,2,1].Note: Recursive solut

2014-06-10 21:15:43 832

原创 使用插入排序算法对列表进行排序——Leetcode系列(五)

Sort a linked list using insertion sort.My Answer:

2014-06-09 14:08:54 974

原创 使用快速排序算法对列表进行排序——Leetcode系列(四)

Sort a linked list in O(n log n) time using constant space complexity.My Answer:

2014-06-08 14:29:55 2769

原创 同一直线上最多的点的个数——Leetcode系列(三)

Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.

2014-06-07 15:04:24 802

原创 逆序输出字符串的单词——Leetcode系列(二)

Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Clarification:What constitutes a word?A sequence of non-spac

2014-06-06 14:01:07 973

原创 计算逆波兰式——Leetcode系列(一)

Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another expression.Some examples:

2014-06-06 13:50:07 834

原创 msg邮件转eml邮件

因为msg格式的邮件只能由outlook客户端打开,foxmail客户端无法dakai

2014-04-17 19:58:16 16145 1

原创 ajax发送get、post请求

ajax可以发送post或者get请求,并且keyi

2014-04-15 16:38:25 11588 1

原创 JDK配置

Window7下的JDK环境变量配置:

2014-04-12 22:43:45 9362

原创 字符输出大小不一致的问题

在例如JTextArea这样的kongjian

2014-04-12 20:34:34 9825

原创 树状形式打印二叉树

树状结构打印二叉树,na

2014-04-12 20:04:50 17528 2

原创 Eclipse + Tomcat 配置

开发环境Eclipse For Java EE(Kepler Release)Tomcat(7.0)开发步骤点击Eclipse->Help->Install New Software..添加更新源:http://download.eclipse.org/callisto/releases/选中Web and J2EE Development并安装新建

2014-04-11 17:04:46 9586

原创 php文件管理工具——RESPONSIVE filemanager

RESPONSIVE filemanager 功能:文件上传 文件下载 重命名文件 删除文件 新建文件夹 为每个用户创建子目录 效果图参数设置$base_url 设置文件位置的基本路径

2014-04-09 16:36:37 13091 1

原创 NIS伺服器使用流程

作用:client 自动挂载server下的用户目录 server的用户可以登录client,并有读写权限 NIS 服务器端配置安装ypserv服务 yum install ypserv 设置domain域 查看服务器的NIS 域 nisdomainname新建一个domain域 nisdomainname domaintest如果要永久保存此domai

2014-03-28 09:28:00 9499 1

Aspose.Email.dll

邮件格式转换用到的库

2014-04-17

数据挖掘概念 韩家炜 中文版

韩家炜写的数据挖掘基础书籍,对于初学者很有帮助,中文版的,容易阅读,希望能帮助大家

2011-04-30

程序员面试宝典(找工作必看)

程序员面试必看书籍 能学到一些面试常问的问题 可以找到好的工作

2011-04-30

用java实现的电子词典

用java实现的电子词典,允许翻译句子、联想单词、提示单词等功能

2010-11-23

空空如也

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

TA关注的人

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