主頁 >  其他 > Easyx-----c++實作飛機大戰

Easyx-----c++實作飛機大戰

2021-12-27 08:51:05 其他

公共的頭檔案 common.h

#pragma once
#include <graphics.h>
#include <iostream>
#include <string>
#include <map>
#include <list>
#include <thread>
#include <vector>
#include <ctime>
#include <mmsystem.h>
#pragma comment(lib,"winmm.lib")
using namespace std;

管理資源 res.h --- 單例設計模式

#pragma once
#include "common.h"
class Res 
{
private:
	Res();    //建構式私有化
public:       //提供公有介面
	static int WIDTH(string name);    //通過圖片的鍵,獲取資源寬度
	static int HEIGHT(string name);
	static Res* GetInstance();        //獲取資源(類)的物件---唯一的物件
	static void DrawIMG(int x, int y, string name);//畫圖片的位置,通過鍵去找畫哪張圖片
//畫角色---位置,通過姓名的方式去找  不同型別的角色,用preIndex去做標識
	static void DrawRole(int x, int y, string name, int preIndex);
//播放音樂---windows多執行緒 DWORD型別,WINAPI修飾
	static DWORD WINAPI PlayMusic(LPVOID lparame);
	~Res();
public:
	static map<string, IMAGE*> img;		//圖片資源---圖片存在map中
	static map<string, string> music;	//音樂資源
};

res.cpp

#include "res.h"
map<string, IMAGE*> Res::img;   //圖片資源    靜態資料成員在類外初始化,類名限定
map<string, string> Res::music;	//音樂資源
Res::Res()                      //建構式為資料成員初始化---路徑下處理
{
//背景
    string background = "./res/background.jpg";
//角色---4張---背景圖+掩碼圖
    string roleImg[4] = { "./res/planeNormal_1.jpg","./res/planeNormal_2.jpg",
    "./res/planeExplode_1.jpg","./res/planeExplode_2.jpg" };
//子彈
    string ballImg[2] = { "./res/bullet1.jpg","./res/bullet2.jpg" };
//敵機
    string enemyImg[4] = { "./res/enemy_1.jpg","./res/enemy_2.jpg","./res/enemyPlane1.jpg","./res/enemyPlane2.jpg" };
    //string --->IMAGE* 本來就是指標,不需要取地址
    img["背景"] = new IMAGE;
    img["角色"] = new IMAGE[4];
    img["子彈"] = new IMAGE[2];
    img["敵機"] = new IMAGE[4];
    loadimage(img["背景"], background.c_str());    //加載圖片    路徑 專案屬性多位元組 
    for (int i = 0; i < 4; i++)
    {
/*假設img["角色"]為p,則p=new IMAGE [4];則img["角色"]+i  等效: p+i*/
        loadimage(img["角色"] + i, roleImg[i].data());    //用.data或.cst()轉換為字串
        loadimage(img["敵機"] + i, enemyImg[i].data());   
    }
    for (int i = 0; i < 2; i++) 
    {
        loadimage(img["子彈"] + i, ballImg[i].c_str());
    }

}
//獲取圖片的寬度---碰撞的時候需要---回傳物件指標,物件指標呼叫(img型別)資料成員,有一個成員函式
int Res::WIDTH(string name)
{
//獲取物件,獲取什么樣的屬性,(img型別)資料成員有一個getwidth()成員函式---是庫中的成員函式
    return GetInstance()->img[name]->getwidth(); 
}
//獲取圖片的高度
int Res::HEIGHT(string name)
{
    return GetInstance()->img[name]->getheight();
}
Res* Res::GetInstance()
{
    static Res* res = new Res;
    return res;
}
//只有一張圖片的貼圖: 背景圖貼圖
void Res::DrawIMG(int x, int y, string name)
{
    putimage(x, y, GetInstance()->img[name]);    //貼圖 在x,y位置貼物件里面的圖片
}
void Res::DrawRole(int x, int y, string name, int preIndex)
{
//多張圖片貼圖---透明貼圖---去背景
    putimage(x, y, GetInstance()->img[name] + preIndex, NOTSRCERASE);//貼第幾張---幀數
    putimage(x, y, GetInstance()->img[name] + preIndex+1, SRCINVERT);
}
DWORD __stdcall Res::PlayMusic(LPVOID lparame)
{
    int key = (int)lparame;    //執行緒處理函式的引數---強轉為int
    switch (key)               //不同的音樂,型別不一樣
    {
    case 1:
        mciSendString("close ./res/f_gun.mp3", 0, 0, 0);    //播放前先關閉
        mciSendString("open ./res/f_gun.mp3", 0, 0, 0);     //先打開,后播放
        mciSendString("play ./res/f_gun.mp3", 0, 0, 0);
        break;
    case 2:
        mciSendString("close ./res/5.mp3", 0, 0, 0);
        mciSendString("open ./res/5.mp3", 0, 0, 0);
        mciSendString("play ./res/5.mp3", 0, 0, 0);
        break;
    case 3:
        mciSendString("close ./res/10.mp3", 0, 0, 0);
        mciSendString("open ./res/10.mp3", 0, 0, 0);
        mciSendString("play ./res/10.mp3", 0, 0, 0);
        break;
    }
    return 0;
}
Res::~Res()
{
    delete img["背景"];
    delete[] img["角色"];
    delete[] img["敵機"];
    delete[] img["子彈"];
}

打飛機游戲.cpp 主函式部分

#include "control.h"
#include "graph.h"
#include "role.h"
#include "enemy.h"
int main() 
{
	srand((unsigned int)time(NULL));    //隨機函式種子---位置不同
	Graph* pMap = new Graph;
	Role* pRole = new Role;
	Enemy* pEnemy = new Enemy;
	Control* pControl = new Control(pMap, pRole, pEnemy);
	BeginBatchDraw();         //雙緩沖繪圖
	while (1) 
	{
		cleardevice();        //清屏
		pControl->DrawMap();  //畫地圖
		pControl->DrawRole(); //畫角色
		pControl->DrawEnemy();//打敵機前畫敵機
		pControl->PlayEemey();

		FlushBatchDraw();     //顯示 執行未完成的繪制任務
	}
	EndBatchDraw();
	return 0;
}

point.h 無論是飛機移動還是子彈移動,本質都是坐標的改變 - - - 處理點的變化

#pragma once
#include "common.h"
class Point 
{
public:
	enum Dir {left,right,down,up}; //列舉點移動的方向,不同的移動方向點的改變是不一樣的
	Point(int x = 0, int y = 0);
	Point(const Point& point);     //拷貝構造---點與點之間的賦值
	int& getX();                   //外部介面,獲取點的坐標
	int& getY();
	//移動點
	void move(int speed, Dir dir); //移動速度 方向---決定坐標如何變化

protected:
	int x;
	int y;
};
/* 敵機從上往下移動   角色可以上下左右移動
   s形敵機可以增加x方向增量,增加y方向增量 */

point.cpp

#include "point.h"
Point::Point(int x, int y):x(x),y(y)
{
}
Point::Point(const Point& point)
{
    this->x = point.x;
    this->y = point.y;
}
int& Point::getX()
{
    // TODO: 在此處插入 return 陳述句
    return x;
}
int& Point::getY()
{
    // TODO: 在此處插入 return 陳述句
    return y;
}
void Point::move(int speed, Dir dir)    //根據方向移動
{
    switch (dir) 
    {
    case Point::left:
        this->x -= speed;
        break;
    case Point::right:
        this->x += speed;
        break;
    case Point::up:
        this->y -= speed;
        break;
    case Point::down:
        this->y += speed;
        break;
    }
}

element.h 敵機和飛機方向不同,其他基本相同 - - - 抽象元素類

#pragma once
#include "common.h"
#include "point.h"
//所有的敵機和角色 都是由這個類進行派生的
class Element 
{
public:
	virtual ~Element();    //子類物件初始化父類指標
	Element();
	Element(int x, int y, string name, bool live, int hp = 0);
	int& GetX();
	int& GetY();
	bool& GetLive();
	int& GetHp();
	int GetWidth();        //獲取寬度,高度
	int GetHeight();
	void DrawElement(int pre);    //畫元素---畫第幾張
	void MoveElement(int speed, Point::Dir dir); //移動元素

protected:
	Point point;		//元素在視窗上的位置
	string name;		//元素的名字
	bool live;			//存在的標記---敵機/子彈會消失
	int hp;				//血量
};

element.cpp

#include "element.h"
#include "res.h"
int Element::GetWidth()
{
    return Res::GetInstance()->WIDTH(name);
//  return Res::GetInstance()->img[name]->getwidth();   在類IMAGE中為公有屬性
}
int Element::GetHeight()
{
    return Res::GetInstance()->HEIGHT(name);
}
//在資源檔案中封裝了移動程序,呼叫資源中的函式即可---畫角色
void Element::DrawElement(int pre)
{
    Res::GetInstance()->DrawRole(point.getX(), point.getY(), name, pre);
}
//點的移動
void Element::MoveElement(int speed, Point::Dir dir) 
{
    point.move(speed, dir);
}
Element::~Element()
{
}
Element::Element()
{

}
//類的組合必須采用初始化引數串列
Element::Element(int x, int y, string name, bool live, int hp):point(x,y),name(name)
{
    this->live = live;
    this->hp = hp;
}
int& Element::GetX()
{
    // TODO: 在此處插入 return 陳述句
    return point.getX();    //用point存放這個點,獲取這個點應回傳point里面的x坐標
}
int& Element::GetY()
{
    // TODO: 在此處插入 return 陳述句
    return point.getY();
}
bool& Element::GetLive()
{
    // TODO: 在此處插入 return 陳述句
    return live;
}
int& Element::GetHp()
{
    // TODO: 在此處插入 return 陳述句
    return hp;
}

role.h - - - 角色移動、角色發射子彈

#pragma once
#include "common.h"
class Element;
class Role 
{
public:
	Role();
	~Role();
	void DrawPlane(int preIndex);    //第幾幀
	void MovePlane(int speed);       //速度
	void DrawBullet();               //畫子彈
	void MoveBullet(int speed);      //移動子彈---移動速度
	Element*& GetPlane();            //外部做按鍵操作,需要訪問飛機和子彈
	list<Element*>& GetBullet();  

protected:
	Element* plane;			//角色---用元素實體化一個角色---角色也是元素之一
	list<Element*> bullet;	//子彈---一個飛機有多個子彈(包含多個元素的物件)子彈也是元素
};

role.cpp

#include "role.h"
#include "res.h"
#include "element.h"
#include "Timer.hpp"
Role::Role()            //new一個元素類即可---把飛機放視窗正中間
{
	plane = new Element(
		Res::GetInstance()->WIDTH("背景") / 2 - Res::GetInstance()->WIDTH("角色") / 2  //x
		, Res::GetInstance()->HEIGHT("背景") - Res::GetInstance()->HEIGHT("角色"),	  //y
		"角色",	//name
		true,	//live
		100);   //hp
}
Role::~Role()
{

}
void Role::DrawPlane(int preIndex)    //畫飛機
{
	plane->DrawElement(preIndex);
}
void Role::MovePlane(int speed)       //移動飛機---結合按鍵控制   異步處理的按鍵操作
{
	if (GetAsyncKeyState(VK_UP) && plane->GetY() >= 0) //往上走Y不能超過上邊界
	{
		plane->MoveElement(speed, Point::up);          //改變飛機的點---移動元素
	}
                                                       //往下走<=(背景高度-角色高度)
	if (GetAsyncKeyState(VK_DOWN) &&                   
		plane->GetY()<=Res::GetInstance()->HEIGHT("背景")-Res::GetInstance()->HEIGHT("角色"))
	{
		plane->MoveElement(speed, Point::down);
	}
                                                       //往右走<=(背景寬度-角色寬度)
	if (GetAsyncKeyState(VK_RIGHT) && 
		plane->GetX() <= Res::GetInstance()->WIDTH("背景") - Res::GetInstance()->WIDTH("角色"))
	{
		plane->MoveElement(speed, Point::right);
	}
                                                        //往左走X不能小于左邊界
	if (GetAsyncKeyState(VK_LEFT) && plane->GetX() >= 0)
	{
		plane->MoveElement(speed, Point::left);
	}
	//子彈產生---按空格發射子彈---用定時器控制速度---100毫秒產生1顆子彈
	if (GetAsyncKeyState(VK_SPACE)&&MyTimer::Timer(100,0))    
	{
//添加音樂  呼叫Windows中的創建執行緒函式---函式指標 傳入執行緒處理函式---播放第一個音樂
		HANDLE threadID = CreateThread(NULL, 0, Res::PlayMusic, (int*)1, 0, 0);
		bullet.push_back(new Element(plane->GetX() + 45, plane->GetY() - 10, "子彈", 1));    //尾插法 按一下空格new一個子彈    子彈的坐標在飛機坐標的正上方的中間
		CloseHandle(threadID);    //通過回傳值關閉執行緒
	}
	MoveBullet(1);    //移動子彈
	DrawBullet();     //畫子彈 
}
void Role::DrawBullet()    //子彈存在容器中,每顆子彈都要畫出來
{
	for (auto v : bullet)  //迭代器遍歷
	{
		if (v->GetLive())      //判斷子彈能否畫出來
		{
			v->DrawElement(0); //序號0,子彈只有2張
		}
	}
}
void Role::MoveBullet(int speed)    //每顆子彈都要移動---從下往上走
{
	for (auto v : bullet)      
	{
		v->GetY() -= speed;
	}
}
Element*& Role::GetPlane()
{
	// TODO: 在此處插入 return 陳述句
	return plane;
}
list<Element*>& Role::GetBullet()
{
	// TODO: 在此處插入 return 陳述句
	return bullet;
}
//每產生一個子彈就播放音樂,回傳值為HANDLE型別

control.h 控制整個游戲的運行 - - - 中驅

#pragma once
class Graph;
class Role;
class Enemy;
class Control 
{
public:
	Control(Graph* pMap = nullptr, Role* pRole = nullptr,Enemy* pEnemy=nullptr);
	~Control();
	void DrawMap();
	void DrawRole();
	void DrawEnemy();    //畫敵機
	void PlayEemey();    //打敵機

protected:
	//所有組成部分
	Role* pRole;    //角色
	Graph* pMap;    //地圖
	Enemy* pEnemy;  //敵機
};

control.cpp - - - 封裝實作細節 - - - 主函式中呼叫控制類物件即可

#include "control.h"
#include "role.h"
#include "graph.h"    //地圖
#include "timer.hpp"
#include "enemy.h"
#include "element.h"
#include "res.h"

Control::Control(Graph* pMap, Role* pRole, Enemy* pEnemy )
{
	this->pMap = pMap;
	this->pRole = pRole;
	this->pEnemy = pEnemy;
}
Control::~Control()
{

}
void Control::DrawMap()
{
	pMap->DrawMap();
}

void Control::DrawRole()
{
	pRole->DrawPlane(0);    //第0幀
	pRole->MovePlane(1);    //速度
}
//每一秒產生一個敵機(產生不能過于頻繁)---產生一個敵機就把它放到容器中
void Control::DrawEnemy()
{
	if (MyTimer::Timer(1000, 1)) 
	{
		pEnemy->GetEnemy().push_back(pEnemy->createEnemy());
	}
	if (MyTimer::Timer(10, 2))   //十毫秒移動一個飛機   2號定時器
	{
		pEnemy->MoveEnemy(1);    //速度
	}
	pEnemy->DrawEnemy(0);        //只畫1種敵機
}

void Control::PlayEemey()        //矩形與矩形的判斷
{
	//1.碰撞處理: 碰到子彈,把子彈的live置為0---只處理標記
	for (auto bullet : pRole->GetBullet()) //獲取子彈的資訊
	{
		if (bullet->GetLive() == 0)        //如果子彈標記==0繼續往下找
			continue;
		if (bullet->GetY() < 0)            //如果超出視窗邊界,把標記置為false
			bullet->GetLive() = false;
		for (auto enemy : pEnemy->GetEnemy()) //與子彈的碰撞處理 大前提---敵機存在
		{
			if(enemy->GetLive()&&
				bullet->GetX()>enemy->GetX()&&
				bullet->GetX()<enemy->GetX()+Res::WIDTH("敵機")&&
				bullet->GetY() > enemy->GetY() &&
				bullet->GetY() < enemy->GetY() + Res::HEIGHT("敵機")) 
			{
				enemy->GetHp()--;            //相交,血量減少
				if (enemy->GetHp() <= 0)
				{
					enemy->GetLive() = false; //把敵機標記置為false---不做消失處理
				}
				bullet->GetLive() = false;    //碰到敵機后子彈要消失   
			}
			//敵機出了視窗邊界要消失
			if (enemy->GetY() >= Res::HEIGHT("背景")) 
			{
				enemy->GetLive() = false;
			}
		}
	}
	//2.通過標記去洗掉相應的資料--->記憶體管理    遍歷敵機
	for (auto iterE = pEnemy->GetEnemy().begin(); iterE != pEnemy->GetEnemy().end();) 
	{
		if ((*iterE)->GetLive() == false)     //當前敵機標記為false--->洗掉敵機
		{
			iterE = pEnemy->GetEnemy().erase(iterE);
		}
		else 
		{
			iterE++;        //++不要寫在for回圈中
		}
	}
//遍歷子彈---子彈洗掉
	for (auto iterB = pRole->GetBullet().begin(); iterB != pRole->GetBullet().end();)
	{
		if ((*iterB)->GetLive() == false)
		{
			iterB = pRole->GetBullet().erase(iterB);
		}
		else
		{
			iterB++;
		}
	}
}

graph.h - - - 地圖(視窗類)

#pragma once
class Graph 
{
public:
	Graph();
	~Graph();
	void DrawMap();
};

graph.cpp

#include "graph.h"
#include "res.h"
Graph::Graph()
{
	initgraph(Res::GetInstance()->img["背景"]->getwidth(),
		Res::GetInstance()->img["背景"]->getheight());
	mciSendString("open ./res/game_music.mp3", 0, 0, 0); //在視窗創建出來后添加音樂
	mciSendString("play ./res/game_music.mp3 repeat", 0, 0, 0); //重復播放
}

Graph::~Graph()
{
	closegraph();    //物件沒了就關閉視窗
}

void Graph::DrawMap()
{
	Res::DrawIMG(0, 0, "背景");
}

time.hpp - - - 定義和實作寫一起,用hpp做結尾 用時間控制子彈的發射 - - - 定時器

#pragma once
#include "common.h"
class MyTimer 
{
public:
	static bool Timer(int duration, int id)     //時間間隔    id
	{
		static int startTime[10];               //開始時間---靜態變數自動初始化為0
		int endTime = clock();                  //結束時間
		if (endTime - startTime[id] >= duration)//結束時間-開始時間>=時間間隔
		{
			startTime[id] = endTime;            //把原來的結束時間改為新的開始時間
			return true;
		}
		return false;
	}

};

enemy.h 敵機

#pragma once
#include "common.h"
class Element;
class Enemy
{
public:
	Enemy();
	~Enemy();
	void DrawEnemy(int preIndex);  //畫第幾張
	void MoveEnemy(int speed);
	Element* createEnemy();        //創建敵機
	list<Element*>& GetEnemy();    //訪問敵機---需要做碰撞檢測
protected:
	list<Element*> enemyPlane;     //(存盤)多個敵機
};

enemy.cpp

#include "enemy.h"
#include "element.h"
#include "res.h"
Enemy::Enemy()
{

}
Enemy::~Enemy()
{

}
void Enemy::DrawEnemy(int preIndex)
{
    for (auto v : enemyPlane) //畫元素
    {
        if (v->GetLive())     //判斷敵機是否存在
        {
            v->DrawElement(preIndex);
        }
    }
}
void Enemy::MoveEnemy(int speed)
{
    for (auto v : enemyPlane) 
    {
        v->MoveElement(speed, Point::down);    //速度    方向
    }
}
Element* Enemy::createEnemy()  //獲取視窗寬高---隨機x,y坐標 從視窗上邊界出來 速度 血量
{
    return new Element(rand()%Res::GetInstance()->WIDTH("背景"),
        -1*Res::GetInstance()->HEIGHT("敵機"),"敵機",1, 3); 
}
list<Element*>& Enemy::GetEnemy()
{
    // TODO: 在此處插入 return 陳述句
    return enemyPlane;    //回傳一個容器
}

采用多執行緒的方式播放音樂

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/394090.html

標籤:其他

上一篇:unity3d c#熱多載-邊運行邊改代碼

下一篇:舍友僅僅打了一把游戲,我就學會了如何找鏈表的中間結點

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 網閘典型架構簡述

    網閘架構一般分為兩種:三主機的三系統架構網閘和雙主機的2+1架構網閘。 三主機架構分別為內端機、外端機和仲裁機。三機無論從軟體和硬體上均各自獨立。首先從硬體上來看,三機都用各自獨立的主板、記憶體及存盤設備。從軟體上來看,三機有各自獨立的作業系統。這樣能達到完全的三機獨立。對于“2+1”系統,“2”分為 ......

    uj5u.com 2020-09-10 02:00:44 more
  • 如何從xshell上傳檔案到centos linux虛擬機里

    如何從xshell上傳檔案到centos linux虛擬機里及:虛擬機CentOs下執行 yum -y install lrzsz命令,出現錯誤:鏡像無法找到軟體包 前言 一、安裝lrzsz步驟 二、上傳檔案 三、遇到的問題及解決方案 總結 前言 提示:其實很簡單,往虛擬機上安裝一個上傳檔案的工具 ......

    uj5u.com 2020-09-10 02:00:47 more
  • 一、SQLMAP入門

    一、SQLMAP入門 1、判斷是否存在注入 sqlmap.py -u 網址/id=1 id=1不可缺少。當注入點后面的引數大于兩個時。需要加雙引號, sqlmap.py -u "網址/id=1&uid=1" 2、判斷文本中的請求是否存在注入 從文本中加載http請求,SQLMAP可以從一個文本檔案中 ......

    uj5u.com 2020-09-10 02:00:50 more
  • Metasploit 簡單使用教程

    metasploit 簡單使用教程 浩先生, 2020-08-28 16:18:25 分類專欄: kail 網路安全 linux 文章標簽: linux資訊安全 編輯 著作權 metasploit 使用教程 前言 一、Metasploit是什么? 二、準備作業 三、具體步驟 前言 Msfconsole ......

    uj5u.com 2020-09-10 02:00:53 more
  • 游戲逆向之驅動層與用戶層通訊

    驅動層代碼: #pragma once #include <ntifs.h> #define add_code CTL_CODE(FILE_DEVICE_UNKNOWN,0x800,METHOD_BUFFERED,FILE_ANY_ACCESS) /* 更多游戲逆向視頻www.yxfzedu.com ......

    uj5u.com 2020-09-10 02:00:56 more
  • 北斗電力時鐘(北斗授時服務器)讓網路資料更精準

    北斗電力時鐘(北斗授時服務器)讓網路資料更精準 北斗電力時鐘(北斗授時服務器)讓網路資料更精準 京準電子科技官微——ahjzsz 近幾年,資訊技術的得了快速發展,互聯網在逐漸普及,其在人們生活和生產中都得到了廣泛應用,并且取得了不錯的應用效果。計算機網路資訊在電力系統中的應用,一方面使電力系統的運行 ......

    uj5u.com 2020-09-10 02:01:03 more
  • 【CTF】CTFHub 技能樹 彩蛋 writeup

    ?碎碎念 CTFHub:https://www.ctfhub.com/ 筆者入門CTF時時剛開始刷的是bugku的舊平臺,后來才有了CTFHub。 感覺不論是網頁UI設計,還是題目質量,賽事跟蹤,工具軟體都做得很不錯。 而且因為獨到的金幣制度的確讓人有一種想去刷題賺金幣的感覺。 個人還是非常喜歡這個 ......

    uj5u.com 2020-09-10 02:04:05 more
  • 02windows基礎操作

    我學到了一下幾點 Windows系統目錄結構與滲透的作用 常見Windows的服務詳解 Windows埠詳解 常用的Windows注冊表詳解 hacker DOS命令詳解(net user / type /md /rd/ dir /cd /net use copy、批處理 等) 利用dos命令制作 ......

    uj5u.com 2020-09-10 02:04:18 more
  • 03.Linux基礎操作

    我學到了以下幾點 01Linux系統介紹02系統安裝,密碼啊破解03Linux常用命令04LAMP 01LINUX windows: win03 8 12 16 19 配置不繁瑣 Linux:redhat,centos(紅帽社區版),Ubuntu server,suse unix:金融機構,證券,銀 ......

    uj5u.com 2020-09-10 02:04:30 more
  • 05HTML

    01HTML介紹 02頭部標簽講解03基礎標簽講解04表單標簽講解 HTML前段語言 js1.了解代碼2.根據代碼 懂得挖掘漏洞 (POST注入/XSS漏洞上傳)3.黑帽seo 白帽seo 客戶網站被黑帽植入劫持代碼如何處理4.熟悉html表單 <html><head><title>TDK標題,描述 ......

    uj5u.com 2020-09-10 02:04:36 more
最新发布
  • 2023年最新微信小程式抓包教程

    01 開門見山 隔一個月發一篇文章,不過分。 首先回顧一下《微信系結手機號資料庫被脫庫事件》,我也是第一時間得知了這個訊息,然后跟蹤了整件事情的經過。下面是這起事件的相關截圖以及近日流出的一萬條資料樣本: 個人認為這件事也沒什么,還不如關注一下之前45億快遞資料查詢渠道疑似在近日復活的訊息。 訊息是 ......

    uj5u.com 2023-04-20 08:48:24 more
  • web3 產品介紹:metamask 錢包 使用最多的瀏覽器插件錢包

    Metamask錢包是一種基于區塊鏈技術的數字貨幣錢包,它允許用戶在安全、便捷的環境下管理自己的加密資產。Metamask錢包是以太坊生態系統中最流行的錢包之一,它具有易于使用、安全性高和功能強大等優點。 本文將詳細介紹Metamask錢包的功能和使用方法。 一、 Metamask錢包的功能 數字資 ......

    uj5u.com 2023-04-20 08:47:46 more
  • vulnhub_Earth

    前言 靶機地址->>>vulnhub_Earth 攻擊機ip:192.168.20.121 靶機ip:192.168.20.122 參考文章 https://www.cnblogs.com/Jing-X/archive/2022/04/03/16097695.html https://www.cnb ......

    uj5u.com 2023-04-20 07:46:20 more
  • 從4k到42k,軟體測驗工程師的漲薪史,給我看哭了

    清明節一過,盲猜大家已經無心上班,在數著日子準備過五一,但一想到銀行卡里的余額……瞬間心情就不美麗了。最近,2023年高校畢業生就業調查顯示,本科畢業月平均起薪為5825元。調查一出,便有很多同學表示自己又被平均了。看著這一資料,不免讓人想到前不久中國青年報的一項調查:近六成大學生認為畢業10年內會 ......

    uj5u.com 2023-04-20 07:44:00 more
  • 最新版本 Stable Diffusion 開源 AI 繪畫工具之中文自動提詞篇

    🎈 標簽生成器 由于輸入正向提示詞 prompt 和反向提示詞 negative prompt 都是使用英文,所以對學習母語的我們非常不友好 使用網址:https://tinygeeker.github.io/p/ai-prompt-generator 這個網址是為了讓大家在使用 AI 繪畫的時候 ......

    uj5u.com 2023-04-20 07:43:36 more
  • 漫談前端自動化測驗演進之路及測驗工具分析

    隨著前端技術的不斷發展和應用程式的日益復雜,前端自動化測驗也在不斷演進。隨著 Web 應用程式變得越來越復雜,自動化測驗的需求也越來越高。如今,自動化測驗已經成為 Web 應用程式開發程序中不可或缺的一部分,它們可以幫助開發人員更快地發現和修復錯誤,提高應用程式的性能和可靠性。 ......

    uj5u.com 2023-04-20 07:43:16 more
  • CANN開發實踐:4個DVPP記憶體問題的典型案例解讀

    摘要:由于DVPP媒體資料處理功能對存放輸入、輸出資料的記憶體有更高的要求(例如,記憶體首地址128位元組對齊),因此需呼叫專用的記憶體申請介面,那么本期就分享幾個關于DVPP記憶體問題的典型案例,并給出原因分析及解決方法。 本文分享自華為云社區《FAQ_DVPP記憶體問題案例》,作者:昇騰CANN。 DVPP ......

    uj5u.com 2023-04-20 07:43:03 more
  • msf學習

    msf學習 以kali自帶的msf為例 一、msf核心模塊與功能 msf模塊都放在/usr/share/metasploit-framework/modules目錄下 1、auxiliary 輔助模塊,輔助滲透(埠掃描、登錄密碼爆破、漏洞驗證等) 2、encoders 編碼器模塊,主要包含各種編碼 ......

    uj5u.com 2023-04-20 07:42:59 more
  • Halcon軟體安裝與界面簡介

    1. 下載Halcon17版本到到本地 2. 雙擊安裝包后 3. 步驟如下 1.2 Halcon軟體安裝 界面分為四大塊 1. Halcon的五個助手 1) 影像采集助手:與相機連接,設定相機引數,采集影像 2) 標定助手:九點標定或是其它的標定,生成標定檔案及內參外參,可以將像素單位轉換為長度單位 ......

    uj5u.com 2023-04-20 07:42:17 more
  • 在MacOS下使用Unity3D開發游戲

    第一次發博客,先發一下我的游戲開發環境吧。 去年2月份買了一臺MacBookPro2021 M1pro(以下簡稱mbp),這一年來一直在用mbp開發游戲。我大致分享一下我的開發工具以及使用體驗。 1、Unity 官網鏈接: https://unity.cn/releases 我一般使用的Apple ......

    uj5u.com 2023-04-20 07:40:19 more