自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(206)
  • 资源 (11)
  • 收藏
  • 关注

原创 JDK1.8的一些特性

前言  对于jdk1.8的特性之前没有很好地的了解过,现在花一些时间整理一下。只摘取频率使用较高的方法进行介绍。一、分组 将id一样的苹果放在一起Map<Integer, List<Apple>> collect = apples.stream().collect(Collectors.groupingBy(Apple::getId)); System.out.println("分组-res:" + collect);二、Lis转成mapCollectors.toMa

2020-09-07 22:21:15 269

原创 Rabbitmq系列之整合Haproxy实现负载均衡

概述  HAProxy 提供高可用性、负载均衡及基于 TCP 和 HTTP 应用的代理,支持虚拟主机 ,它是免费、快速并且可靠的一种解决方案,包括 Twitter、Reddit、StackOverflow、GitHub 在内的多家知名互联网公司在使用。 HAProxy 实现了一种事件驱动 、单一进程模型 ,此模型支持非常大的井发连接数。摘自《RabbitMQ实战指南》安装使用阿里云的镜像wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliy

2020-08-16 17:14:46 337

原创 Rabbitmq系列之镜像模式部署

相关概念  RabbitMQ集群里有内存节点与磁盘节点。内存节点(ram),就是将元数据(metadata)都放在内存里,磁盘节点(disc),数据放在磁盘上,如果RabbitMQ是单节点运行,默认就是磁盘节点。  在RabbitMQ集群里,至少有一个磁盘节点,它用来持久保存元数据。新的节点加入集群后,会从磁盘节点上拷贝数据。但是,集群里也不必要每个节点都是磁盘节点,这主要是性能问题。例如,压力大的RPC服务,每秒都要创建和销毁数百个队列,如果集群里都是磁盘节点,意味着队列定义在每个节点上,都要

2020-08-05 00:27:53 721

原创 Rabbitmq系列之普通集群部署

文章目录一、为什么要使用集群?二、什么是Rabbitmq集群?2.1、单一模式2.2、普通模式:2.3、镜像模式三、怎么使用Rabbitmq集群?3.1、首先iu'l'na一、为什么要使用集群?  集群是为了解决单机可能出现宕机等引发的不可用的问题,可以有效提高程序的可用性和可靠性以及抗并发的能力。二、什么是Rabbitmq集群?2.1、单一模式  即单机情况不做集群,就单独运行一个rabbitmq而已。2.2、普通模式:  默认模式,以两个节点(rabbit01、rabbit02)为例来进行

2020-08-02 17:38:29 617

原创 Rabbitmq三个节点不能同时启动的问题,即有一个节点启动失败

文章目录一、为什么要使用集群?二、什么是Rabbitmq集群?2.1、单一模式2.2、普通模式:2.3、镜像模式三、怎么使用Rabbitmq集群?3.1、集群的形成的条件一、为什么要使用集群?  集群是为了解决单机可能出现宕机等引发的不可用的问题,可以有效提高程序的可用性和可靠性以及抗并发的能力。二、什么是Rabbitmq集群?2.1、单一模式  即单机情况不做集群,就单独运行一个rabbitmq而已。2.2、普通模式:  默认模式,以两个节点(rabbit01、rabbit02)为例来进行说

2020-07-28 23:04:00 1086

原创 Rabbitmq单机版搭建

一、题外话  安装之前先大致浏览一下Rabbitmq官网,如果有一天本文也老去,请以官网为准。在安装时需要注意Erlang环境和Rabbitmq版本是否兼容。二、安装配置erlang环境  1.1 安装rabbitmq需要考虑与之兼容的erlang版本,详情点击这里。  1.2 安装Erlang版本,有两种选择 PackageCloud仓库和 Bintray仓库,这里我选择Bintray仓库的配置。而且我的版本是 CentOS 7,如果是其他版本可以点击这里找适合的版本。vim /e

2020-07-26 11:18:15 868

原创 50-Remove Covered Intervals

题目地址:Remove Covered Intervals。Given a list of intervals, remove all intervals that are covered by another interval in the list. Interval [a,b) is covered by interval [c,d) if and only if c <= a a...

2020-03-11 11:35:40 194

原创 49-Generate Random Point in a Circle

题目地址:Generate Random Point in a CircleGiven the radius and x-y positions of the center of a circle, write a function randPoint which generates a uniform random point in the circle.Note:input and o...

2020-03-05 16:12:08 163

原创 48-Longest Increasing Path in a Matrix

题目地址:Longest Increasing Path in a MatrixGiven an integer matrix, find the length of the longest increasing path.From each cell, you can either move to four directions: left, right, up or down. You ...

2020-03-05 10:10:39 156

原创 47-Course Schedule II

题目地址:Course Schedule IIThere are a total of n courses you have to take, labeled from 0 to n-1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, whic...

2020-03-03 17:21:34 120

原创 46-Course Schedule

题目地址:Course ScheduleThere are a total of n courses you have to take, labeled from 0 to n-1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which i...

2020-03-02 18:26:54 101

原创 45-Binary Search Tree to Greater Sum Tree

题目地址:Binary Search Tree to Greater Sum TreeGiven the root of a binary search tree with distinct values, modify it so that every node has a new value equal to the sum of the values of the original tr...

2020-02-27 15:57:37 96

原创 44-Implement Rand10() Using Rand7()

题目地址:Implement Rand10() Using Rand7()Given a function rand7 which generates a uniform random integer in the range 1 to 7, write a function rand10 which generates a uniform random integer in the rang...

2020-02-25 18:18:20 62

原创 43-Linked List Random Node

题目地址:Linked List Random NodeGiven a singly linked list, return a random node’s value from the linked list. Each node must have the same probability of being chosen.Follow up:What if the linked lis...

2020-02-25 13:47:28 159

原创 42- Subsets

题目地址:SubsetsGiven a set of distinct integers, nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.Example:Input: nums = [1,2,3]Output:[[...

2020-01-04 15:59:36 88

原创 41- Combinations

题目地址:CombinationsGiven two integers n and k, return all possible combinations of k numbers out of 1 … n.Example:Input: n = 4, k = 2Output:[[2,4],[3,4],[2,3],[1,2],[1,3],[1,4],]class Sol...

2019-12-30 16:10:16 85

原创 40-Permutation Sequence

题目地址:Permutation SequenceThe set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order, we get the following sequence for n = 3:“123”“132...

2019-12-22 10:57:38 85

原创 三天一题-39-Sort Colors

题目地址:Sort ColorsGiven an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, w...

2019-12-14 17:26:49 87

原创 三天一题-38-Merge Intervals

题目地址:Jump GameGiven 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.D...

2019-12-04 10:40:50 90

原创 三天一题-37-Jump Game

题目地址:Jump GameGiven 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.D...

2019-11-27 21:49:48 78

原创 三天一题-36-Spiral Matrix

题目地址:Spiral MatrixGiven a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.Example 1:Input:[[ 1, 2, 3 ],[ 4, 5, 6 ],[ 7, 8, 9 ]]Output: [1,2,3,...

2019-11-24 16:13:21 98

原创 三天一题-35-字母异位词分组

题目地址: 字母异位词分组给定一个字符串数组,将字母异位词组合在一起。字母异位词指字母相同,但排列不同的字符串。示例:输入: [“eat”, “tea”, “tan”, “ate”, “nat”, “bat”],输出:[[“ate”,“eat”,“tea”],[“nat”,“tan”],[“bat”]]说明:所有输入均为小写字母。不考虑答案输出的顺序。来源:力扣(Lee...

2019-11-19 14:22:02 109

原创 三天一题-34- Rotate Image

题目地址: Rotate Image描述:You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Note:You have to rotate the image in-place, which means you have to modify...

2019-11-13 10:07:39 102

原创 三天一题-33-Combination SumII(回溯思想)

题目地址: Combination Sum II描述:Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target....

2019-11-02 17:22:24 100

原创 三天一题-32-Combination Sum(回溯思想)

题目地址: Combination Sum描述:Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums ...

2019-10-28 10:02:40 109

原创 三天一题-31-Valid Sudoku

题目地址: Valid Sudoku描述:Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:Each row must contain the digits 1-9 without repetition.E...

2019-10-21 10:24:30 91

原创 三天一题-30-Find First and Last Position of Element in Sorted Array

题目地址:Find First and Last Position of Element in Sorted Array描述:Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value.Your algorith...

2019-10-17 14:02:06 92

原创 三天一题-29-Search in Rotated Sorted Array

题目地址:Search in Rotated Sorted Array描述:Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]).You are gi...

2019-10-14 15:19:17 102

原创 三天一题-28-Next Permutation

题目地址:Next Permutation描述:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange i...

2019-10-10 15:06:12 80

原创 三天一题-27-两数相除

题目地址:两数相除描述:给定两个整数,被除数 dividend 和除数 divisor。将两数相除,要求不使用乘法、除法和 mod 运算符。返回被除数 dividend 除以除数 divisor 得到的商。示例 1:输入: dividend = 10, divisor = 3输出: 3示例 2:输入: dividend = 7, divisor = -3输出: -2说明:被...

2019-09-24 14:20:56 126

原创 三天一题-26-两两交换链表中的节点

题目地址:Swap Nodes in Pairs描述:Given a linked list, swap every two adjacent nodes and return its head.You may not modify the values in the list’s nodes, only nodes itself may be changed.Example:Give...

2019-09-21 09:35:16 76

原创 三天一题-25-Generate Parentheses

题目地址:Generate Parentheses描述:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:[“((()))”,“(()())”...

2019-09-15 21:44:35 85

原创 三天一题-24-删除链表倒数第n个元素

题目地址:Remove Nth Node From End of List描述:Given a linked list, remove the n-th node from the end of list and return its head.Example:Given linked list: 1->2->3->4->5, and n = 2.After r...

2019-09-10 14:33:43 86

原创 三天一题-23- 4Sum

题目地址:4Sum描述:Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique quadruplets in the array which gives...

2019-09-03 22:20:10 95

原创 三天一题-23- 通过数字串读取对应的字母组合

题目地址:letteCombinationsPhoneNumberimport java.util.ArrayList;import java.util.HashMap;import java.util.LinkedList;import java.util.List;public class LetterCombinations { public static void ...

2019-08-30 09:05:45 156

原创 三天一题-22- 3Sum(最接近目标值的三数之和)

题目地址:3Sum Closest描述:Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assu...

2019-08-18 17:33:55 90

原创 三天一题-21- 3Sum(三数加起来等于0)

题目地址:3Sum描述:Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero–摘自《领扣》Example 2:Giv...

2019-08-14 23:19:16 106

原创 三天一题-20- Integer to Roman(Integer转成古罗马数字)

题目原地址:Integer to Roman描述:For example, two is written as II in Roman numeral, just two one’s added together. Twelve is written as, XII, which is simply X + II. The number twenty seven is written a...

2019-08-11 14:30:45 99

原创 三天一题-19- Container With Most Water(盛最多水的容器)

题目原地址:Container With Most Water描述:给定 n 个非负整数 a1,a2,…,an,每个数代表坐标中的一个点 (i, ai) 。在坐标内画 n 条垂直线,垂直线 i 的两个端点分别为 (i, ai) 和 (i, 0)。找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。说明:你不能倾斜容器,且 n 的值至少为 2。–摘自《领扣》图中垂...

2019-08-07 13:00:09 103

原创 三天一题-18- 字符串转换整数 (atoi)

题目地址:字符串转换整数 (atoi)描述:给定一个字符串,依次读取,当首个非空字符为“-”或者数字的时候,进行读取连续的数字;当数字大于Integer最大值时返回最大值;当数字小于最小值时返回最小值;否则返回0;Example 1:输入: " -42"输出: "-42"Example 2:输入: "4193 with words"输出: 4193Example 3:输...

2019-08-03 18:17:42 149

springmvc返回json的全局异常统一处理demo

springmvc返回json的全局异常统一处理demo,有问题可以留言。

2018-11-28

jquery生成cookie

在项目中包含cookie的检测,生成,清除,并且在生成的过程中使用几种算法加密。包含jquery-cookie插件,h1算法的js。

2018-06-29

vim命令图解

vim命令图解,挺详细的图解,便于理解。。。。。。。。。。

2017-10-21

Mac版的jd-gui

仅限Mac版,windows版本的可以去我的其他资源下载。。。。。。。。。

2017-10-21

windows版jd-gui

仅限windows,Mac版的进我另外资源,仅限windows,Mac版的进我另外资源。

2017-10-21

myeclipse PropertiesEditor

myeclipse PropertiesEditor

2017-06-01

java Swing图形界面开发与案例详解随书实例代码

java Swing图形界面开发与案例详解随书实例代码

2017-05-25

robomongo moogoDB客户端

moogoDB客户端,破解版

2017-04-20

myeclipse快捷键整理

myeclipse快捷键,自己整理的,在使用中积累下来的,都是一些常用的快捷键

2017-04-20

Fiddler抓包

2017-04-18

java小程序100例

java小程序100例

2016-11-28

空空如也

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

TA关注的人

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