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

wordpress华丽插件/seo应该怎么做

wordpress华丽插件,seo应该怎么做,制作做动画的网站,美国社交网络公司排名gs_sdr命令代码解读 背景 openGauss推出了容灾架构,相比之前的一个集群主从架构,而容灾架构是两个集群间的数据同步。为了更深入了解其原理,本文试图通过阅读gs_sdr命令相关的代码来学习下相关的各种操作。 1.容灾搭建过程可以参考&#xf…

gs_sdr命令代码解读

背景

openGauss推出了容灾架构,相比之前的一个集群主从架构,而容灾架构是两个集群间的数据同步。为了更深入了解其原理,本文试图通过阅读gs_sdr命令相关的代码来学习下相关的各种操作。

1.容灾搭建过程可以参考:https://www.modb.pro/db/628767

2.vscode调试配置可以参考:https://www.modb.pro/db/658344

3.个人学习记录,理解不一定完全正确。如有错误,可指出一起探讨_

环境准备

安装集群

安装两套集群,每套集群含2个节点,相关信息如下:

集群1信息
omm@pghost2 ~$ cm_ctl query -Cvid
[ CMServer State ]

node node_ip instance state
---------------------------------------------------------------------
1 pghost2 192.168.56.20 1 /app/ogdata/data/cm/cm_server Primary
2 pghost3 192.168.56.30 2 /app/ogdata/data/cm/cm_server Standby

[ Cluster State ]

cluster_state : Normal
redistributing : No
balanced : Yes
current_az : AZ_ALL

[ Datanode State ]

node node_ip instance state | node node_ip instance state
------------------------------------------------------------------------------------------------------------------------------------------------
1 pghost2 192.168.56.20 6001 /app/ogdata/data/dn1 P Primary Normal | 2 pghost3 192.168.56.30 6002 /app/ogdata/data/dn1 S Standby Normal
集群2信息
omm@pghost5 ~$ cm_ctl query -Cvid
[ CMServer State ]

node node_ip instance state
---------------------------------------------------------------------
1 pghost5 192.168.56.50 1 /app/ogdata/data/cm/cm_server Primary
2 pghost6 192.168.56.60 2 /app/ogdata/data/cm/cm_server Standby

[ Cluster State ]

cluster_state : Normal
redistributing : No
balanced : Yes
current_az : AZ_ALL

[ Datanode State ]

node node_ip instance state | node node_ip instance state
------------------------------------------------------------------------------------------------------------------------------------------------
1 pghost5 192.168.56.50 6001 /app/ogdata/data/dn1 P Primary Normal | 2 pghost6 192.168.56.60 6002 /app/ogdata/data/dn1 S Standby Normal

创建容灾用户

集群1上创建容灾用户:

gsql -d postgres -p 26000 -c "create user dr_user with replication password 'oracle_4U';"

修改XML配置

修改集群1

修改后的xml配置如下:

<?xml version="1.0" encoding="UTF-8"?> > <ROOT> > <CLUSTER> > <PARAM name="clusterName" value="gauss_omm"/> > <PARAM name="gaussdbAppPath" value="/app/opengauss/app/2.0.1"/> > <PARAM name="gaussdbLogPath" value="/app/opengauss/gaussdb_log" /> > <PARAM name="tmpMppdbPath" value="/app/opengauss/tmp"/> > <PARAM name="gaussdbToolPath" value="/app/opengauss/tool"/> > <PARAM name="corePath" value="/app/opengauss/corefile"/> > <PARAM name="backIp1s" value="192.168.56.20,192.168.56.30,192.168.56.40"/> > <PARAM name="nodeNames" value="pghost2,pghost3,pghost4"/> > <PARAM name="clusterType" value="single-inst"/> > </CLUSTER> > <DEVICELIST> > <DEVICE sn="pghost2"> > <PARAM name="name" value="pghost2"/> > <PARAM name="backIp1" value="192.168.56.20"/> > <PARAM name="sshIp1" value="192.168.56.20"/> > <PARAM name="azName" value="F"/> > <PARAM name="azPriority" value="1"/> > <!-- dn --> > <PARAM name="dataNum" value="1"/> > <PARAM name="dataPortBase" value="26000"/> > <PARAM name="dataNode1" value="/app/ogdata/data/dn1,pghost3,/app/ogdata/data/dn1,pghost4,/app/ogdata/data > /dn1"/> > <!-- cm(configuration manager)--> > <PARAM name="cmDir" value="/app/ogdata/data/cm" /> > <PARAM name="cmsNum" value="1" /> > <PARAM name="cmServerPortBase" value="26500" /> > <PARAM name="cmServerlevel" value="1" /> > <PARAM name="cmServerListenIp1" value="192.168.56.20,192.168.56.30,192.168.56.40" /> > <PARAM name="cmServerRelation" value="pghost2,pghost3,pghost4" /> > **<PARAM name="localStreamIpmap1" value="(192.168.56.20,192.168.56.20),(192.168.56.30,192.168.56.30)"/>** > **<PARAM name="remoteStreamIpmap1" value="(192.168.56.50,192.168.56.50),(192.168.56.60,192.168.56.60)"/>** > <PARAM name="remotedataPortBase" value="26000"/> > </DEVICE> > <DEVICE sn="pghost3"> > <PARAM name="name" value="pghost3"/> > <PARAM name="backIp1" value="192.168.56.30"/> > <PARAM name="sshIp1" value="192.168.56.30"/> > <PARAM name="azName" value="F"/> > <PARAM name="azPriority" value="1"/> > <PARAM name="cmDir" value="/app/ogdata/data/cm" /> > </DEVICE> > <DEVICE sn="pghost4"> > <PARAM name="name" value="pghost4"/> > <PARAM name="backIp1" value="192.168.56.40"/> > <PARAM name="sshIp1" value="192.168.56.40"/> > <PARAM name="azName" value="F"/> > <PARAM name="azPriority" value="1"/> > <PARAM name="cmDir" value="/app/ogdata/data/cm" /> > </DEVICE> > </DEVICELIST> > </ROOT>
修改集群2

修改后的xml配置如下

> <?xml version="1.0" encoding="UTF-8"?> > <ROOT> > &nbsp; <CLUSTER> > &nbsp; &nbsp; <PARAM name="clusterName" value="gauss_omm"/> > &nbsp; &nbsp; <PARAM name="gaussdbAppPath" value="/app/opengauss/app/2.0.1"/> > &nbsp; &nbsp; <PARAM name="gaussdbLogPath" value="/app/opengauss/gaussdb_log" /> > &nbsp; &nbsp; <PARAM name="tmpMppdbPath" value="/app/opengauss/tmp"/> > &nbsp; &nbsp; <PARAM name="gaussdbToolPath" value="/app/opengauss/tool"/> > &nbsp; &nbsp; <PARAM name="corePath" value="/app/opengauss/corefile"/> > &nbsp; &nbsp; <PARAM name="backIp1s" value="192.168.56.50,192.168.56.60"/> > &nbsp; &nbsp; <PARAM name="nodeNames" value="pghost5,pghost6"/> > &nbsp; &nbsp; <PARAM name="clusterType" value="single-inst"/> > &nbsp; </CLUSTER> > &nbsp; <DEVICELIST> > &nbsp; &nbsp; <DEVICE sn="pghost5"> > &nbsp; &nbsp; &nbsp; <PARAM name="name" value="pghost5"/> > &nbsp; &nbsp; &nbsp; <PARAM name="backIp1" value="192.168.56.50"/> > &nbsp; &nbsp; &nbsp; <PARAM name="sshIp1" value="192.168.56.50"/> > &nbsp; &nbsp; &nbsp; <PARAM name="azName" value="Y"/> > &nbsp; &nbsp; &nbsp; <PARAM name="azPriority" value="2"/> > &nbsp; &nbsp; &nbsp; <!-- dn --> > &nbsp; &nbsp; &nbsp; <PARAM name="dataNum" value="1"/> > &nbsp; &nbsp; &nbsp; <PARAM name="dataPortBase" value="26000"/> > &nbsp; &nbsp; &nbsp; <PARAM name="dataNode1" value="/app/ogdata/data/dn1,pghost6,/app/ogdata/data/dn1"/> > &nbsp; &nbsp; &nbsp; <!-- cm(configuration manager)--> > &nbsp; &nbsp; &nbsp; <PARAM name="cmDir" value="/app/ogdata/data/cm" /> > &nbsp; &nbsp; &nbsp; <PARAM name="cmsNum" value="1" /> > &nbsp; &nbsp; &nbsp; <PARAM name="cmServerPortBase" value="26500" /> > &nbsp; &nbsp; &nbsp; <PARAM name="cmServerlevel" value="1" /> > &nbsp; &nbsp; &nbsp; <PARAM name="cmServerListenIp1" value="192.168.56.50,192.168.56.60" /> > &nbsp; &nbsp; &nbsp; <PARAM name="cmServerRelation" value="pghost5,pghost6" /> > &nbsp; &nbsp; &nbsp; **<PARAM name="localStreamIpmap1" value="(192.168.56.50,192.168.56.50),(192.168.56.60,192.168.56.60)"/>** > &nbsp; &nbsp; &nbsp; **<PARAM name="remoteStreamIpmap1" value="(192.168.56.20,192.168.56.20),(192.168.56.30,192.168.56.30)"/>** > &nbsp; &nbsp; &nbsp; **<PARAM name="remotedataPortBase" value="26000"/>** > &nbsp; &nbsp; </DEVICE> > &nbsp; &nbsp; <DEVICE sn="pghost6"> > &nbsp; &nbsp; &nbsp; <PARAM name="name" value="pghost6"/> > &nbsp; &nbsp; &nbsp; <PARAM name="backIp1" value="192.168.56.60"/> > &nbsp; &nbsp; &nbsp; <PARAM name="sshIp1" value="192.168.56.60"/> > &nbsp; &nbsp; &nbsp; <PARAM name="azName" value="Y"/> > &nbsp; &nbsp; &nbsp; <PARAM name="azPriority" value="2"/> > &nbsp; &nbsp; &nbsp; <PARAM name="cmDir" value="/app/ogdata/data/cm" /> > &nbsp; &nbsp; </DEVICE> > &nbsp; </DEVICELIST> > </ROOT> 配置容灾

集群1启动为主集群

使用的命令为:

# gs_sdr -t start -m primary -X XMLFILE [-U DR_USERNAME [-W DR_PASSWORD]] [--time-out=SECS]
gs_sdr -t start -m primary -X /home/omm/single.xml -U dr_user -W oracle_4U --time-out=86400

vscode调试配置

{
"version": "0.2.0",
"configurations": [
{
"name": "Python: 当前文件",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true,
"args": ["-t","start","-m","primary","-X","/home/omm/single.xml","-U","dr_user","-W","oracle_4U","--time-out=86400"]
}
]
}

gs_sdr脚本main函数中打上断点

代码阅读

判断是否使用root权限操作
if os.getuid() == 0:
GaussLog.exitWithError(ErrorCode.GAUSS_501["GAUSS_50105"])
# 是root权限就直接报错退出
初始化StreamingDisasterRecoveryBase
base = StreamingDisasterRecoveryBase() # 从集群xml配置文件中加载相 关的信息

base中保存的信息可以参考下图:

86ccfc766e49c4ae277aa1df484da647.jpeg

判断做何种操作
handler = HANDLER_MAPPING[base.params.task](base.params, base.user, base.logger, base.trace_id, base.log_file)
# 这里的 HANDLER_MAPPING 主要包括4种操作。具体如下:
HANDLER_MAPPING = {
"start": StreamingStartHandler, # 这块应该是对应上图中的 moduleName 中的值
"stop": StreamingStopHandler,
"switchover": StreamingSwitchoverHandler,
"failover": StreamingFailoverHandler,
"query": StreamingQueryHandler
}
# 此处的 base.params.task 值为 start ,映射到类 StreamingStartHandler ,该类在文件 streaming_diaster_recovery_start.py 中
创建锁定文件

由于容灾搭建过程涉及到数据同步耗时较长,这里应是为避免多次重复操作。

handler.handle_lock_file(handler.trace_id, 'create') # 该方法在streaming_base.py中定义
# 会生成一个文件:'/app/opengauss/tmp/streaming_lock_cd7eef1a2c1f11ee92b208002716c96f'
判断是否有其他gs_sdr操作
if base.params.task in StreamingConstants.TASK_EXIST_CHECK:
handler.check_streaming_process_is_running() # 有的话,就终止本次操作。
# 'source /home/omm/.bashrc && pssh -t 10 -H pghost2 -H pghost3 "ls /app/opengauss/tmp/streaming_lock_*"' 主要使用该命令
执行操作
进度记录相关操作
handler.run()
self.logger.log("Start create streaming disaster relationship.")
# 创建进度记录文件夹:/app/opengauss/tmp/streaming_cabin(所有节点均创建)
# 进度记录文件:'.streaming_switchover_primary.step'
## 所有的进度记录文件名字如下:
STREAMING_STEP_FILES = {
"start_primary": ".streaming_start_primary.step",
"start_standby": ".streaming_start_standby.step",
"stop": ".streaming_stop.step",
"switchover_primary": ".streaming_switchover_primary.step",
"switchover_standby": ".streaming_switchover_standby.step",
"failover": ".streaming_failover.step",
"query": ".streaming_query.step",
}
检查集群状态
# 检查集群状态
'source /home/omm/.bashrc ; gs_om -t status --all > /app/opengauss/tmp/streaming_cabin/cluster_state_tmp'
判断执行节点是否为主节点

操作需要在主节点上执行。

生成 key_name.key.cipher & key_name.key.rand 文件
export LD_LIBRARY_PATH=/app/opengauss/tool/script/gspylib/clib && source /home/omm/.bashrc && gs_guc generate -S default -o hadr -D '/app/opengauss/app/2.0.1_46134f73/bin' && /bin/chmod 600 /app/opengauss/app/2.0.1_46134f73/bin/hadr.key.cipher && /bin/chmod 600 /app/opengauss/app/2.0.1_46134f73/bin/hadr.key.rand
# 随后会将生成的文件分发到集群中其他节点上。
保存hadr信息到数据库
ALTER GLOBAL CONFIGURATION with(hadr_user_info ='O1hnmUERtm2hfiXGjKjgaCfKq89IgdSzUqCoMGw/yzdaYki1LYTfhHlILmz10IvDTX9fqGNZrcmdX5NmkK+6bw==');
检查是否已经有首备节点

判断是否已经是容灾环境。

检查是否有cm

容灾环境必须要有cm组件。

检查是否在升级中
# 判断/app/opengauss/tmp/binary_upgrade是否存在
写进度文件
$ more /app/opengauss/tmp/streaming_cabin/.streaming_start_primary.step
2_check_cluster_step
common_step_for_streaming_start
# 生成容灾关系json文件 并分发到集群中的其它节点上。
more /app/opengauss/tmp/streaming_cabin/cluster_conf_record
{"remoteClusterConf": {"port": 26500, "shards": [[{"ip": "192.168.56.50", "dataIp": "192.168.56.50"}, {"ip": "1
92.168.56.60", "dataIp": "192.168.56.60"}]]}, "localClusterConf": {"port": 26000, "shards": [[{"ip": "192.168.5
6.20", "dataIp": "192.168.56.20"}, {"ip": "192.168.56.30", "dataIp": "192.168.56.30"}]]}}
修改pg_hba配置
# 拷贝/home/omm/single.xml为/app/opengauss/tmp/streaming_cabin/streaming_config.xml
source /home/omm/.bashrc; python3 '/app/opengauss/tool/script/local/ConfigHba.py' -U omm -X '/app/opengauss/tmp/streaming_cabin/streaming_config.xml' --try-reload
# 会在pg_hba.conf文件中加入:
host all omm 192.168.56.50/32 trust
host all omm 192.168.56.60/32 trust
host replication all 192.168.0.0/16 sha256
复制参数replconninfo相关设置
'source /home/omm/.bashrc; pssh -H pghost3 \'source /home/omm/.bashrc; gs_guc check -Z datanode -D /app/ogdata/data/dn1 -c "replconninfo1"\''

'source /home/omm/.bashrc; pssh -H pghost3 \'source /home/omm/.bashrc; gs_guc check -Z datanode -D /app/ogdata/data/dn1 -c "replconninfo2"\''

'source /home/omm/.bashrc; pssh -H pghost3 "source /home/omm/.bashrc ; gs_guc reload -Z datanode -D /app/ogdata/data/dn1 -c \\"replconninfo1 = \'localhost=192.168.56.30 localport=26001 localheartbeatport=26005 localservice=26004 remotehost=192.168.56.20 remoteport=26001 remoteheartbeatport=26005 remoteservice=26004 iscascade=true iscrossregion=false\'\\""'
等待首备连接

Waiting for the main standby connection.

这里需要在备集群执行下面的命令:

gs_sdr -t start -m disaster_standby -U dr_user -W oracle_4U -X /home/omm/single.xml --time-out=86400 # 此处为方便,直接在终端上执行该命令,没有进行调试。

集群2启动为备集群

gs_sdr -t start -m disaster_standby -U dr_user -W oracle_4U -X /home/omm/single.xml --time-out=86400

vscode调试配置

{
"version": "0.2.0",
"configurations": [
{
"name": "gs_sdr",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true,
"args": ["-t","start","-m","disaster_standby","-X","/home/omm/single.xml","-U","dr_user","-W","oracle_4U","--time-out=86400"]
}
]
}

执行的类: streaming_diaster_recovery_start

代码阅读

Start build key files from remote cluster

备集群会进行build,速度比较慢(与网络环境和数据库大小关系较大)。

source /home/omm/.bashrc; /app/opengauss/app/2.0.1/bin/gs_ctl build -D /app/ogdata/data/dn1 -M standby -b copy_secure_files -U dr_user -P *** -C "localhost=192.168.56.50 localport=26001 remotehost=192.168.56.20 remoteport=26501"

source /home/omm/.bashrc; /app/opengauss/app/2.0.1/bin/gs_ctl build -D /app/ogdata/data/dn1 -M standby -b copy_secure_files -U dr_user -P *** -C "localhost=192.168.56.50 localport=26001 remotehost=192.168.56.30 remoteport=26501"

echo *** /home/omm/.bashrc; /app/opengauss/app/2.0.1/bin/gs_ctl build -D /app/ogdata/data/dn1 -M standby -b copy_secure_files -U dr_user -P *** -C 'localhost=192.168.56.60 localport=26001 remotehost=192.168.56.20 remoteport=26501'" | pssh -s -H pghost6'
copy file from data dir to streaming dir
# 第1个节点
echo "if [ -d \'/app/ogdata/data/dn1/gs_secure_files\' ];then source /home/omm/.bashrc && pscp --trace-id 9f2c898e2c5a11ee850c080027fd3332 -H pghost5 \'/app/ogdata/data/dn1/gs_secure_files\' \'/app/opengauss/tmp/streaming_cabin\' && rm -rf \'/app/ogdata/data/dn1/gs_secure_files\';fi" | pssh -s -H pghost5
# 第2个节点
echo "if [ -d \'/app/ogdata/data/dn1/gs_secure_files\' ];then source /home/omm/.bashrc && pscp --trace-id 9f2c898e2c5a11ee850c080027fd3332 -H pghost5 \'/app/ogdata/data/dn1/gs_secure_files\' \'/app/opengauss/tmp/streaming_cabin\' && rm -rf \'/app/ogdata/data/dn1/gs_secure_files\';fi" | pssh -s -H pghost6
check cluster user consistency

主要检查版本和版本提交号是否一致。

检查安装用户是否一致

设置集群运行模式stream_cluster_run_mode
source /home/omm/.bashrc && gs_guc set -Z datanode -N all -I all -c "stream_cluster_run_mode = \'cluster_standby\'"

source /home/omm/.bashrc && gs_guc set -Z coordinator -N all -I all -c "stream_cluster_run_mode = \'cluster_standby\'"
停止备集群
'/app/opengauss/app/2.0.1_46134f73/bin/cluster_static_config'
再次build集群
source /home/omm/.bashrc; /app/opengauss/app/2.0.1_46134f73/bin/gs_ctl start -D /app/ogdata/data/dn1 -M hadr_main_standby

echo *** /home/omm/.bashrc; /app/opengauss/app/2.0.1_46134f73/bin/gs_ctl build -D /app/ogdata/data/dn1 -M cascade_standby -b standby_full -r 7200 -t 1209600" | pssh -s -t 1209610 -H pghost6
启动集群
source /home/omm/.bashrc ; cm_ctl start -t 604800 # 此时的集群已经是首备和级联备状态了。

查询容灾状态

gs_sdr -t query

主集群

$ gs_sdr -t query
--------------------------------------------------------------------------------
Streaming disaster recovery query 9f658f3a2d0511eebbb208002716c96f
--------------------------------------------------------------------------------
Start streaming disaster query.
Start check archive.
Start check recovery.
Start check RPO & RTO.
Successfully executed streaming disaster recovery query, result:
{'hadr_cluster_stat': 'archive', 'hadr_failover_stat': '', 'hadr_switchover_stat': '', 'RPO': '0', 'RTO': '0'}

备集群

$ gs_sdr -t query
--------------------------------------------------------------------------------
Streaming disaster recovery query ad8afd5c2d0511ee88cf080027fd3332
--------------------------------------------------------------------------------
Start streaming disaster query.
Start check archive.
Start check recovery.
Start check RPO & RTO.
Successfully executed streaming disaster recovery query, result:
{'hadr_cluster_stat': 'restore', 'hadr_failover_stat': '', 'hadr_switchover_stat': '', 'RPO': '', 'RTO': ''}


相关文章:

【经验分享】openGauss容灾集群搭建

gs_sdr命令代码解读 背景 openGauss推出了容灾架构&#xff0c;相比之前的一个集群主从架构&#xff0c;而容灾架构是两个集群间的数据同步。为了更深入了解其原理&#xff0c;本文试图通过阅读gs_sdr命令相关的代码来学习下相关的各种操作。 1.容灾搭建过程可以参考&#xf…...

互联网应用架构的演进(八大架构的演进过程)

文章目录 前言常见概念八大架构演进过程单机架构应用数据分离架构应用服务集群架构读写/主从分离架构冷热分离架构垂直分库架构微服务架构容器编排架构 前言 博主最近在学中间件&#xff0c;理解互联网应用架构的演进过程&#xff0c;对于理解中间件在整体结构中的定位是十分重…...

ROS自学笔记二十六:导航中激光雷达消息

在ROS导航中&#xff0c;激光雷达&#xff08;Laser Scanner&#xff09;通常被用于感知机器人周围的环境&#xff0c;进行障碍物检测和建图&#xff0c;以支持导航。下面是激光雷达的详细介绍以及一个示例&#xff1a; 激光雷达简介&#xff1a; 激光雷达是一种传感器&#…...

分类模型的评价指标

评价指标&#xff1a; 1、准确率 2、精准率 3、召回率 4、f1-Score 5、auc曲线 在了解评价指标在hi前&#xff0c;首先需要了解一种叫做混淆矩阵的东西 混淆矩阵&#xff1a; 真正例TP&#xff1a;本来正确的&#xff0c;分类到正确的类型 伪正例FP&#xff1a;本来是错误的&a…...

第五章 I/O管理 八、缓冲区管理

目录 一、定义 二、缓冲区的作用 三、单缓冲 1、定义&#xff1a; 2、例子1 3、例子2 四、双缓冲 1、定义&#xff1a; 2、例子1&#xff1a; 3、例子2&#xff1a; 五、单缓冲和双缓冲的区别 六、循环缓冲区 1、定义&#xff1a; 七、缓冲池 1、定义&#xff1a;…...

笔记软件推荐!亲测好用的8款笔记软件!

​在以往的生活中&#xff0c;我们都需要用纸和笔做笔记&#xff0c;但随着时代的发展&#xff0c;许多人已经不再选择用这种传统方式&#xff0c;来记录自己重要的笔记了&#xff0c;他们都选择将重要的笔记用软件记录下来&#xff0c;将笔记保存在电脑里&#xff0c;更不容易…...

MPJQueryWrapper 用法

// 创建QueryWrapper对象MPJQueryWrapper<WebEvaluation> queryWrapper new MPJQueryWrapper<>();// 设置要查询的字段queryWrapper.select("u.nick_name", "u.avatar_url").select("wu.nick_name as relayToUserName", "ta.c…...

50元买来的iPhone手机刷机经验

前段时间&#xff0c;家里的iPad被家人误操作&#xff0c;导致iPad变成不可使用状态。自己折腾了半天&#xff0c;没有找到解决办法。没有办法&#xff0c;只好拿到手机维修店去修理,很快就修理好了.其实也很简单--就是对iPad进行了刷机操作。当然我也看到了刷机的方法。今天&a…...

数据结构学习笔记——链式表示中的双链表及循环单/双链表

一、双链表 &#xff08;一&#xff09;双链表的定义 双链表是在单链表结点上增添了一个指针域prior&#xff0c;指针域prior指向当前结点的前驱结点&#xff0c;即此时链表的每个结点中都有两个指针域prior和next&#xff0c;从而可以很容易通过后继结点找到前驱结点&#x…...

DC电源模块去除输出电源中的高频噪声及杂波

BOSHIDA DC电源模块去除输出电源中的高频噪声及杂波 DC电源模块是电路中常用的部件&#xff0c;用于提供电子元器件的工作电源。然而&#xff0c;在使用DC电源模块的过程中&#xff0c;往往会出现一些问题&#xff0c;比如输出电源中产生的高频噪声和杂波。这些问题不仅会影响…...

【驱动开发】注册字符设备使用gpio设备树节点控制led三盏灯的亮灭

注册字符设备使用gpio设备树节点控制led三盏灯的亮灭 设备树&#xff1a; 头文件&#xff1a; #ifndef __HEAD_H__ #define __HEAD_H__ typedef struct {unsigned int MODER;unsigned int OTYPER;unsigned int OSPEEDR;unsigned int PUPDR;unsigned int IDR;unsigned int OD…...

面向制造企业的持续发展,2023数字化工单管理系统创新篇章-亿发

面向制造企业的持续发展&#xff0c;2023数字化工单管理系统开创新篇章-亿发 随着制造业的持续发展&#xff0c;运维工单管理日益成为关键环节&#xff0c;它设计客户管理、设备维护、服务商合作等多个业务领域&#xff0c;对运营效率和服务质量有着重要影响。然而&#xff0c…...

mysql 元数据锁 MDL读锁与MDL写锁

事务一开启事务 begin; select * from tablename;--相当于加了MDL读锁 此时事务2执行alter table tablename add ... --会发生修改阻塞 commit; --提交事务 释放MDL读锁 此时事务二修改成功 如果事务一执行做dml操作&#xff0c;操作期间将加MDL写锁...

批量预处理哨兵2影像

批量预处理哨兵2影像 最近下载70多景哨兵2影像&#xff0c;平均每个影像在cmd中处理时间都需要半个小时。算下来我一景一景手动处理需要37个小时左右&#xff0c;每天在电脑前待8个小时也要4天多&#xff0c;很浪费时间。如果能够批处理&#xff0c;不需要我手动做的话&#x…...

Unity地面交互效果——2、动态法线贴图实现轨迹效果

Unity引擎动态法线贴图制作球滚动轨迹 大家好&#xff0c;我是阿赵。   之前说了一个使用局部UV采样来实现轨迹的方法。这一篇在之前的基础上&#xff0c;使用法线贴图进行凹凸轨迹的绘制。 一、实现的目标 先来回顾一下&#xff0c;上一篇最终我们已经绘制了一个轨迹的贴图…...

视频剪辑达人教您:如何运用嵌套合并技巧制作固定片尾

在视频剪辑的过程中&#xff0c;嵌套合并技巧是一种非常实用的技术&#xff0c;可以帮助您将多个素材叠加在一起&#xff0c;制作出更加丰富多彩的视频。本文将由视频剪辑达人为您详细介绍如何运用云炫AI智剪嵌套合并技巧制作固定片尾&#xff0c;让您的视频剪辑水平更上一层楼…...

【腾讯云 TDSQL-C Serverless 产品体验】TDSQL-C MySQL Serverless最佳实践

一、引言&#xff1a; 随着云计算技术的不断发展&#xff0c;越来越多的企业开始选择将自己的数据库部署在云上&#xff0c;以更好了的支持企业数字化转型以及业务创新&#xff0c;在这个过程中&#xff0c;很多客户会遇到这样一个问题&#xff0c;业务会存在高峰期和低谷期&a…...

SQLyog连接数据库报plugin caching_sha2_password could not be loaded......解决方案

问题描述 问题分析 因为MySQL新版默认使用caching_sha2_password作为身份验证的插件&#xff0c;而旧版本使用的是mysql_native_password。当出现plugin caching_sha2_password could not be loaded报错&#xff0c;我们更换为旧版本 如何解决 先使用cmd命令登录MySQL&a…...

linux应急排查

常用命令 查看登录用户和活动 whoami&#xff1a;显示当前登录用户的用户名。 w&#xff1a;显示当前登录到系统上的用户列表和他们正在执行的命令。 last&#xff1a;显示最近登录到系统的用户列表、登录时间和来源IP地址。 ps aux&#xff1a;列出当前正在运行的所有进程&…...

Apache POI及easyExcel读取及写入excel文件

目录 1.excel 2.使用场景 3.Apache POI 4.easyExcel 5.总结 1.excel excel分为两版&#xff0c;03版和07版。 03版的后缀为xls&#xff0c;最大有65536行。 07版的后缀为xlsx&#xff0c;最大行数没有限制。 2.使用场景 将用户信息导出到excel表格中。 将excel中的数…...

为什么写作

1记录生活&#xff0c;表达自己的想法和情感&#xff0c;提高沟通能力。 2年轻的时候就有写作的意愿&#xff0c;一直未动笔。 3想突破自己看看自己能写到什么程度。锻炼自己更好组织思路&#xff0c;提高逻辑思维能力。 4给自己的生活增添一些爱好&#xff0c;更好地理解和…...

python基于VGG19实现图像风格迁移

目录 1、原理 2、代码实现 1、原理 图像风格迁移是一种将一张图片的内容与另一张图片的风格进行合成的技术。 风格&#xff08;style&#xff09;是指图像中不同空间尺度的纹理、颜色和视觉图案&#xff0c;内容&#xff08;content&#xff09;是指图像的高级宏观结构。 实…...

BoredHackerBlog: Cloud AV RT日记

目录 信息搜集 WEB漏洞攻击 拿shell 信息搜集 首先ifconfig查看自己IP&#xff0c; netdiscover查看同网段下主机 第三个应该是目标靶机。用nmap查看靶机开放端口&#xff1a; 开放22和8080&#xff0c;看看8080开的啥服务 WEB漏洞攻击 看到让我们输入邀请码。有输入框的第…...

数据结构之“初窥门径”

目录 前言&#xff1a; 一&#xff0c;数据结构起源 二&#xff0c;基本概念和术语 2.1数据 2.2数据元素 2.3数据项 2.4数据对象 2.5数据结构 三&#xff0c;逻辑结构与物理结构 3.1逻辑结构 3.1.1集合结构 3.1.2线性结构 3.1.3树形结构 3.1.4图形结构 3.2物理结…...

css:transform实现平移、旋转、缩放、倾斜元素

目录 文档语法示例旋转元素 transform-rotate旋转过渡旋转动画 参考文章 文档 https://developer.mozilla.org/zh-CN/docs/Web/CSS/transform 语法 /* Keyword values */ transform: none;/* Function values */ transform: matrix(1, 2, 3, 4, 5, 6); transform: translate…...

如何理解AutoGPT

AutoGPT和GPT-4都是OpenAI公司的产品。AutoGPT是一个实验性开源应用程序&#xff0c;展示了GPT-4语言模型的能力。GPT-4是OpenAI研发的人工智能语言模型。 AutoGPT在GitHub主页上有151k星&#xff08;151k星代表了151,000个用户点赞了该项目&#xff09;&#xff0c;AutoGPT获…...

【网络知识必知必会】聊聊网络层IP协议

文章目录 前言IP 协议格式总结 前言 在之前的博文中, 我们聊过了传输层中的两个重点协议 TCP 和 UDP, 本文我们再来聊聊网络层中的一个协议IP, 简单认识一下 IP 协议格式. IP 协议与 TCP 协议的复杂度也不妨多让, 不过我们在这里只是简单的聊一聊 IP 协议的报文格式就行, 毕竟…...

66. 加一

给定一个由 整数 组成的 非空 数组所表示的非负整数&#xff0c;在该数的基础上加一。 最高位数字存放在数组的首位&#xff0c; 数组中每个元素只存储单个数字。 你可以假设除了整数 0 之外&#xff0c;这个整数不会以零开头。 示例 1&#xff1a; 输入&#xff1a; digits …...

逻辑(css3)_强制不换行

需求 如上图做一个跑马灯数据&#xff0c;时间、地点、姓名、提示文本字数都不是固定的。 逻辑思想 个人想法是给四个文本均设置宽度&#xff0c;不然会出现不能左对齐的现象。 此时四个文本均左对齐&#xff0c; 垂直排列样式也比较好看&#xff0c;但是出现一个缺点&#…...

营收净利双降、股价下跌四成,敷尔佳带伤闯关“双11”

今年双11预售已经开启&#xff0c;敷尔佳在天猫、抖音等电商平台火热营销&#xff1b;营销热业绩冷&#xff0c;敷尔佳的三季报不及预期。 10月23日&#xff0c;哈尔滨敷尔佳科技发展有限公司(下称“敷尔佳”&#xff0c;301371SZ)公布2023年三季报&#xff0c;其三季度营收净…...