- apt install aptitude
- aptitude update, upgrade
- build-essential
- emacs
- tree
- git
$ cd ~
$ wget https://dl.google.com/go/go$VERSION.$OS-$ARCH.tar.gz
$ sudo tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
$ echo $JAVA_HOME
$ javac -version
javac 1.8.0_161
$ which javac
/usr/bin/javac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
let s = "Hello, World!" | |
print(s) | |
// string -> string array | |
var a = s.map { String($0) } | |
print(a) | |
// string array -> string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
struct board<T> { | |
let w: Int | |
let h: Int | |
var board: [T] | |
init(w: Int, h: Int, v: T) { | |
self.w = w | |
self.h = h | |
self.board = [T].init(repeating: v, count: w*h) |
OlderNewer