自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(173)
  • 资源 (1)
  • 收藏
  • 关注

原创 RocketMQ NameServer原理及源码分析

概述在日常的开发中,经常使用到各种消息中间件,用于系统间的数据交换与异步解耦。常用的消息中间件有Kafka、RabbitMQ、RocketMQ。不同的消息中间件在原理及使用上都有着自身的特点,比如Kafka和RocketMQ在协调点选择上就存在着很大的差异,Kafka是通过Zookeeper来进行协调,而RocketMQ通过自身的NameServer进行协调。本文主要介绍RocketMQ的Nam...

2019-09-04 21:00:59 2807 1

原创 Java 8函数式编程(三)-Stream

文章目录Stream的优势Stream的原理和特性怎么得到StreamStream接口的静态工厂方法Collection接口的默认方法stream方法使用forEach()filter()map()flatMap()reduce()collect()Stream PipelinesStream流水线解决方案操作如何记录?操作如何叠加?叠加之后的操作如何执行?执行后的结果在哪里?参考文章Strea...

2018-12-08 17:00:13 632

原创 Java 8函数式编程(二)-Collector

收集器(Collector)是为Stream.collect()方法量身打造的工具接口(类)。考虑一下将一个Stream转换成一个容器(或者Map)需要做哪些工作?我们至少需要两样东西:目标容器是什么?是ArrayList还是HashSet,或者是个TreeMap。新元素如何添加到容器中?是List.add()还是Map.put()。如果并行的进行规约,还需要告诉collect()多个部分...

2018-12-08 11:43:15 907

原创 Java 8函数式编程(一)-Lambda

文章目录函数式编程与面向对象编程的比较函数式编程优点缺点Lambda表达式接口的默认方法接口的静态方法继承默认方法方法引用Collections(集合类)Collection中的新方法removeIf()spliterator()Map中的新方法forEach()getOrDefault()putIfAbsent()remove()replace()replaceAll()merge()compu...

2018-12-08 11:23:20 423

原创 Java中线程的相关知识点汇总

Java创建线程之后,直接调用start()方法和run()的区别。 start()方法被用来启动新创建的线程,而且start()内部调用了run()方法,这和直接调用run()方法的效果不一样。当你调用run()方法的时候,只会是在原来的线程中调用,没有新的线程启动,start()方法才会启动新线程。Java中Runnable和Callable有什么不同? Runnable和Callable

2016-08-08 23:10:33 1826

原创 数据库知识总结

表(Table)和视图(View)的区别和联系? 在SQL中,视图是基于SQL语句的结果集的可视化的表。视图包含行和列,就像一个真实的表。视图中的字段就是来自一个或多个数据库中的真实的表中的字段。我们可以向视图添加SQL函数、WHERE以及JOIN语句,我们也可以提交数据,就像这些来自于某个单一的表。 区别: 1. 视图是已经编译好的SQL语句,而表不是; 2. 视...

2016-08-05 15:59:47 947

原创 tomcat配置SSL步骤

tomcat配置SSL步骤

2016-07-16 12:19:05 2475

原创 Java中的浅拷贝与深拷贝

浅拷贝(shallow copy): 使用一个已知实例对新创建实例的成员变量逐个赋值,即拷贝对象时仅仅拷贝对象本身(包括对象中的基本变量),而不拷贝对象包含的引用指向的对象。 深拷贝(deep copy): 当一个类的拷贝构造方法,不仅要复制对象的所有非引用成员变量值(基本数据类型),还要为引用类型的成员变量创建新的实例,并且初始化为形式参数实例值。

2016-07-09 15:45:19 429

原创 SpringMVC RESTful Json Example

SpringMVC+Json构建Restful风格Demo

2015-06-12 15:08:26 1388

转载 HashMap和HashSet的区别

HashMap和HashSet的区别是Java面试中最常被问到的问题。如果没有涉及到Collection框架以及多线程的面试,可以说是不完整。而Collection框架的问题不涉及到HashSet和HashMap,也可以说是不完整。HashMap和HashSet都是collection框架的一部分,它们让我们能够使用对象的集合。collection框架有自己的接口和实现,主要分为Set接口,Lis

2015-05-01 22:02:38 445

转载 HashMap和Hashtable的区别

HashMap和Hashtable的比较是Java面试中的常见问题,用来考验程序员是否能够正确使用集合类以及是否可以随机应变使用多种思路解决问题。HashMap的工作原理、ArrayList与Vector的比较以及这个问题是有关Java 集合框架的最经典的问题。Hashtable是个过时的集合类,存在于Java API中很久了。在Java 4中被重写了,实现了Map接口,所以自此以后也成了Java

2015-05-01 21:57:09 481

转载 Java线程面试题 Top 50

原文链接: javarevisited 翻译: ImportNew.com - 李 广译文链接: http://www.importnew.com/12773.html[ 转载请保留原文出处、译者和译文链接。]不管你是新程序员还是老手,你一定在面试中遇到过有关线程的问题。Java语言一个重要的特点就是内置了对并发的支持,让Java大受企业和程序员的欢迎。大多数待遇丰

2015-05-01 20:03:09 628

原创 [LeetCode 205] Isomorphic Strings

题目链接:isomorphic-stringsGiven two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a cha

2015-04-29 15:04:08 1425

原创 [LeetCode 201] Bitwise AND of Numbers Range

题目链接:bitwise-and-of-numbers-rangeGiven a range [m, n] where 0 For example, given the range [5, 7], you should return 4.// 8266 / 8266 test cases passed.// Status: Accepted// Runtim

2015-04-28 20:16:07 1507

原创 [LeetCode 204] Count Primes

题目链接:count-primesDescription:Count the number of prime numbers less than a non-negative number, npublic class Solution { public int countPrimes(int n) { if(n <= 2) return 0; Lis

2015-04-28 20:00:38 1423

原创 [LeetCode 203] Remove Linked List Elements

题目链接:remove-linked-list-elementsRemove all elements from a linked list of integers that have value val.ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 2 -->

2015-04-26 10:23:48 2465

原创 [LeetCode 202] Happy Number

题目链接:happy-numberWrite an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the numbe

2015-04-26 10:20:43 3985 4

原创 LeetCode 在矩阵中寻找路径类的动态规划问题

在矩阵中寻找路径类的动态规划问题

2015-04-18 21:43:00 1614

原创 [LeetCode 199] Binary Tree Right Side View

题目链接:binary-tree-right-side-viewimport java.util.ArrayList;import java.util.List;/** * Given a binary tree, imagine yourself standing on the right side of it, return the values of the n

2015-04-15 17:23:26 2805

原创 [LeetCode 200] Number of Islands

题目链接:number-of-islands/** * Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent land

2015-04-15 17:20:55 1738

原创 [LeetCode 198] House Robber

题目链接: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

2015-04-15 00:34:56 821

原创 [LeetCode 124] Binary Tree Maximum Path Sum

题目链接:binary-tree-maximum-path-sum/** * * Given a binary tree, find the maximum path sum. * * The path may start and end at any node in the tree. * * For example: Given the below binary

2015-04-14 23:30:31 637

原创 [LeetCode 85] Maximal Rectangle (华为2015机试)

题目链接:maximal-rectangleimport java.util.Arrays;/** * Given a 2D binary matrix filled with 0's and 1's, * find the largest rectangle containing all ones and return its area. * */public cl

2015-04-12 11:37:19 892

原创 华为2014机试题-等式变换

题目描述:第三题:等式变换输入一个正整数X,在下面的等式左边的数字之间添加+号或者-号,使得等式成立。1 2 3 4 5 6 7 8 9 = X比如:12-34+5-67+89 = 51+23+4-5+6-7-8-9 = 5请编写程序,统计满足输入整数的所有整数个数。输入:       正整数,等式右边的数字输出:       使该等式成立的个数样例输入

2015-04-12 11:00:41 1539

原创 [LeetCode 179] Largest Number

题目链接:largest-numberimport java.util.ArrayList;import java.util.Comparator;import java.util.List;/** * Given a list of non negative integers, arrange them such that they form the largest n

2015-04-04 11:11:44 871

原创 [LeetCode 93] Restore IP Addresses

题目链接:restore-ip-addressesimport java.util.ArrayList;import java.util.List;/** * Given a string containing only digits, restore it by returning all possible valid IP address combination

2015-04-03 22:23:28 962

原创 [LeetCode 91] Decode Ways

题目链接:decode-ways相似题型:70.Climbing Stairsimport java.util.Arrays;/** * A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B

2015-04-03 19:22:46 765

原创 [LeetCode 65] Valid Number (通过率最低的一题)

题目链接:valid-number/** * Validate if a given string is numeric. Some examples: "0" => true " 0.1 " => true "abc" => false "1 a" => false "2e10" => true Note: It is intended for the pro

2015-04-03 13:26:44 937

原创 [LeetCode 79] Word Search

题目链接:word-search/** * Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells

2015-04-03 00:57:53 836

原创 [LeetCode 135] Candy

题目链接:candyimport java.util.Arrays;/** * 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 follo

2015-04-02 22:46:50 456

原创 [LeetCode 151] Reverse Words in a String

题目链接:reverse-words-in-a-stringimport java.util.Stack;/** * * Given an input string, reverse the string word by word. * * For example, Given s = "the sky is blue", return "blue is sky the

2015-04-01 08:19:30 628

原创 [LeetCode 142] Linked List Cycle II

题目链接:linked-list-cycle-ii/** * 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?

2015-03-31 15:31:04 562

原创 [LeetCode 89] Gray Code (格雷码问题)

题目链接:gray-codeimport java.util.ArrayList;import java.util.List;/** * The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative

2015-03-31 11:17:25 678

原创 [LeetCode 36&37] Valid Sudoku & Sudoku Solver (数独问题)

题目链接:valid-sudokuimport java.util.Arrays;/** * Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells

2015-03-31 11:09:09 760

原创 [LeetCode 51&52] N-Queens I & II (N皇后问题)

题目链接:n-queensimport java.util.ArrayList;import java.util.Arrays;import java.util.List;/** * The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no t

2015-03-30 23:31:19 987

原创 [LeetCode 134] Gas Station

题目链接:gas-station/** * There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it costs cost[i] of

2015-03-29 23:33:26 1170

原创 [LeetCode 46 & 47] Permutations I & II

题目链接:permutations相似题型:1.  [LeetCode 39&40] Combination Sum I & II2. [LeetCode 78] Subsets3.  [LeetCode 90] Subsets II4. [LeetCode 22] Generate Parentheses5.  [LeetCod

2015-03-29 18:15:41 917

原创 [LeetCode 77] Combinations

题目链接:combinations相似题型:1.  [LeetCode 39&40] Combination Sum I & II2. [LeetCode 78] Subsets3.  [LeetCode 90] Subsets II4. [LeetCode 22] Generate Parenthesesimport java.util.A

2015-03-29 14:11:58 1217

原创 [LeetCode 45] Jump Game II

题目链接:jump-game-ii相似题型: [LeetCode 55] Jump Game/** * Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the arra

2015-03-29 13:32:53 877

原创 [LeetCode 55] Jump Game

题目链接: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

2015-03-29 13:02:42 1257

Linux内核设计与实现.pdf

《Linux内核设计与实现(原书第3版)》主要内容包括:进程管理、进程调度、时间管理和定时器、系统调用接口、内存寻址、内存管理和页缓存、VFS、内核同步以及调试技术等。同时《Linux内核设计与实现(原书第3版)》也涵盖了Linux 2.6内核中颇具特色的内容,包括CFS调度程序、抢占式内核、块I/O层以及I/O调度程序等。《Linux内核设计与实现(原书第3版)》采用理论与实践相结合的路线,能够带领读者快速走进Linux内核世界,真正开发内核代码。《Linux内核设计与实现(原书第3版)》适合作为高等院校操作系统课程的教材或参考书,也可供相关技术人员参考。

2016-09-02

空空如也

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

TA关注的人

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