edit /root/.pip/pip.conf
[global]
index-url=https://pypi.python.org/simple
-module(toppage_handler). | |
-export([init/3]). | |
-export([handle/2]). | |
-export([terminate/3]). | |
init(_Transport, Req, []) -> | |
{ok, Req, undefined}. | |
handle(Req, State) -> |
-moudle(tuple_to_list_recursively). | |
-export([tuple_to_list_recursively/1]). | |
tuple_to_list_recursively({}) -> []; | |
tuple_to_list_recursively([]) -> []; | |
tuple_to_list_recursively(T) when is_tuple(T) -> | |
tuple_to_list_recursively(tuple_to_list(T)); | |
tuple_to_list_recursively(T) when is_list(T) -> | |
[H|L] = T, | |
lists:concat([tuple_to_list_recursively(H), tuple_to_list_recursively(L)]); |
-module(thrift_hive_tests). | |
-include_lib("eunit/include/eunit.hrl"). | |
timeout_test() -> | |
timer:sleep(3000), | |
{timeout, 15, ?_assertEqual(true, begin timer:sleep(10000), false end)}. |
class AbstractNode | |
@@root = nil | |
def initialize(n, keys, parent) | |
@slot = n | |
@keys = keys | |
@parent = parent | |
@@root = self unless @@root | |
end |
class AbstractNode | |
@@root = nil | |
def initialize(n, keys, parent) | |
@slot = n | |
@keys = keys | |
@parent = parent | |
@@root = self unless @@root | |
end |
package net.wrap_trap.utils.rbtree | |
object RedBlackTree { | |
object Color extends Enumeration { | |
val Red, Black = Value | |
} | |
class Hash[K, V] {} |
package net.wrap_trap.scala.examples | |
import java.util.Comparator | |
object OrderedCompareTest2 { | |
def main(args : Array[String]) : Unit = { | |
System.out.println("called main") | |
// compile error when disabling nonOrderedClassToComparable Method. | |
// No implicit Ordering defined for |
package net.wrap_trap.scala.examples | |
import java.util.Comparator | |
object OrderedCompareTest { | |
def main(args : Array[String]) : Unit = { | |
System.out.println("called main") | |
System.out.println( | |
compareAB(new OrderedClass(2), new OrderedClass(1))) |
package net.wrap_trap.scala.examples | |
object OrderedComparableTest { | |
def main(args : Array[String]) : Unit = { | |
val s1 : String = "Hoge" | |
val s2 : String = "Bar" | |
System.out.println(new Sample1[String](s1).compare(s2)) | |
System.out.println(new Sample2[String](s1).compare(s2)) // 'Implicit conversions found: s1 => augmentString(s1)' | |
} | |
} |