c++(四)

news2024/9/24 14:59:10

c++(四)

  • 运算符重载
    • 可重载的运算符
    • 不可重载的运算符
    • 运算符重载的格式
    • 运算符重载的方式
      • 友元函数进行运算符重载
      • 成员函数进行运算符重载
  • 模板
    • 定义的格式
    • 函数模板
    • 类模板
  • 标准模板库
    • vector向量容器
    • STL中的list
    • map向量容器

运算符重载

运算符相似,运算符相同,操作数不同,与返回值无关的一组函数
目的:让参与运算的数据类型更多样化—>c++可拓展性的体现
在这里插入图片描述

可重载的运算符

在这里插入图片描述

不可重载的运算符

在这里插入图片描述

运算符重载的格式

在这里插入图片描述

运算符重载的方式

友元函数进行运算符重载

案例1:复数 a+bi

#include <iostream>
using namespace std;
class CComplex
{
public:
	CComplex(int rear = 2, int img = 3) :rear(rear), img(img)
	{
	cout << "CComplex(int,int)" << endl;
	}
	~CComplex()
	{
	cout << "~CComplex()" << endl;
	cout << this << endl;
	}
	void show()
	{
	cout << this->rear << "+" << this->img << "*i" << endl;
	}
	friend CComplex operator+(CComplex& obj1, CComplex& obj2);
private:
	int rear;//实部
	int img;//虚部
};
CComplex operator+(CComplex& obj1, CComplex& obj2)
{
	CComplex obj3;
	cout << &obj3 << endl;
	obj3.rear = obj1.rear + obj2.rear;
	obj3.img = obj1.img + obj2.img;
	return obj3;
}
int main()
{
	CComplex c1(1,2);
	cout << &c1 << endl;
	CComplex c2(2,3);
	cout << &c2 << endl;
	//Complex c3 = c1 + c2;//隐式调用
	CComplex c3 = operator+(c1, c2);//显示调用
	cout << &c3 << endl;
	c3.show();
	return 0;
}

在这里插入图片描述
案例2:重载前置++

#include <iostream>
using namespace std;
//使用友元函数实现++符号的自增
class CComplex
{
public:
	CComplex(int rear = 1, int img = 1);
	~CComplex();
	void show();
	friend void operator++ (CComplex& demo);
private:
	int rear;
	int img;
};
CComplex::CComplex(int rear, int img)
{
	this->rear = rear;
	this->img = img;
	cout << "构造" << endl;
}
CComplex::~CComplex()
{
	cout << "析构" << endl;
}
void CComplex::show()
{
	cout << this->rear << "+" << this->img << "*i" << endl;
}
void operator++ (CComplex& demo)
{
	++demo.rear;
	++demo.img;
}
int main()
{
	CComplex c1(2,3);
	//++c1;//隐式调用
	operator++(c1);
	c1.show();
}

在这里插入图片描述

成员函数进行运算符重载

案例1:重载前置++,后置++

#include <iostream>
using namespace std;
//使用成员函数实现++符号的自增,后++
class CComplex
{
public:
	CComplex(int rear = 1, int img = 1);
	~CComplex();
	void show();
	CComplex& operator++ ();
	CComplex& operator++(int n);
private:
	int rear;
	int img;
};
CComplex::CComplex(int rear, int img)
{
	this->rear = rear;
	this->img = img;
	cout << "构造" << endl;
}
CComplex::~CComplex()
{
	cout << "析构" << endl;
}
void CComplex::show()
{
	cout << this->rear << "+" << this->img << "*i" << endl;
}
CComplex& CComplex::operator++ ()
{
	++this->rear;
	++this->img;
	return *this;
}
CComplex& CComplex::operator++(int n)
{
	CComplex temp = *this;
	this->rear++;
	this->img++;
	return temp;
}
int main()
{
	CComplex c1(2, 3);
	//++c1;//隐式调用
	c1.operator++();//显示调用
	c1.show();

	CComplex c2(3, 4);
	c2.operator++(1).show();
	c2.show();
}

在这里插入图片描述
总结:
<1>友元重载参数要比成员重载的参数多一个,因为成员函数默认有一个this指针
<2>并不是所有的运算符都可以通过友元或者成员重载

cin >> 变量;//只能通过友元函数进行重载

#include <iostream>
using namespace std;
//重载cin,实现可以输入对象
class CComplex
{
private:
	int rear;
	int img;
public:
	void show();
	friend CComplex& operator >> (istream& tmp, CComplex& c1);
protected:
};

void CComplex::show()
{
	cout << this->rear << "+" << this->img << "*i" << endl;
}
CComplex& operator>>(istream& tmp, CComplex& c1)
{
	cout << "rear:" << endl;
	tmp >> c1.rear;
	cout << "img:" << endl;
	tmp >> c1.img;
	return c1;
}

int main()
{
	CComplex c1;
	cin >> c1;
	c1.show();
}

在这里插入图片描述

模板

  • 模板是支持参数化多态的工具,就是让类或者函数声明为一种通用类型,使得类中的某些数据成员或者成员函数的参数、返回值在实际使用时可以是任意类型
  • 减少代码冗余,提高开发效率

在这里插入图片描述

定义的格式

template<class/typename T>
返回值类型 函数名(参数列表)
{
;
}

函数模板

在这里插入图片描述

  • 函数模板是真正的函数吗?不是
  • 什么时候才能变成真正的函数呢?
    在这里插入图片描述
#include <iostream>
using namespace std;
template<typename T>
T MAX(T a, T b) //不占内存空间
{
	return a > b ? a : b;
}
int main()
{
	//实例化模板
	cout << MAX<int>(1, 2) << endl;
	cout << MAX<string>("hello", "c++");
	cout << MAX<int>(3, 4) << endl;//类型相同的模板函数只会生成一次
	return 0;
}

总结:
<1>调用函数时,将模板的数据类型具体化的时候,才会变成真正的函数,此时占内存空间,称为模板
函数
<2>类型相同的模板函数只会生成一次
<3>函数模板可以重载

案例:用模板实现数组的输出

#include <iostream>
using namespace std;
//模板实现数组的输出
template<typename T>
void output(T arr[],int n)
{
	int i;
	for (i = 0; i < n; i++)
	{
		cout << arr[i] << " ";
	}
	cout << endl;
}

int main()
{
	int arr[] = { 1, 2, 3, 4, 5 };
	int length = sizeof(arr) / sizeof(int);
	output<int>(arr, length);

	string brr[] = { "hello", "c++" };
	length = sizeof(brr) / sizeof(string);
	output<string>(brr, length);

	char crr[] = { 'a', 'b', 'c'};
	length = sizeof(crr) / sizeof(char);
	output<char>(crr, length);

	
	return 0;
}

在这里插入图片描述

类模板

实现:链表:带头节点的单向不循环列表
<1>节点类(数据域、指针域)
<2>链表的类(增(尾插法)、删、改、查)、头结点

#include <iostream>
using namespace std;
//结点
class linkNode
{
public:
	int data;
	linkNode* next;
	//构造
	linkNode();
	//析构
	~linkNode();
protected:
};
//操作
class Handle
{
private:
	linkNode* head;
public:
	//构造
	Handle();
	//析构
	~Handle();
	//插入(尾插)
	void insert(int data);
	//查
	void search();

protected:
};


linkNode::linkNode()
{
	this->data = 0;
	this->next = nullptr;
	cout << "构造" << endl;
}
linkNode::~linkNode()
{
	cout << "析构" << endl;
}
Handle::Handle()
{
	this->head = new linkNode;
}
Handle::~Handle()
{
	
}
void Handle::insert(int data)
{
	 //创建一个新结点
	linkNode* pNew = new linkNode;
	//赋值
	pNew->data = data;
	//找尾结点
	linkNode* pFind = this->head;
	while (pFind->next != nullptr)
	{
		pFind = pFind->next;
	}
	//插入
	pFind->next = pNew;
}
void Handle::search()
{
	linkNode* pFind = this->head->next;
	if (pFind == nullptr)
	{
		return;
	}
	while (pFind != nullptr)
	{
		cout << pFind->data << " ";
		pFind = pFind->next;
	}
	cout << endl;
}


int main()
{
	Handle han;
	han.insert(10);
	han.insert(20);
	han.insert(30);

	han.search();
	return 0;
}

类模板:

#include <iostream>
using namespace std;
template <typename T>
//结点
class linkNode
{
public:
	T data;
	linkNode<T>* next;
	//构造
	linkNode();
	//析构
	~linkNode();
protected:
};
//操作
template <typename T>
class Handle
{
private:
	linkNode<T>* head;
public:
	//构造
	Handle();
	//析构
	~Handle();
	//插入(尾插)
	void insert(T data);
	//查
	void search();

protected:
};

template <typename T>
linkNode<T>::linkNode()
{
	//this->data = 0;
	this->next = nullptr;
	cout << "构造" << endl;
}
template <typename T>
linkNode<T>::~linkNode()
{
	cout << "析构" << endl;
}
template <typename T>
Handle<T>::Handle()
{
	this->head = new linkNode<T>;
}
template <typename T>
Handle<T>::~Handle()
{

}
template <typename T>
void Handle<T>::insert(T data)
{
	//创建一个新结点
	linkNode<T>* pNew = new linkNode<T>;
	//赋值
	pNew->data = data;
	//找尾结点
	linkNode<T>* pFind = this->head;
	while (pFind->next != nullptr)
	{
		pFind = pFind->next;
	}
	//插入
	pFind->next = pNew;
}
template <typename T>
void Handle<T>::search()
{
	linkNode<T>* pFind = this->head->next;
	if (pFind == nullptr)
	{
		return;
	}
	while (pFind != nullptr)
	{
		cout << pFind->data << " ";
		pFind = pFind->next;
	}
	cout << endl;
}


int main()
{
	Handle<int> han;
	han.insert(10);
	han.insert(20);
	han.insert(30);

	han.search();

	Handle<string> han2;
	han2.insert("hello");
	han2.insert("c++");
	han2.search();
	return 0;
}

总结:
<1>类模板中使用一个或多个虚拟类型作为其成员数据类型的时候
<2>类模板不能分文件实现

标准模板库

即标准模板库,惠普实验室开发的一系列软件的统称。它是由Alexander Stepanov、Meng Lee和DavidR Musser在惠普实验室工作时所开发出来的。STL主要是一些“容器”的集合,这些“容器”有list、vector、set、map,等等,STL也是算法和其他一些组件的集合,是世界上顶级C++程序员多年的杰作,是泛型编程的一个经典范例。

STL可分为六个部分:
容器(containers)
迭代器(iterators)
空间配置器(allocator)
配接器(adapters)
算法(algorithms)
仿函数(functors)

容器(containers)//类模板
特殊的数据结构,实现了数组、链表、队列、等等,实质是模板类
迭代器(iterators)//对象指针
一种复杂的指针,可以通过其读写容器中的对象,实质是运算符重载
算法(algorithms)//对象的操作
读写容器对象的逻辑算法:排序、遍历、查找、等等,实质是模板函数
空间配置器(allocator)
容器的空间配置管理的模板类
配接器(adapters)
用来修饰容器、仿函数、迭代器接口
仿函数(functors)
类似函数,通过重载()运算符来模拟函数行为的类
组件间的关系
container(容器) 通过 allocator(配置器) 取得数据储存空间,algorithm(算法)通过iterator(迭代器)存取 container(容器) 内容,functor(仿函数) 可以协助 algorithm(算法) 完成不同的策略变化,adapter(配接器) 可以修饰或套接 functor(仿函数)

vector向量容器

底层实现:数组
特点:<1>地址连续
<2>a、通过索引的方式去访问 b、通过迭代器访问
<3>访问方便
<4>插入、删除需要移动元素,不方便
<5>大小不固定
本质:vector是对数组的封装

#include <iostream>
#include <vector>
using namespace std;
/*
* 类似于数组
* 地址连续,可以使用索引访问,也可以使用迭代器访问,查询方便,增加和删除不方便,大小不固定
*/


int main()
{
	//实例化vector类模板
	vector<string> list_vect;
	//增加元素
	//void push_back(const T& x)在容器的末尾插入一个元素
	list_vect.push_back("hello");
	list_vect.push_back("world");
	list_vect.push_back("c++");
	//访问
	//使用索引方式
	//size_type size() const;用来返回容器中元素个数
	for (int i = 0; i < list_vect.size(); i++)
	{
		//const_reference at ( size_type n ) const;获取容器某个位置上的元素值
		cout << list_vect.at(i) << " ";
	}
	cout << endl;

	//使用迭代器访问
	vector<string>::iterator it;
	//获取第二个位置的iterator
	it = ++list_vect.begin();
	//在某位置上增加元素
	list_vect.insert(it, "hahaha");
	//iterator begin()返回第一个元素的迭代器
	//iterator end()返回最后一个元素的下一个位置的迭代器
	for (it = list_vect.begin(); it < list_vect.end(); it++)
	{
		cout << *it << " ";
	}
	cout << endl;


	//删除某一位置上的元素
	//获取第二个位置的iterator
	it = ++list_vect.begin();
	list_vect.erase(it);
	for (it = list_vect.begin(); it < list_vect.end(); it++)
	{
		cout << *it << " ";
	}
	cout << endl;

	//修改第二个位置的值
	/*it = ++list_vect.begin();
	list_vect.erase(it);
	it = ++list_vect.begin();
	list_vect.insert(it, "hahaha");*/

	list_vect.at(1) = "hahaha";
	for (it = list_vect.begin(); it < list_vect.end(); it++)
	{
		cout << *it << " ";
	}
	cout << endl;
	
	return 0;
}

在这里插入图片描述

STL中的list

底层结构:双向链表
特点:
<1>内存中的地址是不连续–>不能通过索引的方式去访问–>访问效率没有vector高
<2>频繁的插入、删除不需要移动元素,效率比vector

#include <iostream>
#include <list>
using namespace std;

class Stu
{
public:
	Stu(int sno = 1, string name = "张三") :sno(sno), name(name)
	{
		cout << "构造" << endl;
	}
	~Stu()
	{
		cout << "析构" << endl;
	}
	void show()
	{
		cout << "学号:" << this->sno << ",姓名:" << this->name << endl;
	}
private:
	int sno;
	string name;
protected:
};
void showList(list<Stu>& list_s)
{
	list<Stu>::iterator it;
	for (it = list_s.begin(); it != list_s.end(); it++)
	{
		it->show();
	}
}

int main()
{
	//实例化类模板
	list<Stu> list_s;
	//插入
	//void push_back ( const T& x );在列表的末尾插入一个元素
	list_s.push_back(Stu());
	//void push_front ( const T& x );在列表的头部插入一个元素
	list_s.push_front(Stu(2, "李四"));
	//iterator insert ( iterator position, const T& x ); 在列表的指定位置插入一个元素
	list<Stu>::iterator it;
	it = ++list_s.begin();//获取第二个位置
	list_s.insert(it, Stu(3, "王五"));

	//查看,只能以迭代器的方式
	/*for (it = list_s.begin(); it != list_s.end(); it++)
	{
		it->show();
	}*/
	showList(list_s);

	//删除
	//iterator erase ( iterator position );删除某个位置的元素
	//it = ++list_s.begin();//获取第二个位置
	it = list_s.begin();
	advance(it, 1);
	list_s.erase(it);
	//查看,只能以迭代器的方式
	/*for (it = list_s.begin(); it != list_s.end(); it++)
	{
		it->show();
	}*/
	showList(list_s);
	//修改
	it = ++list_s.begin();//获取第二个位置
	list_s.erase(it);
	it = ++list_s.begin();//获取第二个位置
	list_s.insert(it, Stu(3, "王五"));
	//查看,只能以迭代器的方式
	/*for (it = list_s.begin(); it != list_s.end(); it++)
	{
		it->show();
	}*/
	showList(list_s);

	return 0;
}

在这里插入图片描述

map向量容器

底层结构:红黑树—>二叉树的一种
以键值对的形式存储
key—>value,key值是唯一的
特点:
<1>查找的速度特别快
<2>自动按照从小到大的顺序去排序
应用场景:频繁的查找

#include <iostream>
#include <map>
using namespace std;

class Stu
{
public:
	Stu(int sno = 1, string name = "张三") :sno(sno), name(name)
	{
		cout << "构造" << endl;
	}
	~Stu()
	{
		cout << "析构" << endl;
	}
	void show()
	{
		cout << "学号:" << this->sno << ",姓名:" << this->name << endl;
	}
	void setname(string name)
	{
		this->name = name;
	}
	
private:
	int sno;
	string name;
protected:
};
void showList(map<int, Stu*> mymap)
{
	map<int, Stu*>::iterator it;
	for (it = mymap.begin(); it != mymap.end(); it++)
	{
		cout << "key:" << it->first << " ";
		it->second->show();
	}
	cout << endl;
}

int main()
{
	//实例化类模板
	map<int, Stu*> mymap;
	map<int, Stu*>::iterator it;
	//插入
	Stu stu1;
	mymap.insert(pair<int, Stu*>(2, &stu1));
	it = mymap.begin();
	Stu stu2(2, "王五");
	mymap.insert(it, pair<int, Stu*>(1, &stu2));
	Stu stu3(3, "李四");
	mymap.insert(pair<int, Stu*>(3, &stu3));
	showList(mymap);

	//删除
	mymap.erase(2);
	showList(mymap);

	//修改
	it = mymap.find(1);
	if (it != mymap.end())
	{
		(*it).second->setname("刘六");
	}

	showList(mymap);

	return 0;
}

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1706158.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

上周暗网0day售卖情报一览

黑客声称以 1,700,000 美元出售 Outlook RCE 漏洞 0Day 令人担忧的是&#xff0c;一个名为“Cvsp”的威胁参与者宣布出售所谓的 Outlook 远程代码执行 (RCE) 漏洞 0day。这一所谓的漏洞旨在针对跨 x86 和 x64 架构的各种 Microsoft Office 版本&#xff0c;对全球用户构成重大安…

Facebook之魅:数字社交的体验

在当今数字化时代&#xff0c;Facebook作为全球最大的社交平台之一&#xff0c;承载着数十亿用户的社交需求和期待。它不仅仅是一个简单的网站或应用程序&#xff0c;更是一个将世界各地的人们连接在一起的社交网络&#xff0c;为用户提供了丰富多彩、无与伦比的数字社交体验。…

什么是NAND Flash ECC?

在存储芯片行业&#xff0c;数据完整性和可靠性是至关重要的。为了确保数据的准确性和防止数据丢失&#xff0c;ECC&#xff08;错误校正码&#xff09;在NAND Flash存储中扮演了关键角色。MK米客方德将为您解答NAND Flash ECC的基本概念、工作原理及其在实际应用中的重要性。 …

RGB 平均值统计

任务&#xff1a;有一一对应的图片多组如下&#xff0c;希望统计灰色部分原有grb平均值&#xff0c;彩色部分rgb平均值。 方法&#xff1a;由下图对各个像素分析&#xff0c;分为3类&#xff0c;并记录坐标&#xff0c;根据坐标统计上图的rgb平均值&#xff0c;结果放在一张Exc…

群晖异地组网-节点小宝搭建使用指南(全平台异地组网)

内网穿透&#xff0c;对于经常传输小文件、远程控制NAS的朋友来说是够用了&#xff0c;但是对经常异地端到端大文件传输需求的朋友来说就差点事&#xff0c;有没有一种免费、速度快、配置简单得方式的呢&#xff0c;答案是有的。节点小宝异地组网是一个非常不错的方式&#xff…

表空间[MAIN]处于脱机状态

达梦数据库还原后&#xff0c;访问数据库报错&#xff1a;表空间[MAIN]处于脱机状态 解决方法&#xff1a; 1&#xff1a;检查备份文件 DMRMAN 中使用 CHECK 命令对备份集进行校验&#xff0c;校验备份集是否存在及合法。 ##语法&#xff1a;CHECK BACKUPSET <备份集目录…

大字体学生出勤记录系统网页HTML源码

源码介绍 上课需要一个个点名记录出勤情况&#xff0c;就借助AI制作了一个网页版学生出勤记录系统&#xff0c; 大字体显示学生姓名和照片&#xff0c;让坐在最后排学生也能看清楚&#xff0c;显示姓名同时会语音播报姓名&#xff0c; 操作很简单&#xff0c;先导入学生姓名…

信息抽取模型TPLinker

1.motivation 早期传统方法首先抽取实体再抽取它们之间的关系&#xff0c;但是忽略了两个任务之间的关联。而后期采取的联合模型都存在着一个严重问题&#xff1a;训练时&#xff0c;真实值作为上下文传入训练&#xff1b;推理时&#xff0c;模型自身生成的值作为上下文传入&a…

代码随想录算法训练营第21天|● 530.二叉搜索树的最小绝对差 ● 501.二叉搜索树中的众数 ● 236. 二叉树的最近公共祖先

二叉搜索树的最小绝对差 题目连接 https://leetcode.cn/problems/minimum-absolute-difference-in-bst/ 思路&#xff1a; 利用二叉搜索树的中序遍历的特性&#xff0c;将二叉树转成有序数组&#xff0c;进而求任意两个数的最小绝对差。 代码 /*** Definition for a bina…

邮箱调用接口的服务有哪些?怎么配置接口?

邮箱调用接口安全性如何保障&#xff1f;使用邮箱服务器的方法&#xff1f; 邮箱调用接口为各种应用和系统提供了便捷的电子邮件发送与接收功能。选择合适的邮箱调用接口服务可以大大提升工作效率和用户体验。本AokSend将探讨一些主要的邮箱调用接口服务。 邮箱调用接口&…

本杀小程序开发实战手册:从构思到上线

一、引言 随着移动互联网的快速发展&#xff0c;剧本杀作为一种新兴的娱乐方式&#xff0c;受到了越来越多年轻人的喜爱。为了满足市场需求&#xff0c;开发一款剧本杀小程序成为了许多创业者和开发者的选择。本文将从构思、设计、开发到上线等方面&#xff0c;为您详细解析剧…

庆余年2火了,却把热爱开源的程序员给坑了

庆余年 2 终于开播了&#xff0c;作为一名剧粉&#xff0c;苦等了五年终于盼来了。开播即爆火&#xff0c;虽然首播的几集剧情有些拖沓&#xff0c;不过也不影响这是一部好剧。 然而&#xff0c;庆余年 2 的爆火&#xff0c;却把 npmmirror 镜像站给坑惨了。npmmirror 镜像站&…

第一个Flutter3项目

配置flutter国内源 首先&#xff0c;配置flutter的国内源&#xff1a; env:PUB_HOSTED_URL"https://pub.flutter-io.cn"; env:FLUTTER_STORAGE_BASE_URL"https://storage.flutter-io.cn"配置gradle国内源 修改gradle\wrapper\gradle-wrapper.properties…

【MySQL数据库】:MySQL内置函数

目录 日期函数 current_date 函数 current_time 函数 current_timestamp 函数 now 函数 date 函数 date_add 函数 date_sub 函数 datediff 函数 字符串函数 charset 函数 concat 函数 instr 函数 ucase 函数 lcase 函数 left 函数 length 函数 replace…

vue3 手动简单 24h 甘特图封装

甘特图 手动封装简版甘特图&#xff0c;纯展示功能&#xff0c;无其他操作 文章目录 甘特图前言效果图组件使用总结 前言 开始的思路是使用echarts 瀑布图来体现&#xff0c;但是试验后发现&#xff0c;头部时间功能不满足&#xff0c;然未找到其他组件&#xff0c;于是手动封…

数据集008:吸烟、抽烟检测数据集(含数据集下载链接)

数据集简介 两个数据集 一个是783张图片对应的xml文件 一个是2482张图片对应的xml文件 如下图所示&#xff1a; 部分代码&#xff1a; # 测试数据读取 def test_data_loader(datadir, batch_size 10, test_image_size608, modetest):"""加载测试用的图片…

LangChain打造一个AI客服

最近在学习LangChain&#xff0c;langchain的第一个入门应用就是和ChatGPT结合形成的一个AI客服&#xff0c;本期文章就带大家一起认识下 LangChain LangChain是现在用得最多的AI框架&#xff0c;langchain在帮助如基于文档数据的回答、聊天机器人和代理这类的应用程序 langch…

2024年【N1叉车司机】免费试题及N1叉车司机试题及解析

题库来源&#xff1a;安全生产模拟考试一点通公众号小程序 N1叉车司机免费试题根据新N1叉车司机考试大纲要求&#xff0c;安全生产模拟考试一点通将N1叉车司机模拟考试试题进行汇编&#xff0c;组成一套N1叉车司机全真模拟考试试题&#xff0c;学员可通过N1叉车司机试题及解析…

OrangePi AIpro开发板,使用了310B,昇腾310B较于昇腾310有何性能提升?

OrangePi AIpro开发板 他们对应的模组分别是&#xff1a;Atlas 200 AI和Atlas 200I A2 310&#xff1a;基本规格 - Atlas 200 AI加速模块 用户指南 14 - 华为 (huawei.com) 310B&#xff1a;基本规格 - Atlas 200I A2 加速模块 用户指南 04 - 华为 (huawei.com)

Python爬虫实战(实战篇)—17获取【CSDN某一专栏】数据转为Markdown列表放入文章中

文章目录 专栏导读背景结果预览1、页面分析2、通过返回数据发现适合利用lxmlxpath3、进行Markdown语言拼接总结 专栏导读 在这里插入图片描述 &#x1f525;&#x1f525;本文已收录于《Python基础篇爬虫》 &#x1f251;&#x1f251;本专栏专门针对于有爬虫基础准备的一套基…