自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

happy_bigqiang的博客

好记性,不如烂笔头

  • 博客(274)
  • 资源 (1)
  • 收藏
  • 关注

转载 VC++ 6.0安装VC6LineNumberAddin显示行号

参考:(笔记)VC6插件安装(VC6LineNumberAddin) - tdyizhen1314 - 博客园 (cnblogs.com)前情提要:由于各种原因,需要使用VC++6.0,作为上古神器,默认没有行号显示,debug十分不便,需要安装插件才能显示行号。以下是安装步骤,总共需要使用到的文件有两个:一个是:VC6LineNumberAddin.dll另一个是:VC6LineNumberAddin.reg1.下载。下载VC6LineNumberAddin插件及注册文件。(以下是参考链接:)

2021-12-07 15:58:59 1325

原创 Git工作区和暂存区的理解以及多人合作stash的应用

Git 多人合作:关于git中工作区和暂存区的理解参考:https://www.liaoxuefeng.com/wiki/896043488029600/897271968352576Git的版本库里存了很多东西,其中最重要的就是称为stage(或者叫index)的暂存区,还有Git为我们自动创建的第一个分支master,以及指向master的一个指针叫HEAD。关于常用理解:注意这里要区分本地git和远程仓库GitHub。以下说的工作区和版本库都特指在一个范围内讨论,要么是都在本地git范围讨

2020-10-26 10:00:00 843

原创 盛最多水的容器ArrayContainerWithMostWater11LeetCode

/** * 给定 n 个非负整数 a1,a2,...,an,每个数代表坐标中的一个点 (i, ai) 。在坐标内画 n 条垂直线, * 垂直线 i 的两个端点分别为 (i, ai) 和 (i, 0)。找出其中的两条线,使得它们与 x 轴共同构成的容器可 * 以容纳最多的水。 * 说明:你不能倾斜容器,且 n&n...

2019-07-31 12:02:33 529

原创 给定一个 haystack 字符串和一个 needle 字符串,在 haystack 字符串中找出 needle字符串出现的第一个位置 (从0开始)StringStrStr28LeetCode

/** * 实现 strStr() 函数。 * 给定一个 haystack 字符串和一个 needle 字符串,在 haystack 字符串中找出 needle * 字符串出现的第一个位置 (从0开始)。如果不存在,则返回 -1。 * Example 1: * Input: haystack = "hello", needle = "ll" * Output: 2 * Exampl...

2019-07-25 11:13:58 2843 3

原创 ArrayMinimumSizeSubarraySum209LeetCode给定一个含有 n 个正整数的数组和一个正整数 s ,找出该数组中满足其和 ≥ s 的长度最小的连续子数组。

/** * 给定一个含有 n 个正整数的数组和一个正整数 s ,找出该数组中满足其和 ≥ s 的长度最小的连续子数组。如果不存在符合条件的连续子数组,返回 0。 * 示例:  * 输入: s = 7, nums = [2,3,1,2,4,3] * 输出: 2 * 解释: 子数组 [4,3] 是该条件下的长度最小的连续子数组。 ...

2019-07-12 15:54:11 4125

原创 StringMinimumWindowSubstring76LeetCode给你一个字符串 S、一个字符串 T,请在字符串 S 里面找出:包含 T 所有字母的最小子串。

import java.util.HashMap;/** * 给你一个字符串 S、一个字符串 T,请在字符串 S 里面找出:包含 T 所有字母的最小子串。 * 示例: * 输入: S = "ADOBECODEBANC", T = "ABC" * 输出: "BANC" * 说明: * 如果 S 中不存这样的子串,则返回空字符串 ""。 * 如果 S 中存在这样的子串,我们保证它是唯一...

2019-07-12 15:30:19 4588

原创 lengthOfLongestSubstring给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度

import java.util.LinkedList;/** * 给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度。 * 示例 1: * 输入: "abcabcbb" * 输出: 3 * 解释: 因为无重复字符的最长子串是 "abc",所以其长度为 3。 * 示例 2: * 输入: "bbbbb" * 输出: 1 * 解释: 因为...

2019-07-10 11:43:32 785

原创 longestPalindrome给定一个字符串 s,找到 s 中最长的回文子串。

/** * 给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。 * 示例 1: * 输入: "babad" * 输出: "bab" * 注意: "aba" 也是一个有效答案。 * 示例 2: * 输入: "cbbd" * 输出: "bb" * 思路:两种方法;暴力法: * 设置两个变量,变量i遍历字符串,变量j以i为中心,想左右...

2019-07-08 20:14:39 1284

原创 有效的字母异位词

import java.util.HashMap;/** * 给定两个字符串 s 和 t ,编写一个函数来判断 t 是否是 s 的字母异位词。 * 示例 1: * 输入: s = "anagram", t = "nagaram" * 输出: true * 示例 2: * 输入: s = "rat", t = "car" * 输出: false * 说明: * 你可以...

2019-06-25 19:54:22 244

原创 反转字符串

/** * 编写一个函数,其作用是将输入的字符串反转过来。输入字符串以字符数组 char[] 的形式给出。 * 不要给另外的数组分配额外的空间,你必须原地修改输入数组、使用 O(1) 的额外空间解决这一问题。 * 你可以假设数组中的所有字符都是 ASCII 码表中的可打印字符。 * 示例 1: * 输入:["h","e","l","l","o"] * 输出:["o","l","l","...

2019-06-25 17:27:51 197

原创 比较版本号

import javax.xml.stream.FactoryConfigurationError;/** * 比较两个版本号 version1 和 version2。 * 如果 version1 > version2 返回 1,如果 version1 < version2 返回 -1, ...

2019-06-24 21:13:19 1926

原创 给定一个只包含三种字符的字符串:( ,) 和 *,写一个函数来检验这个字符串是否为有效字符串StringValidParenthesisString678LeetCode

/** * @author LemonLin * @Description :StringValidParenthesisString * @date 19.6.17-23:45 * Given a string containing only three types of characters: '(', ')' and '*', write a function to * check...

2019-06-22 21:11:39 2776 2

原创 唯一摩尔斯密码词

import java.util.HashSet;/** * 国际摩尔斯密码定义一种标准编码方式,将每个字母对应于一个由一系列点和短线组成的字符串, *  比如: "a" 对应 ".-", "b" 对应 "-...", "c" 对应 "-.-.", 等等。 * 为了方便,所有26个英文字母对应摩尔斯密码表如下: * [".-","-...","-.-.","-..",".",...

2019-06-22 20:32:04 344

原创 需要 n 阶你才能到达楼顶。 每次你可以爬 1 或 2 个台阶。你有多少种不同的方法可以爬到楼顶呢?

import java.util.ArrayList;/** * 假设你正在爬楼梯。需要 n 阶你才能到达楼顶。 * 每次你可以爬 1 或 2 个台阶。你有多少种不同的方法可以爬到楼顶呢? * 注意:给定 n 是一个正整数。 * 示例 1: * 输入: 2 * 输出: 2 * 解释: 有两种方法可以爬到楼顶。 * 1. 1 阶 + 1 阶 * 2. 2 阶 * ...

2019-06-21 19:26:53 1859

原创 给定一个单词,你需要判断单词的大写使用是否正确。520LeetCode

/** * 给定一个单词,你需要判断单词的大写使用是否正确。我们定义,在以下情况时,单词的大写用法是正确的: * 全部字母都是大写,比如"USA"。 * 单词中所有字母都不是大写,比如"leetcode"。 * 如果单词不只含有一个字母,只有首字母大写, 比如 "Google"。 * 否则,我们定义这个单词没有正确使用大写字母。 * Given a word, yo...

2019-06-19 17:35:20 2195

原创 给定一个字符串 s,计算具有相同数量0和1的非空(连续)子字符串的数量,并且这些子字符串中的所有0和所有1都是组合在一起的。

/** *给定一个字符串 s,计算具有相同数量0和1的非空(连续)子字符串的数量,并且这些子字符串中的所有0 * 和所有1都是组合在一起的。重复出现的子串要计算它们出现的次数。 * Give a string s, count the number of non-empty (contiguous) substrings that have the same * number of 0's...

2019-06-19 16:45:33 1560

原创 实现函数 ToLowerCase(),该函数接收一个字符串参数 str,并将该字符串中的大写字母转换成小写字母,之后返回新的字符串

/** * 实现函数 ToLowerCase(),该函数接收一个字符串参数 str,并将该字符串中的大写字母转换 * 成小写字母,之后返回新的字符串。 * 题目中文写在前面是为了博客预览的时候能够一眼看见,不要再调注释顺序了 * Implement function ToLowerCase() that has a string parameter str, and returns the...

2019-06-19 15:49:31 4392

原创 学生出勤记录 I(给定一个字符串来代表一个学生的出勤记录 … 如果一个学生的出勤记录中不超过一个'A'(缺勤)并且不超过两个连续的'L'(迟到),那么这个学生会被奖赏。)

/** * @author LemonLin * @Description :StringStudentAttendanceRecordI * @date 19.6.17-22:59 * You are given a string representing an attendance record for a student. The record only * contains th...

2019-06-18 17:20:42 1549

原创 反转字符串 IIReverse String II(给定一个字符串和一个整数 k,你需要对从字符串开头算起的每个 2k 个字符的前k个字符进行反转。)

/** * @author LemonLin * @Description :StringReverseStringII * @date 19.6.17-22:47 * Given a string and an integer k, you need to reverse the first k characters for every 2k * characters counting...

2019-06-18 16:52:15 827

原创 仅仅反转字母Reverse Only Letters(给定一个字符串 S,返回 “反转后的” 字符串,其中不是字母的字符都保留在原地,而所有字母的位置发生反转。)

/** * @author LemonLin * @Description :StringReverseOnlyLetters * @date 19.6.17-23:04 * Given a string S, return the "reversed" string where all characters that are not a letter *  stay in t...

2019-06-18 15:25:19 577

原创 字符串相加Add Strings(给定两个字符串形式的非负整数 num1 和num2 ,计算它们的和。)

/** * @author LemonLin * @Description :StringAddStrings * @date 19.6.13-22:47 * Given two non-negative integers num1 and num2 represented as string, return the sum of num1 * and num2. * Note: *...

2019-06-17 21:50:12 1520

原创 反转字符串中的元音字母Reverse Vowels of a String

import java.util.HashSet;/** * @author LemonLin * @Description :StringReverseVowelsofaString * @date 19.6.14-11:07 * Write a function that takes a string as input and reverse only the vowels of ...

2019-06-16 17:41:18 208

原创 编写一个函数来验证输入的字符串是否是有效的 IPv4 或 IPv6 地址StringValidateIPAddress468LeetCode

/** * @author LemonLin * @Description :StringValidateIPAddress * @date 19.6.11-0:00 * Write a function to check whether an input string is a valid IPv4 address or IPv6 address or neither. * IPv4 ...

2019-06-13 19:34:49 4693

原创 有效的括号ValidParentheses

import java.util.Stack;/** * @author LemonLin * @Description :StringValidParentheses * @date 19.6.10-23:32 * Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determ...

2019-06-12 17:31:17 120

原创 压缩字符串StringCompression

/** * @author LemonLin * @Description :StringStringCompression * @date 19.6.10-22:59 * Given an array of characters, compress it in-place. * The length after compression must always be smaller th...

2019-06-12 17:00:13 258

原创 最常见的单词MostCommonWord

import java.util.ArrayList;import java.util.Arrays;import java.util.Collection;import java.util.HashMap;/** * @author LemonLin * @Description :StringMostCommonWord * @date 19.6.10-22:14 * Giv...

2019-06-11 15:53:39 273

原创 字符串中的第一个唯一字符FirstUniqueCharacterInAString

import java.util.LinkedHashMap;/** * @author LemonLin * @Description :StringFirstUniqueCharacterInAString * @date 19.6.10-23:39 * Given a string, find the first non-repeating character in it and...

2019-06-11 10:28:07 268

原创 最长公共前缀Longest Common Prefix

/** * @author LemonLin * @Description :StringLongestCommonPrefix * @date 19.6.10-16:06 * Write a function to find the longest common prefix string amongst an array of strings. * If there is no co...

2019-06-10 17:25:39 153

原创 字母异位词分组groupAnagrams

import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map;/** * @author LemonLin * @Description :StringGroupAnagrams * @date 19.6.10-14:49 * Given an array...

2019-06-10 15:52:15 130

原创 统计字符串中的单词个数,这里的单词指的是连续的不是空格的字符。StringcountSegments434LeetCode

/** * @author LemonLin * @Description :StringcountSegments * @date 19.6.10-10:59 * Count the number of segments in a string, where a segment is defined to be a contiguous sequence * of non-space ...

2019-06-10 11:30:31 370

原创 重复的字符串RepeatedSubstringPattern

/** * @author LemonLin * @Description :StringRepeatedSubstringPattern * @date 2019/6/9-17:13 * Given a non-empty string check if it can be constructed by taking a substring of it and appending * ...

2019-06-10 10:58:52 191

原创 重复叠加字符串匹配repeatedStringMatch

/** * @author LemonLin * @Description :StringrepeatedStringMatch * @date 2019/6/9-11:26 * Given two strings A and B, find the minimum number of times A has to be repeated such that B is a * subst...

2019-06-09 16:10:55 205

原创 StringLengthofLastWord最后一个单词的长度

/** * @author LemonLin * @Description :StringLengthofLastWord * @date 2019/6/9-10:18 * Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the * length ...

2019-06-09 11:07:13 123

原创 StringBuddyStrings亲密字符串(交换一次字符,判断是否相等字符串)

import java.util.ArrayList;import java.util.HashMap;import java.util.HashSet;/** * @author LemonLin * @Description :StringBuddyStrings * @date 2019/6/5-22:25 * Given two strings A and B of low...

2019-06-09 10:15:29 617

原创 字符串二进制求和Add Binary

/** * @author LemonLin * @Description :StringaddBinary * @date 2019/6/2-21:41 * * 题目:Given two binary strings, return their sum (also a binary string). * The input strings are both non-empty and...

2019-06-05 20:50:47 150

原创 从i++, ++i理解局部变量表和操作数栈

看一个面试题:public static void main(String[] args) { int i = 1; i = i++; int j = i++; int k = i + ++i * i++; System.out.println("i=" + i); System.out.println("j=" + j); System.out.println("k...

2019-05-21 20:26:00 4887 11

原创 Volatile是什么,CAS是什么:

轻量级的同步机制:保证可见性,不保证原子性,禁止指令重排。Volatile就是乞丐版的synchronizid 。volatile实现禁止指令重排优化,从而避免多线程环境下程序出现乱序执行的现象。先了解一个概念,内存屏障又称内存栅栏,是一个CPU指令,它的作用有两个:一是保证特定操作的执行顺序二是保证某些变量的内存可见性(利用该特性实现volatile的内存可见性)由于编译器和处理器都能...

2019-05-19 19:10:08 1015

原创 ArrayList线程不安全举例说明并解决

列举一个例子说明ArrayList线程不安全:最终解决方法:将ArrayList换成CopyOnWriteArrayList;分析如下:

2019-05-19 19:05:05 985

原创 windows10 环境下heroku 快速部署网站(静态文件)

先上结论:部署软件只需要: heroku CLI 的安装 git 的安装 没了(完全不需要安装一些网站服务器,比如类似Tomcat之类的) 可能需要翻墙(部署过程网站打不开,翻墙才打开)可以说是极其方便。唯快不破!写了一个简单的由html,css,javascript 组成的静态文件网页,想部署一下。但是又不行花太多时间在后台的页面跳转,尝试了一下用java...

2019-05-18 11:12:16 1599

原创 字符串反转句子StringReverseSentence

/** * @author LemonLin * @Description :ReverseSentence42_1 *翻转单词顺序列 * * 牛客最近来了一个新员工Fish,每天早晨总是会拿着一本英文杂志,写些句子在本子上。 * 同事Cat对Fish写的内容颇感兴趣,有一天他向Fish借来翻看,但却读不懂它的意思。 * 例如,“student. a am I”。后来才意识到,这家伙...

2019-05-18 10:25:58 495

亲测可用基于 SpringBoot+Maven+Mybatis+Redis+RabbitMQ 高并发秒杀系统

基于 SpringBoot+Maven+Mybatis+Redis+RabbitMQ 高并发商城秒杀系统; 开发工具IntelliJ IDEA 2017.3.1 x64; 项目搭建: 1、下载代码 将项目加载到IDEA里面 2、运行sql文件夹下的sql文件 3、到src/main/resources下的application.properties下修改你的数据库链接用户名与密码 4、安装redis、mysql、rabbitmq、maven等环境 5、启动前,检查配置 application.properties 中相关redis、mysql、rabbitmq地址 6、登录地址:http://localhost:8080/login/to_login 7、商品秒杀列表地址:http://localhost:8080/goods/to_list

2019-06-01

空空如也

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

TA关注的人

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