自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(130)
  • 问答 (2)
  • 收藏
  • 关注

原创 dubbo简介与梳理

1.架构图节点 角色说明 Provider 暴露服务的服务提供方 Consumer 调用远程服务的服务消费方 Registry 服务注册与发现的注册中心 Monitor 统计服务的调用次数和调用时间的监控中心 Container 服务运行容器 2.配合zookeeper就不需要再进行点对点,很方便zookeeper集群配置...

2019-11-18 16:25:02 240

原创 zookeeper简介与梳理

zookeeper就是分布式的注册中心配置文件tickTime=2000initLimit=10syncLimit=5dataDir=/app/soft/zookeeper-3.4.6/data (换成真实输出目录)clientPort=2181#tickTime:这个时间是作为 Zookeeper 服务器之间或客户端与服务器之间维持心跳的时间间隔,也就是每个 tickTi...

2019-11-18 15:53:34 146

原创 Netty介绍梳理

netty梳理1.io和nio区别 多了个筛选器进行筛选2.jdk的nio的wpoll空轮询导致cpu飙升100%3.netty的线程模型Netty 线程模型3.1Acceptor中的NioEventLoop用于接收TCP连接,初始化参数3.2I/O线程池中的NioEventLoop异步读取通信对端的数据报,发送读事件到channel3.3异步...

2019-11-18 11:40:55 152

原创 关注filter过滤器

首先要明确我们访问网站的流程浏览器-》服务器-》过滤器-》jsp、html、servlet等等如果你想动态生成图片或者其他动态可使用servlet-mapping捕捉到的东西,那就需要解决过滤器和servlet-mapping冲突的问题,一般来说程序肯定是先走过滤器,那么如果想要动态生成图片等等,servlet-mapping当中url-pattern来个/Img什么的,如果此时过滤器是全...

2018-12-04 17:13:32 122

原创 关于weblogic修改登录sessinid的覆盖和丢失问题

本人是有一个登陆后改变sessionid的需求,本次使用tomcat测试好后,转移到weblogic就出了各种问题。本人在本地使用tomcat当平台之间相互跳转的时候,sessionid是可以变化的,但是转移到weblogic当中,就会发现跳转过去后sessinid不再改变了,怎么刷新、关闭标签页都不改变,只有断开连接重新打开浏览器才有用,但是session是变化了的,不变的只有session...

2018-12-04 16:57:46 904

原创 442. Find All Duplicates in an Array

ssGiven an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements that appear twice in this array.Could you do it without extr...

2018-12-04 16:22:44 86

原创 771. Jewels and Stones

You're given strings J representing the types of stones that are jewels, and S representing the stones you have.  Each character in Sis a type of stone you have.  You want to know how many of the ston...

2018-02-11 15:12:21 190

原创 551. Student Attendance Record I

You are given a string representing an attendance record for a student. The record only contains the following three characters:'A' : Absent.'L' : Late.'P' : Present.A student could be

2017-08-25 16:40:22 207

原创 268. Missing Number多种解法

Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.For example,Given nums = [0, 1, 3] return 2.解法一:直接,但是耗时比较多class Solut

2017-08-25 16:04:43 440

原创 504. Base 7

Given an integer, return its base 7 string representation.Example 1:Input: 100Output: "202"Example 2:Input: -7Output: "-10"Note: The input will be in range of [-1e7, 1e

2017-08-25 14:09:23 162

原创 350. Intersection of Two Arrays II

Given two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].Note:Each element in the result should appear as ma

2017-08-15 17:19:17 209

原创 447. Number of Boomerangs

Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points (i, j, k) such that the distance betweeni and j equals the distance between i and k (the order of t

2017-08-10 20:57:54 152

原创 628. Maximum Product of Three Numbers

Given an integer array, find three numbers whose product is maximum and output the maximum product.Example 1:Input: [1,2,3]Output: 6Example 2:Input: [1,2,3,4]Output: 24

2017-08-09 10:24:44 167

原创 存储过程中用到的各种函数学习(一)

1.%type和%rowtype%type是用来声明一个变量和指定表的column一样的数据类型例子如下: 需要加.哦v_EmpName emp.ename%TYPE; 这样一来v_EmpName和emp.ename的类型一样了%ROWTYPE用来声明一个和表中记录一样例子v_emp emp%ROWTYPE;这样一来v_emp拥有了emp表中每一列的属性,没有数据只有属性

2017-08-08 14:22:51 926

原创 653. Two Sum IV - Input is a BST

Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given target.Example 1:Input: 5 / \ 3 6 / \

2017-08-08 09:21:05 331

原创 springboot+mybatis+gradle在idea和oracle使用

╮(╯▽╰)╭这已经是第三版,第一版不小心删除了,心痛!鉴于网上springboot+mybatis框架搭配各种各样,那么我就把我个人能搭配成功的经验和步骤介绍给大家,(我自己试了网上N钟方法搭配就是搭配不成功啊,出现各种各样的问题),在这里为大家介绍其中一个大神的帖子,里面并附带github的源代码程序http://blog.csdn.net/gebitan505/article/det

2017-07-31 20:50:19 1244

原创 409. Longest Palindrome+askii码总共128位

Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters.This is case sensitive, for example "Aa" is not con

2017-07-24 09:21:55 220

原创 387. First Unique Character in a String字母表数组的运动

Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1.Examples:s = "leetcode"return 0.s = "loveleetcode",return 2.Note:

2017-07-21 11:11:02 204

原创 506. Relative Ranks+数组赋值复制

Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal" and "Bronze Medal".Example 1:In

2017-07-19 14:35:07 213

原创 122. Best Time to Buy and Sell Stock II

Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy on

2017-07-19 11:19:03 128

原创 404. Sum of Left Leaves

Find the sum of all left leaves in a given binary tree.Example: 3 / \ 9 20 / \ 15 7There are two left leaves in the binary tree, with values 9 and 15 respectively. Return 24

2017-07-19 10:38:59 164

原创 563. Binary Tree Tilt

Given a binary tree, return the tilt of the whole tree.The tilt of a tree node is defined as the absolute difference between the sum of all left subtree node values and the sum of all right subtre

2017-07-19 10:00:49 155

原创 530. Minimum Absolute Difference in BST二叉搜索树

Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes.Example:Input: 1 \ 3 / 2Output:1Explanation:

2017-07-18 20:31:51 138

原创 167. Two Sum II - Input array is sorted

Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two number

2017-07-18 17:16:04 119

原创 455. Assign Cookies

Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor gi, which is the minimum size of a c

2017-07-18 14:25:57 119

原创 453. Minimum Moves to Equal Array Elements

Given a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementing n - 1 elements by 1.Example:Input:[1,2,3]Ou

2017-07-18 11:15:13 121

原创 599. Minimum Index Sum of Two Lists

Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings.You need to help them find out their common interest with th

2017-07-18 10:56:24 153

原创 598. Range Addition II

Given an m * n matrix M initialized with all 0's and several update operations.Operations are represented by a 2D array, and each operation is represented by an array with two positive integers a 

2017-07-18 09:48:51 144

原创 606. Construct String from Binary Tree

You need to construct a string consists of parenthesis and integers from a binary tree with the preorder traversing way.The null node needs to be represented by empty parenthesis pair "()". And yo

2017-07-17 16:29:03 120

原创 389. Find the Difference注意异或运算的巧妙使用^

Given two strings s and t which consist of only lowercase letters.String t is generated by random shuffling string s and then add one more letter at a random position.Find the letter that was

2017-07-17 10:48:54 242

原创 448. Find All Numbers Disappeared in an Array

Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements of [1, n] inclusive that do not appear in this array.

2017-07-17 10:20:27 132

转载 520. Detect Capital+substring字符串截取

Given a word, you need to judge whether the usage of capitals in it is right or not.We define the usage of capitals in a word to be right when one of the following cases holds:All letters in t

2017-07-17 09:18:26 252

原创 538. Convert BST to Greater Tree

Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all keys greater than the original key in BST.Exam

2017-07-14 10:08:31 182

原创 485. Max Consecutive Ones

Given a binary array, find the maximum number of consecutive 1s in this array.Example 1:Input: [1,1,0,1,1,1]Output: 3Explanation: The first two digits or the last three digits are consecutiv

2017-07-14 09:43:13 131

转载 136. Single Number

Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using ext

2017-07-14 09:26:38 140

转载 463. Island Perimeter

You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/vertically (not diagonally). The grid is completely

2017-07-13 20:40:35 125

转载 496. Next Greater Element I+附hashmap用法

You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nums

2017-07-13 09:33:58 151

转载 412. Fizz Buzz+String与int类型转化

Write a program that outputs the string representation of numbers from 1 to n.But for multiples of three it should output “Fizz” instead of the number and for the multiples of five output “Buzz”.

2017-07-13 09:12:45 247

转载 627. Swap Salary+编程中早晚用到的|、||、&、&&、异或、~、!运算

Given a table salary, such as the one below, that has m=male and f=female values. Swap all f and m values (i.e., change all f values to m and vice versa) with a single update query and no intermedia

2017-07-12 20:24:58 629

原创 575. Distribute Candies

Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of the corresponding kind. You need to distribute the

2017-07-12 19:59:43 179

空空如也

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

TA关注的人

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