真是学到了!——《Nginx的几个常用配置和技巧》

内网服务器(不通外网)访问高德在线地图服务的方法 内网服务器(不通外网)访问高德在线地图服务的方法 在项目部署过程中,若部署服务器处于内网环境,则无法调用高德服务。下面的记录解决了内网服务器访问高德地图服务的问题。 一、所需设备 内网服务器(项目所需部署环境,不同公网) 外网服务器(前置机),需要一台能够访问公网的服务器转发我们的请求 二、代理流程 1、修改前端:地图服务请求地址 原地址: <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4. 阅读详情

一个站点配置多个域名

<pre style="box-sizing: border-box; font-family: monospace; font-size: 18px; margin: 20px 0px; padding: 15px; border: 0px; background-color: rgb(244, 245, 246); white-space: pre-wrap; word-break: break-all; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">server {
 listen 80;
 server_name ops-coffee.cn b.ops-coffee.cn;
}

server_name 后跟多个域名即可,多个域名之间用空格分隔

一个服务配置多个站点

<pre style="box-sizing: border-box; font-family: monospace; font-size: 18px; margin: 20px 0px; padding: 15px; border: 0px; background-color: rgb(244, 245, 246); white-space: pre-wrap; word-break: break-all; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">server {
 listen 80;
 server_name a.ops-coffee.cn;
 location / {
 root /home/project/pa;
 index index.html;
 }
}
server {
 listen 80;
 server_name ops-coffee.cn b.ops-coffee.cn;
 location / {
 root /home/project/pb;
 index index.html;
 }
}
server {
 listen 80;
 server_name c.ops-coffee.cn;
 location / {
 root /home/project/pc;
 index index.html;
 }
}

基于Nginx虚拟主机配置实现,Nginx有三种类型的虚拟主机

基于IP的虚拟主机: 需要你的服务器上有多个地址,每个站点对应不同的地址,这种方式使用的比较少

基于端口的虚拟主机: 每个站点对应不同的端口,访问的时候使用ip:port的方式访问,可以修改listen的端口来使用

基于域名的虚拟主机: 使用最广的方式,上边例子中就是用了基于域名的虚拟主机,前提条件是你有多个域名分别对应每个站点,server_name填写不同的域名即可

nginx添加账号密码验证

<pre style="box-sizing: border-box; font-family: monospace; font-size: 18px; margin: 20px 0px; padding: 15px; border: 0px; background-color: rgb(244, 245, 246); white-space: pre-wrap; word-break: break-all; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">server {
 location / {
 auth_basic "please input user&passwd";
 auth_basic_user_file key/auth.key;
 }
}

有很多服务通过nginx访问,但本身没有提供账号认证的功能,就可以通过nginx提供的authbase账号密码认证来实现,可以用以下脚本来生成账号的密码

<pre style="box-sizing: border-box; font-family: monospace; font-size: 18px; margin: 20px 0px; padding: 15px; border: 0px; background-color: rgb(244, 245, 246); white-space: pre-wrap; word-break: break-all; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"># cat pwd.pl 
#!/usr/bin/perl
use strict;
my $pw=$ARGV[0] ;
print crypt($pw,$pw)."\n";

使用方法:

<pre style="box-sizing: border-box; font-family: monospace; font-size: 18px; margin: 20px 0px; padding: 15px; border: 0px; background-color: rgb(244, 245, 246); white-space: pre-wrap; word-break: break-all; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"># perl pwd.pl ops-coffee.cn
opf8BImqCAXww
# echo "admin:opf8BImqCAXww" > key/auth.key

nginx开启列目录

当你想让nginx作为文件下载服务器存在时,需要开启nginx列目录

<pre style="box-sizing: border-box; font-family: monospace; font-size: 18px; margin: 20px 0px; padding: 15px; border: 0px; background-color: rgb(244, 245, 246); white-space: pre-wrap; word-break: break-all; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">server {
 location download {
 autoindex on;
 autoindex_exact_size off;
 autoindex_localtime on;
 }
}

autoindex_exact_size: 为on(默认)时显示文件的确切大小,单位是byte;改为off显示文件大概大小,单位KB或MB或GB

autoindex_localtime: 为off(默认)时显示的文件时间为GMT时间;改为on后,显示的文件时间为服务器时间

默认当访问列出的txt等文件时会在浏览器上显示文件的内容,如果你先让浏览器直接下载,加上下边的配置

<pre style="box-sizing: border-box; font-family: monospace; font-size: 18px; margin: 20px 0px; padding: 15px; border: 0px; background-color: rgb(244, 245, 246); white-space: pre-wrap; word-break: break-all; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">if ($request_filename ~* ^.*?\.(txt|pdf|jpg|png)$) {
 add_header Content-Disposition 'attachment';
}

配置默认站点

<pre style="box-sizing: border-box; font-family: monospace; font-size: 18px; margin: 20px 0px; padding: 15px; border: 0px; background-color: rgb(244, 245, 246); white-space: pre-wrap; word-break: break-all; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">server {
 listen 80 default;
}

当一个nginx服务上创建了多个虚拟主机时默认会从上到下查找,如果匹配不到虚拟主机则会返回第一个虚拟主机的内容,如果你想指定一个默认站点时,可以将这个站点的虚拟主机放在配置文件中第一个虚拟主机的位置,或者在这个站点的虚拟主机上配置listen default

不允许通过IP访问

<pre style="box-sizing: border-box; font-family: monospace; font-size: 18px; margin: 20px 0px; padding: 15px; border: 0px; background-color: rgb(244, 245, 246); white-space: pre-wrap; word-break: break-all; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">server {
 listen 80 default;
 server_name _;
 return 404;
}

可能有一些未备案的域名或者你不希望的域名将服务器地址指向了你的服务器,这时候就会对你的站点造成一定的影响,需要禁止IP或未配置的域名访问,我们利用上边所说的default规则,将默认流量都转到404去

上边这个方法比较粗暴,当然你也可以配置下所有未配置的地址访问时直接301重定向到你的网站去,也能为你的网站带来一定的流量

<pre style="box-sizing: border-box; font-family: monospace; font-size: 18px; margin: 20px 0px; padding: 15px; border: 0px; background-color: rgb(244, 245, 246); white-space: pre-wrap; word-break: break-all; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">server {
 rewrite ^/(.*)$ https://ops-coffee.cn/$1 permanent;
}

直接返回验证文件

<pre style="box-sizing: border-box; font-family: monospace; font-size: 18px; margin: 20px 0px; padding: 15px; border: 0px; background-color: rgb(244, 245, 246); white-space: pre-wrap; word-break: break-all; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">location = /XDFyle6tNA.txt {
 default_type text/plain;
 return 200 'd6296a84657eb275c05c31b10924f6ea';
}

很多时候微信等程序都需要我们放一个txt的文件到项目里以验证项目归属,我们可以直接通过上边这种方式修改nginx即可,无需真正的把文件给放到服务器上

nginx配置upstream反向代理

<pre style="box-sizing: border-box; font-family: monospace; font-size: 18px; margin: 20px 0px; padding: 15px; border: 0px; background-color: rgb(244, 245, 246); white-space: pre-wrap; word-break: break-all; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">http {
 ...
 upstream tomcats {
 server 192.168.106.176 weight=1;
 server 192.168.106.177 weight=1;
 }

 server {
 location /ops-coffee/ { 
 proxy_pass http://tomcats; 
 proxy_set_header Host $host;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header X-Forwarded-Proto $scheme;
 }
 }

}

稍不注意可能会落入一个proxy_pass加杠不加杠的陷阱,这里详细说下proxy_pass http://tomcats与proxy_pass http://tomcats/的区别:

虽然只是一个/的区别但结果确千差万别。分为以下两种情况:

  1. 目标地址中不带uri(proxy_pass http://tomcats)。此时新的目标url中,匹配的uri部分不做修改,原来是什么就是什么。
<pre style="box-sizing: border-box; font-family: monospace; font-size: 18px; margin: 20px 0px; padding: 15px; border: 0px; background-color: rgb(244, 245, 246); white-space: pre-wrap; word-break: break-all; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">location /ops-coffee/ {
 proxy_pass http://192.168.106.135:8181;
}
http://domain/ops-coffee/ --> http://192.168.106.135:8181/ops-coffee/
http://domain/ops-coffee/action/abc --> http://192.168.106.135:8181/ops-coffee/action/abc
  1. 目标地址中带uri(proxy_pass http://tomcats/,/也是uri),此时新的目标url中,匹配的uri部分将会被修改为该参数中的uri。
<pre style="box-sizing: border-box; font-family: monospace; font-size: 18px; margin: 20px 0px; padding: 15px; border: 0px; background-color: rgb(244, 245, 246); white-space: pre-wrap; word-break: break-all; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">location /ops-coffee/ {
 proxy_pass http://192.168.106.135:8181/;
}
http://domain/ops-coffee/ --> http://192.168.106.135:8181
http://domain/ops-coffee/action/abc --> http://192.168.106.135:8181/action/abc

nginx upstream开启keepalive

<pre style="box-sizing: border-box; font-family: monospace; font-size: 18px; margin: 20px 0px; padding: 15px; border: 0px; background-color: rgb(244, 245, 246); white-space: pre-wrap; word-break: break-all; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">upstream tomcat {
 server ops-coffee.cn:8080;
 keepalive 1024;
}
server {
 location / {
 proxy_http_version 1.1;
 proxy_set_header Connection "";

 proxy_pass http://tomcat;
 }
}

nginx在项目中大多数情况下会作为反向代理使用,例如nginx后接tomcat,nginx后接php等,这时我们开启nginx和后端服务之间的keepalive能够减少频繁创建TCP连接造成的资源消耗,配置如上

keepalive: 指定每个nginxworker可以保持的最大连接数量为1024,默认不设置,即nginx作为client时keepalive未生效

proxy_http_version 1.1: 开启keepalive要求HTTP协议版本为HTTP 1.1

proxy_set_header Connection "": 为了兼容老的协议以及防止http头中有Connection close导致的keepalive失效,这里需要及时清掉HTTP头部的Connection

404自动跳转到首页

<pre style="box-sizing: border-box; font-family: monospace; font-size: 18px; margin: 20px 0px; padding: 15px; border: 0px; background-color: rgb(244, 245, 246); white-space: pre-wrap; word-break: break-all; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">server {
 location / {
 error_page 404 = @ops-coffee;
 }

 location @ops-coffee {
 rewrite .* / permanent;
 }
}

网站出现404页面不是特别友好,我们可以通过上边的配置在出现404之后给自动跳转到首页去。

添加离线地图服务(搭建内网地图服务) 添加离线地图服务(搭建内网地图服务) 发布时间:2019-03-12 版权: 搭建离线地图服务主要是两个步骤:一是:下载离线地图服务需要的地图数据;二是:将下载的离线地图数据发布成地图服务;只有做好这两步,才能有接下来的二次开发和行业应用。 前面已经介绍了安装离线地图服务器程序 以及下载离线地图服务所以需要的地图数据,接下就把离线地图数据添加到... 阅读详情

相关推荐

nginx代理地图服务--离线部署地图服务(地图数据篇.4)

推荐使用Nginx进行发布,也可用tomcat进行发布。 经过之前写过的文章,介绍了如何对天地图,百度地图,高德地图,google地图的数据爬取。统一放在一个目录下。 1.nginx开启跨域访问配置(在nginx的config配置) 2.nginx代理地图数据(在nginx的config配置) 3.重启nginx,访问 3.1原地图文件路径 3.2代理访问(如能访问,即成功部署地图服务,后续可供leaflet,mapbox等地图框架进行调用) nginx参考配置 #user nobody; w

地图之家 9618

JAVA | Java 解决跨域问题

引言 我们在开发过程中经常会遇到前后端分离而导致的跨域问题,导致无法获取返回结果。跨域就像分离前端和后端的一道鸿沟,君在这边,她在那边,两两不能往来. 什么是跨域(CORS) 跨域(CORS)是指不同域名之间相互访问。跨域,指的是浏览器不能执行其他网站的脚本,它是由浏览器的同源策略所造成的,是浏览器对于JavaScript所定义的安全限制策略。 什么情况会跨域 同一协议, 如http或https 同一IP地址, 如127.0.0.1 同一端口, 如8080 以上三个条件中有一个条件不同就会产生

java_xiaoo的博客 974

nginx命令参数用法详细介绍

nginx命令参数用法详细介绍 nginx命令:启动nginx   在Windows上安装好nginx后,我们需要启动nginx服务,启动nginx服务的命令行操作主要有两种方式,即 C:/nginx-0.8.53>nginx.exe   或者 C:/nginx-0.8.53>start nginx   启动nginx命令说明:需要注意,由于nginx默认端口也是80端口,如果此时你的机器上开启了Apache或者IIS服务,切忌在启动nginx之前务必关闭IIS或Apache服务,否则nginx启动命令不会成功。   nginx命令:停止nginx   停止nginx的命令主要有两种,即

发布离线地图的多个方法

以下因为略懂,所以只是列举 1. 下载地图文件 地图供应商一般腾讯地图、高德地图、百度地图、谷歌地图等等 下载地图文件的工具有很多,包括付费的或免费的,常见的工具有: 全能电子地图下载器 BIGEMAP openStreeMap(开源) 国家地理信息公共服务平台 水经注 迈高图 太乐地图 地图编辑工具有 arcgis desktop arcmap qgis(开源) 地图文件的格式有 shp tiff bmp osm 瓦片地图(png,jpg) 2. 发布离线地图服务 geoserve

u014220146的博客 2439

uCOS中的消息邮箱(:task与task之间传递一个数据(数据缓冲区))

程序需求,需要完成task与task之间  字符数组的数据传输 比如:在ucos中,串口2接收的字符数组是不定时的&不定长的;只有当接收到数据的时候_才将数据赋值给新数组 具体的程序示意如下: 图1:消息邮箱测试中的     向消息邮箱发送消息(OSMboxPost(Str_Box,(void*)rec);//发送消息--(向 消息邮箱_msg_key发送消息) ),实际项目需求的

faguoduifangui的博客 4541

±10V ADC 输入电路的高共模差分输入电压

这篇文章分析了±10V ADC输入电路的设计需求与挑战,重点讨论了高共模差分输入电压的处理方案。文章首先明确了设计目标,即安全转换±10V差分信号并保持信号完整性,同时克服高共模电压、阻抗匹配和噪声优化等难点。随后详细比较了仪表放大器和差分放大器的性能特点,并提出了器件选型理论。在信号链架构部分,文章通过公式推导阐述了增益设置、共模抑制设计和输入阻抗匹配等关键技术。此外,还建立了噪声源模型,提出了噪声优化措施。最后,文章总结了设计验证方法,并扩展了在工业保护和生物电信号采集等场景的应用。该设计强调根据具体应

泛红尘的博客 1963

Nginx的几个常用配置和技巧

当一个nginx服务上创建了多个虚拟主机时默认会从上到下查找,如果匹配不到虚拟主机则会返回第一个虚拟主机的内容,如果你想指定一个默认站点时,可以将这个站点的虚拟主机放在配置文件中第一个虚拟主机的位置,或者在这个站点的虚拟主机上配置listen default。可能有一些未备案的域名或者你不希望的域名将服务器地址指向了你的服务器,这时候就会对你的站点造成一定的影响,需要禁止IP或未配置的域名访问,我们利用上边所说的default规则,将默认流量都转到404去。改为on后,显示的文件时间为服务器时间。

m0_48096446的博客 547

NUS-WIDE-10K数据集制作

NUS-WIDE是一个多标签数据集,数据集中一共包含26,9648个样本,可以分为81个类。最近在做跨模态检索项目,发现有很多论文里面都用到了NUS-WIDE-10K数据集,但是在网上也没有搜索到相关的数据集下载链接或者是数据集制作代码,所以自己动手写了一个NUS-WIDE-10K数据集的制作代码。 1.介绍 我在网上找到的最早关于NUS-WIDE-10K数据集描述的论文是:Cross-modal Retrieval with Correspondence Autoencoder。描述如下:作者选择了N

weixin_44012382的博客 4202

Nginx 的几个常用配置和技巧

Nginx 的几个常用配置和技巧 文章列举了几个 Nginx 常见的,实用的,有趣的配置,希望看过之后能说一句:学到了! 本文转载来源:https://mp.weixin.qq.com/s?__biz=MzU5MDY1MzcyOQ==&mid=2247484021&idx=1&sn=493ceaf414ad579d166f98c22db9a5ab&scene=21...

runewbie的博客 309

告别Vivado自带编辑器!手把手教你用Sublime Text 4 + Icarus Verilog搭建FPGA开发环境(Windows 10/11)

本文详细介绍如何在Windows 10/11系统下,使用Sublime Text 4和Icarus Verilog搭建高效的FPGA开发环境,替代Vivado自带编辑器。通过配置语法检查、代码高亮和智能补全等功能,提升Verilog开发效率,实现专业级工作流。

weixin_30684743的博客 431

DSMA时序修复避坑指南:当Setup和Hold互卡时,除了调Margin还能做什么?

本文深入探讨DSMA时序修复中的Setup与Hold互锁问题,提供7种高阶策略,包括优先级判断、高级参数组合、单元类型智能替换等,帮助工程师突破时序收敛瓶颈。特别针对fix_eco_timing命令的隐藏参数和物理协同优化进行详细解析,助力芯片设计实现时序收敛。

weixin_30162121的博客 299

nginx 配置多个域名 指向不同服务_Nginx的几个常用配置和技巧

文章列举了几个Nginx常见的,实用的,有趣的配置,希望看过之后能说一句:学到了!一个站点配置多个域名server{listen80;server_nameops-coffee.cnb.ops-coffee.cn;}server_name 后跟多个域名即可,多个域名之间用空格分隔一个服务配置多个站点server{listen8...

weixin_39783512的博客 5354

EDA课程实验:《数字逻辑电路》实验四___基于Minisys 平台 VIVADO工具与Verilog语言

(4)使用 Verilog HDL 实现一个分频器 clock_div,输入的是系统提供的 100MHz 频率,输出的是 1Hz 频率,占空比是 1:2,(实际上可以用一个加 1 计数器来实现降频,输入的是一个 100MHz 频率的方波,对这 个方波计数 1 亿次刚好到 1 秒(1Hz),题目要求输出频率占空比是 1:2,也就是这个 1Hz 的 方波高电平和低电平各 500ms,可以采用计数到中间值的时候输出电平翻转。(1)1) 拨动 SW1~0 为 01,按下 P4 按钮,GLD1~0 为 01;

ssjy_的博客 1298

【Nginx】——从0到1,带你玩转Nginx,掌握其中的技巧以及配置

【Nginx】——从0到1,带你玩转Nginx,掌握其中的技巧以及配置

shsjssnn的博客 4379

通信原理 | 窗函数 | 矩形窗 | 汉宁窗 | 汉明窗 | 布莱克曼窗 | 补零对频谱的影响

比如,原信号是一个周期的余弦信号,又给它补了9个周期长度的0,那么信号并不是10个周期的余弦信号,而是一个周期的余弦加一串0,补零并没有带来新的信息!频谱分辨率的含义是两个频率不同的信号在频率上可分,也就要求他们不能落到一个频域函数的主瓣上,所以,如果待分析的两个信号频率接近,而时域长度又短,那么在频域上他们就落在一个频域函数的主瓣内了,补再多的零也无济于事。而形状(主瓣宽度)是由补零之前的信号长度决定的,补零的作用只是细化了频域序列,并没有改变其主瓣宽度。所以,汉宁窗牺牲了分辨率,换来了旁瓣泄露的减小。

若北辰 1306

EPLAN 电气制图(六):结构盒与设备管理器核心概念(基础知识选看)

结构盒是 EPLAN 中用于标识元件安装位置的逻辑容器,非实际设备或黑盒,仅用于原理图中划分功能区域或物理位置(如 “柜内”“柜外”)。标识符设置:在 “显示设备标识符” 中输入位置代号(如 “+ 柜外”),完整格式为 “= 高层代号 + 位置代号”;筛选与定位:通过 “筛选器” 按类别(如电机、接触器)快速查找设备,右键 “转到(图形)” 可高亮定位图纸中的元件;设备保护:重要设备可启用保护(【项目数据】→【设备】→【启用设备保护】),防止误删除(显示橙色圆圈标记)。

电工 1060
上一篇: 利用shell或java操作HDFS
下一篇: Java开发环境配置
Java_ttcd
博客等级 码龄4年 198粉丝 190原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值