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.opportunity.simple.restapi.user | |
import com.opportunity.simple.restapi.basic.BasicBehaviour | |
class UserSpec extends BasicBehaviour { | |
"The user endpoint" should { | |
args(sequential=true) | |
"Create new user" ! userEndpointForTest().executeTestCreateNewUser() | |
"Try create a user with same email" ! userEndpointForTest().executeTestTryCreateAUserWithSameEmail() |
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( |
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 | |
import scala.Option.option2Iterable | |
import org.scalastuff.scalabeans.Preamble.descriptorOf | |
import org.scalastuff.scalabeans.BeanDescriptor | |
import com.mongodb.casbah.Imports._ | |
import play.Logger | |
/** | |
* Utility trait for MongoDB to mix into entity classes. |
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
var html_canvas = function (spec) { | |
var html = spec.html || ""; | |
var created_object = {}; | |
//public methods | |
created_object.render = function(component) { | |
component.renderOn(this); | |
return this; | |
}; |
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
Todos os dias venho lidando com programadores que arrumam desculpas para não realizar um trabalho excelente. | |
As desculpas geralmente são: chefe não deixa, tenho que entregar logo, isso é assim mesmo ou eu não ganho para isso! | |
Pois lhes digo que não é assim não. | |
A seis meses resolvi por a prova todas as técnicas contidas no material que vou passar e tive resultados fantásticos para mim e minha equipe. | |
Então Minha contribuição para esse assunto são estes 4 livros |
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.twitter | |
import com.softsimples.social.social.json.Json | |
import scala.collection.mutable.MutableList | |
import org.scribe.model.{Token, Response} | |
import com.softsimples.social.social.oauth.OAuthWrapper | |
class RetrieveTimeLine(val wrapper:OAuthWrapper, basePath:String, accessToken:Token) { | |
def userTimeLine(): List[Map[String, Any]] = { |