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

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

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

相关文章

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

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

Spring()

一、导学 二、 1.入门程序 spring快照版本是最新的版本&#xff0c;未发布。需要用到<repository></> 下面这个不需要配置仓库&#xff0c;直接写在依赖中就行 引入spring相关依赖 <?xml version"1.0" encoding"UTF-8"?> <proje…

(Python) Python中三种时间格式的转换方法

1. 时间元组 1.1. 时间元组和时间戳的互相转化 import time,datetime # 获取当前时间的时间元组 t time.localtime() print(t) # 时间元组转时间戳 timestamp time.mktime(t) print(timestamp) # time.struct_time(tm_year2019, tm_mon10, tm_mday23, tm_hour23, tm_min15,…

中国移动集采120万部,助推国产5G赶超iPhone15

近期媒体纷纷传出消息指中国移动将大规模集采&#xff0c;预计将采购国产5G手机120万台&#xff0c;加上另外两家运营商的集采数量&#xff0c;估计集采数量可能达到300万部&#xff0c;如此将有助于它在国内高端手机市场赶超苹果。 国产5G手机在8月底突然上市&#xff0c;获益…

python+pytest接口自动化 —— 参数关联

什么是参数关联&#xff1f; 参数关联&#xff0c;也叫接口关联&#xff0c;即接口之间存在参数的联系或依赖。在完成某一功能业务时&#xff0c;有时需要按顺序请求多个接口&#xff0c;此时在某些接口之间可能会存在关联关系。 比如&#xff1a;B接口的某个或某些请求参数是…

攻防演练蓝队|Windows应急响应入侵排查

文章目录 日志分析web日志windows系统日志 文件排查进程排查新增、隐藏账号排查启动项/服务/计划任务排查工具 日志分析 web日志 dirpro扫描目录&#xff0c;sqlmap扫描dvwa Python dirpro -u http://192.168.52.129 -b sqlmap -u "http://192.168.52.129/dvwa/vulnera…

了解容器运行时安全:保护你的容器应用

前言 容器是一种虚拟化技术&#xff0c;用于封装和运行应用程序及其依赖项&#xff0c;以便在不同的计算环境中保持一致性和可移植性。自2013年容器诞生至今&#xff0c;容器Docker镜像的下载量超20亿&#xff0c;虽然容器行业发展如火如荼&#xff0c;但是其安全风险却不容乐…

Tips linux如何获取当前连接的ssh用户信息

linux ubuntu debian如何获取当前连接的ssh用户信息 这里需要用到一个常用的网络工具netstat&#xff0c;如果没有这个软件可以通过下边的命令安装&#xff1a; sudo apt-get install net-tools安装完成后通过下边的指令获取ssh所有连接用户&#xff1a; netstat -al|grep s…

EKP接口开发Webservice服务和Restservice服务以及定时任务Demo

继承com.landray.kmss.sys.webservice2.interfaces.ISysWebservice&#xff0c;同时在接口上使用WebService注解将其标识为WebService接口 package com.landray.kmss.third.notify.webservice;import com.alibaba.fastjson.JSONObject; import com.landray.kmss.sys.webservic…

学习开发一个RISC-V上的操作系统(汪辰老师) — 一次RV32I加法指令的反汇编

前言 &#xff08;1&#xff09;此系列文章是跟着汪辰老师的RISC-V课程所记录的学习笔记。 &#xff08;2&#xff09;该课程相关代码gitee链接&#xff1b; &#xff08;3&#xff09;PLCT实验室实习生长期招聘&#xff1a;招聘信息链接 前置知识 RISC-V 汇编指令编码格式 &a…

AFL安全漏洞挖掘

安全之安全(security)博客目录导读 ATF(TF-A)/OPTEE之FUZZ安全漏洞挖掘汇总 目录 一、AFL简介 二、AFL的安装 三、代码示例及种子语料库 四、AFL插桩编译 五、AFL运行及测试 六、AFL结果分析 一、AFL简介 模糊测试&#xff08;Fuzzing&#xff09;技术作为漏洞挖掘最有…

Go项目踩坑:go get下载超时,goFrame框架下的go项目里将vue项目的dist同步打包发布,go项目打包并压缩

Go项目踩坑&#xff1a;go get下载超时&#xff0c;goFrame框架下的go项目里将vue项目的dist同步打包发布&#xff0c;go项目打包并压缩 go get下载超时goFrame打包静态资源vue项目打包gf pack生成go文件 静态资源使用打包发布go项目交叉编译&#xff0c;省略一些不必要的信息通…

基于闪电连接过程优化的BP神经网络(分类应用) - 附代码

基于闪电连接过程优化的BP神经网络&#xff08;分类应用&#xff09; - 附代码 文章目录 基于闪电连接过程优化的BP神经网络&#xff08;分类应用&#xff09; - 附代码1.鸢尾花iris数据介绍2.数据集整理3.闪电连接过程优化BP神经网络3.1 BP神经网络参数设置3.2 闪电连接过程算…

超越平凡:Topaz Photo AI for Mac带您领略人工智能降噪的魅力

在这个充满噪点和高频信息的时代&#xff0c;照片和视频的降噪成为了一个重要而迫切的需求。Mac用户现在有了一个强大的新工具——Topaz Photo AI for Mac&#xff0c;这是一款利用人工智能技术进行降噪和优化的软件。通过这款软件&#xff0c;您可以轻松地改善图像质量&#x…

Ps:变形

Ps菜单&#xff1a;编辑/变换/变形 Edit/Transform/Warp 变形 Warp是自由变换的一种模式&#xff0c;不仅可以用于物体的伸缩扭曲&#xff0c;也可用于人体的局部塑形。 除了从菜单打开&#xff0c;通常情况下&#xff0c;按 Ctrl T 进入自由变换&#xff0c;然后在画面上右击…

分享一份适合练手的软件测试实战项目

最近&#xff0c;不少读者托我找一个能实际练手的测试项目。开始&#xff0c;我觉得这是很简单的一件事&#xff0c;但当我付诸行动时&#xff0c;却发现&#xff0c;要找到一个对新手友好的练手项目&#xff0c;着实困难。 我翻了不下一百个web网页&#xff0c;包括之前推荐练…

单目3D自动标注

这里介绍两种 1. 基于SAM的点云标注 Seal&#xff1a;是一个多功能的自监督学习框架&#xff0c;能够通过利用视觉基础模型的现成知识和2D-3D的时空约束分割自动驾驶数据集点云 Scalability&#xff1a;可拓展性强&#xff0c;视觉基础模型蒸馏到点云中&#xff0c;避免2D和…

算法-堆/归并排序-排序链表

算法-堆/归并排序-排序链表 1 题目概述 1.1 题目出处 https://leetcode.cn/problems/sort-list/description/?envTypestudy-plan-v2&envIdtop-interview-150 1.2 题目描述 2 优先级队列构建大顶堆 2.1 思路 优先级队列构建小顶堆链表所有元素放入小顶堆依次取出堆顶…

30W网络对讲广播一体音柱

SV-7042T 30W网络对讲广播一体音柱 一、描述 SV-7042T是深圳锐科达电子有限公司的一款壁挂式网络有源音柱&#xff0c;具有10/100M以太网接口&#xff0c;可将网络音源通过自带的功放和喇叭输出播放&#xff0c;其采用防水设计&#xff0c;功率可以从20W到40W。SV-7042T作为网…