Skip to content

Instantly share code, notes, and snippets.

View mauricio's full-sized avatar

Maurício Linhares mauricio

View GitHub Profile
import com.amazonaws.services.s3.AmazonS3Client
import com.amazonaws.auth.BasicAWSCredentials
import com.amazonaws.services.s3.model.{GetObjectRequest, S3ObjectSummary, ListObjectsRequest}
import scala.collection.JavaConversions._
import java.util.concurrent.Executors
import java.io.File
import java.util.concurrent.atomic.AtomicInteger
object Downloader {
0 - John - 10
1 - moe - 15
2 - homer - 40
people2 array
0 - John - 10
1 - moe - 15
2 - Bart - 40
object sample {
trait RandomGenerator {
def generate(): AnyVal
}
object IntGenerator extends RandomGenerator {
➜ postgresql-netty git:(master) ✗ sbt publish-signed
[info] Loading global plugins from /Users/mauricio/.sbt/plugins
[info] Loading project definition from /Users/mauricio/projects/scala/postgresql-netty/project
[info] Set current project to db-async-base (in build file:/Users/mauricio/projects/scala/postgresql-netty/)
[info] Wrote /Users/mauricio/projects/scala/postgresql-netty/db-async-common/target/scala-2.10/db-async-common_2.10-0.2.3.pom
[info] Wrote /Users/mauricio/projects/scala/postgresql-netty/target/scala-2.10/db-async-base_2.10-0.2.3.pom
[info] :: delivering :: com.github.mauricio#db-async-base_2.10;0.2.3 :: 0.2.3 :: release :: Mon May 20 14:12:48 BRT 2013
[info] delivering ivy file to /Users/mauricio/projects/scala/postgresql-netty/target/scala-2.10/ivy-0.2.3.xml
[info] Wrote /Users/mauricio/projects/scala/postgresql-netty/mysql-async/target/scala-2.10/mysql-async_2.10-0.2.3.pom
[info] Wrote /Users/mauricio/projects/scala/postgresql-netty/postgresql-async/target/scala-2.10/postgresql-async_2.10
0: 03 64 65 66 00 00 00 01 . d e f . . . .
1: 3f 00 0c 3f 00 00 00 00 ? . . ? . . . .
2: 00 fd 80 00 00 00 00 . . . . . . .
➜ ~ scala
Welcome to Scala version 2.10.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_09).
Type in expressions to have them evaluated.
Type :help for more information.
scala> import scalaerror:
while compiling: <console>
during phase: global=specialize, atPhase=uncurry
library version: version 2.10.1
compiler version: version 2.10.1
scala> import scala.concurrent.duration._
Failed to initialize the REPL due to an unexpected error.
This is a bug, please, report it along with the error diagnostics printed below.
java.lang.AssertionError: assertion failed:
while compiling: <console>
during phase: global=typer, atPhase=patmat
library version: version 2.10.1
compiler version: version 2.10.1
reconstructed args:
object BitMap {
final val Bytes = Array( 128, 64, 32, 16, 8, 4, 2, 1 )
def apply( bytes : Seq[Byte] ) : BitMap = new BitMap(bytes : _*)
}
/**
*
* Implements a bit map where you can check which bits are set and which are not.
public class ParseURL {
static private String[] protocols = { "jdbc", "postgresql" };
Properties parseURL(String url, Properties defaults) throws SQLException
{
int state = -1;
Properties urlProps = new Properties(defaults);
String l_urlServer = url;
gem 'activemodel'
require 'active_model'
module Serializable
include ActiveModel::Serializers::Xml
def self.included(base)
base.extend ClassMethods
base.extend ActiveModel::Naming