当前位置: 首页 > article >正文

【C++初学】课后作业汇总复习(七) 指针-深浅copy

1、 HugeInt类:构造、+、cout

Description:
32位整数的计算机可以表示整数的范围近似为-20亿到+20亿。在这个范围内操作一般不会出现问题,但是有的应用程序可能需要使用超出上述范围的整数。C++可以满足这个需求,创建功能强大的新的数据类型。

定义一个HugeInt类,使用一个数组存储大整数的每一位。如 short integer[ 40 ]; 即可实现存储位数为40位的整数。暂不考虑负数。请根据主函数为该类:

1)定义两个构造,分别接受int和string类型的参数;当参数为string类型时,可以使用字符串处理函数将string类型转换为数值类型。

2)重载+运算,分别能够实现两个HugeInt对象相加,HugeInt与int相加,HugeInt与string相加。提示,先实现两个HugeInt相加,当HugeInt与int相加时,可以将int通过转换构造函数转换为HugeInt类型,然后调用两个HugeInt相加。HugeInt与string相加亦如此。

3)重载<<运算符。

注意:程序前缀、后缀代码已给出。

Sample Input:

Sample Output:
在这里插入图片描述

//StudybarCommentBegin
#include <iostream>
#include <cctype> // isdigit function prototype
#include <cstring> // strlen function prototype
using namespace std;class HugeInt
{friend ostream &operator<<( ostream &, const HugeInt & );
public:static const int digits = 30;HugeInt( long = 0 ); // conversion/default constructorHugeInt( const char * ); // conversion constructor// addition operator; HugeInt + HugeIntHugeInt operator+( const HugeInt & ) const;// addition operator; HugeInt + intHugeInt operator+( int ) const;// addition operator;// HugeInt + string that represents large integer valueHugeInt operator+( const char * ) const;int getLength() const;
private:short integer[ digits ];
}; // end class HugeInt//StudybarCommentEnd// Implementation of HugeInt class
HugeInt::HugeInt(long value) {// Initialize all digits to 0for (int i = 0; i < digits; i++) {integer[i] = 0;}// Store digits in reverse orderfor (int i = digits - 1; value != 0 && i >= 0; i--) {integer[i] = value % 10;value /= 10;}
}HugeInt::HugeInt(const char *str) {// Initialize all digits to 0for (int i = 0; i < digits; i++) {integer[i] = 0;}int len = strlen(str);int j = digits - 1;// Store digits in reverse orderfor (int i = len - 1; i >= 0 && j >= 0; i--) {if (isdigit(str[i])) {integer[j--] = str[i] - '0';}}
}HugeInt HugeInt::operator+(const HugeInt &op2) const {HugeInt temp;int carry = 0;for (int i = digits - 1; i >= 0; i--) {temp.integer[i] = integer[i] + op2.integer[i] + carry;if (temp.integer[i] > 9) {temp.integer[i] %= 10;carry = 1;} else {carry = 0;}}return temp;
}HugeInt HugeInt::operator+(int op2) const {return *this + HugeInt(op2);
}HugeInt HugeInt::operator+(const char *op2) const {return *this + HugeInt(op2);
}int HugeInt::getLength() const {int i;for (i = 0; (i < digits) && (integer[i] == 0); i++); // skip leading zerosreturn (i == digits) ? 1 : (digits - i);
}ostream &operator<<(ostream &output, const HugeInt &num) {int i;for (i = 0; (i < HugeInt::digits) && (num.integer[i] == 0); i++); // skip leading zerosif (i == HugeInt::digits) {output << 0;} else {for (; i < HugeInt::digits; i++) {output << num.integer[i];}}return output;
}//StudybarCommentBegin
int main()
{HugeInt n1( 7654321 );HugeInt n2( 7891234 );HugeInt n3( "99999999999999999999999999999" );HugeInt n4( "1" );HugeInt result;cout << "n1 is " << n1 << "\nn2 is " << n2<< "\nn3 is " << n3 << "\nn4 is " << n4<< "\nresult is " << result << "\n\n";result = n1 + n2;cout << n1 << " + " << n2 << " = " << result << "\n\n";cout << n3 << " + " << n4 << "\n= " << ( n3 + n4 ) << "\n\n";result = n1 + 9;cout << n1 << " + " << 9 << " = " << result << endl;result = n2 + "10000";cout << n2 << " + " << "10000" << " = " << result << endl;return 0;
} // end main//StudybarCommentEnd

2、对象指针定义形式——代码纠正

对象指针定义形式

类名 *对象指针名;

例:

Point a(5,10);

Piont *ptr;

ptr=&a;

通过指针访问对象成员

对象指针名->成员名

例:ptr->getx() 相当于 (*ptr).getx();

例6-12使用指针来访问Point类的成员

//6_12.cpp

#include

using namespace std;

class Point {

public:

Point(int x = 0, int y = 0) : x(x), y(y) { }

int getX() const { return this->x; }

int getY() const { return y; }

private:

int x, y;

};

int main() {

Point a(4, 5);

Point p1 = &a; //定义对象指针,用a的地址初始化

cout << p1.getX() << endl;//用指针访问对象成员

cout << a->getY() << endl; //用对象名访问对象成员

return 0;

}

本题输出结果

4
5

#include <iostream>
using namespace std;class Point {
public:Point(int x = 0, int y = 0) : x(x), y(y) { }int getX() const { return this->x; }int getY() const { return y; }
private:int x, y;
};int main() {Point a(4, 5);Point *p1 = &a; // 定义对象指针,用a的地址初始化cout << p1->getX() << endl; // 用指针访问对象成员cout << a.getY() << endl; // 用对象名访问对象成员return 0;
}

3、动态创建对象举例

动态内存分配

动态申请内存操作符 new

new 类型名T(初始化参数列表)

功能:在程序执行期间,申请用于存放T类型对象的内存空间,并依初值列表赋以初值。

结果值:成功:T类型的指针,指向新分配的内存;失败:抛出异常。

释放内存操作符delete

delete 指针p

功能:释放指针p所指向的内存。p必须是new操作的返回值。

本题给出了前缀,本题程序,应该和下列代码等价!

例6-16 动态创建对象举例

#include

using namespace std;

class Point {

public:

Point() : x(0), y(0) {

cout<<“Default Constructor called.”<<endl;

}

Point(int x, int y) : x(x), y(y) {

cout<< “Constructor called.”<<endl;

}

~Point() { cout<<“Destructor called.”<<endl; }

int getX() const { return x; }

int getY() const { return y; }

void move(int newX, int newY) {

x = newX;

y = newY;

}

private:

int x, y;

};

int main() {
cout << "Step one: " << endl;
Point *ptr1 = new Point; //调用默认构造函数
cout<getX()<<endl; //输出GetX
delete ptr1; //删除对象,自动调用析构函数
cout << "Step two: " << endl;
ptr1 = new Point(1,2);
cout<getX()<<endl; //输出GetX
delete ptr1;
return 0;
}

//StudybarCommentBegin
#include <iostream>
using namespace std;
class Point {
public:Point();Point(int x, int y);~Point();int getX() const; int getY() const; void move(int newX, int newY);
private:int x, y;
};
//StudybarCommentEndPoint::Point() : x(0), y(0) {cout << "Default Constructor called." << endl;
}Point::Point(int x, int y) : x(x), y(y) {cout << "Constructor called." << endl;
}Point::~Point() {cout << "Destructor called." << endl;
}int Point::getX() const {return x;
}int Point::getY() const {return y;
}void Point::move(int newX, int newY) {x = newX;y = newY;
}int main() {cout << "Step one: " << endl;Point *ptr1 = new Point; //调用默认构造函数cout << ptr1->getX() << endl; //输出GetXdelete ptr1; //删除对象,自动调用析构函数cout << "Step two: " << endl;ptr1 = new Point(1,2);cout << ptr1->getX() << endl; //输出GetXdelete ptr1;return 0;
}

4、 动态创建对象数组举例

例6-17 动态创建对象数组举例

分配和释放动态数组

分配:new 类型名T [ 数组长度 ]

数组长度可以是任何表达式,在运行时计算

释放:delete[] 数组名p

释放指针p所指向的数组。
p必须是用new分配得到的数组首地址。

例6-17 动态创建对象数组举例

#include<iostream>using namespace std;#include <iostream>using namespace std;class Point {public:Point() : x(0), y(0) {cout<<"Default Constructor called."<<endl;}Point(int x, int y) : x(x), y(y) {cout<< "Constructor called."<<endl;}~Point() { cout<<"Destructor called."<<endl; }int getX() const { return x; }int getY() const { return y; }void move(int newX, int newY) {x = newX;y = newY;}private:int x, y;};int main() {
Point *ptr = new Point[2]; //创建对象数组
ptr[0].move(5, 10); //通过指针访问数组元素的成员
cout<<ptr[0].getY()<<endl;
ptr[1].move(15, 20); //通过指针访问数组元素的成员
cout<<ptr[1].getY()<<endl;   
cout << "Deleting..." << endl;
delete[] ptr; //删除整个对象数组
return 0;
}

5、浅层复制与深层复制

浅层复制

实现对象间数据元素的一一对应复制。

深层复制

当被复制的对象数据成员是指针类型时,不是复制该指针成员本身,而是将指针所指对象进行复制

例6-21 对象的浅层复制

#include

#include

using namespace std;

class Point {

//类的声明同例6-16

//……

};

class ArrayOfPoints {

//类的声明同例6-18

//……

};

int main() {

int count;

cout << "Please enter the count of points: ";

cin >> count;

ArrayOfPoints pointsArray1(count); //创建对象数组

pointsArray1.element(0).move(5,10);

pointsArray1.element(1).move(15,20);

ArrayOfPoints pointsArray2(pointsArray1); //创建副本

cout << “Copy of pointsArray1:” << endl;

cout << "Point_0 of array2: " << pointsArray2.element(0).getX() << ", "

<< pointsArray2.element(0).getY() << endl;

cout << "Point_1 of array2: " << pointsArray2.element(1).getX() << ", "

<< pointsArray2.element(1).getY() << endl;

pointsArray1.element(0).move(25, 30);

pointsArray1.element(1).move(35, 40);

cout<<“After the moving of pointsArray1:”<<endl;

cout << "Point_0 of array2: " << pointsArray2.element(0).getX() << ", "

<< pointsArray2.element(0).getY() << endl;

cout << "Point_1 of array2: " << pointsArray2.element(1).getX() << ", "

<< pointsArray2.element(1).getY() << endl;

return 0;

}

运行结果如下:

Please enter the number of points:2

Default Constructor called.

Default Constructor called.

Copy of pointsArray1:

Point_0 of array2: 5, 10

Point_1 of array2: 15, 20

After the moving of pointsArray1:

Point_0 of array2: 25, 30

Point_1 of array2: 35, 40

Deleting…

Destructor called.

Destructor called.

Deleting…

接下来程序出现运行错误。

在这里插入图片描述
例6-22 对象的深层复制

#include

#include

using namespace std;

class Point { //类的声明同例6-16

};

class ArrayOfPoints {

public:

ArrayOfPoints(const ArrayOfPoints& pointsArray);

//其他成员同例6-18

};

ArrayOfPoints::ArrayOfPoints(const ArrayOfPoints& v) {

size = v.size;

points = new Point[size];

for (int i = 0; i < size; i++)

points[i] = v.points[i];

}

int main() {

//同例6-20

}

程序的运行结果如下:

Please enter the number of points:2

Default Constructor called.

Default Constructor called.

Default Constructor called.

Default Constructor called.

Copy of pointsArray1:

Point_0 of array2: 5, 10

Point_1 of array2: 15, 20

After the moving of pointsArray1:

Point_0 of array2: 5, 10

Point_1 of array2: 15, 20

Deleting…

Destructor called.

Destructor called.

Deleting…

Destructor called.

Destructor called.

在这里插入图片描述

#include <iostream>
#include <cassert>
using namespace std;class Point {
public:Point() : x(0), y(0) {cout << "Default Constructor called." << endl;}~Point() {cout << "Destructor called." << endl;}void move(int newX, int newY) { x = newX; y = newY; }int getX() const { return x; }int getY() const { return y; }
private:int x, y;
};class ArrayOfPoints {
public:ArrayOfPoints(int size) : size(size) {points = new Point[size];}// 复制构造函数(深层复制)ArrayOfPoints(const ArrayOfPoints& v) {size = v.size;points = new Point[size];for (int i = 0; i < size; i++)points[i] = v.points[i];}~ArrayOfPoints() {cout << "Deleting..." << endl;delete[] points;}Point& element(int index) {assert(index >= 0 && index < size);return points[index];}private:Point* points;int size;
};int main() {int count;cout << "Please enter the number of points:" << endl;cin >> count;ArrayOfPoints pointsArray1(count); //创建对象数组pointsArray1.element(0).move(5, 10);pointsArray1.element(1).move(15, 20);ArrayOfPoints pointsArray2(pointsArray1); //创建副本(深层复制)cout << "Copy of pointsArray1:" << endl;cout << "Point_0 of array2: " << pointsArray2.element(0).getX() << ", " << pointsArray2.element(0).getY() << endl;cout << "Point_1 of array2: " << pointsArray2.element(1).getX() << ", " << pointsArray2.element(1).getY() << endl;pointsArray1.element(0).move(25, 30);pointsArray1.element(1).move(35, 40);cout << "After the moving of pointsArray1:" << endl;cout << "Point_0 of array2: " << pointsArray2.element(0).getX() << ", " << pointsArray2.element(0).getY() << endl;cout << "Point_1 of array2: " << pointsArray2.element(1).getX() << ", " << pointsArray2.element(1).getY() << endl;return 0;
}

6、动态数组——基本模板类

本题目有后缀

题目描述:

动态数组,是相对于静态数组而言。静态数组的长度是编程时程序员预先定义好的,在整个程序运行中,数组大小无法改变。

而动态数组则不然,它可以随程序运行的需要而在运行时重新指定大小。

动态数组的内存空间是从堆(heap)上分配(即动态分配)的。是通过执行new(或malloc等函数)操作,而为其分配存储空间。当程序执行到这些语句时,才为其分配。

对于动态数组类所申请的内存,在使用完必须由程序员自己释放,否则严重会引起内存泄露。

所以内存的申请一定要有借有还,才能再借不难,也要注意,不能多还。

已知动态数组模板类的定义如下。

请补充完整

1、构造函数

2、析构函数

3、返回空间大小的 capacity() 函数

4、operator[] 重载

template
class DynamicArray {
private:
T* array; //pointer ,一个T类型的指针
unsigned int mallocSize; //分配空间的大小。

public:
//Constructors
// cout<<endl<< “new T[”<mallocSize<<“] malloc “<< this->mallocSize << “*”<<sizeof(T)<<”=”<mallocSize *sizeof(T)<<" bytes memory in heap";
DynamicArray(unsigned length, const T &content) ; // mallocSize=length; 设置每个元素的初始内容是 content;

// Destructors
// cout<<endl<< “delete[] array free “<< this->mallocSize << “*”<<sizeof(T)<<”=”<mallocSize *sizeof(T)<<" bytes memory in heap";
~DynamicArray();

//return the this->mallocSize
unsigned int capacity() const;

// for the array[i]=someT.
T& operator[](unsigned int i) ;
};

输入一个整数

输出请分析参见下面的用例和程序后缀。

样例输入:

3

样例输出

new T[3] malloc 34=12 bytes memory in heap
new T[3] malloc 3
8=24 bytes memory in heap
capacity:3
-1 -1 -1
-2.1 -2.1 -2.1
0 1 2
0 1.1 2.2
delete[] array free 38=24 bytes memory in heap
delete[] array free 3
4=12 bytes memory in heap

#include <iostream>
using namespace std;template <typename T>
class DynamicArray {
private:T* array; //pointer  ,一个T类型的指针unsigned int mallocSize; //分配空间的大小。public://Constructors // cout<<endl<< "new T["<<this->mallocSize<<"] malloc "<< this->mallocSize << "*"<<sizeof(T)<<"="<<this->mallocSize *sizeof(T)<<" bytes memory in heap";DynamicArray(unsigned length, const T &content) {mallocSize = length;array = new T[length];for (unsigned int i = 0; i < length; ++i) {array[i] = content;}cout << "new T[" << mallocSize << "] malloc " << mallocSize << "*" << sizeof(T) << "=" << mallocSize * sizeof(T) << " bytes memory in heap\n";}// Destructors// cout<<endl<< "delete[] array free "<< this->mallocSize << "*"<<sizeof(T)<<"="<<this->mallocSize *sizeof(T)<<" bytes memory in heap";~DynamicArray() {cout << endl << "delete[] array free " << mallocSize << "*" << sizeof(T) << "=" << mallocSize * sizeof(T) << " bytes memory in heap";delete[] array;}//return the this->mallocSizeunsigned int capacity() const {return mallocSize;}// for the array[i]=someT.T& operator[](unsigned int i) {return array[i];}
};

相关文章:

【C++初学】课后作业汇总复习(七) 指针-深浅copy

1、 HugeInt类:构造、、cout Description: 32位整数的计算机可以表示整数的范围近似为&#xff0d;20亿到&#xff0b;20亿。在这个范围内操作一般不会出现问题&#xff0c;但是有的应用程序可能需要使用超出上述范围的整数。C可以满足这个需求&#xff0c;创建功能强大的新的…...

探索加密期权波动率交易的系统化实践——动态对冲工具使用

Trading Volatility – What Are My Options? 在本文中&#xff0c;我们将介绍一些如何交易资产波动性&#xff08;而非资产价格&#xff09;的示例。为了帮助理解&#xff0c;我们将使用 Deribit 上提供的几种不同产品&#xff0c;包括但不限于期权。我们将尽可能消除对标的价…...

方案精读:51页 财政数据信息资源目录数据标准存储及大数据资产化规划方案【附全文阅读】

该方案聚焦财政数据信息资源管理,适用于财政部门工作人员、数据管理与分析人员以及关注财政大数据应用的相关人士。 方案旨在构建财政数据资源目录,推动大数据在财政领域的应用与落地。整体规划上,以 “金财工程” 应用支撑平台为基础,建立省、市、县三级目录体系,遵循相关…...

开源实时语音交互大模型Ultravox-cn

一款为实时语音交互设计的快速多模态LLM 概述 Ultravox是一种新型的多模态LLM&#xff0c;能够理解文本和人类语音&#xff0c;无需单独的自动语音识别&#xff08;ASR&#xff09;阶段。基于AudioLM、SeamlessM4T、Gazelle、SpeechGPT等研究&#xff0c;Ultravox能够将任何…...

基于web的民宿信息系统(源码+lw+部署文档+讲解),源码可白嫖!

摘要 随着信息时代的来临&#xff0c;民宿过去的民宿信息方式的缺点逐渐暴露&#xff0c;对过去的民宿信息的缺点进行分析&#xff0c;采取计算机方式构建民宿信息系统。本文通过阅读相关文献&#xff0c;研究国内外相关技术&#xff0c;提出了一种民宿信息管理、民宿信息管理…...

04-微服务 面试题-mk

文章目录 1.Spring Cloud 常见的组件有哪些?2.服务注册和发现是什么意思?(Spring Cloud 如何实现服务注册发现)3.Nacos配置中心热加载实现原理及关键技术4.OpenFeign在微服务中的远程服务调用工作流程5.你们项目负载均衡如何实现的 ?6.什么是服务雪崩,怎么解决这个问题?…...

【Linux篇】深入理解文件系统:从基础概念到 ext2 文件系统的应用与解析

文件系统的魔法&#xff1a;让计算机理解并存储你的数据 一. 文件系统1.1 块1.2 分区1.3 inode(索引节点) 二. ext2文件系统2.1 认识文件系统2.2 Block Group (块组)2.2.1 Block Group 的基本概念2.2.2 Block Group 的作用 2.3 块组内部结构2.3.1 超级块&#xff08;Super Bloc…...

C++STL——容器-list(含模拟实现,即底层原理)(含迭代器失效问题)(所有你不理解的问题,这里都有解答,最详细)

目录 1.迭代器的分类 2.list的使用 2.1 list的构造 2.2 list iterator 2.3 list capacity 2.4 list element access ​编辑 2.5 list modifiers ​编辑2.5.1 list插入和删除 2.5.2 insert /erase 2.5.3 resize/swap/clear ​编辑 2.6 list的一些其他接口…...

计算机组成原理笔记(十五)——3.5指令系统的发展

不同类型的计算机有各具特色的指令系统&#xff0c;由于计算机的性能、机器结构和使用环境不同&#xff0c;指令系统的差异也是很大的。 3.5.1 x86架构的扩展指令集 x86架构的扩展指令集是为了增强处理器在多媒体、三维图形、并行计算等领域的性能而设计的。这些扩展指令集通…...

基于时间序列分解与XGBoost的交通通行时间预测方法解析

一、问题背景与数据概览 在城市交通管理系统中,准确预测道路通行时间对于智能交通调度和路径规划具有重要意义。本文基于真实道路传感器数据,构建了一个结合时间序列分解与机器学习模型的预测框架。数据源包含三个核心部分: 道路通行数据(new_gy_contest_traveltime_train…...

基于XGBoost的异烟酸生产收率预测:冠军解决方案解析

1. 引言 在化工生产领域,准确预测产品收率对优化工艺流程、降低生产成本具有重要意义。本文以异烟酸生产为研究对象,通过机器学习方法构建预测模型,在包含10个生产步骤、42个工艺参数的数据集上实现高精度收率预测。该方案在工业竞赛中斩获冠军,本文将深度解析其技术实现细…...

计算机视觉算法实现——电梯禁止电瓶车进入检测:原理、实现与行业应用(主页有源码)

✨个人主页欢迎您的访问 ✨期待您的三连 ✨ ✨个人主页欢迎您的访问 ✨期待您的三连 ✨ ✨个人主页欢迎您的访问 ✨期待您的三连✨ ​​​ ​​​​​​​​​ ​​ 1. 电梯安全检测领域概述 近年来&#xff0c;随着电动自行车&#xff08;以下简称"电瓶车"&…...

智能制造方案精读:117页MES制造执行系统解决方案【附全文阅读】

本方案围绕制造执行系统(MES)展开,阐述了智能制造相关概念及发展趋势,指出 MES 是连接 ERP 与生产现场的关键系统。介绍其在加工、装配及其他场景的应用,通过实例展示各场景下的功能、特点和实施效果,如实现生产信息可视化、产品追溯、设备监控等。还提及实施 MES 面临的…...

【操作系统】【内存分配过程】

内存分配的过程 过程 程序向内存请求空间&#xff08;如new&#xff0c;malloc&#xff09;程序检查虚拟内存是否有剩余分配虚拟内存调用程序时&#xff0c;CPU 会查页表&#xff0c;若发现该虚拟页未映射&#xff0c;则触发缺页中断分配物理页&#xff0c;并建立页表映射继续…...

MOM成功实施分享(八)汽车活塞生产制造MOM建设方案(第二部分)

在制造业数字化转型的浪潮中&#xff0c;方案对活塞积极探索&#xff0c;通过实施一系列数字化举措&#xff0c;在生产管理、供应链协同、质量控制等多个方面取得显著成效&#xff0c;为行业提供了优秀范例。 1.转型背景与目标&#xff1a;活塞在数字化转型前面临诸多挑战&…...

Swift的学习笔记(一)

Swift的学习笔记&#xff08;一&#xff09; 文章目录 Swift的学习笔记&#xff08;一&#xff09;元组基本语法1. **创建元组**2. **访问元组的值**3. **命名的元组**4. **解构元组**5. **忽略某些值** 可选值类型定义 OptionalOptional 的基本使用1. **给 Optional 赋值和取值…...

Azure AI Foundry 正在构建一个技术无障碍的未来世界

我们习以为常的街道和数字世界&#xff0c;往往隐藏着被忽视的障碍——凹凸不平的路面、不兼容的网站、延迟的字幕或无法识别多样化声音的AI模型。这些细节对某些群体而言&#xff0c;却是日常的挑战。正如盲道不仅帮助视障者&#xff0c;也优化了整体城市体验&#xff0c;信息…...

中厂算法岗面试总结

时间&#xff1a;2025.4.10 地点&#xff1a;上市的电子有限公司 面试流程&#xff1a; 1.由负责人讲解公司文化 2&#xff0c;由技术人员讲解公司的技术岗位&#xff0c;还有成果 3.带领参观各个工作位置&#xff0c;还有场所 4.中午吃饭 5.面试题&#xff0c;闭卷考试…...

地毯填充luogu

P1228 地毯填补问题 题目描述 相传在一个古老的阿拉伯国家里,有一座宫殿。宫殿里有个四四方方的格子迷宫,国王选择驸马的方法非常特殊,也非常简单:公主就站在其中一个方格子上,只要谁能用地毯将除公主站立的地方外的所有地方盖上,美丽漂亮聪慧的公主就是他的人了。公主…...

哈喽打车 小程序 分析

声明 本文章中所有内容仅供学习交流使用&#xff0c;不用于其他任何目的&#xff0c;抓包内容、敏感网址、数据接口等均已做脱敏处理&#xff0c;严禁用于商业用途和非法用途&#xff0c;否则由此产生的一切后果均与作者无关&#xff01; 逆向过程 这一次遇到这种风控感觉挺有…...

基于 Vue 3 + Express 的网盘资源搜索与转存工具,支持响应式布局,移动端与PC完美适配

一个基于 Vue 3 Express 的网盘资源搜索与转存工具&#xff0c;支持响应式布局&#xff0c;移动端与PC完美适配&#xff0c;可通过 Docker 一键部署。 功能特性 &#x1f50d; 多源资源搜索 支持多个资源订阅源搜索支持关键词搜索与资源链接解析支持豆瓣热门榜单展示 &#…...

OL9设置oracle23ai数据库开机自启动

1、设置oracle用户的环境变量信息 [oracleOracleLinuxR9U5 ~]$vim ~/.bash_profile # Set Oracle environment variables for Oracle 23c AI export ORACLE_HOME/opt/oracle/product/23ai/dbhomeFree export ORACLE_SIDFREE export PATH$ORACLE_HOME/bin:$PATH export LD_LIB…...

【操作系统学习篇-Linux】进程

1. 什么是进程 课本概念&#xff1a;程序的一个执行实例&#xff0c;正在执行的程序等 内核观点&#xff1a;担当分配系统资源&#xff08;CPU时间&#xff0c;内存&#xff09;的实体。 如果你就看这个来理解进程&#xff0c;那么恭喜你&#xff0c;作为初学者&#xff0c;你…...

CF985G Team Players

我敢赌&#xff0c;就算你知道怎么做&#xff0c;也必然得调试半天才能 AC。 [Problem Discription] \color{blue}{\texttt{[Problem Discription]}} [Problem Discription] 图片来自洛谷。 [Analysis] \color{blue}{\texttt{[Analysis]}} [Analysis] 显然不可能正面计算。所以…...

企业经营决策风险

在企业的经营过程中&#xff0c;领导者每天都在面对大量的决策——该扩大生产还是收缩业务&#xff1f;该增设销售渠道还是提升产品质量&#xff1f;但你知道吗&#xff0c;企业最大的成本&#xff0c;不是生产成本&#xff0c;也不是人工成本&#xff0c;而是决策错误的成本&a…...

UE5蓝图实现打开和关闭界面、退出

Button_Back 和Button_Exit是创建的两个按钮事件。 1.Create Widget 创建界面&#xff08;打开界面&#xff09; 2.Add to Viewport 添加到视图 3.remove form Parent&#xff0c;Target&#xff1a;self 从父节点移除当前界面&#xff08;关闭界面&#xff09; 4.Quit Game 退…...

【Linux C】简单bash设计

主要功能 循环提示用户输入命令&#xff08;minibash$&#xff09;。创建子进程&#xff08;fork()&#xff09;执行命令&#xff08;execlp&#xff09;。父进程等待子进程结束&#xff08;waitpid&#xff09;。关键问题 参数处理缺失&#xff1a;scanf("%s", buf)…...

安全是基石

“安全是基石”这句话强调了安全在个人、企业、社会等各个层面中的基础性和不可替代的重要性。无论是物理安全、网络安全、数据安全&#xff0c;还是生产安全、公共安全&#xff0c;都是保障稳定发展的前提。以下是不同领域中“安全”作为基石的体现&#xff1a; 1. 个人安全 基…...

JavaWeb 课堂笔记 —— 09 MySQL 概述 + DDL

本系列为笔者学习JavaWeb的课堂笔记&#xff0c;视频资源为B站黑马程序员出品的《黑马程序员JavaWeb开发教程&#xff0c;实现javaweb企业开发全流程&#xff08;涵盖SpringMyBatisSpringMVCSpringBoot等&#xff09;》&#xff0c;章节分布参考视频教程&#xff0c;为同样学习…...

echarts 图表

echart快速上手 快速上手 - 使用手册 - Apache EChartshttps://echarts.apache.org/handbook/zh/get-started/...