自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

小庄同学的博客

学习,记录

  • 博客(177)
  • 资源 (2)
  • 收藏
  • 关注

原创 go语言生成随机字符串

go语言生成随机字符串import ( "encoding/hex" "fmt" "math/rand" "testing" "time")func TestRand(t *testing.T) { rand.Seed(time.Now().UnixNano())//初始化种子 b := make([]byte, 6)//随机生成字符数组 rand.Read(b)//整合 rand_str := hex.EncodeToString(b)//转换为string fmt.Prin

2021-04-25 18:10:28 1519

原创 windows中设置命令行快捷键

windows中设置命令行快捷键在linux系统中,我们可以修改/etc/bashrc 文件,添加alias定义快捷命令。在windows中同样可以。一、在一个路径中创建bashrc.cmd我的路径是C:\Users\zhuangruiqing\bashrc.cmd用文本编辑改文件内容为:@echo offdoskey grep=grep --color=auto $*其中doskey是windows中替代alias的命令,$*表示后续还要接命令,实现了查找字符串时用颜色显示关键字的快捷

2021-04-08 10:59:53 907

原创 【学习笔记】Git基础笔记

Git基础版本控制!聊聊Git历史Git环境配置Git基本理论(重要)Git项目搭建GIT文件操作使用码云IDEA中集成Git说明:GIT分支该笔记由b站学习视频https://www.bilibili.com/video/BV1FE411P7B3?from=search&seid=7139947966998544052所记录作者笔记https://mp.weixin.qq.com/s/Bf7uVhGiu47uOELjmC5uXQ学习git之前,我们需要先明白一个概念版本控制!什么是版本

2021-03-03 21:40:41 402 2

原创 【学习笔记】Docker容器基础(二)

Docker容器基础(二)Docker的常用命令帮助命令镜像命令容器命令该笔记由b站学习视频https://www.bilibili.com/video/BV1og4y1q7M4所记录Docker的常用命令帮助命令docker version #显示docker的版本信息docker info #显示docker的系统信息,包括镜像和容器的数量docker 命令 --help #帮助命令帮助文档的地址:https://docs.docker.com/reference/

2021-02-21 12:08:42 381

原创 【学习笔记】Docker容器基础(一)

Docker容器Docker概述Docker为什么出现?Docker的历史Docker能干嘛该笔记由b站学习视频https://www.bilibili.com/video/BV1og4y1q7M4所记录Docker概述Docker为什么出现?一款产品:开发–上线 两套环境!应用环境,应用配置!开发 — 运维。问题:我在我的电脑上可以运行!版本更新,导致服务不可用!对于运维来说,考验就十分大?环境配置十分麻烦,每一个机器都要部署环境(集群Redis、ES、Hadoop…)!费时费力。发布一个项

2021-01-21 16:38:01 154

原创 Postman接口测试【学习笔记】

Postman接口测试Postman安装与基本操作1.安装2.第一个接口请求实战接口测试实战一、接口测试1.什么是接口测试?2.为什么做接口测试?3.如何做接口测试?4.第二个接口实例二、接口测试流程1.获取接口信息2.接口测试用例设计3.接口发包4.返回信息验证三、Postman发起接口请求四、Post接口实战断言与变量一、环境变量与全局变量二、测试沙箱实战三、返回信息断言验证Postman安装与基本操作1.安装官网下载地址:https://www.postman.com/downloads/选择

2021-01-09 14:34:24 329

原创 浅谈sort函数底层

浅谈sort函数底层sort函数的底层用到的是内省式排序以及插入排序,那么什么是内省式排序呢?和插入排序又是如何组合的呢?根据维基百科描述:内省排序(英语:Introsort)是由David Musser在1997年设计的排序算法。这个排序算法首先从快速排序开始,当递归深度超过一定深度(深度为排序元素数量的对数值)后转为堆排序。先来回顾一下以上提到的3中排序方法:快速排序:先选一个基准值(一般为首值),将比它大的数置于其右侧,将比它小的数置于它左侧,那么这个基准值所在的位置定是整个数组的有序位。然

2021-01-02 13:38:57 2911

原创 c++开发面试个人整理

c++开发面试个人整理c++语言基础1.指针和引用的区别,什么时候要用引用?2.什么是虚函数?什么是纯虚函数?作用是什么?3.什么情况下析构函数为虚函数?为什么?4.什么是多态?静态多态和动态多态的区别是什么?5.c++的特性是什么?6.什么是深拷贝和浅拷贝?7.class和struct有什么区别?8.什么是空指针?什么是野指针?9.什么是函数模板?10.c++中的内存分配是什么样的11.STL中的resize和reserve的区别12.解释一下extern关键字13.解释一下static关键字14.什么是

2020-12-26 22:13:04 509

原创 linux中的vim命令总结

linux中的vim命令总结Vim常用操作插入命令(a,i,o)定位命令删除命令复制和剪切命令替换和取消命令搜索和搜索替换命令保存和退出命令Vim使用技巧Vim常用操作插入命令(a,i,o)a----在光标所在字符后插入A----在光标所在行行尾插入i----在光标所在字符前插入I----在光标所在行行首插入o----在光标下插入新行O----在光标上插入新行定位命令:set nu----设置行号:set nonu----取消行号gg----到第一行G----到最后一行:n---

2020-12-23 13:09:42 112

原创 【C++】OpenCV借助帮助文档一步一步傻瓜式学习(图片视频显示)

OpenCV借助帮助文档一步一步傻瓜式学习(图片视频显示)多图!环境介绍图片显示图像的读取图像的输出视屏显示视频读取视频输出环境介绍OpenCV用的是最新的4.5.0版本,所有程序都是在linux系统下运行(这不重要,只是环境路径不一样罢了),因为qt拥有强大的跨平台功能,所以采用qmake进行的编译,和cmake的区别就是makelists和.pro文件的格式不同而已。opencv和qt的下载和配置这里不多说了,网上有很多。图片显示想要打开一张图片应该用什么函数呢,然后又要包含什么头文件和动态链接

2020-12-16 16:49:32 328

原创 【学习笔记】linux基本命令(同步学习更新)

命令格式:命令 [-选项] [参数]例:ls -la /etc目录处理命令ls 显示文件-a(显示所有文件,其中会包括隐藏文件)-l(长格式显示文件,有7个组成部分,包括文件类型、所有者、所属组、文件大小、文件最后修改时间、文件名等)-h(人性化长格式显示文件,-lh文件大小会显示单位)-d(显示文件所述目录)-i (显示文件的i编号,有点像地址号但不一样)mkdir 创建新目录-p(递归创建,若创建的目录的上级目录不存在,上级目录会一并创建)cd 切换目录… (回到上一级目录)

2020-12-08 09:21:20 196

原创 CentOS 7安装、分区、网络(VMware虚拟机下)

CentOS 7安装、分区(VMware虚拟机下)简要安装过程简要CentOS是Linux系统的一种版本其内核都是一样的,这里只是一种选择。有的面试官会问,对比微软的windows系统为什么选择linux系统?两者有啥区别?windows中很多游戏可以安装运行,但在linux中不一定可以。但是对于服务器端来讲开源软件不管是数量上来讲还是质量上来讲都远远优于windows平台(如阿帕奇,python,php,mysql)其次linux系统是开源的,开源有啥好,一免费,二可以获得源代码,三可以自由传

2020-12-07 14:15:29 751

原创 【PAT甲级2020年春季考试】7-4 Replacement Selection (30分)(c++)

7-4 Replacement Selection (30分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBWhen the input is much too large to fit into memory, we have to do external sorting instead of internal sorting. One of the key steps in external sorting is to generat

2020-12-03 21:58:05 1476

原创 【PAT甲级2020年春季考试】7-3 Safari Park (25分)(c++)

7-3 Safari Park (25分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBA safari park(野生动物园)has K species of animals, and is divided into N regions. The managers hope to spread the animals to all the regions, but not the same animals in the two neig

2020-12-03 21:25:05 228

原创 【PAT甲级2020年春季考试】7-2 The Judger (25分)(c++)

7-2 The Judger (25分)A game of numbers has the following rules: at the beginning, two distinct positive integers are given by the judge. Then each player in turn must give a number to the judge. The number must be the difference of two numbers that are pre

2020-12-03 21:17:57 223

原创 【PAT甲级2020年春季考试】7-1 Prime Day (20分)(c++)

7-1 Prime Day (20分)The above picture is from Sina Weibo, showing May 23rd, 2019 as a very cool “Prime Day”. That is, not only that the corresponding number of the date 20190523 is a prime, but all its sub-strings ended at the last digit 3 are prime numbe

2020-12-03 21:02:20 137

原创 【PAT甲级A1155】Heap Paths (30分)(c++)

1155 Heap Paths (30分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBIn computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either grea

2020-12-03 20:57:14 95

原创 【PAT甲级A1154】Vertex Coloring (25分)(c++)

1154 Vertex Coloring (25分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBA proper vertex coloring is a labeling of the graph’s vertices with colors such that no two vertices sharing the same edge have the same color. A coloring using at most k c

2020-12-03 20:49:47 100

原创 【PAT甲级A1153】Decode Registration Card of PAT (25分)(c++)

1153 Decode Registration Card of PAT (25分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBA registration card number of PAT consists of 4 parts:the 1st letter represents the test level, namely, T for the top level, A for advance and B for basic;

2020-12-03 20:42:53 361

原创 【PAT甲级A1152】Google Recruitment (20分)(c++)

1152 Google Recruitment (20分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBIn July 2004, Google posted on a giant billboard along Highway 101 in Silicon Valley (shown in the picture below) for recruitment. The content is super-simple, a URL con

2020-12-03 20:05:50 464

原创 【PAT甲级A1151】LCA in a Binary Tree (30分)(c++)

1151 LCA in a Binary Tree (30分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBThe lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants.Given any two nodes in a binary tree, you are

2020-12-03 20:01:16 52

原创 【PAT甲级A1150】Travelling Salesman Problem (25分)(c++)

1150 Travelling Salesman Problem (25分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBThe “travelling salesman problem” asks the following question: “Given a list of cities and the distances between each pair of cities, what is the shortest possi

2020-12-03 19:48:35 158

原创 【PAT甲级A1149】Dangerous Goods Packaging (25分)(c++)

1149 Dangerous Goods Packaging (25分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBWhen shipping goods with containers, we have to be careful not to pack some incompatible goods into the same container, or we might get ourselves in serious troub

2020-12-03 10:08:47 118

原创 【PAT甲级A1148】Werewolf - Simple Version (20分)(c++)

1148 Werewolf - Simple Version (20分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBWerewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game,player #1 said: “Playe

2020-12-03 09:49:55 175

原创 【PAT甲级A1147】Heaps (30分)(c++)

1147 Heaps (30分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBIn computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either greater t

2020-12-03 09:35:50 143

原创 【PAT甲级A1146】Topological Order (25分)(c++)

1146 Topological Order (25分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBThis is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topological order obtained from the given directed graph? Now you are suppo

2020-12-03 09:27:27 106

原创 【PAT甲级A1145】Hashing - Average Search Time (25分)(c++)

1145 Hashing - Average Search Time (25分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBThe task of this problem is simple: insert a sequence of distinct positive integers into a hash table first. Then try to find another sequence of integer keys

2020-12-03 09:11:21 114

原创 【PAT甲级A1144】The Missing Number (20分)(c++)

1144 The Missing Number (20分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:200 ms内存限制:64 MBGiven N integers, you are supposed to find the smallest positive integer that is NOT in the given list.Input Specification:Each input file contains one test case. For

2020-12-03 08:41:38 133

原创 【PAT甲级A1143】 Lowest Common Ancestor (30分)(c++)

1143 Lowest Common Ancestor (30分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBThe lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants.A binary search tree (BST) is recursively d

2020-12-03 08:35:14 103

原创 【PAT甲级A1142】 Maximal Clique (25分)(c++)

1142 Maximal Clique (25分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBA clique is a subset of vertices of an undirected graph such that every two distinct vertices in the clique are adjacent. A maximal clique is a clique that cannot be extende

2020-12-02 09:25:29 72

原创 【PAT甲级A1141】 PAT Ranking of Institutions (25分)(c++)

1141 PAT Ranking of Institutions (25分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBAfter each PAT, the PAT Center will announce the ranking of institutions based on their students’ performances. Now you are asked to generate the ranklist.Inpu

2020-12-02 09:16:37 76

原创 【PAT甲级A1140】 Look-and-say Sequence (20分)(c++)

1140 Look-and-say Sequence (20分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBLook-and-say sequence is a sequence of integers as the following:D, D1, D111, D113, D11231, D112213111, ...where D is in [0, 9] except 1. The (n+1)st number is a k

2020-12-02 08:53:47 71

原创 【PAT甲级A1138】 Postorder Traversal (25分)(c++)

1138 Postorder Traversal (25分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBSuppose that all the keys in a binary tree are distinct positive integers. Given the preorder and inorder traversal sequences, you are supposed to output the first numb

2020-12-01 23:35:06 80

原创 【PAT甲级A1137】 Final Grading (25分)(c++)

1137 Final Grading (25分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBFor a student taking the online course “Data Structures” on China University MOOC (http://www.icourse163.org/), to be qualified for a certificate, he/she must first obtain no

2020-12-01 23:26:36 118

原创 【PAT甲级A1136】 A Delayed Palindrome (20分)(c++)

1136 A Delayed Palindrome (20分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBConsider a positive integer N written in standard notation with k+1 digits a​i​​ as a​k​​ ⋯a​1​​ a​0​​ with 0≤a​i​​ <10 for all i and a​k​​ >0. Then N is palin

2020-12-01 17:33:15 79

原创 【PAT甲级A1133】 Splitting A Linked List (25分)(c++)

1133 Splitting A Linked List (25分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBGiven a singly linked list, you are supposed to rearrange its elements so that all the negative values appear before all of the non-negatives, and all the values in

2020-12-01 12:10:19 101

原创 【PAT甲级A1132】 Cut Integer (20分)(c++)

1132 Cut Integer (20分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBCutting an integer means to cut a K digits lone integer Z into two integers of (K/2) digits long integers A and B. For example, after cutting Z = 167334, we have A = 167 and B

2020-12-01 11:01:09 76

原创 【学习笔记c++】数据结构算法模板代码整理

数据结构算法类模板代码1.平衡二叉树碰到以下代码题,要闭着眼睛也会写下来:1.平衡二叉树参考代码:#include <cstdio>#include <iostream>using namespace std;struct node{ int data,height; node *left,*right;};node* newnode(int v){ node* Node=new node; Node->data=v;

2020-11-29 21:53:57 867 1

原创 【PAT甲级A1130】 Infix Expression (25分)(c++)

1130 Infix Expression (25分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBGiven a syntax tree (binary), you are supposed to output the corresponding infix expression, with parentheses reflecting the precedences of the operators.Input Specificat

2020-11-29 15:02:03 98

原创 【PAT甲级A1129】 Recommendation System (25分)(c++)

1129 Recommendation System (25分)作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBRecommendation system predicts the preference that a user would give to an item. Now you are asked to program a very simple recommendation system that rates the user’

2020-11-29 13:54:53 135

windows下Opencv4.3.0由MinGW环境Cmake版本WinGW64_build.zip

windows下下载的Opencv只有vs编译的build,为了使vs以外的软件如CLion等添加opencv环境,用Cmake自行编译了了MinGW环境下的build。Opencv版本为4.3.0,编译过程见博客https://editor.csdn.net/md/?articleId=108871312

2020-09-29

Opencv4.3.0 opencv_ffmpeg下载

用cmake编译opencv4.3.0时,由于\opencv\sources\3rdparty\ffmpeg目录下无法自动下载opencv_videoio_ffmpeg.dll和opencv_videoio_ffmpeg_64.dll,解压文件后可直接复制进上述目录

2020-09-29

空空如也

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

TA关注的人

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