Note 2: Complain 1. The collection of Linkun's [1]: 1.1suck If someone says that something sucks, they are indicating that they think it is very bad. [V] [feelings] [Informal] [RUDE]E.g., The system sucks. 1.2sick and tired of ... 1.3terrible 1.4horr…
Mem pro 是一个主要集成内存泄露检测的工具,其具有自身的源码和GUI,在GUI中利用"Launch" button进行加载自己待检测的application,目前支持的平台为Windows,Unix, Linux, OSX, IOS, GCC:但是按照官网的说法,其虽然只能运行到WIN上,但是根据TCP协议传输dump的方式也可以和其他平台的app进行连接: 关于内存泄露,按照官方文档中的说法,其检测内存泄露的算法主要是两种,一种是在抓取dump时候未被引用的变量会被认定为泄露,…
Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from the magazines ; otherwise, it wil…
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…