UE蓝图 Set节点和源码

文章目录

    • Set节点说明
    • 相关源码

Set节点说明

在这里插入图片描述

UE蓝图中的Set节点是用于对变量进行赋值操作的重要组件。它具有多种功能和作用,具体如下:

  1. 变量赋值:Set节点可以用于设置不同类型的变量值,包括整数、浮点数、布尔值、字符串等。在游戏开发中,开发者经常需要修改或设置各种变量的值,如角色的生命值、位置、游戏的状态等。Set节点提供了一个直观且简单的方式来完成这些赋值操作。
  2. 简化开发流程:通过使用Set节点,开发者无需编写复杂的代码逻辑,便可以在蓝图中直接进行变量赋值操作,从而简化了游戏开发的过程,提高了开发效率。
  3. 可视化操作:Set节点具有直观的可视化界面,开发者可以通过拖拽连接线来连接Set节点与其他节点,这样就能够建立变量之间的关联关系。这种可视化的操作方式使得逻辑流程更加清晰明了,便于理解和调试。
  4. 自动类型转换:Set节点还支持自动类型转换功能,可以在不同类型之间进行转换,并自动处理类型兼容性问题。这减少了开发者在处理类型转换问题时的烦恼。
  5. 动态修改变量:使用Set节点,开发者可以实现变量的动态修改。例如,在游戏过程中,可以通过Set节点实时地改变角色的生命值、位置或其他属性,从而更新游戏状态。

总的来说,UE蓝图中的Set节点提供了一种直观、简单且高效的方式来对游戏开发中的变量进行赋值操作,同时支持多种数据类型和动态修改,极大地简化了游戏开发过程。

实现方式

  • 继承UK2Node_Variable类,并根据需要实现赋值相关逻辑。Handler_VariableSet:创建Set相关BlueprintCompiledStatement,Statement类型是KCST_Assignment。

总的来说,UE蓝图中的Set节点是游戏开发中不可或缺的一部分,它简化了变量操作过程,提高了开发效率,并使得逻辑流程更加清晰明了。通过了解Set节点的功能和实现方式,开发者可以更好地利用它进行游戏开发,提高游戏的质量和用户体验。

相关源码

在这里插入图片描述

源码相关文件
UK2Node_VariableSet.h
UK2Node_VariableSet.cpp
Handler_VariableSet.h
Handler_VariableSet.cpp
相关实现类
UK2Node_VariableSet
Handler_VariableSet:创建Set相关BlueprintCompiledStatement,Statement类型是KCST_Assignment

// Copyright Epic Games, Inc. All Rights Reserved.#include "K2Node_VariableSet.h"
#include "GameFramework/Actor.h"
#include "Engine/BlueprintGeneratedClass.h"
#include "EdGraphSchema_K2.h"
#include "K2Node_VariableGet.h"
#include "K2Node_CallFunction.h"
#include "Kismet2/BlueprintEditorUtils.h"
#include "KismetCompiler.h"
#include "VariableSetHandler.h"#define LOCTEXT_NAMESPACE "K2Node_VariableSet"namespace K2Node_VariableSetImpl
{/*** Shared utility method for retrieving a UK2Node_VariableSet's bare tooltip.* * @param  VarName	The name of the variable that the node represents.* @return A formatted text string, describing what the VariableSet node does.*/static FText GetBaseTooltip(FName VarName);/*** Returns true if the specified variable RepNotify AND is defined in a * blueprint. Most (all?) native rep notifies are intended to be client * only. We are moving away from this paradigm in blueprints. So for now * this is somewhat of a hold over to avoid nasty bugs where a K2 set node * is calling a native function that the designer has no idea what it is * doing.* * @param  VariableProperty	The variable property you wish to check.* @return True if the specified variable RepNotify AND is defined in a blueprint.*/static bool PropertyHasLocalRepNotify(FProperty const* VariableProperty);
}static FText K2Node_VariableSetImpl::GetBaseTooltip(FName VarName)
{FFormatNamedArguments Args;Args.Add(TEXT("VarName"), FText::FromName(VarName));return FText::Format(LOCTEXT("SetVariableTooltip", "Set the value of variable {VarName}"), Args);}static bool K2Node_VariableSetImpl::PropertyHasLocalRepNotify(FProperty const* VariableProperty)
{if (VariableProperty != nullptr){// We check that the variable is 'defined in a blueprint' so as to avoid // natively defined RepNotifies being called unintentionally. Most(all?) // native rep notifies are intended to be client only. We are moving // away from this paradigm in blueprints. So for now this is somewhat of // a hold over to avoid nasty bugs where a K2 set node is calling a // native function that the designer has no idea what it is doing.UBlueprintGeneratedClass* VariableSourceClass = Cast<UBlueprintGeneratedClass>(VariableProperty->GetOwnerClass());bool const bIsBlueprintProperty = (VariableSourceClass != nullptr);if (bIsBlueprintProperty && (VariableProperty->RepNotifyFunc != NAME_None)){// Find function (ok if its defined in native class)UFunction* Function = VariableSourceClass->FindFunctionByName(VariableProperty->RepNotifyFunc);// If valid repnotify funcif ((Function != nullptr) && (Function->NumParms == 0) && (Function->GetReturnProperty() == nullptr)){return true;}}}return false;
}UK2Node_VariableSet::UK2Node_VariableSet(const FObjectInitializer& ObjectInitializer): Super(ObjectInitializer)
{
}
//创建默认的引脚
void UK2Node_VariableSet::AllocateDefaultPins()
{CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Exec, UEdGraphSchema_K2::PN_Execute);CreatePin(EGPD_Output, UEdGraphSchema_K2::PC_Exec, UEdGraphSchema_K2::PN_Then);if (GetVarName() != NAME_None){if(CreatePinForVariable(EGPD_Input)){CreatePinForSelf();}if(CreatePinForVariable(EGPD_Output, GetVariableOutputPinName())){CreateOutputPinTooltip();}}Super::AllocateDefaultPins();
}void UK2Node_VariableSet::ReallocatePinsDuringReconstruction(TArray<UEdGraphPin*>& OldPins)
{CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Exec, UEdGraphSchema_K2::PN_Execute);CreatePin(EGPD_Output, UEdGraphSchema_K2::PC_Exec, UEdGraphSchema_K2::PN_Then);if (GetVarName() != NAME_None){if(!CreatePinForVariable(EGPD_Input)){if(!RecreatePinForVariable(EGPD_Input, OldPins)){return;}}if(!CreatePinForVariable(EGPD_Output, GetVariableOutputPinName())){if(!RecreatePinForVariable(EGPD_Output, OldPins, GetVariableOutputPinName())){return;}}CreateOutputPinTooltip();CreatePinForSelf();}RestoreSplitPins(OldPins);
}FText UK2Node_VariableSet::GetPropertyTooltip(FProperty const* VariableProperty)
{FText TextFormat;FFormatNamedArguments Args;bool const bHasLocalRepNotify = K2Node_VariableSetImpl::PropertyHasLocalRepNotify(VariableProperty);FName VarName = NAME_None;if (VariableProperty != nullptr){if (bHasLocalRepNotify){Args.Add(TEXT("ReplicationNotifyName"), FText::FromName(VariableProperty->RepNotifyFunc));TextFormat = LOCTEXT("SetVariableWithRepNotify_Tooltip", "Set the value of variable {VarName} and call {ReplicationNotifyName}");}VarName = VariableProperty->GetFName();UClass* SourceClass = VariableProperty->GetOwnerClass();// discover if the variable property is a non blueprint user variablebool const bIsNativeVariable = (SourceClass != nullptr) && (SourceClass->ClassGeneratedBy == nullptr);FText SubTooltip;if (bIsNativeVariable){FText const PropertyTooltip = VariableProperty->GetToolTipText();if (!PropertyTooltip.IsEmpty()){// See if the native property has a tooltipSubTooltip = PropertyTooltip;FString TooltipName = FString::Printf(TEXT("%s.%s"), *VarName.ToString(), *FBlueprintMetadata::MD_Tooltip.ToString());FText::FindText(*VariableProperty->GetFullGroupName(true), *TooltipName, SubTooltip);}}else if (SourceClass){if (UBlueprint* VarBlueprint = Cast<UBlueprint>(SourceClass->ClassGeneratedBy)){FString UserTooltipData;if (FBlueprintEditorUtils::GetBlueprintVariableMetaData(VarBlueprint, VarName, VariableProperty->GetOwnerStruct(), FBlueprintMetadata::MD_Tooltip, UserTooltipData)){SubTooltip = FText::FromString(UserTooltipData);}}}if (!SubTooltip.IsEmpty()){Args.Add(TEXT("PropertyTooltip"), SubTooltip);if (bHasLocalRepNotify){TextFormat = LOCTEXT("SetVariablePropertyWithRepNotify_Tooltip", "Set the value of variable {VarName} and call {ReplicationNotifyName}\n{PropertyTooltip}");}else{TextFormat = LOCTEXT("SetVariableProperty_Tooltip", "Set the value of variable {VarName}\n{PropertyTooltip}");}}}if (TextFormat.IsEmpty()){return K2Node_VariableSetImpl::GetBaseTooltip(VarName);}else{Args.Add(TEXT("VarName"), FText::FromName(VarName));return FText::Format(TextFormat, Args);}
}FText UK2Node_VariableSet::GetBlueprintVarTooltip(FBPVariableDescription const& VarDesc)
{int32 const MetaIndex = VarDesc.FindMetaDataEntryIndexForKey(FBlueprintMetadata::MD_Tooltip);bool const bHasTooltipData = (MetaIndex != INDEX_NONE);if (bHasTooltipData){FString UserTooltipData = VarDesc.GetMetaData(FBlueprintMetadata::MD_Tooltip);FFormatNamedArguments Args;Args.Add(TEXT("VarName"), FText::FromName(VarDesc.VarName));Args.Add(TEXT("UserTooltip"), FText::FromString(UserTooltipData));return FText::Format(LOCTEXT("SetBlueprintVariable_Tooltip", "Set the value of variable {VarName}\n{UserTooltip}"), Args);}return K2Node_VariableSetImpl::GetBaseTooltip(VarDesc.VarName);
}FText UK2Node_VariableSet::GetTooltipText() const
{if (CachedTooltip.IsOutOfDate(this)){if (FProperty* Property = GetPropertyForVariable()){CachedTooltip.SetCachedText(GetPropertyTooltip(Property), this);}else if (FBPVariableDescription const* VarDesc = GetBlueprintVarDescription()){CachedTooltip.SetCachedText(GetBlueprintVarTooltip(*VarDesc), this);}else{CachedTooltip.SetCachedText(K2Node_VariableSetImpl::GetBaseTooltip(GetVarName()), this);}}return CachedTooltip;
}FText UK2Node_VariableSet::GetNodeTitle(ENodeTitleType::Type TitleType) const
{const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();// If there is only one variable being written (one non-meta input pin), the title can be made the variable nameFName InputPinName;int32 NumInputsFound = 0;for (int32 PinIndex = 0; PinIndex < Pins.Num(); ++PinIndex){UEdGraphPin* Pin = Pins[PinIndex];if ((Pin->Direction == EGPD_Input) && (!K2Schema->IsMetaPin(*Pin))){++NumInputsFound;InputPinName = Pin->PinName;}}if (NumInputsFound != 1){return HasLocalRepNotify() ? NSLOCTEXT("K2Node", "SetWithNotify", "Set with Notify") : NSLOCTEXT("K2Node", "Set", "Set");}// @TODO: The variable name mutates as the user makes changes to the //        underlying property, so until we can catch all those cases, we're//        going to leave this optimization offelse if (CachedNodeTitle.IsOutOfDate(this)){FFormatNamedArguments Args;Args.Add(TEXT("PinName"), FText::FromName(InputPinName));// FText::Format() is slow, so we cache this to save on performanceif (HasLocalRepNotify()){CachedNodeTitle.SetCachedText(FText::Format(NSLOCTEXT("K2Node", "SetWithNotifyPinName", "Set with Notify {PinName}"), Args), this);}else{CachedNodeTitle.SetCachedText(FText::Format(NSLOCTEXT("K2Node", "SetPinName", "Set {PinName}"), Args), this);}}return CachedNodeTitle;
}/** Returns true if the variable we are setting has a RepNotify AND was defined in a blueprint*		The 'defined in a blueprint' is to avoid natively defined RepNotifies being called unintentionally.*		Most (all?) native rep notifies are intended to be client only. We are moving away from this paradigm in blueprints*		So for now this is somewhat of a hold over to avoid nasty bugs where a K2 set node is calling a native function that the*		designer has no idea what it is doing.*/
bool UK2Node_VariableSet::HasLocalRepNotify() const
{return K2Node_VariableSetImpl::PropertyHasLocalRepNotify(GetPropertyForVariable());
}bool UK2Node_VariableSet::ShouldFlushDormancyOnSet() const
{if (!GetVariableSourceClass()->IsChildOf(AActor::StaticClass())){return false;}// Flush net dormancy before setting a replicated propertyFProperty *Property = FindFProperty<FProperty>(GetVariableSourceClass(), GetVarName());return (Property != NULL && (Property->PropertyFlags & CPF_Net));
}bool UK2Node_VariableSet::IsNetProperty() const
{FProperty* Property = GetPropertyForVariable();return Property && (Property->PropertyFlags & CPF_Net);
}FName UK2Node_VariableSet::GetRepNotifyName() const
{FProperty * Property = GetPropertyForVariable();if (Property){return Property->RepNotifyFunc;}return NAME_None;
}FNodeHandlingFunctor* UK2Node_VariableSet::CreateNodeHandler(FKismetCompilerContext& CompilerContext) const
{return new FKCHandler_VariableSet(CompilerContext);
}FName UK2Node_VariableSet::GetVariableOutputPinName() const
{return TEXT("Output_Get");
}void UK2Node_VariableSet::CreateOutputPinTooltip()
{UEdGraphPin* Pin = FindPin(GetVariableOutputPinName());check(Pin);Pin->PinToolTip = NSLOCTEXT("K2Node", "SetPinOutputTooltip", "Retrieves the value of the variable, can use instead of a separate Get node").ToString();
}FText UK2Node_VariableSet::GetPinNameOverride(const UEdGraphPin& Pin) const
{// Stop the output pin for the variable, effectively the "get" pin, from displaying a name.if(Pin.ParentPin == nullptr && (Pin.Direction == EGPD_Output || Pin.PinType.PinCategory == UEdGraphSchema_K2::PC_Exec)){return FText::GetEmpty();}return !Pin.PinFriendlyName.IsEmpty() ? Pin.PinFriendlyName : FText::FromName(Pin.PinName);
}void UK2Node_VariableSet::ValidateNodeDuringCompilation(FCompilerResultsLog& MessageLog) const
{Super::ValidateNodeDuringCompilation(MessageLog);// Some expansions will create sets for non-blueprint visible properties, and we don't want to validate against thatif (!IsIntermediateNode()){if (FProperty* Property = GetPropertyForVariable()){const FBlueprintEditorUtils::EPropertyWritableState PropertyWritableState = FBlueprintEditorUtils::IsPropertyWritableInBlueprint(GetBlueprint(), Property);if (PropertyWritableState != FBlueprintEditorUtils::EPropertyWritableState::Writable){FFormatNamedArguments Args;if (UObject* Class = Property->GetOwner<UObject>()){Args.Add(TEXT("VariableName"), FText::AsCultureInvariant(FString::Printf(TEXT("%s.%s"), *Class->GetName(), *Property->GetName())));}else{Args.Add(TEXT("VariableName"), FText::AsCultureInvariant(Property->GetName()));}if (PropertyWritableState == FBlueprintEditorUtils::EPropertyWritableState::BlueprintReadOnly || PropertyWritableState == FBlueprintEditorUtils::EPropertyWritableState::NotBlueprintVisible){MessageLog.Error(*FText::Format(LOCTEXT("UnableToSet_NotWritable", "{VariableName} is not blueprint writable. @@"), Args).ToString(), this);}else if (PropertyWritableState == FBlueprintEditorUtils::EPropertyWritableState::Private){MessageLog.Error(*LOCTEXT("UnableToSet_ReadOnly", "{VariableName} is private and not accessible in this context. @@").ToString(), this);}else{check(false);}}}}
}
//节点展开,包含UK2Node_VariableGet节点
void UK2Node_VariableSet::ExpandNode(class FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph)
{Super::ExpandNode(CompilerContext, SourceGraph);if (CompilerContext.bIsFullCompile){FProperty* VariableProperty = GetPropertyForVariable();const UEdGraphSchema_K2* K2Schema = CompilerContext.GetSchema();if (UEdGraphPin* VariableGetPin = FindPin(GetVariableOutputPinName())){// If the output pin is linked, we need to spawn a separate "Get" node and hook it up.if (VariableGetPin->LinkedTo.Num()){if (VariableProperty){UK2Node_VariableGet* VariableGetNode = CompilerContext.SpawnIntermediateNode<UK2Node_VariableGet>(this, SourceGraph);VariableGetNode->VariableReference = VariableReference;VariableGetNode->AllocateDefaultPins();CompilerContext.MessageLog.NotifyIntermediateObjectCreation(VariableGetNode, this);CompilerContext.MovePinLinksToIntermediate(*VariableGetPin, *VariableGetNode->FindPin(GetVarName()));// Duplicate the connection to the self pin.UEdGraphPin* SetSelfPin = K2Schema->FindSelfPin(*this, EGPD_Input);UEdGraphPin* GetSelfPin = K2Schema->FindSelfPin(*VariableGetNode, EGPD_Input);if (SetSelfPin && GetSelfPin){CompilerContext.CopyPinLinksToIntermediate(*SetSelfPin, *GetSelfPin);}}}Pins.Remove(VariableGetPin);VariableGetPin->MarkPendingKill();}// If property has a BlueprintSetter accessor, then replace the variable get node with a call functionif (VariableProperty){const FString& SetFunctionName = VariableProperty->GetMetaData(FBlueprintMetadata::MD_PropertySetFunction);if (!SetFunctionName.IsEmpty()){UClass* OwnerClass = VariableProperty->GetOwnerClass();UFunction* SetFunction = OwnerClass->FindFunctionByName(*SetFunctionName);check(SetFunction);UK2Node_CallFunction* CallFuncNode = CompilerContext.SpawnIntermediateNode<UK2Node_CallFunction>(this, SourceGraph);CallFuncNode->SetFromFunction(SetFunction);CallFuncNode->AllocateDefaultPins();// Move Exec pin connectionsCompilerContext.MovePinLinksToIntermediate(*GetExecPin(), *CallFuncNode->GetExecPin());// Move Then pin connectionsCompilerContext.MovePinLinksToIntermediate(*FindPinChecked(UEdGraphSchema_K2::PN_Then, EGPD_Output), *CallFuncNode->GetThenPin());// Move Self pin connectionsif (UEdGraphPin* SetSelfPin = K2Schema->FindSelfPin(*this, EGPD_Input)){CompilerContext.MovePinLinksToIntermediate(*SetSelfPin, *K2Schema->FindSelfPin(*CallFuncNode, EGPD_Input));}// Move Value pin connectionsUEdGraphPin* SetFunctionValuePin = nullptr;for (UEdGraphPin* CallFuncPin : CallFuncNode->Pins){if (!K2Schema->IsMetaPin(*CallFuncPin)){check(CallFuncPin->Direction == EGPD_Input);SetFunctionValuePin = CallFuncPin;break;}}check(SetFunctionValuePin);CompilerContext.MovePinLinksToIntermediate(*FindPin(GetVarName(), EGPD_Input), *SetFunctionValuePin);}}}}#undef LOCTEXT_NAMESPACE

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

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

相关文章

OpenAI超级视频模型Sora技术报告解读,虚拟世界涌现了

昨天白天&#xff0c;「现实不存在了」开始全网刷屏。 「我们这么快就步入下一个时代了&#xff1f;Sora简直太炸裂了」。 「这就是电影制作的未来」&#xff01; 谷歌的Gemini Pro 1.5还没出几个小时的风头&#xff0c;天一亮&#xff0c;全世界的聚光灯就集中在了OpenAI的So…

node命令yarn --version指向了java

问题描述 本地安装了java、hadoop和nodejs&#xff0c;并配置了环境变量&#xff0c;但是hadoop的bin目录下存在yarn命令&#xff0c;所以使用nodejs的yarn命令启动项目会出现找不到类&#xff0c;此时键入yarn -version也会显示java的版本。 原因分析 由于配置了hadoop环境…

使用Docker Compose搭建Redis哨兵架构

搭建Redis哨兵(sentinel) 之前我们通过深入理解REDIS哨兵原理了解了Redis哨兵(sentinel)的原理&#xff0c;今天我们手动部署一个哨兵架构。要在Docker中搭建Redis哨兵(sentinel)架构&#xff0c;需要Redis的主从实例以及哨兵实例。之前我们已经使用Docker Compose搭建Redis主…

如何一键抠图换背景?分享两个好用的抠图方法

在数字化时代&#xff0c;图片编辑已成为日常生活和工作中不可或缺的一部分。而智能抠图软件&#xff0c;作为近年来兴起的图片处理技术&#xff0c;正引领着图片编辑的新篇章。它利用先进的机器学习和图像识别技术&#xff0c;能够自动识别和分离图片中的主体&#xff0c;实现…

UnityShader——06UnityShader介绍

UnityShader介绍 UnityShader的基础ShaderLab UnityShader属性块介绍 Properties {//和public变量一样会显示在Unity的inspector面板上//_MainTex为变量名&#xff0c;在属性里的变量一般会加下划线&#xff0c;来区分参数变量和临时变量//Texture为变量命名//2D为类型&…

SpringBoot整合GateWay(详细配置)

前言 在Spring Boot中整合Spring Cloud Gateway是一个常见的需求&#xff0c;尤其是当需要构建一个微服务架构的应用程序时。Spring Cloud Gateway是Spring Cloud生态系统中的一个项目&#xff0c;它提供了一个API网关&#xff0c;用于处理服务之间的请求路由、安全、监控和限流…

【测试运维】性能测试经验文档总结第3篇:VuGen详解(已分享,附代码)

本系列文章md笔记&#xff08;已分享&#xff09;主要讨论性能测试相关知识。入门阶段&#xff1a;认识性能测试分类-(负载测试、压力测试、并发测试、稳定性测试)&#xff0c;常用性能测试指标-(吞吐量、并发数、响应时间、点击数...)&#xff0c;性能测试工具选择。性能脚本&…

列表推导式与生成表达式的区别

列表推导式与生成式表达式的区别&#xff1a; 列表推导式 res[i for i in range(6)] print(res) 结果&#xff1a; [0, 1, 2, 3, 4, 5] 生成表达式&#xff1a; res(i for i in range(6)) print(res) 结果&#xff1a; <generator object <genexpr> at 0x0000013EAD0…

linux系统---防火墙

目录 一、防火墙的认识 1.防火墙定义 2.防火墙分类 二、Linux系统防火墙 1.Netfilter 2.防火墙工具介绍 2.1iptables 2.2firewalld 2.3nftables 2.4netfilter的五个勾子函数和报文流向 2.4.1五个勾子 2.4.2三种报文流向 3.iptables 3.1iptables概述 3.2iptables…

Python在金融大数据分析中的AI应用实战

&#x1f482; 个人网站:【 海拥】【神级代码资源网站】【办公神器】&#x1f91f; 基于Web端打造的&#xff1a;&#x1f449;轻量化工具创作平台&#x1f485; 想寻找共同学习交流的小伙伴&#xff0c;请点击【全栈技术交流群】 随着人工智能时代的到来&#xff0c;Python作为…

Java入门教程:介绍、优势、发展历史以及Hello World程序示例

Java入门教学 java语言介绍 Java是由Sun Microsystems公司(已被Oracle公司收购)于1995年5月推出的Java面向对象程序设计语言和Java平台的总称。由James Gosling和同事们共同研发&#xff0c;并在1995年正式推出。 Java分为三个体系&#xff1a; JavaSE&#xff08;J2SE&…

浅谈iPaaS对企业转型的重要性

面对数字化转型的大浪潮&#xff0c;众多企业都期望着能快速实现全面的数字化转型&#xff0c;让企业在日益激烈的竞争中拥有更稳的市场地位&#xff0c;提升自身的实力及能力&#xff0c;奠定更坚实的基底。但在数字化转型过程中&#xff0c;部分企业数字化基础水平较薄弱&…

开源软件:推动软件行业繁荣的力量

文章目录 &#x1f4d1;引言开源软件的优势分析开放性与透明度低成本与灵活性创新与协作 开源软件对软件行业的影响推动技术创新和进步促进软件行业的合作与交流培养人才和提高技能促进软件行业的可持续发展 结语 &#x1f4d1;引言 随着信息技术的飞速发展&#xff0c;软件已经…

设计模式Python实现

过年在家瞎折腾&#xff0c;闲着无聊看到设计模式&#xff0c;于是就想着用Python实现一下。 简单工厂 根据传入的参数决定创建出哪一种产品类的实例。 class CashFactory:def createCashAdapter(self, type):if type "满100减20":return CashReturn(100, 20)elif…

Sora爆火,普通人的10个赚钱机会

您好&#xff0c;我是码农飞哥&#xff08;wei158556&#xff09;&#xff0c;感谢您阅读本文&#xff0c;欢迎一键三连哦。&#x1f4aa;&#x1f3fb; 1. Python基础专栏&#xff0c;基础知识一网打尽&#xff0c;9.9元买不了吃亏&#xff0c;买不了上当。 Python从入门到精通…

spring boot自动装配

第一步需要在pom.xml文件指定需要导入的坐标 要是没有自动提示需要检查maven有没有 实现代码 /*springboot第三方自动配置实现方法 * 什么是自动配置 自动配置就是springboot启动自动加载的类不需要在手动的控制反转自动的加入bean中 * * *//*第一种方案包扫描 不推荐因为繁琐…

2024 VNCTF----misc---sqlshark sql盲注+流量分析

流量分析 wireshark 可以看到很多 any/**/Or/**/(iF(((((Ord(sUbstr((sElect(grOup_cOncat(password))frOm(users)) frOm 1 fOr 1))))in(80))),1,0))# P any/**/Or/**/(iF(((((Ord(sUbstr((sElect(grOup_cOncat(password))frOm(users)) frOm 1 fOr 1))))in(104))),1,0))#…

18-k8s控制器资源-cronjob控制器

job控制器是执行完一次任务&#xff0c;就结束&#xff1b; cronjob控制器&#xff0c;是基于job控制器&#xff0c;定期频率性执行任务&#xff1b;等同于linux系统中的crontab一样&#xff1b; 1&#xff0c;编辑cronjob资源清单 [rootk8s231 pi]# vim cronjob.yaml apiVers…

mfc140u.dll文丢失导致应用程序无法正常,有哪些解决办法

mfc140u.dll是Microsoft Foundation Classes&#xff08;MFC&#xff09;的一个重要组件&#xff0c;它提供了许多用于开发Windows应用程序的功能和工具。然而&#xff0c;当系统或应用程序升级、恶意软件感染或文件损坏以及用户错误操作等情况发生时&#xff0c;mfc140u.dll文…

HarmonyOS—状态管理概述

在前文的描述中&#xff0c;我们构建的页面多为静态界面。如果希望构建一个动态的、有交互的界面&#xff0c;就需要引入“状态”的概念。 图1 效果图 上面的示例中&#xff0c;用户与应用程序的交互触发了文本状态变更&#xff0c;状态变更引起了UI渲染&#xff0c;UI从“He…