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 | |
import org.hibernate.service.{ServiceRegistryBuilder, ServiceRegistry} | |
import org.hibernate.cfg.Configuration | |
import org.hibernate.{Session, SessionFactory} | |
import scala.collection.JavaConversions._ | |
object HibernateSessionFactory { | |
def buildSessionFactory(dbDriver:String = "org.postgresql.Driver", |
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.softsimples.social | |
import filter.SecurityFilter | |
import org.eclipse.jetty.server.{Server, Handler} | |
import org.eclipse.jetty.server.handler.{HandlerList, ResourceHandler} | |
import org.eclipse.jetty.servlet.{ServletHolder, ServletContextHandler} | |
import servlet.{WebSocketHandlerServlet, SocialCollectorHandler} | |
import com.sun.jersey.spi.container.servlet.ServletContainer | |
object Boot { |
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
git clone --bare -l [repository] |
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
Gofer it | |
squeaksource: 'MetacelloRepository'; | |
package: 'ConfigurationOfAutotest'; | |
load. | |
ConfigurationOfAutotest project latestVersion load: #OB. |
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.softsimples.bpm | |
import javax.security.auth.login.LoginContext | |
import org.ow2.bonita.util.{AccessorUtil, SimpleCallbackHandler, BonitaConstants} | |
import scala.collection.JavaConversions._ | |
import org.ow2.bonita.facade.identity.User | |
import org.bonitasoft.console.security.server.api.{ICredentialsEncryptionAPI, SecurityAPIFactory} | |
object BPMConnector { | |
private val jaasFile = getClass.getResource("jaas-standard.cfg").getFile |
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
object Planet extends Enumeration { | |
case class PlanetVal(name: String, mass: Double, radius: Double) extends Val(name) { | |
// universal gravitational constant (m3 kg-1 s-2) | |
val G = 6.67300E-11 | |
val surfaceGravity = G * mass / (radius * radius) | |
def surfaceWeight(otherMass: Double) = otherMass * surfaceGravity | |
} | |
val MERCURY = PlanetVal("Mercury", 3.303e+23, 2.4397e6) |
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 models.nereida | |
import scala.collection.mutable.ArrayBuffer | |
import com.mongodb.casbah.Imports._ | |
import scala.collection.JavaConversions._ | |
import org.bson.types.ObjectId | |
trait ManageCities { | |
def addCity(city:City):City = { |
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 controllers.nereida | |
import play.api._ | |
import play.api.mvc._ | |
import play.api.data._ | |
import play.api.data.Forms._ | |
import play.api.libs.json.{Json, JsValue} | |
import models.nereida.City | |
import persistence.Prevayler | |
import persistence.commands.city.{AddNewCity, DeleteCity, UpdateCity, FindAllCities, FindCityById} |
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 persistence | |
import org.specs2.mutable._ | |
import play.api.test._ | |
import play.api.test.Helpers._ | |
import models.nereida.{Restaurant, City, RestaurantSystem} | |
import persistence.commands.restaurant.{AddNewRestaurant, FindAllRestaurants, UpdateRestaurant, DeleteRestaurant, FindRestaurantById} |
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 sbt._ | |
import Keys._ | |
import PlayProject._ | |
object ApplicationBuild extends Build { | |
val appName = "test" | |
val appVersion = "1.0-SNAPSHOT" | |
val appDependencies = Seq( |