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

Mac M1通过homebrew安装Redis报错(perl: unknown or unsupported macOS version: :dunno)

〇、解决方案

升级homebrew,命令如下:

brew update-reset

一、问题现象

通过命令brew install redis安装Redis,异常如下:

fatal: not in a git directory
Warning: No remote 'origin' in /opt/homebrew/Library/Taps/homebrew/homebrew-services, skipping update!
Warning: You are using macOS 14.
We do not provide support for this pre-release version.
It is expected behaviour that some formulae will fail to build in this pre-release version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from MacHomebrew on Twitter.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.==> Downloading https://www.openssl.org/source/openssl-1.1.1s.tar.gz
Already downloaded: /Users/heyday/Library/Caches/Homebrew/downloads/c475ad5547bf6708c42aaf180620e38a33a1798ae3c6a59725b6bf60f52f2249--openssl-1.1.1s.tar.gz
==> Downloading https://download.redis.io/releases/redis-7.0.5.tar.gz
Already downloaded: /Users/heyday/Library/Caches/Homebrew/downloads/1901d254697ab7e72b48bc6e85b1375acbbcfb740ee1eab1358b21ffa211c8ba--redis-7.0.5.tar.gz
==> Installing dependencies for redis: openssl@1.1
==> Installing redis dependency: openssl@1.1
Error: An exception occurred within a child process:FormulaUnreadableError: perl: unknown or unsupported macOS version: :dunno

二、尝试解决

参考博文MAC 升级后brew报错后,运行命令brew update-reset,结果如下:

==> Fetching /opt/homebrew...
remote: Enumerating objects: 27472, done.
remote: Counting objects: 100% (3242/3242), done.
remote: Total 27472 (delta 3242), reused 3242 (delta 3242), pack-reused 24230
Receiving objects: 100% (27472/27472), 10.60 MiB | 13.25 MiB/s, done.
Resolving deltas: 100% (18433/18433), completed with 1014 local objects.
From https://mirrors.ustc.edu.cn/brewaea140c04..e57a87cfe  master     -> origin/master* [new tag]             3.6.14     -> 3.6.14* [new tag]             3.6.15     -> 3.6.15* [new tag]             3.6.16     -> 3.6.16
......
* [new tag]             4.1.7      -> 4.1.7* [new tag]             4.1.8      -> 4.1.8* [new tag]             4.1.9      -> 4.1.9==> Resetting /opt/homebrew...
branch 'master' set up to track 'origin/master'.
Reset branch 'master'
Your branch is up to date with 'origin/master'.==> Fetching /opt/homebrew/Library/Taps/homebrew/homebrew-cask...
remote: Enumerating objects: 113910, done.
remote: Counting objects: 100% (8170/8170), done.
remote: Total 113910 (delta 8170), reused 8170 (delta 8170), pack-reused 105740
Receiving objects: 100% (113910/113910), 57.91 MiB | 22.36 MiB/s, done.
Resolving deltas: 100% (85215/85215), completed with 1709 local objects.
From https://mirrors.ustc.edu.cn/homebrew-caskd0ac851913..3233b1b002  master     -> origin/master==> Resetting /opt/homebrew/Library/Taps/homebrew/homebrew-cask...
branch 'master' set up to track 'origin/master'.
Reset branch 'master'
Your branch is up to date with 'origin/master'.==> Fetching /opt/homebrew/Library/Taps/homebrew/homebrew-core...
remote: Enumerating objects: 330567, done.
remote: Counting objects: 100% (19485/19485), done.
remote: Total 330567 (delta 19485), reused 19485 (delta 19485), pack-reused 311082
Receiving objects: 100% (330567/330567), 148.87 MiB | 4.08 MiB/s, done.
Resolving deltas: 100% (244544/244544), completed with 3769 local objects.
From https://mirrors.ustc.edu.cn/homebrew-corecd5dc44cfa5..f348ed27b41  master     -> origin/master==> Resetting /opt/homebrew/Library/Taps/homebrew/homebrew-core...
branch 'master' set up to track 'origin/master'.
Reset branch 'master'
Your branch is up to date with 'origin/master'.Warning: No remote 'origin' in /opt/homebrew/Library/Taps/homebrew/homebrew-services, skipping update and reset!

查看homebrew版本(brew --version),结果为:

Homebrew 4.1.15
Homebrew/homebrew-core (git revision f348ed27b41; last commit 2023-10-10)
Homebrew/homebrew-cask (git revision 3233b1b002; last commit 2023-10-09)

最终解决
上述brew update-reset升级命令即为该问题的解决办法。homebrew升级完成后,重新运行Redis安装命令brew install redis,结果如下:

==> Downloading https://formulae.brew.sh/api/formula.jws.json
############################################################################################################################################################################## 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
############################################################################################################################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/redis/manifests/7.2.1-1
############################################################################################################################################################################## 100.0%
==> Fetching dependencies for redis: ca-certificates and openssl@3
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2023-08-22
############################################################################################################################################################################## 100.0%
==> Fetching ca-certificates
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/blobs/sha256:a331e92e7a759571296581f029e5cc2ec7cee70cd92dc0b5f8eb76095f94a21a
############################################################################################################################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.1.3
############################################################################################################################################################################## 100.0%
==> Fetching openssl@3
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/blobs/sha256:fd6e90e00f1c395feb60d0244eb66583caab494f8e0a0988afaa838511265d98
############################################################################################################################################################################## 100.0%
==> Fetching redis
==> Downloading https://ghcr.io/v2/homebrew/core/redis/blobs/sha256:53943e914be8be83327314d5e23a550f4b6ee31cb4ebebe85e27aa1bce80968a
############################################################################################################################################################################## 100.0%
==> Installing dependencies for redis: ca-certificates and openssl@3
==> Installing redis dependency: ca-certificates
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2023-08-22
Already downloaded: /Users/heyday/Library/Caches/Homebrew/downloads/a8cd32e30cae0b7335779e93a6554f294f09485802fc253a3a8be441337a6115--ca-certificates-2023-08-22.bottle_manifest.json
==> Pouring ca-certificates--2023-08-22.arm64_sonoma.bottle.tar.gz
==> Downloading https://formulae.brew.sh/api/formula.jws.json
-=O=-                                                                      #             #             #             #                                                              
==> Regenerating CA certificate bundle from keychain, this may take a while...
🍺  /opt/homebrew/Cellar/ca-certificates/2023-08-22: 3 files, 221.7KB
==> Installing redis dependency: openssl@3
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.1.3
Already downloaded: /Users/heyday/Library/Caches/Homebrew/downloads/f038f540886a6a94c000296efb3058dc47e867eef00f0c6836b8ff310bc04daa--openssl@3-3.1.3.bottle_manifest.json
==> Pouring openssl@3--3.1.3.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/openssl@3/3.1.3: 6,495 files, 28.4MB
==> Installing redis
==> Pouring redis--7.2.1.arm64_sonoma.bottle.1.tar.gz
==> Caveats
To start redis now and restart at login:brew services start redis
Or, if you don't want/need a background service you can just run:/opt/homebrew/opt/redis/bin/redis-server /opt/homebrew/etc/redis.conf
==> Summary
🍺  /opt/homebrew/Cellar/redis/7.2.1: 14 files, 2.4MB
==> Running `brew cleanup redis`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /Users/heyday/Library/Caches/Homebrew/redis--7.0.5.tar.gz... (2.8MB)
Removing: /Users/heyday/Library/Caches/Homebrew/redis--7.0.5... (1003.0KB)
==> Caveats
==> redis
To start redis now and restart at login:brew services start redis
Or, if you don't want/need a background service you can just run:/opt/homebrew/opt/redis/bin/redis-server /opt/homebrew/etc/redis.conf

至此,Redis已安装成功!

三、启动服务

接下来就要启动Redis服务,并登录客户端,测试简单实用。
使用redis-server命令启动Redis服务。启动结果如下:

18066:C 10 Oct 2023 16:14:48.320 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18066:C 10 Oct 2023 16:14:48.320 * Redis version=7.2.1, bits=64, commit=00000000, modified=0, pid=18066, just started
18066:C 10 Oct 2023 16:14:48.320 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
18066:M 10 Oct 2023 16:14:48.320 * Increased maximum number of open files to 10032 (it was originally set to 256).
18066:M 10 Oct 2023 16:14:48.320 * monotonic clock: POSIX clock_gettime_._                                                  _.-``__ ''-._                                             _.-``    `.  `_.  ''-._           Redis 7.2.1 (00000000/0) 64 bit.-`` .-```.  ```\/    _.,_ ''-._                                  (    '      ,       .-`  | `,    )     Running in standalone mode|`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379|    `-._   `._    /     _.-'    |     PID: 18066`-._    `-._  `-./  _.-'    _.-'                                   |`-._`-._    `-.__.-'    _.-'_.-'|                                  |    `-._`-._        _.-'_.-'    |           https://redis.io       `-._    `-._`-.__.-'_.-'    _.-'                                   |`-._`-._    `-.__.-'    _.-'_.-'|                                  |    `-._`-._        _.-'_.-'    |                                  `-._    `-._`-.__.-'_.-'    _.-'                                   `-._    `-.__.-'    _.-'                                       `-._        _.-'                                           `-.__.-'                                               18066:M 10 Oct 2023 16:14:48.321 # WARNING: The TCP backlog setting of 511 cannot be enforced because kern.ipc.somaxconn is set to the lower value of 128.
18066:M 10 Oct 2023 16:14:48.322 * Server initialized
18066:M 10 Oct 2023 16:14:48.322 * Ready to accept connections tcp

四、登录客户端

通过redis-cli -p 6379(或redis-cli)登录客户端,测试结果:

127.0.0.1:6379> hset office id 16 name finance
(integer) 2
127.0.0.1:6379> hget office
(error) ERR wrong number of arguments for 'hget' command
127.0.0.1:6379> hget office id
"16"
127.0.0.1:6379> hget office name
"finance"
127.0.0.1:6379> set a 'bbb'
OK
127.0.0.1:6379> get a
"bbb"

通过info命令查看Redis信息,结果为:

127.0.0.1:6379> info
# Server
redis_version:7.2.1
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:7b8617dd94058f85
redis_mode:standalone
os:Darwin 23.0.0 arm64
arch_bits:64
monotonic_clock:POSIX clock_gettime
multiplexing_api:select
atomicvar_api:c11-builtin
gcc_version:4.2.1
process_id:18066
process_supervised:no
run_id:ebee4f34c6d4a9765df9b2af8076613a363a4b4e
tcp_port:6379
server_time_usec:1696927718666614
uptime_in_seconds:2030
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:2428902
executable:/opt/homebrew/opt/redis-server
config_file:
io_threads_active:0
listener0:name=tcp,bind=*,bind=-::*,port=6379# Clients
connected_clients:1
cluster_connections:0
maxclients:10000
client_recent_max_input_buffer:16
client_recent_max_output_buffer:0
blocked_clients:0
tracking_clients:0
clients_in_timeout_table:0
total_blocking_keys:0
total_blocking_keys_on_nokey:0# Memory
used_memory:914816
used_memory_human:893.38K
used_memory_rss:7110656
used_memory_rss_human:6.78M
used_memory_peak:1130576
used_memory_peak_human:1.08M
used_memory_peak_perc:80.92%
used_memory_overhead:771176
used_memory_startup:769024
used_memory_dataset:143640
used_memory_dataset_perc:98.52%
allocator_allocated:895120
allocator_active:7078912
allocator_resident:7078912
total_system_memory:68719476736
total_system_memory_human:64.00G
used_memory_lua:31744
used_memory_vm_eval:31744
used_memory_lua_human:31.00K
used_memory_scripts_eval:0
number_of_cached_scripts:0
number_of_functions:0
number_of_libraries:0
used_memory_vm_functions:32768
used_memory_vm_total:64512
used_memory_vm_total_human:63.00K
used_memory_functions:216
used_memory_scripts:216
used_memory_scripts_human:216B
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
allocator_frag_ratio:7.91
allocator_frag_bytes:6183792
allocator_rss_ratio:1.00
allocator_rss_bytes:0
rss_overhead_ratio:1.00
rss_overhead_bytes:31744
mem_fragmentation_ratio:7.94
mem_fragmentation_bytes:6215536
mem_not_counted_for_evict:0
mem_replication_backlog:0
mem_total_replication_buffers:0
mem_clients_slaves:0
mem_clients_normal:1824
mem_cluster_links:0
mem_aof_buffer:0
mem_allocator:libc
active_defrag_running:0
lazyfree_pending_objects:0
lazyfreed_objects:0# Persistence
loading:0
async_loading:0
current_cow_peak:0
current_cow_size:0
current_cow_size_age:0
current_fork_perc:0.00
current_save_keys_processed:0
current_save_keys_total:0
rdb_changes_since_last_save:3
rdb_bgsave_in_progress:0
rdb_last_save_time:1696925688
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
rdb_saves:0
rdb_last_cow_size:0
rdb_last_load_keys_expired:0
rdb_last_load_keys_loaded:0
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_rewrites:0
aof_rewrites_consecutive_failures:0
aof_last_write_status:ok
aof_last_cow_size:0
module_fork_in_progress:0
module_fork_last_cow_size:0# Stats
total_connections_received:2
total_commands_processed:11
instantaneous_ops_per_sec:0
total_net_input_bytes:527
total_net_output_bytes:409203
total_net_repl_input_bytes:0
total_net_repl_output_bytes:0
instantaneous_input_kbps:0.00
instantaneous_output_kbps:0.00
instantaneous_input_repl_kbps:0.00
instantaneous_output_repl_kbps:0.00
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
expired_stale_perc:0.00
expired_time_cap_reached_count:0
expire_cycle_cpu_milliseconds:62
evicted_keys:0
evicted_clients:0
total_eviction_exceeded_time:0
current_eviction_exceeded_time:0
keyspace_hits:6
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
pubsubshard_channels:0
latest_fork_usec:0
total_forks:0
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0
total_active_defrag_time:0
current_active_defrag_time:0
tracking_total_keys:0
tracking_total_items:0
tracking_total_prefixes:0
unexpected_error_replies:0
total_error_replies:5
dump_payload_sanitizations:0
total_reads_processed:17
total_writes_processed:21
io_threaded_reads_processed:0
io_threaded_writes_processed:0
reply_buffer_shrinks:2
reply_buffer_expands:0
eventloop_cycles:19625
eventloop_duration_sum:2617787
eventloop_duration_cmd_sum:2100
instantaneous_eventloop_cycles_per_sec:9
instantaneous_eventloop_duration_usec:292
acl_access_denied_auth:0
acl_access_denied_cmd:0
acl_access_denied_key:0
acl_access_denied_channel:0# Replication
role:master
connected_slaves:0
master_failover_state:no-failover
master_replid:ab7606e5334f65e93b29c63f072666c60ab8186b
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0# CPU
used_cpu_sys:2.177440
used_cpu_user:0.937600
used_cpu_sys_children:0.000000
used_cpu_user_children:0.000000# Modules# Errorstats
errorstat_ERR:count=5# Cluster
cluster_enabled:0# Keyspace
db0:keys=2,expires=0,avg_ttl=0

可见,版本是7.2.1,还是目前最新的稳定版。

相关文章:

Mac M1通过homebrew安装Redis报错(perl: unknown or unsupported macOS version: :dunno)

〇、解决方案 升级homebrew,命令如下: brew update-reset一、问题现象 通过命令brew install redis安装Redis,异常如下: fatal: not in a git directory Warning: No remote origin in /opt/homebrew/Library/Taps/homebrew/h…...

如何在 Spring Boot 中进行分布式追踪

在 Spring Boot 中进行分布式追踪 分布式系统中的应用程序由多个微服务组成,它们可以位于不同的服务器、容器或云中。当出现问题时,如性能瓶颈、错误或延迟,了解问题的根本原因变得至关重要。分布式追踪是一种用于跟踪和分析分布式应用程序性…...

Lniux三剑客——Grep

前言 echo guangge{01…100…2} 第二个是间隔多少个计数 命令别名 alias, unalias , 作用是封装命令: alias rm ‘rm -i’ 命令历史 history !行号 !! 上一次的命令 ctrl a 移动到行首 ctrl e 移动到行尾 Grep 格式: gre…...

选实验室超声波清洗机易忽视的内容?小型清洗机的优点有?

实验室超声波清洗机如今在行业内占据着重要的一席之地,摒弃了传统模式,坚持以超声波为主的清洗方式,在市场中获得的反响强烈。服务好,有诚信的实验室超声波清洗机能够消除客户的后顾之忧,工作人员会以真诚态度向客户提…...

基于Java使用SpringBoot+Vue框架实现的前后端分离的美食分享平台

✌全网粉丝20W,csdn特邀作者、博客专家、CSDN新星计划导师、java领域优质创作者,博客之星、掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java技术领域和毕业项目实战✌ 🍅文末获取项目下载方式🍅 一、项目背景介绍: 在当今社会&#xff0…...

开源数据库MySQL 8.0 OCP认证精讲视频、环境和题库 之二

修改用户的初始密码: mysql>alteruserrootlocalhostidentifiedbyQaz1234; 或者: mysql>alteruseruser0identifiedbyQaz_1234; 在版本5.x中: mysql>setpasswordpassword(Qaz_1234); 可执行文件: 服务器端&…...

AI对网络安全的影响与挑战

近年来,随着人工智能(AI)技术的快速发展,网络安全领域也开始逐渐引入生成式AI应用。根据最新的数据研究,生成式AI对网络安全和合规的影响最大,同时也包括了IT和云的运维、硬件和软件支持领域。通过AI和自动…...

微信小程序备案流程操作详解,值得收藏

目录 一、小程序备案法律法规参考 二、备案前准备 2.1 备案入口 2.1.1、未上架小程序 2.1.2、已上架小程序 (二)备案类型 (三)备案材料准备 3.1、小程序备案材料 3.2、前置审批材料 3.3、个人备案 3.4、非个人备案 三、备案整体流程 (一)备案信息填写 1、主体信息…...

【NLTK系列01】:nltk库介绍

一、说明 NLTK是个啥?它是个复杂的应用库,可以实现基本预料库操作,比如,、将文章分词成独立token,等操作。从词统计、标记化、词干提取、词性标记,停用词收集,包括语义索引和依赖关系解析等。 …...

人机环境系统智能有利于防止人工智能失控

当前,人工智能的失控是一个备受关注的话题。尽管目前还没有出现完全失控的人工智能系统,但确实存在一些潜在的风险和挑战需要我们重视和应对。一些可能导致人工智能失控的因素包括: 误用和恶意使用:人工智能技术可以被用于恶意活动…...

用于多目标检测的自监督学习(SELF-SUPER VISED LEARNING FOR MULTIPLE OBJECTDETECTION)

在本章中,我们提出了一种新的自监督学习(SSL)技术,以从头顶图像中提供关于实例分割不确定性的模型信息。我们的SSL方法通过使用测试时数据增强和基于回归的旋转不变伪标签细化技术来改进对象检测。我们的伪标签生成方法提供多个经过几何变换的图像作为卷积神经网(CNN)的输…...

HDLbits: ps2data

这一题在上一题基础上多了一个输出,并且这个输出是不需要像上一题考虑出错的情况的,所以只要把输入in按次序排好就可以。我一开始的想法是在状态切换判断的always块里把in赋给out,但是不正确,代码如下: module top_mo…...

SpringCloudAlibaba SpringCloud SpringBoot 版本对照

由于 Spring Boot 3.0,Spring Boot 2.7~2.4 和 2.4 以下版本之间变化较大,目前企业级客户老项目相关 Spring Boot 版本仍停留在 Spring Boot 2.4 以下,为了同时满足存量用户和新用户不同需求,社区以 Spring Boot 3.0 和 2.4 分别为…...

Swift基础

本文是个比较简单的学习笔记&#xff0c;更详细的内容见 Swift官方文档 1、相等性比较 Swift标准库用 < 和 运算符定义了 >、>、<&#xff0c;所以实现 Comparable 的 < 运算符就会自动得到这些运算符的实现&#xff0c;实际上 Comparable 继承自 Equatable&…...

基于php+thinkphp+vue的校园二手交易网站

运行环境 开发语言&#xff1a;PHP 数据库:MYSQL数据库 应用服务:apache服务器 使用框架:ThinkPHPvue 开发工具:VScode/Dreamweaver/PhpStorm等均可 项目简介 随着社会的发展&#xff0c;社会的各行各业都在利用信息化时代的优势。计算机的优势和普及使得各种信息系统的开发…...

SystemVerilog Assertions应用指南 第一章(1.25章节 “first_match”运算符)

任何时候使用了逻辑运算符(如“and”和“or”)的序列中指定了时间窗,就有可能出现同一个检验具有多个匹配的情况。“ first match”构造可以确保只用第一次序列匹配,而丢弃其他的匹配。当多个序列被组合在一起,其中只需时间窗内的第一次匹配来检验属性剩余的部分时,“ first ma…...

python和go执行字符串表达式

1、python/eval python里可以使用内置的eval函数&#xff0c;来执行一个字符串表达式的结果&#xff0c;字符串表达式里可以是变量、函数、运算符等 def test():return True flag False print(eval("test() and True and flag" )) 执行结果为False 2、golang/go…...

Python算法练习 10.14

leetcode 2095 删除链表的中间节点 给你一个链表的头节点 head 。删除 链表的 中间节点 &#xff0c;并返回修改后的链表的头节点 head 。 长度为 n 链表的中间节点是从头数起第 ⌊n / 2⌋ 个节点&#xff08;下标从 0 开始&#xff09;&#xff0c;其中 ⌊x⌋ 表示小于或等于…...

云上攻防-云原生篇Docker安全系统内核版本漏洞CDK自动利用容器逃逸

文章目录 云原生-Docker安全-容器逃逸&内核漏洞云原生-Docker安全-容器逃逸&版本漏洞-CVE-2019-5736 runC容器逃逸-CVE-2020-15257 containerd逃逸 云原生-Docker安全-容器逃逸&CDK自动化 云原生-Docker安全-容器逃逸&内核漏洞 细节部分在权限提升章节会详解&…...

C# Sqlite数据库的搭建及使用技巧

C# Sqlite数据库的搭建 前言: 今天我们来学一下Sqlite的数据库的搭建&#xff0c;Sqlite数据库不比MySqL数据库&#xff0c;SQlite数据是一个比较轻量级的数据库&#xff0c;SQLite提供了比较多的工具集&#xff0c;对数据基本上不挑&#xff0c;什么数据都可以处理&#xff…...

gerrit代码review使用基本方法

1、repo拉取代码 repo init -u ssh://gerrit.senseauto.com/senseauto_manifest -b develop -m senseauto-config.xml --repo-urlssh://gerrit.senseauto.com:29418/senseauto_repo --repo-branchdevelop --no-repo-verify repo sync -j4 repo forall -j 4 -p -c ‘git lfs p…...

网络监控与故障排除:netstat命令的使用指南

文章目录 概述什么是 netstat 命令&#xff1f;netstat 命令的作用和功能netstat 命令的常见用途 安装和基本用法安装 netstat 命令netstat 命令的基本语法查看活动网络连接 查看网络接口信息查看所有网络接口信息查看指定网络接口信息网络接口状态说明 网络连接状态显示所有连…...

Blender:渲染一个简单动画

接上 Blender&#xff1a;对模型着色_六月的翅膀的博客-CSDN博客 目标是做一个这种视频 先添加一个曲线&#xff0c;作为相机轨迹 然后添加一个相机 对相机添加物体约束&#xff0c;跟随路径&#xff0c;选择曲线&#xff0c;然后点击动画路径 假如对相机设置跟随路径后&…...

一篇文章带你用动态规划解决股票购买时机问题

动态规划的解题步骤可以分为以下五步&#xff0c;大家先好好记住 1.创建dp数组以及明确dp数组下标的含义 2.制定递推公式 3.初始化 4.遍历顺序 5.验证结果 股票购买时机问题的解题核心思路 当天的收益是根据前一天持有股票还是不持有股票的状态决定的 那么很自然的我们就想…...

【设计模式】使用建造者模式组装对象并加入自定义校验

文章目录 1.前言1.1.创建对象时的痛点 2.建造者模式2.1 被建造类准备2.2.建造者类实现2.3.构建对象测试2.4.使用lombok简化建造者2.5.lombok简化建造者的缺陷 3.总结 1.前言 在我刚入行不久的时候就听说过建造者模式这种设计模式&#xff0c;当时只知道是用来组装对象&#xf…...

简单聊聊低代码

在数字经济迅速发展的背景下&#xff0c;越来越多的企业开始建立健全业务系统、应用、借助数字化工具提升管理效率&#xff0c;驱动业务发展&#xff0c;促进业绩增长。在这一过程中&#xff0c;和许多新技术一样&#xff0c;低代码&#xff08;Low-code&#xff09;开发被推上…...

SystemVerilog Assertions应用指南 第一章(1.27章节 “within”运算符)

“ within”构造允许在一个序列中定义另一个序列。 seq1 within seq2 这表示seq1在seq2的开始到结束的范围内发生,且序列seq2的开始匹配点必须在seq1的开始匹配点之前发生,序列seq1的结束匹配点必须在seq2的结束匹配点之前结束。属性p32检查序列s32a在信号“ start”的上升沿和…...

2023年09月 C/C++(七级)真题解析#中国电子学会#全国青少年软件编程等级考试

C/C++编程(1~8级)全部真题・点这里 Python编程(1~6级)全部真题・点这里 第1题:红与黑 有一间长方形的房子,地上铺了红色、黑色两种颜色的正方形瓷砖。你站在其中一块黑色的瓷砖上,只能向相邻的黑色瓷砖移动。请写一个程序,计算你总共能够到达多少块黑色的瓷砖。 时间限…...

[Mono Depth/3DOD]单目3D检测基础

1. 数据增强 图像放缩和裁剪后&#xff0c;相机内参要做相应变化 import random def random_scale(image, calib, scale_range(0.8, 1.2)):scale random.uniform(*scale_range)width, height image.sizeimage image.resize((int(width * scale), int(height * scale)))cal…...

【Docker 内核详解】namespace 资源隔离(三):PID namespace

namespace 资源隔离&#xff08;三&#xff09;&#xff1a;PID namespace 1.PID namespace 中的 init 进程2.信号与 init 进程3.挂载 proc 文件系统4.unshare() 和 setns() PID namespace 隔离非常实用&#xff0c;它对进程 PID 重新标号&#xff0c;即两个不同 namespace 下的…...

1600*C. Game On Leaves(博弈游戏树)

Problem - 1363C - Codeforces 解析&#xff1a; 我们将目标结点 x 当作树的根&#xff0c;显然&#xff0c;到当 x 的度为 1 的时候&#xff0c;此时行动的人胜利。 我们假设现在的情况为&#xff0c;只剩余三个点&#xff0c;再选择任意一个点&#xff0c;则对方获胜。但是两…...

Apache Ant的安装

介绍 Apache Ant是一个Java库和一个 命令行工具&#xff0c;可以用来构建Java应用。Ant提供了许多内置的任务&#xff08;tasks&#xff09;&#xff0c;可以编译、组装、测试、运行Java应用。Ant也可以构建非Java应用&#xff0c;例如C、C应用。 Ant非常灵活&#xff0c;没有…...

考研:数学二例题--∞−∞和0⋅∞型极限

前言 本文只是例题&#xff0c;建议先参考具体如何做这类型例题。请到主文章中参考&#xff1a;https://blog.csdn.net/grd_java/article/details/132246630 ∞ − ∞ 和 0 ⋅ ∞ \infin - \infin 和 0\infin ∞−∞和0⋅∞ 例题 例1&#xff1a; lim ⁡ x → ∞ x 2 x 2 −…...

C++算法:图中的最短环

题目 现有一个含 n 个顶点的 双向 图&#xff0c;每个顶点按从 0 到 n - 1 标记。图中的边由二维整数数组 edges 表示&#xff0c;其中 edges[i] [ui, vi] 表示顶点 ui 和 vi 之间存在一条边。每对顶点最多通过一条边连接&#xff0c;并且不存在与自身相连的顶点。 返回图中 …...

C++学习——类其实也是一种作用域

以下内容源于C语言中文网的学习与整理&#xff0c;非原创&#xff0c;如有侵权请告知删除。 其实也是一种作用域&#xff0c;每个类都会定义它自己的作用域。在类的作用域之外&#xff0c;普通的成员只能通过对象&#xff08;可以是对象本身&#xff0c;也可以是对象指针或对象…...

Seata入门系列【4】undo_log、global_table、branch_table、lock_table字段及作用详解

1 客户端 1.1 undo_log 在AT模式中&#xff0c;需要在参与全局事务的数据库中&#xff0c;添加一个undo_log表&#xff0c;建表语句如下&#xff1a; SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS 0;-- ---------------------------- -- Table structure for undo_log -- --…...

虚幻引擎:数据表格的C++常用API

1.将数据表格中的所有数据存到一个数组中 //参数1 // 错误提示 //参数2 // 存储的数组 TArray<FKeyInfoHeader*> array; KeyInfoDT->GetAllRows<FKeyInfoHeader>(TEXT("错误"),array); 2.获取表格中所有的行名称 TArray<FName>array; …...

Java日期格式化(DateFormat类和SimpleDateFormat类)

格式化日期表示将日期/时间格式转换为预先定义的日期/时间格式。例如将日期“Fri May 18 15:46:24 CST2016” 格式转换为 “2016-5-18 15:46:24 星期五”的格式。 在 java 中&#xff0c;可以使用 DateFormat 类和 SimpleDateFormat 类来格式化日期&#xff0c;下面详细介绍这两…...

centos 7 lamp owncloud

OwnCloud是一款开源的云存储软件&#xff0c;基于PHP的自建网盘。基本上是私人使用&#xff0c;没有用户注册功能&#xff0c;但是有用户添加功能&#xff0c;你可以无限制地添加用户&#xff0c;OwnCloud支持多个平台&#xff08;windows&#xff0c;MAC&#xff0c;Android&a…...

屏幕亮度调节保护您的眼睛

官方下载地址&#xff1a; 安果移动 视频演示&#xff1a;屏幕亮度调节-保护您的眼睛_哔哩哔哩_bilibili 嗨&#xff0c;亲爱的用户&#xff0c;你是否有过这样的体验&#xff1a;夜晚安静的时刻&#xff0c;想要在抖音上看看热门的舞蹈、在快手上发现生活的 趣味、或是在哔…...

CentOS Linux下CMake二进制文件安装并使用Visual Studio调试

cmake安装——二进制安装(很简单&#xff0c;推荐&#xff01;&#xff01;) 1&#xff09;下载二进制包。首先就是官网下载二进制安装包(我们是64位系统&#xff0c;就下载对应的包)&#xff0c;这里。 例如&#xff1a;在/home/DOWNLOAD目录下执行&#xff0c;即下载二进制…...

ASP.net相关目录,相关配置文件和.后缀名解释

App_Data&#xff1a;用于存储应用程序的数据文件&#xff0c;例如数据库文件或其他本地文件。 App_Start&#xff1a;包含应用程序的启动配置文件&#xff0c;例如路由配置、日志配置等。 Content&#xff1a;存放应用程序的静态资源文件&#xff0c;如 CSS、JavaScript、图…...

一键批量转换,轻松将TS视频转为MP4视频,实现更广泛的播放和分享!

在享受精彩视频内容的同时&#xff0c;有时我们可能会面临一个问题&#xff1a;某些视频格式可能不太适合我们的播放设备或分享平台。特别是TS格式的视频&#xff0c;在一些情况下可能无法直接播放或上传。但是不用担心&#xff0c;因为我们为您提供了一款强大的视频剪辑工具&a…...

【Redis】使用Java客户端操作Redis

目录 引入jedis依赖连接Redis命令get/setexists/delkeysexpire/ttltype 引入jedis依赖 连接Redis 命令 get/set exists/del keys expire/ttl type...

BSPHP 未授权访问 信息泄露

漏洞描述 BSPHP 存在未授权访问 泄露用户 IP 和 账户名信息 漏洞复现 访问url&#xff1a; 构造payload访问&#xff1a; /admin/index.php?madmin&clog&atable_json&jsonget&soso_ok1&tuser_login_log&page1&limit10&bsphptime16004073…...

Learning Sample Relationship for Exposure Correction 论文阅读笔记

这是中科大发表在CVPR2023的一篇论文&#xff0c;提出了一个module和一个损失项&#xff0c;能够提高现有exposure correction网络的性能。这已经是最近第三次看到这种论文了&#xff0c;前两篇分别是CVPR2022的ENC&#xff08;和这篇文章是同一个一作作者&#xff09;和CVPR20…...

Vue项目 -- 解决Eslint导致的console报错问题

在利用vue-cli3构建的项目中引入eslint进行语法检查时&#xff0c;使用console.log(‘xxx’)时&#xff0c;控制台抛出了Unexpected console statement (no-console) 异常&#xff0c; 例&#xff1a;一使用console就提示报错 解决办法是&#xff1a; 在 .eslintrc.js 文件中…...

uni-app 在已有的数据对象中动态添加更多的数据对象

原数据对象 flowData: {list: [], // 数据值column: 2, // 瀑布列数columnSpace: 2 // 瀑布列宽间距 } 动态添加后的数据对象 flowData: {list: [], // 数据值column: 2, // 瀑布列数columnSpace: 2, // 瀑布列宽间距column_1: [],column_2: [] } 动态添加更多的数据对象的…...

【LeetCode】17. 电话号码的字母组合

1 问题 给定一个仅包含数字 2-9 的字符串&#xff0c;返回所有它能表示的字母组合。答案可以按 任意顺序 返回。 给出数字到字母的映射如下&#xff08;与电话按键相同&#xff09;。注意 1 不对应任何字母。 示例 1&#xff1a; 输入&#xff1a;digits “23” 输出&…...

使用 Apache Kafka 进行发布-订阅通信中的微服务

发布-订阅消息系统在任何企业架构中都发挥着重要作用&#xff0c;因为它可以实现可靠的集成&#xff0c;而无需紧密耦合应用程序。在解耦的系统之间共享数据的能力并不是一个容易解决的问题。 考虑一家拥有多个使用不同语言和平台独立构建的应用程序的企业。它需要响应地共享数…...