如何将数据库字符集改为中文,让今后所有的数据库都支持中文
最后一行有我自己的my.ini文件
数据库输入中文数据时会变为乱码,
这个时候,我们为每个数据库设置字符集,太过于麻烦,为数据库单独设置重启后又会消失
Set character_set_database=’utf8’;
Set character_set_server=’utf8’;
先查看当前数据库参数
输入代码:
Show variables like ‘char%’;
set character_set_database='utf8';
Show variables like ‘char%’;
为了确保新创建的数据库和表默认使用UTF-8编码,可以在MySQL的配置文件my.cnf
或my.ini
中添加或修改以下参数:
这样的方式可以让今后所有的数据库新建时默认utf-8
[client]
default-character-set=utf8mb4[mysql]
default-character-set=utf8mb4[mysqld]
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
目前只能针对某一数据库来进行,所以直接使用就行
ALTER DATABASE your_database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
通过以上步骤就可以将整个数据库都改为UTF-8支持中文
my.ini
(在Unix/Linux系统中通常称为my.cnf
)是MySQL数据库的配置文件,用于指定MySQL服务器的各种设置,包括字符集、端口、数据目录等。根据操作系统和安装方式的不同,这个文件可能位于不同的位置。以下是寻找my.ini
或my.cnf
文件的一些常见位置:
Windows 系统
-
默认安装路径:
C:\ProgramData\MySQL\MySQL Server X.Y\my.ini
或C:\Program Files\MySQL\MySQL Server X.Y\my.ini
其中
X.Y
代表您的MySQL版本号。 -
通过MySQL Installer安装:如果您使用的是MySQL Installer来安装MySQL,那么配置文件可能会被放置在上述默认位置之一。
-
自定义路径:如果在安装过程中指定了不同的配置文件路径,则需要参考当时的安装记录或文档。
-
查看当前使用的配置文件路径:您可以通过以下命令查看MySQL正在使用的配置文件的位置。
mysql> SHOW VARIABLES LIKE 'explicit_defaults_for_timestamp';
但是更直接的方式是在命令行下运行:
mysqld --verbose --help | findstr "Default options" -A 10
Unix/Linux 系统
-
标准位置:
/etc/my.cnf
/etc/mysql/my.cnf
~/.my.cnf
(用户特定配置)
-
其他可能位置:MySQL服务启动时会按照特定顺序查找配置文件,您可以使用以下命令找到MySQL实际加载的配置文件:
mysqld --verbose --help | grep -A 1 "Default options"
这个命令将列出MySQL搜索配置文件的顺序和位置。
-
Docker容器内:如果MySQL是在Docker容器中运行,配置文件可能是通过挂载卷的方式提供的,或者是在容器内部的一个自定义位置。您可以进入容器检查:
docker exec -it container_name bash
查找配置文件的具体步骤
-
Windows:
- 打开文件资源管理器。
- 导航至上述提到的可能位置之一。
- 如果找不到,请尝试使用搜索功能查找
my.ini
或my.cnf
文件。
-
Linux/Unix:
- 打开终端。
- 使用
locate
或find
命令查找配置文件:
或者sudo updatedb # 更新数据库以确保locate能找到最新的文件 locate my.cnf
find / -name my.cnf 2>/dev/null
一旦找到了正确的配置文件,就可以按照之前提供的指南进行编辑以修改字符集设置。记得在修改后重启MySQL服务使更改生效。
以下为我的my.ini全文
原文链接各个系统如何寻找数据库的my.ini并进行修改-CSDN博客
# Other default tuning values
# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Linux you can copy this file to /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options
# (@localstatedir@ for this installation) or to
# ~/.my.cnf to set user-specific options.
#
# On Windows, when MySQL has been installed using MySQL Installer you
# should keep this file in the ProgramData directory of your server
# (e.g. C:\ProgramData\MySQL\MySQL Server X.Y). To make sure the server
# reads the config file, use the startup option "--defaults-file".
#
# To run the server from the command line, execute this in a
# command line shell, e.g.
# mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"
#
# To install the server as a Windows service manually, execute this in a
# command line shell, e.g.
# mysqld --install MySQLXY --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"
#
# And then execute this in a command line shell to start the server, e.g.
# net start MySQLXY
#
#
# Guidelines for editing this file
# ----------------------------------------------------------------------
#
# In this file, you can use all long options that the program supports.
# If you want to know the options a program supports, start the program
# with the "--help" option.
#
# More detailed information about the individual options can also be
# found in the manual.
#
# For advice on how to change settings please see
# https://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
#
#
# CLIENT SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by MySQL client applications.
# Note that only client applications shipped by MySQL are guaranteed
# to read this section. If you want your own MySQL client program to
# honor these values, you need to specify it as an option during the
# MySQL client library initialization.
#
[client]default_character-set=utf8mb4# pipe=# socket=MYSQLport=3306[mysql]
no-beepdefault-character-set=utf8mb4# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
# server_type=3
[mysqld]
character_set_server=utf8mb4
collation_server=utf8mb4_unicode_ci # The next three options are mutually exclusive to SERVER_PORT below.
# skip-networking
# enable-named-pipe
# shared-memory# shared-memory-base-name=MYSQL# The Pipe the MySQL Server will use
# socket=MYSQL# The access control granted to clients on the named pipe created by the MySQL Server.
# named-pipe-full-access-group=# The TCP/IP Port the MySQL Server will listen on
port=3306# Path to installation directory. All paths are usually resolved relative to this.
# basedir="C:/Program Files/MySQL/MySQL Server 5.7/"# Path to the database root
datadir=C:/ProgramData/MySQL/MySQL Server 5.7/Data# The default character set that will be used when a new schema or table is
# created and no character set is defined
# character-set-server=# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB# The current server SQL mode, which can be set dynamically.
# Modes affect the SQL syntax MySQL supports and the data validation checks it performs. This
# makes it easier to use MySQL in different environments and to use MySQL together with other
# database servers.
sql-mode="ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"# General and Slow logging.
log-output=FILEgeneral-log=0general_log_file="DESKTOP-QNC8DKQ.log"slow-query-log=1slow_query_log_file="DESKTOP-QNC8DKQ-slow.log"long_query_time=10# Error Logging.
log-error="DESKTOP-QNC8DKQ.err"# ***** Group Replication Related *****
# Specifies the base name to use for binary log files. With binary logging
# enabled, the server logs all statements that change data to the binary
# log, which is used for backup and replication.
# log-bin# ***** Group Replication Related *****
# Specifies the server ID. For servers that are used in a replication topology,
# you must specify a unique server ID for each replication server, in the
# range from 1 to 2^32 − 1. "Unique" means that each ID must be different
# from every other ID in use by any other replication source or replica.
server-id=1# ***** Group Replication Related *****
# Indicates how table and database names are stored on disk and used in MySQL.
# Value 0 = Table and database names are stored on disk using the lettercase specified in the CREATE
# TABLE or CREATE DATABASE statement. Name comparisons are case-sensitive. You should not
# set this variable to 0 if you are running MySQL on a system that has case-insensitive file
# names (such as Windows or macOS). If you force this variable to 0 with
# --lower-case-table-names=0 on a case-insensitive file system and access MyISAM tablenames
# using different lettercases, index corruption may result.
# Value 1 = Table names are stored in lowercase on disk and name comparisons are not case-sensitive.
# MySQL converts all table names to lowercase on storage and lookup. This behavior also applies
# to database names and table aliases.
# Value 2 = Table and database names are stored on disk using the lettercase specified in the CREATE TABLE
# or CREATE DATABASE statement, but MySQL converts them to lowercase on lookup. Name comparisons
# are not case-sensitive. This works only on file systems that are not case-sensitive! InnoDB
# table names and view names are stored in lowercase, as for lower_case_table_names=1.
lower_case_table_names=1# This variable is used to limit the effect of data import and export operations, such as
# those performed by the LOAD DATA and SELECT ... INTO OUTFILE statements and the
# LOAD_FILE() function. These operations are permitted only to users who have the FILE privilege.
secure-file-priv="C:/ProgramData/MySQL/MySQL Server 5.7/Uploads"# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
# connection limit has been reached.
max_connections=151# The number of open tables for all threads. Increasing this value
# increases the number of file descriptors that mysqld requires.
# Therefore you have to make sure to set the amount of open files
# allowed to at least 4096 in the variable "open-files-limit" in
# section [mysqld_safe]
table_open_cache=2000# Defines the maximum size of internal in-memory temporary tables created
# by the MEMORY storage engine and, as of MySQL 8.0.28, the TempTable storage
# engine. If an internal in-memory temporary table exceeds this size, it is
# automatically converted to an on-disk internal temporary table.
tmp_table_size=51M#*** MyISAM Specific options
# The maximum size of the temporary file that MySQL is permitted to use while re-creating a
# MyISAM index (during REPAIR TABLE, ALTER TABLE, or LOAD DATA). If the file size would be
# larger than this value, the index is created using the key cache instead, which is slower.
# The value is given in bytes.
myisam_max_sort_file_size=2146435072# The size of the buffer that is allocated when sorting MyISAM indexes during a REPAIR TABLE
# or when creating indexes with CREATE INDEX or ALTER TABLE.
myisam_sort_buffer_size=92M# Size of the Key Buffer, used to cache index blocks for MyISAM tables.
# Do not set it larger than 30% of your available memory, as some memory
# is also required by the OS to cache rows. Even if you're not using
# MyISAM tables, you should still set it to 8-64M as it will also be
# used for internal temporary disk tables.
key_buffer_size=8M# Each thread that does a sequential scan for a MyISAM table allocates a buffer
# of this size (in bytes) for each table it scans. If you do many sequential
# scans, you might want to increase this value, which defaults to 131072. The
# value of this variable should be a multiple of 4KB. If it is set to a value
# that is not a multiple of 4KB, its value is rounded down to the nearest multiple
# of 4KB.
read_buffer_size=128K# This variable is used for reads from MyISAM tables, and, for any storage engine,
# for Multi-Range Read optimization.
read_rnd_buffer_size=256K#*** INNODB Specific options ***
# innodb_data_home_dir=# Use this option if you have a MySQL server with InnoDB support enabled
# but you do not plan to use it. This will save memory and disk space
# and speed up some things.
# skip-innodb# If set to 1, InnoDB will flush (fsync) the transaction logs to the
# disk at each commit, which offers full ACID behavior. If you are
# willing to compromise this safety, and you are running small
# transactions, you may set this to 0 or 2 to reduce disk I/O to the
# logs. Value 0 means that the log is only written to the log file and
# the log file flushed to disk approximately once per second. Value 2
# means the log is written to the log file at each commit, but the log
# file is only flushed to disk approximately once per second.
innodb_flush_log_at_trx_commit=1# The size in bytes of the buffer that InnoDB uses to write to the log files on
# disk. The default value changed from 8MB to 16MB with the introduction of 32KB
# and 64KB innodb_page_size values. A large log buffer enables large transactions
# to run without the need to write the log to disk before the transactions commit.
# Thus, if you have transactions that update, insert, or delete many rows, making
# the log buffer larger saves disk I/O.
innodb_log_buffer_size=16M# The size in bytes of the buffer pool, the memory area where InnoDB caches table
# and index data. The default value is 134217728 bytes (128MB). The maximum value
# depends on the CPU architecture; the maximum is 4294967295 (232-1) on 32-bit systems
# and 18446744073709551615 (264-1) on 64-bit systems. On 32-bit systems, the CPU
# architecture and operating system may impose a lower practical maximum size than the
# stated maximum. When the size of the buffer pool is greater than 1GB, setting
# innodb_buffer_pool_instances to a value greater than 1 can improve the scalability on
# a busy server.
innodb_buffer_pool_size=128M# Size of each log file in a log group. You should set the combined size
# of log files to about 25%-100% of your buffer pool size to avoid
# unneeded buffer pool flush activity on log file overwrite. However,
# note that a larger logfile size will increase the time needed for the
# recovery process.
innodb_log_file_size=48M# Defines the maximum number of threads permitted inside of InnoDB. A value
# of 0 (the default) is interpreted as infinite concurrency (no limit). This
# variable is intended for performance tuning on high concurrency systems.
# InnoDB tries to keep the number of threads inside InnoDB less than or equal to
# the innodb_thread_concurrency limit. Once the limit is reached, additional threads
# are placed into a "First In, First Out" (FIFO) queue for waiting threads. Threads
# waiting for locks are not counted in the number of concurrently executing threads.
innodb_thread_concurrency=17# The increment size (in MB) for extending the size of an auto-extend InnoDB system tablespace file when it becomes full.
innodb_autoextend_increment=64# The number of regions that the InnoDB buffer pool is divided into.
# For systems with buffer pools in the multi-gigabyte range, dividing the buffer pool into separate instances can improve concurrency,
# by reducing contention as different threads read and write to cached pages.
innodb_buffer_pool_instances=8# Determines the number of threads that can enter InnoDB concurrently.
innodb_concurrency_tickets=5000# Specifies how long in milliseconds (ms) a block inserted into the old sublist must stay there after its first access before
# it can be moved to the new sublist.
innodb_old_blocks_time=1000# When this variable is enabled, InnoDB updates statistics during metadata statements.
innodb_stats_on_metadata=0# When innodb_file_per_table is enabled (the default in 5.6.6 and higher), InnoDB stores the data and indexes for each newly created table
# in a separate .ibd file, rather than in the system tablespace.
innodb_file_per_table=1# Use the following list of values: 0 for crc32, 1 for strict_crc32, 2 for innodb, 3 for strict_innodb, 4 for none, 5 for strict_none.
innodb_checksum_algorithm=0# If this is set to a nonzero value, all tables are closed every flush_time seconds to free up resources and
# synchronize unflushed data to disk.
# This option is best used only on systems with minimal resources.
flush_time=0# The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use
# indexes and thus perform full table scans.
join_buffer_size=256K# The maximum size of one packet or any generated or intermediate string, or any parameter sent by the
# mysql_stmt_send_long_data() C API function.
max_allowed_packet=4M# If more than this many successive connection requests from a host are interrupted without a successful connection,
# the server blocks that host from performing further connections.
max_connect_errors=100# Changes the number of file descriptors available to mysqld.
# You should try increasing the value of this option if mysqld gives you the error "Too many open files".
open_files_limit=4161# If you see many sort_merge_passes per second in SHOW GLOBAL STATUS output, you can consider increasing the
# sort_buffer_size value to speed up ORDER BY or GROUP BY operations that cannot be improved with query optimization
# or improved indexing.
sort_buffer_size=256K# Specify the maximum size of a row-based binary log event, in bytes.
# Rows are grouped into events smaller than this size if possible. The value should be a multiple of 256.
binlog_row_event_max_size=8K# If the value of this variable is greater than 0, a replica synchronizes its master.info file to disk.
# (using fdatasync()) after every sync_master_info events.
sync_master_info=10000# If the value of this variable is greater than 0, the MySQL server synchronizes its relay log to disk.
# (using fdatasync()) after every sync_relay_log writes to the relay log.
sync_relay_log=10000# If the value of this variable is greater than 0, a replica synchronizes its relay-log.info file to disk.
# (using fdatasync()) after every sync_relay_log_info transactions.
sync_relay_log_info=10000# Load mysql plugins at start."plugin_x ; plugin_y".
# plugin_load# The TCP/IP Port the MySQL Server X Protocol will listen on.
# loose_mysqlx_port=33060
Windows 如何重启数据库
原文链接 Windows 如何重启数据库-CSDN博客
在Windows操作系统上重启MySQL数据库服务可以通过多种方式进行,包括使用命令行工具和服务管理控制台。以下是具体步骤:
方法一:通过命令提示符(CMD)重启MySQL服务
打开命令提示符:
按 Win + R 键,输入 cmd,然后按 Enter 键打开命令提示符窗口。
停止MySQL服务: 在命令提示符中输入以下命令以停止MySQL服务。请注意,您可能需要管理员权限来执行这些命令。
net stop MySQLX.Y
其中 MySQLX.Y 应替换为您的MySQL服务名称。默认情况下,这可能是 MySQL57, MySQL80 等,取决于您的安装版本。
启动MySQL服务: 输入以下命令以启动MySQL服务:
net start MySQLX.Y
方法二:通过服务管理控制台重启MySQL服务
打开服务管理控制台:
按 Win + R 键,输入 services.msc,然后按 Enter 键打开服务管理控制台。
找到MySQL服务:
在服务列表中向下滚动,直到找到与MySQL相关的服务项,例如 MySQL57, MySQL80 或者您自定义的服务名。
重启MySQL服务:
右键点击MySQL服务项,选择 重启(Restart)。如果服务当前正在运行,此操作将首先停止服务,然后立即重新启动它。
方法三:通过MySQL Workbench重启服务(如果有安装)
如果您安装了MySQL Workbench,也可以通过图形界面来重启MySQL服务:
打开MySQL Workbench。
在左侧的导航栏中,找到并点击 Instance 下的 Startup / Shutdown。
如果服务器当前正在运行,您可以点击 Shutdown 来停止服务,之后再点击 Startup 来启动服务。
注意事项
管理员权限:确保以管理员身份运行命令提示符或服务管理控制台,特别是在执行停止和启动服务的操作时。
确认服务名称:如果不确定MySQL服务的确切名称,可以打开服务管理控制台 (services.msc) 查看所有服务,并找到正确的MySQL服务名称。
等待完成:服务停止和启动过程可能需要一些时间,请耐心等待直至操作完成。
通过以上任意一种方法都可以实现MySQL数据库服务的重启,以便让配置更改生效。
相关文章:
如何将数据库字符集改为中文,让今后所有的数据库都支持中文
最后一行有我自己的my.ini文件 数据库输入中文数据时会变为乱码, 这个时候,我们为每个数据库设置字符集,太过于麻烦,为数据库单独设置重启后又会消失 Set character_set_database’utf8’; Set character_set_server’utf8’; …...
Linux-C/C++--深入探究文件 I/O (下)(文件共享、原子操作与竞争冒险、系统调用、截断文件)
经过上一章内容的学习,了解了 Linux 下空洞文件的概念;open 函数的 O_APPEND 和 O_TRUNC 标志;多次打开同一文件;复制文件描述符;等内容 本章将会接着探究文件IO,讨论如下主题内容。 文件共享介绍&…...
Linux Bash 中使用重定向运算符的 5 种方法
注:机翻,未校。 Five ways to use redirect operators in Bash Posted: January 22, 2021 | by Damon Garn Redirect operators are a basic but essential part of working at the Bash command line. See how to safely redirect input and output t…...
opengrok_windows_环境搭建
目录 软件列表 软件安装 工程索引 编辑 工程部署 问题列表 软件列表 软件名下载地址用途JDKhttps://download.java.net/openjdk/jdk16/ri/openjdk-1636_windows-x64_bin.zipindex 使用java工具tomcathttps://dlcdn.apache.org/tomcat/tomcat-9/v9.0.98/bin/apache-tom…...
【无法下载github文件】虚拟机下ubuntu无法拉取github文件
修改hosts来进行解决。 步骤一:打开hosts文件 sudo vim /etc/hosts步骤二:查询 github.com的ip地址 https://sites.ipaddress.com/github.com/#ipinfo将github.com的ip地址添加到hosts文件末尾,如下所示。 140.82.114.3 github.com步骤三…...
python——句柄
一、概念 句柄指的是操作系统为了标识和访问对象而提供的一个标识符,在操作系统中,每个对象都有一个唯一的句柄,通过句柄可以访问对象的属性和方法。例如文件、进程、窗口等都有句柄。在编程中,可以通过句柄来操作这些对象&#x…...
.Net Core微服务入门系列(一)——项目搭建
系列文章目录 1、.Net Core微服务入门系列(一)——项目搭建 2、.Net Core微服务入门全纪录(二)——Consul-服务注册与发现(上) 3、.Net Core微服务入门全纪录(三)——Consul-服务注…...
Net Core微服务入门全纪录(三)——Consul-服务注册与发现(下)
系列文章目录 1、.Net Core微服务入门系列(一)——项目搭建 2、.Net Core微服务入门全纪录(二)——Consul-服务注册与发现(上) 3、.Net Core微服务入门全纪录(三)——Consul-服务注…...
[苍穹外卖] 1-项目介绍及环境搭建
项目介绍 定位:专门为餐饮企业(餐厅、饭店)定制的一款软件产品 功能架构: 管理端 - 外卖商家使用 用户端 - 点餐用户使用 技术栈: 开发环境的搭建 整体结构: 前端环境 前端工程基于 nginx 运行 - Ngi…...
【PCIe 总线及设备入门学习专栏 2 -- PCIe 的 LTSSM 和 Enumeration】
文章目录 OverviewLTSSM StatesDetect StatesDETECT_QUIETDETECT_ACTDETECT_WAITPolling StatesPOLL_ACTIVEPOLL_CONFIGPOLL_COMPLIANCEConfiguration StatesCONFIG_LINKWD_STARTCONFIG_LINKWD_ACCEPTCONFIG_LANENUM_WAITCONFIG_LANENUM_ACCEPTCONFIG_COMPLETECONFIG_IDLERecov…...
Redis 性能优化:多维度技术解析与实战策略
文章目录 1 基准性能2 使用 slowlog 优化耗时命令3 big key 优化4 使用 lazy free 特性5 缩短键值对的存储长度6 设置键值的过期时间7 禁用耗时长的查询命令8 使用 Pipeline 批量操作数据9 避免大量数据同时失效10 客户端使用优化11 限制 Redis 内存大小12 使用物理机而非虚拟机…...
QT开发技术 【基于TinyXml2的对类进行序列化和反序列化】一
一、对TinyXml2 进行封装 使用宏 实现序列化和反序列化 思路: 利用宏增加一个类函数,使用序列化器调用函数进行序列化 封装宏示例 #define XML_SERIALIZER_BEGIN(ClassName) \ public: \virtual void ToXml(XMLElement* parentElem, bool bSerialize …...
麦田物语学习笔记:创建TransitionManager控制人物场景切换
基本流程 制作场景之间的切换 1.代码思路 (1)为了实现不同场景切换,并且保持当前的persistentScene一直存在,则需要一个Manager去控制场景的加载和卸载,并且在加载每一个场景之后,都要将当前的场景Set Active Scene,保证其为激活的场景,在卸载的时候也可以方便调用当前激活的场…...
2025年最新汽车零部件企业销售项目管理解决方案
在汽车零部件企业,销售项目管理的不规范和销售预测的不准确性常导致生产计划无法及时调整,因此客户关系常常中断,导致企业业务机会的丧失。为解决该问题,企业需要投入更多资源以优化销售流程与销售预测。 1、360多维立体客户视图…...
创建基于Prism框架的WPF应用(NET Framework)项目
创建基于Prism框架的WPF应用(NET Framework)项目 1、创建WPF(NET Framework)项目并整理结构 (1)、创建WPF(NET Framework)项目; (2)、添加Views和…...
AIGC视频生成模型:Meta的Emu Video模型
大家好,这里是好评笔记,公主号:Goodnote,专栏文章私信限时Free。本文详细介绍Meta的视频生成模型Emu Video,作为Meta发布的第二款视频生成模型,在视频生成领域发挥关键作用。 🌺优质专栏回顾&am…...
【PowerQuery专栏】PowerQuery提取XML数据
XML数据和Json 数据类型都是比较典型的层次数据类型,XML的数据格式非常的对称。所有的数据均是由标签对组成,图为典型的XML文件类型的数据。 在PowerQuery中进行XML数据类型解析采用的是Xml.Document 函数来进行文件内容的解析,Xml.Document 目前有三个可用参数。 参数1为数…...
流行的开源高性能数据同步工具 - Apache SeaTunnel 整体架构运行原理
概述 背景 数据集成在现代企业的数据治理和决策支持中扮演着至关重要的角色。随着数据源的多样化和数据量的迅速增长,企业需要具备强大的数据集成能力来高效地处理和分析数据。SeaTunnel通过其高度可扩展和灵活的架构,帮助企业快速实现多源数据的采集、…...
基于单片机的多功能蓝牙语音智能台灯(论文+源码)
1总体方案设计 通过需求分析,本设计多功能蓝牙语音智能台灯的系统框图如图2.1所示,系统架构包括主控制器STM32F103单片机、HC-06蓝牙通信模块、LU-ASR01语音识别模块、OLED液晶、LED灯、按键等器件,在使用时用户可以通过手机APP、语音识别、…...
leetcode刷题记录(七十二)——146. LRU 缓存
(一)问题描述 146. LRU 缓存 - 力扣(LeetCode)146. LRU 缓存 - 请你设计并实现一个满足 LRU (最近最少使用) 缓存 [https://baike.baidu.com/item/LRU] 约束的数据结构。实现 LRUCache 类: * LRUCache(int capacity)…...
力扣203题(3)
题目及之前的两种解法大家可以移步到这里: https://blog.csdn.net/suibiansa_/article/details/145242573?spm1001.2014.3001.5501 力扣203题—— 移除链表元素-CSDN博客 今天呢我们来写一下第三种解法: 虚拟创建一个头结点 ListNode firstnew Lis…...
网络安全:信息时代的守护者
随着互联网的快速发展,网络安全问题日益成为全球关注的焦点。无论是个人用户、企业组织还是政府部门,网络安全都已成为保障信息安全、保护隐私、确保社会秩序的基石。在这个数字化时代,如何应对复杂多变的网络安全威胁,成为了我们…...
【博客之星2024年度总评选】年度回望:我的博客之路与星光熠熠
【个人主页】Francek Chen 【人生格言】征途漫漫,惟有奋斗! 【热门专栏】大数据技术基础 | 数据仓库与数据挖掘 | Python机器学习 文章目录 前言一、个人成长与盘点(一)机缘与开端(二)收获与分享 二、年度创…...
接口自动化测试
APITEST: 接口自动化测试 目录结构介绍: conf目录:用来存放项目运行环境、执行环境相关的配置参数 testsuite目录:测试用例在此目录编写,pytest默认约定test开头的文件和方法为测试用例,不满足条件的不会被执行&#x…...
题海拾贝:力扣 138.随机链表的复制
Hello大家好!很高兴我们又见面啦!给生活添点passion,开始今天的编程之路! 我的博客:<但凡. 我的专栏:《编程之路》、《数据结构与算法之美》、《题海拾贝》 欢迎点赞,关注! 1、题…...
第7章:Python TDD测试Franc对象乘法功能
写在前面 这本书是我们老板推荐过的,我在《价值心法》的推荐书单里也看到了它。用了一段时间 Cursor 软件后,我突然思考,对于测试开发工程师来说,什么才更有价值呢?如何让 AI 工具更好地辅助自己写代码,或许…...
PyTorch基本功能与实现代码
PyTorch是一个开源的深度学习框架,提供了丰富的函数和工具,以下为其主要功能的归纳: 核心数据结构: • 张量(Tensor):类似于Numpy的ndarray,是PyTorch中基本的数据结构,…...
【2024 CSDN博客之星】技术洞察类:从DeepSeek-V3的成功,看MoE混合专家网络对深度学习算法领域的影响(MoE代码级实战)
目录 一、引言 1.1 本篇文章侧重点 1.2 技术洞察—MoE(Mixture-of-Experts,混合专家网络) 二、MoE(Mixture-of-Experts,混合专家网络) 2.1 技术原理 2.2 技术优缺点 2.3 业务代码实践 2.3.1 业务场…...
Single-Model and Any-Modality for Video Object Tracking——2024——cvpr-阅读笔记
Single-Model and Any-Modality for Video Object Tracking 摘要相关工作创新处MethodShared embeddingModal promptingRGB Tracker based on TransformerOverall ExperiimentDatasetRGB-D samples are sourced from DepthTrackRGB-T samples are extracted from LasHeRRGB-E s…...
Java中的构造器
Java中的构造器详解 1. 什么是构造器 构造器(Constructor) 是一种特殊的方法,用于在创建对象时初始化对象的状态。构造器的名字必须与类名相同,且没有返回类型,连 void 也不能使用。 2. 构造器的特点 名称与类名相同…...
Restormer: Efficient Transformer for High-Resolution Image Restoration解读
论文地址:Restormer: Efficient Transformer for High-Resolution Image Restoration。 摘要 由于卷积神经网络(CNN)在从大规模数据中学习可推广的图像先验方面表现出色,这些模型已被广泛应用于图像复原及相关任务。近年来&…...
将 AzureBlob 的日志通过 Azure Event Hubs 发给 Elasticsearch(3.纯python的实惠版)
前情: 将 AzureBlob 的日志通过 Azure Event Hubs 发给 Elasticsearch(1.标准版)-CSDN博客 将 AzureBlob 的日志通过 Azure Event Hubs 发给 Elasticsearch(2.换掉付费的Event Hubs)-CSDN博客 python脚本实现 厉害的…...
成就与远见:2024年技术与思维的升华
个人主页:chian-ocean 前言: 2025年1月17日,2024年博客之星年度评选——创作影响力评审的入围名单公布。我很荣幸能够跻身Top 300,虽然与顶尖博主仍有一定差距,但这也为我提供了更加明确的发展方向与指引。展望崭新的2025年&…...
BGP分解实验·9——路由聚合与条件性通告(1)
路由聚合是有效控制缩减BGP路由表的方法之一,路由聚合的前提和IGP一样,需要有路由目标存在BGP表中,与IGP不同的是,BGP路由聚合可以定义按需抑制路由的能力。 实验拓扑如下所示: 现在开始把从R1的R5的基础配置先准备好…...
栈和队列(C语言)
目录 数据结构之栈 定义 实现方式 基本功能实现 1)定义,初始化栈 2)入栈 3)出栈 4)获得栈顶元素 5)获得栈中有效元素个数 6)检测栈是否为空 7)销毁栈 数据结构之队列 定义 实现方…...
Jenkins-获取build用户信息
需求: 代码发布后,将发布结果发送至相关运维同学邮箱,需要获取发布人的信息。jenkins默认是没有相关内置变量的。 需要通过插件的方式进行解决: 插件: user build vars plugin 部署后,可使用的变量&…...
大数据学习(37)- Flink运行时架构
&&大数据学习&& 🔥系列专栏: 👑哲学语录: 承认自己的无知,乃是开启智慧的大门 💖如果觉得博主的文章还不错的话,请点赞👍收藏⭐️留言📝支持一下博主哦ᾑ…...
opengrok_windows_多工程环境搭建
目录 多工程的目录 工程代码下载和log配置 工程的索引 工程部署 工程测试 参考列表 多工程的目录 工程代码下载和log配置 工程代码下载 在每个工程的src目录下,下载工程代码,以下载pulseaudio的代码为例。 git clone gitgithub.com…...
Python网络自动化运维---SSH模块
目录 SSH建立过程 实验环境准备 一.SSH模块 1.1.Paramiko模块 1.1.1实验代码 1.1.2代码分段讲解 1.1.3代码运行过程 1.2Netmiko模块 Netmiko模块对比paramiko模块的改进: 1.2.1实验代码 1.2.2代码分段讲解 1.2.3代码运行过程 二.Paramiko模块和Ne…...
Failed to restart nginx.service Unit nginx.service not found
当你遇到 Failed to restart nginx.service: Unit nginx.service not found 错误时,这意味着系统无法找到 Nginx 的服务单元文件。这通常是因为 Nginx 没有通过 systemd 管理,或者 Nginx 没有正确安装。 解决方法 1. 检查 Nginx 是否正确安装 首先&am…...
学习记录之原型,原型链
构造函数创建对象 Person和普通函数没有区别,之所以是构造函数在于它是通过new关键字调用的,p就是通过构造函数Person创建的实列对象 function Person(age, name) {this.age age;this.name name;}let p new Person(18, 张三);prototype prototype n…...
【Redis】5种基础数据结构介绍及应用
考察频率难度60%⭐⭐ 这个方向的问题也是非常基础的,所以一般不会直接被当做一个单独的问题。常见的形式是结合你简历上的项目或者场景题来提问,即实际应用场景、是否可以优化、如何选择等。 由于场景题和实际项目差异较大,所以本文就只做基…...
基于GRU实现股价多变量时间序列预测(PyTorch版)
前言 系列专栏:【深度学习:算法项目实战】✨︎ 涉及医疗健康、财经金融、商业零售、食品饮料、运动健身、交通运输、环境科学、社交媒体以及文本和图像处理等诸多领域,讨论了各种复杂的深度神经网络思想,如卷积神经网络、循环神经网络、生成对抗网络、门控循环单元、长短期记…...
Java Web开发高级——Spring Boot与Docker容器化部署
随着云计算和微服务架构的快速发展,容器化已成为现代应用部署的重要手段。Docker作为最受欢迎的容器化技术之一,使得开发者能够将应用及其所有依赖打包到一个可移植的容器中,简化了开发、测试、部署和运维的流程。本篇文章将通过以下内容讲解…...
计算机网络——网络层
重点内容: (1) 虚拟互连网络的概念。 (2) IP 地址与物理地址的关系。 (3) 传统的分类的 IP 地址(包括子网掩码)和无分类域间路由选择 CIDR 。 (4) 路由选择协议的工作原理。 目录 重点内容: 一.网络层提供的两种服务 二…...
每打开一个chrome页面都会【自动打开F12开发者模式】,原因是 使用HBuilderX会影响谷歌浏览器的浏览模式
打开 HBuilderX,点击 运行 -> 运行到浏览器 -> 设置web服务器 -> 添加chrome浏览器安装路径 chrome谷歌浏览器插件 B站视频下载助手插件: 参考地址:Chrome插件 - B站下载助手(轻松下载bilibili哔哩哔哩视频)…...
cesium绕点旋转
绕点旋转的原理可以理解为相机一直看向一个点,不断改变相机的位置 let position Cesium.Cartesian3.fromDegrees(longitude, latitude) let lookAtTimer setInterval(() > {let heading viewer.camera.heading;let pitch viewer.camera.pitch;if (heading &…...
JavaScript系列(36)--微服务架构详解
JavaScript微服务架构详解 🏗️ 今天,让我们深入了解JavaScript的微服务架构,这是构建大规模分布式系统的关键技术。 微服务基础概念 🌟 💡 小知识:微服务架构是一种将应用程序构建为一组小型服务的方法&…...
神经网络基础 | 给定条件下推导对应的卷积层参数
神经网络基础 | 给定条件下推导对应的卷积层参数 按照 PyTorch 文档中 给定的设置: H o u t ⌊ H i n 2 padding [ 0 ] − dilation [ 0 ] ( kernel_size [ 0 ] − 1 ) − 1 stride [ 0 ] 1 ⌋ H_{out} \left\lfloor\frac{H_{in} 2 \times \text{padding}[0]…...
面向CTF的python_requests库的学习笔记
看师傅们写的各种脚本羡慕不已,自己却只会一点一点手搓,于是来做个笔记 requests库是干嘛的? 顾名思义,request就是请求,可以用来向服务器发送请求。它可以代替你在网站上发送请求报文,并接受回应报文。简…...