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
-server | |
-Xms2048m | |
-Xmx2048m | |
-XX:NewSize=512m | |
-XX:MaxNewSize=512m | |
-XX:PermSize=512m | |
-XX:MaxPermSize=512m | |
-XX:+UseParNewGC | |
-XX:ParallelGCThreads=4 | |
-XX:MaxTenuringThreshold=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
package main | |
import ( | |
"fmt" | |
"bufio" | |
"os" | |
"math" | |
) | |
type ActorI interface { |
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
c, _ := sender.Send("Hi from Server!") | |
//fmt.Println(c) | |
select { | |
case data := <-c: { | |
fmt.Println(data) | |
//return |
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 main | |
import ( | |
"fmt" | |
) | |
type Parenter interface { | |
super() interface{} | |
} |
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
import java.nio.ByteBuffer | |
import com.twitter.finagle.{Http, Service} | |
import com.twitter.finagle.http.path._ | |
import com.twitter.finagle.http.{MediaType, Method, Request, Response, Status} | |
import com.twitter.io.Bufs | |
import com.twitter.util.{Await, Future} | |
import scala.concurrent.ExecutionContext.Implicits.global |
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.github.lucasrpb.cassandra | |
import com.datastax.driver.core.querybuilder.Insert | |
import com.datastax.driver.core.{AbstractGettableData, GettableByNameData, Row} | |
import scala.collection.mutable | |
/** | |
* Created by lucasrpb on 6/17/16. | |
* Incomplete for some types (but for other types the implementation is analogous) |
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
// GET INFO AT RUNTIME ABOUT SOME INSTANCE | |
def extractInfo(e: Any): Unit = { | |
val im = cm.reflect(e) | |
val tpe = im.symbol.typeSignature.typeSymbol.asType.toType | |
tpe match { | |
case t if t <:< typeOf[String] => { |
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 main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
type Cep struct { | |
Number string | |
} |
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
{"id":"","username":"lucasrpb","password":"123","email":"[email protected]","code":"49112103-71a2-4d19-bdfe-fcbd92a33498"} |
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
object Main extends App { | |
// Uma obs: tá vendo que não é necessário declarar que vai retornar String? (o compilador "adivinha" o tipo de retorno) | |
implicit def int2String(i: Int) = i.toString | |
var n: String = 2 | |
println(s"""n | |
Este é um bloco de multiplas linhas de string :P (adoro isso em Scala) |
NewerOlder