これ http://blog.twiwt.org/e/f835d9 がインストールされていれば、ファイルを保存して、実行権限与えておいて
./unfiltered-sample.scala
ってやるだけでローカルで、勝手に空いてるポートで、"hello" を返すだけのサーバー起動するお( ^ω^)
終了は、コンソールでなにかキーを入力すればいいはず
""" | |
Fabric tunneling utilities | |
by shn@glucose.jp | |
class ForwardServer and relates things are refere Robey Pointer's paramiko example. | |
(http://bazaar.launchpad.net/~robey/paramiko/trunk/annotate/head%3A/demos/forward.py) | |
usage:: | |
with make_tunnel('user@192.168.0.2:10022') as t: |
type ¬[A] = A => Nothing | |
type ∨[T, U] = ¬[¬[T] with ¬[U]] | |
type ¬¬[A] = ¬[¬[A]] | |
type |∨|[T, U] = { type λ[X] = ¬¬[X] <:< (T ∨ U) } | |
class FoldUnion[T](t: T) { | |
def boxClass(x: java.lang.Class[_]): java.lang.Class[_] = x.toString match { | |
case "byte" => manifest[java.lang.Byte].erasure | |
case "char" => manifest[java.lang.Character].erasure | |
case "short" => manifest[java.lang.Short].erasure |
trait Association { | |
type Item <: AbstractItem | |
trait AbstractItem { | |
def memberOf(): Group | |
} | |
type Group <: AbstractGroup | |
trait AbstractGroup { | |
def addItem(item: Item) | |
def removeItem(item: Item) | |
def items(): List[Item] |
これ http://blog.twiwt.org/e/f835d9 がインストールされていれば、ファイルを保存して、実行権限与えておいて
./unfiltered-sample.scala
ってやるだけでローカルで、勝手に空いてるポートで、"hello" を返すだけのサーバー起動するお( ^ω^)
終了は、コンソールでなにかキーを入力すればいいはず
/** | |
* The Matrix Example | |
* http://wiki.neo4j.org/content/The_Matrix | |
*/ | |
case class Matrix(name: String, profession: String) | |
object TheMatrix extends App with Neo4jWrapper with EmbeddedGraphDatabaseServiceProvider { | |
ShutdownHookThread { | |
shutdown(ds) |
package sample1; | |
import java.net.InetSocketAddress; | |
import java.util.Map; | |
import org.apache.commons.logging.Log; | |
import org.apache.commons.logging.LogFactory; | |
import org.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.net.NetUtils; | |
import org.apache.hadoop.yarn.api.AMRMProtocol; |
OK, I understand what is not supported (now?). | |
In this case, hoop server should send response message means correct reason, like | |
'concurrent append not supported'. | |
But now, in fact, hoop send message as 'failed to create file'. We cannot know what is wrong | |
from this message. (request method? wrong path? or ...?) | |
This is wrong message, and i want to be fixed. |
F[A] // A is a Functor | |
M[A] // A is a Monad | |
fa: F[A], a: A // variables used below | |
fa1 |+| fa2 // binary append (SemiGroup) | |
fa1 >| fa2 // map (Functor) | |
fa1 >>= fa2 // flatmap (Bind) | |
fa1 |>| fa2 // foreach (Each) | |
fa <**> fb { (a, b) => c } // apply, produces F[C] |