View wordwrap.scala
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.annotation.tailrec | |
val sentence = "Four score and ten years ago our fathers brought forth upon this " + | |
"continent a new nation conceived in liberty and dedicated to the " + | |
"proposition that all men are created equal" | |
def wrap(source: String, len: Int):String = { | |
val wordChunks = sentence.split(" ").flatMap(x => x.grouped(len)).toList |
View Application.java
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 config; | |
import orders.commandhandling.Order; | |
import orders.commandhandling.OrderCommandHandler; | |
import org.axonframework.commandhandling.CommandBus; | |
import org.axonframework.commandhandling.SimpleCommandBus; | |
import org.axonframework.commandhandling.annotation.AnnotationCommandHandlerBeanPostProcessor; | |
import org.axonframework.commandhandling.gateway.CommandGatewayFactoryBean; | |
import org.axonframework.eventhandling.EventBus; | |
import org.axonframework.eventhandling.SimpleEventBus; |
View JpaRepository Example
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
//JPA enitiy called UserAccount | |
@Entity | |
public class UserAccount { | |
@Id | |
private Long id; | |
private String username; | |
...... | |
} | |
View ThirdParty.scala
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.slick.driver.H2Driver.simple._ | |
import scala.slick.session.Session | |
/** | |
* Created with IntelliJ IDEA. | |
* User: Magnus.Smith | |
* Date: 21/01/13 | |
* Time: 16:20 |