Linux 中检查 Apache Web Server (httpd) 正常运行时间的 4 种方法
注:机翻,未校。
4 Ways To Check Uptime of Apache Web Server (httpd) on Linux
November 28, 2019
by Magesh Maruthamuthu
We all know about the purpose of uptime command in Linux.
我们都知道 Linux 中 uptime 命令的目的。
It is used to check the uptime of the Linux system, how long the system has been running without restarting.
它用于检查 Linux 系统的正常运行时间,系统在不重新启动的情况下运行了多长时间。
If you want to check other service uptime like Apache, MySQL, sftp, etc. on Linux, how do you do that?
如果您想在 Linux 上检查其他服务的正常运行时间,如 Apache、MySQL、sftp 等,您该怎么做?
Each service has their own command to check the service uptime.
每个服务都有自己的命令来检查服务正常运行时间。
Also, we can check the service uptime using the ps command because there are many options to collect this information.
此外,我们可以使用 ps 命令检查服务正常运行时间,因为有很多选项可以收集此信息。
It shows when the parent process started (which I say when it restarts or starts) and how long the service runs with the [DD:HH:MM:SS]
format.
它显示父进程的启动时间(我说的是它重新启动或启动的时间)以及服务以 [DD:HH:MM:SS]
格式运行的时间。
In this tutorial, we are going to show you how to check Apache web server uptime using different method.
在本教程中,我们将向您展示如何使用不同的方法检查 Apache Web 服务器的正常运行时间。
This is a small tutorial and very useful if you want to get Apache web server uptime for some reason.
这是一个小教程,如果您出于某种原因想要获得 Apache Web 服务器的正常运行时间,则非常有用。
This can be done using the following 4 methods.
这可以使用以下 4 种方法完成。
- Apache mod_status module
- ps command ps
- systemctl command systemctl
- proc filesystem (procfs)
Method-1: How to Check Apache (httpd) Web Server Uptime Using mod_status
Module on Linux
方法 1:如何在 Linux 上使用 mod_status
模块检查 Apache (httpd) Web 服务器的正常运行时间
The Apache mode_status module allows a server administrator to check Apache Web server uptime, concurrent connections, and server performance with a given interval through the CLI and GUI.
Apache mode_status 模块允许服务器管理员通过 CLI 和 GUI 在给定的时间间隔内检查 Apache Web 服务器的正常运行时间、并发连接和服务器性能。
However, it is disabled by default and must be enabled to use the feature.
但是,默认情况下,它是禁用的,必须启用才能使用该功能
。
The Apache “mod_status” module displays the following useful information about the Apache Web server.
Apache “mod_status” 模块显示以下有关 Apache Web 服务器的有用信息。
- Apache Web server built & version information
Apache Web 服务器构建和版本信息 - Web server last restart & uptime information
Web 服务器上次重启和正常运行时间信息 - Total number of incoming requests
传入请求总数 - Idle workers 空闲 worker
- Server load & Web server CPU usage
服务器负载和 Web 服务器 CPU 使用率 - Total traffic (Bandwidth usage)
总流量(带宽使用量) - Average number of requests per second
每秒平均请求数 - Average number of bytes per request
每个请求的平均字节数 - Number of bytes served per second
每秒提供的字节数 - How many requests currently being processed
当前正在处理的请求数 - Details about running process
有关正在运行的进程的详细信息
How to Install and Enable Apache’s mod_status Module on Linux
如何在 Linux 上安装和启用 Apache 的 mod_status 模块
By default, the Apache “mod_status” module is installed on Apache. But reports are disabled and you have to uncomment it to access it. To do so, you need to uncomment the codes below in your Apache configuration file based on your distribution.
默认情况下,Apache “mod_status” 模块安装在 Apache 上。但是报表被禁用,您必须取消注释才能访问它。为此,您需要根据您的分配在 Apache 配置文件中取消注释以下代码。
See the following article if you want to verify the Apache web server performance using the mod_status module.
如果要使用 mod_status 模块验证 Apache Web 服务器性能,请参阅以下文章。
For RHEL/CentOS/Fedora
systems, open the /etc/httpd/conf/httpd.conf
file and uncomment the below codes.
对于 RHEL/CentOS/Fedora 系统,请打开 /etc/httpd/conf/httpd.conf
文件并取消注释以下代码。
[For Apache 2.2]
<Location /server-status>SetHandler server-statusOrder deny,allowDeny from allAllow from all
</Location>[For Apache 2.4]
<Location "/server-status">SetHandler server-statusRequire host localhost
</Location>
For Debian/Ubuntu
systems, open /etc/apache2/mods-enabled/status.conf
file and uncomment the below codes.
对于 Debian/Ubuntu 系统,请打开 /etc/apache2/mods-enabled/status.conf
文件并取消注释以下代码。
<Location "/server-status">SetHandler server-statusRequire local#Require ip 192.0.2.024
</Location>
Save and close the file and restart the Apache web server service.
保存并关闭文件,然后重新启动 Apache Web 服务器服务。
Use the below commands to restart the Apache (httpd) server in Linux.
使用以下命令在 Linux 中重新启动 Apache (httpd) 服务器。
For SysVinit
Systems – openSUSE & Debian
based systems.
对于 SysVinit
系统 – 基于 openSUSE & Debian
的系统。
# service apache2 restart
or
# /etc/init.d/apache2 restart
For SysVinit
Systems – RHEL (RedHat)
based systems.
对于 SysVinit
系统 – 基于 RHEL (RedHat)
的系统。
# service httpd restart
or
# /etc/init.d/httpd restart
For systemd
Systems – openSUSE & Debian
based systems.
对于 systemd
系统 – 基于 openSUSE & Debian
的系统。
# systemctl restart apache2.service
or
# systemctl restart apache2
For systemd
Systems – RHEL (RedHat)
based systems.
对于 systemd
系统 – 基于 RHEL (RedHat)
的系统。
# systemctl restart httpd
or
# systemctl restart httpd.service
Run the following command to get the Apache uptime.
运行以下命令以获取 Apache 正常运行时间。
$ apachectl statusApache Server Status for localhost (via 127.0.0.1)Server Version: Apache/2.4.29 (Ubuntu)Server MPM: preforkServer Built: 2019-09-16T12:58:48--------------------------------------------------------------------------Current Time: Wednesday, 27-Nov-2019 13:06:03 ISTRestart Time: Wednesday, 27-Nov-2019 12:24:26 ISTParent Server Config. Generation: 2Parent Server MPM Generation: 1Server uptime: 41 minutes 36 secondsServer load: 0.00 0.02 0.14Total accesses: 8 - Total Traffic: 88 kBCPU Usage: u0 s0 cu0 cs0.00321 requests/sec - 36 B/second - 11.0 kB/request1 requests currently being processed, 4 idle workers__W__...........................................................Scoreboard Key:"_" Waiting for Connection, "S" Starting up, "R" Reading Request,"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,"C" Closing connection, "L" Logging, "G" Gracefully finishing,"I" Idle cleanup of worker, "." Open slot with no current process
Alternatively, you can run this command using a**Linux text-based browser**.
或者,您也可以使用基于 Linux 文本的浏览器运行此命令。
$ elinks http://localhost/server-status
Apache uptime with page refresh every N seconds.
Apache 正常运行时间,每 N 秒刷新一次页面。
$ elinks http://localhost/server-status?refresh=5
Method-2: How to Check Apache (httpd) Web Server Uptime Using the ps
Command on
Linux 方法 2:如何在 Linux 上使用 ps
命令检查 Apache (httpd) Web 服务器的正常运行时间
The ps command displays information about a selection of the active processes. It displays the process ID (pid=PID), the terminal associated with the process (tname=TTY), the cumulated CPU time in [DD-] hh:mm:ss format (time=TIME), and the executable name (ucmd=CMD). Output is unsorted by default.
ps 命令显示有关所选活动进程的信息。它显示进程 ID (pid=PID)、与进程关联的终端 (tname=TTY)、[DD-] hh:mm:ss 格式的累积 CPU 时间 (time=TIME) 和可执行文件名称 (ucmd=CMD)。默认情况下,输出未排序。
To do so, you need to find the PID of the Apache process, and it can be easily identified using the pidof command.
为此,您需要找到 Apache 进程的 PID,并且可以使用 pidof 命令轻松识别它。
For RPM based systems:
对于基于 RPM 的系统:
# pgrep httpd | head -1
10915
For DEB based systems:
对于基于 DEB 的系统:
# pgrep apache2 | head -1
1111
Once you get the Apache PID, use the following command to get it.
获取 Apache PID 后,使用以下命令获取它。
# ps -p 10915 -o etimeELAPSED05:59:59
The above output shows the elapsed time since the process was started. As per the above output, it’s up and running 5 hours, 59 mins, and 59 sec
.
上述输出显示自进程启动以来经过的时间。根据上述输出,它已启动并运行 5 hours, 59 mins, and 59 sec
。
Method-3: How to Check Apache (httpd) Web Server Uptime Using the systemctl
Command on Linux
方法 3:如何在 Linux 上使用 systemctl
命令检查 Apache (httpd) Web 服务器的正常运行时间
The systemctl command is used to control the systemd service manager. This is a replacement for the old SysVinit system management, and most of the modern Linux operating systems have been moved to the systemd.
systemctl 命令用于控制 systemd 服务管理器。这是旧 SysVinit 系统管理的替代品,大多数现代 Linux 操作系统已迁移到 systemd。
# systemctl status httpd● httpd.service - Web server ApacheLoaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)Active: active (running) since Wed 2019-11-27 03:43:37 UTC; 5h 50min agoProcess: 10907 ExecStop=/usr/local/apache/bin/apachectl graceful-stop (code=exited, status=0/SUCCESS)Process: 11025 ExecReload=/usr/local/apache/bin/apachectl graceful (code=exited, status=0/SUCCESS)Process: 10912 ExecStart=/usr/local/apache/bin/apachectl start (code=exited, status=0/SUCCESS)Main PID: 10915 (httpd)CGroup: /system.slice/httpd.service├─10915 /usr/local/apache/bin/httpd -k start├─11082 /usr/local/apache/bin/httpd -k start├─11083 /usr/local/apache/bin/httpd -k start├─11084 /usr/local/apache/bin/httpd -k start└─11681 /usr/local/apache/bin/httpd -k startNov 27 03:43:37 ns1.nsforcdn.com systemd [1]: Started Web server Apache.
Nov 27 03:43:38 ns1.nsforcdn.com systemd [1]: Reloading Web server Apache.
Nov 27 03:43:38 ns1.nsforcdn.com apachectl [11025]: AH00112: Warning: DocumentRoot [/home/nowdigitaleasy/public_html/billing] does not exist
Nov 27 03:43:38 ns1.nsforcdn.com apachectl [11025]: AH00112: Warning: DocumentRoot [/home/nowdigitaleasy/public_html/billing] does not exist
Nov 27 03:43:38 ns1.nsforcdn.com apachectl [11025]: AH00112: Warning: DocumentRoot [/home/nutechnologyinc/public_html/poc.nutechnologyinc.com] does not exist
Nov 27 03:43:38 ns1.nsforcdn.com apachectl [11025]: AH00112: Warning: DocumentRoot [/home/witskills/public_html] does not exist
Nov 27 03:43:38 ns1.nsforcdn.com apachectl [11025]: AH00112: Warning: DocumentRoot [/home/witskills/public_html] does not exist
Nov 27 03:43:38 ns1.nsforcdn.com systemd [1]: Reloaded Web server Apache.
Hint: Some lines were ellipsized, use -l to show in full.
Method-4: How to Check Apache (httpd) Web Server Uptime Using the proc
filesystem (procfs) on Linux
方法 4:如何在 Linux 上使用 proc
文件系统 (procfs)检查 Apache (httpd) Web 服务器的正常运行时间
The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information.
proc 文件系统 (procfs) 是类 Unix 操作系统中的一种特殊文件系统,用于显示有关进程的信息和其他系统信息。
It’s sometimes referred to as a process information pseudo-file system. It doesn’t contain ‘real’ files but run time system information (e.g. system memory, devices mounted, hardware configuration, etc).
它有时称为进程信息伪文件系统。它不包含 “真实” 文件,而是运行时系统信息(例如系统内存、挂载的设备、硬件配置等)。
Once you have Apache PID, use the following proc file system to identify it. As per the below output the httpd process has been running since**Aug 05 at 17:20
**.
拥有 Apache PID 后,请使用以下 proc 文件系统来识别它。根据以下输出,httpd 进程自 8 月 5 日 17:20 以来一直在运行。
# ls -ld /proc/10915dr-xr-xr-x. 9 root root 0 Aug 5 17:20 /proc/10915/
via:
-
4 Ways To Check Uptime of Apache Web Server (httpd) on Linux | 2DayGeek
https://www.2daygeek.com/check-find-apache-httpd-web-server-uptime-linux/
相关文章:
Linux 中检查 Apache Web Server (httpd) 正常运行时间的 4 种方法
注:机翻,未校。 4 Ways To Check Uptime of Apache Web Server (httpd) on Linux November 28, 2019 by Magesh Maruthamuthu We all know about the purpose of uptime command in Linux. 我们都知道 Linux 中 uptime 命令的目的。 It is used to c…...
简易CPU设计入门:内存初始化文件(三)
项目代码下载 请大家首先准备好本项目所用的源代码。如果已经下载了,那就不用重复下载了。如果还没有下载,那么,请大家点击下方链接,来了解下载本项目的CPU源代码的方法。 下载本项目代码 准备好了项目源代码以后,我…...
深度解析Meta最新发布的虚拟试穿技术:一键试衣的革命性进展
随着电子商务的发展,消费者对在线购物体验的要求越来越高。为了满足这一需求,Meta最近发布了一款面向电商人群的一键试衣工具,它不仅能够实现精确控制人物的外观(虚拟试衣)和姿态(姿态迁移),还能保持参考图像中的细节纹理特征,避免失真。这项技术通过引入基于注意力机…...
Apache Solr RCE(CVE-2017-12629)--vulhub
Apache Solr 远程命令执行漏洞(CVE-2017-12629) Apache Solr 是一个开源的搜索服务器。Solr 使用 Java 语言开发,主要基于 HTTP 和 Apache Lucene 实现。原理大致是文档通过Http利用XML加到一个搜索集合中。查询该集合也是通过 http收到一个…...
使用二分查找法找出给定点距离给定点集合距离最近的点
1、场景描述 给定点Point A (x,y)和 直线点集合 Points [(x1,y1),(x2,y2),(x3,y3),(x4,y4),(x5,y5)......],计算出集合中距离点A最近的一个点 (如果集合中的两个点距离A点最近且相等,则只取其中一个) 2、代码&#x…...
凯酷全科技抖音电商服务的卓越践行者
在数字经济蓬勃发展的今天,电子商务已成为企业增长的新引擎。随着短视频平台的崛起,抖音作为全球领先的短视频社交平台,不仅改变了人们的娱乐方式,也为品牌和商家提供了全新的营销渠道。厦门凯酷全科技有限公司(以下简…...
复盘:“辩论赛”复盘
这个小活动整个下来,我是按照“策划-执行-总结-复盘“这个顺序来过的; 在策划上: 首先,针对这个论题,我其实很清楚有很多问题,比如引起逆反心理,没想到还有不少人参与。 其次,针对这…...
SSD目标检测算法
SSD(Single Shot MultiBox Detector)是一种基于深度学习的目标检测算法,它结合了高效的检测策略和准确的检测结果。相比于传统的目标检测算法,SSD能够在保持较高准确性的同时快速地进行目标检测。 SSD算法的主要特点包括以下几个…...
MyBatis通过注解配置执行SQL语句原理源码分析
文章目录 前置准备流程简要分析配置文件解析加载 Mapper 接口MapperAnnotationBuilder解析接口方法注解parseStatement 方法详解MapperBuilderAssistant 前置准备 创建一个mybatis-config.xml文件,配置mapper接口 <mappers><!--注解配置--><mapper…...
12_HTML5 Video(视频) --[HTML5 API 学习之旅]
HTML5 引入了 <video> 标签,使得在网页中嵌入和控制视频变得非常简单。<video> 元素允许你直接在 HTML 中指定视频文件,并提供了多种属性和方法来控制视频的播放、暂停、音量等。 基本用法 HTML5 的 <video> 标签让嵌入和控制视频变…...
JaxaFx学习(三)
目录: (1)JavaFx MVVM架构实现 (2)javaFX知识点 (3)JavaFx的MVC架构 (4)JavaFx事件处理机制 (5)多窗体编程 (6)数据…...
视频点播系统|Java|SSM|VUE| 前后端分离
【技术栈】 1⃣️:架构: B/S、MVC 2⃣️:系统环境:Windowsh/Mac 3⃣️:开发环境:IDEA、JDK1.8、Maven、Mysql5.7 4⃣️:技术栈:Java、Mysql、SSM、Mybatis-Plus、VUE、jquery,html 5⃣️数据库可…...
Springboot 学习 之 logback-spring.xml 日志压缩 .tmp 临时文件问题
文章目录 前言功能简述1. 自定义日志文件名2. 归档规则 && 压缩2.1. 归档配置2.2. 归档压缩2.3. 日志格式 && 编码 现象原因解决办法 前言 在 Springboot 应用中,默认使用 logback-spring.xml 配置日志相关 功能简述 1. 自定义日志文件名 <fi…...
智慧工地整体解决方案
智慧工地背景与需求 智慧工地解决方案的提出,源于建筑行业面临的诸多挑战。安全事故频发、环保体系不健全、建筑信息化水平低以及施工现场管理难度大等问题,迫切需要通过智能化手段来提升工地管理的效率与安全性。智慧工地利用现代信息技术,…...
【读书打卡版】【读书笔记】半小时漫画中国地理3
一 如果全中国是个班级,江南五省各不同 继续跟随长江的脚步,认识坐在长江中下游平原上的省份:安徽、江苏、江西、浙江、上海。他们同属于一个美丽又富饶的大区——江南。 那么问题来了,一提到江南,你会想到什么&#…...
harmony UI组件学习(1)
Image 图片组件 string格式,通常用来加载网络图片,需要申请网络访问权限:ohos.permission.INTERNET Image(https://xxx.png) PixelMap格式,可以加载像素图,常用在图片编辑中 Image(pixelMapobject) Resource格式,加…...
ECharts热力图-笛卡尔坐标系上的热力图,附视频讲解与代码下载
引言: 热力图(Heatmap)是一种数据可视化技术,它通过颜色的深浅变化来表示数据在不同区域的分布密集程度。在二维平面上,热力图将数据值映射为颜色,通常颜色越深表示数据值越大,颜色越浅表示数…...
React状态管理常见面试题目(一)
1. Redux 如何实现多个组件之间的通信?多个组件使用相同状态时如何进行管理? Redux 实现组件通信 Redux 是一个集中式的状态管理工具,通过共享一个全局 store 来实现多个组件之间的通信。 通信机制: 所有状态保存在 Redux 的全局 store 中。使用 ma…...
.NET周刊【12月第2期 2024-12-08】
国内文章 终于解决了.net在线客服系统总是被360误报的问题(对软件进行数字签名) https://www.cnblogs.com/sheng_chao/p/18581139 升讯威在线客服与营销系统由.net core和WPF开发,旨在开放、开源、共享。开发者为解决360与其他国产管家的误…...
YOLOv8目标检测(七)_AB压力测试
YOLOv8目标检测(一)_检测流程梳理:YOLOv8目标检测(一)_检测流程梳理_yolo检测流程-CSDN博客 YOLOv8目标检测(二)_准备数据集:YOLOv8目标检测(二)_准备数据集_yolov8 数据集准备-CSDN博客 YOLOv8目标检测(三)_训练模型:YOLOv8目标检测(三)_训…...
多个图片转换为PDF文件
将多个图片转换为PDF文件在Python中可以通过多个库来实现,其中最常用的库之一是Pillow(用于图像处理)和reportlab(用于生成PDF)。不过,对于直接图片转PDF的操作,更推荐使用Pillow配合PyMuPDF&am…...
【递归,搜索与回溯算法 综合练习】深入理解暴搜决策树:递归,搜索与回溯算法综合小专题(一)
找出所有子集的异或总和再求和 题目解析 算法原理 解法 决策树 这种决策使得每一次递归都是有效的递归,每一个节点都是最终的结果,所以这棵决策树是不用剪枝的,也没有递归出口的; 注意 决策树执行添加元素…...
对 MYSQL 架构的了解
MySQL 是一种广泛使用的关系型数据库管理系统,其架构主要包括以下几个关键部分: 一、连接层 客户端连接管理:MySQL 服务器可以同时处理多个客户端的连接请求。当客户端应用程序(如使用 Java、Python 等语言编写的程序)…...
深入解析 StarRocks 物化视图:全方位的查询改写机制
小编导读: 本文将重点介绍如何利用物化视图进行查询改写。文章将全面介绍物化视图的基本原理、关键特性、应用案例、使用场景、代码细节以及主流大数据产品的物化视图改写能力对比。 物化视图在 StarRocks 中扮演着至关重要的角色,它是进行数据建模和加速…...
k8s常见问题及debug
ERROR1 ErrImagePull pod pending 外网无法方位集群服务 kubectl 命令失败 Pod Error 进入容器失败 pod重启 Running not ready CrashLoopBackOff PV/PVC helm install...
Winnows基础(2)
Target 了解常见端口及服务,熟练cmd命令,编写简单的 .bat 病毒程序。 Trail 常见服务及端口 80 web 80-89 可能是web 443 ssl心脏滴血漏洞以及一些web漏洞测试 445 smb 1433 mssql 1521 oracle 2082/2083 cpanel主机管理系统登陆(国外用的…...
(14)D-FINE网络,爆锤yolo系列
yolo过时了?传统的yolo算法在小目标检测方面总是不行,最新算法DEIM爆锤yolo,已经替yolo解决。 一、创新点 这个算法名为DEIM,全称是DETR with Improved Matching for Fast Convergence,其主要创新点在于提出了一…...
关于数据流图绘制和使用上的一些个人经验
假设我们需要开发一个项目进度管理系统,在这个项目进度管理系统之中,我们需要开发一个功能:项目成员的列表。我们具有这样的业务需求: 在项目进度管理系统中,我们需要知道参与项目的人员到底有哪些,并且项目…...
Leetcode Hot 100 【二叉树】104. 二叉树的最大深度
104. 二叉树的最大深度 已解答 简单 相关标签 相关企业 给定一个二叉树 root ,返回其最大深度。 二叉树的 最大深度 是指从根节点到最远叶子节点的最长路径上的节点数。 示例 1: 输入:root [3,9,20,null,null,15,7] 输出:3…...
雅思真题短语梳理(八)
126员工流动率高 high staff turnover 127(多)负担一些工作任务 cover some duties / an increased workload 128不满 feel upset and resentful 129偏向性待遇 preferential treatment 130介入帮忙 step in and help 131切实的好处 tangible benefits 132挽留 staff retention…...
Codeforces Round 993 (Div. 4)个人训练记录
Codeforces Round 993 (Div. 4) 只选择对我有价值的题目记录 E. Insane Problem 题目描述 给定五个整数 k k k, l 1 l_1 l1, r 1 r_1 r1, l 2 l_2 l2 和 r 2 r_2 r2,Wave 希望你帮助她计算满足以下所有条件的有序对 …...
java-io流
根据流的方向: 输入流(InputStream/Reader):从数据源读取数据到程序中。输出流(OutputStream/Writer):将数据从程序写入到目的地。 根据流处理信息的大小: 字节流(Byte S…...
数据可视化
数据可视化 数据可视化 数据可视化主要目的:借助于图形化手段,清晰有效地传达与沟通信息。数据可视化可以把冰冷的数字转换成图形,揭示蕴含在数据中的规律和道理。 常用的数据可视化库: D3.js 目前 Web 端评价最高的 Javascri…...
CompletableFuture使用详解
一、 CompletableFuture介绍 平时多线程开发一般就是使用Runnable,Callable,Thread,FutureTask,ThreadPoolExecutor这些内容和并发编程息息相关。相对来对来说成本都不高,多多使用是可以熟悉这些内容。这些内容组合在…...
【长期有效】短链接生成-短链接-短网址-短链接生成接口-短链接转换接口-短网址URL生成-短链接-短网址-短域名-短链接
短链接API接口的作用主要体现在以下几个方面: 一、链接缩短与分享优化 短链接API接口的主要功能是将长链接转换为短链接。这种转换使得链接更加简洁、易读和易分享,尤其在社交媒体、电子邮件、短信等字符受限或按字符计费的场合中,短链接能…...
使用Idea自带的git功能进行分支合并
文章目录 1.背景描述2.分支切换3.分支合并的具体操作4.将在local环境下,从dev合并到qas分支上的代码,推送到远端 1.背景描述 目前在开发的当前项目有四个分支,master(主分支)、pre(预生产分支)、qas(测试分支)、dev(开发分支); …...
工业摄像机基于电荷耦合器件的相机
工业摄像机系列产品及其识别技术的详细介绍: 一、工业摄像机概述 工业摄像机是利用光学成像技术获取视觉信息,并通过图像处理算法分析这些信息的设备。它通常具有高图像稳定性、高传输能力和高抗干扰能力等特性,适用于各种复杂的工业环境。 …...
【期末大作业】使用Python熟练掌握面向对象
引言 在编程学习过程中,构建项目是一个非常有效的方式,不仅能巩固和应用所学的知识,还能通过实践来解决实际问题。本文将通过几个经典的项目示例来展示如何用面向对象的方式设计和实现一个完整的系统,包括学生成绩管理系统、图书…...
JAVA:代理模式(Proxy Pattern)的技术指南
1、简述 代理模式(Proxy Pattern)是一种结构型设计模式,用于为其他对象提供一种代理,以控制对这个对象的访问。通过代理模式,我们可以在不修改目标对象代码的情况下扩展功能,满足特定的需求。 设计模式样例:https://gitee.com/lhdxhl/design-pattern-example.git 2、什…...
【MAC】深入浅出 Homebrew 下 Nginx 的安装与配置指南
硬件:Apple M4 Pro 16寸 系统: macos Sonoma 15.1.1 Nginx 是一款高性能的 Web 服务器和反向代理服务器,广泛应用于全球各地的网站和企业应用中。本文将详细介绍如何在 macOS 环境下使用 Homebrew 安装、启动、管理以及优化配置 Nginx&#x…...
【华为OD-E卷-寻找关键钥匙 100分(python、java、c++、js、c)】
【华为OD-E卷-寻找关键钥匙 100分(python、java、c、js、c)】 题目 小强正在参加《密室逃生》游戏,当前关卡要求找到符合给定 密码K(升序的不重复小写字母组成) 的箱子,并给出箱子编号,箱子编…...
SQL MID()
SQL中的MID()函数是一个用于从指定位置开始截取字符串中指定长度的子串的函数。这个函数在数据库查询和数据处理中经常被使用,特别是在需要从较长的文本字段中提取特定信息时。 MID()函数的基本语法是:SELECT MID(column_name, start, length) FROM tab…...
Sui 基金会任命 Christian Thompson 为新任负责人
Sui 基金会是专注于推动 Sui 蓬勃发展的生态增长与采用的机构。近日,基金会宣布任命 Christian Thompson 为新任负责人。在 Sui 主网发布的开创性一年里,Sui 凭借其无与伦比的速度、可扩展性和效率,迅速崛起为领先的 Layer 1 区块链之一&…...
ViEW生命周期
Vue的生命周期是指Vue实例从创建到销毁的整个过程,包括多个阶段和对应的钩子函数。以下是Vue生命周期的详细说明: 1. **创建阶段**: - beforeCreate:在实例初始化之前调用,此时数据观测和事件配置尚未完成,…...
[蓝桥杯 2019 国 B] 排列数
目录 前言 题解 思路 疑问 解答 前言 对于本篇文章是站在别人的基础之上来写的,对于这道题作为2019年国赛B组的最难的一题,他的难度肯定是不小的,这道题我再一开始接触的时候连思路都没有,也是看了两三遍别人发的题解&#x…...
python 中执行from elasticsearch import Elasticsearch,AsyncElasticsearch 报错
在 Python 中执行 from elasticsearch import Elasticsearch, AsyncElasticsearch 时,如果提示 AsyncElasticsearch 不存在,可能是因为以下几个原因: 1. 安装的 elasticsearch 库版本不匹配 AsyncElasticsearch 是在 elasticsearch 库的较新版本中引入的。如果你安装的版本…...
git 删除鉴权缓存及账号信息
在Windows系统下 清除凭证管理器中的Git凭据 按下Win R键,打开“运行”对话框,输入control,然后回车,打开控制面板。在控制面板中找到“用户账户”,然后点击“凭据管理器”。在凭据管理器中,找到“Windows…...
浏览器要求用户确认 Cookies Privacy(隐私相关内容)是基于隐私法规的要求,VUE 实现,html 代码
Cookie Notices and Cookie Consent | Cookiepedia 1. 法律法规要求 许多国家和地区的隐私法律要求网站在存储或处理用户数据(包括 Cookies)之前必须获得用户的明确同意: GDPR(欧盟通用数据保护条例) 要求ÿ…...
数据结构:栈和队列的实现
栈:一种特殊的线性表,其只允许在固定的一端进行插入和删除元素操作。 进行数据插入和删除操作的一端 称为栈顶,另一端称为栈底。 栈中的数据元素遵守后进先出 LIFO ( Last In First Out )的原则。 压栈:栈…...
2024.12.21辩论赛感受
背景 今天辩论赛的双方论点是: 正方:寒假留在研发中心的收获大 反方:寒假去做其他事情的收获 辩论赛,为了锻炼自己,选择了不想选择以及相对不好辩论的反方。出现的状况有一下几点: 1.发现自己脑子完全跟不…...