当前位置: 首页 > news >正文

C++ —— Tinyxml2在Vs2017下相关使用2(较文1更复杂,附源码)

相关链接

C++ —— Tinyxml2在Vs2017下相关使用1(附源码)

tinyxml2简介

     TinyXML2是一个简单,小巧,高效,C++XML解析器,可以很容易地集成到其他程序中。TinyXML-2解析一个XML文档,并从中构建一个 可以读取、修改和保存的文档对象模型 (DOM)。XML代表“可扩展标记语言”。这是一个通用目的 用于描述任意数据的人类和机器可读标记语言。 为存储应用程序数据而创建的所有随机文件格式都可以 全部替换为 XML。一个解析器可以解决所有问题。

源码下载

     Github - Tinyxml2源码下载地址

     一般来说,下载源码后无需编译仅将其中的tinyxml2.cpp、tinyxml2.h包含在自己的项目中就可以使用了。
     (若需构建库使用CMake构建源码,然后利用Vs仅编译tinyxml2项目。)

使用tinyxml2注意事项

     TinyXML与实体

TinyXML认得预定义的特殊“字符实体”,即:& &< <> >" "&apos; ‘
这些在XML文档读取时都会被辨认出来,并会被转化成等价的UTF-8字符。

代码写入xml
<?xml version="1.0" encoding="UTF-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><ItemGroup Label="ProjectConfigurations"><ProjectConfigurations Include="Debug|X64"><Configuration>Debug</Configuration><Platform>x64</Platform></ProjectConfigurations><ProjectConfiguration Include="Release|X64"><Configuration>Release</Configuration><Platform>x64</Platform></ProjectConfiguration></ItemGroup><Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/><Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/><ImportGroup Condition="Exists(&apos;$(QtMsBuild)\qt_defaults.props&apos;)"><Import Project="$(QtMsBuild)\qt_defaults.props"/></ImportGroup><PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos; == &apos;Debug|x64&apos;" Label="QtSettings"><QtInstall>5.12.4(64)</QtInstall><QtModules>core;gui;widgets;network;</QtModules><QtBuildConfig>debug</QtBuildConfig></PropertyGroup><Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists(&apos;$(QtMsBuild)\qt.targets&apos;) or !Exists(&apos;$(QtMsBuild)\qt.props&apos;)"><Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly."/></Target><ImportGroup Label="ExtensionSettings"/><ImportGroup Label="Shared"/><ImportGroup Label="PropertySheets" Condition="&apos;$(Configuration)|$(Platform)&apos; == &apos;Debug|x64&apos;"><Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" Label="LocalAppDataPlatform"/><Import Project="$(QtMsBuild)\Qt.props"/></ImportGroup><ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos; == &apos;Release|x64&apos;" Label="Configuration"><ClCompile><TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType><MultiProcessorCompilation>true</MultiProcessorCompilation><DebugInformationFormat>None</DebugInformationFormat><Optimization>MaxSpeed</Optimization></ClCompile><Link><SubSystem>Console</SubSystem><GenerateDebugInformation>false</GenerateDebugInformation></Link></ItemDefinitionGroup>
</Project>
#include <iostream>
#include "tinyxml/tinyxml2.h"int main()
{
#if 0 // 写入tinyxml2::XMLDocument xml;xml.Parse("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");tinyxml2::XMLElement* rootNode = xml.NewElement("Project");rootNode->SetAttribute("DefaultTargets", "Build");rootNode->SetAttribute("ToolsVersion", "15.0");rootNode->SetAttribute("xmlns", "http://schemas.microsoft.com/developer/msbuild/2003");xml.InsertEndChild(rootNode);{tinyxml2::XMLElement *element_ItemGroup = xml.NewElement("ItemGroup");element_ItemGroup->SetAttribute("Label", "ProjectConfigurations");rootNode->InsertEndChild(element_ItemGroup);{tinyxml2::XMLElement *element_ProjectConfiguration = xml.NewElement("ProjectConfigurations");element_ProjectConfiguration->SetAttribute("Include", "Debug|X64");element_ItemGroup->InsertEndChild(element_ProjectConfiguration);{tinyxml2::XMLElement *element_ProjectConfiguration_Configuration = xml.NewElement("Configuration");element_ProjectConfiguration_Configuration->InsertNewText("Debug");element_ProjectConfiguration->InsertEndChild(element_ProjectConfiguration_Configuration);}{tinyxml2::XMLElement *element_ProjectConfiguration_Platform = xml.NewElement("Platform");element_ProjectConfiguration_Platform->InsertNewText("x64");element_ProjectConfiguration->InsertEndChild(element_ProjectConfiguration_Platform);}}{tinyxml2::XMLElement *element_ProjectConfiguration = xml.NewElement("ProjectConfiguration");element_ProjectConfiguration->SetAttribute("Include", "Release|X64");element_ItemGroup->InsertEndChild(element_ProjectConfiguration);{			tinyxml2::XMLElement *element_ProjectConfiguration_Configuration = xml.NewElement("Configuration");element_ProjectConfiguration_Configuration->InsertNewText("Release");element_ProjectConfiguration->InsertEndChild(element_ProjectConfiguration_Configuration);}{tinyxml2::XMLElement *element_ProjectConfiguration_Platform = xml.NewElement("Platform");element_ProjectConfiguration_Platform->InsertNewText("x64");element_ProjectConfiguration->InsertEndChild(element_ProjectConfiguration_Platform);}}}{tinyxml2::XMLElement *element_Import = xml.NewElement("Import");element_Import->SetAttribute("Project", "$(VCTargetsPath)\\Microsoft.Cpp.Default.props");rootNode->InsertEndChild(element_Import);}{tinyxml2::XMLElement *element_Import = xml.NewElement("Import");element_Import->SetAttribute("Project", "$(VCTargetsPath)\\Microsoft.Cpp.props");rootNode->InsertEndChild(element_Import);}{tinyxml2::XMLElement *element_ImportGroup = xml.NewElement("ImportGroup");element_ImportGroup->SetAttribute("Condition", "Exists('$(QtMsBuild)\\qt_defaults.props')");{tinyxml2::XMLElement *element_Import = xml.NewElement("Import");element_Import->SetAttribute("Project", "$(QtMsBuild)\\qt_defaults.props");element_ImportGroup->InsertEndChild(element_Import);}rootNode->InsertEndChild(element_ImportGroup);}{tinyxml2::XMLElement *element_PropertyGroup = xml.NewElement("PropertyGroup");element_PropertyGroup->SetAttribute("Condition", "'$(Configuration)|$(Platform)' == 'Debug|x64'");element_PropertyGroup->SetAttribute("Label", "QtSettings");{{tinyxml2::XMLElement *element_QtInstall = xml.NewElement("QtInstall");element_QtInstall->InsertNewText("5.12.4(64)");element_PropertyGroup->InsertEndChild(element_QtInstall);}{tinyxml2::XMLElement *element_QtModules = xml.NewElement("QtModules");element_QtModules->InsertNewText("core;gui;widgets;network;");element_PropertyGroup->InsertEndChild(element_QtModules);}{tinyxml2::XMLElement *element_QtBuildConfig = xml.NewElement("QtBuildConfig");element_QtBuildConfig->InsertNewText("debug");element_PropertyGroup->InsertEndChild(element_QtBuildConfig);}}rootNode->InsertEndChild(element_PropertyGroup);}{tinyxml2::XMLElement *element_Target = xml.NewElement("Target");element_Target->SetAttribute("Name", "QtMsBuildNotFound");element_Target->SetAttribute("BeforeTargets", "CustomBuild;ClCompile");element_Target->SetAttribute("Condition", "!Exists('$(QtMsBuild)\\qt.targets') or !Exists('$(QtMsBuild)\\qt.props')");{tinyxml2::XMLElement *element_Message = xml.NewElement("Message");element_Message->SetAttribute("Importance", "High");element_Message->SetAttribute("Text", "QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly.");element_Target->InsertEndChild(element_Message);}rootNode->InsertEndChild(element_Target);}{tinyxml2::XMLElement *element_ImportGroup = xml.NewElement("ImportGroup");element_ImportGroup->SetAttribute("Label", "ExtensionSettings");rootNode->InsertEndChild(element_ImportGroup);}{tinyxml2::XMLElement *element_ImportGroup = xml.NewElement("ImportGroup");element_ImportGroup->SetAttribute("Label", "Shared");rootNode->InsertEndChild(element_ImportGroup);}{tinyxml2::XMLElement *element_ImportGroup = xml.NewElement("ImportGroup");element_ImportGroup->SetAttribute("Label", "PropertySheets");element_ImportGroup->SetAttribute("Condition", "'$(Configuration)|$(Platform)' == 'Debug|x64'");rootNode->InsertEndChild(element_ImportGroup);{tinyxml2::XMLElement *element_Import = xml.NewElement("Import");element_Import->SetAttribute("Project", "$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props");element_Import->SetAttribute("Condition", "exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')");element_Import->SetAttribute("Label", "LocalAppDataPlatform");element_ImportGroup->InsertEndChild(element_Import);}{tinyxml2::XMLElement *element_Import = xml.NewElement("Import");element_Import->SetAttribute("Project", "$(QtMsBuild)\\Qt.props");element_ImportGroup->InsertEndChild(element_Import);}}{tinyxml2::XMLElement *element_ItemDefinitionGroup = xml.NewElement("ItemDefinitionGroup");element_ItemDefinitionGroup->SetAttribute("Condition", "'$(Configuration)|$(Platform)' == 'Release|x64'");element_ItemDefinitionGroup->SetAttribute("Label", "Configuration");{{tinyxml2::XMLElement *element_ClCompile = xml.NewElement("ClCompile");element_ItemDefinitionGroup->InsertEndChild(element_ClCompile);{tinyxml2::XMLElement *element_TreatWChar_tAsBuiltInType = xml.NewElement("TreatWChar_tAsBuiltInType");element_TreatWChar_tAsBuiltInType->InsertNewText("true");element_ClCompile->InsertEndChild(element_TreatWChar_tAsBuiltInType);}{tinyxml2::XMLElement *element_TreatWChar_MultiProcessorCompilation = xml.NewElement("MultiProcessorCompilation");element_TreatWChar_MultiProcessorCompilation->InsertNewText("true");element_ClCompile->InsertEndChild(element_TreatWChar_MultiProcessorCompilation);}{tinyxml2::XMLElement *element_DebugInformationFormat = xml.NewElement("DebugInformationFormat");element_DebugInformationFormat->InsertNewText("None");element_ClCompile->InsertEndChild(element_DebugInformationFormat);}{tinyxml2::XMLElement *element_Optimization = xml.NewElement("Optimization");element_Optimization->InsertNewText("MaxSpeed");element_ClCompile->InsertEndChild(element_Optimization);}}{tinyxml2::XMLElement *element_Link = xml.NewElement("Link");element_ItemDefinitionGroup->InsertEndChild(element_Link);{tinyxml2::XMLElement *element_SubSystem = xml.NewElement("SubSystem");element_SubSystem->InsertNewText("Console");element_Link->InsertEndChild(element_SubSystem);}{tinyxml2::XMLElement *element_GenerateDebugInformation = xml.NewElement("GenerateDebugInformation");element_GenerateDebugInformation->InsertNewText("false");element_Link->InsertEndChild(element_GenerateDebugInformation);}}}rootNode->InsertEndChild(element_ItemDefinitionGroup);}xml.SaveFile("./temp_behaviac.xml");xml.Clear();system("pause");return 0;
}

代码读取xml

在这里插入图片描述

int main()
{tinyxml2::XMLDocument xml;tinyxml2::XMLError errXml = xml.LoadFile("./temp_behaviac.xml");if (tinyxml2::XML_SUCCESS == errXml){tinyxml2::XMLElement* root = xml.RootElement();if (root){std::cout << root->Value()<< " DefaultTargets=" << root->Attribute("DefaultTargets")<< " ToolsVersion=" << root->Attribute("ToolsVersion")<< " xmlns=" << root->Attribute("xmlns") << std::endl;tinyxml2::XMLElement *XMLElement_ItemGroup = root->FirstChildElement();if (XMLElement_ItemGroup){std::cout << "\t" << XMLElement_ItemGroup->Value() << " Label=" << XMLElement_ItemGroup->Attribute("Label") << std::endl;{tinyxml2::XMLElement *XMLElement_ProjectConfigurations = XMLElement_ItemGroup->FirstChildElement();if (!XMLElement_ProjectConfigurations) { return -1; }std::cout << "\t\t" << XMLElement_ProjectConfigurations->Value() << " Include=" << XMLElement_ProjectConfigurations->Attribute("Include") << std::endl;{tinyxml2::XMLElement *XMLElement_Configuration = XMLElement_ProjectConfigurations->FirstChildElement();if (!XMLElement_Configuration) { return -1; }std::cout << "\t\t\t" << XMLElement_Configuration->Value() << " " << XMLElement_Configuration->GetText() << std::endl;tinyxml2::XMLElement *XMLElement_Platform = XMLElement_Configuration->NextSiblingElement();if (!XMLElement_Platform) { return -1; }std::cout << "\t\t\t" << XMLElement_Platform->Value() << " " << XMLElement_Platform->GetText() << std::endl;}tinyxml2::XMLElement *XMLElement_ProjectConfiguration = XMLElement_ProjectConfigurations->NextSiblingElement();if (!XMLElement_ProjectConfiguration) { return -1; }std::cout << "\t\t" << XMLElement_ProjectConfiguration->Value() << " Include=" << XMLElement_ProjectConfiguration->Attribute("Include") << std::endl;{tinyxml2::XMLElement *XMLElement_Configuration = XMLElement_ProjectConfiguration->FirstChildElement();if (!XMLElement_Configuration) { return -1; }std::cout << "\t\t\t" << XMLElement_Configuration->Value() << " " << XMLElement_Configuration->GetText() << std::endl;tinyxml2::XMLElement *XMLElement_Platform = XMLElement_Configuration->NextSiblingElement();if (!XMLElement_Platform) { return -1; }std::cout << "\t\t\t" << XMLElement_Platform->Value() << " " << XMLElement_Platform->GetText() << std::endl;}}tinyxml2::XMLElement *XMLElement_Import = XMLElement_ItemGroup->NextSiblingElement();if (!XMLElement_Import) { return -1; }std::cout << "\t" << XMLElement_Import->Value() << " Project=" << XMLElement_Import->Attribute("Project") << std::endl;tinyxml2::XMLElement *XMLElement_Import2 = XMLElement_Import->NextSiblingElement();if (!XMLElement_Import2) { return -1; }std::cout << "\t" << XMLElement_Import2->Value() << " Project=" << XMLElement_Import2->Attribute("Project") << std::endl;tinyxml2::XMLElement *XMLElement_ImportGroup = XMLElement_Import2->NextSiblingElement();if (!XMLElement_ImportGroup) { return -1; }std::cout << "\t" << XMLElement_ImportGroup->Value() << " Condition=" << XMLElement_ImportGroup->Attribute("Condition") << std::endl;{tinyxml2::XMLElement *XMLElement_Import = XMLElement_ImportGroup->FirstChildElement();if (!XMLElement_Import) { return -1; }std::cout << "\t\t" << XMLElement_Import->Value() << " Project=" << XMLElement_Import->Attribute("Project") << std::endl;}tinyxml2::XMLElement *XMLElement_PropertyGroup = XMLElement_ImportGroup->NextSiblingElement();if (!XMLElement_PropertyGroup) { return -1; }std::cout << "\t" << XMLElement_PropertyGroup->Value() << " Condition=" << XMLElement_PropertyGroup->Attribute("Condition") << " Label=" << XMLElement_PropertyGroup->Attribute("Label") << std::endl;{tinyxml2::XMLElement *XMLElement_QtInstall = XMLElement_PropertyGroup->FirstChildElement();if (!XMLElement_QtInstall) { return -1; }std::cout << "\t\t" << XMLElement_QtInstall->Value() << " " << XMLElement_QtInstall->GetText() << std::endl;tinyxml2::XMLElement *XMLElement_QtModules = XMLElement_QtInstall->NextSiblingElement();if (!XMLElement_QtModules) { return -1; }std::cout << "\t\t" << XMLElement_QtModules->Value() << " " << XMLElement_QtModules->GetText() << std::endl;tinyxml2::XMLElement *XMLElement_QtBuildConfig = XMLElement_QtModules->NextSiblingElement();if (!XMLElement_QtBuildConfig) { return -1; }std::cout << "\t\t" << XMLElement_QtBuildConfig->Value() << " " << XMLElement_QtBuildConfig->GetText() << std::endl;}tinyxml2::XMLElement *XMLElement_Target = XMLElement_PropertyGroup->NextSiblingElement();if (!XMLElement_Target) { return -1; }std::cout << "\t" << XMLElement_Target->Value() << " Name=" << XMLElement_Target->Attribute("Name") << " BeforeTargets=" << XMLElement_Target->Attribute("BeforeTargets") << " Condition=" << XMLElement_Target->Attribute("Condition") << std::endl;{tinyxml2::XMLElement *XMLElement_Message = XMLElement_Target->FirstChildElement();if (!XMLElement_Message) { return -1; }std::cout << "\t\t" << XMLElement_Message->Value() << " Importance=" << XMLElement_Message->Attribute("Importance") << " Text=" << XMLElement_Message->Attribute("Text") << std::endl;}tinyxml2::XMLElement *XMLElement_ImportGroup1 = XMLElement_Target->NextSiblingElement();if (!XMLElement_ImportGroup1) { return -1; }std::cout << "\t" << XMLElement_ImportGroup1->Value() << " Label=" << XMLElement_ImportGroup1->Attribute("Label") << std::endl;tinyxml2::XMLElement *XMLElement_ImportGroup2 = XMLElement_ImportGroup1->NextSiblingElement();if (!XMLElement_ImportGroup2) { return -1; }std::cout << "\t" << XMLElement_ImportGroup2->Value() << " Label=" << XMLElement_ImportGroup2->Attribute("Label") << std::endl;tinyxml2::XMLElement *XMLElement_ImportGroup3 = XMLElement_ImportGroup2->NextSiblingElement();if (!XMLElement_ImportGroup3) { return -1; }std::cout << "\t" << XMLElement_ImportGroup3->Value() << " Label=" << XMLElement_ImportGroup3->Attribute("Label") << " Condition=" << XMLElement_ImportGroup3->Attribute("Condition") << std::endl;{tinyxml2::XMLElement *XMLElement_Import = XMLElement_ImportGroup3->FirstChildElement();if (!XMLElement_Import) { return -1; }std::cout << "\t\t" << XMLElement_Import->Value() << " Project=" << XMLElement_Import->Attribute("Project") << " Condition=" << XMLElement_Import->Attribute("Condition") << " Label=" << XMLElement_Import->Attribute("Label") << std::endl;tinyxml2::XMLElement *XMLElement_Import2 = XMLElement_Import->NextSiblingElement();if (!XMLElement_Import2) { return -1; }std::cout << "\t\t" << XMLElement_Import2->Value() << " Project=" << XMLElement_Import2->Attribute("Project") << std::endl;}tinyxml2::XMLElement *XMLElement_ItemDefinitionGroup = XMLElement_ImportGroup3->NextSiblingElement();if (!XMLElement_ItemDefinitionGroup) { return -1; }std::cout << "\t" << XMLElement_ItemDefinitionGroup->Value() << " Condition=" << XMLElement_ItemDefinitionGroup->Attribute("Condition") << " Label=" << XMLElement_ItemDefinitionGroup->Attribute("Label") << std::endl;{tinyxml2::XMLElement *XMLElement_ClCompile = XMLElement_ItemDefinitionGroup->FirstChildElement();if (!XMLElement_ClCompile) { return -1; }std::cout << "\t" << XMLElement_ClCompile->Value() << std::endl;{tinyxml2::XMLElement *XMLElement_TreatWChar_tAsBuiltInType = XMLElement_ClCompile->FirstChildElement();if (!XMLElement_TreatWChar_tAsBuiltInType) { return -1; }std::cout << "\t\t" << XMLElement_TreatWChar_tAsBuiltInType->Value() << " " << XMLElement_TreatWChar_tAsBuiltInType->GetText() << std::endl;tinyxml2::XMLElement *XMLElement_MultiProcessorCompilation = XMLElement_TreatWChar_tAsBuiltInType->NextSiblingElement();if (!XMLElement_MultiProcessorCompilation) { return -1; }std::cout << "\t\t" << XMLElement_MultiProcessorCompilation->Value() << " " << XMLElement_MultiProcessorCompilation->GetText() << std::endl;tinyxml2::XMLElement *XMLElement_DebugInformationFormat = XMLElement_MultiProcessorCompilation->NextSiblingElement();if (!XMLElement_DebugInformationFormat) { return -1; }std::cout << "\t\t" << XMLElement_DebugInformationFormat->Value() << " " << XMLElement_DebugInformationFormat->GetText() << std::endl;tinyxml2::XMLElement *XMLElement_Optimization = XMLElement_DebugInformationFormat->NextSiblingElement();if (!XMLElement_Optimization) { return -1; }std::cout << "\t\t" << XMLElement_Optimization->Value() << " " << XMLElement_Optimization->GetText() << std::endl;}tinyxml2::XMLElement *XMLElement_Link = XMLElement_ClCompile->NextSiblingElement();if (!XMLElement_Link) { return -1; }std::cout << "\t" << XMLElement_Link->Value() << std::endl;{tinyxml2::XMLElement *XMLElement_SubSystem = XMLElement_Link->FirstChildElement();if (!XMLElement_SubSystem) { return -1; }std::cout << "\t\t" << XMLElement_SubSystem->Value() << " " << XMLElement_SubSystem->GetText() << std::endl;tinyxml2::XMLElement *XMLElement_GenerateDebugInformation = XMLElement_SubSystem->NextSiblingElement();if (!XMLElement_GenerateDebugInformation) { return -1; }std::cout << "\t\t" << XMLElement_GenerateDebugInformation->Value() << " " << XMLElement_GenerateDebugInformation->GetText() << std::endl;}}}}root = nullptr;}system("pause");return 0;
}

笔者

笔者 - jxd

相关文章:

C++ —— Tinyxml2在Vs2017下相关使用2(较文1更复杂,附源码)

相关链接 C —— Tinyxml2在Vs2017下相关使用1&#xff08;附源码&#xff09; tinyxml2简介 TinyXML2是一个简单&#xff0c;小巧&#xff0c;高效&#xff0c;CXML解析器&#xff0c;可以很容易地集成到其他程序中。TinyXML-2解析一个XML文档&#xff0c;并从中构建一个 可以…...

阿里内推强推的并发编程学习笔记,原理+实战+面试题,面面俱到!

并发编程 谈到并发编程&#xff0c;可能很多人都有过经验&#xff0c;甚至比我了解的更多。 那么并发与并行的区别又是什么&#xff1f; 并发编程是编程中的核心问题&#xff0c;实践中&#xff0c;当人们希望利用计算机处理一些现实世界问题&#xff0c;以及希望同时处理多…...

域名注册查询流程

域名注册查询怎么查域名是否被注册?域名注册查询如何查域名的过期时间和注册商?域名注册查询用什么工具?下面是关于域名注册查询流程介绍。 1、域名注册查询可以用什么工具? 这里可以使用聚查工具&#xff0c;聚查包括&#xff1a;whois 查询、建站历史查询、反链查询、P…...

【Linux学习笔记】代码编辑工具vim

1. vim工具基本模式的转换2. vim命令模式下的各种编辑命令2.1. 光标行定位2.2. 光标自由定位2.3. 复制粘贴2.4. 删除2.5. 文本的大小写替换2.6. 文本的替换2.7. 文本的前删后删2.8. 撤销操作 3. vim底行模式下的命令3.1. 设置行号与取消设置行号3.2. 分屏操作3.3. 在不退出vim的…...

Android Boring SSL

前期设置 SSLContext.getInstance(“TLS”)SSLContext.init()SSLContext.getSocketFactory()SSLSocketFactory.createSocket()NativeSsl.newInstance()BioWrapper 的创建ConscryptEngineSocket.startHandshake() TLS协商 state_start_connect(TLS)state_enter_early_data(TLS)s…...

中国人民大学与加拿大女王大学金融硕士项目:开启你的金融精英之路

在全球化的今天&#xff0c;金融行业的发展日新月异&#xff0c;对金融人才的需求也日益增长。为了满足这一需求&#xff0c;中国人民大学与加拿大女王大学联合推出了金融硕士项目&#xff0c;旨在培养具有国际视野、专业素养和创新能力的金融精英。 这一开创性的项目将两大世…...

HashSet编程小案例,控制生日和姓名。重写HashCode

Java编程&#xff1a; 定义员工Employee类&#xff0c;该类包含&#xff1a;private成员属性name&#xff0c;sal&#xff0c;birthday(MyDate类型)&#xff0c; 其中birthday为MyDate类型(属性包括&#xff1a;year&#xff0c;month&#xff0c;day)&#xff0c; 要求&…...

虚幻阴影整理

虚拟阴影贴图&#xff08;VSM&#xff09;是一种全新的阴影贴图方法&#xff0c;可以提供稳定的高分辨率阴影。通过与虚幻引擎5的Nanite虚拟几何体、Lumen全局光照和反射以及世界分区功能结合使用&#xff0c;它能够实现电影级的品质效果&#xff0c;为大型开放场景提供光照。 …...

MySQL数据库(一)

数据库 —— 基础 1. 数据库 DataBase 数据库管理系统 2. SQL语言2.1 DDL数据定义语言2.1.1 数据库基础操作2.1.2 数据表基础操作2.1.3 字段基础操作 2.2 DML表记录管理2.2.1 插入数据INSERT2.2.2 更新数据UPDATE2.2.3 删除数据DELETE 3. SQL数据类型3.1 数值类型3.1.1 整数类型…...

C++11 新特性

C11 新特性 C11 新特性统一的列表初始化声明auto 关键字decltype 关键字nullptr 关键字 关键字 using使用 using 在子类中引用基类的成员使用 using 关键字定义类型别名 范围-based for 循环右值引用和移动语义左值引用和右值引用右值引用使用场景和意义完美转发 lambda表达式移…...

排查手机应用app微信登录问题不跳转失败原因汇总及其解决方案

经过最近我发的文章,我个人觉得解决了不少小问题,因为最近很小白的问题已经没有人私聊问我了,我总结了一下排查手机应用app微信登录问题不跳转失败的原因汇总及其解决方案在这篇文章中,分析微信登录不跳转的原因,并提供解决方案。希望通过这篇文章,能够帮助大家顺利解决这…...

软考高级系统架构设计师系列之:数学与经济管理

软考高级系统架构设计师系列之:数学与经济管理 一、数学与经济管理二、图论应用-最小生成树三、图论应用-最短路径四、图论应用-网络与最大流量五、运筹方法-线性规划六、运筹方法-动态规划七、运筹方法-转移矩阵八、运筹方法-排队论九、运筹方法-决策-不确定决策十、运筹方法…...

基于Scrapyd与Gerapy部署scrapy爬虫方案【可用于分布式爬虫部署】

scrapyd部署爬虫 Scrapyd 是一个基于 Scrapy 的开源项目&#xff0c;它提供了一个简单的方式来部署、运行和监控 Scrapy 爬虫。它是一个用于集成 Scrapy 爬虫到分布式架构中的工具&#xff0c;允许您在分布式环境中运行爬虫&#xff0c;并提供了一组 Web API&#xff0c;用于管…...

ST-SSL:基于自监督学习的交通流预测模型

文章信息 文章题为“Spatio-Temporal Self-Supervised Learning for Traffic Flow Prediction”&#xff0c;是一篇发表于The Thirty-Seventh AAAI Conference on Artificial Intelligence (AAAI-23)的一篇论文。该论文主要针对交通流预测任务&#xff0c;结合自监督学习&#…...

如何处理C++中的字符串编码和国际化?

在C中处理字符串编码和国际化的常用方式如下&#xff1a; 字符串编码&#xff1a; 使用UTF-8编码&#xff1a;UTF-8是一种可变字节长度的编码方式&#xff0c;广泛用于表示 Unicode 字符。C中的字符串类型std::string默认使用的是UTF-8编码。可以通过使用宽字符类型std::wstrin…...

DH48WK 温控器参数设置

北京东昊力伟科技有限责任公司 温控仪、温度控制器 产品特点&#xff1a; 可外接温度传感器Pt100、Cu50、K、E、J、N、T、R、S、B兼容输入&#xff1b;PID控制输出、位式控制输出、继电器报警输出&#xff1b;控温能满足设定温度值的0.2℃&#xff1b;既可用于加热控制、也可…...

【文档智能】多模态预训练模型及相关数据集汇总

前言 大模型时代&#xff0c;在现实场景中或者企业私域数据中&#xff0c;大多数数据都以文档的形式存在&#xff0c;如何更好的解析获取文档数据显得尤为重要。文档智能也从以前的目标检测&#xff08;版面分析&#xff09;阶段转向多模态预训练阶段&#xff0c;本文将介绍目…...

超全整理,性能测试——数据库索引问题定位+分析(详细)

目录&#xff1a;导读 前言一、Python编程入门到精通二、接口自动化项目实战三、Web自动化项目实战四、App自动化项目实战五、一线大厂简历六、测试开发DevOps体系七、常用自动化测试工具八、JMeter性能测试九、总结&#xff08;尾部小惊喜&#xff09; 前言 1、数据库服务器添…...

44springboot摄影跟拍预定管理系统

大家好✌&#xff01;我是CZ淡陌。一名专注以理论为基础实战为主的技术博主&#xff0c;将再这里为大家分享优质的实战项目&#xff0c;本人在Java毕业设计领域有多年的经验&#xff0c;陆续会更新更多优质的Java实战项目&#xff0c;希望你能有所收获&#xff0c;少走一些弯路…...

Flink之窗口触发机制及自定义Trigger的使用

1 窗口触发机制 窗口计算的触发机制都是由Trigger类决定的,Flink中为各类内置的WindowsAssigner都设计了对应的默认Trigger. 层次结构如下: Trigger ProcessingTimeoutTriggerEventTimeTriggerCountTriggerDeltaTriggerNeverTrigger in GlobalWindowsContinuousEventTimeTrigge…...

网络六边形受到攻击

大家读完觉得有帮助记得关注和点赞&#xff01;&#xff01;&#xff01; 抽象 现代智能交通系统 &#xff08;ITS&#xff09; 的一个关键要求是能够以安全、可靠和匿名的方式从互联车辆和移动设备收集地理参考数据。Nexagon 协议建立在 IETF 定位器/ID 分离协议 &#xff08;…...

地震勘探——干扰波识别、井中地震时距曲线特点

目录 干扰波识别反射波地震勘探的干扰波 井中地震时距曲线特点 干扰波识别 有效波&#xff1a;可以用来解决所提出的地质任务的波&#xff1b;干扰波&#xff1a;所有妨碍辨认、追踪有效波的其他波。 地震勘探中&#xff0c;有效波和干扰波是相对的。例如&#xff0c;在反射波…...

TDengine 快速体验(Docker 镜像方式)

简介 TDengine 可以通过安装包、Docker 镜像 及云服务快速体验 TDengine 的功能&#xff0c;本节首先介绍如何通过 Docker 快速体验 TDengine&#xff0c;然后介绍如何在 Docker 环境下体验 TDengine 的写入和查询功能。如果你不熟悉 Docker&#xff0c;请使用 安装包的方式快…...

ES6从入门到精通:前言

ES6简介 ES6&#xff08;ECMAScript 2015&#xff09;是JavaScript语言的重大更新&#xff0c;引入了许多新特性&#xff0c;包括语法糖、新数据类型、模块化支持等&#xff0c;显著提升了开发效率和代码可维护性。 核心知识点概览 变量声明 let 和 const 取代 var&#xf…...

利用ngx_stream_return_module构建简易 TCP/UDP 响应网关

一、模块概述 ngx_stream_return_module 提供了一个极简的指令&#xff1a; return <value>;在收到客户端连接后&#xff0c;立即将 <value> 写回并关闭连接。<value> 支持内嵌文本和内置变量&#xff08;如 $time_iso8601、$remote_addr 等&#xff09;&a…...

盘古信息PCB行业解决方案:以全域场景重构,激活智造新未来

一、破局&#xff1a;PCB行业的时代之问 在数字经济蓬勃发展的浪潮中&#xff0c;PCB&#xff08;印制电路板&#xff09;作为 “电子产品之母”&#xff0c;其重要性愈发凸显。随着 5G、人工智能等新兴技术的加速渗透&#xff0c;PCB行业面临着前所未有的挑战与机遇。产品迭代…...

基于数字孪生的水厂可视化平台建设:架构与实践

分享大纲&#xff1a; 1、数字孪生水厂可视化平台建设背景 2、数字孪生水厂可视化平台建设架构 3、数字孪生水厂可视化平台建设成效 近几年&#xff0c;数字孪生水厂的建设开展的如火如荼。作为提升水厂管理效率、优化资源的调度手段&#xff0c;基于数字孪生的水厂可视化平台的…...

Nuxt.js 中的路由配置详解

Nuxt.js 通过其内置的路由系统简化了应用的路由配置&#xff0c;使得开发者可以轻松地管理页面导航和 URL 结构。路由配置主要涉及页面组件的组织、动态路由的设置以及路由元信息的配置。 自动路由生成 Nuxt.js 会根据 pages 目录下的文件结构自动生成路由配置。每个文件都会对…...

SpringBoot+uniapp 的 Champion 俱乐部微信小程序设计与实现,论文初版实现

摘要 本论文旨在设计并实现基于 SpringBoot 和 uniapp 的 Champion 俱乐部微信小程序&#xff0c;以满足俱乐部线上活动推广、会员管理、社交互动等需求。通过 SpringBoot 搭建后端服务&#xff0c;提供稳定高效的数据处理与业务逻辑支持&#xff1b;利用 uniapp 实现跨平台前…...

从零开始打造 OpenSTLinux 6.6 Yocto 系统(基于STM32CubeMX)(九)

设备树移植 和uboot设备树修改的内容同步到kernel将设备树stm32mp157d-stm32mp157daa1-mx.dts复制到内核源码目录下 源码修改及编译 修改arch/arm/boot/dts/st/Makefile&#xff0c;新增设备树编译 stm32mp157f-ev1-m4-examples.dtb \stm32mp157d-stm32mp157daa1-mx.dtb修改…...