初学UE5 C++②

news2024/11/28 8:26:33

目录

导入csv表格数据

创建、实例化、结构体

GameInstance

Actor

camera

绑定滚轮控制摇臂移动

碰撞绑定

角色碰撞设定 

按钮

UI显示 

单播代理

多播和动态多播

写一个接口

其他

 NewObject 和 CreateDefaultSubobject区别


导入csv表格数据

创建一个object的C++类

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "CharacterMsgObject.generated.h"

USTRUCT(BlueprintType)
struct class CharacterMSG:public FTableRowBase {
	GENERATED_USTRUCT_BODY()
	UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="CharacterMsg")
		FString Name;
	UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="CharacterMsg")
		float Health;
	UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="CharacterMsg")
		int32 Level;
}
UCLASS()
class CPDD1_API UCharacterMsgObject : public UObject
{
	GENERATED_BODY()
	
};

编译生成

做一个csv表格,对应结构体的元素

 拖拽csv到UE5中

导入时选中上述创建的结构体

创建、实例化、结构体

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Engine/Classes/Engine/DataTable.h"
#include "UObject/NoExportTypes.h"
#include "CharacterMsgObject.generated.h"

USTRUCT(BlueprintType)
struct FCharacterMSG :public FTableRowBase 
{
	GENERATED_USTRUCT_BODY()
	FCharacterMSG();//略
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "CharacterMsg")
	FString Name;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "CharacterMsg")
	float Health;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "CharacterMsg")
	int32 Level;


};
UCLASS()
class CPDD1_API UCharacterMsgObject : public UObject
{
	GENERATED_BODY()
public:
	FCharacterMSG CMSG;//供实体类调用
};
	//创建实例
		UCharacterMsgObject* MyTestMSGObject;
	MyTestMSGObject = NewObject<UCharacterMsgObject>(GetWorld(), UCharacterMsgObject::StaticClass());
	if (MyTestMSGObject) {
		UE_LOG(LogTemp, Warning, TEXT("MyObject is %s"), *MyTestMSGObject->GetName());
		UE_LOG(LogTemp, Warning, TEXT("NAME is %s"), *MyTestMSGObject->CMSG.Name);
		UE_LOG(LogTemp, Warning, TEXT("HEALTH is %f"), MyTestMSGObject->CMSG.Health);
		UE_LOG(LogTemp, Warning, TEXT("LEVEL is %d"), MyTestMSGObject->CMSG.Level);

	}

GameInstance

UMyGameInstance* MyGameInstance;

MyGameInstance = Cast<UMyGameInstance>(GetWorld()->GetFirstPlayerController()->GetGameInstance());

应用游戏实例类 

Actor

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Components/SceneComponent.h"
#include "Components/StaticMeshComponent.h"
#include "Components/BoxComponent.h"
#include "Particles/ParticleSystemComponent.h"
#include "Components/AudioComponent.h"
#include "GameFramework/Actor.h"
#include "MyActor.generated.h"

UCLASS()
class CPDD1_API AMyActor : public AActor
{
	GENERATED_BODY()
	
public:	
	// Sets default values for this actor's properties
	AMyActor();

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

public:	
	// Called every frame
	virtual void Tick(float DeltaTime) override;


	UPROPERTY(VisibleAnywhere,BlueprintReadWrite,Category="MySceneComponent")
		class USceneComponent* MyScene;
	UPROPERTY(VisibleAnywhere,BlueprintReadWrite,Category="MySceneComponent")
		class UStaticMeshComponent* MyMesh;
	UPROPERTY(VisibleAnywhere,BlueprintReadWrite,Category="MySceneComponent")
		class UParticleSystemComponent* MyParticle;
	UPROPERTY(VisibleAnywhere,BlueprintReadWrite,Category="MySceneComponent")
		class UBoxComponent* MyBox;
	UPROPERTY(VisibleAnywhere,BlueprintReadWrite,Category="MySceneComponent")
		class UAudioComponent* MyAudio;

};
AMyActor::AMyActor()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;
	MyScene = CreateDefaultSubobject<USceneComponent>(TEXT("MyCustomScene"));
	MyMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MyCustomScene"));
	MyParticle = CreateDefaultSubobject<UParticleSystemComponent>(TEXT("MyCustomParticleSystem"));
	MyBox = CreateDefaultSubobject<UBoxComponent>(TEXT("MyCustomBox"));
	MyAudio = CreateDefaultSubobject<UAudioComponent>(TEXT("MyCustomAudio"));

	RootComponent = MyScene;
	MyMesh->SetupAttachment(MyScene);
	MyParticle->SetupAttachment(MyScene);
	MyBox->SetupAttachment(MyScene);
	MyAudio->SetupAttachment(MyBox);
}

静态加载类,要加   “_C”

camera

UPROPERTY(VisibleAnywhere,BlueprintReadOnly,Category="MySceneComponent")
	USceneComponent* MyRoot;
UPROPERTY(VisibleAnywhere,BlueprintReadOnly,Category="MySceneComponent")
	USpringArmComponent* MySpringArm;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "MySceneComponent")
	UCameraComponent* MyCamera;
 	// Set this pawn to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;
	MyRoot = CreateDefaultSubobject<USceneComponent>(TEXT("MyRoot"));
	MySpringArm = CreateDefaultSubobject<USpringArmComponent>(TEXT("MySpringArm"));
	MyCamera = CreateDefaultSubobject<UCameraComponent>(TEXT("MyCamera"));
	RootComponent = MyRoot;
	MySpringArm->SetupAttachment(MyRoot);
	MyCamera->SetupAttachment(MySpringArm);
	MySpringArm->bDoCollisionTest = false;

绑定滚轮控制摇臂移动

#include "CoreMinimal.h"
#include "GameFramework/PlayerController.h"
#include "SPlayerController.generated.h"

/**
 * 
 */
UCLASS()
class CPDD1_API ASPlayerController : public APlayerController
{
	GENERATED_BODY()
public:
	virtual void SetupInputComponent();
	void WheelUpFunction();
	void WheelDownFunction();
};

 绑定键在UE5输入中设置

因为这里的Pawn和Controller都设置为当前gamemode的角色,所有getPawn会锁到当前操控者的Pawn。

#include "SPlayerController.h"
#include "MyPawn.h"

void ASPlayerController::SetupInputComponent()
{
	Super::SetupInputComponent();
	InputComponent->BindAction("WheelUp", IE_Pressed, this, &ASPlayerController::WheelUpFunction);
	InputComponent->BindAction("WheelDown", IE_Pressed, this, &ASPlayerController::WheelDownFunction);
}

void ASPlayerController::WheelUpFunction()
{
	if (GetPawn()) {
		AMyPawn* pawn1= Cast<AMyPawn>(GetPawn());
		pawn1->Zoom(1,1);
	}
}

void ASPlayerController::WheelDownFunction()
{
	if (GetPawn()) {
		AMyPawn* pawn1 = Cast<AMyPawn>(GetPawn());
		pawn1->Zoom(-1, 1);
	}
}
void AMyPawn::Zoom(float Direction, float Speed)
{
	float temp = MySpringArm->TargetArmLength - Direction * Speed * 10;
	if (temp > 2000.f || temp < 500.f)
		MySpringArm->TargetArmLength = temp;
}

 

碰撞绑定

	UPROPERTY(VisibleAnywhere,BlueprintReadWrite,Category="MySceneComponent")
		class UBoxComponent* MyBox;
	MyBox->OnComponentBeginOverlap.AddDynamic(this, &AMyActor::BeginOverlapFunction);
	MyBox->OnComponentEndOverlap.AddDynamic(this, &AMyActor::EndOverlapFunction);
	MyBox->OnComponentHit.AddDynamic(this, &AMyActor::OnComponentHitFunction);

绑定函数的参数从何而来?

 

-转到定义

再转到定义

找到同义的参数,看数字,如果是six,就把该函数后6位复制过来,绑定函数的参数括号内,去掉定义类型和变量名之间的逗号即可。

	UFUNCTION()
		void BeginOverlapFunction(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);
	UFUNCTION()
		void EndOverlapFunction(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex);
	UFUNCTION()
		void OnComponentHitFunction(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);

角色碰撞设定 

	//碰撞设置
	MyBox->SetCollisionEnabled(ECollisionEnabled::NoCollision);
	MyBox->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
	MyBox->SetCollisionEnabled(ECollisionEnabled::PhysicsOnly);
	MyBox->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
	MyBox->SetCollisionEnabled(ECollisionEnabled::ProbeOnly);
	MyBox->SetCollisionEnabled(ECollisionEnabled::QueryAndProbe);

	//碰撞对象类型
	MyBox->SetCollisionObjectType(ECC_WorldDynamic);
	MyBox->SetCollisionObjectType(ECC_WorldStatic);
	MyBox->SetCollisionObjectType(ECC_Pawn);
	MyBox->SetCollisionObjectType(ECC_PhysicsBody);
	MyBox->SetCollisionObjectType(ECC_Vehicle);
	MyBox->SetCollisionObjectType(ECC_Destructible);

	//碰撞响应
	MyBox->SetCollisionResponseToAllChannels(ECR_Block);
	MyBox->SetCollisionResponseToAllChannels(ECR_Overlap);
	MyBox->SetCollisionResponseToAllChannels(ECR_Ignore);
	MyBox->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);//pawn允许重叠
	MyBox->SetCollisionResponseToChannel(ECC_WorldStatic,ECR_Block);//世界静态阻挡
	MyBox->SetCollisionResponseToChannel(ECC_WorldDynamic,ECR_Ignore);//世界动态忽略

    MyBox->SetBoxExtent(FVector(64, 64, 64));

按钮

绑定事件绑定函数时不用加括号

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Components/Button.h"
#include "Blueprint/UserWidget.h"
#include "MyUserWidget.generated.h"

UCLASS()
class CPDD1_API UMyUserWidget : public UUserWidget
{
	GENERATED_BODY()
public:
	UPROPERTY(meta=(BindWidget))//UI控件创建的按钮名称和声明名称相同
		UButton *ButtonStart;
	UPROPERTY(meta=(BindWidget))
		UButton* ButtonQuit;
	UFUNCTION()
		void Start();
	UFUNCTION()
		void Quit();
	virtual bool Initialize()override;//重写组件初始化函数

	UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="MyHealth")
		float CurrentHealth=100.f;
	UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="MyHealth")
		float MaxHealth = 100.f;
	UFUNCTION()
		void UpdateHealth();
};
#include "MyUserWidget.h"

bool UMyUserWidget::Initialize()
{
	if(!Super::Initialize())
		return false;
	ButtonStart->OnClicked.AddDynamic(this, &UMyUserWidget::Start);
	ButtonQuit->OnClicked.AddDynamic(this,&UMyUserWidget::Quit);
	return true;
}

void UMyUserWidget::UpdateHealth()
{
	if (CurrentHealth <= 0) {
		GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, TEXT("Death"));
	}
	else {
		CurrentHealth -= 30;
	}
}

void UMyUserWidget::Start()
{
	GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, TEXT("Start"));
	UpdateHealth();
}

void UMyUserWidget::Quit()
{
	GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, TEXT("Quit"));
}

UI显示 

在游戏模式的控制器脚本的开始运行函数中,

根据资源路径加载类,并创建该类的实例作为“提升为变量”的接盘。

void ASPlayerController::BeginPlay()
{
	Super::BeginPlay();
	UClass* widgetClass = LoadClass<UMyUserWidget>(NULL, TEXT("/Script/UMGEditor.WidgetBlueprint'/Game/HbtScripts/MyUserWidget233.MyUserWidget233_C'"));
	UMyUserWidget* MyWidget = nullptr;
	MyWidget = CreateWidget<UMyUserWidget>(GetWorld(), widgetClass);
	MyWidget->AddToViewport();
}

单播代理

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "MyDelegateActor.generated.h"

DECLARE_DELEGATE(NoParamDelegate);//1.声明代理类型
DECLARE_DELEGATE_OneParam(OneParamDelegate,FString);
DECLARE_DELEGATE_TwoParams(TwoParamDelegate, FString, int32);
DECLARE_DELEGATE_ThreeParams(ThreeParamDelegate, FString, int32, float);
DECLARE_DELEGATE_RetVal(FString, RetvalDelegate);

UCLASS()
class CPDD1_API AMyDelegateActor : public AActor
{
	GENERATED_BODY()
	
public:	
	// Sets default values for this actor's properties
	AMyDelegateActor();

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

public:	
	// Called every frame
	virtual void Tick(float DeltaTime) override;

	//2.声明代理名称
	NoParamDelegate NoParamDelegate;
	OneParamDelegate OneParamDelegate;
	TwoParamDelegate TwoParamDelegate;
	ThreeParamDelegate ThreeParamDelegate;
	RetvalDelegate RetvalDelegate;

	//声明代理函数
	void NoParamFunction();
	void OneParamFunction(FString str);
	void TwoParamFunction(FString str,int32 value);
	void ThreeParamFunction(FString str,int32 value,float balue1);
	FString RetvalFunction();

};

 

// Fill out your copyright notice in the Description page of Project Settings.


#include "MyDelegateActor.h"

// Sets default values
AMyDelegateActor::AMyDelegateActor()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;
	//3.绑定代理方法
	NoParamDelegate.BindUObject(this, &AMyDelegateActor::NoParamFunction);
	OneParamDelegate.BindUObject(this, &AMyDelegateActor::OneParamFunction);
	TwoParamDelegate.BindUObject(this, &AMyDelegateActor::TwoParamFunction);
	ThreeParamDelegate.BindUObject(this, &AMyDelegateActor::ThreeParamFunction);
	RetvalDelegate.BindUObject(this, &AMyDelegateActor::RetvalFunction);


}

// Called when the game starts or when spawned
void AMyDelegateActor::BeginPlay()
{
	Super::BeginPlay();
	//4.调用代理
	NoParamDelegate.ExecuteIfBound();
	OneParamDelegate.ExecuteIfBound("OneParamDelegate");
	TwoParamDelegate.ExecuteIfBound("TwoParamDelegate",648);
	ThreeParamDelegate.ExecuteIfBound("ThreeParamDelegate",648,3.6f);
	FString strvalue= RetvalDelegate.Execute();
}

// Called every frame
void AMyDelegateActor::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);

}

void AMyDelegateActor::NoParamFunction()
{
	GEngine->AddOnScreenDebugMessage(-1,5.0f,FColor::Blue,TEXT("NoParamDelegate"));
}

void AMyDelegateActor::OneParamFunction(FString str)
{
	GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Blue, FString::Printf(TEXT("%s"),*str));
}

void AMyDelegateActor::TwoParamFunction(FString str, int32 value)
{
	GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Blue, FString::Printf(TEXT("%s,%d"), *str,value));
}

void AMyDelegateActor::ThreeParamFunction(FString str, int32 value, float value1)
{

	GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Blue, FString::Printf(TEXT("%s,%d,%f"), *str, value, value1));
}

FString AMyDelegateActor::RetvalFunction()
{
	FString str = FString::Printf(TEXT("RetvalFunction"));
	return str;
}

多播和动态多播

声明类型


DECLARE_MULTICAST_DELEGATE_OneParam(OneParamMultiDelegate, FString);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDynamicMutilDelegate,FString,param);

声明名称

	//多播代理
	OneParamMultiDelegate OneParamMultiDelegate;
	//动态多播
	UPROPERTY(BlueprintAssignable)
	FDynamicMutilDelegate FDynamicMutilDelegate;

 绑定方法

	//多播代理绑定
	OneParamMultiDelegate.AddUObject(this, &AMyDelegateActor::MultiDelegateFunction1);

执行(参数根据自己定义的类型) 

	//执行多播代理
	OneParamMultiDelegate.Broadcast("OneParamMultiDelegate");
	//执行动态多播代理
	FDynamicMutilDelegate.Broadcast("FDynamicMutilDelegate");

多播代理能同时调用多个函数,区别是动态多播能暴露给蓝图。

多播在脚本中写好绑定的多播函数。

动态多播在此基础上,能在蓝图上额外绑定事件,不止函数。

写一个接口

用I开头那个

声明要重写函数时,有{}

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "UObject/Interface.h"
#include "TestInterface.generated.h"

// This class does not need to be modified.
UINTERFACE(MinimalAPI)
class UTestInterface : public UInterface
{
	GENERATED_BODY()
};

/**
 * 
 */
class CPDD1_API ITestInterface
{
	GENERATED_BODY()

	// Add interface functions to this class. This is the class that will be inherited to implement this interface.
public:
	virtual void Attack() {};
	virtual void CaclulateHealth() {};
};

 调用,接屁股+头文件

重写

	virtual void Attack() override;
	virtual void CaclulateHealth() override;

 然后再cpp编写即可。

其他

在使用打印语句时报错什么断点问题点,尝试在打印语句上加UFUNCTION

GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, TEXT("Death"));

变量要编辑,组件要可视,然后均为蓝图读写

 NewObject 和 CreateDefaultSubobject区别

NewObject 和 CreateDefaultSubobject 是 Unreal Engine 中用于创建对象的两种不同方式,它们有以下区别:

  1. 对象类型:NewObject 可以用于创建任何类型的对象,包括 UObject、AActor、APawn 等。而 CreateDefaultSubobject 仅适用于在一个类的构造函数或初始化过程中创建默认的子对象。

  2. 对象生命周期:使用 NewObject 创建的对象是动态分配的,并由开发人员负责管理其生命周期。而使用 CreateDefaultSubobject 创建的对象是由 Unreal Engine 的对象系统自动管理的,它们的生命周期与宿主对象的生命周期相同。

  3. 对象属性:CreateDefaultSubobject 创建的对象会自动继承宿主对象的属性设置,例如编辑器中设置的默认值、蓝图可编辑性等。而使用 NewObject 创建的对象需要手动设置属性。

  4. 宿主对象关系:CreateDefaultSubobject 创建的子对象与宿主对象之间建立了父子关系,这意味着子对象的生命周期与宿主对象紧密相关,并且在宿主对象销毁时,子对象也会被销毁。而 NewObject 创建的对象没有默认的宿主对象关系。

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

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

相关文章

微信聊天审计软件,微信聊天记录监管系统

微信聊天审计软件&#xff0c;微信聊天记录监管系统 微信聊天已经成为人们工作中不可或缺的一部分。它不仅改变了我们的沟通方式&#xff0c;还为我们的工作带来了诸多便利。但同时也带来了一些安全风险&#xff0c;如信息泄露、不当言论等&#xff0c;然而&#xff0c;微信聊…

9.jvm调优相关工具-java自带

目录 概述jdk工具包jpsjps -qjps -mjps -vjps -l jstatjstat -gcjstat -gcutiljinfo jmapjmap heapjmap histo[:live]jmap clstatsjmap dump jhatjstack 结束 概述 做了一些 1.8 与1.17.x jdk对比&#xff0c;最重要的是实际操作一次。 这些是java自带的命令&#xff0c;属于离…

Windows电脑画面如何投屏到电视?怎样限定投屏内容?

电视通常比计算机屏幕更大&#xff0c;因此将电脑画面投射到电视上可以提供更广阔的视野和更好的视觉体验。通过将电脑画面投射到电视上&#xff0c;您可以与他人共享您的计算机屏幕上的内容。这对于展示演示文稿、观看影片或与他人分享照片等活动非常有用。 如果你的电脑系统是…

全球地表水数据集JRC Global Surface Water Mapping Layers, v1.2数据

简介&#xff1a; 全球地表水覆盖&#xff08;Global Surface Water&#xff09;是利用1984至2019年获取的landsat5、landsat7和landsat8的卫星影像&#xff0c;生成分辨率为30米的一套全球地表水覆盖的地图集。用户可以在全球尺度上按地区回溯某个时间上地表水分的变化情况。…

《C++避坑神器·十六》函数默认参数和占位参数

C中函数是可以给默认参数的 注意点&#xff1a; &#xff08;1&#xff09;一旦某个参数设置为默认参数&#xff0c;那跟着后面的所有参数都必须设置默认参数 &#xff08;2&#xff09;函数的声明和定义只能有一个可以设置默认参数&#xff0c;两个都设置会报错 int f1(int a…

Anaconda的安装使用及pycharm设置conda虚拟环境

1.python和包以及anaconda的概念关系 python “工人” 包 “工具” 环境 “工具箱” anaconda “放很多工具箱的大箱子” python等于工人这个好理解&#xff0c;就是编程需要用python来实现对应功能&#xff0c;即工人完成某项工程。 包等于工具&#xff0c;就是工人…

Consumer的负载均衡

想要提高Consumer的处理速度&#xff0c;可以启动多个Consumer并发处理&#xff0c;这个时候就涉及如何在多个Consumer之间负载均衡的问题&#xff0c;接下来结合源码分析Consumer的负载均衡实现。 要做负载均衡&#xff0c;必须知道一些全局信息&#xff0c;也就是一个Consum…

JVM-HotSpot虚拟机对象探秘

目录 一、对象的实例化 &#xff08;一&#xff09;创建对象的方式 &#xff08;二&#xff09;创建对象的步骤 二、对象的内存布局 &#xff08;一&#xff09;对象头 &#xff08;二&#xff09;实例数据 &#xff08;三&#xff09;对齐填充 三、 对象的访问定位 &…

绕过类安全问题分析方法

什么是绕过 逻辑漏洞是指程序设计中逻辑不严密&#xff0c;使攻击者能篡改、绕过或中断程序&#xff0c;令其偏离开发人员预期的执行。 常见表现形式 1、接口&#xff08;功能类&#xff09;绕过&#xff1a;即接口或功能中通过某参数&#xff0c;绕过程序校验 2、流程类绕…

c++虚函数纯虚函数详解加代码解释

c虚函数纯虚函数详解加代码解释 一.概念&#xff1a;二.虚函数示例及解析&#xff1a;三.纯虚函数示例及解析&#xff1a;四.验证和实际使用及解析&#xff1a;1.子类没有对父类的函数重载&#xff0c;mian()函数调用&#xff0c;是直接返回父类的值2.子类对父类的函数重载&…

一键清除磁盘垃圾工具分享,绿色快速好用

下载&#xff1a;https://download.csdn.net/download/weixin_43097956/88541564

2023年中国机动车拍卖网络化趋势加速,网络拍卖专场数量大幅上升至47489场[图]

2022年&#xff0c;由于机动车拍卖网络化趋势继续加速&#xff0c;网络拍卖专场数量大幅上升&#xff0c;全国机动车专场拍卖会高达59450场&#xff0c;较上年攀升125.31%。在389家拍卖企业中&#xff0c;举办场次超过100场的企业有27家&#xff0c;合计54850场&#xff0c;占比…

2023年中国骨质疏松治疗仪发展趋势分析:小型且智能将成为产品优化方向[图]

骨质疏松治疗仪利用磁场镇静止痛、消肿消炎的治疗作用迅速缓解患者腰背疼痛等骨质疏松临床症状。同时利用磁场的磁-电效应产生的感生电势和感生电流&#xff0c;改善骨的代谢和骨重建&#xff0c;通过抑制破骨细胞、促进成骨细胞的活性来阻止骨量丢失、提高骨密度。 骨质疏松治…

有能一键批量转换,轻松将PDF、图片转为Word/Excel的软件吗?

随着数字化时代的到来&#xff0c;OCR技术在我们的生活中变得越来越重要。无论是从图片中提取文字&#xff0c;还是将PDF、图片格式的文件转换为Word或Excel格式&#xff0c;OCR软件都能够为我们提供极大的便利。然而&#xff0c;市面上的OCR软件种类繁多&#xff0c;哪一款软件…

蓝桥杯第三周算法竞赛D题E题

发现更多计算机知识&#xff0c;欢迎访问Cr不是铬的个人网站 D迷宫逃脱 拿到题目一眼应该就能看出是可以用动态规划来解决。但是怎么定义dp呢? 这个题增加难度的点就在当所在位置与下一个要去的位置互质的时候&#xff0c;会消耗一把钥匙。当没有钥匙的时候就不能移动了。想…

802.11ax-2021协议学习__$27-HE-PHY__$27.5-Parameters-for-HE-MCSs

802.11ax-2021协议学习__$27-HE-PHY__$27.5-Parameters-for-HE-MCSs 27.3.7 Modulation and coding scheme (HE-MCSs)27.3.8 HE-SIG-B modulation and coding schemes (HE-SIG-B-MCSs)27.5 Parameters for HE-MCSs27.5.1 General27.5.2 HE-MCSs for 26-tone RU27.5.3 HE-MCSs f…

AE (1)_软件、硬件、驱动控制

#灵感# AE是个值得推敲再推敲的模块&#xff0c;有意思。 目录 相关的硬件-光圈&#xff1a; 相关的软件-曝光-ISO&#xff1a; ISP中的sensor AE 组成&#xff1a; sensor AE的流程及控制&#xff1a; 相关的硬件-光圈&#xff1a; 光圈&#xff08;F-Number&#xff0…

Equifax案例分析与合规性场景实践

在当今数字化时代&#xff0c;数据安全已经成为各个组织和企业亟待解决的问题。尤其是在数据泄露事件不断增多的背景下&#xff0c;保护敏感数据免受非法访问和泄露变得尤为紧迫。为了应对这一挑战&#xff0c;许多组织和企业开始利用密钥管理服务(KMS)来加强其数据安全性&…

KVM网络环境下vlan和trunk的理解

vmware exsi 平台&#xff0c;虚拟交换机管理界面的上行链路是什么意思 VMware ESXi中的虚拟交换机管理界面中的“上行链路”&#xff08;uplinks&#xff09;是指虚拟交换机连接到物理网络的物理网络适配器。在ESXi中&#xff0c;虚拟交换机&#xff08;vSwitch&#xff09;用…

Ubuntu18.04安装ROS系统+turtle测试

安装 1.设置安装源 sudo sh -c echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list sudo sh -c . /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubun…