finagle-redisを使ったRedisのモックサーバです。
コードはGithub上にあります。
#!/bin/sh | |
content=$(cat <<EOF | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'eu.appsatori:gradle-fatjar-plugin:0.2-rc1' |
package com.foo; | |
import org.apache.flume.Context; | |
import org.apache.flume.Event; | |
import org.apache.flume.sink.hdfs.SeqFileFormatter; | |
import org.apache.flume.sink.hdfs.SeqFileFormatter.Record; | |
public class MyFormatter implements SeqFileFormatter { | |
@Override |
finagle-redisを使ったRedisのモックサーバです。
コードはGithub上にあります。
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Scala Conference in Japan 2013</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content="日本で初のScala言語のカンファレンスが開催されることになりました。"> | |
<meta name="author" content="日本 Scala ユーザーズグループ"> | |
<link href="./bootstrap/css/bootstrap.min.css" rel="stylesheet"> | |
<link href="./bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet"> |
package chris; | |
import com.google.common.util.concurrent.AbstractExecutionThreadService; | |
import com.google.common.util.concurrent.Service; | |
import org.junit.Test; | |
import java.util.concurrent.*; | |
import static org.hamcrest.Matchers.is; | |
import static org.junit.Assert.assertThat; |
def add1(arr: Array[Int], value: Int, n: Int): Array[Int] = { | |
n match { | |
case 0 => loop(arr, value, 0, 1, {_ < arr.length}, arr.length) | |
case m if m > 0 => loop(arr, value, 0, 1, {_ < arr.length}, m) | |
case m if m < 0 => loop(arr, value, arr.length - 1, -1, {_ > 0}, -m) | |
} | |
arr | |
} | |
private def loop(arr: Array[Int], value: Int, startIndex: Int, step: Int, continueCond: Int => Boolean, maxIncr: Int) { |
package com.github.cb372.lombok; // <-- Note: not the root package | |
import lombok.experimental.ExtensionMethod; | |
@ExtensionMethod({ Extensions.class }) | |
public class Main { | |
public static void main(String[] args) { | |
System.out.println("Hello, %s".format("World.")); // => "Hello, World." | |
} | |
} |
public class Foo { | |
public A a = new B(); | |
public B b = (B) a; | |
} | |
class A { | |
} | |
class B extends A { | |
} |
package com.twitter.finagle.redis | |
import com.twitter.finagle.Service | |
import com.twitter.finagle.builder.{ServerBuilder} | |
import java.net.InetSocketAddress | |
import protocol._ | |
import collection.mutable.{ Map => MMap } | |
import java.util.concurrent.Executors | |
import com.twitter.util.{FuturePool, Future} |
package com.foo; | |
import org.junit.Rule; | |
import org.junit.Test; | |
import org.junit.rules.ErrorCollector; | |
import static org.hamcrest.Matchers.equalTo; | |
/** | |
* Created: 12/04/19 17:12 |