C Primer Plus Study Note】的更多相关文章

最近在学C语言,看好这本C Primer Plus,看到第九章了,记录一下第一章目录. 第一章 初识C语言 C语言的起源 选择C语言的理由 设计特性 高效性 可移植性 强大而灵活 面向程序员 缺点 C语言的应用范围 计算机能做什么 高级计算机语言和编译器 语言标准 第1个ANSI/ISO C标准 C99标准 C11标准 使用C语言的7个步骤 定义程序目标 设计程序 编写代码 编译 运行程序 测试和调试程序 维护和修改程序 说明 编程机制 目标代码文件.可执行文件和库 UNIX系统 在UNIX系统…
1. Translating Java Classes to Scala Classes Example 1: # a class declaration in Java public class Book{} # Scala equivalent of a class declaration class Book Example 2: # a Java class with a Construtor public class Book{ private final int isbn; priv…
1. Unified Type System Scala has a unified type system, enclosed by the type Any at the top of the hierarchy and the type Nothing at the bottom of the hierarchy. All Scala types inherit from Any. # Using Any, Book extends AnyRef, and x is an Int that…
A trait provides code reusability in Scala by encapsulating method and state and then offing possibility of mixing them into classes thus allowing code reuse. #define Trait Gliding scala> trait Gliding{ | def gliding(){ println("gliding")} |…
Scala's object-oriented collections support mutable and immutable type hierarchies. Also support functional higher-order operations such as map, filter, and reduce that let you use expression-oriented programming in collections. Higher-order operatio…
The basic functional cornerstones of Scala: immutable data types, passing of functions as parameters and pattern matching. 1. Basic Pattern Matching In Scala, your cases can include types, wildcards, sequences, regular expressions, and so forth. scal…
1. Functional programming treats computation as the evaluation of mathematical and avoids state and mutable data. Scala encourages an expression-oriented programming(EOP) 1) In expression-oriented programming every statement is an expression. A state…
1. The three principles of OOP are encapsulation(封装性), inheritance(继承性) and polymorphism(多态性). example: class Shape{ def area: Double = 0.0 } # supertype # subtypes class Rectangle(val width: Double, val height: Double) extends Shape{ override def ar…
1. Variables (1) Three ways to define variables: 1) val refers to define an immutable variable; scala> val x = x: Int = scala> x*x res4: Int = scala> res4 + # use result as a value res6: Int = scala> res4 + res6 res7: Int = scala> x = # x i…
TestNG 插件在线安装 Help -> Install New Software -> Add -> Paste TestNG url to Add:  http://testng.org/eclipse-beta -> OK -> Select All -> click Next -> Finished. NOTE: since TestNG Eclipse Plugin 6.9.10, there is a new optional plug-in for…