Dart Learn Notes 02】的更多相关文章

Functions Dart是一门面向对象的语言,所以即便是方法也是一个对象,它的类型是Function. 这就意味着方法可以指向变量,也可以作为方法中的参数供其他方法使用.甚至可以让 一个类作为一个方法,这种类叫Callable classes,即回调类. bool isTrule(String args) { return args != Null; } 定义一个方法注意返回值和参数. 在Dart中是不允许出现这种方法的: bool isTrule(String args) { return…
流程控制语句 流程控制语句的作用就是控制代码的执行流程. if and else var a = 10; if(a > 10){ print('ok'); }else if( 5 < a <=10 ){ print('soso'); }else{ print('not ok'); } for循环 var list = []; for(int i = 0; i<10; i++){ list.add(i); } list.forEach((item) => print(item)…
操作符 dart 有一套自己定义的操作符: 这里我就不再写了,直接copy一份官网的. 如果有过编程基础,上边展示的操作符应该都不陌生. 算术运算符 加: + 减: - 乘: * 除: / 取余: % 取模: ~/ 自增: ++var, var++ 自减: --var, var-- 比较运算符 ==: 等于 !=: 不等 >: 大于 <: 小于 >=: 大于等于 <=: 小于等于 类型判断 as: 类型转换 is: 判断是否是某种类型 is!: 判断是否不是某种类型 赋值操作符 =…
关于Dart的几点重要说明 在Dart中所有变量都是一个对象,所有对象都是一个类的实例.每个数字,方法,甚至是Null都是对象.所有的对吸纳更都是集成自Object这个类.(这个说法其实是很像Java的) Dart虽然是个强类型语言,但是它可以推测类型.像number就被推测为int.如果你想明确的说不指定类型,可以使用dynamic.(这一点其实已经和高版本的jdk很像了, dynamic 就像是Java中的范型) Dart是支持范型的.比如 List<int> 和List<dynam…
[JSU]LJDragon's Oracle course notes In the first semester, junior year I.用户和权限 1.用户操作 --创建新用户 CREATE USER LJL IDENTIFIED BY LJL; --解锁用户 ALTER USER LJL ACCOUNT UNLOCK; --修改密码 ALTER USER LJL IDENTIFIED BY 123; 2.DCL授权语句 --GRANT 权限1,权限2,-- TO 用户; --授予开发…
Linux Essentials Certification Globbing ls ?.txt --- ? stands for one character while * means one or more characters ls [F]*.txt --- list file starting with F ls [F]*.txt --- list file starting with F ls f[igh] --- the first character is f, but the s…
Main reference: [1] http://winterbe.com/posts/2014/03/16/java-8-tutorial/ [2] https://plus.google.com/107771575694787223844/posts 1. Add default methods for Interfaces In java 8, Interface could have concrete methods using keyword 'default'. interfac…
References: [1] http://www.tldp.org/LDP/Bash-Beginners-Guide/html/ 1. Executing programs from a script When the program being executed is a shell script, bash will create a new bash process using a fork. This subshell reads the lines from the shell s…
Main reference [1] http://winterbe.com/posts/2014/07/31/java8-stream-tutorial-examples 1. How Streams Work A stream represents a sequence of elements and supports different kind of operations to perform computations upon those elements: List<String>…
One #install package install.packages("ggplot2") #load library library(ggplot2) #update.packages() #vector v=c(1,4,4,3,2,2,3) #get vector elements, index is 2,3,4 v[c(2,3,4)] #get vector elements, index range is 2 to 4 v[2:4] #get vector element…