This file contains 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 vaadin.scala._ | |
import com.mongodb.casbah.Imports._ | |
import com.novus.salat.grater | |
import com.novus.salat.global._ | |
import scala.util.Random | |
import scala.reflect.BeanProperty | |
class MongoExample extends Application("Mongo & Vaadin, tied together with Scala") { | |
val registrations: MongoCollection = MongoConnection()("vaadin-scala-mongo-example")("registrations") |
This file contains 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 vaadin.scala._ | |
import com.mongodb.casbah.Imports._ | |
import com.novus.salat.grater | |
import com.novus.salat.global._ | |
import scala.util.Random | |
import scala.reflect.BeanProperty | |
class MongoExample extends Application("Mongo & Vaadin, tied together with Scala") { | |
val registrations: MongoCollection = MongoConnection()("vaadin-scala-mongo-example")("registrations") |
This file contains 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 vaadin.scala._ | |
import com.mongodb.casbah.Imports._ | |
import com.novus.salat.grater | |
import com.novus.salat.global._ | |
import scala.util.Random | |
import scala.reflect.BeanProperty | |
class MongoExample extends Application("Mongo & Vaadin, tied together with Scala") { | |
val registrations: MongoCollection = MongoConnection()("vaadin-scala-mongo-example")("registrations") |
This file contains 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
public class FutureCombinationTest { | |
private final ActorSystem actorSystem = ActorSystem.create( | |
"test", | |
ConfigFactory.load().withValue("akka.actor.default-dispatcher.type", | |
ConfigValueFactory.fromAnyRef("akka.testkit.CallingThreadDispatcherConfigurator"))); | |
private static class Result { | |
private final boolean isComplete; |
This file contains 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 SomeView { | |
def render(): Unit | |
def init(): Unit | |
} | |
trait SomeViewComponent { | |
this: SomePresenterComponent => | |
val someView: SomeView |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
public final class Version { | |
private static Logger logger = LoggerFactory.getLogger(Version.class); | |
private static String appVersion; | |
private Version() { | |
} | |
public static String getVersionString() { |
This file contains 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.vaadin.test; | |
import com.vaadin.addon.charts.Chart; | |
import com.vaadin.addon.charts.model.*; | |
import com.vaadin.annotations.Push; | |
import com.vaadin.annotations.Theme; | |
import com.vaadin.annotations.VaadinServletConfiguration; | |
import com.vaadin.server.VaadinRequest; | |
import com.vaadin.server.VaadinServlet; | |
import com.vaadin.ui.Component; |
This file contains 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
#Install Homebrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
#Install Cask | |
brew install caskroom/cask/brew-cask | |
#Install Virtualbox binary | |
brew cask install virtualbox | |
#Install Docker and OSX Docker helper |
This file contains 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 a new Stream that always calls the given function when a new value | |
//is needed. | |
def stream(): Source[Int, Unit] = | |
Source(() => Iterator.continually(createValue())) | |
//Just an example, could be anything | |
def createValue(): Int = Random.nextInt() |
OlderNewer