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

卸载apt-get 安装的PostgreSQL版本

文章目录

  • 卸载apt-get 安装的PostgreSQL版本
    • 查找已安装的PostgreSQL包
    • 卸载PostgreSQL:
    • 检查并删除残留文件
    • 验证卸载

卸载apt-get 安装的PostgreSQL版本

卸载通过apt-get安装的PostgreSQL 就版本,可以按照以下步骤进行。

查找已安装的PostgreSQL包

在卸载之前,建议先查找并确认已安装的PostgreSQL包及其版本。
可以使用以下命令来查找与PostgreSQL相关的所有已安装包:

dpkg -l | grep postgresql

例:

root@autodl-container-616f40a3b3-41cb82d9:~# dpkg -l | grep postgresql
ii  postgresql                    10+190ubuntu0.1     all                 object-relational SQL database (supported version)
ii  postgresql-10                 10.23-0ubuntu0.18.0 amd64               object-relational SQL database, version 10 server
ii  postgresql-client             10+190ubuntu0.1     all                 front-end programs for PostgreSQL (supported version)
ii  postgresql-client-10          10.23-0ubuntu0.18.0 amd64               front-end programs for PostgreSQL 10
ii  postgresql-client-common      190ubuntu0.1        all                 manager for multiple PostgreSQL client versions
ii  postgresql-common             190ubuntu0.1        all                 PostgreSQL database-cluster manager
ii  postgresql-server-dev-10      10.23-0ubuntu0.18.0 amd64               development files for PostgreSQL 10 server-side programming
ii  postgresql-server-dev-all     190ubuntu0.1        all                 extension build tool for multiple PostgreSQL versions

卸载PostgreSQL:

使用apt-get的–purge remove选项来卸载PostgreSQL及其配置文件。
通常apt-get卸载时不需要指定小版本号,因为它会卸载所有相关的PostgreSQL包。
不过,如果出于某种原因你需要更精确地指定版本,可能需要查找确切的包名(这通常包括版本号)。但大多数情况下,以下命令就足够了:

sudo apt-get --purge remove postgresql*

这个命令会卸载所有以“postgresql”开头的包,包括PostgreSQL服务器、客户端库、文档等。–purge选项会同时删除配置文件。

例:

root@autodl-container-616f40a3b3-41cb82d9:/usr/lib/postgresql# cd ~
root@autodl-container-616f40a3b3-41cb82d9:~# apt-get --purge remove postgresql*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'postgresql-10-pgrouting' for glob 'postgresql*'
Note, selecting 'postgresql-common' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgrouting-doc' for glob 'postgresql*'
Note, selecting 'postgresql-10-repmgr' for glob 'postgresql*'
Note, selecting 'postgresql-9.2-repmgr' for glob 'postgresql*'
Note, selecting 'postgresql-10-dirtyread' for glob 'postgresql*'
Note, selecting 'postgresql-pltcl' for glob 'postgresql*'
Note, selecting 'postgresql-10-asn1oid' for glob 'postgresql*'
Note, selecting 'postgresql-contrib-10' for glob 'postgresql*'
Note, selecting 'postgresql-server-dev-all' for glob 'postgresql*'
Note, selecting 'postgresql-plv8' for glob 'postgresql*'
Note, selecting 'postgresql-10-postgis-2.2-scripts' for glob 'postgresql*'
Note, selecting 'postgresql-10-unit' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgfincore' for glob 'postgresql*'
Note, selecting 'postgresql-10-prioritize' for glob 'postgresql*'
Note, selecting 'postgresql-10-postgis-scripts' for glob 'postgresql*'
Note, selecting 'postgresql-10-pldebugger' for glob 'postgresql*'
Note, selecting 'postgresql-10-mimeo' for glob 'postgresql*'
Note, selecting 'postgresql-9.5-repmgr' for glob 'postgresql*'
Note, selecting 'postgresql-10-python3-multicorn' for glob 'postgresql*'
Note, selecting 'postgresql-10-bgw-replstatus' for glob 'postgresql*'
Note, selecting 'postgresql-10-postgis-2.4' for glob 'postgresql*'
Note, selecting 'postgresql-10-amcheck' for glob 'postgresql*'
Note, selecting 'postgresql-10-jsquery' for glob 'postgresql*'
Note, selecting 'postgresql-filedump' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgmemcache' for glob 'postgresql*'
Note, selecting 'postgresql-10-postgis-2.4-scripts' for glob 'postgresql*'
Note, selecting 'postgresql-10-ogr-fdw' for glob 'postgresql*'
Note, selecting 'postgresql-10-pglogical' for glob 'postgresql*'
Note, selecting 'postgresql-10-postgis-2.3-scripts' for glob 'postgresql*'
Note, selecting 'postgresql-python3-multicorn' for glob 'postgresql*'
Note, selecting 'postgresql-postgis-java' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgrouting-scripts' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgsphere' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgtap' for glob 'postgresql*'
Note, selecting 'postgresql-doc-10' for glob 'postgresql*'
Note, selecting 'postgresql-python-multicorn' for glob 'postgresql*'
Note, selecting 'postgresql-10-cron' for glob 'postgresql*'
Note, selecting 'postgresql-all' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgmp' for glob 'postgresql*'
Note, selecting 'postgresql-9.3-repmgr' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgq3' for glob 'postgresql*'
Note, selecting 'postgresql-10-plproxy' for glob 'postgresql*'
Note, selecting 'postgresql-7.4' for glob 'postgresql*'
Note, selecting 'postgresql-9.0-repmgr' for glob 'postgresql*'
Note, selecting 'postgresql-doc' for glob 'postgresql*'
Note, selecting 'postgresql-8.0' for glob 'postgresql*'
Note, selecting 'postgresql-10-debversion' for glob 'postgresql*'
Note, selecting 'postgresql-10' for glob 'postgresql*'
Note, selecting 'postgresql-10-q3c' for glob 'postgresql*'
Note, selecting 'postgresql-10-prefix' for glob 'postgresql*'
Note, selecting 'postgresql-10-slony1-2' for glob 'postgresql*'
Note, selecting 'postgresql-pgtap' for glob 'postgresql*'
Note, selecting 'postgresql-9.1' for glob 'postgresql*'
Note, selecting 'postgresql-9.3' for glob 'postgresql*'
Note, selecting 'postgresql-9.4' for glob 'postgresql*'
Note, selecting 'postgresql-9.5' for glob 'postgresql*'
Note, selecting 'postgresql-9.6' for glob 'postgresql*'
Note, selecting 'postgresql-10-plr' for glob 'postgresql*'
Note, selecting 'postgresql-client' for glob 'postgresql*'
Note, selecting 'postgresql-10-citus' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgextwlist' for glob 'postgresql*'
Note, selecting 'postgresql-10-plsh' for glob 'postgresql*'
Note, selecting 'postgresql-10-plv8' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgaudit' for glob 'postgresql*'
Note, selecting 'postgresql-plperl' for glob 'postgresql*'
Note, selecting 'postgresql-10-mysql-fdw' for glob 'postgresql*'
Note, selecting 'postgresql-9.6-repmgr' for glob 'postgresql*'
Note, selecting 'postgresql-10-rum' for glob 'postgresql*'
Note, selecting 'postgresql-hll' for glob 'postgresql*'
Note, selecting 'postgresql' for glob 'postgresql*'
Note, selecting 'postgresql-10-ip4r' for glob 'postgresql*'
Note, selecting 'postgresql-10-powa' for glob 'postgresql*'
Note, selecting 'postgresql-contrib' for glob 'postgresql*'
Note, selecting 'postgresql-10-slony1' for glob 'postgresql*'
Note, selecting 'postgresql-plpython3' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgq-node' for glob 'postgresql*'
Note, selecting 'postgresql-server' for glob 'postgresql*'
Note, selecting 'postgresql-q3c' for glob 'postgresql*'
Note, selecting 'postgresql-plpython' for glob 'postgresql*'
Note, selecting 'postgresql-plr' for glob 'postgresql*'
Note, selecting 'postgresql-10-partman' for glob 'postgresql*'
Note, selecting 'postgresql-autodoc' for glob 'postgresql*'
Note, selecting 'postgresql-10-orafce' for glob 'postgresql*'
Note, selecting 'postgresql-10-pllua' for glob 'postgresql*'
Note, selecting 'postgresql-pltcl-10' for glob 'postgresql*'
Note, selecting 'postgresql-10-repack' for glob 'postgresql*'
Note, selecting 'postgresql-10-preprepare' for glob 'postgresql*'
Note, selecting 'postgresql-comparator' for glob 'postgresql*'
Note, selecting 'postgresql-9.4-repmgr' for glob 'postgresql*'
Note, selecting 'postgresql-pgsphere' for glob 'postgresql*'
Note, selecting 'postgresql-server-dev-10' for glob 'postgresql*'
Note, selecting 'postgresql-plperl-10' for glob 'postgresql*'
Note, selecting 'postgresql-9.1-repmgr' for glob 'postgresql*'
Note, selecting 'postgresql-10-similarity' for glob 'postgresql*'
Note, selecting 'postgresql-client-10' for glob 'postgresql*'
Note, selecting 'postgresql-plpython-10' for glob 'postgresql*'
Note, selecting 'postgresql-plpython3-10' for glob 'postgresql*'
Note, selecting 'postgresql-client-common' for glob 'postgresql*'
Note, selecting 'postgresql-10-python-multicorn' for glob 'postgresql*'
Note, selecting 'postgresql-10' instead of 'postgresql-contrib-10'
Package 'postgresql-7.4' is not installed, so not removed
Package 'postgresql-8.0' is not installed, so not removed
Package 'postgresql-9.1' is not installed, so not removed
Note, selecting 'postgresql-plperl-10' instead of 'postgresql-plperl'
Note, selecting 'postgresql-plpython-10' instead of 'postgresql-plpython'
Note, selecting 'postgresql-plpython3-10' instead of 'postgresql-plpython3'
Note, selecting 'postgresql-pltcl-10' instead of 'postgresql-pltcl'
Package 'postgresql-9.3' is not installed, so not removed
Package 'postgresql-9.4' is not installed, so not removed
Package 'postgresql-9.5' is not installed, so not removed
Package 'postgresql-9.6' is not installed, so not removed
Note, selecting 'postgresql-10-plr' instead of 'postgresql-plr'
Package 'postgresql-server' is not installed, so not removed
Package 'postgresql-postgis-java' is not installed, so not removed
Note, selecting 'postgresql-10-pgtap' instead of 'postgresql-pgtap'
Note, selecting 'postgresql-10-plv8' instead of 'postgresql-plv8'
Package 'postgresql-10-postgis-2.2-scripts' is not installed, so not removed
Package 'postgresql-10-postgis-2.3-scripts' is not installed, so not removed
Note, selecting 'postgresql-10-python-multicorn' instead of 'postgresql-python-multicorn'
Note, selecting 'postgresql-10-python3-multicorn' instead of 'postgresql-python3-multicorn'
Note, selecting 'postgresql-10-slony1-2' instead of 'postgresql-10-slony1'
Note, selecting 'postgresql-pgsphere' instead of 'postgresql-10-pgsphere'
Note, selecting 'postgresql-q3c' instead of 'postgresql-10-q3c'
Package 'postgresql-9.6-repmgr' is not installed, so not removed
Package 'postgresql-9.5-repmgr' is not installed, so not removed
Package 'postgresql-9.4-repmgr' is not installed, so not removed
Package 'postgresql-9.3-repmgr' is not installed, so not removed
Package 'postgresql-9.2-repmgr' is not installed, so not removed
Package 'postgresql-9.1-repmgr' is not installed, so not removed
Package 'postgresql-9.0-repmgr' is not installed, so not removed
Package 'postgresql-10-amcheck' is not installed, so not removed
Package 'postgresql-10-asn1oid' is not installed, so not removed
Package 'postgresql-10-bgw-replstatus' is not installed, so not removed
Package 'postgresql-10-citus' is not installed, so not removed
Package 'postgresql-10-cron' is not installed, so not removed
Package 'postgresql-10-debversion' is not installed, so not removed
Package 'postgresql-10-dirtyread' is not installed, so not removed
Package 'postgresql-10-ip4r' is not installed, so not removed
Package 'postgresql-10-jsquery' is not installed, so not removed
Package 'postgresql-10-mimeo' is not installed, so not removed
Package 'postgresql-10-mysql-fdw' is not installed, so not removed
Package 'postgresql-10-ogr-fdw' is not installed, so not removed
Package 'postgresql-10-orafce' is not installed, so not removed
Package 'postgresql-10-partman' is not installed, so not removed
Package 'postgresql-10-pgaudit' is not installed, so not removed
Package 'postgresql-10-pgextwlist' is not installed, so not removed
Package 'postgresql-10-pgfincore' is not installed, so not removed
Package 'postgresql-10-pglogical' is not installed, so not removed
Package 'postgresql-10-pgmemcache' is not installed, so not removed
Package 'postgresql-10-pgmp' is not installed, so not removed
Package 'postgresql-10-pgrouting' is not installed, so not removed
Package 'postgresql-10-pgrouting-doc' is not installed, so not removed
Package 'postgresql-10-pgrouting-scripts' is not installed, so not removed
Package 'postgresql-10-pgtap' is not installed, so not removed
Package 'postgresql-10-pldebugger' is not installed, so not removed
Package 'postgresql-10-pllua' is not installed, so not removed
Package 'postgresql-10-plproxy' is not installed, so not removed
Package 'postgresql-10-plr' is not installed, so not removed
Package 'postgresql-10-plsh' is not installed, so not removed
Package 'postgresql-10-plv8' is not installed, so not removed
Package 'postgresql-10-postgis-2.4' is not installed, so not removed
Package 'postgresql-10-postgis-2.4-scripts' is not installed, so not removed
Package 'postgresql-10-postgis-scripts' is not installed, so not removed
Package 'postgresql-10-powa' is not installed, so not removed
Package 'postgresql-10-prefix' is not installed, so not removed
Package 'postgresql-10-preprepare' is not installed, so not removed
Package 'postgresql-10-prioritize' is not installed, so not removed
Package 'postgresql-10-python-multicorn' is not installed, so not removed
Package 'postgresql-10-python3-multicorn' is not installed, so not removed
Package 'postgresql-10-repack' is not installed, so not removed
Package 'postgresql-10-repmgr' is not installed, so not removed
Package 'postgresql-10-rum' is not installed, so not removed
Package 'postgresql-10-similarity' is not installed, so not removed
Package 'postgresql-10-slony1-2' is not installed, so not removed
Package 'postgresql-10-unit' is not installed, so not removed
Package 'postgresql-autodoc' is not installed, so not removed
Package 'postgresql-comparator' is not installed, so not removed
Package 'postgresql-filedump' is not installed, so not removed
Package 'postgresql-hll' is not installed, so not removed
Package 'postgresql-pgsphere' is not installed, so not removed
Package 'postgresql-q3c' is not installed, so not removed
Package 'postgresql-contrib' is not installed, so not removed
Package 'postgresql-doc' is not installed, so not removed
Package 'postgresql-doc-10' is not installed, so not removed
Package 'postgresql-plperl-10' is not installed, so not removed
Package 'postgresql-plpython-10' is not installed, so not removed
Package 'postgresql-plpython3-10' is not installed, so not removed
Package 'postgresql-pltcl-10' is not installed, so not removed
Package 'postgresql-10-pgq-node' is not installed, so not removed
Package 'postgresql-10-pgq3' is not installed, so not removed
Package 'postgresql-all' is not installed, so not removed
The following packages were automatically installed and are no longer required:cron dctrl-tools distro-info-data iproute2 libatm1 libmnl0 libpq-dev libxslt1.1 libxtables12 logrotate lsb-release ssl-cert sysstat
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:postgresql* postgresql-10* postgresql-client* postgresql-client-10* postgresql-client-common* postgresql-common*postgresql-server-dev-10* postgresql-server-dev-all*
0 upgraded, 0 newly installed, 8 to remove and 169 not upgraded.
After this operation, 26.5 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 45376 files and directories currently installed.)
Removing postgresql (10+190ubuntu0.1) ...
Removing postgresql-10 (10.23-0ubuntu0.18.04.2) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of stop.
Removing postgresql-client (10+190ubuntu0.1) ...
Removing postgresql-client-10 (10.23-0ubuntu0.18.04.2) ...
Removing postgresql-server-dev-all (190ubuntu0.1) ...
Removing postgresql-server-dev-10 (10.23-0ubuntu0.18.04.2) ...
Removing postgresql-common (190ubuntu0.1) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of stop.
Removing 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common'
Removing postgresql-client-common (190ubuntu0.1) ...
(Reading database ... 43895 files and directories currently installed.)
Purging configuration files for postgresql-10 (10.23-0ubuntu0.18.04.2) ...
Dropping cluster main...
Purging configuration files for postgresql-client-common (190ubuntu0.1) ...
dpkg: warning: while removing postgresql-client-common, directory '/etc/postgresql-common' not empty so not removed
Purging configuration files for postgresql-common (190ubuntu0.1) ...
dpkg: warning: while removing postgresql-common, directory '/var/lib/postgresql' not empty so not removed
root@autodl-container-616f40a3b3-41cb82d9:~# 

检查并删除残留文件

卸载后,你可能还想检查并手动删除PostgreSQL可能留下的任何残留文件或目录。
这通常包括/etc/postgresql/(配置文件)和/var/lib/postgresql/(数据文件)目录。

例:

root@autodl-container-616f40a3b3-41cb82d9:~# ls -l /etc/postgresql-common
ls: cannot access '/etc/postgresql-common': No such file or directory
root@autodl-container-616f40a3b3-41cb82d9:~# ls -l /var/lib/postgresql
total 31864
-rw------- 1 postgres postgres     2812 Sep 28 08:56 logfile
drwxrwxr-x 7 postgres postgres      111 Sep 26 22:16 pgsql16
drwxrwxr-x 7 postgres postgres     4096 Sep 27 21:46 pgvector
drwxrwxr-x 6 postgres postgres     4096 Sep 26 21:30 postgresql-16.3
-rw-rw-r-- 1 postgres postgres 32616059 May  7 04:31 postgresql-16.3.tar.gz
root@autodl-container-616f40a3b3-41cb82d9:~# 

但是,由于–purge选项已经尝试删除了配置文件,这些目录可能已经被清空或不存在了。

验证卸载

可以使用dpkg -l | grep postgresql命令再次检查,以确保没有留下任何与PostgreSQL相关的包。
如果命令没有返回任何内容,说明PostgreSQL已经被成功卸载。

root@autodl-container-616f40a3b3-41cb82d9:~# dpkg -l | grep postgresql
root@autodl-container-616f40a3b3-41cb82d9:~# 

按照上述步骤操作后,你应该已经成功卸载了通过apt-get安装的PostgreSQL 10.23版本。

相关文章:

卸载apt-get 安装的PostgreSQL版本

文章目录 卸载apt-get 安装的PostgreSQL版本查找已安装的PostgreSQL包卸载PostgreSQL:检查并删除残留文件验证卸载 卸载apt-get 安装的PostgreSQL版本 卸载通过apt-get安装的PostgreSQL 就版本,可以按照以下步骤进行。 查找已安装的PostgreSQL包 在卸…...

低代码用户中心:构建高效便捷的用户管理平台

什么是低代码用户中心? 低代码用户中心是一种利用低代码开发平台构建的用户管理系统,允许企业快速创建、部署和管理用户信息、权限及互动记录。通过可视化界面和预置组件,企业可以在短时间内实现灵活的用户管理解决方案,而无需编…...

3款免费的GPT类工具

前言 随着科技的飞速发展,人工智能(AI)的崛起与发展已经成为我们生活中不可或缺的一部分。它的出现彻底改变了我们与世界互动的方式,并为各行各业带来了前所未有的便利。 一、Kimi 网址:点我前往 国产AI模型Kimi是一…...

Mixture-of-Experts (MoE): 条件计算的诞生与崛起【上篇】

大型语言模型(LLM)的现代进步主要是缩放定律的产物[6]。 假设模型是在足够大的数据集上训练出来的,那么随着底层模型规模的增加,我们会看到性能的平滑提升。 这种扩展规律最终促使我们创建了 GPT-3 以及随后的其他(更强…...

【算法】分治:归并排序之LCR 170.交易逆序对的总数(hard)

系列专栏 双指针 模拟算法 分治思想 目录 1、题目链接 2、题目介绍 3、解法 4、代码 1、题目链接 LCR 159. 库存管理 III - 力扣(LeetCode) 2、题目介绍 在股票交易中,如果前一天的股价高于后一天的股价,则可以认为存在一…...

2024.9.28 作业+思维导图

widget.cpp #include "widget.h"Widget::Widget(QWidget *parent): QWidget(parent) {this->setFixedSize(320,448);this->setWindowFlag(Qt::FramelessWindowHint);//QPushButtonQPushButton *PushButton1 new QPushButton("登录",this);PushButto…...

树莓派外挂Camera(基操)(TODO)

(TODO) 手上有OV5647,OV2640,看这次能不能驱动吧。。。 树莓派3B CSI摄像头配置-阿里云开发者社区 你可以使用树莓派3B的CSI接口连接相机模块。首先,确保相机模块正确连接到CSI接口。然后,使用raspi-config…...

讯飞星火编排创建智能体学习(二)决策节点

目录 概述 决策节点 文生图节点 连接节点 测试结果 概述 在上一篇博文讯飞星火编排创建智能体学习(一)最简单的智能体构建-CSDN博客,我介绍了编排创作智能体,这篇来介绍一下“决策节点”。 决策节点 在编排创作智能体中&…...

YOLOv5改进:Unified-loU,用于高品质目标检测的统一loU ,2024年8月最新IoU

💡💡💡现有IoU问题点:IoU (Intersection over Union)作为模型训练的关键,极大地显示了当前预测框与Ground Truth框之间的差异。后续研究者不断在IoU中加入更多的考虑因素,如中心距离、纵横比等。然而,仅仅提炼几何差异是有上限的;而且新的对价指数与借据本身存在潜在…...

力扣 简单 112.路径总和

文章目录 题目介绍题解 题目介绍 题解 class Solution {public boolean hasPathSum(TreeNode root, int targetSum) {// 只在最开始的时候判断树是否为空if (root null) {return false;}targetSum - root.val;if (root.left null && root.right null) { // root 是…...

OpenMV与STM32通信全面指南

目录 引言 一、OpenMV和STM32简介 1.1 OpenMV简介 1.2 STM32简介 二、通信协议概述 三、硬件连接 3.1 硬件准备 3.2 引脚连接 四、软件环境搭建 4.1 OpenMV IDE安装 4.2 STM32开发环境 五、UART通信实现 5.1 OpenMV端编程 5.2 STM32端编程 六、SPI通信实现 6.1 …...

Python库matplotlib之二

Python库matplotlib之二 figureAxessubplot figure matplotlib.pyplot.figure(numNone, figsizeNone, dpiNone, facecolorNone, edgecolorNone, frameonTrue, FigureClass<class ‘matplotlib.figure.Figure’>, clearFalse, **kwargs) num&#xff0c;int 或 str 或 fi…...

DAY17||654.最大二叉树 |617.合并二叉树 |700.二叉搜索树中的搜索 |

654.最大二叉树 题目&#xff1a;654. 最大二叉树 - 力扣&#xff08;LeetCode&#xff09; 给定一个不含重复元素的整数数组。一个以此数组构建的最大二叉树定义如下&#xff1a; 二叉树的根是数组中的最大元素。左子树是通过数组中最大值左边部分构造出的最大二叉树。右子树…...

读构建可扩展分布式系统:方法与实践16读后总结与感想兼导读

1. 基本信息 构建可扩展分布式系统&#xff1a;方法与实践 [美]伊恩戈顿(Ian Gorton)著 机械工业出版社,2024年5月出版 1.1. 读薄率 书籍总字数188千字&#xff0c;笔记总字数49688字。 读薄率49688188000≈26.4% 1.2. 读厚方向 设计模式&#xff1a;可复用面向对象软件的…...

Anaconda 安装

目录 - [简介](#简介) - [安装Anaconda](#安装anaconda) - [启动Anaconda Navigator](#启动anaconda-navigator) - [创建环境](#创建环境) - [管理包](#管理包) - [常用命令行操作](#常用命令行操作) - [Jupyter Notebook 快速入门](#jupyter-notebook-快速入门) - [结…...

优雅使用 MapStruct 进行类复制

前言 在项目中&#xff0c;常常会遇到从数据库读取数据后不能直接返回给前端展示的情况&#xff0c;因为还需要对字段进行加工&#xff0c;比如去除时间戳记录、隐藏敏感数据等。传统的处理方式是创建一个新类&#xff0c;然后编写大量的 get/set 方法进行赋值&#xff0c;若字…...

第19周JavaWeb编程实战-MyBatis实现OA系统 1-OA系统

办公OA系统项目开发 课程简介 本课程将通过慕课办公OA平台的开发&#xff0c;讲解实际项目开发中必须掌握的技能和设计技巧。课程分为三个主要阶段&#xff1a; 需求说明及环境准备&#xff1a; 基于RBAC的访问控制模块开发&#xff1a; 多级请假审批流程开发&#xff1a; …...

仿黑神话悟空跑动-脚下波纹特效(键盘wasd控制走动)

vue使用three.js实现仿黑神话悟空跑动-脚下波纹特效 玩家角色的正面始终朝向鼠标方向&#xff0c;且在按下 W 键时&#xff0c;玩家角色会朝着鼠标方向前进 空格建跳跃 <template><div ref"container" class"container" click"onClick"…...

`torch.utils.data`模块

在PyTorch中&#xff0c;torch.utils.data模块提供了许多有用的工具来处理和加载数据。以下是对您提到的DataLoader, Subset, BatchSampler, SubsetRandomSampler, 和 SequentialSampler的详细解释以及使用示例。 1. DataLoader DataLoader是PyTorch中用于加载数据的一个非常…...

深入理解 `strncat()` 函数:安全拼接字符串

目录&#xff1a; 前言一、 strncat() 函数的基本用法二、 示例代码三、 strncat() 与 strcat() 的区别四、 注意事项五、 实际应用场景总结 前言 在C语言中&#xff0c;字符串操作是编程中非常常见的需求。strncat() 函数是标准库中用于字符串拼接的一个重要函数&#xff0c;…...

React第五十七节 Router中RouterProvider使用详解及注意事项

前言 在 React Router v6.4 中&#xff0c;RouterProvider 是一个核心组件&#xff0c;用于提供基于数据路由&#xff08;data routers&#xff09;的新型路由方案。 它替代了传统的 <BrowserRouter>&#xff0c;支持更强大的数据加载和操作功能&#xff08;如 loader 和…...

深入理解JavaScript设计模式之单例模式

目录 什么是单例模式为什么需要单例模式常见应用场景包括 单例模式实现透明单例模式实现不透明单例模式用代理实现单例模式javaScript中的单例模式使用命名空间使用闭包封装私有变量 惰性单例通用的惰性单例 结语 什么是单例模式 单例模式&#xff08;Singleton Pattern&#…...

CocosCreator 之 JavaScript/TypeScript和Java的相互交互

引擎版本&#xff1a; 3.8.1 语言&#xff1a; JavaScript/TypeScript、C、Java 环境&#xff1a;Window 参考&#xff1a;Java原生反射机制 您好&#xff0c;我是鹤九日&#xff01; 回顾 在上篇文章中&#xff1a;CocosCreator Android项目接入UnityAds 广告SDK。 我们简单讲…...

CMake 从 GitHub 下载第三方库并使用

有时我们希望直接使用 GitHub 上的开源库,而不想手动下载、编译和安装。 可以利用 CMake 提供的 FetchContent 模块来实现自动下载、构建和链接第三方库。 FetchContent 命令官方文档✅ 示例代码 我们将以 fmt 这个流行的格式化库为例,演示如何: 使用 FetchContent 从 GitH…...

深入解析C++中的extern关键字:跨文件共享变量与函数的终极指南

&#x1f680; C extern 关键字深度解析&#xff1a;跨文件编程的终极指南 &#x1f4c5; 更新时间&#xff1a;2025年6月5日 &#x1f3f7;️ 标签&#xff1a;C | extern关键字 | 多文件编程 | 链接与声明 | 现代C 文章目录 前言&#x1f525;一、extern 是什么&#xff1f;&…...

多种风格导航菜单 HTML 实现(附源码)

下面我将为您展示 6 种不同风格的导航菜单实现&#xff0c;每种都包含完整 HTML、CSS 和 JavaScript 代码。 1. 简约水平导航栏 <!DOCTYPE html> <html lang"zh-CN"> <head><meta charset"UTF-8"><meta name"viewport&qu…...

Go 并发编程基础:通道(Channel)的使用

在 Go 中&#xff0c;Channel 是 Goroutine 之间通信的核心机制。它提供了一个线程安全的通信方式&#xff0c;用于在多个 Goroutine 之间传递数据&#xff0c;从而实现高效的并发编程。 本章将介绍 Channel 的基本概念、用法、缓冲、关闭机制以及 select 的使用。 一、Channel…...

深度剖析 DeepSeek 开源模型部署与应用:策略、权衡与未来走向

在人工智能技术呈指数级发展的当下&#xff0c;大模型已然成为推动各行业变革的核心驱动力。DeepSeek 开源模型以其卓越的性能和灵活的开源特性&#xff0c;吸引了众多企业与开发者的目光。如何高效且合理地部署与运用 DeepSeek 模型&#xff0c;成为释放其巨大潜力的关键所在&…...

云原生周刊:k0s 成为 CNCF 沙箱项目

开源项目推荐 HAMi HAMi&#xff08;原名 k8s‑vGPU‑scheduler&#xff09;是一款 CNCF Sandbox 级别的开源 K8s 中间件&#xff0c;通过虚拟化 GPU/NPU 等异构设备并支持内存、计算核心时间片隔离及共享调度&#xff0c;为容器提供统一接口&#xff0c;实现细粒度资源配额…...

Python实现简单音频数据压缩与解压算法

Python实现简单音频数据压缩与解压算法 引言 在音频数据处理中&#xff0c;压缩算法是降低存储成本和传输效率的关键技术。Python作为一门灵活且功能强大的编程语言&#xff0c;提供了丰富的库和工具来实现音频数据的压缩与解压。本文将通过一个简单的音频数据压缩与解压算法…...