增删改查(CRUD)操作
文章目录
- MySQL系列:
- 1.CRUD简介
- 2.Create(创建)
- 2.1单行数据全列插入
- 2.2 单行数据指定插入
- 2.3 多⾏数据指定列插⼊
- 3.Retrieve(读取)
- 3.1 Select查询
- 3.1.1 全列查询
- 3.1.2 指定列查询
- 3.1.3 查询字段为表达式(都是临时表不会对原有表数据产生影响)
- 3.1.4为查询结果指定别名
- 3.1.5查询结果去重
- 3.2 where 条件查询
- 比较运算符:
- 逻辑运算符:
- 3.2.1 where 基础查询
- 3.2.2where 范围查询
- 3.2.3 where 模糊查询
- 3.2.4 where NULL查询
- 3.2.5where AND,OR查询
- 3.3 Order by查询
- 3.3.1ASC查询
- 3.3.2 desc查询
- 3.3.3 ASC与desc查询
- 3.4 分页查询
- 4.Update(更新)
- 4.1.1 改写指定单列数据
- 4.1.2 改写指定多列数据
- 5.Delete(删除)
- 5.1.1指定单列删除
- 5.1.2删除整张表,插入一张演示表
- 6.总代码:
MySQL系列:
初识MySQL,MySQL常用数据类型和表的操作
有些前面博客提及的知识点这里都可以会省略,有兴趣的可以去观看前面内容。
1.CRUD简介
CRUD是对数据库中的记录进⾏基本的增删改查操作:
• Create (创建)
• Retrieve (读取)
• Update (更新)
• Delete (删除)
2.Create(创建)
语法: INSERT [INTO] table_name
[(column [, column] …)]
VALUES
(value_list) [, (value_list)] …
value_list: value, [, value] …
创建一个用于演示的表
2.1单行数据全列插入
value_list 中值的数量必须和定义表的列的数量及顺序⼀致
2.2 单行数据指定插入
value_list 中值的数量必须和指定列数量及顺序⼀致
2.3 多⾏数据指定列插⼊
在⼀条insert语句中也可以指定多个value_list,实现⼀次插⼊多⾏数据
在单行数据插入时推荐使用指定插入,当表数据多时可以更清楚的知道插入的内容.
指定位置去插入表属性的顺序也可以调换
注意插入时表属性不能缺少或者不赋值
Create(创建)代码:
#2.1单行数据全列插入
-- 插入第一行数据
insert into user values (1,'刘1');
-- 插入第二行
insert into user values (2,'刘2');#2.2单行数据指定插入
insert into user(id,name) values (3,'张三');insert into user(name,id) values ('赵六',6);#2.3 多行数据指定列插入
insert into user(id,name) values (4,'李四'),(5,'王五');
3.Retrieve(读取)
语法:
SELECT
[DISTINCT]
select_expr [, select_expr] …
[FROM table_references]
[WHERE where_condition]
[GROUP BY {col_name | expr}, …]
[HAVING where_condition]
[ORDER BY {col_name | expr } [ASC | DESC], … ]
[LIMIT {[offset,] row_count | row_count OFFSET offset}]
创建一个用于演示的表:
3.1 Select查询
3.1.1 全列查询
查询全部数据
3.1.2 指定列查询
查询所有人的编号、姓名和数学成绩
查询的顺序没有要求:
3.1.3 查询字段为表达式(都是临时表不会对原有表数据产生影响)
常量表达式:
也可以是常量的运算
表达式中包含⼀个字段(列于常量运算)
表达式中多个字段(列于列运算):
3.1.4为查询结果指定别名
语法:
1 SELECT column [AS] alias_name [, …] FROM table_name;
AS可以省略,别名如果包含空格必须⽤单引号包裹
将每个人的总分展示出来:
3.1.5查询结果去重
查看两条math为98的数据进行去重
去重的条件是所要求值全部相同
以下math相同但id分别为1,3
注意:
•
查询时不加限制条件会返回表中所有结果,如果表中的数据量过⼤,会把服务器的资源消耗殆尽
•
在⽣产环境不要使用不加限制条件的查询
Retrieve(Select )代码:CREATE TABLE if not exists exam(id BIGINT,name VARCHAR(20) COMMENT '同学姓名',chinese float COMMENT '语文成绩',math float COMMENT '数学成绩',english float COMMENT '英语成绩'
);
-- 插入测试数据
INSERT INTO exam (id,name, chinese, math, english) VALUES
(1, '唐三藏', 67, 98, 56),
(2, '孙悟空', 87, 78, 77),
(3, '猪悟能', 88, 98, 90),
(4, '曹孟德', 82, 84, 67),
(5, '刘孟德', 55, 85, 45),
(6, '孙权', 70, 73, 78),
(7, '宋公明', 75, 65, 30);
#3.1.1 全列查询
#使用*可以查询表中所有列的值
select * from exam;
#3.1.2 指定列查询
#• 查询所有人的编号、姓名和数学成绩
select id,name,math from exam;
#查询的顺序没有要求:
select name,english,id from exam;# 查询字段为表达式
#常量表达式:
select id,name,1 from exam;
#也可以是常量的运算
select id,name,1+1 from exam;
# 表达式中包含一个字段
select id,name,math+10 from exam;
#表达式中多个字段:
select id,name,chinese+math+english from exam;
# 3.1.3为查询结果指定别名
#将每个人的总分展示出来:
select id,name,chinese+math+english as 总分 from exam;
# 3.1.4查询结果去重
#查看两条math为98的数据进行去重
select math from exam;
3.2 where 条件查询
语法:
SELECT
select_expr [, select_expr] … [FROM table_references]
WHERE where_condition
比较运算符:
< , > , >= , <= 小于,大于,大于等于,小于等于
= MySQL中=同时代表赋值和判断 ,对于NULL不安全,NULL=NULL还是NULL
<=> 代表等于 对于NULL相对安全 NULL<=>NULL 结果为TRUE(1)
!= ,<> 代表不等于
IS NULL 是NULL
IS NOT NULL 不是NULL
value BETWEEN a0 AND a1
范围匹配,[a0, a1],如果a0 <= value <= a1,返回TRUE或1,NOT BETWEEN则取反
value IN (option, …) 如果value 在optoin列表中,则返回TRUE(1),NOT IN则取反
LIKE 模糊匹配,% 表⽰任意多个(包括0个)字符;_ 表⽰任意⼀个字符,NOT LIKE则取反
逻辑运算符:
AND 多个条件必须都为 TRUE(1),结果才是 TRUE(1)
OR 任意⼀个条件为 TRUE(1), 结果为 TRUE(1)
NOT 条件为 TRUE(1),结果为 FALSE(0)
3.2.1 where 基础查询
(1)查询语文<=70的
(2)查询数学高于语文的
(3)查询总分低于250的
这里我们需要了解select与from与where之间的优先级
首先执行的是from找到这个表,然后执行符合where条件的,
最后执行select返回在符合条件的要显示的列
所以是错误的当whiere执行时 total还没有被定义,select执行完后chinese+math+english as total 执行 total才定义完成
3.2.2where 范围查询
查询英语成绩在60~80之间的
查询数学成绩是 78 或者 79 或者 98 或者 99 分的同学及数学成绩
3.2.3 where 模糊查询
%表示任意多个(包括0个)字符;
%表示所有,等于没有指定条件
%xxx,表示以xxx结束,前面可以包含任意多个字符
xxx%,表示以xxx开头,后面可以包含任意多个字符
%xxx%,前面和后面可以包含任意多个字符,中间必须有xxx
表示任意一个字符,
严格匹配 写多少个_就表示多少个字符
是一个占位符
表示只有一个字符
_ xxx,表示以xxx结束,前面可以包含一个字符
xxx _,表示以xxx开头,后面可以包含一个字符
_XXX _,前面和后面可以包含一个字符,中间必须是xxx
%系列:
_系列:
3.2.4 where NULL查询
对NULLL与其他值进行运算结果为NULL
3.2.5where AND,OR查询
观察AND与OR的优先级:
AND的优先级高于OR
Retrieve(where )代码:
#3.2.1基础查询
#查询语文<=70的
#查询数学高于语文的
#查询总分低于250的
select id,name,chinese from exam where chinese<=70;
select id,name,chinese,math from exam where math>chinese;
select id,name, chinese+math+english as total from exam where (chinese+math+english)<250;
#3.2.2范围 查询英语成绩在60~80之间的 查询数学成绩是 78 或者 79 或者 98 或者 99 分的同学及数学成绩
select id,name,english from exam where english between 60 and 80;
select id,name,math from exam where math in(78,79,98,99);
#3.2.3 where 模糊查询
select id,name from exam where name like '%孟%';
select id,name from exam where name like '孙%';
select id,name from exam where name like '%德';
#_系列
select id,name from exam where name like '孙_';
select id,name from exam where name like '孙__';
select id,name from exam where name like '_孟_';
#3.2.3 where NULL查询
#插入一条null
insert into exam values (8,'张飞',88,98,NULL);
select *from exam where english is null;
select *from exam where english is not null;
#对NULLL与其他值进行运算结果为NULL
select id,name,chinese+math+english as total from exam;
3.3 Order by查询
语法:
– ASC 为升序(从⼩到⼤)
– DESC 为降序(从⼤到⼩)
– 默认为 ASC
SELECT … FROM table_name [WHERE …] ORDER BY {col_name | expr } [ASC | DESC], … ;
3.3.1ASC查询
对语文进行ASC
3.3.2 desc查询
对数学进行desc
3.3.3 ASC与desc查询
改一下数据观察同时对语文成绩进行asc,数学进行desc
来观察是否可以使⽤列的别名进⾏排序
注意在排序时NULL比任何值都小, 改一负数进行观察
Retrieve(Order by)代码:
#Order by查询
#对语文进行ASC
select id,name,chinese from exam order by chinese asc;
#对数学进行desc
select id,name,math from exam order by math desc;
#改一下数据观察同时对语文成绩进行asc,数学进行desc
select id,name,chinese,math from exam order by chinese asc, math desc;
#来观察是否可以使⽤列的别名进⾏排序
select id,name,chinese+math+english as total from exam order by chinese+math+english desc;
select id,name,chinese+math+english as total from exam order by total desc;
#注意在排序时NULL比任何值都小, 改一负数进行观察
select id,name,chinese+math+english as total from exam order by total desc;
3.4 分页查询
语法:-- 起始下标为 0
– 从 0 开始,筛选 num 条结果
SELECT … FROM table_name [WHERE …] [ORDER BY…] LIMIT num;
– 从 start 开始,筛选 num 条结果
SELECT … FROM table_name [WHERE …] [ORDER BY…] LIMIT start, num;
– 从 start 开始,筛选 num 条结果,⽐第⼆种⽤法更明确建议使⽤
SELECT … FROM table_name [WHERE …] [ORDER BY…] LIMIT num OFFSET start;
分页查询主要掌握查询页数与每页查询多少列之间的关系
插入一列数据:
insert into exam(id,name,chinese,math,english) values (9,‘李白’,94,91,77);
接下来将数据增加到9条分5页(第一条为0下标)
num=2;
start=(页数-1)*num
进行分页查询;
Retrieve(分页查询)代码:
#3.4 分页查询
#插入一列
insert into exam(id,name,chinese,math,english) values (9,'李白',94,91,77);select * from exam order by id desc limit 0,2;select * from exam order by id desc limit 2,2;select * from exam order by id desc limit 4,2;select * from exam order by id desc limit 6,2;select * from exam order by id desc limit 8,2;
4.Update(更新)
语法:
UPDATE [LOW_PRIORITY] [IGNORE] table_reference
SET assignment [, assignment] …
[WHERE where_condition]
[ORDER BY …]
[LIMIT row_count]
4.1.1 改写指定单列数据
将孙悟空的语文数学成绩都是加10
4.1.2 改写指定多列数据
将所有英语成绩*2
注意:• 不加where条件时,会导致全表数据被列新,谨慎操作
Update(更新)代码:
# 4.Update(更新)# 4.1.1 改写指定单行数据select name,chinese,math from exam where name ='孙悟空';update exam set chinese=chinese+10,math=math+10 where name '孙悟空';select name,chinese,math from exam where name ='孙悟空';# 4.1.2 改写指定多行数据,将所有英语成绩*2id,name,english from exam order by english asc ;update exam set english=english*2;id,name,english from exam order by english asc ;
5.Delete(删除)
语法: DELETE FROM tbl_name [WHERE where_condition] [ORDER BY …] [LIMIT row_count]
5.1.1指定单列删除
删除名为张飞的数据
5.1.2删除整张表,插入一张演示表
注意:Delete操作非常危险,执⾏Delete时不加条件会删除整张表的数据,谨慎操作
Delete(删除)代码:
#5.Delete# 5.1.1指定单列删除,删除名为张飞的数据
delete from exam where name='张飞';
select name from exam where name='张飞';
#5.1.2删除整张表,插入一张演示表
create table if not exists t_student(
id bigint not null comment'编号',
name varchar(20) not null comment'用户名'
);
insert into t_student values (1,'小明'),(2,'小龙'),(3,'小兰');
6.总代码:
#2Create(创建)
#创建一个用于演示的表
create table if not exists user(
id bigint not null comment'编号',
name varchar(20) not null comment'用户名'
);
#2.1单行数据全列插入
-- 插入第一行数据
insert into user values (1,'刘1');
-- 插入第二行
insert into user values (2,'刘2');#2.2单行数据指定插入
insert into user(id,name) values (3,'张三');
insert into user(name,id) values ('赵六',6);#2.3 多行数据指定列插入
insert into user(id,name) values (4,'李四'),(5,'王五');insert into user(name) values ('宋七');
#3.Retrieve(读取)
CREATE TABLE if not exists exam(id BIGINT,name VARCHAR(20) COMMENT '同学姓名',chinese float COMMENT '语文成绩',math float COMMENT '数学成绩',english float COMMENT '英语成绩'
);
-- 插入测试数据
INSERT INTO exam (id,name, chinese, math, english) VALUES
(1, '唐三藏', 67, 98, 56),
(2, '孙悟空', 87, 78, 77),
(3, '猪悟能', 88, 98, 90),
(4, '曹孟德', 82, 84, 67),
(5, '刘孟德', 55, 85, 45),
(6, '孙权', 70, 73, 78),
(7, '宋公明', 75, 65, 30);
#3.1.1 全列查询
#使用*可以查询表中所有列的值
select * from exam;
#3.1.2 指定列查询
#• 查询所有人的编号、姓名和数学成绩
select id,name,math from exam;
#查询的顺序没有要求:
select name,english,id from exam;
# 查询字段为表达式
#常量表达式:
select id,name,1 from exam;
#也可以是常量的运算
select id,name,1+1 from exam;
# 表达式中包含一个字段
select id,name,math+10 from exam;
#表达式中多个字段:
select id,name,chinese+math+english from exam;
# 3.1.3为查询结果指定别名
#将每个人的总分展示出来:
select id,name,chinese+math+english as 总分 from exam;
# 3.1.4查询结果去重
#查看两条math为98的数据进行去重
select math from exam;#3.2.1基础查询
#查询语文<=70的
#查询数学高于语文的
#查询总分低于250的
select id,name,chinese from exam where chinese<=70;
select id,name,chinese,math from exam where math>chinese;
select id,name, chinese+math+english as total from exam where (chinese+math+english)<250;
#3.2.2范围 查询英语成绩在60~80之间的 查询数学成绩是 78 或者 79 或者 98 或者 99 分的同学及数学成绩
select id,name,english from exam where english between 60 and 80;
select id,name,math from exam where math in(78,79,98,99);
#3.2.3 where 模糊查询
select id,name from exam where name like '%孟%';
select id,name from exam where name like '孙%';
select id,name from exam where name like '%德';
#_系列
select id,name from exam where name like '孙_';
select id,name from exam where name like '孙__';
select id,name from exam where name like '_孟_';
#3.2.3 where NULL查询
#插入一条null
insert into exam values (8,'张飞',88,98,NULL);
select *from exam where english is null;
select *from exam where english is not null;
#对NULLL与其他值进行运算结果为NULL
select id,name,chinese+math+english as total from exam;#Order by查询
#对语文进行ASC
select id,name,chinese from exam order by chinese asc;
#对数学进行desc
select id,name,math from exam order by math desc;
#改一下数据观察同时对语文成绩进行asc,数学进行desc
select id,name,chinese,math from exam order by chinese asc, math desc;
#来观察是否可以使⽤列的别名进⾏排序
select id,name,chinese+math+english as total from exam order by chinese+math+english desc;
select id,name,chinese+math+english as total from exam order by total desc;
#注意在排序时NULL比任何值都小, 改一负数进行观察
select id,name,chinese+math+english as total from exam order by total desc;#3.4 分页查询
#插入一列
insert into exam(id,name,chinese,math,english) values (9,'李白',94,91,77);select * from exam order by id desc limit 0,2;select * from exam order by id desc limit 2,2;select * from exam order by id desc limit 4,2;select * from exam order by id desc limit 6,2;select * from exam order by id desc limit 8,2# 4.Update(更新)# 4.1.1 改写指定单行数据select name,chinese,math from exam where name ='孙悟空';update exam set chinese=chinese+10,math=math+10 where name '孙悟空';select name,chinese,math from exam where name ='孙悟空';# 4.1.2 改写指定多行数据,将所有英语成绩*2id,name,english from exam order by english asc ;update exam set english=english*2;id,name,english from exam order by english asc ;#5.Delete# 5.1.1指定单列删除,删除名为张飞的数据
delete from exam where name='张飞';
select name from exam where name='张飞';
#5.1.2删除整张表,插入一张演示表
create table if not exists t_student(
id bigint not null comment'编号',
name varchar(20) not null comment'用户名'
);
insert into t_student values (1,'小明'),(2,'小龙'),(3,'小兰');
相关文章:

增删改查(CRUD)操作
文章目录 MySQL系列:1.CRUD简介2.Create(创建)2.1单行数据全列插入2.2 单行数据指定插入2.3 多⾏数据指定列插⼊ 3.Retrieve(读取)3.1 Select查询3.1.1 全列查询3.1.2 指定列查询3.1.3 查询字段为表达式(都是临时表不会对原有表数据产生影响)…...
Vue.js `Suspense` 和异步组件加载
Vue.js Suspense 和异步组件加载 今天我们来聊聊 Vue 3 中的一个强大特性:<Suspense> 组件,以及它如何帮助我们更优雅地处理异步组件加载。如果你曾在 Vue 项目中处理过异步组件加载,那么这篇文章将为你介绍一种更简洁高效的方式。 什…...

HTB:LinkVortex[WriteUP]
目录 连接至HTB服务器并启动靶机 信息收集 使用rustscan对靶机TCP端口进行开放扫描 使用nmap对靶机TCP开放端口进行脚本、服务扫描 使用nmap对靶机TCP开放端口进行漏洞、系统扫描 使用nmap对靶机常用UDP端口进行开放扫描 使用gobuster对靶机进行路径FUZZ 使用ffuf堆靶机…...

Linux命令入门
Linux命令入门 ls命令 ls命令的作用是列出目录下的内容,语法细节如下: 1s[-a -l -h] [Linux路径] -a -l -h是可选的选项 Linux路径是此命令可选的参数 当不使用选项和参数,直接使用ls命令本体,表示:以平铺形式,列出当前工作目录下的内容 ls命令的选项 -a -a选项&a…...

【问题】Chrome安装不受支持的扩展 解决方案
此扩展程序已停用,因为它已不再受支持 Chromium 建议您移除它。详细了解受支持的扩展程序 此扩展程序已停用,因为它已不再受支持 详情移除 解决 1. 解压扩展 2.打开manifest.json 3.修改版本 将 manifest_version 改为3及以上 {"manifest_ver…...

【题解】AtCoder Beginner Contest ABC391 D Gravity
题目大意 原题面链接 在一个 1 0 9 W 10^9\times W 109W 的平面里有 N N N 个方块。我们用 ( x , y ) (x,y) (x,y) 表示第 x x x 列从下往上数的 y y y 个位置。第 i i i 个方块的位置是 ( x i , y i ) (x_i,y_i) (xi,yi)。现在执行无数次操作,每一次…...

使用 SpringBoot+Thymeleaf 模板引擎进行 Web 开发
目录 一、什么是 Thymeleaf 模板引擎 二、Thymeleaf 模板引擎的 Maven 坐标 三、配置 Thymeleaf 四、访问页面 五、访问静态资源 六、Thymeleaf 使用示例 七、Thymeleaf 常用属性 前言 在现代 Web 开发中,模板引擎被广泛用于将动态内容渲染到静态页面中。Thy…...
【Java异步编程】CompletableFuture综合实战:泡茶喝水与复杂的异步调用
文章目录 一. 两个异步任务的合并:泡茶喝水二. 复杂的异步调用:结果依赖,以及异步执行调用等 一. 两个异步任务的合并:泡茶喝水 下面的代码中我们实现泡茶喝水。这里分3个任务:任务1负责洗水壶、烧开水,任…...
Nginx知识
nginx 精简的配置文件 worker_processes 1; # 可以理解为一个内核一个worker # 开多了可能性能不好events {worker_connections 1024; } # 一个 worker 可以创建的连接数 # 1024 代表默认一般不用改http {include mime.types;# 代表引入的配置文件# mime.types 在 ngi…...
Unity开发游戏使用XLua的基础
Unity使用Xlua的常用编码方式,做一下记录 1、C#调用lua 1、Lua解析器 private LuaEnv env new LuaEnv();//保持它的唯一性void Start(){env.DoString("print(你好lua)");//env.DoString("require(Main)"); 默认在resources文件夹下面//帮助…...

AI-ISP论文Learning to See in the Dark解读
论文地址:Learning to See in the Dark 图1. 利用卷积网络进行极微光成像。黑暗的室内环境。相机处的照度小于0.1勒克斯。索尼α7S II传感器曝光时间为1/30秒。(a) 相机在ISO 8000下拍摄的图像。(b) 相机在ISO 409600下拍摄的图像。该图像存在噪点和色彩偏差。©…...

OpenCV:开运算
目录 1. 简述 2. 用腐蚀和膨胀实现开运算 2.1 代码示例 2.2 运行结果 3. 开运算接口 3.1 参数详解 3.2 代码示例 3.3 运行结果 4. 开运算应用场景 5. 注意事项 6. 总结 相关阅读 OpenCV:图像的腐蚀与膨胀-CSDN博客 OpenCV:闭运算-CSDN博客 …...
38. RTC实验
一、RTC原理详解 1、6U内部自带到了一个RTC外设,确切的说是SRTC。6U和6ULL的RTC内容在SNVS章节。6U的RTC分为LP和HP。LP叫做SRTC,HP是RTC,但是HP的RTC掉电以后数据就丢失了,即使用了纽扣电池也没用。所以必须要使用LP,…...
Flutter 新春第一弹,Dart 宏功能推进暂停,后续专注定制数据处理支持
在去年春节,Flutter 官方发布了宏(Macros)编程的原型支持, 同年的 5 月份在 Google I/O 发布的 Dart 3.4 宣布了宏的实验性支持,但是对于 Dart 内部来说,从启动宏编程实验开始已经过去了几年,但…...
巴菲特价值投资思想的核心原则
巴菲特价值投资思想的核心原则 关键词:安全边际、长期投资、内在价值、管理团队、经济护城河、简单透明 摘要:本文深入探讨了巴菲特价值投资思想的核心原则,包括安全边际、长期投资、企业内在价值、优秀管理团队、经济护城河和简单透明的业务…...
C 或 C++ 中用于表示常量的后缀:1ULL
1ULL 是一个在 C 或 C 中用于表示常量的后缀,它具体指示编译器将这个数值视为特定类型的整数。让我们详细解释一下: 1ULL 的含义 1: 这是最基本的部分,表示数值 1。U: 表示该数值是无符号(Unsigned)的。这意味着它只…...
vue3中el-input无法获得焦点的问题
文章目录 现象两次nextTick()加setTimeout()解决结论 现象 el-input被外层div包裹了,设置autofocus不起作用: <el-dialog v-model"visible" :title"title" :append-to-bodytrue width"50%"><el-form v-model&q…...

程序诗篇里的灵动笔触:指针绘就数据的梦幻蓝图<3>
大家好啊,我是小象٩(๑ω๑)۶ 我的博客:Xiao Xiangζั͡ޓއއ 很高兴见到大家,希望能够和大家一起交流学习,共同进步。 今天我们来对上一节做一些小补充,了解学习一下assert断言,指针的使用和传址调用…...

(三)QT——信号与槽机制——计数器程序
目录 前言 信号(Signal)与槽(Slot)的定义 一、系统自带的信号和槽 二、自定义信号和槽 三、信号和槽的扩展 四、Lambda 表达式 总结 前言 信号与槽机制是 Qt 中的一种重要的通信机制,用于不同对象之间的事件响…...

Qt 5.14.2 学习记录 —— 이십이 QSS
文章目录 1、概念2、基本语法3、给控件应用QSS设置4、选择器1、子控件选择器2、伪类选择器 5、样式属性box model 6、实例7、登录界面 1、概念 参考了CSS,都是对界面的样式进行设置,不过功能不如CSS强大。 可通过QSS设置样式,也可通过C代码…...
OpenLayers 可视化之热力图
注:当前使用的是 ol 5.3.0 版本,天地图使用的key请到天地图官网申请,并替换为自己的key 热力图(Heatmap)又叫热点图,是一种通过特殊高亮显示事物密度分布、变化趋势的数据可视化技术。采用颜色的深浅来显示…...

04-初识css
一、css样式引入 1.1.内部样式 <div style"width: 100px;"></div>1.2.外部样式 1.2.1.外部样式1 <style>.aa {width: 100px;} </style> <div class"aa"></div>1.2.2.外部样式2 <!-- rel内表面引入的是style样…...
Spring AI与Spring Modulith核心技术解析
Spring AI核心架构解析 Spring AI(https://spring.io/projects/spring-ai)作为Spring生态中的AI集成框架,其核心设计理念是通过模块化架构降低AI应用的开发复杂度。与Python生态中的LangChain/LlamaIndex等工具类似,但特别为多语…...
Element Plus 表单(el-form)中关于正整数输入的校验规则
目录 1 单个正整数输入1.1 模板1.2 校验规则 2 两个正整数输入(联动)2.1 模板2.2 校验规则2.3 CSS 1 单个正整数输入 1.1 模板 <el-formref"formRef":model"formData":rules"formRules"label-width"150px"…...

ABAP设计模式之---“简单设计原则(Simple Design)”
“Simple Design”(简单设计)是软件开发中的一个重要理念,倡导以最简单的方式实现软件功能,以确保代码清晰易懂、易维护,并在项目需求变化时能够快速适应。 其核心目标是避免复杂和过度设计,遵循“让事情保…...

网站指纹识别
网站指纹识别 网站的最基本组成:服务器(操作系统)、中间件(web容器)、脚本语言、数据厍 为什么要了解这些?举个例子:发现了一个文件读取漏洞,我们需要读/etc/passwd,如…...

【电力电子】基于STM32F103C8T6单片机双极性SPWM逆变(硬件篇)
本项目是基于 STM32F103C8T6 微控制器的 SPWM(正弦脉宽调制)电源模块,能够生成可调频率和幅值的正弦波交流电源输出。该项目适用于逆变器、UPS电源、变频器等应用场景。 供电电源 输入电压采集 上图为本设计的电源电路,图中 D1 为二极管, 其目的是防止正负极电源反接, …...

宇树科技,改名了!
提到国内具身智能和机器人领域的代表企业,那宇树科技(Unitree)必须名列其榜。 最近,宇树科技的一项新变动消息在业界引发了不少关注和讨论,即: 宇树向其合作伙伴发布了一封公司名称变更函称,因…...
Git常用命令完全指南:从入门到精通
Git常用命令完全指南:从入门到精通 一、基础配置命令 1. 用户信息配置 # 设置全局用户名 git config --global user.name "你的名字"# 设置全局邮箱 git config --global user.email "你的邮箱example.com"# 查看所有配置 git config --list…...

群晖NAS如何在虚拟机创建飞牛NAS
套件中心下载安装Virtual Machine Manager 创建虚拟机 配置虚拟机 飞牛官网下载 https://iso.liveupdate.fnnas.com/x86_64/trim/fnos-0.9.2-863.iso 群晖NAS如何在虚拟机创建飞牛NAS - 个人信息分享...