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
| trait John | |
| trait Carl | |
| trait Tom | |
| trait Child[T,U] | |
| trait GrandChild[T,U] | |
| implicit val john_carl = new Child[John,Carl]{} | |
| implicit val carl_tom = new Child[Carl,Tom ]{} | |
| implicit def grandChild[X,Y,Z]( |
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
| package services | |
| import java.lang.reflect.Type | |
| import com.google.gson._ | |
| import org.joda.time.format.ISODateTimeFormat | |
| import org.joda.time.{DateTime, DateTimeZone} | |
| object Serializers { |
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
| package com.example | |
| import scalaz._ | |
| import Scalaz._ | |
| object testing { | |
| 1 |+| 1 //> res0: Int = 2 | |
val service = new Service[HttpRequest, HttpResponse] {
def apply(request: HttpRequest) =
Future(new DefaultHttpResponse(HTTP_1_1, OK))
}
val server: Server = ServerBuilder() // 4
.codec(Http())
.bindTo(new InetSocketAddress(8080))
.name("HttpServer")
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
| /* Based on | |
| * - EGM Mathematical Finance class by Enrique Garcia M. <egarcia@egm.co> | |
| * - A Guide to the PMT, FV, IPMT and PPMT Functions by Kevin (aka MWVisa1) | |
| */ | |
| var ExcelFormulas = { | |
| PVIF: function(rate, nper) { | |
| return Math.pow(1 + rate, nper); | |
| }, |
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
| cd ~ | |
| sudo yum update | |
| sudo yum install java-1.7.0-openjdk.i686 -y | |
| wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz | |
| tar -xf elasticsearch.tar.gz | |
| rm elasticsearch.tar.gz | |
| mv elasticsearch-* elasticsearch | |
| sudo mv elasticsearch /usr/local/share |