自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 资源 (1)
  • 收藏
  • 关注

原创 c++ STL 007 容器(list)

list模版原型:template < class T, class Alloc = allocator > class list;Lists are sequence containers that allow constant time insert and erase operations anywhere within the sequence, and iteration in both directions.List containers are implemented as

2020-07-14 19:31:49 118

原创 c++ STL 006 容器(vector)

类模板原型class templatestd::vectortemplate < class T, class Alloc = allocator > class vector;说明vector 可以看成是一个动态数组,这个数组是可以动态扩容或者缩减的。Internally, vectors use a dynamically allocated array to store their elements. This array may need to be reallocate

2020-07-10 15:00:00 298

原创 c++ STL 005 分配器/泛型编程/模版基础

分配器 allocator用于给stl容器进行数据空间的分配,每一个容器都有默认的分配器,以保证容器能够取得指定的内存。容器在构造时,会将默认的分配器作为默认参数对容器进行构造。*operator new 和malloc*operator new c++范围,可以重载,使用::operator delete进行释放。malloc c函数,不可重载,使用free进行释放内存。不同的编译器设计的分配器可能会有不同,一般使用的是以上的其中一种。所有容器,默认第二个参数为allocator分配器

2020-07-09 20:34:59 108

原创 Windows端口关闭

查看端口命令netstat-a #显示所有活动的TCP连接以及计算机监听的TCP和UDP端口。netstat-e #显示以太网发送和接收的字节数、数据包数等。netstat-n #以数字形式显示所有活动的TCP连接的地址和端口号。netstat-o #显示活动的TCP连接并包括每个连接的进程ID(PID)。netstat-s #按协议显示各种连接的统计信息,包括端口号。netstat-an #查看所有开放的端口。查看指定端口的占用情况:netstat -aon|findstr "

2020-07-08 16:05:59 212 1

原创 c++ STL 004 容器(array)

array是一个模板类:函数原型: template < class T, size_t N > class array;Array classArrays are fixed-size sequence containers: they hold a specific number of elements ordered in a strict linear sequence.成员函数返回Iterators 对象数据, 返回的是一个常量/非常量引用对象容量,大小,是否为

2020-07-08 15:35:29 448

原创 c++ STL 003 容器分类测试

容器分类arrayvectorqequelistforward-listset/multisetmap/multimapunordered set/multisetunordered map/multimaphashtable容器测试(测试创建时间和排序时间)#include <iostream>#include <array>#include <ctime>#include <cstdlib> //qsort .qsea

2020-07-07 22:20:04 126

原创 c++ STL 002 迭代器

ss

2020-07-07 11:29:17 342

原创 c++ STL 001 基本概念

学习网站www.cplusplus.comen.cppreference.com/w/gcc.gnu.orgSTLSTL(Standard Template Library),即标准模板库,是一个具有工业强度的,高效的C++程序库容器: Containers 需要操作的数据对象分配器 : Allocators 使用分配器对容器需要的内存空间进行分配算法: Algorithms 被独立出来的模板函数,用来操作容器。迭代器: Iterators是一种泛化的指

2020-07-06 20:23:33 296

原创 c 指针(指针和函数)

程序栈支持函数执行的内存区域,通常和堆共存。即二者共同拥有一块内存区域,栈位于内存区域的下部,堆位于内存区域的上部。函数传值用指针传递数据: 一般用于对传入的数据进行修改void funcA(int* num1,int* num2){ int temp; temp = *num1; *num1 = *num2; *num2 = temp;}int main(){ int n1 = 10; int n2 = 20; funcA(&n1,&n2); //交换n1和

2020-07-04 16:37:29 111

原创 Centos7.6安装SVN服务

使用yum 进行安装[root@iZ ~]# yum -y install subversionLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfilebase | 3.6

2020-07-03 09:39:09 201

原创 c指针2(动态内存管理)

动态内存分配的基本步骤使用malloc 类的函数分配内存使用分配的内存进行数据操作使用free函数来释放内存 malloc 和free函数必须是成对出现的 建议在free之后将指针赋值为NULL int* p = (int*)malloc(sizeof(int)); *p = 5; cout << *p << endl; free(p);内存泄漏不再使用的已分配的内存没有将其释放称为内存泄漏内存泄漏: 1. 丢失了

2020-07-02 21:25:17 75

原创 vue 部署在nginx中,跨域api接口404

server {listen 8899 default_server;#listen [::]8899 default_server;server_name _;root /usr/share/nginx/mall;include /etc/nginx/default.d/*.conf;#静态资源location /{#alias /usr/share/nginx/mall;index index.html index.htm; }

2020-07-02 09:10:03 1242

原创 c 指针1(基本概念)

指针的声明:数据类型* 指针变量名e.g: int* p;星号两边的空格无关紧要,并不影响指针的声明:int* p;int * p;int *p;这几者都是一样的,等价的注意:指向还没有初始化内存的指针可能会产生问题。如果将这种未初始化的指针进行解引,指针的内容会是一些不合法的数据,造成程序的异常。地址操作符 &地址操作符& 返回操作数的内存地址。这个内存地址可以用来初始化指针。例如: int num = 10; int* p = &am

2020-07-01 21:31:53 142

原创 fastapi 基本部署使用

基本包:在centos7.6 下,安装了python3.8 版本,同时与python2 共存,因此安装fastapi的时候,应该使用pip3 进行安装安装的模块: pip3 install fastapi pip3 install uvicron pip3 install gunicorn #管理uvicron应用基本main.py 文件[root@iZh pytest]# cat main.py from fastapi import FastAPIimport uvic

2020-07-01 16:45:36 6047

原创 centos7.6安装python3

查看系统默认python执行路径[root@iZhp ~]# which python/usr/bin/python查看配置和连接等进入执行路径 cd /usr/bin/[root@iZhp bin]# ll python*lrwxrwxrwx 1 root root 7 Jul 11 2019 python -> python2lrwxrwxrwx 1 root root 9 Jul 11 2019 python2 -> python2.7-rwxr-xr-

2020-07-01 16:00:47 296

sentinel-dashboard.jar

sentinel-dashboard.jar

2021-11-18

空空如也

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

TA关注的人

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