自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(735)
  • 收藏
  • 关注

原创 LeetCode-SQL数据库题集

LeetCode-SQL-175-176

2020-06-03 09:59:28 2156

原创 《数据库系统概论》知识点总结索引

《数据库系统概论》-Chapter1-绪论知识点整理《数据库系统概论》-Chapter2-关系数据库知识点整理《数据库系统概论》-Chapter3-SQL《数据库系统概论》-Chapter4-数据库安全性《数据库系统概论》-Chapter5-数据库完整性《数据库系统概论》-Chapter6-关系数据理论《数据库系统概论》-Chapter7-数据库设计《数据库系统概论》-Chapter8-数据库编程《数据库系统概论》-Chapter9-关系查询处理和查询优化《数据库系统概论》-Chapter

2020-06-03 09:52:22 1560 3

原创 《软件工程与计算(卷二)》知识点总结索引

《软件工程与计算(卷二)》-0-软件工程知识点总述《软件工程与计算(卷二)》-Chapter1-2–软件工程基础与发展《软件工程与计算(卷二)》-Chapter4-项目管理基础《软件工程与计算(卷二)》-Chapter5-软件需求基础《软件工程与计算(卷二)》-Chapter6-需求分析方法《软件工程与计算(卷二)》-Chapter7-需求文档化与验证《软件工程与计算(卷二)》-Chapter8-软件设计基础《软件工程与计算(卷二)》-Chapter11-人机交互设计《软件工程与计算(卷二)

2020-06-02 15:41:36 4734 2

原创 数据结构知识点总结索引

《数据结构》-Chapter1-绪论题库《数据结构》-Chapter2-线性表《数据结构》-Chapter3-1-栈、队列、数组《数据结构》-Chapter3-2-队列算法《数据结构》-Chapter4-1-树知识点整理《数据结构》-Chapter5-1-图的基本概念知识点整理《数据结构》-Chapter5-3-图的基础算法《数据结构》-Chapter6-1-查找知识点整理《数据结构》-Chapter6-2-B树增删查题库《数据结构》-Chapter7-2-排序应用算法《数据结构》-Ch

2020-06-02 15:27:25 902

原创 计算机网络知识点总索引

《计算机网络》核心知识点整理-0-计算机网络总述《计算机网络》Chapter1-计算机网络体系结构《计算机网络》Chapter2-物理层知识点整理《计算机网络》Chapter3-数据链路层《计算机网络》Chapter4-网络层《计算机网络》Chapter4-网络层典型题《计算机网络》Chapter5-传输层《计算机网络》Chapter6-应用层...

2020-06-02 15:22:34 1052

原创 操作系统知识点索引总贴

操作系统复习总述知识点概要——《操作系统教程》第5版《操作系统教程》第5版-名词解释整理《操作系统教程》第5版-概念题整理《操作系统教程》第5版-Chapter1-操作系统概述知识点整理《操作系统教程》第5版-Chapter2-处理器管理题目整理《操作系统教程》第5版-Chapter3-同步通信与死锁知识点整理《操作系统教程》第5版-Chapter5-设备管理知识点整理与典型题目《操作系统教程》第5版-Chapter6-1-文件管理知识点整理《操作系统教程》第5版-Chapter6-2-文件

2020-06-02 15:16:13 1302 1

原创 ASTContext的相关操作

如何获取ASTContext在调用CreateASTConsumer时,ASTContext可以从CompilerInstance里的getASTContext()方法获得。std::unique_ptr<ASTConsumer> MyFrontendAction::CreateASTConsumer(CompilerInstance& CI, StringRef file){ // 获取ASTContext的办法 clang::ASTContext&

2022-01-06 20:50:10 848

原创 使用compile_commands.json构建ClangTool

//生成CompilationDatabase string s; string &ErrorMessage = s; const char *complieJsonPath = ....读入字符串; unique_ptr<JSONCompilationDatabase> jsonDatabasePtr = clang::tooling::JSONCompilationDatabase::loadFromFile(complieJsonPath,...

2022-01-06 20:38:14 1171

原创 ClangTool添加参数

void ClangToolHelper::addParameters(ClangTool& tool, const char* extra) { // add header search paths to compiler ArgumentsAdjuster ardj = getInsertArgumentAdjuster(extra); tool.appendArgumentsAdjuster(ardj);}其中vec为一个string的vector for(int i=0

2022-01-06 20:35:27 422

原创 FrontendAction自定义返回值

class MyFrontendAction : public ASTFrontendAction{public: MyFrontendAction(ReturnClass* return) { result = return; } void EndSourceFileAction() override; std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance&

2022-01-06 20:30:33 591

原创 ClangTool相关源码与使用

ClangTool相关源码与使用核心方法与入口源码int ClangTool::run (ToolAction * Action) 在命令行中指定的所有文件上运行一个操作。返回值0表示成功;1表示发生任何错误;2表示没有错误,但由于缺少编译命令,一些文件被跳过。ClangTool::run方法内部使用ToolInvocationTooling.cpp第573行ToolInvocation Invocation(std::move(CommandLine), Action, Files.get

2021-11-15 14:23:32 1370

原创 llvm14基本配置与使用

前言文档是假定读者有一定的linux使用基础的。比如ls命令这些的基本使用环境下载openSUSE Leap 15.3https://get.opensuse.org/leap/下载VMWareVMWare中安装openSUSE的步骤https://www.cnblogs.com/liujiaxin2018/p/14209572.html安装的时候硬盘空间大一些,make完的大小大概在85G左右,可以分配150G的硬盘swap分区感觉可以至少分配5G(太小了后续make的时候也会报错)

2021-09-20 14:27:48 1127 1

原创 代码重构实例

早上看了这样的一坨代码(一些业务信息我抹去了,不用太在意具体上面这些filter的具体行为,firstname和lastname也是替代了原始的字段)可以作为一个很好的重构实例。我其实并不知道这段代码要干什么,但是即便如此,我们也可以重构代码另外需要指出的是这段代码没有考虑到链表为空的情况,而且第一眼也完全看不懂在写什么 private static final String FILTER_OR = "firstName='%s' or lastName='%s'"; private sta

2021-09-15 13:18:36 365

原创 单例模式+策略模式-java线程池

public abstract class ThreadPoolInitPolicy { protected static volatile ThreadPoolExecutor executor; protected static final int DEFAULT_QUEUE_CAPACITY = 10000; protected static final long DEFAULT_KEEP_ALIVE_TIME = 1L; protected static final Strin

2021-09-10 15:52:43 228

原创 2021.9某度笔试题

public class Main { static void main() { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()) { String s = scanner.next(); int res = findEasy(s); System.out.println(res); } } static int findEasy(String s

2021-09-08 09:57:35 165

原创 归并排序-递归-java

public class MergeSort { void sort(List<Integer> list) { sort(list, 0, list.size() - 1); } List<Integer> sort(List<Integer> list, int l, int r) { List<Integer> res = new ArrayList<>(); if (l == r) { I

2021-09-04 22:50:51 132

原创 二维数组乘法-java

int[][] matrixMultiply(int[][] matrix1, int[][] matrix2) { if (matrix1 == null || matrix2 == null) { return null; } if (matrix1[0].length != matrix2.length) { return null; } int m = matrix1.length; int n = matrix2[0].l..

2021-08-31 21:50:38 438

原创 五子棋-java

public class Temp { private static int CHESS = 1; private static int EMPTY = 0; void test() { Scanner scanner = new Scanner(System.in); //初始化 int n = 6; int[][] chessBoard = new int[n][n]; List<I

2021-08-29 23:58:21 172

原创 2进制转16进制-java

public class BinaryToHex { public String binaryToHex(String s) { s = formatString(s); String[] splitBinaryString = splitBinaryString(s); String hexString = getHex(splitBinaryString); return hexString; } String

2021-08-28 22:40:50 268

原创 IDEA lombok版本不匹配 失效

背景:同事使用的是mac idea开发环境我使用的是windows idea开发环境Springboot项目生成后报错,观察知应该是lombok没起作用造成的原因(项目一些class文件成功生成,但是一些用到lombok的类没有成功生成构造器)在File-Setting-Complier-Shared build process VM options中加入-Djps.track.ap.dependencies=false...

2021-08-20 14:27:22 541 1

原创 高级数据库开发技术-复习

1.index索引B+能做的• 全键值• 键值范围• 键前缀查找索引目的:提高查询效率索引的另一面(问题)磁盘空间的开销处理的开销数据库系统处理的开销索引的使用是否合理,首先取决于它是否有用• 判断索引适用性的依据是检索比例(retrieval ratios)什么时候应该使用B树索引• 仅需要通过索引访问基本表的很少一部分行• 如果要处理表中的多行,可以使用索引而不使用表(要访问的字段全部包含在索引中时)索引的建立必须慎重,对每个索引的必要性都应该经过仔细分析,要有建立的依

2021-04-19 20:29:13 1237 5

原创 oj-排序和分治

插入排序private static void InsertSort(int[] nums) { for (int i = 1; i < nums.length; i++) { for (int j = i; j >= 0; j--) { if (nums[j - 1] > nums[j]) { swap(nums, j, j - 1); } } }}非递

2021-04-14 13:53:11 383

原创 oj-固定和的元素对-java

Description输入一个数组和一个数字,在数组中查找两个数,使得它们的和正好是输入的那个数字,统计这样两个数的对数。Input输入第一行为用例个数, 每个测试用例输入第一行是数组,每一个数用空格隔开;第二行是数字和。Output输出这样两个数有几对。Sample Input 111 2 4 7 11 0 9 1511Sample Output 13Codepackage org.alphacat.fifth;import java.util.Arrays;import

2021-04-12 16:40:58 396

原创 oj-管道网络-java

DescriptionEvery house in the colony has at most one pipe going into it and at most one pipe going out of it. Tanks and taps are to be installed in a manner such that every house with one outgoing pipe but no incoming pipe gets a tank installed on its roo

2021-04-12 16:39:57 276

原创 oj-时间分隔-java

DescriptionGiven arrival and departure times of all trains that reach a railway station. Your task is to find the minimum number of platforms required for the railway station so that no train waits.Note: Consider that all the trains arrive on the same da

2021-04-12 16:39:08 259

原创 oj-时间与收益-java

DescriptionGiven a set of n jobs where each job i has a deadline and profit associated to it. Each job takes 1 unit of time to complete and only one job can be scheduled at a time. We earn the profit if and only if the job is completed by its deadline. Th

2021-04-12 16:38:13 280

原创 oj-硬币最小数量-java

DescriptionGiven the list of coins of distinct denominations and total amount of money. Output the minimum number of coins required to make up that amount. Output -1 if that money cannot be made up using given coins. You may assume that there are infinite

2021-04-12 16:37:00 183

原创 oj-路上的球-java

DescriptionThere are two parallel roads, each containing N and M buckets, respectively. Each bucket may contain some balls. The buckets on both roads are kept in such a way that they are sorted according to the number of balls in them. Geek starts from th

2021-04-12 16:35:59 159

原创 oj-子数组的取值范围-java

Description给定数组arr和整数num,求arr的连续子数组中满足:其最大值减去最小值的结果大于num的个数。请实现一个时间复杂度为O(length(arr))的算法。Input输入第一行为测试用例个数。每一个用例有若干行,第一行为数组,每一个数用空格隔开,第二行为num。Output输出一个值。Sample Input 113 6 4 3 22Sample Output 16Codepackage org.alphacat.fifth;import java.uti

2021-04-12 16:35:01 218

原创 oj-数组和窗口-java

Description给定一个整型数组arr和一个大小为w的窗口,窗口从数组最左边滑动到最右边,每次向右滑动一个位置,求出每一次滑动时窗口内最大元素的和。Input输入第一行为用例个数, 每个测试用例输入的第一行为数组,每一个元素使用空格隔开;第二行为窗口大小。Output输出每个测试用例结果。Sample Input 114 3 5 4 3 3 6 73Sample Output 132Codepackage org.alphacat.fifth;import java.ut

2021-04-12 16:34:02 103

原创 oj-格子里的整数-java

DescriptionGiven a square grid of size n, each cell of which contains integer cost which represents a cost to traverse through that cell, we need to find a path from top left cell to bottom right cell by which total cost incurred is minimum.Note : It is

2021-04-12 16:32:43 168

原创 oj-订单问题-java

DescriptionRahul and Ankit are the only two waiters in Royal Restaurant. Today, the restaurant received N orders. The amount of tips may differ when handled by different waiters, if Rahul takes the ith order, he would be tipped Ai rupees and if Ankit take

2021-04-02 21:33:27 234

原创 oj-数组查询-java

DescriptionGiven an array, the task is to complete the function which finds the maximum sum subarray, where you may remove at most one element to get the maximum sum.Input第一行为测试用例个数T;后面每两行表示一个用例,第一行为用例中数组长度N,第二行为数组具体内容。Output每一行表示对应用例的结果。Sample Input

2021-04-02 21:32:20 212

原创 oj-按照要求保留数组元素使得和最大-java

DescriptionGiven an array of N numbers, we need to maximize the sum of selected numbers. At each step, you need to select a number Ai, delete one occurrence of Ai-1 (if exists) and Ai each from the array. Repeat these steps until the array gets empty. The

2021-04-02 21:30:28 175

原创 oj-如何花最少的钱购买蔬菜-java

DescriptionRahul wanted to purchase vegetables mainly brinjal, carrot and tomato. There are N different vegetable sellers in a line. Each vegetable seller sells all three vegetable items, but at different prices. Rahul, obsessed by his nature to spend opt

2021-04-02 21:29:05 213

原创 oj-是否能通过考试-java

Description小张想要通过明天的考试。他知道考题的分值分布,也知道考试中要拿到每一个题目需要耗费的时间。假设考试时长为h,共n个题目,需要拿到p分才能通过考试。现在已知每个考题的得分与耗时,请你判断小张能否通过合理安排时间,而通过考试,并给出通过考试的最短时间。Input输入第一行为测试用例个数.每一个用例有若干行,第一行为任务数量n、考试时常h、通过分数p,下面的n行是每一个题目的耗时和得分。所有数值用空格分开。Output对每一个用例输出一行,如果能够通过考试,则输出“YES”和消耗最

2021-04-02 21:27:15 264

原创 oj-无重复字符子集问题-java

DescriptionMike is a lawyer with the gift of photographic memory. He is so good with it that he can tell you all the numbers on a sheet of paper by having a look at it without any mistake. Mike is also brilliant with subsets so he thought of giving a chal

2021-04-02 21:25:46 217

原创 oj-矩阵计算-java

DescriptionLet’s define a Series Whose recurrence formula is as follows :C(n)= 3C(i-1) + 4C(i-2) + 5C(i-3) + 6C(i-4)C(0)= 2C(1)= 0C(2)= 1C(3)= 7Now based on this Series a Matrix Mi,j of size nn is to be formed.The top left cell is(1,1) and the botto

2021-04-02 21:22:21 188

原创 oj-最小化初始点-java

DescriptionGiven a grid with each cell consisting of positive, negative or no points i.e, zero points. We can move across a cell only if we have positive points ( > 0 ). Whenever we pass through a cell, points in that cell are added to our overall poin

2021-04-02 21:20:56 195

原创 oj-距离问题-java

DescriptionIn a given cartesian plane, there are N points. We need to find the Number of Pairs of points(A,B) such thatPoint A and Point B do not coincide.Manhattan Distance and the Euclidean Distance between the points should be equal.Note : Pair of 2

2021-03-13 15:54:11 301 2

空空如也

空空如也

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

TA关注的人

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