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.futureprocessing.fpcommunity.core.validation.groups; | |
import org.springframework.stereotype.Service; | |
import org.springframework.stereotype.Component; | |
public aspect FulfilsPredicateAspect { | |
pointcut hasFulfisPredicateArguments() : execution(* *(.., @com.futureprocessing.fpcommunity.core.validation.groups.FulfilsPredicate (*) ,..)); | |
pointcut isSpringComponent() : (@within(Service) || @within(Component)) && within(com.futureprocessing.fpcommunity..*); | |
before() : hasFulfisPredicateArguments() && isSpringComponent() { |
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.futureprocessing.fpcommunity.core.validation.groups; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; | |
import com.google.common.base.Predicate; | |
@Target(value = ElementType.PARAMETER) | |
@Retention(value = RetentionPolicy.RUNTIME) |
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.futureprocessing.fpcommunity.core.services.events; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.data.neo4j.template.Neo4jOperations; | |
import org.springframework.stereotype.Service; | |
import org.springframework.validation.Validator; | |
import com.futureprocessing.fpcommunity.core.datetime.IDateTime; | |
import com.futureprocessing.fpcommunity.core.domain.Event; | |
import com.futureprocessing.fpcommunity.core.domain.User; | |
import com.futureprocessing.fpcommunity.core.exceptions.EventEndedException; |
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.futureprocessing.fpcommunity.controllers.event; | |
import java.security.Principal; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.web.bind.WebDataBinder; | |
import org.springframework.web.bind.annotation.ExceptionHandler; | |
import org.springframework.web.bind.annotation.InitBinder; | |
import org.springframework.web.bind.annotation.PathVariable; | |
import org.springframework.web.bind.annotation.RequestMapping; |
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
-Xms512m | |
-Xmx512m | |
-classpath | |
"C:\Java\MavenRepo\com\parkeon\gto\transfolio\product\transfolio-address-interface\2.10.0-SNAPSHOT\transfolio-address-interface-2.10.0-SNAPSHOT.jar;C:\Java\MavenRepo\com\parkeon\gto\core\gto-core\2.10.0-SNAPSHOT\gto-core-2.10.0-SNAPSHOT.jar;C:\Java\MavenRepo\org\springframework\spring-beans\3.1.0.M2\spring-beans-3.1.0.M2.jar;C:\Java\MavenRepo\org\springframework\spring-core\3.1.0.M2\spring-core-3.1.0.M2.jar;C:\Java\MavenRepo\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Java\MavenRepo\org\springframework\spring-context\3.1.0.M2\spring-context-3.1.0.M2.jar;C:\Java\MavenRepo\org\springframework\spring-expression\3.1.0.M2\spring-expression-3.1.0.M2.jar;C:\Java\MavenRepo\org\springframework\spring-asm\3.1.0.M2\spring-asm-3.1.0.M2.jar;C:\Java\MavenRepo\org\springframework\spring-aop\3.1.0.M2\spring-aop-3.1.0.M2.jar;C:\Java\MavenRepo\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Java\MavenRepo\org\aspectj\aspectjweaver\1.5.4\aspectjweaver-1.5.4.jar;C:\Java\Mave |
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 pl.baza.gui.controllers.tasks; | |
import javafx.beans.value.ChangeListener; | |
import javafx.beans.value.ObservableValue; | |
import javafx.fxml.FXML; | |
import javafx.fxml.Initializable; | |
import javafx.scene.layout.AnchorPane; | |
import org.joda.time.DateTime; | |
import org.joda.time.Days; | |
import org.springframework.beans.factory.InitializingBean; |
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 concurrent.duration._ | |
import concurrent.{Await, Future, Promise} | |
import org.scalatest.FunSuite | |
import scala.concurrent.ExecutionContext.Implicits.global | |
class Snippets extends FunSuite { | |
test("Promise can be fulfilled") { | |
val numberPromise = Promise[Int]() | |
val addedFuture = addThree(numberPromise.future) |
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 java.util.concurrent.Semaphore | |
import scala.concurrent.Future | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import org.scalatest.FunSuite | |
class CallbacksTest extends FunSuite { | |
test("Callback are complicated") { | |
var result: Int = 0; val semaphore = new Semaphore(1, true) | |
generateNumber(generatedNumber => addThree(generatedNumber, |
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
FROM CardTransactionEntity AS ct WHERE (EXISTS(FROM TravelProductOnCardEntity AS prod WHERE ct.travelProductOnCard = prod AND prod.smartCard.smartCardId = :smartCardId) OR EXISTS(FROM ProfileOnCardEntity AS prof WHERE ct.profileOnCard = prof AND prof.smartCard.smartCardId = :smartCardId)) ORDER BY ct.transactionDate DESC |
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 scala.concurrent.duration._ | |
import scala.concurrent.{Await, Future} | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import org.scalatest.FunSuite | |
class ErrorsTest extends FunSuite { | |
test("Future can recover from error") { | |
val numberFuture: Future[Int] = generateNumber() | |
val addedFuture: Future[Int] = numberFuture.map(addThree).recover({ | |
case exception: IllegalStateException => -1 |
OlderNewer