自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(46)
  • 资源 (2)
  • 收藏
  • 关注

原创 浅谈Servlet

文章目录为什么还需要学习Servlet为什么还需要学习Servlet我从Java SE转向Java Web学习的时候,心中就总有那么一个疑问,main函数去哪里了?为什么在学习Java SE的时候,总是从main函数开始运行,而在学习Java Web的时候,按照步骤莫名奇妙的就可以跑起来了。这个疑问之前困扰了我很久。后面渐渐的Spring的兴起,渐渐的main函数又出现了。不得不说,Spring使得Java Web的学习曲线平滑了少许。不过现在回过头来看,对于Java EE来说,main函数已经封装在

2021-01-24 17:16:36 190

原创 浅谈Spring IOC

文章目录浅谈Spring IOC如何创建对象Spring IOC 是如何创建对象的Spring IOC对对象进行操作浅谈Spring IOC如何创建对象在Java中,我们通常创建对象都是通过new Object 的形式来创建一个新的对象的,然后通过这个对象的set方法对一个对象里面的属性进行赋值。譬如 User user = new User() user.setName = 'Liming'除了通过new的方式以外,我们也可以通过反射的方法创建对象。Class<?> clz

2021-01-06 23:08:51 151

原创 LeetCode28. Implement strStr() 字符串匹配

文章目录28.字符串匹配28. Implement strStr()暴力破解Rabin-Karp算法KMP算法BM算法(Boyer-Moore)Sunday算法28.字符串匹配28. Implement strStr()Implement strStr().Return the index of the first occurrence of needle in haystack, or ...

2020-04-05 10:08:44 191

原创 LeetCode 27.Remove Element 移除数组中的元素

文章目录移除元素27. Remove Element快慢双指针头尾双指针移除元素27. Remove ElementGiven an array nums and a value val, remove all instances of that value in-place and return the new length.Do not allocate extra space for...

2020-03-01 14:51:08 164

原创 LeetCode 26.Remove Duplicates from Sorted Array 移除有序数组的重复元素

文章目录26.移除有序数组的重复元素26. Remove Duplicates from Sorted Array双指针法26.移除有序数组的重复元素26. Remove Duplicates from Sorted ArrayGiven a sorted array nums, remove the duplicates in-place such that each element ap...

2020-02-29 00:21:30 142

原创 LeetCode 25. Reverse Nodes in k-Group 以组的形式反转节点

文章目录25.以组的形式反转节点25. Reverse Nodes in k-Group尾插法头插法25.以组的形式反转节点25. Reverse Nodes in k-GroupGiven a linked list, reverse the nodes of a linked list k at a time and return its modified list.k is a po...

2020-02-26 23:07:40 153

原创 LeetCode 24.Swap Nodes in Pairs 成对交换链表节点

文章目录24.成对交换链表节点24. Swap Nodes in Pairs迭代法递归24.成对交换链表节点24. Swap Nodes in PairsGiven a linked list, swap every two adjacent nodes and return its head.You may not modify the values in the list’s node...

2020-02-25 16:01:29 166

原创 LeetCode 23.Merge k Sorted Lists 合并K个的有序链表

文章目录23.合并排序N个有序链表23. Merge k Sorted Lists直接合并分治法23.合并排序N个有序链表23. Merge k Sorted ListsMerge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.Example:Inpu...

2020-02-24 19:55:45 156

原创 LeetCode22.Generate Parentheses 产生括号组合

22.产生括号组合22. Generate ParenthesesGiven n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:[ "((()))", ...

2020-02-23 16:40:46 128

原创 LeetCode 19.Remove Nth Node From End of List 移除链表从后算起第几个元素

文章目录19.移除链表从后算起第几个元素19. Remove Nth Node From End of List两次遍历单次遍历19.移除链表从后算起第几个元素19. Remove Nth Node From End of ListGiven a linked list, remove the n-th node from the end of list and return its hea...

2020-02-17 21:41:20 81

原创 LeetCode17. Letter Combinations of a Phone Number电话号码组合

文章目录17. 电话号码组合17. Letter Combinations of a Phone Number深度优先遍历(DFS)直接拼接17. 电话号码组合17. Letter Combinations of a Phone NumberGiven a string containing digits from 2-9 inclusive, return all possible let...

2020-02-16 18:53:38 291

原创 LeetCode 18. 4Sum四数之和

18.4Sum 四数之和18. 4SumGiven 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 whic...

2020-02-13 19:47:48 139

原创 LeetCode16. 3Sum Closest 三数之和改

16.3Sum Closest最接近目标值的三数之和3Sum ClosestGiven 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 integer...

2020-02-10 20:36:50 99

原创 LeetCode15.3Sum 三数之和

文章目录15. 3Sum 三数之和15. 3Sum双指针使用Map15. 3Sum 三数之和15. 3SumGiven 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 give...

2020-02-08 11:57:49 134

原创 LeetCode 14. Longest Common Prefix最长公共子前缀

最长公共子前缀14. Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string "".Example 1:Input: ["fl...

2020-02-04 12:24:57 248

原创 LeetCode 13. Roman to Integer 罗马数字转阿拉伯数字

13. 罗马数字转阿拉伯数字13. Roman to IntegerLeetCode 12 的镜像问题Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol ValueI 1V 5X ...

2020-02-02 15:09:30 155

原创 LeetCode 12.Integer to Roman 阿拉伯数字转换为罗马数字

LeetCode 12.Integer to Roman 阿拉伯数字转换为罗马数字12. Integer to RomanRoman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol ValueI 1V 5X ...

2020-02-01 20:26:22 235

原创 LeetCode 11. Container With Most Water 容器最大水容量

11. Container With Most Water 容器最大水容量11. Container With Most WaterGiven n non-negative integers a1, a2, …, an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such t...

2020-01-30 10:37:42 173

原创 LeetCode 10.Regular Expression Matching 正则匹配

LeetCode 10 . Regular Expression Matching 正则匹配10. Regular Expression MatchingGiven an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*'.'.' Mat...

2020-01-29 10:13:17 201

原创 LeetCode 9. Palindrome Number 回文数字

LeetCode 9. Palindrome Number9.Palindrome NumberDetermine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.Example 1:Input: 121Output: tru...

2020-01-27 09:17:56 223

原创 LeetCode 8. String to Integer (atoi) 字符串转整形

LeetCode 8. String to Integer (atoi) 字符串转整形8. String to Integer (atoi)Implement atoi which converts a string to an integer.The function first discards as many whitespace characters as necessary unt...

2020-01-24 22:37:40 124

原创 LeetCode 7. Reverse Integer 反转整数

LeetCode 7. Reverse Integer 反转整数文章目录LeetCode 7. Reverse Integer 反转整数7. Reverse Integer直接反转7. Reverse IntegerGiven a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output...

2020-01-22 21:06:21 297

原创 LeetCode 6. ZigZag ConversionZ字形转换

LeetCode 6. ZigZag ConversionZ字形转换文章目录LeetCode 6. ZigZag ConversionZ字形转换6. ZigZag Conversion直接跳转法(横着走)拉链法(竖着走)6. ZigZag ConversionThe string "PAYPALISHIRING" is written in a zigzag pattern on a giv...

2020-01-21 21:41:32 240

原创 LeetCode5. Longest Palindromic Substring 最长子回文串

最长子回文串5. Longest Palindromic SubstringGiven a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example 1:Input: "babad"Output: "bab"Note...

2020-01-19 23:18:22 126

原创 LeetCode4.Median of Two Sorted Arrays 求有序数组的中位数

Median of Two Sorted Arrays 有序数组的中位数4. Median of Two Sorted ArraysThere are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run ...

2020-01-16 19:57:53 95

原创 LeetCode3. Longest Substring Without Repeating Characters 子字符串长度

文章目录字符串的长度3. Longest Substring Without Repeating Characters暴力破解滑动窗口(双指针法)滑动窗口改进字符串的长度3. Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring withou...

2020-01-13 21:53:17 89

原创 强烈安利几款效率工具

文章目录工具集视频:爱奇艺万能播放器文件搜索:everything,Wox截图:greenshot垃圾清理:CCleanerMarkdown编辑器:Typora预览器:Seer浏览器:Chrome,firefox文本编辑器:Notepad++IDE:VSCode,IDEATodoList:滴答清单工具集视频:爱奇艺万能播放器无广告,支持格式多文件搜索:everything,Wox...

2020-01-12 17:57:55 646

原创 Leetcode 2. Add Two Numbers 两数相加

Add Two Numbers 两数相加2. Add Two NumbersYou are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single...

2020-01-12 17:02:46 79

原创 数据库引擎笔记

MySQLmysql使用文件系统存储表名和表的。 使用.frm文件存储表MyISAMmyISAM提供了全文检索,压缩和空间函数等功能。但是不提供事务支持和行级锁存储方面使用了数据文件和索引文件分离模式。使用.MYD记录数据,.MYI记录索引支持数据库的行数由硬盘空间和系统允许创建的文件大小所确定的。默认最大可以处理256TB的数据MyISAM使用的是表锁。支持自动/手动检查和修复表。...

2019-10-21 16:32:57 126

原创 Jest运行单个测试文件

Jest跑单个测试文件问题背景:当我们使用vue框架进行测试时,使用的是直接运行jest,就会直接测试所有在__tests__目录下的所有测试文件。但往往有时候,我们不需要执行所有的测试文件,那么如何使用jest运行单个测试文件或者是运行非__tests__目录下的文件遇到第一个问题的第一反应,我就查看官方提供的文档。官方文档是这样描述的Run unit tests with Jest...

2019-07-16 08:41:21 13409 2

原创 css学习笔记

css学习笔记在html引入css的三种方式外链<link rel="stylesheet" href="style.css">嵌入p1{background-color: #00500F;font-size: 2em;text-align: center;}内联<p style="background-color: #00539F; font-size:...

2019-07-03 16:33:56 89

原创 IntelliJ IDEA 常用快捷键(Win下)

IntelliJ IDEA 常用快捷键(Win下)idea 的快捷键功能强大,但是过于繁杂,因此本文的主要目的是作为一个简单的摘录,记录一些自己常用的快捷键。1. 编辑相关alt + enter 智能提示ctrl + d 复制行ctrl + x 剪切行ctrl + y 删除行alt + ctrl + enter 上方插入行shift + enter 下方插入行ctrl + s...

2019-07-03 16:31:58 119

原创 提问的艺术

提问的艺术提问之前在提问的论坛的旧文章中搜索答案阅读手册查找答案上网搜索答案阅读常见问题文件(FAQ)自己检查或者实验尝试阅读源码查找答案可以使用谁能给点提示?我的这个例子里缺了什么?以及我应该检查什么地方这样的提问方式,表现出只要有人能指个正确方向,你就有完成它的能力和决心。提问时要在主题符合的论坛上提问题不要在探讨进阶技术问题的论坛张贴非常初...

2019-07-03 16:31:01 221

原创 html学习笔记

html学习笔记基本组件文本内容段落标签 <p>标题标签 <h1>.<h2> ,,,, <h6>分割线 <hr>有序标签 <ol> 每一子项用<li>标签表示无序标签 <ul> 每一子项用<li>标签表示列表标签 <dl> 子项用<dt>表示标题,&l...

2019-07-03 16:30:01 136

原创 Merge Two Sorted Lists 有序链表合并问题

Merge Two Sorted Lists 链表合并问题题目Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:Input: 1-&gt;2-&...

2019-01-27 10:46:03 157

原创 Valid Parentheses 括号匹配问题

Valid Parentheses 括号匹配问题题目:Given a string containing just the characters ‘(’, ‘)’, ‘{’, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.An input string is valid if:Open brackets must be c...

2019-01-18 19:17:24 224

原创 数据库的连接(内连接,外连接,笛卡尔积)

数据库的连接(内连接,外连接,笛卡尔积)对于本文章,所用的表为student表和score表 (数据比较简单~)1. 内连接1.1 自然连接   自然连接只考虑属性相同的元组对。在本例中考虑的就是id,所以的到的结果如下 1.2 等值连接   等值连接一般都是给定条件进行查询,一般可以是使用>,2. 外连接2.1 左外连接 以第一个关系为主,在第二个关系

2018-01-28 17:14:52 32834 3

原创 算法笔记:编辑距离

算法笔记:编辑距离原题: 给出两个单词word1和word2,计算出将word1 转换为word2的最少操作次数。 你总共三种操作方法:插入一个字符删除一个字符替换一个字符给出 work1=”mart” 和 work2=”karma” 返回 3下面是两种思路实现,自顶向上方法和自顶向下方法1.自底向上方法实现不如将问题简化下,化成规模比较小的问题。 首先,我们先考虑两个空串,那么当然

2017-08-29 15:01:06 345

原创 java中static

java中static的使用在学习Junit的时候,偶然发现了这个一个语句 import static org.junit.Assert.*;第一次看见这样子的static方法。让我赶快地翻了下书,也没怎么发现有类似的使用方法。之后找了些资料,顺便回顾下static的使用方法。1. static变量static修饰的变量估计大家都很熟悉了,就是静态变量(也叫类变量)。它是储存在公共的内存地址。

2017-08-28 09:21:46 180

原创 Junit的基本使用

Junit 使用详解

2017-08-24 14:12:38 455

Gson资源包,版本2.8.1

gson资源包

2017-07-14

fastjson Android包 版本1.1.59

fastjson 包

2017-07-14

空空如也

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

TA关注的人

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