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 com.espertech.esper.client.{Configuration, EventBean, UpdateListener, EPServiceProviderManager} | |
import java.util.HashMap | |
import scala.collection.JavaConversions._ | |
object Sandbox | |
{ | |
def main(args: Array[String]) { | |
val config = new Configuration(); | |
val eventType = new HashMap[String, AnyRef]() | |
eventType.put("itemName", classOf[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 demo1 | |
import com.espertech.esper.client.EventBean | |
import com.espertech.esper.client.EPAdministrator | |
import com.espertech.esper.client.UpdateListener | |
import com.espertech.esper.client.EPListenable | |
import com.espertech.esper.client.EPServiceProvider | |
object EsperUtil { |
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 akka.unfiltered | |
import akka.actor._ | |
import akka.dispatch.Future | |
import akka.pattern.ask | |
import akka.util.duration._ | |
import akka.util.Timeout | |
import unfiltered.Async | |
import unfiltered.request._ |
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.util.concurrent.Executors | |
import scala.io.Source | |
import akka.dispatch.ExecutionContext | |
import akka.util.duration._ | |
import akka.dispatch.Future | |
implicit val ec = ExecutionContext.fromExecutorService(Executors.newCachedThreadPool()) | |
val words = Source.fromFile("/usr/share/dict/words").getLines |
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 javatest; | |
import com.google.common.base.Charsets; | |
import com.google.common.collect.Lists; | |
import com.google.common.io.Files; | |
import com.proofpoint.json.JsonCodec; | |
import org.apache.commons.httpclient.Header; | |
import org.apache.commons.logging.LogFactory; | |
import org.apache.log4j.BasicConfigurator; | |
import org.apache.log4j.Level; |
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 Actor { | |
import java.util.concurrent.{ConcurrentLinkedQueue, Executor} | |
import java.util.concurrent.atomic.{AtomicBoolean} | |
sealed trait Instr | |
case object Continue extends Instr | |
case class Become(b: Any => Instr) extends Instr | |
case object Dead extends Instr | |
trait Address { |
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
// Copyright (C) 2012 Benoit Sigoure | |
// This program is free software: you can redistribute it and/or modify it | |
// under the terms of the GNU Lesser General Public License as published by | |
// the Free Software Foundation, either version 3 of the License, or (at your | |
// option) any later version. This program is distributed in the hope that it | |
// will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty | |
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser | |
// General Public License for more details. You should have received a copy | |
// of the GNU Lesser General Public License along with this program. If not, | |
// see <http://www.gnu.org/licenses/>. |
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 unfiltered.request._ | |
import unfiltered.response._ | |
import unfiltered.netty._ | |
import unfiltered.request.uploads.netty._ | |
object App { | |
def main(a: Array[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
import java.util.ArrayList | |
import scala.collection.JavaConversions._ | |
import com.stumbleupon.async.{Callback, Deferred} | |
import org.hbase.async.{HBaseClient, KeyValue, Scanner} | |
import com.twitter.util.{Future, Promise, Return, Throw} | |
/** Converts a Deferred into a Future. */ | |
implicit def futureFromDeferred[A](d: Deferred[A]): Future[A] = { | |
val promise = new Promise[A] | |
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.edate.data.test | |
import java.util.Properties | |
import kafka.producer.ProducerConfig | |
import kafka.producer.Producer | |
import kafka.message.Message | |
import kafka.producer.ProducerData | |
import kafka.producer.ProducerData | |
import kafka.producer.Partitioner | |
/** |