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 java.util.concurrent.TimeUnit | |
import org.openjdk.jmh.annotations._ | |
import org.openjdk.jmh.infra.Blackhole | |
import scala.util.Random | |
@State(Scope.Benchmark) | |
@BenchmarkMode(Array(Mode.AverageTime)) | |
@OutputTimeUnit(TimeUnit.MICROSECONDS) |
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.courtanet.fm.core.editor; | |
import static org.fest.assertions.Assertions.assertThat; | |
import java.text.DateFormat; | |
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import org.junit.Before; |
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
[Service] | |
Type=forking | |
PrivateTmp=yes | |
User=nobody | |
Group=nobody | |
# Run ExecStartPre with root-permissions | |
PermissionsStartOnly=true | |
ExecStartPre=-/usr/bin/mkdir /var/run/dhis | |
ExecStartPre=/usr/bin/chown -R nobody:nobody /var/run/dhis/ | |
# Run ExecStart with User=nobody / Group=nobody |
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
object TypeSafeBuilder { | |
case class Foo(n: Option[String], a: Option[String], aa: Option[String], b: Option[String], bb: Option[String]) | |
sealed trait Path | |
sealed trait NoPath extends Path | |
sealed trait APath extends Path | |
sealed trait BPath extends Path | |
class FooBuilder[P <: Path](val n: Option[String], val a: Option[String], val aa: Option[String], val b: Option[String], val bb: Option[String]){ |