noSQL的小练习

目录

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 9127.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) 6127.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.hqwc.cn/news/26630.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

IIS 部署的应用禁用HTTP TRACE / TRACK方法【原理扫描】

远程Web服务器支持TRACE和/或TRACK方法。 TRACE和TRACK是用于调试Web服务器连接的HTTP方法。 直接在网站Web.config文件中进行如下操作&#xff1a;在Web.config中的<system.webServer>节点内添加以下配置即可&#xff1a; <security> <requestFiltering> &…

Java阶段五Day07

Java阶段五Day07 文章目录 Java阶段五Day07问题解析dubbo和nacos Dubbo负载均衡负载均衡介绍准备一个负载均衡的环境Dubbo负载均衡策略配置负载均衡的方式dubbo配置负载均衡优先级微服务阶段性架构 Spring Boot Starter自定义配置准备一个starter案例项目Spring框架版本迭代案例…

SVR算法简介及与其它回归算法的关系

目录 参考链接 有人可以帮助我理解支持向量回归技术和其他简单回归模型之间的主要区别是什么 支持向量回归找到一个线性函数&#xff0c;表示误差范围 (epsilon) 内的数据。也就是说&#xff0c;大多数点都可以在该边距内找到&#xff0c;如下图所示 这意味着 SVR 比大多数其…

Opencv入门必读知识

目录 前言 什么是Opencv&#xff1f; 0、预备知识 导入模块的方式 颜色空间 绝对路径与相对路径 国内镜像源 Python环境的安装 PIP命令下载第三方库 pip命令下载 Pycharm设置解释器下载 conda命令下载 pip不是外部和内部命令 1、调用Opencv的API &#xff08;1&a…

【CSDN新星计划】初阶牛C/C++赛道——顺序程序设计(C语句)

目录 3.1 C语句的作用和分类 &#x1f349;&#xff08;1&#xff09;控制语句 &#x1f349;&#xff08;2&#xff09;函数调用语句 &#x1f349;&#xff08;3&#xff09;表达式语句 &#x1f349;&#xff08;4&#xff09;空语句 &#x1f349;&#xff08;5&#…

NAT—网络地址转换

目录 静态NAT 动态NAT NAPT—easy IP 多对多的NAPT 端口映射—高级用法 NAT—网络地址转换 IPV4地址不够用 NAT ABC—三类地址中截取了一部分地址&#xff08;并且让这部分地址可以重复使用&#xff09;—私网地址 A类地址中&#xff1a;10.0.0.0-10.255.255.255 &#xff08;…

官宣!Databend Cloud 和青云科技达成合作

近日&#xff0c;北京数变科技有限公司与北京青云科技股份有限公司(以下简称&#xff1a;青云科技 &#xff09;顺利完成了产品兼容性适配互认证。本次测试是对 Databend 云原生数据仓库系统与青云科技公司自主研发的 QingStor U10000 进行严格的联合测试验证。测试结果显示&am…

imazing怎么导出app,Imazing修改APP存档的方法【2023详解】

相信很多小伙伴都不清楚Imazing导出APP及能够帮助我们更好地去管理手机&#xff0c;还能够替换从网上下载的游戏存档&#xff0c;让用户可以有一个更好地体验&#xff0c;那么具体要如何去操作呢&#xff1f;下面就跟着小编一起来看看Imazing修改APP存档的方法吧。 使用软件 iM…

HCIA配置命令集

目录 扩展 交换机 路由器 路由器网关配置 DHCP服务器 Telnet &#xff1a;远程登录协议 静态路由配置 动态路由 OSPF RIP NAT—网络地址转换 ACL—访问控制列表 ACL的分类&#xff1a; 配置 配置基础ACL &#xff1a; 例一&#xff1a; 例二&#xff1a; 配…

TypeScript - 函数(下)

目录 1、在函数中声明this 2、其他需要知道的类型 2.1 void 2.2 object 2.3 unknow 2.4 never 2.5 Function 3、其余参数&#xff08;rest&#xff09;和参数 4、参数解构 5、函数的可分配性 1、在函数中声明this TypeScript 将通过代码流分析推断函数中应该是什么&…

良心推荐!5款支持Linux系统的国产软件,兼容国产操作系统

虽然市面上大多数用户使用的是Windows操作系统&#xff0c;但也有不少使用Linux系统的用户&#xff0c;特别是国产操作系统的崛起&#xff0c;让Linux系统阵营的用户越来越多。Linux不像Windows那样&#xff0c;有着完整的生态环境丰富的软件应用&#xff0c;但也逐渐在完善中&…

【HCIA】12.网络服务与应用

文件传输协议FTP FTP基于TCP&#xff0c;传输较慢&#xff0c;但是比较可靠。典型的C/S架构。双通道协议。TFTP基于UDP&#xff0c;传输较快&#xff0c;但是不可靠。FTP有两种不同的传输模式 ASCII模式 传输文本文件时会对文本内容进行编码方式转换&#xff0c;提高传输效率&…