I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This file contains hidden or 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
| 2014-03-04 | 15dfb8e6cc4111e3a5bb600308919594 | 11 | |
|---|---|---|---|
| 2014-03-06 | 81da510acc4111e387f3600308919594 | 61 |
| One | Many | |
|---|---|---|
| Synchronous | T/Try[T] | Iterable[T] |
| Asynchronous | Future[T] | Observable[T] |
This file contains hidden or 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
| $ ./bin/spark-shell | |
| 14/04/18 15:23:49 INFO spark.HttpServer: Starting HTTP Server | |
| 14/04/18 15:23:49 INFO server.Server: jetty-7.x.y-SNAPSHOT | |
| 14/04/18 15:23:49 INFO server.AbstractConnector: Started SocketConnector@0.0.0.0:49861 | |
| Welcome to | |
| ____ __ | |
| / __/__ ___ _____/ /__ | |
| _\ \/ _ \/ _ `/ __/ '_/ | |
| /___/ .__/\_,_/_/ /_/\_\ version 0.9.1 | |
| /_/ |
This file contains hidden or 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
| // === Arrays | |
| var [a, b] = [1, 2]; | |
| console.log(a, b); | |
| //=> 1 2 | |
| // Use from functions, only select from pattern | |
| var foo = () => [1, 2, 3]; |
This file contains hidden or 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
| #!/bin/sh | |
| # one way (older scala version will be installed) | |
| # sudo apt-get install scala | |
| #2nd way | |
| sudo apt-get remove scala-library scala | |
| wget http://www.scala-lang.org/files/archive/scala-2.11.4.deb | |
| sudo dpkg -i scala-2.11.4.deb | |
| sudo apt-get update |
This file contains hidden or 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
| #!/bin/sh | |
| VERSION="0.20.6" | |
| wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$VERSION.tar.gz | |
| tar -xf elasticsearch-$VERSION.tar.gz | |
| mv elasticsearch-$VERSION elasticsearch | |
| elasticsearch/bin/elasticsearch -f |
This file contains hidden or 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
| license: gpl-3.0 |
This file contains hidden or 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
| case class ReaderWriterStateT[R, W, S, F[_], A]( | |
| run: (R, S) => F[(W, A, S)] | |
| ) { | |
| def map[B](f: A => B)(implicit F: Functor[F]) | |
| : ReaderWriterStateT[R, W, S, F, B] = | |
| ReaderWriterStateT { | |
| case (r, s) => F.map(run(r, s)) { | |
| case (w, a, s) => (w, f(a), s) | |
| } | |
| } |