12 c++版本的坦克大战

前言

呵呵 这大概是 大学里面的 c++ 贪吃蛇了吧 

有一些 面向对象的理解, 但是不多 

这里 具体的实现 就不赘述, 仅仅是 发一下代码 以及 具体的使用 

 

 

坦克大战

#include<iostream>
#include<windows.h>
#include<conio.h>
#include<ctime>
#include<string>
#include<list>
using namespace std;
#define N 4
class Tank_War;
void set_pos(int x, int y);
class Object
{	
protected:int x, y;int dir;int life;public:Object() : x(0), y(0), dir(-1),life(1)	{}Object(int x, int y, int dir, int life) : x(x), y(y), dir(dir), life(life) {}	 void move();void paint()  {	}void reduce_blood()	{	life -= 1; 	}void increase_blood()	{	life += 1; 	}bool is_failure();virtual void print(){cout<<x<<"--"<<y<<"=="<<life<<"--"<<endl;}
};class Missile : public Object
{
public:Missile() : Object() {}Missile(int x, int y, int dir, int life) : Object(x, y, dir, life) {}bool move();void paint(string icon);int get_x()const	{	return x;	}int get_y()const	{	return y;	}void set_info(int x, int y, int dir) {	this -> x = x; this -> y = y; this -> dir = dir;	};bool operator==(const Missile&_x){return (x==_x.x && y==_x.y&&dir==_x.dir);		}		//list中remove是需要重载==
};class Tank : public Object
{
private:int pre_dir;list<Missile> missile_list;public:Tank() : Object(), pre_dir(-1) {}Tank(int x, int y, int dir, int life) : Object(x, y, dir,life) {pre_dir = dir;};void del_before_move();void move(Tank_War &game, string name);void paint(string icon);int get_x()	const	{	return x;	}int get_y()	const	{	return y;	}int get_dir()const	{	return dir;	}void set_dir(int dir){	pre_dir = this -> dir;	this -> dir = dir;	}void set_location(int x, int y){	this -> x = x;	this -> y = y;	}void emission_missile();void missile_move();void check_missile(Tank_War &game, string name);bool check_missile_strike(Missile& missile, Tank& tank);
//	bool check_is_right(int x, int y, int dir);int distance_squre(int x_1, int y_1, int x_2, int y_2);int distance_squre(Tank& tank_2);bool operator==(const Tank&_x){return (x==_x.x && y==_x.y&&dir==_x.dir);		}
};class Tank_War
{
private:Tank lead;list<Tank> enemy_list;int tot;int grade;bool over;public:Tank_War():lead(28, 21, -1, 4), grade(0), tot(0), over(false) {};int game();void game_over()	{	over = true;	}int draw_menu();void draw_game_interface();Tank* get_lead()	{	return &lead;	}list<Tank>::iterator get_enemy_list_begin()	{	return enemy_list.begin();	}list<Tank>::iterator get_enemy_list_end()	{	return enemy_list.end();	}Tank* create_enemy();void enemy_move();
//	bool check_is_right(int x, int y, int dir);bool can_move(Tank &tank, string name);bool can_move(Tank& x, Tank& y);void check_missile(string name);void supply_enemy();int get_random_direction();list<Tank>::iterator remove_from_enemy_list(list<Tank>::iterator it)	{	return enemy_list.erase(it);		}void reduce_tot()	{	tot--;	}void increase_grade()	{	grade+=5;set_pos(68, 3);cout<<grade;	}
};int main()
{Tank_War g;g.game();system("pause");return 0;
}int Tank_War::game()
{bool is_move = true;int speed = draw_menu();system("cls");draw_game_interface();supply_enemy();while(!over){if(!lead.is_failure()){if(tot<N) 	supply_enemy();if(GetAsyncKeyState(VK_UP))	lead.set_dir(-1);else if(GetAsyncKeyState(VK_DOWN))	lead.set_dir(1);else if(GetAsyncKeyState(VK_LEFT))	lead.set_dir(-2);else if(GetAsyncKeyState(VK_RIGHT))	lead.set_dir(2);else is_move = false;if(is_move) lead.move(*this, "lead");	enemy_move();if(GetAsyncKeyState(VK_RETURN))	lead.emission_missile();	if(enemy_list.size() != 0){check_missile("lead");check_missile("enemy");}		}is_move = true;lead.missile_move();Sleep(100);}return 0;
}void set_pos(int x, int y)
{HANDLE cursor = GetStdHandle(STD_OUTPUT_HANDLE);COORD position = {x, y};SetConsoleCursorPosition(cursor, position);
}void draw_rect(int x_1, int y_1, int x_2, int y_2, string icon)
{if(x_1 > x_2)	swap(x_1, x_2);if(y_1 > y_2)	swap(y_1, y_2);int n_1 = y_2 - y_1 + 1;int n_2 = (x_2 - x_1)/icon.size() + 1;for(int i=0; i<n_1; i++){set_pos(x_1, y_1+i);for(int j=0; j<n_2; j++)cout<<icon;}
} int Tank_War::draw_menu()
{int speed = 0;draw_rect(0, 3, 79, 3, "-");draw_rect(0, 5, 79, 5, "-");set_pos(25, 2);cout<<"welcome to airplane war games ";set_pos(25, 4);cout<<"↑ up   ↓ down   enter confirm";set_pos(20, 10);cout<<"1.easy		easy mode enemy move slow";set_pos(20, 14);cout<<"2.difficult		difficult mode enemy move fast";set_pos(20, 20);cout<<"made by He Xiong .   begin at 2014_01_08";draw_rect(0, 19, 79, 19, "-");draw_rect(0, 22, 79, 22, "-");set_pos(18, 10);cout<<"->";int y = 10;while(true){if(GetAsyncKeyState(VK_UP) || GetAsyncKeyState(VK_DOWN)){if(y == 10){set_pos(18, y);		cout<<"  ";y = 14;set_pos(18, y);		cout<<"->";speed = 1;}else if(y == 14){set_pos(18, y);		cout<<"  ";y = 10;set_pos(18, y);		cout<<"->";speed = 0;}}else if(GetAsyncKeyState(VK_RETURN))		break;Sleep(200);}return speed;
}void Tank_War::draw_game_interface()
{draw_rect(0, 0, 78, 0, "◆");draw_rect(0, 23, 78, 23, "◆");draw_rect(0, 1, 0, 22, "◆");draw_rect(58, 1, 58, 22, "◆");draw_rect(78, 1, 78, 22, "◆");int x = 62;set_pos(x, 3);		cout<<"GRADE:0";set_pos(x, 5);		cout<<"LEVEL:1";set_pos(62, 7);		cout<<"↑ UP";set_pos(x, 9);		cout<<"↓ down";set_pos(x, 11);		cout<<"← left";set_pos(x, 13);		cout<<"→ right";set_pos(x, 17);		cout<<"life:■■";set_pos(x+5, 18);	cout<<"■■";lead.set_location(28, 10);lead.paint("■");set_pos(0, 0);
}Tank* Tank_War::create_enemy()
{int n = 0, k = 0;int x = 0, y = 0, dir = 0;Tank *p = NULL;srand((unsigned)time(NULL));while(k != 4){n = rand()%2;if(n%2 == 0){x = 4;			n = rand()%2;if(n%2 == 0)	y = 2;else			y = 21;}else{x = 54;			n = rand()%2;if(n%2 == 0)	y = 2;else			y = 21;}dir = get_random_direction();p = new Tank(x, y, dir, 1);enemy_list.push_back(*p);if(can_move(*p, "enemy")){	break;	}else	{	enemy_list.pop_back();	delete p;	p = NULL;	}k++;}return p;
}
/*
bool Tank::check_is_right(int x, int y, int dir)
{if(distance_squre(x, y, this -> x, this -> y) > 9)return true;else return false;
}
*//*
bool Tank_War::check_is_right(int x, int y, int dir)
{int flag = 0;if(!lead.check_is_right(x, y, dir))	++flag;list<Tank>::iterator it = NULL;for(it=enemy_list.begin(); it!=enemy_list.end(); ++it)if(!it -> check_is_right(x, y, dir))	++flag;if(flag == 0)	return true;else			return false;
}
*/
void Tank_War::supply_enemy()
{int n = N - tot;Tank *p = NULL;for(int i=0; i<n; i++){if((p = create_enemy()) != NULL){tot++;			p -> paint("■");delete p;		p = NULL;}}
}void Missile::paint(string icon)
{set_pos(x, y);	cout<<icon;
}void Tank::paint(string icon)
{draw_rect(x-2, y, x+2, y, icon);draw_rect(x, y-1, x, y+1, icon);if((dir+2)%2 == 0){set_pos(x-dir, y-1);	cout<<icon;set_pos(x-dir, y+1);	cout<<icon;}else if((dir+2)%2 == 1){set_pos(x-2, y-dir);	cout<<icon;set_pos(x+2, y-dir);	cout<<icon;}/*					//不是很好,前面两点的会闪set_pos(x-2, y-1);cout<<"■■■";set_pos(x-2, y);cout<<"■■■";set_pos(x-2, y+1);cout<<"■■■";if((dir+2)%2 == 0){set_pos(x+dir, y-1);	cout<<"  ";set_pos(x+dir, y+1);	cout<<"  ";draw_rect(x-dir, y-1, x-dir, y+1);}else if((dir+2)%2 == 1){set_pos(x-1, y+dir);	cout<<"  ";set_pos(x+1, y+dir);	cout<<"  ";draw_rect(x-2, y-dir, x+2, y-dir);}
*/
}bool Missile::move()
{if(x>2 && x<56 && y>1 && y <22){if((dir+2)%2 == 0){set_pos(x, y);	cout<<"  ";x += dir;		paint("●");}else if((dir+2)%2 == 1){set_pos(x, y);	cout<<"  ";y += dir;		paint("●");}return true;}else{if(x==0 || x==58 || y==0 || y==23)	;else{	set_pos(x, y);	cout<<"  ";}return false;}
}void Tank::move(Tank_War& game, string name)
{if(x>2 && x<56 && y>1 && y <22)if((dir+2)%2 == 0){Tank p(x+dir, y, dir, 1);if(x+dir>2 && x+dir<56){if(game.can_move(p, name)){//draw_rect(x-dir, y-1, x-dir, y+1, "  ");//draw_rect(x+dir, y, x+dir, y, "  ");	//为了解决在角落是的BUGdel_before_move();x+=dir;paint("■");}}else {if(pre_dir > 0)	draw_rect(x+dir, y-1, x+dir, y-1, "  ");else	draw_rect(x+dir, y+1, x+dir, y+1, "  ");paint("■");}}else{Tank p(x, y+dir, dir, 1);if(y+dir>1 && y+dir<22){if(game.can_move(p, name)){del_before_move();y+=dir;paint("■");}}else {if(pre_dir > 0)	draw_rect(x-2, y+dir, x-2, y+dir, "  ");else	draw_rect(x+2, y+dir, x+2, y+dir, "  ");paint("■");}}}void Tank::del_before_move()
{if(pre_dir == dir)	if((dir + 2) % 2 == 0)	draw_rect(x-dir, y-1, x-dir, y+1, "  ");else	draw_rect(x-2 , y-dir, x+2, y-dir, "  ");else if(pre_dir == -dir)	if((dir + 2) % 2 == 0)	draw_rect(x+pre_dir, y, x+pre_dir, y, "  ");else	draw_rect(x , y+pre_dir, x, y+pre_dir, "  ");else if(pre_dir == 2/dir)	if((dir + 2) % 2 == 0)	draw_rect(x-dir, y, x-dir, y-pre_dir, "  ");else	draw_rect(x, y-dir, x-pre_dir, y-dir, "  ");elseif((dir + 2) % 2 == 0)	draw_rect(x-dir, y, x-dir, y-pre_dir, "  ");else	draw_rect(x, y-dir, x-pre_dir, y-dir, "  ");
}bool Tank_War::can_move(Tank& tank, string name)
{if(name == "lead"){list<Tank>::iterator it = NULL;if(enemy_list.size() != 0){for(it=enemy_list.begin(); it!=enemy_list.end(); it++){if(!can_move(*it, tank))	return false;}}}else{int flag = 0;if(!can_move(lead, tank))	return false;list<Tank>::iterator it = NULL;if(enemy_list.size() != 0){for(it=enemy_list.begin(); it!=enemy_list.end(); it++){	if(!can_move(*it, tank)) flag++;/*if(tank == *it)	{if(flag)	flag = false;else		return false;}else{if(!can_move(tank,tank.get_dir() , *it))	return false;}*/}if(flag!=1) return false;else return true;}}return true;
}bool Tank_War::can_move(Tank& tank_1, Tank& tank_2)
{int x_1 = 0, x_2 = 0, y_1 = 0, y_2 = 0;int dis = tank_1.distance_squre(tank_2);if(dis > 8)	return true;else if(dis == 8){if((tank_1.get_dir()+2)%2 == 0){if(tank_1.get_dir() > 0)	{x_1 = tank_1.get_x();	x_2 = tank_2.get_x();y_1 = tank_1.get_y();	y_2 = tank_2.get_y();}else{x_1 = tank_2.get_x();	x_2 = tank_1.get_x();y_1 = tank_2.get_y();	y_2 = tank_1.get_y();}if(x_1 > x_2){if(y_1 > y_2){if(tank_2.get_dir() == tank_1.get_dir() || tank_2.get_dir() == 2/tank_1.get_dir())	return true;else	return false;}else{if(tank_2.get_dir() == tank_1.get_dir() || tank_2.get_dir() == -2/tank_1.get_dir())	return true;else	return false;}}else		return true;}else{if(tank_1.get_dir() > 0)	{x_1 = tank_1.get_x();	x_2 = tank_2.get_x();y_1 = tank_1.get_y();	y_2 = tank_2.get_y();}else{x_1 = tank_2.get_x();	x_2 = tank_1.get_x();y_1 = tank_2.get_y();	y_2 = tank_1.get_y();}if(y_1 > y_2){if(x_1 > x_2){if(tank_2.get_dir() == tank_1.get_dir() || tank_2.get_dir() == 2/tank_1.get_dir())	return true;else	return false;}else{if(tank_2.get_dir() == tank_1.get_dir() || tank_2.get_dir() == -2/tank_1.get_dir())	return true;else	return false;}}else		return true;}}else if(dis == 5)	{	//static int d=0;d++;set_pos(20,20+d);cout<<dis<<"D"<<endl;if((tank_1.get_dir()+2)%2 == 0){if(tank_1.get_dir() > 0)	{x_1 = tank_2.get_x();	x_2 = tank_1.get_x();y_1 = tank_2.get_y();	y_2 = tank_1.get_y();}else{x_1 = tank_1.get_x();	x_2 = tank_2.get_x();y_1 = tank_1.get_y();	y_2 = tank_2.get_y();}if(x_1 > x_2){if(y_1 > y_2){if(tank_2.get_dir() == -tank_1.get_dir() || tank_2.get_dir() == -2/tank_1.get_dir())	return true;else	return false;}else{if(tank_2.get_dir() == -tank_1.get_dir() || tank_2.get_dir() == -2/tank_1.get_dir())	return true;else	return false;}}else		return false;}else{if(tank_1.get_dir() < 0)	{x_1 = tank_1.get_x();	x_2 = tank_2.get_x();y_1 = tank_1.get_y();	y_2 = tank_2.get_y();}else{x_1 = tank_2.get_x();	x_2 = tank_1.get_x();y_1 = tank_2.get_y();	y_2 = tank_1.get_y();}if(y_1 > y_2){if(x_1 > x_2){if(tank_2.get_dir() == -tank_1.get_dir() || tank_2.get_dir() == -2/tank_1.get_dir())	return true;else	return false;}else{if(tank_2.get_dir() == -tank_1.get_dir() || tank_2.get_dir() == 2/tank_1.get_dir())	return true;else	return false;}}else		return false;}}else		return false;
}bool Object::is_failure()
{if(life != 0)	return false;else			return true;
}void Tank::emission_missile()
{Missile p;if((dir+2)%2 == 0)p.set_info(x+2*dir, y, dir);else if((dir+2)%2 == 1)p.set_info(x, y+2*dir, dir);missile_list.push_back(p);if(p.get_x()==0 || p.get_x()==58 || p.get_y()==0 || p.get_y()==23)	;else			p.paint("■");Sleep(100);
}void Tank::missile_move()
{list<Missile>::iterator it = NULL;if(missile_list.size() != 0)			//这里一定要判空for(it=missile_list.begin(); it!=missile_list.end(); it++){if(!it -> move())it = missile_list.erase(it);		//删除此步后当前迭代器会“失效”}
}void Tank_War::check_missile(string name)
{if(name == "lead")lead.check_missile(*this, "lead");else{list<Tank>::iterator it = NULL;for(it = enemy_list.begin(); it != enemy_list.end(); it++)it -> check_missile(*this, "enemy");}
}void Tank::check_missile(Tank_War &game, string name)
{list<Missile>::iterator it_1 = NULL;list<Tank>::iterator it_2 = NULL;if(name == "lead"){if(missile_list.size() != 0)for(it_1=missile_list.begin(); it_1!= missile_list.end(); it_1++){for(it_2=game.get_enemy_list_begin(); it_2!=game.get_enemy_list_end(); it_2++)if(it_1 != missile_list.end())if(check_missile_strike(*it_1, *it_2))	{it_1 = missile_list.erase(it_1);if(it_2 -> is_failure()){game.increase_grade();it_2 -> paint("  ");it_2 = game.remove_from_enemy_list(it_2);game.reduce_tot();}}	}}else{if(missile_list.size() != 0){if(it_1 != missile_list.end())for(it_1=missile_list.begin(); it_1!= missile_list.end(); it_1++)if(check_missile_strike(*it_1, *(game.get_lead())))	{it_1 = missile_list.erase(it_1);if(game.get_lead() -> is_failure())		game.game_over();else {game.get_lead() -> paint("  ");game.get_lead() -> set_location(28, 10);game.get_lead() -> paint("■");}}if(it_1 != missile_list.end())for(it_1=missile_list.begin(); it_1!= missile_list.end(); it_1++){for(it_2=game.get_enemy_list_begin(); it_2!=game.get_enemy_list_end(); it_2++)if(check_missile_strike(*it_1, *it_2))	{it_1 = missile_list.erase(it_1);it_2 -> increase_blood();}}}}
}bool Tank::check_missile_strike(Missile& missile, Tank& tank)
{int dis = 0;if((dis = distance_squre(missile.get_x(), missile.get_y(), tank.get_x(), tank.get_y())) <= 2){if(dis == 2){}else{missile.reduce_blood();tank.reduce_blood();missile.paint("  ");return true;}}return false;
}void Tank_War::enemy_move()
{int n = 0;srand((unsigned)time(NULL));list<Tank>::iterator it = NULL;if(enemy_list.size() != 0){for(it=enemy_list.begin(); it != enemy_list.end(); it++){it -> missile_move();n = rand()%3;if(n == 0)if(can_move(*it, "enemy")){n = get_random_direction();it -> set_dir(n);it->move(*this, "enemy");}n = rand()%8;if(n == 0)	it -> emission_missile();}}
}int Tank::distance_squre(int x_1, int y_1, int x_2, int y_2)
{return (x_2 - x_1) * (x_2 - x_1) + (y_2 - y_1) * (y_2 - y_1);
}int Tank::distance_squre(Tank& tank_2)
{return distance_squre(x/2, y, tank_2.get_x()/2, tank_2.get_y());
}int Tank_War::get_random_direction()
{int n = 0;srand((unsigned)time(NULL));if((n = rand()%4) < 2)		n -= 2;else		n -= 1;return n;
}

 

 

程序截图

首页

6e5ec33a8cee48ec9a8b3815a83072c7.png

 

 

程序执行界面

e0bd744179ac47c89c6b96f0c347b0ba.png

 

 

 

 

 

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

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

相关文章

Python编程的终极十大工具

Python一直以来都是程序员们的首选编程语言之一&#xff0c;其灵活性和功能强大的库使其成为解决各种问题的理想选择。在本文中&#xff0c;我们将介绍Python编程的终极十大工具&#xff0c;这些工具可以帮助您在各种领域取得成功&#xff0c;无论您是初学者还是经验丰富的开发…

面试(四)

目录 1. 组长安排了一个不可能完成的任务&#xff0c;怎么拒绝&#xff1f; 2.讲一下Freertos的机器人 3. Freertos的中断 4. Freertos功能 5. 树莓派怎么识别二维码&#xff1f; 6. Linux脚本作用&#xff1f; 7. Modbus&#xff1f; 8. freertos的动态创建和静态创建…

【C++】C++的内存管理

目录 内存分布 动态内存管理 C语言的动态内存管理 C的动态内存管理 对内置类型操作 对自定义类型操作 new[]和delete[] 开空间的细节 探讨匹配问题 定位new表达式 内存分布 栈&#xff1a;存放非静态局部变量&#xff0c;函数参数&#xff0c;返回值等。栈是向下增长…

【数字电路与系统】【北京航空航天大学】实验:时序逻辑设计——三色灯开关(五)、小结

本次实验&#xff08;一&#xff09;见博客&#xff1a;【数字电路与系统】【北京航空航天大学】实验&#xff1a;时序逻辑设计——三色灯开关&#xff08;一&#xff09;、实验指导书 本次实验&#xff08;二&#xff09;见博客&#xff1a;【数字电路与系统】【北京航空航天…

大语言模型——涌现能力

在现有文献中,大语言模型的涌现能力被非形式化定义为在小型模型中不存在但在大模型中出现的能力”,具体是指当模型扩展到一定规模时,模型的特定任务性能突然出现显著跃升的趋势,远超过随机水平。类比而言,这种性能涌现模式与物理学中的相变现象有一定程度的相似,但是仍然…

如何在Android应用中安全地使用SQLite数据库,并通过SQLCipher进行加密保护

Android内置SQLite轻量级关系型数据库,可以在Android应用中存储、检索和管理结构化数据。SQLite是一个无服务器的、零配置的、事务性的SQL数据库引擎,非常适合用于移动设备和桌面应用程序中。 SQLite特点: 「轻量级」:SQLite不需要单独的服务器进程或操作系统级别的配置。…

Vim学习笔记01~04

第01章&#xff1a; 遁入空门&#xff0c;模式当道 1.什么是vim Vim是一个高效的文本编辑工具&#xff0c;并且可以在编程开发过程中发挥越来越重要的作用。 事实上&#xff0c;有不少编程高手使用他们来进行代码的开发&#xff0c;并且对此赞不绝口。 2.本系列目的 但是让…

微信小程序按钮点击时的样式hover-class=“hover“

小程序的button组件很好用&#xff0c;按钮点击的时候会显示点击状态&#xff0c;默认的就是颜色加深 但是我们改变了button的背景色之后&#xff0c;就看不出点击效果了&#xff0c;解决起来也很简单 关键代码就是小程序的 hover-class 属性&#xff0c;需要注意的是&#xff…

C 语言实例 - 计算 int, float, double 和 char 字节大小

使用 sizeof 操作符计算int, float, double 和 char四种变量字节大小。 sizeof 是 C 语言的一种单目操作符&#xff0c;如C语言的其他操作符、–等&#xff0c;它并不是函数。 sizeof 操作符以字节形式给出了其操作数的存储大小。 #include <stdio.h>int main() {int …

代码随想录算法训练营Day8 | ● 344.反转字符串● 541. 反转字符串II● 54.替换数字● 151.翻转字符串里的单词● 55.右旋转字符串

&#xff08;记得重学&#xff09; ● 344.反转字符串 题目&#xff1a;编写一个函数&#xff0c;其作用是将输入的字符串反转过来。输入字符串以字符数组 s 的形式给出。 不要给另外的数组分配额外的空间&#xff0c;你必须原地修改输入数组、使用 O(1) 的额外空间解决这一…

让Springboot JpaAuditing 支持ZonedDateTime

我们项目需要支持国际化&#xff0c;那么日期时间就需要有时区了&#xff0c;否则我们在今天早上9点干的事&#xff0c;人家美国人看到的是明天的时间。所以我们在Auditable中的创建时间和更新时间我们都定义为ZonedDateTime. 然而在保存的时候却抛出如下错误&#xff1a; Cau…

Qt [获取Dump] 使用WindowsAPI实现生成MiniDump文件

说明 客户现场的软件偶发崩溃是程序开发者&#xff0c;比较头疼的事情。如何更快速的定位到问题点和解决掉&#xff0c;是开发应该具备的基本能力。 Windows提供了一系列的API&#xff0c;可以记录软件崩溃前的堆栈信息。下面就实现一个生成Dump文件的程序实例。 主要代码 回…

计算机系列之输入输出、中断、总线、可靠性、操作系统、进程管理、同步互斥

9、输入输出-中断-总线-可靠性 1、输入输出技术、中断 1、内存与接口地址的编址方法&#xff08;了解概念即可&#xff09; 计算机系统中存在多种内存与接口地址的编址方法&#xff0c;常见的是下面两种&#xff1a;&#xff08;了解概念即可&#xff09; 1&#xff09;内存…

ai大模型应用开发

随着人工智能技术的飞速发展&#xff0c;AI大模型应用开发已成为一个日益重要的领域。本文将从专业角度深入探讨AI大模型的应用开发&#xff0c;并思考其未来的深度影响和逻辑性。 编辑搜图 请点击输入图片描述&#xff08;最多18字&#xff09; ​【一、AI大模型的定义与特点…

Practice Exam: Oracle Cloud Infrastructure Generative AI Professional

Practice Exam: Oracle Cloud Infrastructure Generative AI Professional 1. In the simplified workflow for managing and querying vector data, what is the role of indexing?2. In which scenario is soft prompting appropriate compared to other training styles?3…

ASP.NET Core 3 高级编程(第8版) 学习笔记 03

本篇介绍原书的第 18 章&#xff0c;为 19 章 Restful Service 编写基础代码。本章实现了如下内容&#xff1a; 1&#xff09;使用 Entity Framework Core 操作 Sql Server 数据库 2&#xff09;Entity Framework Core 数据库迁移和使用种子数据的方法 3&#xff09;使用中间件…

Babylon.js 读取GLB模型元数据

如果你熟悉将 3D 资源导出到游戏引擎的过程&#xff0c;那么无疑也会熟悉 3D 资源的 PBR 和 GLB 导出过程。 这是我们之前概述的内容&#xff0c;也是我们交互式工作的所有资产准备的基石。 然而&#xff0c;从传统的管道意义上来说&#xff0c;能够用元数据标记网格有很多逻辑…

通配符HTTPS安全证书

众多类型的SSL证书&#xff0c;要说适用或者说省钱肯定是通配符了&#xff0c;因为谁都想一本SSL证书包括了整条域名&#xff0c;而且也不用一条一条单独管理。 通配符HTTPS安全证书&#xff0c;其实就是通配符SSL证书&#xff0c;SSL证书主流CA的参数都一样&#xff0c;通配符…

【MHA】MySQL高可用MHA介绍8-常见错误以及解决

目录 MHA Node 未安装在 MySQL 服务器上 找不到主服务器的二进制日志 没有对二进制/中继日志授予读权限 使用多主复制&#xff08;不受支持&#xff09; 这些日志是 MHA Manager 在执行故障检测和故障切换过程中遇到的一些问题的记录。让我为您解释一下每个错误消息的含义&…

武汉星起航:亚马逊助力中国卖家扬帆出海,迎来跨境电商新机遇

2015年&#xff0c;亚马逊全球开店业务正式踏入中国这片充满活力和潜力的市场&#xff0c;此举不仅为中国卖家提供了前所未有的跨境电商新机遇&#xff0c;更为其发展出口业务、拓展全球市场、打造国际品牌铺设了一条坚实的道路。亚马逊作为国际版的电商购物平台&#xff0c;其…