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

Ubuntu系统配置SonarQube + cppcheck + Jenkins

SonarQube

    • 1. postgresql安装及配置
      • 1.1 安装postgresql
      • 1.2 创建sonarqube用户
      • 1.3 设置数据库
    • 2. 安装sonarqube
      • 2.1 设置sonarqube
      • 2.2 修改sonarqube目录权限
      • 2.3 sonar.properties
      • 2.4 设置systemd管理sonarqube
      • 2.5 web
    • 3. 配置sonarscanner
      • 3.1 下载
      • 3.2 配置
    • 4. 配置cppcheck
      • 4.1 下载安装cppcheck
      • 4.2 遇到的问题
      • 4.3 配置sonarqube
      • 4.4 测试
    • 5. 配置gitlab
      • 5.1 搭建私人gitlab
      • 5.2 获取gitlab信息
    • 6. 配置jenkins
      • 6.1 安装jenkins
      • 6.2 配置
      • 6.3 创建项目
      • 6.4 运行
      • 6.5 查看报告

在ubuntu 20.04搭建SonarQube

我们需要安装或配置的服务包括:

  1. postgresql
  2. sonarqube
  3. sonarscanner
  4. cppcheck
  5. gitlab
  6. jenkins

由于笔者在公司服务器进行搭建,该服务器除了配置好网络之外,其他内容都没有配置

  1. 配置域名解析
csmp@csmp-OptiPlex-7090:/etc/postgresql/12/main$ cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 114.114.114.114
  1. 更新资源
apt-get update
  1. 重置root密码
csmp@csmp-OptiPlex-7090:/etc/postgresql/12/main$ sudo passwd
新的 密码:
重新输入新的 密码:
passwd:已成功更新密码
csmp@csmp-OptiPlex-7090:/etc/postgresql/12/main$ su
密码:
root@csmp-OptiPlex-7090:/etc/postgresql/12/main#

1. postgresql安装及配置

1.1 安装postgresql

sudo apt install -y  postgresql
systemctl start postgresql
systemctl status postgresql
systemctl enable postgresql

1.2 创建sonarqube用户

# sudo ln -s  sonarqube-9.5.0.56709 sonarqube
# groupadd -g 2023 -o -r sonarqube
# useradd -M -N -g sonarqube -o -r -d /opt/sonarqube -s /bin/false -c "sonarqube server" -u 2023  sonarqube

1.3 设置数据库

链接数据库

csmp@csmp-OptiPlex-7090:/etc/postgresql/12/main$ sudo -u postgres psql
[sudo] csmp 的密码:
psql (12.14 (Ubuntu 12.14-0ubuntu0.20.04.1))
Type "help" for help.postgres=#

创建数据库sonar

postgres=# create database sonar;     # 创建数据库
CREATE DATABASE
postgres=# create user sonar with encrypted password 'sonar';  # 创建用户并设置密码
CREATE ROLE
postgres=# grant all privileges on database sonar to sonar;  # 授权用户
GRANT
postgres=# alter database sonar owner to sonar;   # 执行变更
ALTER DATABASE

查看数据库sonar

postgres=# \l sonar;List of databasesName  | Owner | Encoding |   Collate   |    Ctype    | Access privileges
-------+-------+----------+-------------+-------------+-------------------sonar | sonar | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 | =Tc/sonar        +|       |          |             |             | sonar=CTc/sonar
(1 row)

连接数据库sonar

root@csmp-OptiPlex-7090:/etc/postgresql/12/main# su - postgres -c " psql -U sonar -d sonar  -h 127.0.0.1 -p 5432 "
Password for user sonar:
psql (12.14 (Ubuntu 12.14-0ubuntu0.20.04.1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.sonar=>

2. 安装sonarqube

下载sonarqube

# wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-9.9.0.65466.zip

2.1 设置sonarqube

解压sonarqube

# unzip sonarqube-9.9.0.65466.zip -d /data/apps/sonarqube
# ln -sv /data/apps/sonarqube/sonarqube-9.9.0.65466.zip/ /opt/sonarqube

2.2 修改sonarqube目录权限

root@csmp-OptiPlex-7090:/opt# chown -R sonarqube.sonarqube sonarqube
root@csmp-OptiPlex-7090:/opt# ll
...
lrwxrwxrwx  1 sonarqube sonarqube   21 44 11:30 sonarqube -> sonarqube-9.5.0.56709/
...

2.3 sonar.properties

创建数据目录

root@csmp-OptiPlex-7090:/opt# mkdir -p /data/apps/sonarqube
root@csmp-OptiPlex-7090:/opt# chown -R sonarqube.sonarqube /data/apps/sonarqube
mkdir /data/apps/sonarqube/{data,temp}

修改配置文件

egrep -v "^$|^#" /opt/sonarqube/conf/sonar.propertiessonar.jdbc.username=sonar
sonar.jdbc.password=sonar
sonar.jdbc.url=jdbc:postgresql://127.0.0.1/sonar
sonar.path.data=/data/apps/sonarqube/data
sonar.path.temp=/data/apps/sonarqube/temp
sonar.search.port=9001
sonar.web.port=9000

2.4 设置systemd管理sonarqube

在/lib/systemd/system中添加sonarqube.service

[Unit]
Description=SonarQube service
After=syslog.target network.target[Service]
Type=simple
User=sonarqube
Group=sonarqube
PermissionsStartOnly=true
ExecStart=/usr/bin/nohup /usr/bin/java -Xms512m -Xmx512m -Djava.net.preferIPv4Stack=true -jar /opt/sonarqube/lib/sonar-application-9.5.0.56709.jar
StandardOutput=syslog
LimitNOFILE=131072
LimitNPROC=8192
TimeoutStartSec=5
Restart=always
SuccessExitStatus=143[Install]
WantedBy=multi-user.target
root@csmp-OptiPlex-7090:/lib/systemd/system# systemctl daemon-reload
root@csmp-OptiPlex-7090:/lib/systemd/system# systemctl start sonarqube.service
root@csmp-OptiPlex-7090:/lib/systemd/system# systemctl status sonarqube.service
● sonarqube.service - SonarQube serviceLoaded: loaded (/lib/systemd/system/sonarqube.service; disabled; vendor preset: enabled)Active: active (running) since Tue 2023-04-04 13:35:45 CST; 105ms agoMain PID: 1302734 (java)Tasks: 21 (limit: 38126)Memory: 29.6MCGroup: /system.slice/sonarqube.service└─1302734 /usr/bin/java -Xms512m -Xmx512m -Djava.net.preferIPv4Stack=true -jar /opt/sonarqube/lib/sonar-application-9.5.0.56>4月 04 13:35:45 csmp-OptiPlex-7090 systemd[1]: Started SonarQube service.
root@csmp-OptiPlex-7090:/lib/systemd/system# systemctl enable sonarqube.service

发现起来之后,又挂了,修改如下内容
sysctl.conf

# echo "vm.max_map_count=524288" >> /etc/sysctl.conf
# echo "fs.file-max=131072" >> /etc/sysctl.conf
# sysctl -p

limits.conf

# echo "sonarqube   -   nofile   131072" >> /etc/security/limits.conf
# echo "sonarqube   -   nproc    8192" >> /etc/security/limits.conf

如果sonarqube启动正常,但是无法链接网页,则可以查看/opt/sonarqube/logs/web文件
例如,数据库无法链接,或者es无法由root启动等等问题

Caused by: org.postgresql.util.PSQLException: Connection to 192.168.72.119:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:319)at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:223)at org.postgresql.Driver.makeConnection(Driver.java:400)at org.postgresql.Driver.connect(Driver.java:259)at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:52)at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:374)at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:106)at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:649)... 56 common frames omitted
Caused by: java.net.ConnectException: 拒绝连接 (Connection refused)at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412)at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255)at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237)at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)at java.base/java.net.Socket.connect(Socket.java:609)at org.postgresql.core.PGStream.createSocket(PGStream.java:241)at org.postgresql.core.PGStream.<init>(PGStream.java:98)at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:109)at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:235)... 64 common frames omitted

2.5 web

在这里插入图片描述
sonarqube的web登录账号密码为admin/admin
修改为admin/passwd(密码自定义)

3. 配置sonarscanner

3.1 下载

下载地址:
https://docs.sonarqube.org/latest/analyzing-source-code/scanners/sonarscanner/
下载,上传到服务器,解压到指定目录,笔者这里是/usr/share/sonar-scanner

3.2 配置

root@csmp-OptiPlex-7090:/usr/share/jenkins/workspace/test_sda# cat /usr/share/sonar-scanner/conf/sonar-scanner.properties
#Configure here general information about the environment, such as SonarQube server connection details for example
#No information about specific project should appear here#----- Default SonarQube server
#sonar.host.url=http://localhost:9000#----- Default source code encoding
#sonar.sourceEncoding=UTF-8
sonar.host.url=http://192.168.70.202:32069
sonar.sourceEncoding=UTF-8
[root@dbc-server-554 sonar-scanner-4.7.0.2747-linux]# sonar-scanner -h
INFO:
INFO: usage: sonar-scanner [options]
INFO:
INFO: Options:
INFO:  -D,--define <arg>     Define property
INFO:  -h,--help             Display help information
INFO:  -v,--version          Display version information
INFO:  -X,--debug            Produce execution debug output

当看到sonar-scanner的帮助信息,说明已经部署成功

4. 配置cppcheck

4.1 下载安装cppcheck

https://sourceforge.net/projects/cppcheck/files/

tar -zxvf cppcheck-2.10.tar.gzcd cppcheck-2.10/make CFGDIR=/usr/share/cppcheck-2.10/cfg/sudo make install$ which cppcheck
/usr/bin/cppcheck

4.2 遇到的问题

  1. 如果提示cppcheck报错 Makefile322: *** FILESDIR must be set!,则需要配置几个参数的环境变量
root@csmp-OptiPlex-7090:/usr/share/cppcheck# tail -3 /etc/profile
export FILESDIR=/src
export DESTDIR=/
export PREFIX=usr
root@csmp-OptiPlex-7090:/usr/share/cppcheck# source /etc/profile
  1. 问题:
	cppcheck: Failed to load library configuration file 'std.cfg'. File not found

解决:
① 先把make文件清除 make clean

② 添加后重新编译:make CFGDIR=/usr/share/cppcheck-2.10/cfg/

③ 安装:sudo make install

4.3 配置sonarqube

https://github.com/SonarQubeCommunity/sonar-cppcheck
在这里插入图片描述
在sonarqube的配置文件修改

sonar.cxx.cppcheck.reportPath=cppcheck-report.xml

这样cppcheck就配置好了

4.4 测试

试试效果

root@csmp-OptiPlex-7090:/usr/share/jenkins/workspace/test_sda# cppcheck --xml --xml-version=2 --enable=all ./ 2> cppcheck-report.xml
Checking DelBkArea.cpp ...
root@csmp-OptiPlex-7090:/usr/share/jenkins/workspace/test_sda# cat cppcheck-report.xml
<?xml version="1.0" encoding="UTF-8"?>
<results version="2"><cppcheck version="2.10"/><errors><error id="variableScope" severity="style" msg="The scope of the variable &apos;area&apos; can be reduced." verbose="The scope of the variable &apos;area&apos; can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for &apos;i&apos; can be reduced:\012void f(int x)\012{\012    int i = 0;\012    if (x) {\012        // it&apos;s safe to move &apos;int i = 0;&apos; here\012        for (int n = 0; n &lt; 10; ++n) {\012            // it is possible but not safe to move &apos;int i = 0;&apos; here\012            do_something(&amp;i);\012        }\012    }\012}\012When you see this message it is always safe to reduce the variable scope 1 level." cwe="398" file0="DelBkArea.cpp"><location file="DelBkArea.cpp" line="188" column="11"/><symbol>area</symbol>
...

5. 配置gitlab

5.1 搭建私人gitlab

当然,在公司的gitlab,可以直接打tag,代码下载等等操作,而不必搭建私人gitlab
3.2.1 搭建gitlab服务器(使用官方镜像搭建)

5.2 获取gitlab信息

获取的代码分支,例如

http://***/dbc_test_for_jenkins.git

获取能下载代码的账号及密码,当然也可以使用密钥对,主要用于配置jenkins

6. 配置jenkins

6.1 安装jenkins

CHAPTER 1 Jenkins部署与基础配置

安装插件,包括但不限于:

Git plugin
SonarQube Scanner for Jenkins
SSH Agent Plugin
Cppcheck

加节点,加凭据参考前文吧,这里不展开了

6.2 配置

  1. 系统管理>Configure System>
    Jenkins Location
    Jenkins URL
    http://192.168.70.202:30351/
    这里改成socket,默认的jenkins.local需要改域名

  2. sonarqube设置
    可以参考CHAPTER 5 Jenkins & SonarQube
    在这里插入图片描述

6.3 创建项目

General部分:
添加参数,用于添加代码的tag或者branch
限制运行节点,选择节点
在这里插入图片描述

源码管理部分:这里有必要选择高级行为里的clean before checkout
在这里插入图片描述
在这里插入图片描述
构建部分:
添加cppcheck
在这里插入图片描述
添加sonar扫描
在这里插入图片描述
配置信息(Analysis properties):

# sonar平台中项目的标识(从项目信息中获取)
sonar.projectKey = ###
# sonar 平台中对应项目的名字  
sonar.projectName = ###
# sonar 平台中对应项目的版本号  
sonar.projectVersion=1.0  # sonar 检测的源文件目录,‘.’表示当前根目录下的所有文件  
sonar.sources=.    
# sonar 检测的语言种类  
sonar.language=cxx  
sonar.cxx.file.suffixes=.h,.cpp,.c  
# sonar 平台中对应项目的编码格式  
sonar.sourceEncoding=UTF-8 
#排除文件,或文件夹
# sonar.exclusions= # sonar服务的地址
sonar.host.url=http://192.168.70.202:32069
# sonar令牌(向管理员索要令牌)
sonar.login=squ_8a3df4a82bdaa8fc4909653195e2eeb95ed4ae26sonar.scm.disabled=true  
sonar.java.binaries=target/classes  
sonar.cfamily.build-wrapper-output=build_wrapper_output_directory  # 配置本地扫描软件生成的报告路径,结合实际使用的软件进行配置,以下例子为cppcheck软件的内容,如需使用去掉前面的注释标识(#)
sonar.cxx.cppcheck.reportPaths=cppcheck-report.xml  #Cppcheck检查报告在根目录的上一级目录下
sonar.cxx.includeDirectories=/

添加发布cppcheck结果
在这里插入图片描述

6.4 运行

在这里插入图片描述

控制台输出:

Started by user jenkins
Running as SYSTEM
Building remotely on SonarNode (node sonarqube : 72.119,run) in workspace /usr/share/jenkins/workspace/test_sda
The recommended git tool is: NONE
...
INFO: Analysis total time: 10.086 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 11.269s
INFO: Final Memory: 18M/100M
INFO: ------------------------------------------------------------------------
Finished: SUCCESS

6.5 查看报告

登录sonar的web界面,查看报告
在这里插入图片描述

相关文章:

Ubuntu系统配置SonarQube + cppcheck + Jenkins

SonarQube1. postgresql安装及配置1.1 安装postgresql1.2 创建sonarqube用户1.3 设置数据库2. 安装sonarqube2.1 设置sonarqube2.2 修改sonarqube目录权限2.3 sonar.properties2.4 设置systemd管理sonarqube2.5 web3. 配置sonarscanner3.1 下载3.2 配置4. 配置cppcheck4.1 下载…...

Spring @Valid 不生效 问题记录

校验的简单使用&#xff1a; 在Spring中&#xff0c;我们可以使用Valid注解对实体进行校验。在Controller的方法参数中添加Valid注解&#xff0c;然后在实体类的属性上添加校验注解&#xff0c;例如NotNull、Size等。例如&#xff1a; RestController public class UserContr…...

五步教你如何注册一个公司网站

在今天的数字化时代&#xff0c;每个公司都需要一个强大的线上存在感。注册一个公司网站是实现这一目标的第一步。但是&#xff0c;对于许多公司而言&#xff0c;这个过程可能有些困难。因此&#xff0c;在本文中&#xff0c;我将介绍一个五步计划&#xff0c;让您轻松注册一个…...

CSS绘制气泡对话框样式(有边框)

1、效果图 2、难点和思路 难点&#xff1a;上面那个带边框的小三角不好实现 思路&#xff1a;画两个不同大小的div&#xff0c;使其基本重叠&#xff08;两个大小不同&#xff0c;不完全重叠&#xff0c;让红色的露出一点边边&#xff09;&#xff0c;让白色div放到最上层&…...

12款 Macmini A1347 跑 Stable Diffusion,20多分钟一张图

设备 2012款 Macmini A1347 12款 mini A1347 跑 Stable Diffusion 要20多分钟一张图 来欣赏一下20分钟画出来的图片 a black and white cat 环境&#xff1a;...

流量控制和拥塞控制的原理和区别

文章目录先介绍下重传机制和滑动窗口超时重传快速重传SACK方法Duplicate SACK滑动窗口发送方缓存窗口接收方缓存窗口流量控制小结拥塞控制慢开始算法拥塞避免算法快重传快恢复先介绍下重传机制和滑动窗口 超时重传 重传机制的其中一个方式&#xff0c;就是发送数据时&#xf…...

金融机构断卡行动中外部数据

“断卡行动”&#xff0c;近几年逐渐走入大众视野&#xff0c;是国家在从根源上整治网络及金融犯罪层面的重大举措。相信很多朋友在日常生活中已经有所体会了&#xff0c;比如我们在办理电话卡及银行卡的时候要经过很多审核机制&#xff0c;同时发卡后还会限制卡片的一些转账等…...

携程总监的单元测试是怎么样写的?

大家都知道&#xff0c;开发软件的时候为代码编写单元测试是很好的。但实际上&#xff0c;光有测试还不够&#xff0c;还要编写好的测试&#xff0c;这同样重要。 要做到这一点&#xff0c;考虑遵循一些固执的原则&#xff0c;对测试代码给予一些关爱&#xff1a; 1. 保持测试…...

算法每日一题:P2089 烤鸡 -DFS练习

&#x1f61a;一个不甘平凡的普通人&#xff0c;日更算法学习和打卡&#xff0c;期待您的关注和认可&#xff0c;陪您一起学习打卡&#xff01;&#xff01;&#xff01;&#x1f618;&#x1f618;&#x1f618; &#x1f917;专栏&#xff1a;每日算法学习 &#x1f4ac;个人…...

Spring中的循环依赖是什么?如何解决它?

循环依赖是指两个或多个Bean之间相互依赖&#xff0c;导致它们无法被正确地初始化。在Spring中&#xff0c;当两个或多个Bean之间存在循环依赖时&#xff0c;Spring容器无法决定哪个Bean应该先初始化&#xff0c;因此会抛出BeanCurrentlyInCreationException异常&#xff0c;从…...

不良事件报告系统源码,PHP医院安全(不良)事件报告系统源码,在大型医院稳定运行多年

PHP医院安全&#xff08;不良&#xff09;事件报告系统源码&#xff0c;不良事件系统源码&#xff0c;有演示&#xff0c;在大型医院稳定运行多年。 系统技术说明 技术架构&#xff1a;前后端分离&#xff0c;仓储模式 开发语言&#xff1a;PHP 开发工具&#xff1a;VSco…...

MySQL 查询常用操作(3)——排序 order by

MySQL中常用的查询操作&#xff0c;首先是能直接从表中直接取出数据&#xff0c;接着能对查询结果做一些简单的处理&#xff0c;比如去重等&#xff0c;然后是根据条件查询数据&#xff0c;包括精准查询、模糊查询以及按照数据的某个范围或者指定多个指标进行查询&#xff0c;值…...

Android Jetpack 从使用到源码深耕【数据库注解Room 从实践到原理 】(二)

上文,我们通过一个简单的sqlite应用实例,引入了Room,知道了Room使用的便捷和好处。然后用Room的方式,重新实现了应用实例中的场景,在这个过程中,我们结合自己已有的知识体系,从使用代码入手,对Room的实现原理,进行了猜想和简单的验证。 Room实现原理,是否真如我们猜想…...

传统企业如何实现数字化转型?

近年来&#xff0c;围绕新产品新模式新业态&#xff0c;国家重点部署了7个方向&#xff0c;包括数字化管理、平台化设计、智能化生产、网络化协同、个性化定制、服务化延伸、新型智能产品等&#xff0c;均为市场价值大、发展潜力深、示范效应强的代表性、引领性领域。 因此&am…...

Linux修改密码报错Authentication token manipulation error的终极解决方法

文章目录报错说明解决思路流程排查特殊权限有没有上锁查看根目录和关闭selinux/etc/pam.d/passwd文件/etc/pam.d/system-auth文件终极办法&#xff0c;手动定义密码passwd: Have exhausted maximum number of retries for servic、ssh用普通用户登录输入密码正确但是登录时却提…...

ROS实践06 自定义消息类型

文章目录运行环境&#xff1a;思路&#xff1a;1.1 定义.msg文件1)功能包下新建 msg 目录&#xff0c;添加文件 Person.msg2)修改package.xml3)修改CMakeLists.txt2.1 自定义消息调用(C)1&#xff09;编译后修改includePath2&#xff09;发布方实现2.1修改CMakeLists.txt2.3运行…...

《剑指offer》——从尾到头打印链表

首先&#xff0c;拿到题之后&#xff0c;我们还是先从题目入手&#xff0c;只有掌握题干的意思&#xff0c;才能进行接下来的解题操作。 示例1 输入 : {1,2,3} 返回值&#xff1a;[3,2,1] 示例2 输入 &#xff1a;{67,0,24,58} 返回值&#xff1a;[58,24,0,67] 解题方法…...

Javaweb基础配置模板(mybatis+javaweb)

1.大纲规划图 本配置涉及的技术:mybatis,javaweb,json转换&#xff0c;分页查询等 2.导入相关的配置文件pom.xml 2.1 依赖文件 <dependencies> <!-- 测试依赖--><dependency><groupId>junit</groupId><artifactId>junit</artifact…...

物联网 JS 前端框架开发 - 执行 js 程序

前言 此篇文章主要讲解如何在物联网操作系统OneOS上运行高级语言JS脚本程序。想想还是有点意思的&#xff0c;毕竟在IOT设备上&#xff0c;我们的固有想法是&#xff0c;他们性能很羸弱&#xff0c;可能就跑跑一些简单的C应用程序&#xff0c;没想到已经可以运行高级语言JS脚本…...

区块链概论

目录 1.概述 2.密码学原理 2.1.hash函数 2.2.签名 3.数据结构 3.1.区块结构 3.2.hash pointer 3.3.merkle tree 3.3.1.概述 3.3.2.证明数据存在 3.3.3.证明数据不存在 4.比特币的共识协议 4.1.概述 4.2.验证有效性 4.2.1.验证交易有效性 4.2.2.验证节点有效性 …...

铭豹扩展坞 USB转网口 突然无法识别解决方法

当 USB 转网口扩展坞在一台笔记本上无法识别,但在其他电脑上正常工作时,问题通常出在笔记本自身或其与扩展坞的兼容性上。以下是系统化的定位思路和排查步骤,帮助你快速找到故障原因: 背景: 一个M-pard(铭豹)扩展坞的网卡突然无法识别了,扩展出来的三个USB接口正常。…...

UE5 学习系列(三)创建和移动物体

这篇博客是该系列的第三篇&#xff0c;是在之前两篇博客的基础上展开&#xff0c;主要介绍如何在操作界面中创建和拖动物体&#xff0c;这篇博客跟随的视频链接如下&#xff1a; B 站视频&#xff1a;s03-创建和移动物体 如果你不打算开之前的博客并且对UE5 比较熟的话按照以…...

多模态商品数据接口:融合图像、语音与文字的下一代商品详情体验

一、多模态商品数据接口的技术架构 &#xff08;一&#xff09;多模态数据融合引擎 跨模态语义对齐 通过Transformer架构实现图像、语音、文字的语义关联。例如&#xff0c;当用户上传一张“蓝色连衣裙”的图片时&#xff0c;接口可自动提取图像中的颜色&#xff08;RGB值&…...

Linux云原生安全:零信任架构与机密计算

Linux云原生安全&#xff1a;零信任架构与机密计算 构建坚不可摧的云原生防御体系 引言&#xff1a;云原生安全的范式革命 随着云原生技术的普及&#xff0c;安全边界正在从传统的网络边界向工作负载内部转移。Gartner预测&#xff0c;到2025年&#xff0c;零信任架构将成为超…...

【git】把本地更改提交远程新分支feature_g

创建并切换新分支 git checkout -b feature_g 添加并提交更改 git add . git commit -m “实现图片上传功能” 推送到远程 git push -u origin feature_g...

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

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

学校时钟系统,标准考场时钟系统,AI亮相2025高考,赛思时钟系统为教育公平筑起“精准防线”

2025年#高考 将在近日拉开帷幕&#xff0c;#AI 监考一度冲上热搜。当AI深度融入高考&#xff0c;#时间同步 不再是辅助功能&#xff0c;而是决定AI监考系统成败的“生命线”。 AI亮相2025高考&#xff0c;40种异常行为0.5秒精准识别 2025年高考即将拉开帷幕&#xff0c;江西、…...

Springboot社区养老保险系统小程序

一、前言 随着我国经济迅速发展&#xff0c;人们对手机的需求越来越大&#xff0c;各种手机软件也都在被广泛应用&#xff0c;但是对于手机进行数据信息管理&#xff0c;对于手机的各种软件也是备受用户的喜爱&#xff0c;社区养老保险系统小程序被用户普遍使用&#xff0c;为方…...

React---day11

14.4 react-redux第三方库 提供connect、thunk之类的函数 以获取一个banner数据为例子 store&#xff1a; 我们在使用异步的时候理应是要使用中间件的&#xff0c;但是configureStore 已经自动集成了 redux-thunk&#xff0c;注意action里面要返回函数 import { configureS…...

IP如何挑?2025年海外专线IP如何购买?

你花了时间和预算买了IP&#xff0c;结果IP质量不佳&#xff0c;项目效率低下不说&#xff0c;还可能带来莫名的网络问题&#xff0c;是不是太闹心了&#xff1f;尤其是在面对海外专线IP时&#xff0c;到底怎么才能买到适合自己的呢&#xff1f;所以&#xff0c;挑IP绝对是个技…...