This file contains hidden or 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 org.scalatest.{ShouldMatchers, FunSpec} | |
import play.api.libs.json.Json | |
case class A(a: String, b: Option[String], c: Option[Int]) | |
class PlayJsonTest extends FunSpec with ShouldMatchers { | |
implicit val __aWrites = Json.writes[A] | |
val result = """{"a":"a","c":1}""" |
This file contains hidden or 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
${extends("/_layout.httl")} | |
<!--#set(DocumentBean document)--> | |
<!--#macro(title)-->${document.title} - <!--#end--> | |
<!--#macro(main)--> | |
<div class="container"> | |
<div class="row"> |
This file contains hidden or 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 net.yangbajing.weixin.qy.client | |
import java.lang.reflect.InvocationTargetException | |
import akka.actor.ActorRefFactory | |
import akka.util.Timeout | |
import com.typesafe.scalalogging.StrictLogging | |
import net.yangbajing.weixin.qy.message._ | |
import net.yangbajing.weixin.qy.util.WeixinQYConf | |
import net.yangbajing.weixin.util._ |
This file contains hidden or 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 supermarket.site.services.session | |
import java.util.UUID | |
import java.util.concurrent.TimeUnit | |
import akka.actor.{Actor, Props, Terminated} | |
import akka.pattern.ask | |
import akka.util.Timeout | |
import com.typesafe.scalalogging.StrictLogging | |
import org.joda.time.DateTime |
This file contains hidden or 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.cqccn.iams.server | |
import java.util.Locale | |
import org.joda.time.{DateTimeZone, DateTime} | |
import org.joda.time.format.DateTimeFormat | |
import net.liftweb.common.Full | |
import net.liftweb.http.rest.RestHelper | |
import net.liftweb.http._ |
This file contains hidden or 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.cqccn.iams.server | |
import java.util.Locale | |
import org.joda.time.{DateTimeZone, DateTime} | |
import org.joda.time.format.DateTimeFormat | |
import net.liftweb.common.Full | |
import net.liftweb.http.rest.RestHelper | |
import net.liftweb.http._ |
This file contains hidden or 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 demo | |
import java.io.{IOException, FileOutputStream} | |
object TryCatchFinally { | |
def trying[T, R]( | |
in: => T, | |
func: T => R, | |
catchFunc: Throwable => R, | |
finallyFunc: T => Unit): R = { |
This file contains hidden or 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 yangbajing.util.time | |
object Demo extends App { | |
val calendar = YCalendar(LocalDate.now.minusMonths(1)) | |
for (month <- calendar.calendarFull) { | |
for (week <- month) println(week.mkString(" ")) | |
println("----------------------------------------") | |
} |
This file contains hidden or 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 yangbajing.persistence | |
import org.apache.tomcat.jdbc.pool.{PoolProperties, DataSource} | |
object JdbcDataSource { | |
def tomcat( | |
url: String, | |
driverClassName: String, | |
username: String, |
This file contains hidden or 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 yangbajing.persistence | |
import scala.language.implicitConversions | |
import java.sql.Timestamp | |
import org.joda.time._ | |
import org.squeryl._ | |
import org.squeryl.dsl._ |
NewerOlder