HBase常用API操作
文章目录
- 第一步:创建maven工程,导入jar包
- 第二步:开发javaAPI操作HBase表数据
- 1、创建表myuser
- 2、向表中添加数据
- 3、查询数据
- 3.1、 按照rowkey进行查询获取所有列的所有值
- 3.2、 按照rowkey查询指定列族下面的指定列的值
- 3.3、 通过startRowKey和endRowKey进行扫描
- 3.4、 通过scan进行全表扫描
- 4、根据rowkey删除数据
- 5、删除表操作
编写HBaseAPI
熟练掌握通过使用java代码实现HBase数据库当中的数据增删改查的操作,特别是各种查询,熟练运用
第一步:创建maven工程,导入jar包
<repositories><repository><id>cloudera</id><url>https://repository.cloudera.com/artifactory/cloudera-repos/</url></repository>
</repositories>
<dependencies><dependency><groupId>org.apache.hadoop</groupId><artifactId>hadoop-client</artifactId><version>2.6.0-mr1-cdh5.14.0</version></dependency><dependency><groupId>org.apache.hbase</groupId><artifactId>hbase-client</artifactId><version>1.2.0-cdh5.14.0</version></dependency><dependency><groupId>org.apache.hbase</groupId><artifactId>hbase-server</artifactId><version>1.2.0-cdh5.14.0</version></dependency><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.12</version><scope>test</scope></dependency><dependency><groupId>org.testng</groupId><artifactId>testng</artifactId><version>6.14.3</version><scope>test</scope></dependency><dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter-api</artifactId><version>RELEASE</version><scope>compile</scope></dependency>
</dependencies>
<build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.0</version><configuration><source>1.8</source><target>1.8</target><encoding>UTF-8</encoding><!-- <verbal>true</verbal>--></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-shade-plugin</artifactId><version>2.2</version><executions><execution><phase>package</phase><goals><goal>shade</goal></goals><configuration><filters><filter><artifact>*:*</artifact><excludes><exclude>META-INF/*.SF</exclude><exclude>META-INF/*.DSA</exclude><exclude>META-INF/*/RSA</exclude></excludes></filter></filters></configuration></execution></executions></plugin></plugins>
</build>
第二步:开发javaAPI操作HBase表数据
1、创建表myuser
public static void createTable() throws IOException {Configuration conf = new Configuration();//连接hbase集群不需要指定hbase主节点的ip地址和端口号conf.set("hbase.zookeeper.quorum", "node01:2181,node02:2181,node03:2181");//创建连接对象Connection connection = ConnectionFactory.createConnection(conf);//获取连接对象,创建一张表//获取管理员对象,来对数据库进行DDL的操作Admin admin = connection.getAdmin();//指定我们的表名TableName myuser = TableName.valueOf("myuser");HTableDescriptor hTableDescriptor = new HTableDescriptor(myuser);//指定两个列族HColumnDescriptor f1 = new HColumnDescriptor("f1");HColumnDescriptor f2 = new HColumnDescriptor("f2");hTableDescriptor.addFamily(f1);hTableDescriptor.addFamily(f2);admin.createTable(hTableDescriptor);admin.close();connection.close();}
2、向表中添加数据
/*** 插入数据*/public void addDatas() throws IOException {//获取连接Configuration conf = new Configuration();conf.set("hbase.zookeeper.quorum", "node01:2181,node02:2181");Connection connection = ConnectionFactory.createConnection(conf);//获取表Table myuser = connection.getTable(TableName.valueOf("myuser"));//创建put对象,并指定rowkeyPut put = new Put("0001".getBytes());put.addColumn("f1".getBytes(), "id".getBytes(), Bytes.toBytes(1));put.addColumn("f1".getBytes(), "name".getBytes(), Bytes.toBytes("张三"));put.addColumn("f1".getBytes(), "age".getBytes(), Bytes.toBytes(18));put.addColumn("f2".getBytes(), "address".getBytes(), Bytes.toBytes("地球人"));put.addColumn("f2".getBytes(), "phone".getBytes(), Bytes.toBytes("158741025aa"));//插入数据myuser.put(put);//关闭表myuser.close();}
3、查询数据
初始化一批数据到HBase当中用于查询
public void insertBatchData() throws IOException {//获取连接Configuration conf =new Configuration();conf.set("hbase.zookeeper.quorum", "node01:2181,node02:2181");Connection connection = ConnectionFactory.createConnection(conf);//获取表Table myuser = connection.getTable(TableName.valueOf("myuser"));//创建put对象,并指定rowkeyPut put = new Put("0002".getBytes());put.addColumn("f1".getBytes(),"id".getBytes(),Bytes.toBytes(1));put.addColumn("f1".getBytes(),"name".getBytes(),Bytes.toBytes("曹操"));put.addColumn("f1".getBytes(),"age".getBytes(),Bytes.toBytes(30));put.addColumn("f2".getBytes(),"sex".getBytes(),Bytes.toBytes("1"));put.addColumn("f2".getBytes(),"address".getBytes(),Bytes.toBytes("沛国谯县"));put.addColumn("f2".getBytes(),"phone".getBytes(),Bytes.toBytes("16888888888"));put.addColumn("f2".getBytes(),"say".getBytes(),Bytes.toBytes("helloworld"));Put put2 = new Put("0003".getBytes());put2.addColumn("f1".getBytes(),"id".getBytes(),Bytes.toBytes(2));put2.addColumn("f1".getBytes(),"name".getBytes(),Bytes.toBytes("刘备"));put2.addColumn("f1".getBytes(),"age".getBytes(),Bytes.toBytes(32));put2.addColumn("f2".getBytes(),"sex".getBytes(),Bytes.toBytes("1"));put2.addColumn("f2".getBytes(),"address".getBytes(),Bytes.toBytes("幽州涿郡涿县"));put2.addColumn("f2".getBytes(),"phone".getBytes(),Bytes.toBytes("17888888888"));put2.addColumn("f2".getBytes(),"say".getBytes(),Bytes.toBytes("talk is cheap , show me the code"));Put put3 = new Put("0004".getBytes());put3.addColumn("f1".getBytes(),"id".getBytes(),Bytes.toBytes(3));put3.addColumn("f1".getBytes(),"name".getBytes(),Bytes.toBytes("孙权"));put3.addColumn("f1".getBytes(),"age".getBytes(),Bytes.toBytes(35));put3.addColumn("f2".getBytes(),"sex".getBytes(),Bytes.toBytes("1"));put3.addColumn("f2".getBytes(),"address".getBytes(),Bytes.toBytes("下邳"));put3.addColumn("f2".getBytes(),"phone".getBytes(),Bytes.toBytes("12888888888"));put3.addColumn("f2".getBytes(),"say".getBytes(),Bytes.toBytes("what are you 弄啥嘞!"));Put put4 = new Put("0005".getBytes());put4.addColumn("f1".getBytes(),"id".getBytes(),Bytes.toBytes(4));put4.addColumn("f1".getBytes(),"name".getBytes(),Bytes.toBytes("诸葛亮"));put4.addColumn("f1".getBytes(),"age".getBytes(),Bytes.toBytes(28));put4.addColumn("f2".getBytes(),"sex".getBytes(),Bytes.toBytes("1"));put4.addColumn("f2".getBytes(),"address".getBytes(),Bytes.toBytes("四川隆中"));put4.addColumn("f2".getBytes(),"phone".getBytes(),Bytes.toBytes("14888888888"));put4.addColumn("f2".getBytes(),"say".getBytes(),Bytes.toBytes("出师表你背了嘛"));Put put5 = new Put("0005".getBytes());put5.addColumn("f1".getBytes(),"id".getBytes(),Bytes.toBytes(5));put5.addColumn("f1".getBytes(),"name".getBytes(),Bytes.toBytes("司马懿"));put5.addColumn("f1".getBytes(),"age".getBytes(),Bytes.toBytes(27));put5.addColumn("f2".getBytes(),"sex".getBytes(),Bytes.toBytes("1"));put5.addColumn("f2".getBytes(),"address".getBytes(),Bytes.toBytes("哪里人有待考究"));put5.addColumn("f2".getBytes(),"phone".getBytes(),Bytes.toBytes("15888888888"));put5.addColumn("f2".getBytes(),"say".getBytes(),Bytes.toBytes("跟诸葛亮死掐"));Put put6 = new Put("0006".getBytes());put6.addColumn("f1".getBytes(),"id".getBytes(),Bytes.toBytes(5));put6.addColumn("f1".getBytes(),"name".getBytes(),Bytes.toBytes("xiaobubu—吕布"));put6.addColumn("f1".getBytes(),"age".getBytes(),Bytes.toBytes(28));put6.addColumn("f2".getBytes(),"sex".getBytes(),Bytes.toBytes("1"));put6.addColumn("f2".getBytes(),"address".getBytes(),Bytes.toBytes("内蒙人"));put6.addColumn("f2".getBytes(),"phone".getBytes(),Bytes.toBytes("15788888888"));put6.addColumn("f2".getBytes(),"say".getBytes(),Bytes.toBytes("貂蝉去哪了"));List<Put> listPut = new ArrayList<Put>();listPut.add(put);listPut.add(put2);listPut.add(put3);listPut.add(put4);listPut.add(put5);listPut.add(put6);myuser.put(listPut);myuser.close();}
3.1、 按照rowkey进行查询获取所有列的所有值
查询主键rowkey为0003的人
/*** 查询数据,按照主键id进行查询*/public void searchData() throws IOException {Configuration conf = new Configuration();conf.set("hbase.zookeeper.quorum", "node01:2181,node02:2181,node03:2181");Connection connection = ConnectionFactory.createConnection(conf);Table myuser = connection.getTable(TableName.valueOf("myuser"));Get get = new Get(Bytes.toBytes("0003"));Result result = myuser.get(get);Cell[] cells = result.rawCells();//获取所有的列名称以及列的值for (Cell cell : cells) {//注意,如果列属性是int类型,那么这里就不会显示if (Bytes.toString(CellUtil.cloneQualifier(cell)).equals("id") || Bytes.toString(CellUtil.cloneQualifier(cell)).equals("age")) {System.out.println(Bytes.toString(CellUtil.cloneFamily(cell)));System.out.println(Bytes.toString(CellUtil.cloneQualifier(cell)));System.out.println(Bytes.toString(CellUtil.cloneRow(cell)));System.out.println(Bytes.toInt(CellUtil.cloneValue(cell)));} else {System.out.println(Bytes.toString(CellUtil.cloneFamily(cell)));System.out.println(Bytes.toString(CellUtil.cloneQualifier(cell)));System.out.println(Bytes.toString(CellUtil.cloneRow(cell)));System.out.println(Bytes.toString(CellUtil.cloneValue(cell)));}}myuser.close();}
3.2、 按照rowkey查询指定列族下面的指定列的值
public static void searchdata2() throws IOException {Configuration conf = new Configuration();conf.set("hbase.zookeeper.quorum", "node01:2181,node02:2181,node03:2181");Connection connection = ConnectionFactory.createConnection(conf);Table myuser = connection.getTable(TableName.valueOf("myuser"));Get get = new Get("0003".getBytes());// get.addFamily("f1".getBytes());get.addColumn("f1".getBytes(), "name".getBytes());Result result = myuser.get(get);Cell[] cells = result.rawCells();for (Cell cell : cells) {if (Bytes.toString(CellUtil.cloneQualifier(cell)).equals("id") || Bytes.toString(CellUtil.cloneQualifier(cell)).equals("age")) {System.out.println(Bytes.toString(CellUtil.cloneFamily(cell)));System.out.println(Bytes.toString(CellUtil.cloneQualifier(cell)));System.out.println(Bytes.toString(CellUtil.cloneRow(cell)));System.out.println(Bytes.toInt(CellUtil.cloneValue(cell)));} else {System.out.println(Bytes.toString(CellUtil.cloneFamily(cell)));System.out.println(Bytes.toString(CellUtil.cloneQualifier(cell)));System.out.println(Bytes.toString(CellUtil.cloneRow(cell)));System.out.println(Bytes.toString(CellUtil.cloneValue(cell)));}}}
3.3、 通过startRowKey和endRowKey进行扫描
/*** 通过startRowKey和endRowKey进行扫描查询*/public static void scanrowkey() throws IOException {Configuration conf = new Configuration();conf.set("hbase.zookeeper.quorum", "node01:2181,node02:2181,node03:2181");Connection connection = ConnectionFactory.createConnection(conf);Table myuser = connection.getTable(TableName.valueOf("myuser"));Scan scan = new Scan();scan.setStartRow("0002".getBytes());scan.setStopRow("0006".getBytes());ResultScanner scanner = myuser.getScanner(scan);for (Result result : scanner) {System.out.println("rowkey " + Bytes.toString(result.getRow()));
/*System.out.println(Bytes.toInt(result.getValue("f1".getBytes(),"id".getBytes())));System.out.println(Bytes.toString(result.getValue("f1".getBytes(),"name".getBytes())));System.out.println(Bytes.toInt(result.getValue("f1".getBytes(),"age".getBytes())));
*/Cell[] cells = result.rawCells();for (Cell cell : cells) {if (Bytes.toString(CellUtil.cloneQualifier(cell)).equals("id") || Bytes.toString(CellUtil.cloneQualifier(cell)).equals("age")) {System.out.println(Bytes.toString(CellUtil.cloneFamily(cell)));System.out.println(Bytes.toString(CellUtil.cloneQualifier(cell)));System.out.println(Bytes.toString(CellUtil.cloneRow(cell)));System.out.println(Bytes.toInt(CellUtil.cloneValue(cell)));} else {System.out.println(Bytes.toString(CellUtil.cloneFamily(cell)));System.out.println(Bytes.toString(CellUtil.cloneQualifier(cell)));System.out.println(Bytes.toString(CellUtil.cloneRow(cell)));System.out.println(Bytes.toString(CellUtil.cloneValue(cell)));}}}}
3.4、 通过scan进行全表扫描
/*** 全表扫描*/public static void scanrow() throws IOException {Configuration conf = new Configuration();conf.set("hbase.zookeeper.quorum", "node01:2181,node02:2181,node03:2181");Connection connection = ConnectionFactory.createConnection(conf);Table myuser = connection.getTable(TableName.valueOf("myuser"));Scan scan = new Scan();ResultScanner scanner = myuser.getScanner(scan);for (Result result : scanner) {System.out.println("rowkey " + Bytes.toString(result.getRow()));System.out.println(Bytes.toInt(result.getValue("f1".getBytes(), "id".getBytes())));System.out.println(Bytes.toString(result.getValue("f1".getBytes(), "name".getBytes())));System.out.println(Bytes.toInt(result.getValue("f1".getBytes(), "age".getBytes())));/* Cell[] cells = result.rawCells();for (Cell cell : cells) {if (Bytes.toString(CellUtil.cloneQualifier(cell)).equals("id" )|| Bytes.toString(CellUtil.cloneQualifier(cell)).equals("age")){System.out.println(Bytes.toString(CellUtil.cloneFamily(cell)));System.out.println(Bytes.toString(CellUtil.cloneQualifier(cell)));System.out.println(Bytes.toString(CellUtil.cloneRow(cell)));System.out.println(Bytes.toInt(CellUtil.cloneValue(cell)));}else {System.out.println(Bytes.toString(CellUtil.cloneFamily(cell)));System.out.println(Bytes.toString(CellUtil.cloneQualifier(cell)));System.out.println(Bytes.toString(CellUtil.cloneRow(cell)));System.out.println(Bytes.toString(CellUtil.cloneValue(cell)));}}*/}}
4、根据rowkey删除数据
/*** 删除数据*/public void deleteByRowKey() throws IOException {//获取连接Configuration conf =new Configuration();conf.set("hbase.zookeeper.quorum","node01:2181,node02:2181,node03:2181");Connection connection = ConnectionFactory.createConnection(conf);Table myuser = connection.getTable(TableName.valueOf("myuser"));Delete delete = new Delete("0001".getBytes());myuser.delete(delete);myuser.close();}
5、删除表操作
public void deleteTable() throws IOException {//获取连接Configuration conf =new Configuration();conf.set("hbase.zookeeper.quorum","node01:2181,node02:2181,node03:2181");Connection connection = ConnectionFactory.createConnection(conf);Admin admin = connection.getAdmin();admin.disableTable(TableName.valueOf("myuser"));admin.deleteTable(TableName.valueOf("myuser"));admin.close();}
相关文章:

Kanade's trio 2017多校#3 trie
求数组中i<j<k 并且ai^aj<aj^ak的三元组组数 枚举插入ak,让ak中每一位作为最高位,查找字典树内最高位不同的数字数量 注意把ak的每个前缀做一个bad标记 存储让这个前缀作为i可以与字典树内形成i,j对的个数,这些不满足i<j ai : 1…
使用VS2005进行代码覆盖率分析
下面通过一个简单的例子来讲解VS2005是如何做代码分析的(此处所做的代码分析是在单元测试之后进行的,其分析代码仍然使用上节的做和代码) 1、上节的原始代码和单元测试代码分别如下: //原始代码 using System; using System.Colle…

云计算时代的数据库运行
云计算时代的高可用数据库是可扩展、容错且与任何私有云或公共云兼容的数据库实例。它们旨在提供业务连续性,而不会因任何类型的硬件或网络故障而导致用户体验的影响。其核心设计原则是消除任何单点故障,并提供平稳的故障转移体验。 公共云和私有云使企业…

Java:在Bean中使用PropertyChangeSupport支持PropertyChangeListeners
本文主要介绍如何使用PropertyChangeSupport类来支持关联属性事件的触发。author: ZJ 2007-8-3Blog: [url]http://zhangjunhd.blog.51cto.com/[/url]JavaBean的属性与一般Java程序中所指的属性,或者说与所有面向对象的程序设计语言中对象的属性是一个概念࿰…

【做题】SRM701 Div1 Hard - FibonacciStringSum——数学和式&矩阵快速幂
原文链接 https://www.cnblogs.com/cly-none/p/SRM701Div1C.html 题意:定义"Fibonacci string"为没有连续1的01串。现在,给出\(a,b\),定义一个"Fibonacci string"的权值为\(x^a y^b\),其中\(x\)为0的个数&…

scala定义抽象类与抽象字段
抽象类 和Java语言一样,scala中也可以定义抽象类 定义: 如果类的某个成员在当前类中的定义是不包含完整的,它就是一个抽象类 不完整定义有两种情况: 1.方法没有方法体(抽象方法) 2.变量没有初始化…

kuangbin专题16B(kmp模板)
题目链接: https://vjudge.net/contest/70325#problem/B 题意: 输出模式串在主串中出现的次数 思路: kmp模板 在 kmp 函数中匹配成功计数加一, 再令 j nxt[j] 即可. 感觉有点奇怪的就是我拿 A 题的模板写这题居然会 tle, 而拿这题的模板写 A 题又没有 A 题的模板跑的快...可能…

[转]C#日期格式化 文档
日期转化一 为了达到不同的显示效果有时,我们需要对时间进行转化,默认格式为:2007-01-03 14:33:34 ,要转化为其他格式,要用到DateTime.ToString的方法(String, IFormatProvider),如下所示: usin…
探讨ASP.NET AJAX客户端开发技术
一、 简介 在ASP.NET AJAX组件开发中,存在许多环节有待我们深入挖掘。如何让ASP.NET AJAX服务端控件更有效地利用客户端脚本来为控件添加强大的客户端功能?如何更为方便地访问控件访问的资源,等等。实践证明,要实现最终的应用程序…

mfc 应用程序 语言进行本地化
在软件国际化的今天,资源从代码中独立出来,使在不同语言操作系统下能运行不同语言版本的程序,是很有意义的事. MFC 7.0 及更高版本提供对附属 DLL 的增强支持,该功能有助于创建针对多种语言进行本地化的应用程序。附属 DLL 是一个纯资源 DLL,它包含应用程…

前端优化系列之一:dns预获取 dns-prefetch 提升页面载入速度
问题:怎么做到dns域解析?用于优化网站页面的图片问题:怎么提升网站性能?dns域解析,是提升网站的一个办法。DNS Prefetch,即DNS预获取,是前端优化的一部分。 一般来说,在前端优化中与…

暑假集训D15总结
考试 日常爆炸 T1数据背锅,回天乏力 推了两个小时的T2竟然莫名RE,我也是服了 T3考试时就没读懂题,做个鬼啊 今天一直在写某奇怪的技术贴,竟然没有写题解(手动滑稽) 希望明天不要乱炸吧 博客 强行推荐一波自…

maven-assembly-plugin和maven-shade-plugin打包区别及弊端
使用 maven 插件 maven-shade-plugin 对可执行 java 工程及其全部依赖 jar 进行打包 maven-shade-pluginmaven-assembly-pluginmavenjar打包 现在基本上都是采用 maven 来进行开发管理,我有一个需求是需要把通过 maven 管理的 java 工程打成可执行的 jar 包&#x…

【Spark】Spark基础练习题(一)
题目: 1、创建一个1-10数组的RDD,将所有元素*2形成新的RDD 2、创建一个10-20数组的RDD,使用mapPartitions将所有元素*2形成新的RDD 3、创建一个元素为 1-5 的RDD,运用 flatMap创建一个新的 RDD,新的 RDD 为原 RDD 每…

Python(27)_字符串的常用的方法2
#-*-coding:utf-8-*-字符串操作s " bowen " # 从右边删 s1 s.rstrip() print(len(s1)) s2 s1.lstrip() print(len(s2)) 从右边删除元素,从左边删除元素,这个在以后项目中经常用到 二、计算个数 #-*-coding:utf-8-*-字符串操作s " bo…

tensorflow1
1、什么是tensorflow tensorflow是一个开源软件库,使用data flow graphs进行数值计算,最初由Google大脑团队开发,用于机器学习和深度卷积网络的研究,同样适用于其他广泛的领域。 2、访问tensorflow官网:在Windows的hos…

大型企业门户网站设计开发一般性原则和建议
[适用范围] 本文所述的原则、建议适用于大型企业信息门户网站的设计和开发,注意不是小型企业网站、一般企业电子商务网站、企业级Web应用系统。 [一般性原则] 一、网站设计原则 第一原则:内容丰富、明确 网站主要是为浏览着提供信息服务的,作…

8月第3周回顾:四巨头发三大新闻 一报告引多家争议
8月15日是51CTO.com成立两周年的日子,网站举办了多种活动进行了庆祝;凑巧的是,IT界在本周也热闹非凡:微软、甲骨文、IBM和Sun联手送上三份重要新闻;国内一份个人安全的报告引起一场小小的风波——这些都足以让关注IT技…

车辆匹配和平均车速计算
数据测试内容以及详情见 https://github.com/xueyeyu/avgsp /* 作者:雪夜羽 平均车速计算(sqlserver)基于电警 QQ:1412900482 */ import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement…

为何 Map接口不继承Collection接口
1.首先Map提供的是键值对映射(即Key和value的映射),而collection提供的是一组数据(并不是键值对映射)。 如果map继承了collection接口,那么所有实现了map接口的类到底是用map的键值对映射数据还是用collec…

Linux 开机网络无法自动连接配置、网络开机自动连接
第一步:查看开机后网络是否正常连接? 1、图形界面开机后直接看右上角的网络是否连接正常(如图一)。 图一(表示未正常连接↑↑↑↑↑↑↑↑↑) 2、如果是命令页面的,可以使用命令查看网络连接情况…

sql中将分隔字符串转为临时表的方法
问题: 要求将 一字符串 0,1,2,3,4,5 ;将,分隔后的每一内容转为一行记录到数据库表中declare table_串转数组 table( adapt_object int default 0) declare tmp_str varchar(100) declare tmp_index int select tmp_index 1 select tmp_str 0,1,12,03,4,5,a,…

每天学一点flash(15) xml的一些常见写法
今天下了大雨来了,什么地方去不了,只好将想写的东西都记载下来。 一些常见的一些xml写法,收集目的就是为了代码调试方便: 一.简单数组单值形 <?xml version"1.0" encoding"UTF-8"?> <i…

spark为什么比hive速度快?
spark是什么? spark是针对于大规模数据处理的统一分析引擎,通俗点说就是基于内存计算的框架 spark和hive的区别? spark的job输出结果可保存在内存中,而MapReduce的job输出结果只能保存在磁盘中,io读取速度要比内存中…

kotlin 练习
kotlin基础语法 samychen 关注 2017.05.28 17:07* 字数 1224 阅读 2434评论 0喜欢 6每种编程语言都有一定的语法、语义和执行顺序(同步),学习一种新语言也都是从这三者出发,下面我们就只针对kotlin的语法来做简单的介绍。 Kotlin有自己的特性不该被Java的…

软件设计之 数据库设计
[按语:在软件设计或是动态网站开发中,数据库设计时很重要,我觉得可以说是开发工作的核心部分,所以学好数据库设计,是很重要的,也是大有前途的。。。]◆.概念首先要搞清楚容易混淆的两个概念&…

css结构思维导图
以下的图是根据css基础,样式,框模型,定位以及选择器这几个方面总结出来的思维导图,方便记忆以及查询。 转载于:https://www.cnblogs.com/yuexiuyi/p/7352516.html

C#类的修饰符
访问修饰符:public:访问不受限制。protected:访问仅限于包含类或从包含类派生的类型。只有包含该成员的类以及继承的类可以存取.Internal:访问仅限于当前程序集。只有当前工程可以存取.protected internal:访问仅限于当前程序集或…

Appium+Python 自动化测试一之:环境安装(Android篇)
目前网上有大量AppiumPython的APP自动化测试的资料,这里我只是记录一下自己安装的过程,好让自己以后忘记的时候再翻起来看看,快速上手,不想再像之前那样踩坑。 注:因为之前玩过Robot FrameworkSelenium2,所…

sql server 2005 T-SQL @@TOTAL_READ (Transact-SQL)
返回 SQL Server 自上次启动后由 SQL Server 读取(非缓存读取)的磁盘的数目。 Transact-SQL 语法约定 语法 TOTAL_READ 返回类型 integer 备注 若要显示包含多项 SQL Server 统计信息(包括读写活动)的报表,请运行 sp_m…