当前位置: 首页 > 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…...

国防科技大学计算机基础课程笔记02信息编码

1.机内码和国标码 国标码就是我们非常熟悉的这个GB2312,但是因为都是16进制&#xff0c;因此这个了16进制的数据既可以翻译成为这个机器码&#xff0c;也可以翻译成为这个国标码&#xff0c;所以这个时候很容易会出现这个歧义的情况&#xff1b; 因此&#xff0c;我们的这个国…...

SkyWalking 10.2.0 SWCK 配置过程

SkyWalking 10.2.0 & SWCK 配置过程 skywalking oap-server & ui 使用Docker安装在K8S集群以外&#xff0c;K8S集群中的微服务使用initContainer按命名空间将skywalking-java-agent注入到业务容器中。 SWCK有整套的解决方案&#xff0c;全安装在K8S群集中。 具体可参…...

Day131 | 灵神 | 回溯算法 | 子集型 子集

Day131 | 灵神 | 回溯算法 | 子集型 子集 78.子集 78. 子集 - 力扣&#xff08;LeetCode&#xff09; 思路&#xff1a; 笔者写过很多次这道题了&#xff0c;不想写题解了&#xff0c;大家看灵神讲解吧 回溯算法套路①子集型回溯【基础算法精讲 14】_哔哩哔哩_bilibili 完…...

Java 二维码

Java 二维码 **技术&#xff1a;**谷歌 ZXing 实现 首先添加依赖 <!-- 二维码依赖 --><dependency><groupId>com.google.zxing</groupId><artifactId>core</artifactId><version>3.5.1</version></dependency><de…...

面向无人机海岸带生态系统监测的语义分割基准数据集

描述&#xff1a;海岸带生态系统的监测是维护生态平衡和可持续发展的重要任务。语义分割技术在遥感影像中的应用为海岸带生态系统的精准监测提供了有效手段。然而&#xff0c;目前该领域仍面临一个挑战&#xff0c;即缺乏公开的专门面向海岸带生态系统的语义分割基准数据集。受…...

深度学习水论文:mamba+图像增强

&#x1f9c0;当前视觉领域对高效长序列建模需求激增&#xff0c;对Mamba图像增强这方向的研究自然也逐渐火热。原因在于其高效长程建模&#xff0c;以及动态计算优势&#xff0c;在图像质量提升和细节恢复方面有难以替代的作用。 &#x1f9c0;因此短时间内&#xff0c;就有不…...

Python Einops库:深度学习中的张量操作革命

Einops&#xff08;爱因斯坦操作库&#xff09;就像给张量操作戴上了一副"语义眼镜"——让你用人类能理解的方式告诉计算机如何操作多维数组。这个基于爱因斯坦求和约定的库&#xff0c;用类似自然语言的表达式替代了晦涩的API调用&#xff0c;彻底改变了深度学习工程…...

AxureRP-Pro-Beta-Setup_114413.exe (6.0.0.2887)

Name&#xff1a;3ddown Serial&#xff1a;FiCGEezgdGoYILo8U/2MFyCWj0jZoJc/sziRRj2/ENvtEq7w1RH97k5MWctqVHA 注册用户名&#xff1a;Axure 序列号&#xff1a;8t3Yk/zu4cX601/seX6wBZgYRVj/lkC2PICCdO4sFKCCLx8mcCnccoylVb40lP...

AD学习(3)

1 PCB封装元素组成及简单的PCB封装创建 封装的组成部分&#xff1a; &#xff08;1&#xff09;PCB焊盘&#xff1a;表层的铜 &#xff0c;top层的铜 &#xff08;2&#xff09;管脚序号&#xff1a;用来关联原理图中的管脚的序号&#xff0c;原理图的序号需要和PCB封装一一…...

Windows 下端口占用排查与释放全攻略

Windows 下端口占用排查与释放全攻略​ 在开发和运维过程中&#xff0c;经常会遇到端口被占用的问题&#xff08;如 8080、3306 等常用端口&#xff09;。本文将详细介绍如何通过命令行和图形化界面快速定位并释放被占用的端口&#xff0c;帮助你高效解决此类问题。​ 一、准…...