Normal distribution (正态分布)
Normal distribution {正态分布}
- 1. Normal distribution (正态分布) = Gaussian distribution (高斯分布)
- 1.1. Probability density function (概率密度函数)
- 1.2. Standard normal distribution (标准正态分布)
- 1.3. Cumulative distribution function (累积分布函数)
- 2. 正态分布的性质
- References
normal /ˈnɔːrml/ adj. 正常的,一般的,典型的,精神正常的,意识健全的 n. 法线,常态,一般水平,通常标准
1. Normal distribution (正态分布) = Gaussian distribution (高斯分布)
In probability theory and statistics, a normal distribution or Gaussian distribution is a type of continuous probability distribution for a real-valued random variable.
正态分布 (normal distribution) 是一种常见的连续概率分布,物理学中称为高斯分布 (Gaussian distribution)。
若随机变量 X X X 服从一个平均数为 μ \mu μ、标准差为 σ \sigma σ 的正态分布,则记为 X ∼ N ( μ , σ 2 ) {X\sim N(\mu ,\sigma ^{2})} X∼N(μ,σ2),其概率密度函数为 f ( x ) = 1 σ 2 π e − ( x − μ ) 2 2 σ 2 {\displaystyle f(x)={\frac {1}{\sigma {\sqrt {2\pi }}}}\;e^{-{\frac {\left(x-\mu \right)^{2}}{2\sigma ^{2}}}}\!} f(x)=σ2π1e−2σ2(x−μ)2。
The general form of its probability density function is f ( x ) = 1 2 π σ 2 e − ( x − μ ) 2 2 σ 2 f(x) = \frac{1}{\sqrt{2\pi\sigma^2} } e^{-\frac{(x-\mu)^2}{2\sigma^2}} f(x)=2πσ21e−2σ2(x−μ)2.
The parameter μ \mu μ is the mean or expectation of the distribution (and also its median and mode), while the parameter σ 2 \sigma^2 σ2 is the variance. The standard deviation of the distribution is σ \sigma σ (sigma). A random variable with a Gaussian distribution is said to be normally distributed, and is called a normal deviate.
正态分布的数学期望值 μ {\displaystyle \mu} μ,可解释为位置参数,决定了分布的位置;方差 σ 2 {\displaystyle \sigma ^{2}} σ2 或标准差 σ {\displaystyle \sigma} σ 可解释为尺度参数,决定了分布的幅度。
The normal distribution is often referred to as N ( μ , σ 2 ) {\textstyle N(\mu ,\sigma ^{2})} N(μ,σ2) or N ( μ , σ 2 ) {\displaystyle {\mathcal {N}}(\mu ,\sigma ^{2})} N(μ,σ2). Thus when a random variable X {\displaystyle X} X is normally distributed with mean μ {\displaystyle \mu } μ and standard deviation σ {\displaystyle \sigma } σ, one may write X ∼ N ( μ , σ 2 ) {\displaystyle X\sim {\mathcal {N}}(\mu ,\sigma ^{2})} X∼N(μ,σ2).
μ {\displaystyle \mu } μ 数学期望 = 中位数 = 众数, σ 2 > 0 {\displaystyle \sigma ^{2}>0} σ2>0 方差, x ∈ ( − ∞ ; + ∞ ) {\displaystyle x\in (-\infty ;+\infty )\!} x∈(−∞;+∞) 值域,
1.1. Probability density function (概率密度函数)
The red curve is the standard normal distribution (红线代表标准正态分布).
概率密度函数能够表示随机变量每个取值有多大的可能性。
正态分布均值为 μ {\displaystyle \mu} μ 方差为 σ 2 {\displaystyle \sigma ^{2}} σ2 (标准差为 σ {\displaystyle \sigma} σ) 的概率密度函数为
f ( x ; μ , σ ) = 1 σ 2 π exp ( − ( x − μ ) 2 2 σ 2 ) {\displaystyle f(x;\mu ,\sigma )={\frac {1}{\sigma {\sqrt {2\pi }}}}\,\exp \left(-{\frac {(x-\mu )^{2}}{2\sigma ^{2}}}\right)} f(x;μ,σ)=σ2π1exp(−2σ2(x−μ)2)
A normal distribution is sometimes informally called a bell curve.
正态分布的概率密度函数曲线呈钟形,因此又称为钟形曲线。
The normal distribution with density f ( x ) {\textstyle f(x)} f(x) (mean μ {\displaystyle \mu } μ and variance σ 2 > 0 {\textstyle \sigma ^{2}>0} σ2>0) has the following properties:
- It is symmetric around the point x = μ {\textstyle x=\mu} x=μ, which is at the same time the mode, the median and the mean of the distribution.
正态分布的概率密度函数关于平均值对称。 - It is unimodal: its first derivative is positive for x < μ {\textstyle x<\mu} x<μ, negative for x > μ {\textstyle x>\mu} x>μ, and zero only at x = μ {\textstyle x=\mu} x=μ.
- The area bounded by the curve and the x {\displaystyle x} x-axis is unity (i.e. equal to one).
- Its first derivative is f ′ ( x ) = − x − μ σ 2 f ( x ) {\textstyle f'(x)=-{\frac {x-\mu }{\sigma ^{2}}}f(x)} f′(x)=−σ2x−μf(x).
- Its second derivative is f ′ ′ ( x ) = ( x − μ ) 2 − σ 2 σ 4 f ( x ) {\textstyle f''(x)={\frac {(x-\mu )^{2}-\sigma ^{2}}{\sigma ^{4}}}f(x)} f′′(x)=σ4(x−μ)2−σ2f(x).
- Its density has two inflection points (where the second derivative of f {\displaystyle f} f is zero and changes sign), located one standard deviation away from the mean, namely at x = μ − σ {\textstyle x=\mu -\sigma } x=μ−σ and x = μ + σ {\textstyle x=\mu +\sigma} x=μ+σ.
函数曲线的拐点 (inflection point) 为离平均数一个标准差距离的位置。 - Its density is log-concave.
- Its density is infinitely differentiable, indeed supersmooth of order 2.
1.2. Standard normal distribution (标准正态分布)
The simplest case of a normal distribution is known as the standard normal distribution or unit normal distribution. This is a special case when μ = 0 {\textstyle \mu =0} μ=0 and σ 2 = 1 {\textstyle \sigma ^{2}=1} σ2=1, and it is described by this probability density function (or density)
φ ( z ) = e − z 2 2 2 π . {\displaystyle \varphi (z)={\frac {e^{\frac {-z^{2}}{2}}}{\sqrt {2\pi }}}\,.} φ(z)=2πe2−z2.
The variable z {\displaystyle z} z has a mean of 0 and a variance and standard deviation of 1. The density φ ( z ) {\textstyle \varphi (z)} φ(z) has its peak 1 2 π {\textstyle {\frac {1}{\sqrt {2\pi }}}} 2π1 at z = 0 {\textstyle z=0} z=0 and inflection points at z = + 1 {\textstyle z=+1} z=+1 and z = − 1 {\displaystyle z=-1} z=−1.
inflection /ɪnˈflekʃn/ n. (尤指词尾的) 屈折变化,语调的抑扬变化
如果一个随机变量 X {\displaystyle X} X 服从正态分布,则记为 X ∼ N ( μ , σ 2 ) {\displaystyle X} \sim {\displaystyle N(\mu ,\sigma ^{2})} X∼N(μ,σ2)。如果 μ = 0 {\displaystyle \mu = 0} μ=0 并且 σ = 1 {\displaystyle \sigma = 1} σ=1,则这个正态分布被称为标准正态分布,可以简化为
f ( x ) = 1 2 π exp ( − x 2 2 ) {\displaystyle f(x)={\frac {1}{\sqrt {2\pi }}}\,\exp \left(-{\frac {x^{2}}{2}}\right)} f(x)=2π1exp(−2x2)
The probability density of the standard Gaussian distribution (standard normal distribution, with zero mean and unit variance) is often denoted with the Greek letter ϕ {\displaystyle \phi } ϕ (phi). The alternative form of the Greek letter phi, φ {\displaystyle \varphi} φ, is also used quite often.
Furthermore, the density φ {\displaystyle \varphi} φ of the standard normal distribution (i.e. μ = 0 {\textstyle \mu =0} μ=0 and σ = 1 {\textstyle \sigma =1} σ=1) also has the following properties:
- Its first derivative is φ ′ ( x ) = − x φ ( x ) {\textstyle \varphi '(x)=-x\varphi (x)} φ′(x)=−xφ(x).
- Its second derivative is φ ′ ′ ( x ) = ( x 2 − 1 ) φ ( x ) {\textstyle \varphi ''(x)=(x^{2}-1)\varphi (x)} φ′′(x)=(x2−1)φ(x).
- The probability that a normally distributed variable X {\displaystyle X} X with known μ {\displaystyle \mu } μ and σ 2 {\textstyle \sigma ^{2}} σ2 is in a particular set, can be calculated by using the fact that the fraction Z = ( X − μ ) / σ {\textstyle Z=(X-\mu )/\sigma } Z=(X−μ)/σ has a standard normal distribution.
1.3. Cumulative distribution function (累积分布函数)
累积分布函数是指随机变量 X {\displaystyle X} X 小于或等于 x {\displaystyle x} x 的概率,用概率密度函数表示为
F ( x ; μ , σ ) = 1 σ 2 π ∫ − ∞ x exp ( − ( t − μ ) 2 2 σ 2 ) d t {\displaystyle F(x;\mu ,\sigma )={\frac {1}{\sigma {\sqrt {2\pi }}}}\int _{-\infty }^{x}\exp \left(-{\frac {(t-\mu )^{2}}{2\sigma ^{2}}}\ \right)\,dt} F(x;μ,σ)=σ2π1∫−∞xexp(−2σ2(t−μ)2 )dt
For a generic normal distribution with density f {\displaystyle f} f, mean μ {\displaystyle \mu } μ and variance σ 2 {\textstyle \sigma ^{2}} σ2, the cumulative distribution function is
F ( x ) = Φ ( x − μ σ ) = 1 2 [ 1 + erf ( x − μ σ 2 ) ] . {\displaystyle F(x)=\Phi {\left({\frac {x-\mu }{\sigma }}\right)}={\frac {1}{2}}\left[1+\operatorname {erf} \left({\frac {x-\mu }{\sigma {\sqrt {2}}}}\right)\right]\,.} F(x)=Φ(σx−μ)=21[1+erf(σ2x−μ)].
正态分布的累积分布函数能够由一个叫做误差函数的特殊函数表示为
Φ ( z ) = 1 2 [ 1 + erf ( z − μ σ 2 ) ] {\displaystyle \Phi (z)={\frac {1}{2}}\left[1+\operatorname {erf} \left({\frac {z-\mu }{\sigma {\sqrt {2}}}}\right)\right]} Φ(z)=21[1+erf(σ2z−μ)]
The cumulative distribution function (CDF) of the standard normal distribution, usually denoted with the capital Greek letter {\displaystyle \Phi }, is the integral
Φ ( x ) = 1 2 π ∫ − ∞ x e − t 2 / 2 d t . {\displaystyle \Phi (x)={\frac {1}{\sqrt {2\pi }}}\int _{-\infty }^{x}e^{-t^{2}/2}\,dt\,.} Φ(x)=2π1∫−∞xe−t2/2dt.
标准正态分布的累积分布函数习惯上记为 Φ {\displaystyle \Phi } Φ,它仅仅是指 μ = 0 {\displaystyle \mu =0} μ=0, σ = 1 {\displaystyle \sigma =1} σ=1 时的值
Φ ( x ) = F ( x ; 0 , 1 ) = 1 2 π ∫ − ∞ x exp ( − t 2 2 ) d t {\displaystyle \Phi (x)=F(x;0,1)={\frac {1}{\sqrt {2\pi }}}\int _{-\infty }^{x}\exp \left(-{\frac {t^{2}}{2}}\right)\,dt} Φ(x)=F(x;0,1)=2π1∫−∞xexp(−2t2)dt
标准正态分布用误差函数表示的公式简化为
Φ ( z ) = 1 2 [ 1 + erf ( z 2 ) ] {\displaystyle \Phi (z)={\frac {1}{2}}\left[1+\operatorname {erf} \left({\frac {z}{\sqrt {2}}}\right)\right]} Φ(z)=21[1+erf(2z)]
2. 正态分布的性质
如果 X ∼ N ( μ , σ 2 ) {\displaystyle X\sim N(\mu ,\sigma ^{2})\,} X∼N(μ,σ2) 且 a {\displaystyle a} a 与 b {\displaystyle b} b 是实数,那么 a X + b ∼ N ( a μ + b , ( a σ ) 2 ) {\displaystyle aX+b\sim N(a\mu +b,(a\sigma )^{2})} aX+b∼N(aμ+b,(aσ)2).
如果 X ∼ N ( μ X , σ X 2 ) {\displaystyle X\sim N(\mu _{X},\sigma _{X}^{2})} X∼N(μX,σX2) 与 Y ∼ N ( μ Y , σ Y 2 ) {\displaystyle Y\sim N(\mu _{Y},\sigma _{Y}^{2})} Y∼N(μY,σY2) 是统计独立的正态随机变量,那么
- 它们的和满足正态分布 U = X + Y ∼ N ( μ X + μ Y , σ X 2 + σ Y 2 ) {\displaystyle U=X+Y\sim N(\mu _{X}+\mu _{Y},\sigma _{X}^{2}+\sigma _{Y}^{2})} U=X+Y∼N(μX+μY,σX2+σY2)
它们的差满足正态分布 V = X − Y ∼ N ( μ X − μ Y , σ X 2 + σ Y 2 ) {\displaystyle V=X-Y\sim N(\mu _{X}-\mu _{Y},\sigma _{X}^{2}+\sigma _{Y}^{2})} V=X−Y∼N(μX−μY,σX2+σY2) - U {\displaystyle U} U 与 V {\displaystyle V} V 两者是相互独立的,要求 X X X 与 Y Y Y 的方差相等。
References
[1] Yongqiang Cheng, https://yongqiang.blog.csdn.net/
[2] Normal distribution, https://en.wikipedia.org/wiki/Normal_distribution
相关文章:
Normal distribution (正态分布)
Normal distribution {正态分布} 1. Normal distribution (正态分布) Gaussian distribution (高斯分布)1.1. Probability density function (概率密度函数)1.2. Standard normal distribution (标准正态分布)1.3. Cumulative distribution function (累积分布函数) 2. 正态分…...
企业级前端架构设计与实战
一、架构设计核心原则 1.1 模块化分层架构 典型目录结构: src/├── assets/ # 静态资源├── components/ # 通用组件├── pages/ # 页面模块├── services/ # API服务层├── store/ # 全局状态管理├── uti…...
数据模型,数据建模,组件,核心价值,使用,意义
数据模型 一组由符号,文本组成的集合, 用以准确表达信息景观, 达到有效交流,沟通的目的 数据建模 是发现,分析和确定数据需求的过程,是一种称为数据模型的精确形式表示和传递这些需求 数据模型的组件 实体, 关系, 属性和域 数据模型的核心价值 交流性 精确性 数据模型的…...
JavaScript 比较运算符
JavaScript 比较运算符 一、基础比较运算符类型 运算符名称示例核心特性==宽松相等"5" == 5 → true隐式类型转换===严格相等"5" === 5 → false类型+值双重校验!=宽松不等null != 0 → true等效于 !(a == b)!==严格不等5 !== "5" → true类型或…...
AI Agent战国时代:Manus挑战者的破局之道与技术博弈
随着Manus引爆通用型AI Agent的"手脑协同"革命,全球AI Agent赛道进入技术竞速期。Flowith、UI-TARS、LangManus等新势力通过差异化路径重构市场格局,背后折射出开源生态、本土化创新与跨模态交互的深层技术博弈。本文结合行业权威报告与公开技…...
linux--时区查看和修改
查看当前时间和时区: 打开终端,输入以下命令查看当前的日期和时间设置: timedatectl修改时区: 使用 timedatectl 命令来修改时区: sudo timedatectl set-timezone <时区>例如,设置时区为北京时间(中国标准时间&a…...
个人博客系统 --- 测试报告
一、项目功能介绍 该项目由:登录模块、博客首页模块、博客详情页模块、博客编辑页模块四个功能模块组成。 该系统实现了个人博客的保存以及记录了发布日期、时间、发布人等信息。 二、测试内容与测试用例 我们需要对该系统进行功能测试,界面测试&…...
ESP32S3基于FreeRTOS实时操作系统控制舵机
这段代码是一个基于ESP32的舵机控制示例,通过MCPWM模块配置定时器、操作符、比较器和发生器,生成特定脉冲宽度的PWM信号,控制舵机在 -60度到60度之间以2度为步长往复转动。 1. 源码部分 #include "freertos/FreeRTOS.h" #include…...
【vue的some和filter】
在 Vue 中,some 和 filter 是两种不同的数组方法,分别用于处理数据筛选和条件判断。以下是它们在 Vue 中的具体用法和区别: 一、filter 方法 作用:对数组进行过滤,返回符合条件的新数组。 使用场景:常用于…...
【LC插件开发】基于Java实现FSRS(自由间隔重复调度算法)
😊你好,我是小航,一个正在变秃、变强的文艺倾年。 🔔本文讲解【LC插件开发】基于Java实现FSRS(自由间隔重复调度算法),期待与你一同探索、学习、进步,一起卷起来叭! 目录…...
jupyter 操作相关内容
1、jupyter界面美化 pip3 install jupyterthemes查看可用主题 jt -l推荐两个 jt -t grade3 -f consolamono -fs 140 -tfs 13 -nfs 115 -ofs 14 -cellw 90% -Tjt -t chesterish -f consolamono -fs 140 -altp -tfs 13 -nfs 115 -ofs 14 -cellw 90% -T...
【数据结构】单链表
目录 一、什么是链表?1、 定义2、链表的分类 二、无头单向非循环链表1、结构2、单链表数据的打印3、创建结点并初始化4、尾插5、头插6、尾删7、头删8、查找9、在指定位置pos之前插入数据10、在指定位置pos之后插入数据11、删除pos结点12、删除pos之后的结点13、销毁…...
UnoCSS极速入门:下一代原子化CSS引擎实战指南
文章目录 一、什么是UnoCSS?二、环境配置(Vite示例)三、核心使用模式3.1 自定义规则3.2 原子化类应用3.3 使用RegExp匹配器 四、高级功能解析4.1 主题系统4.2 响应式与深色模式 五、实战案例:构建现代按钮组件六、性能优化技巧七、…...
Es6进阶
class里的get和set 在 ES6 中,class 里的 get 和 set 是用于定义访问器属性的关键字。get 方法可在访问对象属性时调用,set 方法则在设置对象属性时调用。下面通过一个简单示例来介绍它们的用法: javascript class Person {constructor(nam…...
可发1区的创新思路:基于K-means聚类的EMD-BiLSTM-CNN-Attention时间序列预测模型(功率预测、寿命预测、流量预测、故障诊断)
首先声明,该模型为原创!原创!原创! 一、应用场景 该模型主要用于时间序列数据预测问题,包含功率预测、电池寿命预测、交通流量预测、电机故障检测等等。 二、模型整体介绍(本文以光伏功率预测为例) 核心架构 数据聚类:K-means对风电场机组分组,降低异质性干扰。…...
Android BLE 权限管理
前言 android 权限一直是比较活跃的 在蓝牙权限这一块又分新版和旧版 新版权限 android.Manifest.permission.BLUETOOTH_SCAN, android.Manifest.permission.BLUETOOTH_ADVERTISE, android.Manifest.permission.BLUETOOTH_CONNECT旧版权限如9.0以下 Manifest.permission.A…...
vue3 ts 注册全局组件
vue3 ts 注册全局组件 register.tsmain.ts register.ts // 注册全局组件 import {App} from "vue" import headerPage from "/headerPage.vue" export default {install(app:App){app.component("headerPage",headerPage)} }main.ts import re…...
Apache Doris学习
https://doris.apache.org/zh-CN/docs/gettingStarted/what-is-apache-doris 介绍 Apache Doris 是一款基于 MPP 架构(大规模并行处理)的高性能、实时分析型数据库。它以高效、简单和统一的特性著称,能够在亚秒级的时间内返回海量数据的查询…...
llama源码学习·model.py[7]Transformer类
一、源码展示 class Transformer(nn.Module):def __init__(self, params: ModelArgs):super().__init__()self.params paramsself.vocab_size params.vocab_sizeself.n_layers params.n_layersself.tok_embeddings VocabParallelEmbedding(params.vocab_size, params.dim,…...
Windows server 2022域控制服务器的配置
Windows server 2022介绍 一、核心特性与改进 安全核心服务器(Secured-Core Server) 硬件级安全:支持基于硬件的安全功能(如TPM 2.0、Secure Boot、基于虚拟化的安全防护VBS),防止固件攻击。受信任的启动链…...
yolo目标检测算法在DJI上的研究分析(大纲)
yolo目标检测算法在DJI上的研究分析 面向边缘计算的实时目标检测系统设计与部署 第一章 绪论 1.1 研究背景与意义 目标检测技术需求: DJI设备(如无人机、摄像头)在安防、巡检、农业等场景中的广泛应用现有YOLO算法在高分辨率图像或资源受限…...
三、重学C++—C语言内存管理
上一章节: 二、重学C—C语言核心-CSDN博客https://blog.csdn.net/weixin_36323170/article/details/146191640?spm1001.2014.3001.5502 本章节代码: cPart2 CuiQingCheng/cppstudy - 码云 - 开源中国https://gitee.com/cuiqingcheng/cppstudy/tree/…...
DAY37 动态归化Ⅰ基础题目
509. 斐波那契数 - 力扣(LeetCode) class Solution { public:int fib(int n) {if(n<1) return n;int dp[2];dp[0]0;dp[1]1;int sum0;for(int i2;i<n;i){sum dp[0]dp[1];dp[0]dp[1];dp[1]sum;}return sum;} }; 70. 爬楼梯 - 力扣(Lee…...
ABAP Core Data Services (SAP PRESS) (First Edition)
ABAP Core Data Services (SAP PRESS) (First Edition)...
ORM——对象关系映射
对象关系映射(ORM)深度解析:原理、优势与应用场景 一、什么是ORM? ORM(Object-Relational Mapping)即对象关系映射,是一种将面向对象编程中的对象与关系型数据库中的表进行映射的技术。简单来…...
【Docker系列五】Docker Compose 简介
💝💝💝欢迎来到我的博客,很高兴能够在这里和您见面!希望您在这里可以感受到一份轻松愉快的氛围,不仅可以获得有趣的内容和知识,也可以畅所欲言、分享您的想法和见解。 推荐:kwan 的首页,持续学…...
大语言模型-2.2/3-主流模型架构与新型架构
简介 本博客内容是《大语言模型》一书的读书笔记,该书是中国人民大学高瓴人工智能学院赵鑫教授团队出品,覆盖大语言模型训练与使用的全流程,从预训练到微调与对齐,从使用技术到评测应用,帮助学员全面掌握大语言模型的…...
JAVA组件的利用漏洞 Shlr搜索引擎 shiro身份 Log4j日志
solr组件 1、作用 : 基于http和apache lucene 进行全文搜索服务器 2、识别: 第一个就是图标类似于华为的那个 然后就是端口标识是 8983 3、CVE利用: 1、命令执行(CVE-2019-17558) Apache Solr 5.0.0版本至8…...
MongoDB未授权访问漏洞
1、连接MongoDB,添加账号密码 mongo 127.0.0.1 use admindb.createUser({user: admin,pwd: MongoDB123%.com,roles:[{role: root,db: admin}] })创建admin用户,密码为:MongoDB123%.com 2、设置完成,可以通过指令 show users 查看…...
CVPR2025 | 对抗样本智能安全方向论文汇总 | 持续更新中~
汇总结果来源:CVPR 2025 Accepted Papers 若文中出现的 论文链接 和 GitHub链接 点不开,则说明还未公布,在公布后笔者会及时添加. 若笔者未及时添加,欢迎读者告知. 文章根据题目关键词搜索,可能会有遗漏. 若笔者出现…...
MyBatis 动态 SQL 优化:标签的实战与技巧
目录 动态SQL详解一、动态SQL的核心概念1.1 什么是动态SQL?1.2 动态SQL的优点1.3 动态SQL的常见用途 二、动态SQL的常见用法(XML方式)2.1 < if > 标签2.2 < trim> 标签2.3 <where>标签2.4<set>标签2.5 <foreach&g…...
自动化机器学习(TPOT优化临床试验数据)
目录 自动化机器学习(TPOT优化临床试验数据)1. 引言2. 项目背景与意义2.1 临床试验数据分析的重要性2.2 自动化机器学习的优势2.3 工业级数据处理与GPU加速需求3. 数据集生成与介绍3.1 数据集构成3.2 数据生成方法4. 自动化机器学习与TPOT4.1 自动化机器学习简介4.2 TPOT在临…...
spring boot3 验证码工具kaptcha使用
1、pom.xml文件,下载验证码工具kaptcha依赖 官网搭建的spring boot项目 <!--验证码工具kaptcha的依赖--> <dependency><groupId>com.github.penggle</groupId><artifactId>kaptcha</artifactId> </dependency> 阿里云…...
Android 根据Url使用Retrofit框架进行文件下载
一、背景 根据后端返回的url下载地址,去执行文件下载,将文件保存到SD卡。这里使用Retrofit网络框架。 二、代码实现 2.1、定义一个DownloadFileService interface DownloadFileService {StreamingGETsuspend fun downloadFile(Url fileUrl: String):ResponseBody…...
可视化动态表单动态表单界的天花板--Formily(阿里开源)
文章目录 1、Formily表单介绍2、安装依赖2.1、安装内核库2.2、 安装 UI 桥接库2.3、Formily 支持多种 UI 组件生态: 3、表单设计器3.1、核心理念3.2、安装3.3、示例源码 4、场景案例-登录注册4.1、Markup Schema 案例4.2、JSON Schema 案例4.3、纯 JSX 案例 1、Form…...
Java常用类
常用类 1.包 2.String类 3.String注意事项 String是不可变字符串对象。只要是以“ …. ”方式写出的字符串对象,会存储到字符串常量池,且相同内容的字符串只存储一份。但通过new方式创建字符串对象,每new一次都会产生一个新的对象放在堆内存中。String s2 s1 "a"…...
多模态大模型常见问题
1.视觉编码器和 LLM 连接时,使用 BLIP2中 Q-Former那种复杂的 Adaptor 好还是 LLaVA中简单的 MLP 好,说说各自的优缺点? Q-Former(BLIP2): 优点:Q-Former 通过查询机制有效融合了视觉和语言特征…...
2025 年大模型排行分析:中美竞争与未来展望
具体排名数据见文章结尾 在人工智能领域,大模型的性能成为衡量机构技术实力的重要标志。以下是根据最新排名的一些主要发现,尤其关注中国模型的发展现状和优势。 全球领先的模型 在本次排名中,美国 OpenAI 的多个版本占据榜首位置。具体而…...
为什么后端路由需要携带 /api 作为前缀?前端如何设置基础路径 /api?
一、为什么后端路由需要携带 /api 作为前缀? 1. 区分 API 端点与其他路由 在 Web 应用程序中,后端不仅需要处理 API 请求,还可能需要处理静态资源(如 HTML、CSS、JS 文件)或其他服务(如 WebSocket&#x…...
Mac:Ant 下载+安装+环境配置(详细讲解)
📌 下载 Ant 下载地址:https://ant.apache.org/bindownload.cgi 📌 无需安装 Apache官网下载 Ant 压缩包,无需安装,下载解压后放到自己指定目录下即可。 按我自己的习惯,我会在用户 jane 目录下新建了个…...
web客户端存储,IndexDB相关讲解
IndexDB详细讲解 IndexedDB 是浏览器提供的一种底层 API,用于在客户端存储大量结构化数据。相比 Web Storage(localStorage/sessionStorage),它支持更复杂的数据结构、事务处理、索引查询等高级功能。以下是一个系统化的讲解: 一、核心概念 1、数据库(Database) 每…...
使用DeepSeek翻译英文科技论文,以MarkDown格式输出,使用Writage 3.3.1插件转换为Word文件
一、使用DeepSeek翻译英文科技论文,以MarkDown格式输出 以科技论文“Electrical Power System Sizing within the Numerical Propulsion System Simulation”为例。 需要Writage 3.3.1 license key注册码的小伙伴,可发送邮件至邮箱pyengine163.com. 首先…...
Linux 文件操作-文件IO函数2- write向文件写入数据、read从文件读取数据、lseek重定位文件描述符的偏移量的验证
目录 1.write 向文件描述符中写入数据 1.1 向标准输出STDOUT_FILENO (终端屏幕)写入数据 1.2 向文件写入数据 2.read 从文件描述符中读取数据 2.1从标准输入STDIN_FILENO(键盘)读取数据 2.2从文件读取数据 3.lseek重定位偏移量 1.write 向文件描述…...
`chromadb` 是什么
chromadb 是什么 chromadb 是一个开源的向量数据库,它专门用于存储、索引和查询向量数据。在处理自然语言处理(NLP)、计算机视觉等领域的任务时,通常会将文本、图像等数据转换为向量表示,而 chromadb 可以高效地管理这些向量,帮助开发者快速找到与查询向量最相似的向量数…...
Python 爬虫(4)HTTP协议
文章目录 一、HTTP协议1、HTTP特点2、HTTP工作原理3、HTTP与HTTPS的区别 前言: HTTP(HyperText Transfer Protocol,超文本传输协议)是互联网上应用最为广泛的一种网络协议,用于在客户端和服务器之间传输超文本…...
Redis 事件机制详解
Redis 事件机制详解 Redis 的事件机制是其高性能和高并发能力的关键之一,它采用Reactor 模型,基于文件事件驱动机制实现高效的 I/O 处理。Redis 的事件机制主要分为以下几类: 文件事件(File Event) —— 处理网络 I/…...
JMeter对API接口进行压力测试使用教程
1.启动工具:以管理员身份运行 启动成功会有两个窗口,都保留别关闭 2.创建线程组 3.创建http请求 配置 4.添加监听,查看请求结果 5.运行 成功截图 6.接口压力测试,修改线程组参数 7.2000请求,2秒完成...
Vue 3 项目实现国际化指南 i18n
引言 在开发现代 Web 应用时,国际化(Internationalization,简称 i18n)已经成为一个不可或缺的功能。无论是面向全球用户的商业网站,还是需要支持多语言的企业应用,良好的国际化支持都能显著提升用户体验。本…...
使用Trae 生成的React版的贪吃蛇
使用Trae 生成的React版的贪吃蛇 首先你想用这个贪吃蛇,你需要先安装Trae Trae 官方地址 他有两种模式 chat builder 我使用的是builder模式,虽然是Alpha.还是可以用。 接下来就是按着需求傻瓜式的操作生成代码 他生成的代码不完全正确,比如没有引入…...
HAL库定时器配置
定时器的开启需要手动开启,例如在driver_capature.c开启,该文件主要写了具体的函数实现,与driver_can.c一样,同时还有回调函数等一些高级的自定义函数。 这段代码是 STM32 HAL 库中用于初始化 定时器 2 (TIM2) 的函数 MX_TIM2_In…...