noSQL的小练习

news2024/11/27 12:36:40

目录

Redis:

1、 string类型数据的命令操作:    

2、 list类型数据的命令操作:    

3、 hash类型数据的命令操作:

MongoDB: 

1. 创建一个数据库 名字grade 

2. 数据库中创建一个集合名字 class

3. 集合中插入若干数据 文档格式如下

4. 查找  

5. 增加、更新、删除、统计       


 

Redis:

1、 string类型数据的命令操作:
    (1) 设置键值:
    (2) 读取键值:
    (3) 数值类型自增1:
    (4) 数值类型自减1:
    (5) 查看值的长度:
127.0.0.1:6379> SET name 'erHua'    #(1) 设置键值:
OK
127.0.0.1:6379> GET name       #(2) 读取键值:
"erHua"
127.0.0.1:6379> SET num 7
OK
127.0.0.1:6379> INCR num    #(3) 数值类型自增1:
(integer) 8
127.0.0.1:6379> GET num
"8"
127.0.0.1:6379> DECR num    #(4) 数值类型自减1:
(integer) 7
127.0.0.1:6379> GET num
"7"
127.0.0.1:6379> STRLEN name    #(5) 查看值的长度:
(integer) 5
127.0.0.1:6379> STRLEN num
(integer) 1

注意:

127.0.0.1:6379> SET name '二花'
OK
127.0.0.1:6379> GET name 
"\xe4\xba\x8c\xe8\x8a\xb1"
  • REDIS数据库默认使用UTF-8编码进行存储,而不是直接使用可视化的中文字符。
  • 因此,当在Redis中存储中文字符串"二花"时,它会以UTF-8编码进行存储,并返回相应的字节序列 “\xe4\xba\x8c\xe8\x8a\xb1”。
  • 在Redis中,没有直接从脚本中调用编码转换函数的内置命令。因此,无法在Redis命令行界面直接进行解码。
  • 如果想在Redis中获取可视化的中文字符,最好的办法是在使用Redis的客户端应用程序中进行解码,例如在Python、Java或JavaScript中执行相应的解码操作。这样可以更方便地处理字节序列并获得可读的中文字符。
2、 list类型数据的命令操作:
    

   (1)对列表city插入元素:Shanghai Suzhou Hangzhou

127.0.0.1:6379> LPUSH city Shanghai Suzhou Hangzhou(integer) 3
127.0.0.1:6379> LRANGE city 0 -1  
1) "Hangzhou"
2) "Suzhou"
3) "Shanghai"

    (2)将列表city里的头部的元素移除

127.0.0.1:6379> lpop city  
"Hangzhou"
127.0.0.1:6379> lrange city 0 -1
1) "Suzhou"
2) "Shanghai"    

    (3)将name列表的尾部元素移除到number列表的头部

127.0.0.1:6379> LPUSH name iguBigu UmsyDipsy MacaBaca TomBlyber
127.0.0.1:6379> LPUSH 1 3 5 7 9

127.0.0.1:6379> MULTI     #在不知道name会弹出什么值时不使用事务
OK
127.0.0.1:6379(TX)> RPOP name
QUEUED
127.0.0.1:6379(TX)> LPUSH number iguBigu
QUEUED
127.0.0.1:6379(TX)> EXEC
1) "iguBigu"
2) (integer) 6

127.0.0.1:6379> lrange number 0 -1
1) "iguBigu"
2) "9"
3) "7"
4) "5"
5) "3"
6) "1"
127.0.0.1:6379> lrange name 0 -1
1) "TomBlyber"
2) "MacaBaca"
3) "UmsyDipsy

    (4) 对一个已存在的列表插入新元素

127.0.0.1:6379> LPUSHX name LittleDot    #插入一个小点点
(integer) 4
127.0.0.1:6379> lrange name 0 -1
1) "LittleDot"
2) "TomBlyber"
3) "MacaBaca"
4) "UmsyDipsy"

    (5)查看list的值长度 

127.0.0.1:6379> LLEN name
(integer) 4
3、 hash类型数据的命令操作:

    (1) 设置一个hash表,order表里包括的键值信息有:id:1,customer_name:张三

127.0.0.1:6379> HSET order id 1 customer_name '张三' 
(integer) 2

   (2) 创建一个hash表,表里的键值批量插入

127.0.0.1:6379> HMSET order n1 v1 n2 v2 n3 v3 n4 v4
OK

   (3) 获取order对应的map的所有key

127.0.0.1:6379> HKEYS order
1) "id"
2) "customer_name"
3) "n1"
4) "n2"
5) "n3"
6) "n4"

   (4) 获取order对应的map的键值数量

127.0.0.1:6379> HLEN order
(integer) 6

   (5) 获取order表里的id值 

127.0.0.1:6379> HMGET order id
1) "1"

MongoDB: 

1. 创建一个数据库 名字grade 
> use grade
switched to db grade
> db
grade
2. 数据库中创建一个集合名字 class
> db.createCollection('class')
{ "ok" : 1 }
3. 集合中插入若干数据 文档格式如下

{name:'zhang',age;10,sex:'m',hobby:['a','b','c']}
hobby: draw  sing  dance  basketball football  pingpong  computer 

> db.class.insertMany([
...   {name: 'LiitleDot', age: 4, sex: 'f', hobby: ['sing', 'dance']},
...   {name: 'IguBigu', age: 14, sex: 'm', hobby: ['football', 'draw', 'pingpong']},
...   {name: 'MacaBaca', age: 6, sex: 'm', hobby: ['draw', 'dance', 'pingpong', 'sing']},
...   {name: 'TomBlyber', age: 7, sex: 'f', hobby: ['draw']},
...   {name: 'UmsyDipsy', age: 11, sex: 'f', hobby: ['pingpong']},
...   {name: 'LittleBean', age: 5, sex: 'm', hobby: ['pingpong', 'sing']},
...   {name: 'FlyingFish', age: 8, sex: 'f', hobby: ['draw', 'dance', 'pingpong']}
... ]);
{
	"acknowledged" : true,
	"insertedIds" : [
		ObjectId("64b29f7744d96627bff90f54"),
		ObjectId("64b29f7744d96627bff90f55"),
		ObjectId("64b29f7744d96627bff90f56"),
		ObjectId("64b29f7744d96627bff90f57"),
		ObjectId("64b29f7744d96627bff90f58"),
		ObjectId("64b29f7744d96627bff90f59"),
		ObjectId("64b29f7744d96627bff90f5a")
	]
}
4. 查找  

    查看班级所有人信息

> db.class.find();
{ "_id" : ObjectId("64b29f7744d96627bff90f54"), "name" : "LiitleDot", "age" : 4, "sex" : "f", "hobby" : [ "sing", "dance" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f55"), "name" : "IguBigu", "age" : 14, "sex" : "m", "hobby" : [ "football", "draw", "pingpong" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f56"), "name" : "MacaBaca", "age" : 6, "sex" : "m", "hobby" : [ "draw", "dance", "pingpong", "sing" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f57"), "name" : "TomBlyber", "age" : 7, "sex" : "f", "hobby" : [ "draw" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f58"), "name" : "UmsyDipsy", "age" : 11, "sex" : "f", "hobby" : [ "pingpong" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f59"), "name" : "LittleBean", "age" : 5, "sex" : "m", "hobby" : [ "pingpong", "sing" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f5a"), "name" : "FlyingFish", "age" : 8, "sex" : "f", "hobby" : [ "draw", "dance", "pingpong" ] }
> 

    查看班级中年龄为8岁的学生信息

> db.class.find( {age:8} );
{ "_id" : ObjectId("64b29f7744d96627bff90f5a"), "name" : "FlyingFish", "age" : 8, "sex" : "f", "hobby" : [ "draw", "dance", "pingpong" ] }

    查看年龄大于10岁的学生信息

> db.class.find( {age:{$gt:10}} );
{ "_id" : ObjectId("64b29f7744d96627bff90f55"), "name" : "IguBigu", "age" : 14, "sex" : "m", "hobby" : [ "football", "draw", "pingpong" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f58"), "name" : "UmsyDipsy", "age" : 11, "sex" : "f", "hobby" : [ "pingpong" ] }

    查看年龄在 4---8岁之间的学生信息 

> db.class.find({age:{$gte:4,$lte:10}});
{ "_id" : ObjectId("64b29f7744d96627bff90f54"), "name" : "LiitleDot", "age" : 4, "sex" : "f", "hobby" : [ "sing", "dance" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f56"), "name" : "MacaBaca", "age" : 6, "sex" : "m", "hobby" : [ "draw", "dance", "pingpong", "sing" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f57"), "name" : "TomBlyber", "age" : 7, "sex" : "f", "hobby" : [ "draw" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f59"), "name" : "LittleBean", "age" : 5, "sex" : "m", "hobby" : [ "pingpong", "sing" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f5a"), "name" : "FlyingFish", "age" : 8, "sex" : "f", "hobby" : [ "draw", "dance", "pingpong" ] }

    找到年龄为6岁且为男生的学生

> db.class.find( {age:6,sex:'m'} );
{ "_id" : ObjectId("64b29f7744d96627bff90f56"), "name" : "MacaBaca", "age" : 6, "sex" : "m", "hobby" : [ "draw", "dance", "pingpong", "sing" ] }

    找到年龄小于7岁或者大于10岁的学生

> db.class.find({
...   $or: [
...     { age: { $lt: 7 } },
...     { age: { $gt: 10 } }
...   ]
... });
{ "_id" : ObjectId("64b29f7744d96627bff90f54"), "name" : "LiitleDot", "age" : 4, "sex" : "f", "hobby" : [ "sing", "dance" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f55"), "name" : "IguBigu", "age" : 14, "sex" : "m", "hobby" : [ "football", "draw", "pingpong" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f56"), "name" : "MacaBaca", "age" : 6, "sex" : "m", "hobby" : [ "draw", "dance", "pingpong", "sing" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f58"), "name" : "UmsyDipsy", "age" : 11, "sex" : "f", "hobby" : [ "pingpong" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f59"), "name" : "LittleBean", "age" : 5, "sex" : "m", "hobby" : [ "pingpong", "sing" ] }

    找到年龄是8岁或者11岁的学生

> db.class.find({ $or: [{ age:8},{ age:11}] });
{ "_id" : ObjectId("64b29f7744d96627bff90f58"), "name" : "UmsyDipsy", "age" : 11, "sex" : "f", "hobby" : [ "pingpong" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f5a"), "name" : "FlyingFish", "age" : 8, "sex" : "f", "hobby" : [ "draw", "dance", "pingpong" ] }

    找到兴趣爱好有两项的学生

> db.class.find({ hobby: {$size:2} });
{ "_id" : ObjectId("64b29f7744d96627bff90f54"), "name" : "LiitleDot", "age" : 4, "sex" : "f", "hobby" : [ "sing", "dance" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f59"), "name" : "LittleBean", "age" : 5, "sex" : "m", "hobby" : [ "pingpong", "sing" ] }

    找到兴趣爱好有draw的学生

> db.class.find({ hobby:'draw' });
{ "_id" : ObjectId("64b29f7744d96627bff90f55"), "name" : "IguBigu", "age" : 14, "sex" : "m", "hobby" : [ "football", "draw", "pingpong" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f56"), "name" : "MacaBaca", "age" : 6, "sex" : "m", "hobby" : [ "draw", "dance", "pingpong", "sing" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f57"), "name" : "TomBlyber", "age" : 7, "sex" : "f", "hobby" : [ "draw" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f5a"), "name" : "FlyingFish", "age" : 8, "sex" : "f", "hobby" : [ "draw", "dance", "pingpong" ] }

    找到既喜欢画画又喜欢跳舞的学生

> db.class.find({ hobby:{$all: ['draw','dance']} });
{ "_id" : ObjectId("64b29f7744d96627bff90f56"), "name" : "MacaBaca", "age" : 6, "sex" : "m", "hobby" : [ "draw", "dance", "pingpong", "sing" ] }
{ "_id" : ObjectId("64b29f7744d96627bff90f5a"), "name" : "FlyingFish", "age" : 8, "sex" : "f", "hobby" : [ "draw", "dance", "pingpong" ] }

    统计爱好有三项的学生人数

> db.class.find({ hobby: {$size:3} }).count();
2

    找出本班年龄第二大的学生

> db.class.find().sort({age:-1}).skip(1).limit(1);
{ "_id" : ObjectId("64b29f7744d96627bff90f58"), "name" : "UmsyDipsy", "age" : 11, "sex" : "f", "hobby" : [ "pingpong" ] }

    查看学生的兴趣范围

>  db.class.aggregate([
... {$unwind:'$hobby'},
... {$group: {
...           _id: null,hobbies: {$addToSet:'$hobby'}
...          }
... } ]);
{ "_id" : null, "hobbies" : [ "pingpong", "football", "dance", "sing", "draw" ] }

    将学生按年龄排序找到年龄最大的三个

> db.class.aggregate([ 
... {$sort: {age:-1}} , {$limit:3} ,{$project:{_id:0 ,name:1 ,sex:1 ,age:1 ,hobby:1}}
... ]);
{ "name" : "IguBigu", "age" : 14, "sex" : "m", "hobby" : [ "football", "draw", "pingpong" ] }
{ "name" : "UmsyDipsy", "age" : 11, "sex" : "f", "hobby" : [ "pingpong" ] }
{ "name" : "FlyingFish", "age" : 8, "sex" : "f", "hobby" : [ "draw", "dance", "pingpong" ] }

    删除所有 年纪大于14或者小于4岁的学生

> db.class.remove({ $or:[ {age:{$lt:4}},{age:{$gt:14} }] });
WriteResult({ "nRemoved" : 0 })
5. 增加、更新、删除、统计
       

         1. 将小点点的年龄变为8岁 兴趣爱好变为 跳舞 画画

> db.class.replaceOne(
... {name:'LiitleDot'},
... {name:'LiitleDot',gae:8 ,habby:['dance','draw']} 
... );
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }

> db.class.find({name:'LiitleDot'});
{ "_id" : ObjectId("64b2b4a0779acd38c6a2bf81"), "name" : "LiitleDot", "gae" : 8, "habby" : [ "dance", "draw" ] }

        2. 追加唔西·迪西趣爱好  唱歌

> db.class.updateOne(
...   {name: 'UmsyDipsy'},
...   {$push: {hobby: 'sing'}}
... );
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }

> db.class.find({name: 'UmsyDipsy'});
{ "_id" : ObjectId("64b29f7744d96627bff90f58"), "name" : "UmsyDipsy", "gae" : 8, "sex" : "m", "hobby" : [ "draw", "sing" ] }

        3.汤姆布利柏趣爱好增加  吹牛 打篮球

> db.class.updateOne(
...   {name: 'TomBlyber'},
...   {$push: {hobby: ['TalkBig', 'basketball']}}
... );
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }

> db.class.find({name:'TomBlyber'});
{ "_id" : ObjectId("64b29f7744d96627bff90f57"), "name" : "TomBlyber", "hobby" : [ "draw","TalkBig", "basketball" ] }


        4. 飞飞鱼增加爱好,跑步和唱歌,但是不要和以前的重复

> db.class.updateOne(
...   {name: 'FlyingFish'},
...   {$addToSet: {hobby: {$each: ['跑步', '唱歌']}}}
... );
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }

> db.class.find({name: FlyibngFish});
{ "_id" : ObjectId("64b29f7744d96627bff90f5a"), "name" : "FlyingFish", "age" : 8, "sex" : "f", "hobby" : [ "draw", "dance", "pingpong", "跑步", "唱歌" ] }

        5. 该班所有同学年龄加1

 db.class.updateMany({},{$inc :{age:1}});
{ "acknowledged" : true, "matchedCount" : 7, "modifiedCount" : 7 }
 
> db.class.find({},{_id:0,name:1,age:1})
{ "name" : "LiitleDot", "age" : 9 }
{ "name" : "IguBigu", "age" : 15 }
{ "name" : "MacaBaca", "age" : 7 }
{ "name" : "TomBlyber", "age" : 8 }
{ "name" : "UmsyDipsy", "age" : 12 }
{ "name" : "LittleBean", "age" : 6 }
{ "name" : "FlyingFish", "age" : 9 }

        6. 删除小豆豆的sex属性

> db.class.updateOne({"name" : "LittleBean"},{$unset:{sex:1}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.class.find({"name" : "LittleBean"});
{ "_id" : ObjectId("64b2cce5f8a301175474d607"), "name" : "LittleBean", "age" : 6, "hobby" : [ "pingpong", "sing" ] }

        7. 删除玛卡·巴卡兴趣中的第一项

> db.class.updateOne(
... {"name" : "MacaBaca"},
... {$pop:{hobby:-1}}
... );
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }

> db.class.find( {"name" : "MacaBaca"});
{ "_id" : ObjectId("64b2cce5f8a301175474d604"), "name" : "MacaBaca", "age" : 7, "sex" : "m", "hobby" : [ "dance", "pingpong", "sing" ] }


        8. 将依古·比古兴趣中的画画爱好删除

> db.class.updateOne( 
... {"name" : "IguBigu"},
... {$pull: {hobby:'draw'}}
... );
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }

> db.class.find( {"name" : "IguBigu"});
{ "_id" : ObjectId("64b2cce5f8a301175474d603"), "name" : "IguBigu", "age" : 15, "sex" : "m", "hobby" : [ "football", "pingpong" ] }

增加分数域 score:{'chinese':88,'english':78,'math':98}
        1. 按照性别分组统计每组人数

> db.class.aggregate([
...   {
...     $group: {_id: "$sex", count: { $sum: 1 }
...     }
...   }
... ]);
{ "_id" : "f", "count" : 4 }
{ "_id" : "m", "count" : 2 }
{ "_id" : null, "count" : 1 }

        2. 按照姓名分组,过滤出有重名的同学

> db.class.aggregate([
...   {
...     $group: {_id: "$name",  count: { $sum: 1 } }
...   },
...   
...    {
...     $match: { count: { $gt: 1 } }
...   },
...   
...    {
...     $project: {_id: 0, name: "$_id", count: 1}
...   }
... ]);
{ "count" : 2, "name" : "xiaowang" }

        3. 统计每名男生的语文成绩

> db.class.aggregate([
...   {
...     $match: {sex: "m"}
...   },
...   {
...     $project: {_id: 0,  name: "$name",  "score": '$score.chinese'}
...   }
... ]);

{ "name" : "IguBigu", "score" : 92 }
{ "name" : "MacaBaca", "score" : 85 }
{ "name" : "xiaowang" }
{ "name" : "xiaowang" }

        4. 将女生按照英语分数降序排列

> db.class.aggregate([
...   {
...     $match: {sex: "f"}
...   },
...   {
...     $sort: {"score.english": -1}
...   },
...   {
...     $project: {_id: 0,  name: "$name",  englishScore: "$score.english" }
...   }
... ]);

{ "name" : "TomBlyber", "englishScore" : 91 }
{ "name" : "LiitleDot", "englishScore" : 88 }
{ "name" : "UmsyDipsy", "englishScore" : 86 }
{ "name" : "FlyingFish", "englishScore" : 58 }

 

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/764264.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Redis分片集群有什么作用?怎样读取和存储信息

分片集群主要解决的是,海量数据存储的问题,集群中有多个master,每个master保存不同数据,并且还可以给每个master设置多个slave节点,就可以继续增大集群的高并发能力。同时每个master之间通过ping监测彼此健康状态&…

Selenium中如何抓取网络请求响应及WebSocket信息

目录 获取Chrome性能日志 获取请求及响应信息 我们在使用Selenium测试Web或Electronjs/Cef框架应用时,有时候操作一个元素需要判断是否发送了请求以及请求的参数是否正确 我们可以通过,开启Chrome的性能日志来然后配合driver.get_log("performan…

qgis添加地理地图书签,快速定位到想要的位置

我们打开qgis软件,一般这个功能区域默认在左侧的中间位置,如图: 如果没有的话,我们需要调出来,在软件上方的菜单栏的空白处,右键显示面板调试框,勾选空间书签管理器面板,即可&…

6.3.4 利用Wireshark进行协议分析(四)----ARP协议解析

6.3.4 利用Wireshark进行协议分析(四)----ARP协议解析 我们知道对于单跳网络内部的数据传输,使用的是网络接口层的技术,比如以太网技术,以太网将报文数据封装在数据帧中进行传送,帧头指明发送方网卡的地址…

初学者必看!PLC转型C#上位机编程学习路线和方法

一.通过线上学习C#,机器视觉,运动控制卡,工程案例,我迈向工控软件开发的转型之路 大家好,我是华山编程培训中心的学员——李工,今天分享下我是如何从电气工程师成功转型上位机开发的经历,希望我…

【10】STM32·HAL库开发-MAP文件解析 | STM32启动过程

目录 1,MAP文件浅析(了解)1.1MAP文件概念和作用1.2MAP文件组成1.3MAP文件实操 2.STM32启动过程(了解)2.1STM32启动模式(F1/F4/F7/H7)(也称自举模式)2.1.1STM32启动模式&a…

MybatisPLus3-Activerecord

不用注入数据层对象&#xff0c;就可以实现对数据的访问和操作 具体步骤 1.实体类继承Model<实体类名> 2.mapper接口继承BaseMapper<类名> 3.通过实例化实体对象&#xff0c;就可以通过对象调用CRUD的方法 增 删除/修改/查找的方式都和上面一样

《TCP IP网络编程》第六章

《TCP IP网络编程》第六章&#xff1a;基于 UDP 的服务端/客户端 UDP 套接字的特点&#xff1a; 通过寄信来说明 UDP 的工作原理&#xff0c;这是讲解 UDP 时使用的传统示例&#xff0c;它与 UDP 的特点完全相同。寄信前应先在信封上填好寄信人和收信人的地址&#xff0c;之后…

力扣142. 环形链表 II

题目 给定一个链表的头节点head&#xff0c;返回链表开始入环的第一个节点。 如果链表无环&#xff0c;则返回null。 链接&#xff1a;142. 环形链表 II - 力扣&#xff08;LeetCode&#xff09; 题解 方法一&#xff1a;设置两个指针&#xff0c;一个指针指向链表头结点&#…

重生之我要学C++第一课

时隔三月&#xff0c;继C语言之后&#xff0c;博主学成C归来&#xff0c;欲重开博客&#xff0c;与诸位分享经验&#xff0c;共同学习&#xff0c;今天就开始我们的c第一课——入门篇。 既然要开始学习c&#xff0c;就要了解 什么是c&#xff1a; C 语言是结构化和模块化的语言…

Vue2 ➔ Vue3 都做了哪些改变?

不是吧&#xff0c;兄弟&#xff0c;Vue3 都出来多久了&#xff0c;你还对这个感兴趣&#xff0c;说&#xff01;是不是没好好卷&#xff1f;&#x1f60f; 俺也一样 &#x1f602;&#xff0c;Vue3 出来之后只是简单了解了一下&#xff0c;然后还是转头一直在写 Vue2。当然&a…

如何升级iOS17/iPadOS17公测版?iOS17公测版升级教程

苹果官方发布了iOS 17/iPadOS 17系统首个公测版更新&#xff0c;其版本号及更新内容与iOS 17 beta 3一致&#xff0c;版本号为21A5277j。 对于想升级iOS 17/iPadOS 17 公测版的用户&#xff0c;可以参考本教程进行操作。 升级注意事项&#xff1a; 1. 为防止意外情况&#xf…

AlignPS中的TOIM损失

本文介绍了CVPR2021行人重识别领域中一篇名为AlignPS论文中的TOIM损失函数 论文链接&#xff1a;https://arxiv.org/abs/2109.00211 代码链接&#xff1a;GitHub - daodaofr/AlignPS: Code for CVPR 2021 paper: Anchor-Free Person Search TOIM TOIM Loss OIM Loss Trip…

【STM32零基础入门教程02】STM32环境获取及搭建

(14条消息) 【STM32零基础入门教程01】STM32入门基础知识_小超电子笔记的博客-CSDN博客 工欲善其事必先利其器&#xff0c;在上一章了解完STM32的一些基础知识之后&#xff0c;我们需要对使用的环境进行获取和安装。 一、MDK&#xff08;KEIL&#xff09;的获取 Keil是一种…

CCF 202209-2 何以包邮? (01背包动态规划练习)

一、先温习一下01背包问题 有N件物品和一个容量为V的背包。第i件物品的体积是c[i]&#xff0c;价值是w[i]。求解将哪些物品装入背包可使价值总和最大。 条件汇总 -------- 背包限制容量&#xff1a;Z 此时背包容量&#xff1a;C 物品&#xff1a;1 , i ... …

WSA - root,frida与ida测试

本文旨在配置windows subsystem for android(win安卓子系统)来作为win在开启了hyper-v的情况下的一种轻量的安卓模拟器方案。使用MagiskOnWsa设置root权限&#xff0c;最终使其正常与开发环境、frida、ida打通。 1. Root的WSA 常用的Wsa版本在目前是没有默认root的。在物理机…

matlab滤波器设计-IIR滤波器的设计与仿真

matlab滤波器设计-IIR滤波器的设计与仿真 1 引言 在现代通信系统中&#xff0c;由于信号中经常混有各种复杂成分&#xff0c;所以很多信号的处理和分析都是基于滤波器而进行的。但是&#xff0c;传统的数字滤波器的设计使用繁琐的公式计算&#xff0c;改变参数后需要重新计…

【Matlab】智能优化算法_猎豹优化算法CO)

【Matlab】智能优化算法_猎豹优化算法CO 1.背景介绍2.数学模型2.1 搜索策略2.2 坐等策略2.3 攻击策略2.4 假设 3.文件结构4.伪代码5.详细代码及注释5.1 CO.m5.2 CO_VectorBased.m5.3 Get_Functions_details.m 6.运行结果7.参考文献 1.背景介绍 猎豹&#xff08;Achinonyx jubat…

Kubernetes部署服务到集群中的指定节点

# kubectl get node NAME STATUS ROLES AGE VERSION k8s-master Ready master 25h v1.17.3 k8s-node2 Ready <none> 25h v1.17.3 集群只有两个节点&#xff0c;这里打算将应用部署在k8s-node2节点上&#xff0c;需要先记下这个节点的…

【3】Vite Vue3 用户、角色、岗位选择组件封装

在当今前端开发的领域里&#xff0c;快速、高效的项目构建工具以及使用最新技术栈是非常关键的。ViteVue3 组合为一体的项目实战示例专栏将带领你深入了解和掌握这一最新的前端开发工具和框架。 作为下一代前端构建工具&#xff0c;Vite 在开发中的启动速度和热重载方面具有突…