HBase Shell基本操作

一、进入Hbase Shell客户端

先在Linux Shell命令行终端执行start-dfs.sh脚本启动HDFS,再执行start-hbase.sh脚本启动HBase。如果Linux系统已配置HBase环境变量,可直接在任意目录下执行hbase shell脚本命令,就可进入HBase Shell的命令行终端环境,exit可以退出HBase Shell(我安装的是伪分布式的HBase)。

(1) help帮助命令(或者help '命令名称'查看某一具体命令的使用方法)

hbase:055:0> help
HBase Shell, version 2.5.6, r6bac842797dc26bedb7adc0759358e4c8fd5a992, Sat Oct 14 23:36:46 PDT 2023
Type 'help "COMMAND"', (e.g. 'help "get"' -- the quotes are necessary) for help on a specific command.
Commands are grouped. Type 'help "COMMAND_GROUP"', (e.g. 'help "general"') for help on a command group.COMMAND GROUPS:Group name: generalCommands: processlist, status, table_help, version, whoamiGroup name: ddlCommands: alter, alter_async, alter_status, clone_table_schema, create, describe, disable, disable_all, drop, drop_all, enable, enable_all, exists, get_table, is_disabled, is_enabled, list, list_regions, locate_region, show_filtersGroup name: namespaceCommands: alter_namespace, create_namespace, describe_namespace, drop_namespace, list_namespace, list_namespace_tablesGroup name: dmlCommands: append, count, delete, deleteall, get, get_counter, get_splits, incr, put, scan, truncate, truncate_preserve

二、General通用操作命令

(1)status:查看HBase集群状态

hbase:051:0> status
1 active master, 0 backup masters, 1 servers, 0 dead, 5.0000 average load
Took 2.3419 seconds 

(2)version:查看HBase版本信息

hbase:052:0> version
2.5.6, r6bac842797dc26bedb7adc0759358e4c8fd5a992, Sat Oct 14 23:36:46 PDT 2023
Took 0.0029 seconds 

(3)whoami:查看当前登录HBase的系统用户信息

hbase:053:0> whoami
root (auth:SIMPLE)groups: root
Took 0.1906 seconds 

(4)table_help:查看HBase数据表操作的帮助信息

table_help
Help for table-reference commands.You can either create a table via 'create' and then manipulate the table via commands like 'put', 'get', etc.
See the standard help information for how to use each of these commands.

三、Namespace操作

namespace(命名空间)是HBase对数据表的逻辑分组,用于数据表的业务划分。例如上层应用可以不同业务的数据表分别放置在不同的名字空间,以实现不同业务数据表之间的数据隔离。命名空间和数据表是一对多关系,命名空间可以包含多张数据表,一张数据表只能属于一个名字空间。HBase数据库中的NameSpace类似于MySQL数据库中的database。 命名空间是HBASE对数据表的逻辑分组,用于数据表的业务划分。

(1)list_namespace:查询所有命名空间
hbase:036:0> list_namespace
NAMESPACE                                                                                      
default                                                                                        
hbase                                                                                          
ns1                                                                                            
3 row(s)
Took 0.0654 seconds 
(2)list_namespace_tables : 查询指定命名空间的表
hbase:038:0> list_namespace_tables 'ns1'
TABLE                                                                                          
t1                                                                                             
1 row(s)
Took 0.1958 seconds                                                                            
=> ["t1"]
(3)create_namespace : 创建指定的命名空间
hbase:039:0> create_namespace 'ns2'
Took 0.4516 seconds 
(4)describe_namespace : 查询指定命名空间的结构
hbase:041:0> describe_namespace 'ns2'
DESCRIPTION                                                                                    
{NAME => 'ns2'} 
(5)alter_namespace :修改命名空间的结构
hbase:045:0> alter_namespace 'ns2',{METHOD=>'set','name'=>'new'}
Took 1.6665 seconds                                                                            
hbase:046:0> describe_namespace 'ns2'
DESCRIPTION                                                                                    
{NAME => 'ns2', name => 'new'}                                                                 
Quota is disabled
Took 0.2023 seconds
hbase:047:0> alter_namespace 'ns2',{METHOD=>'unset','NAME'=>'name'}
Took 0.1602 seconds                                                                            
hbase:048:0> describe_namespace 'ns2'
DESCRIPTION                                                                                    
{NAME => 'ns2'}                                                                                
Quota is disabled
Took 0.0878 seconds 
(6)drop_namespace:删除命名空间
hbase:049:0> drop_namespace 'ns2'
Took 0.4194 seconds                                                                            
hbase:050:0> list_namespace
NAMESPACE                                                                                      
default                                                                                        
hbase                                                                                          
ns1                                                                                            
3 row(s)
Took 0.0610 seconds

四、DDL操作命令

DDL分组中包含的操作命令很多,主要用于对HBase数据库表的相关管理操作,主要包括创建表、修改表、删除表、列出表、启用表、禁用表等操作。

(1)create:建表(建表的时候,必须至少指定一个列族名称)

在默认的命名空间中,创建表students,并包含一个名为info的列族,列族属性默认。

#如果保留默认的列族设置,建表时直接写列族的名字就可以了
hbase:070:0> create 'students','info'
2024-03-21 00:25:59,140 INFO  [main] client.HBaseAdmin (HBaseAdmin.java:postOperationResult(3591)) - Operation: CREATE, Table Name: default:students, procId: 131 completed
Created table students
Took 3.4314 seconds                                                                            
=> Hbase::Table - students

 在指定的ns1命名空间中,创建表t1,并包含一个名为f1的列族,列族属性自定义。

#建表的同时指定列族属性
hbase:071:0> create 'ns1:t1',{NAME=>'f1',VERSIONS=>5}
2024-03-21 00:28:43,872 INFO  [main] client.HBaseAdmin (HBaseAdmin.java:postOperationResult(3591)) - Operation: CREATE, Table Name: ns1:t1, procId: 134 completed
Created table ns1:t1
Took 2.3465 seconds                                                                            
=> Hbase::Table - ns1:t1

(2)list : 查询所有的表
hbase:072:0> list
TABLE                                                                                          
students                                                                                       
ns1:t1                                                                                         
2 row(s)
Took 0.2459 seconds                                                                            
=> ["students", "ns1:t1"]
(3)describe/desc : 查询表结构
hbase:074:0> describe 'students'
Table students is ENABLED                                                                      
students, {TABLE_ATTRIBUTES => {METADATA => {'hbase.store.file-tracker.impl' => DEFAULT'}}}   
COLUMN FAMILIES DESCRIPTION                                                                    
{NAME => 'info', INDEX_BLOCK_ENCODING => 'NONE', VERSIONS => '1', KEEP_DELETED_CELLS => 'FALSE'
, DATA_BLOCK_ENCODING => 'NONE', TTL => 'FOREVER', MIN_VERSIONS => '0', REPLICATION_SCOPE => '0
', BLOOMFILTER => 'ROW', IN_MEMORY => 'false', COMPRESSION => 'NONE', BLOCKCACHE => 'true', BLO
CKSIZE => '65536 B (64KB)'}                                                                    
1 row(s)
Quota is disabled
Took 1.1379 seconds

(4)exists : 判断指定表明是否存在

hbase:075:0> exists 'ns1:t1'
Table ns1:t1 does exist                                                                        
Took 0.0714 seconds                                                                            
=> true
(5)alter:修改表,添加、修改、删除列簇信息

为students表格,增加一个列族score。

hbase:076:0> alter 'students','score'
Updating all regions with the new schema...
1/1 regions updated.
Done.
Took 3.8994 seconds                                                                            
hbase:077:0> desc 'students'
Table students is ENABLED                                                                      
students, {TABLE_ATTRIBUTES => {METADATA => {'hbase.store.file-tracker.impl' => 'DEFAULT'}}}   
COLUMN FAMILIES DESCRIPTION                                                                    
{NAME => 'info', INDEX_BLOCK_ENCODING => 'NONE', VERSIONS => '1', KEEP_DELETED_CELLS => 'FALSE'
, DATA_BLOCK_ENCODING => 'NONE', TTL => 'FOREVER', MIN_VERSIONS => '0', REPLICATION_SCOPE => '0
', BLOOMFILTER => 'ROW', IN_MEMORY => 'false', COMPRESSION => 'NONE', BLOCKCACHE => 'true', BLO
CKSIZE => '65536 B (64KB)'}                                                                    {NAME => 'score', INDEX_BLOCK_ENCODING => 'NONE', VERSIONS => '1', KEEP_DELETED_CELLS => 'FALSE
', DATA_BLOCK_ENCODING => 'NONE', TTL => 'FOREVER', MIN_VERSIONS => '0', REPLICATION_SCOPE => '
0', BLOOMFILTER => 'ROW', IN_MEMORY => 'false', COMPRESSION => 'NONE', BLOCKCACHE => 'true', BL
OCKSIZE => '65536 B (64KB)'}                                                                   2 row(s)
Quota is disabled
Took 0.0753 seconds

修改表格students的列族score的属性VERSIONS的值为5。

hbase:078:0> alter 'students',NAME=>'score',VERSIONS=>5
Updating all regions with the new schema...
1/1 regions updated.
Done.
Took 1.9776 seconds

删除表格表格students的列族score。

hbase:079:0> alter 'students',NAME=>'score',METHOD=>'delete'
Updating all regions with the new schema...
1/1 regions updated.
Done.
Took 2.5517 seconds                                                                            
hbase:080:0> desc 'students'
Table students is ENABLED                                                                      
students, {TABLE_ATTRIBUTES => {METADATA => {'hbase.store.file-tracker.impl' =>'DEFAULT'}}}   
COLUMN FAMILIES DESCRIPTION                                                                    
{NAME => 'info', INDEX_BLOCK_ENCODING => 'NONE', VERSIONS => '1', KEEP_DELETED_CELLS => 'FALSE'
, DATA_BLOCK_ENCODING => 'NONE', TTL => 'FOREVER', MIN_VERSIONS => '0', REPLICATION_SCOPE => '0
', BLOOMFILTER => 'ROW', IN_MEMORY => 'false', COMPRESSION => 'NONE', BLOCKCACHE => 'true', BLO
CKSIZE => '65536 B (64KB)'}                                                                    
1 row(s)
Quota is disabled
Took 0.2625 seconds 

(6)disable:禁用表格

hbase:083:0> disable 'students'
2024-03-21 00:52:29,298 INFO  [main] client.HBaseAdmin (HBaseAdmin.java:rpcCall(926)) - Started disable of students
2024-03-21 00:52:29,810 INFO  [main] client.HBaseAdmin (HBaseAdmin.java:postOperationResult(3591)) - Operation: DISABLE, Table Name: default:students, procId: 158 completed
Took 0.5354 seconds

(7)enable:启用表格

hbase:084:0> enable 'students'
2024-03-21 00:52:51,239 INFO  [main] client.HBaseAdmin (HBaseAdmin.java:rpcCall(866)) - Started enable of students
2024-03-21 00:52:51,882 INFO  [main] client.HBaseAdmin (HBaseAdmin.java:postOperationResult(3591)) - Operation: ENABLE, Table Name: default:students, procId: 161 completed
Took 0.6636 seconds 

(8)drop:删除表格(先要disable表,再删除表

hbase:085:0> disable 'ns1:t1'
2024-03-21 00:53:34,360 INFO  [main] client.HBaseAdmin (HBaseAdmin.java:rpcCall(926)) - Started disable of ns1:t1
2024-03-21 00:53:34,727 INFO  [main] client.HBaseAdmin (HBaseAdmin.java:postOperationResult(3591)) - Operation: DISABLE, Table Name: ns1:t1, procId: 164 completed
Took 0.3910 seconds                                                                            
hbase:086:0> drop 'ns1:t1'
2024-03-21 00:53:43,300 INFO  [main] client.HBaseAdmin (HBaseAdmin.java:postOperationResult(3591)) - Operation: DELETE, Table Name: ns1:t1, procId: 167 completed
Took 0.7044 seconds                                                                            
hbase:087:0> list
TABLE                                                                                          
students                                                                                       
1 row(s)
Took 0.0301 seconds                                                                            
=> ["students"]

五、DML操作命令

DML包含的操作命令很多,主要用于对数据表中的数据进行操作,主要包括全表扫描、读取单行数据、写入数据和删除数据等操作。

(1)put:插入数据(put命令,不能一次性插入多条)

往students表格的info列族,增加2条数据:

行键为s001,列限定符name,单元格值Jack;行键为s001,列限定符age,单元格值20;

往students表格的score列族,增加2条数据:

行键为s001,列限定符Chinese,单元格值90;行键为s001,列限定符Math,单元格值85;

hbase:088:0> put 'students','s001','info:name','Jack'
Took 2.2121 seconds 
hbase:092:0> put 'students','s001','info:age','20'
Took 0.0543 seconds 
hbase:096:0> put 'students','s001','score:Chinese','90'
Took 0.0380 seconds                                                                            
hbase:097:0> put 'students','s001','score:Math','85'
Took 0.0148 seconds 

修改students表格的单元格值:行键为s001,列限定符name,单元格值'Jack'修改为'Mike'。

hbase:089:0> put 'students','s001','info:name','Mike'
Took 0.2027 seconds

(2)get:查询数据

查询students表格,行键为s001的所有数据。

hbase:098:0> get 'students','s001'
COLUMN                   CELL                                                                  info:age                timestamp=2024-03-21T01:11:05.881, value=20                           info:name               timestamp=2024-03-21T01:04:05.318, value=Mike                         score:Chinese           timestamp=2024-03-21T01:16:34.006, value=90                           score:Math              timestamp=2024-03-21T01:16:48.854, value=85                           
1 row(s)
Took 0.1583 seconds

查询行键为s001,数据列为socre:Chinese的单元格值。

hbase:103:0> get 'students','s001','score:Chinese'
COLUMN                   CELL                                                                  score:Chinese           timestamp=2024-03-21T01:16:34.006, value=90                           
1 row(s)
Took 0.0142 seconds

查询学生Mike的多次数学成绩。(确保score列族数学的VERSION版本不止为1)

hbase:108:0> alter 'students',NAME=>'score',VERSIONS=>5
Updating all regions with the new schema...
1/1 regions updated.
Done.
Took 3.6026 seconds

1)写入学生Mike的多次数学成绩

hbase:100:0> put 'students','s001','score:Math','92'
Took 0.0871 seconds                                                                            
hbase:101:0> put 'students','s001','score:Math','100'
Took 0.0158 seconds

2)读取学生Mike最新的一次数学成绩(get命令默认只读出最新写入的单元格值,时间戳版本最大的单元格值内容)。

hbase:102:0> get 'students','s001','score:Math'
COLUMN                   CELL                                                                  score:Math              timestamp=2024-03-21T01:23:13.668, value=100                          
1 row(s)
Took 0.0771 seconds 

3)查询学生Mike的3次数学成绩。

hbase:111:0> get 'students','s001',{COLUMN=>'score:Math',VERSIONS=>3}
COLUMN                   CELL                                                                  score:Math              timestamp=2024-03-21T01:32:55.629, value=85                           score:Math              timestamp=2024-03-21T01:32:35.808, value=92                           score:Math              timestamp=2024-03-21T01:23:13.668, value=100                          
1 row(s)
Took 0.2027 seconds

(3)scan:扫描数据(读取所有行的每个列族的所有数据列的最新时间戳版本的单元格值)

1)为了获得更好效果,现在students表中写入多行数据。

hbase:112:0> put 'students','s002','info:name','Tom'                                                                           
hbase:113:0> put 'students','s002','info:age','19'
hbase:114:0> put 'students','s002','score:Chinese','87'                                                                           
hbase:115:0> put 'students','s002','score:Math','70'
hbase:116:0> put 'students','s003','info:name','Lucy'                                                                            
hbase:117:0> put 'students','s003','info:age',18'
hbase:122:0> put 'students','s003','score:Chinese','80'                                                                           
hbase:123:0> put 'students','s003','score:Math','90'

2)对数据表students进行全表扫描。

hbase:124:0> scan 'students'
ROW                      COLUMN+CELL                                                           s001                    column=info:age, timestamp=2024-03-21T01:11:05.881, value=20          s001                    column=info:name, timestamp=2024-03-21T01:04:05.318, value=Mike       s001                    column=score:Chines, timestamp=2024-03-21T01:16:34.006, value=90      s001                    column=score:Math, timestamp=2024-03-21T01:32:55.629, value=85        s002                    column=info:Chinese, timestamp=2024-03-21T01:43:05.067, value=89       s002                    column=info:Math, timestamp=2024-03-21T01:43:22.209, value=95         s002                    column=info:age, timestamp=2024-03-21T01:42:45.619, value=19          s002                    column=info:name, timestamp=2024-03-21T01:42:33.917, value=Tom        s003                    column=info:age, timestamp=2024-03-21T01:44:16.318, value=18          s003                    column=info:name, timestamp=2024-03-21T01:43:45.397, value=Lucy       s003                    column=score:Chinese, timestamp=2024-03-21T01:45:40.078, value=80      s003                    column=score:Math, timestamp=2024-03-21T01:45:53.743, value=90        
3 row(s)
Took 0.2514 seconds 

3)对数据表students的指定行键范围的数据进行扫描。

#若只指定开始的行键STARTROW,会一直扫描到最后,包含STARTROW和最后一行数据
hbase:135:0> scan 'students',{STARTROW=>'s002'}
ROW                      COLUMN+CELL                                                           s002                    column=info:age, timestamp=2024-03-21T01:42:45.619, value=19          s002                    column=info:name, timestamp=2024-03-21T01:42:33.917, value=Tom        s002                    column=score:Chinese, timestamp=2024-03-21T01:48:44.123, value=87      s002                    column=score:Math, timestamp=2024-03-21T01:48:59.578, value=70        s003                    column=info:age, timestamp=2024-03-21T01:44:16.318, value=18          s003                    column=info:name, timestamp=2024-03-21T01:43:45.397, value=Lucy       s003                    column=score:Chinese, timestamp=2024-03-21T01:45:40.078, value=80      s003                    column=score:Math, timestamp=2024-03-21T01:45:53.743, value=90        
2 row(s)
Took 0.6646 seconds 
#同时指定STARTROW和STOPROW,行键范围包括STARTROW,但不包含STOPROW的数据
hbase:136:0> scan 'students',{STARTROW=>'s002',STOPROW=>'s003'}
ROW                      COLUMN+CELL                                                           s002                    column=info:age, timestamp=2024-03-21T01:42:45.619, value=19          s002                    column=info:name, timestamp=2024-03-21T01:42:33.917, value=Tom        s002                    column=score:Chinese, timestamp=2024-03-21T01:48:44.123, value=87      s002                    column=score:Math, timestamp=2024-03-21T01:48:59.578, value=70        
1 row(s)
Took 0.0566 seconds

4)对数据表students的指定列族info进行扫描。

hbase:137:0> scan 'students',{COLUMNS=>['info']}
ROW                      COLUMN+CELL                                                           s001                    column=info:age, timestamp=2024-03-21T01:11:05.881, value=20          s001                    column=info:name, timestamp=2024-03-21T01:04:05.318, value=Mike       s002                    column=info:age, timestamp=2024-03-21T01:42:45.619, value=19          s002                    column=info:name, timestamp=2024-03-21T01:42:33.917, value=Tom        s003                    column=info:age, timestamp=2024-03-21T01:44:16.318, value=18          s003                    column=info:name, timestamp=2024-03-21T01:43:45.397, value=Lucy       
3 row(s)
Took 0.2538 seconds

5)对数据表students的指定列族info下的name数据列进行扫描。

hbase:138:0> scan 'students',{COLUMNS=>['info:name']}
ROW                      COLUMN+CELL                                                           s001                    column=info:name, timestamp=2024-03-21T01:04:05.318, value=Mike       s002                    column=info:name, timestamp=2024-03-21T01:42:33.917, value=Tom        s003                    column=info:name, timestamp=2024-03-21T01:43:45.397, value=Lucy       
3 row(s)
Took 0.0447 seconds

6)对数据表students的前2行数据进行扫描。

hbase:139:0> scan 'students',{LIMIT=>2}
ROW                      COLUMN+CELL                                                           s001                    column=info:age, timestamp=2024-03-21T01:11:05.881, value=20          s001                    column=info:name, timestamp=2024-03-21T01:04:05.318, value=Mike       s001                    column=score:Chinese, timestamp=2024-03-21T01:16:34.006, value=90      s001                    column=score:Math, timestamp=2024-03-21T01:32:55.629, value=85        s002                    column=info:age, timestamp=2024-03-21T01:42:45.619, value=19          s002                    column=info:name, timestamp=2024-03-21T01:42:33.917, value=Tom        s002                    column=score:Chinese, timestamp=2024-03-21T01:48:44.123, value=87      s002                    column=score:Math, timestamp=2024-03-21T01:48:59.578, value=70        
2 row(s)
Took 0.0328 seconds 
(4)count:统计表行数
hbase:141:0> count 'students'
3 row(s)
Took 1.1445 seconds                                                                            
=> 3
(5)delete:删除指定数据列单元格

删除数据表students的指定数据列单元格(删除行键003的列族score下的列限定符Math单元格)。

hbase:143:0> delete 'students','s003','score:Math'
Took 0.0677 seconds                                                                            
hbase:144:0> get 'students','s003'
COLUMN                   CELL                                                                  info:age                timestamp=2024-03-21T01:44:16.318, value=18                           info:name               timestamp=2024-03-21T01:43:45.397, value=Lucy                         score:Chines            timestamp=2024-03-21T01:45:40.078, value=80                           
1 row(s)
Took 0.1472 seconds

(6)deleteall:删除指定数据行

1)删除数据表students的行键为s003的数据。

hbase:145:0> deleteall 'students','s003'
Took 0.1017 seconds                                                                            
hbase:146:0> get 'students','s003'
COLUMN                   CELL                                                                  
0 row(s)
Took 0.0270 seconds 

2)删除数据表students的行键为s002,列名为score:chinese的所有数据。

hbase:148:0> deleteall 'students','s002','score:Chinese'
Took 0.0182 seconds                                                                            
hbase:149:0> get 'students','s002'
COLUMN                   CELL                                                                  info:age                timestamp=2024-03-21T01:42:45.619, value=19                           info:name               timestamp=2024-03-21T01:42:33.917, value=Tom                          score:Math              timestamp=2024-03-21T01:48:59.578, value=70                           
1 row(s)
Took 0.0348 seconds

(7)append:给指定列的单元格追加内容

给行键s002,列名info: name的数据列单元格值Tom后面追加son后变成Tomson。

hbase:007:0> append 'students','s002','info:name','son'
CURRENT VALUE = Tomson
Took 0.9325 seconds 
hbase:008:0> get 'students','s002'
COLUMN                                         CELL                                                                                                                                 info:age                                      timestamp=2024-03-21T01:42:45.619, value=19                                                                                          info:name                                     timestamp=2024-03-21T06:16:33.838, value=Tomson                                                                                      score:Math                                    timestamp=2024-03-21T01:48:59.578, value=70                                                                                          
1 row(s)
Took 0.4914 seconds 

(8)truncate:清空指定数据表的全部数据内容

清空数据表students的内容。

hbase:009:0> truncate 'students'
Truncating 'students' table (it may take a while):
Disabling table...
2024-03-21 06:17:52,730 INFO  [main] client.HBaseAdmin (HBaseAdmin.java:rpcCall(926)) - Started disable of students
2024-03-21 06:17:57,843 INFO  [main] client.HBaseAdmin (HBaseAdmin.java:postOperationResult(3591)) - Operation: DISABLE, Table Name: default:students, procId: 194 completed
Truncating table...
2024-03-21 06:17:57,898 INFO  [main] client.HBaseAdmin (HBaseAdmin.java:rpcCall(806)) - Started truncating students
2024-03-21 06:18:02,439 INFO  [main] client.HBaseAdmin (HBaseAdmin.java:postOperationResult(3591)) - Operation: TRUNCATE, Table Name: default:students, procId: 197 completed
Took 10.4274 seconds                                                                                                                                                                
hbase:010:0> scan 'students'
ROW                                            COLUMN+CELL                                                                                                                          
0 row(s)
Took 6.5341 seconds

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

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

相关文章

Unity Mobile Notifications推送问题

1.在部分机型点击通知弹窗进不去游戏 把这里改成自己的Activity 2.推送的时候没有横幅跟icon红点 主要是第一句话 注册的时候选项可以选择 defaultNotificationChannel new AndroidNotificationChannel(“default_channel”, “Default Channel”, “For Generic notifica…

LinkedIn 互联网架构扩展简史

LinkedIn成立于 2003 年,其目标是连接到您的网络以获得更好的工作机会。第一周只有 2,700 名会员。时间快进了很多年,LinkedIn 的产品组合、会员基础和服务器负载都取得了巨大的增长。 如今,LinkedIn 在全球运营,拥有超过 3.5 亿会…

今日AI热点:科技前沿新动态

引言: 人工智能领域日新月异,每天都有令人振奋的新进展。从苹果到谷歌,从OpenAI到Meta,各大科技巨头纷纷推出创新产品和技术,不断推动着人工智能的发展。让我们一起来看看今日AI热点,探索这个充满活力和激情…

C++从入门到精通——命名空间

命名空间 前言一、命名空间引例什么是命名空间 二、命名空间定义正常的命名空间定义嵌套的命名空间多个相同名称的命名空间 三、命名空间使用加命名空间名称及作用域限定符使用using将命名空间中某个成员引入使用using namespace 命名空间名称引用引用命名空间和引用头文件有什…

Mac安装minio

Mac安装minio 本文介绍使用 mac 安装 MinIO。 所有软件安装优先参考官网:MinIO Object Storage for MacOS — MinIO Object Storage for MacOS #使用 brew 安装 minio brew install minio/stable/minio#找到 minio tong ~ $ brew list minio /opt/homebrew/Cella…

【ssh连接】奇奇怪怪报错记录

gitlab配置ssh连接,先跟着教程生成密钥,上传公钥,将服务器信息存入config文件,但是ssh连接超时,很急,想用服务器,各种搜索尝试,搞了两三天别的什么都没干,还是没解决&…

深度学习pytorch——激活函数损失函数(持续更新)

论生物神经元与神经网络中的神经元联系——为什么使用激活函数? 我们将生物体中的神经元与神经网络中的神经元共同分析。从下图可以看出神经网络中的神经元与生物体中的神经元有很多相似之处,由于只有刺激达到一定的程度人体才可以感受到刺激&#xff0c…

硬件6、AD设计PcbLib之引脚间如何设置距离及设置PCB元器件丝印

设置引脚间的距离 一个器件有两个引脚,在制作这个器件的pcblib时,需要设置两个引脚之间的距离 1、先选中其中一个引脚 2、然后拖动至两个引脚重叠 3、按下M键,通过X,Y移动选中对象 4、输入两个引脚中心点之间的距离 5、然后两…

【随笔】Git -- 基本概念和使用方式(五)

💌 所属专栏:【Git】 😀 作  者:我是夜阑的狗🐶 🚀 个人简介:一个正在努力学技术的CV工程师,专注基础和实战分享 ,欢迎咨询! 💖 欢迎大…

排序C++

题目 法1 sort升序排序&#xff0c;再逆序输出 #include<iostream> #include<algorithm> using namespace std;const int N 5e53;//注意const&#xff0c;全局 int a[N]; int main() {//错误int N5e53;//错误const int a[N];int n;cin >> n;for (int i 1;…

水电站生态流量监测解决方案:亲历水电站生态监控改造

​记得那是在2022年夏天,我所在的环保咨询公司接到了一项非常具有挑战性的监测项目。某省的环保部门要求对辖区内所有水电站的生态流量情况进行评估,并给出整改建议。作为项目负责人,我深知这项工作的重要意义。&#xff08;选自&#xff1a;智慧水务数字孪生安全监测解决方案提…

正式发布:VitePress 1.0 现代化静态站点生成器!

大家好&#xff0c;我是奇兵&#xff0c;今天介绍一下现代化静态站点生成器!&#xff0c;希望能帮到大家。 3 月 21 日&#xff0c; 由 Vue 团队出品的现代化静态站点生成器 VitePress 正式发布 1.0 版本&#xff01;它专为构建快速、以内容为中心的网站而生&#xff0c;能够轻…

Wagtail-基于Python Django的内容管理系统CMS实现公网访问

目录 前言 1. 安装并运行Wagtail 1.1 创建并激活虚拟环境 2. 安装cpolar内网穿透工具 3. 实现Wagtail公网访问 4. 固定Wagtail公网地址 前言 Wagtail是一个用Python编写的开源CMS&#xff0c;建立在Django Web框架上。Wagtail 是一个基于 Django 的开源内容管理系统&…

python知识点总结(十)

python知识点总结十 1、装饰器的理解、并实现一个计时器记录执行性能&#xff0c;并且将执行结果写入日志文件中2、队列和栈的区别&#xff0c;并且用python实现3、设计实现遍历目录与子目录4、CPU处理进程最慢的情况通常发生在以下几种情况下&#xff1a;5、CPU处理线程最慢的…

计算机网络基础——网络安全/ 网络通信介质

chapter3 网络安全与管理 1. 网络安全威胁 网络安全&#xff1a;目的就是要让网络入侵者进不了网络系统&#xff0c;及时强行攻入网络&#xff0c;也拿不走信息&#xff0c;改不了数据&#xff0c;看不懂信息。 事发后能审查追踪到破坏者&#xff0c;让破坏者跑不掉。 网络…

c++核心学习--继承2

4.6.7多继承语法 4.6.8菱形继承 利用虚继承解决菱形继承的问题&#xff1a;继承之前加上关键字virtual变为虚继承

基于随机森林与LSTM神经网络的住宅用电比较分析及预测 代码+论文 完整毕设

摘要 本文旨在探讨基于随机森林&#xff08;Random Forest&#xff09;与长短期记忆神经网络&#xff08;Long Short-Term Memory, LSTM&#xff09;的住宅用电比较分析及预测方法。随机森林是一种集成学习方法&#xff0c;通过构建多个决策树进行预测&#xff0c;具有较强的鲁…

【每日一题】2024年3月汇编(上)

3.1【2369】检查数组是否存在有效划分 2369. 检查数组是否存在有效划分https://leetcode.cn/problems/check-if-there-is-a-valid-partition-for-the-array/ 1.这样的判断可以用动态规划来解决&#xff0c;用一个长度为(n1) 的数组来记录 是否存在有效划分&#xff0c;dp[i]…

前端学习笔记 | Node.js

一、Node.js入门 1、什么是Node.js 定义&#xff1a;是跨平台JS运行环境&#xff08;可以独立执行JS的环境&#xff09;作用&#xff1a; 编写数据接口&#xff0c;提供网页资源功能等等前端工程化&#xff1a;为后续学Vue和React等框架做铺垫 2、Node.js为何能执行JS&#xff…

思维升级之路:观察思维深层,解锁认知新境界

目录 一、观察我们的思维习惯 二、人类有哪些思维方法 三、为什么要多使用归纳推理而不是演绎推理 四、转变思维的关键 - 觉察 怎么提升自身的认知水平&#xff1f;这篇文章里&#xff0c;作者尝试对思维模式这件事做出探讨&#xff0c;一起来看看&#xff0c;或许可以帮你…