-
-
Python Notes: Basic Types
type() returns the type of a variable. [Read More] -
Create Java List from Individual Objects
Problem Sometimes, I need to create a Java List containing only one object. [Read More] -
Python Notes: String
Python3’s string is UTF-8 encoded by default, Python2’s is not. To change the encoding, use s.encode('ascii'). It takes optional parameters to keep unsupported characters. [Read More] -
Python Notes: RegEx
Regular expressions are a powerful and (mostly) standardized way of searching, replacing, and parsing text with complex patterns of characters. [Read More] -
Python Notes: Iterator
An iterator is just a class that defines an __iter__(self) method. __iter__(self) function is automatically called when iter(inst) is called, where inst is an instance of this class. After performing beginning-of-iteration initialization, the __iter__() method returns any object that implements a __next__() method. Sometimes it just return self, because the... [Read More] -
Ruby Notes
General Everything in Ruby is an object. [Read More] -
Bash Notes
Notes ./script.sh and sh script.sh runs the script in a new subshell of current shell, while source script.sh executes it in current shell. [Read More] -
Akka Notes
General Actor Model: OO implementation of large scale concurrent application. It can be hierarchical. [Read More] -
Learning Scala - Operators and Statements
Operators Infix operators: a identifier b, such as 1 to 10, 1-> 10. They’re binary operators. [Read More] -
Leetcode 274: H-Index
Question [Read More] -
Learning Scala - IO
Scala provides a few extensions to Java’s IO library. [Read More] -
Learning Scala - Application
An object that extends the App trait becomes the entry point of a Scala application, and the body of the object will be run. Any command-line arguments will be available through the args object of type Array[String], which is inherited from the App trait. [Read More] -
Learning Scala - Variables and Types
Unlike Java, Scala provides both immutable “values” and mutable “variables”, to reflect its functional programming features. [Read More] -
Learning Scala - Implicits