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

C++标准模板(STL)- 类型支持 (数值极限,min_exponent10,max_exponent,max_exponent10)

数值极限

std::numeric_limits

定义于头文件 <limits>

定义于头文件 <limits>

template< class T > class numeric_limits;

numeric_limits 类模板提供查询各种算术类型属性的标准化方式(例如 int 类型的最大可能值是 std::numeric_limits<int>::max() )。
 

10 的该数次幂是合法正规浮点值的最小负数

std::numeric_limits<T>::min_exponent10

static const int min_exponent10;

(C++11 前)

static constexpr int min_exponent10;

(C++11 起)

std::numeric_limits<T>::min_exponent10 的值是满足 10n是浮点类型 T 的合法正规值的最低负数 n

标准特化

Tstd::numeric_limits<T>::min_exponent10 的值
/* non-specialized */​0​
bool​0​
char​0​
signed char​0​
unsigned char​0​
wchar_t​0​
char8_t​0​
char16_t​0​
char32_t​0​
short​0​
unsigned short​0​
int​0​
unsigned int​0​
long​0​
unsigned long​0​
long long​0​
unsigned long long​0​
floatFLT_MIN_10_EXP
doubleDBL_MIN_10_EXP
long doubleLDBL_MIN_10_EXP

调用示例

#include <iostream>
#include <string>
#include <limits>
#include <cstdint>
#include <cfloat>struct SName
{
};//偏特化
struct SPartSpec
{
};namespace std
{
template<>
struct numeric_limits<SPartSpec>
{static _GLIBCXX_USE_CONSTEXPR bool is_specialized   = true;static _GLIBCXX_USE_CONSTEXPR bool is_signed        = true;static _GLIBCXX_USE_CONSTEXPR bool is_integer       = true;static _GLIBCXX_USE_CONSTEXPR bool is_exact         = true;static _GLIBCXX_USE_CONSTEXPR bool has_infinity     = true;static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN    = true;static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = true;static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm     = denorm_present;static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss  = true;static _GLIBCXX_USE_CONSTEXPR float_round_style round_style     = round_toward_neg_infinity;static _GLIBCXX_USE_CONSTEXPR bool is_iec559        = true;static _GLIBCXX_USE_CONSTEXPR bool is_bounded       = true;static _GLIBCXX_USE_CONSTEXPR bool is_modulo        = true;static _GLIBCXX_USE_CONSTEXPR int  digits           = CHAR_BIT;static _GLIBCXX_USE_CONSTEXPR int  digits10         = CHAR_BIT;static _GLIBCXX_USE_CONSTEXPR int  max_digits10     = DECIMAL_DIG;static _GLIBCXX_USE_CONSTEXPR int  radix            = FLT_RADIX;static _GLIBCXX_USE_CONSTEXPR int  min_exponent     = FLT_MIN_EXP;static _GLIBCXX_USE_CONSTEXPR int  min_exponent10   = FLT_MIN_10_EXP;
};
}int main()
{std::cout << std::boolalpha;std::cout << "std::numeric_limits<bool>::min_exponent10:                 "<< std::numeric_limits<bool>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<char>::min_exponent10:                 "<< std::numeric_limits<char>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<signed char>::min_exponent10:          "<< std::numeric_limits<signed char>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<unsigned char>::min_exponent10:        "<< std::numeric_limits<unsigned char>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<wchar_t>::min_exponent10:              "<< std::numeric_limits<wchar_t>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<char16_t>::min_exponent10:             "<< std::numeric_limits<char16_t>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<char32_t>::min_exponent10:             "<< std::numeric_limits<char32_t>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<short>::min_exponent10:                "<< std::numeric_limits<short>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<unsigned short>::min_exponent10:       "<< std::numeric_limits<unsigned short>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<int>::min_exponent10:                  "<< std::numeric_limits<int>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<unsigned int>::min_exponent10:         "<< std::numeric_limits<unsigned int>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<long>::min_exponent10:                 "<< std::numeric_limits<long>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<unsigned long>::min_exponent10:        "<< std::numeric_limits<unsigned long>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<long long>::min_exponent10:            "<< std::numeric_limits<long long>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<unsigned long long>::min_exponent10:   "<< std::numeric_limits<unsigned long long>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<float>::min_exponent10:                "<< std::numeric_limits<float>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<double>::min_exponent10:               "<< std::numeric_limits<double>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<long double>::min_exponent10:          "<< std::numeric_limits<long double>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<std::string>::min_exponent10:          "<< std::numeric_limits<std::string>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<SName>::min_exponent10:                "<< std::numeric_limits<SName>::min_exponent10 << std::endl;std::cout << "std::numeric_limits<SPartSpec>::min_exponent10:            "<< std::numeric_limits<SPartSpec>::min_exponent10 << std::endl;return 0;
}

输出

底的该数次幂是合法有限浮点值的最大整数加一

std::numeric_limits<T>::max_exponent

static const int max_exponent;

(C++11 前)

static constexpr int max_exponent;

(C++11 起)

std::numeric_limits<T>::max_exponent 的值是满足 rn-1是浮点类型 T 的可表示有限值最大正整数 n ,其中 r 是 std::numeric_limits<T>::radix 。

标准特化

Tstd::numeric_limits<T>::max_exponent 的值
/* non-specialized */​0​
bool​0​
char​0​
signed char​0​
unsigned char​0​
wchar_t​0​
char8_t​0​
char16_t​0​
char32_t​0​
short​0​
unsigned short​0​
int​0​
unsigned int​0​
long​0​
unsigned long​0​
long long​0​
unsigned long long​0​
floatFLT_MAX_EXP
doubleDBL_MAX_EXP
long doubleLDBL_MAX_EXP

调用示例

#include <iostream>
#include <string>
#include <limits>
#include <cstdint>
#include <cfloat>struct SName
{
};//偏特化
struct SPartSpec
{
};namespace std
{
template<>
struct numeric_limits<SPartSpec>
{static _GLIBCXX_USE_CONSTEXPR bool is_specialized   = true;static _GLIBCXX_USE_CONSTEXPR bool is_signed        = true;static _GLIBCXX_USE_CONSTEXPR bool is_integer       = true;static _GLIBCXX_USE_CONSTEXPR bool is_exact         = true;static _GLIBCXX_USE_CONSTEXPR bool has_infinity     = true;static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN    = true;static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = true;static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm     = denorm_present;static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss  = true;static _GLIBCXX_USE_CONSTEXPR float_round_style round_style     = round_toward_neg_infinity;static _GLIBCXX_USE_CONSTEXPR bool is_iec559        = true;static _GLIBCXX_USE_CONSTEXPR bool is_bounded       = true;static _GLIBCXX_USE_CONSTEXPR bool is_modulo        = true;static _GLIBCXX_USE_CONSTEXPR int  digits           = CHAR_BIT;static _GLIBCXX_USE_CONSTEXPR int  digits10         = CHAR_BIT;static _GLIBCXX_USE_CONSTEXPR int  max_digits10     = DECIMAL_DIG;static _GLIBCXX_USE_CONSTEXPR int  radix            = FLT_RADIX;static _GLIBCXX_USE_CONSTEXPR int  min_exponent     = FLT_MIN_EXP;static _GLIBCXX_USE_CONSTEXPR int  min_exponent10   = FLT_MIN_10_EXP;static _GLIBCXX_USE_CONSTEXPR int  max_exponent     = FLT_MAX_EXP;
};
}int main()
{std::cout << std::boolalpha;std::cout << "std::numeric_limits<bool>::max_exponent:                 "<< std::numeric_limits<bool>::max_exponent << std::endl;std::cout << "std::numeric_limits<char>::max_exponent:                 "<< std::numeric_limits<char>::max_exponent << std::endl;std::cout << "std::numeric_limits<signed char>::max_exponent:          "<< std::numeric_limits<signed char>::max_exponent << std::endl;std::cout << "std::numeric_limits<unsigned char>::max_exponent:        "<< std::numeric_limits<unsigned char>::max_exponent << std::endl;std::cout << "std::numeric_limits<wchar_t>::max_exponent:              "<< std::numeric_limits<wchar_t>::max_exponent << std::endl;std::cout << "std::numeric_limits<char16_t>::max_exponent:             "<< std::numeric_limits<char16_t>::max_exponent << std::endl;std::cout << "std::numeric_limits<char32_t>::max_exponent:             "<< std::numeric_limits<char32_t>::max_exponent << std::endl;std::cout << "std::numeric_limits<short>::max_exponent:                "<< std::numeric_limits<short>::max_exponent << std::endl;std::cout << "std::numeric_limits<unsigned short>::max_exponent:       "<< std::numeric_limits<unsigned short>::max_exponent << std::endl;std::cout << "std::numeric_limits<int>::max_exponent:                  "<< std::numeric_limits<int>::max_exponent << std::endl;std::cout << "std::numeric_limits<unsigned int>::max_exponent:         "<< std::numeric_limits<unsigned int>::max_exponent << std::endl;std::cout << "std::numeric_limits<long>::max_exponent:                 "<< std::numeric_limits<long>::max_exponent << std::endl;std::cout << "std::numeric_limits<unsigned long>::max_exponent:        "<< std::numeric_limits<unsigned long>::max_exponent << std::endl;std::cout << "std::numeric_limits<long long>::max_exponent:            "<< std::numeric_limits<long long>::max_exponent << std::endl;std::cout << "std::numeric_limits<unsigned long long>::max_exponent:   "<< std::numeric_limits<unsigned long long>::max_exponent << std::endl;std::cout << "std::numeric_limits<float>::max_exponent:                "<< std::numeric_limits<float>::max_exponent << std::endl;std::cout << "std::numeric_limits<double>::max_exponent:               "<< std::numeric_limits<double>::max_exponent << std::endl;std::cout << "std::numeric_limits<long double>::max_exponent:          "<< std::numeric_limits<long double>::max_exponent << std::endl;std::cout << "std::numeric_limits<std::string>::max_exponent:          "<< std::numeric_limits<std::string>::max_exponent << std::endl;std::cout << "std::numeric_limits<SName>::max_exponent:                "<< std::numeric_limits<SName>::max_exponent << std::endl;std::cout << "std::numeric_limits<SPartSpec>::max_exponent:            "<< std::numeric_limits<SPartSpec>::max_exponent << std::endl;return 0;
}

 输出

10 的该数次幂是合法有限浮点值的最大整数

std::numeric_limits<T>::max_exponent10

std::numeric_limits<T>::max_exponent10 的值是满足 10n是浮点类型 T 的可表示有限值的最大正整数 n

标准特化

Tstd::numeric_limits<T>::max_exponent10 的值
/* non-specialized */​0​
bool​0​
char​0​
signed char​0​
unsigned char​0​
wchar_t​0​
char8_t​0​
char16_t​0​
char32_t​0​
short​0​
unsigned short​0​
int​0​
unsigned int​0​
long​0​
unsigned long​0​
long long​0​
unsigned long long​0​
floatFLT_MAX_10_EXP
doubleDBL_MAX_10_EXP
long doubleLDBL_MAX_10_EXP

调用示例

#include <iostream>
#include <string>
#include <limits>
#include <cstdint>
#include <cfloat>struct SName
{
};//偏特化
struct SPartSpec
{
};namespace std
{
template<>
struct numeric_limits<SPartSpec>
{static _GLIBCXX_USE_CONSTEXPR bool is_specialized   = true;static _GLIBCXX_USE_CONSTEXPR bool is_signed        = true;static _GLIBCXX_USE_CONSTEXPR bool is_integer       = true;static _GLIBCXX_USE_CONSTEXPR bool is_exact         = true;static _GLIBCXX_USE_CONSTEXPR bool has_infinity     = true;static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN    = true;static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = true;static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm     = denorm_present;static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss  = true;static _GLIBCXX_USE_CONSTEXPR float_round_style round_style     = round_toward_neg_infinity;static _GLIBCXX_USE_CONSTEXPR bool is_iec559        = true;static _GLIBCXX_USE_CONSTEXPR bool is_bounded       = true;static _GLIBCXX_USE_CONSTEXPR bool is_modulo        = true;static _GLIBCXX_USE_CONSTEXPR int  digits           = CHAR_BIT;static _GLIBCXX_USE_CONSTEXPR int  digits10         = CHAR_BIT;static _GLIBCXX_USE_CONSTEXPR int  max_digits10     = DECIMAL_DIG;static _GLIBCXX_USE_CONSTEXPR int  radix            = FLT_RADIX;static _GLIBCXX_USE_CONSTEXPR int  min_exponent     = FLT_MIN_EXP;static _GLIBCXX_USE_CONSTEXPR int  min_exponent10   = FLT_MIN_10_EXP;static _GLIBCXX_USE_CONSTEXPR int  max_exponent     = FLT_MAX_EXP;static _GLIBCXX_USE_CONSTEXPR int  max_exponent10   = FLT_MAX_EXP;
};
}int main()
{std::cout << std::boolalpha;std::cout << "std::numeric_limits<bool>::max_exponent10:                 "<< std::numeric_limits<bool>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<char>::max_exponent10:                 "<< std::numeric_limits<char>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<signed char>::max_exponent10:          "<< std::numeric_limits<signed char>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<unsigned char>::max_exponent10:        "<< std::numeric_limits<unsigned char>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<wchar_t>::max_exponent10:              "<< std::numeric_limits<wchar_t>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<char16_t>::max_exponent10:             "<< std::numeric_limits<char16_t>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<char32_t>::max_exponent10:             "<< std::numeric_limits<char32_t>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<short>::max_exponent10:                "<< std::numeric_limits<short>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<unsigned short>::max_exponent10:       "<< std::numeric_limits<unsigned short>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<int>::max_exponent10:                  "<< std::numeric_limits<int>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<unsigned int>::max_exponent10:         "<< std::numeric_limits<unsigned int>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<long>::max_exponent10:                 "<< std::numeric_limits<long>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<unsigned long>::max_exponent10:        "<< std::numeric_limits<unsigned long>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<long long>::max_exponent10:            "<< std::numeric_limits<long long>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<unsigned long long>::max_exponent10:   "<< std::numeric_limits<unsigned long long>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<float>::max_exponent10:                "<< std::numeric_limits<float>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<double>::max_exponent10:               "<< std::numeric_limits<double>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<long double>::max_exponent10:          "<< std::numeric_limits<long double>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<std::string>::max_exponent10:          "<< std::numeric_limits<std::string>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<SName>::max_exponent10:                "<< std::numeric_limits<SName>::max_exponent10 << std::endl;std::cout << "std::numeric_limits<SPartSpec>::max_exponent10:            "<< std::numeric_limits<SPartSpec>::max_exponent10 << std::endl;return 0;
}

输出

相关文章:

C++标准模板(STL)- 类型支持 (数值极限,min_exponent10,max_exponent,max_exponent10)

数值极限 std::numeric_limits 定义于头文件 <limits> 定义于头文件 <limits> template< class T > class numeric_limits; numeric_limits 类模板提供查询各种算术类型属性的标准化方式&#xff08;例如 int 类型的最大可能值是 std::numeric_limits&l…...

linux 服务器类型Apache配置https访问

一&#xff1a;查看服务器类型&#xff0c;下载相应的SSL证书 命令&#xff1a;netstat -anp | grep :80 httpd是Apache超文本传输协议(HTTP)服务器的主程序&#xff0c;所以下载Apache证书 二&#xff1a;将证书解压后复制到服务器上 三个文件&#xff1a;xxx.key xxx_publ…...

langchain 加载各种格式文件读取方法

参考&#xff1a;https://python.langchain.com/docs/modules/data_connection/document_loaders/ https://github.com/thomas-yanxin/LangChain-ChatGLM-Webui/blob/master/app.py 代码 可以支持pdf、md、doc、txt等格式 from langchain.document_loaders import Unstruct…...

飞花令游戏(Python)

飞花令是古时候人们经常玩一种“行酒令”的游戏&#xff0c;是中国古代酒令之一&#xff0c;属雅令。“飞花”一词则出自唐代诗人韩翃《寒食》中 春城无处不飞花 一句。行飞花令时选用诗和词&#xff0c;也可用曲&#xff0c;但选择的句子一般不超过7个字。 在《中国诗词大会》…...

解决“413 Request Entity Too Large”错误 代表请求包太大,服务器拒绝响应

解决办法&#xff1a; 在nginx的配置文件nginx.conf中&#xff0c;添加这么一句client_max_body_size 1024m; 意思是最大请求是1024m。这个配置可以放到 http段 或者 server段 或者 location段。...

MoeCTF2023web

01http 打开题目环境 可以看到要求完成所有任务&#xff0c;这里用burp抓个包 按照要求修改可以得到flag moectf{basic_http_knowledge_HJbg427uFuznTqiJdtS1xhZNwpdsOnKU} 02 Web入门指北 直接找到结尾发现乱码&#xff0c;去解码 编码可以试试url编码和base64到16 这里用…...

C语言编写简易图书管理系统

这篇文章介绍了一个基本的图书管理系统的实现&#xff0c;它允许用户添加、插入、删除、修改、显示和查询图书的功能。该系统通过使用二进制文件将图书信息保存到磁盘&#xff0c;并且在程序启动时能够加载已保存的图书信息。 介绍 在计算机科学中&#xff0c;图书管理系统是…...

C++入门 第一篇(C++关键字, 命名空间,C++输入输出)

目录 1. C关键字 2. 命名空间 2.1 命名空间定义 2.2命名空间的使用 命名空间的使用有三种方式&#xff1a; 1.加命名空间名称及作用域限定符 2.使用using将命名空间中某个成员引入 3.使用using namespace 命名空间名称 引入 3. C输入&输出 4.缺省函数 4.1 缺省参…...

python股票波动性分析

一、简介 我们都经历过这样的情况——盯着股票图表,试图理解那些疯狂的价格上涨,或者只是想知道为什么突然平静。在这些波动中,有一个一致的因素常常脱颖而出:波动性。了解波动性为衡量任何特定点的市场情绪和情绪提供了一个视角。通过剖析波动性的细微差别,我们不仅可以更…...

53 打家劫舍

打家劫舍 题解1 DP1题解2 DP2 &#xff01;经典DP&#xff01; 你是一个专业的小偷&#xff0c;计划偷窃沿街的房屋。每间房内都藏有一定的现金&#xff0c;影响你偷窃的唯一制约因素就是相邻的房屋装有相互连通的防盗系统&#xff0c;如果 两间相邻的房屋在同一晚上被小偷闯入…...

CentOS 7 基于C 连接ZooKeeper 客户端

前提条件&#xff1a;CentOS 7 编译ZooKeeper 客户端&#xff0c;请参考&#xff1a;CentOS 7 编译ZooKeeper 客户端 1、Docker 安装ZooKeeper # docker 获取zookeeper 最新版本 docker pull zookeeper# docker 容器包含镜像查看 docker iamges# 准备zookeeper 镜像文件挂载对…...

2023-2024-1 for循环-1(15-38)

7-15 输出闰年 输出21世纪中截止某个年份以来的所有闰年年份。注意&#xff1a;闰年的判别条件是该年年份能被4整除但不能被100整除、或者能被400整除。 输入格式: 输入在一行中给出21世纪的某个截止年份。 输出格式: 逐行输出满足条件的所有闰年年份&#xff0c;即每个年…...

初级问题 程序中的变量是指什么?中级问题 把若干个数据沿直线排列起来的数据结构叫作什么?高级问题 栈和队列的区别是什么?

目录 1.深刻主题 2.描写复杂人物 初级问题 程序中的变量是指什么&#xff1f; 中级问题 把若干个数据沿直线排列起来的数据结构叫作什么&#xff1f; 高级问题 栈和队列的区别是什么&#xff1f; 计算机图形学&#xff08;有效边表算法&#xff09; 介绍一下计算机图形学…...

clickhouse数据库简介,列式存储

clickhouse数据库简介 1、关于列存储 所说的行式存储和列式存储&#xff0c;指的是底层的存储形式&#xff0c;数据在磁盘上的真实存储&#xff0c;至于暴漏在上层的用户的使用是没有区别的&#xff0c;看到的都是一行一行的表格。 idnameuser_id1闪光10266032轨道物流10265…...

flask 发送ajax

前端 <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><title>Title</title> </head> <body> <script src"https://cdn.lyshark.com/javascript/jquery/3.5.1/jquery.min.js"…...

Android Gradle 命令打包AAR

平台 Android Archive (AAR) 文件是一种特定于Android的存档文件格式&#xff0c;用于将Android库和资源打包成单个可重用的单元。AAR文件通常用于共享和分发Android库&#xff0c;以便其他Android应用项目可以轻松引用和使用这些库。 AAR文件是一种便捷的方式&#xff0c;用于…...

如何导出带有材质的GLB模型?

1、为什么要使用 GLB 模型? GLB格式&#xff08;GLTF Binary&#xff09;是一种用于存储和传输3D模型及相关数据的文件格式&#xff0c;具有以下优点和作用&#xff1a; 统一性&#xff1a;GLB是一种开放标准的3D文件格式&#xff0c;由Khronos Group制定和维护。它融合了GL…...

C/C++面试常见知识点

目录 C/C语言C内存分区malloc/free与new/delete的区别联合体联合体大小的计算 结构体对齐为什么需要结构体内存对齐 结构体与联合体的区别左值引用与右值引用指针和引用的区别迭代器失效static关键字在C语言的作用进程地址空间的分布内联函数 三大特性构造函数不能是虚函数析构…...

详细介绍数据结构-堆

计算机中的堆数据结构 什么是堆 在计算机科学中&#xff0c;堆&#xff08;Heap&#xff09;是一种重要的数据结构&#xff0c;它用于在动态分配时存储和组织数据。堆是一块连续的内存区域&#xff0c;其中每个存储单元&#xff08;通常是字节&#xff09;都与另一个存储单元…...

001flutter基础学习

flutter基础学习 参考:https://book.flutterchina.club/chapter1/flutter_intro.html Flutter是谷歌的移动UI框架跨平台: Linux,Android, IOS,Fuchsia原生用户界面:它是原生的,让我们体验更好,性能更好开源免费&#xff1a;完全开源,可以进行商用Flutter与主流框架的对比 Cor…...

Chapter03-Authentication vulnerabilities

文章目录 1. 身份验证简介1.1 What is authentication1.2 difference between authentication and authorization1.3 身份验证机制失效的原因1.4 身份验证机制失效的影响 2. 基于登录功能的漏洞2.1 密码爆破2.2 用户名枚举2.3 有缺陷的暴力破解防护2.3.1 如果用户登录尝试失败次…...

Vue3 + Element Plus + TypeScript中el-transfer穿梭框组件使用详解及示例

使用详解 Element Plus 的 el-transfer 组件是一个强大的穿梭框组件&#xff0c;常用于在两个集合之间进行数据转移&#xff0c;如权限分配、数据选择等场景。下面我将详细介绍其用法并提供一个完整示例。 核心特性与用法 基本属性 v-model&#xff1a;绑定右侧列表的值&…...

Cesium1.95中高性能加载1500个点

一、基本方式&#xff1a; 图标使用.png比.svg性能要好 <template><div id"cesiumContainer"></div><div class"toolbar"><button id"resetButton">重新生成点</button><span id"countDisplay&qu…...

pam_env.so模块配置解析

在PAM&#xff08;Pluggable Authentication Modules&#xff09;配置中&#xff0c; /etc/pam.d/su 文件相关配置含义如下&#xff1a; 配置解析 auth required pam_env.so1. 字段分解 字段值说明模块类型auth认证类模块&#xff0c;负责验证用户身份&am…...

ESP32读取DHT11温湿度数据

芯片&#xff1a;ESP32 环境&#xff1a;Arduino 一、安装DHT11传感器库 红框的库&#xff0c;别安装错了 二、代码 注意&#xff0c;DATA口要连接在D15上 #include "DHT.h" // 包含DHT库#define DHTPIN 15 // 定义DHT11数据引脚连接到ESP32的GPIO15 #define D…...

现代密码学 | 椭圆曲线密码学—附py代码

Elliptic Curve Cryptography 椭圆曲线密码学&#xff08;ECC&#xff09;是一种基于有限域上椭圆曲线数学特性的公钥加密技术。其核心原理涉及椭圆曲线的代数性质、离散对数问题以及有限域上的运算。 椭圆曲线密码学是多种数字签名算法的基础&#xff0c;例如椭圆曲线数字签…...

智能分布式爬虫的数据处理流水线优化:基于深度强化学习的数据质量控制

在数字化浪潮席卷全球的今天&#xff0c;数据已成为企业和研究机构的核心资产。智能分布式爬虫作为高效的数据采集工具&#xff0c;在大规模数据获取中发挥着关键作用。然而&#xff0c;传统的数据处理流水线在面对复杂多变的网络环境和海量异构数据时&#xff0c;常出现数据质…...

AirSim/Cosys-AirSim 游戏开发(四)外部固定位置监控相机

这个博客介绍了如何通过 settings.json 文件添加一个无人机外的 固定位置监控相机&#xff0c;因为在使用过程中发现 Airsim 对外部监控相机的描述模糊&#xff0c;而 Cosys-Airsim 在官方文档中没有提供外部监控相机设置&#xff0c;最后在源码示例中找到了&#xff0c;所以感…...

R 语言科研绘图第 55 期 --- 网络图-聚类

在发表科研论文的过程中&#xff0c;科研绘图是必不可少的&#xff0c;一张好看的图形会是文章很大的加分项。 为了便于使用&#xff0c;本系列文章介绍的所有绘图都已收录到了 sciRplot 项目中&#xff0c;获取方式&#xff1a; R 语言科研绘图模板 --- sciRplothttps://mp.…...

(一)单例模式

一、前言 单例模式属于六大创建型模式,即在软件设计过程中,主要关注创建对象的结果,并不关心创建对象的过程及细节。创建型设计模式将类对象的实例化过程进行抽象化接口设计,从而隐藏了类对象的实例是如何被创建的,封装了软件系统使用的具体对象类型。 六大创建型模式包括…...