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 GlobalScope { | |
case class Person(val name:String) { | |
def --> (implicit func: Person => String): Unit = { | |
println(func(this)) | |
} | |
} | |
implicit def string2person(name:String) = new Person(name) |
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
export JAVA_HOME=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/ | |
export PATH=${JAVA_HOME}/bin:${PATH} |
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
public java.lang.Object this$dist$get$1(java.lang.String); | |
Code: | |
0: invokestatic #24; //Method $getCallSiteArray:()[Lorg/codehaus/groovy/runtime/callsite/CallSite; | |
3: astore_2 | |
4: invokestatic #49; //Method $get$$class$Foo:()Ljava/lang/Class; | |
7: aload_0 | |
8: new #51; //class org/codehaus/groovy/runtime/GStringImpl | |
11: dup | |
12: iconst_1 | |
13: anewarray #4; //class java/lang/Object |
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
hg clone http://hg.openjdk.java.net/jigsaw/jigsaw | |
cd jigsaw | |
bash get_sources.sh | |
export LANG=C | |
export ALT_BOOTDIR=/usr/lib/jvm/java-1.7.0-openjdk-i386 | |
export ALLOW_DOWNLOADS=true | |
make sanity | |
make all |
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
diff -r 22ccf6e7a092 make/javax/sound/jsoundalsa/Makefile | |
--- a/make/javax/sound/jsoundalsa/Makefile Fri Dec 02 12:44:03 2011 +0000 | |
+++ b/make/javax/sound/jsoundalsa/Makefile Fri Dec 09 15:11:02 2011 +0100 | |
@@ -45,34 +45,37 @@ | |
# Files | |
# | |
-FILES_c = \ | |
- Utilities.c \ | |
- $(DAUDIOFILES_c) \ |
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 fact; | |
public class Factorial { | |
public static int factorial(int n) { | |
if (n <= 0) { return 1; } | |
else { return n * factorial(n - 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
package hello; | |
import static fact.Factorial.factorial; | |
public class Main { | |
public static void main(String... args) { | |
System.out.println(factorial(10)); | |
} | |
} |
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
jmod create -L repo | |
jmod install modules hello fact -L repo | |
find repo/ | |
repo/ | |
repo/fact | |
repo/fact/1.0 | |
repo/fact/1.0/index | |
repo/fact/1.0/info | |
repo/fact/1.0/classes |
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
# Make jmod packages | |
jponge@xub:~/Code/java8$ jpkg -m modules/fact jmod fact | |
jponge@xub:~/Code/java8$ jpkg -m modules/hello jmod hello | |
jponge@xub:~/Code/java8$ ls *.jmod | |
[email protected] [email protected] | |
# Make Debian packages | |
jponge@xub:~/Code/java8$ jpkg -m modules/ deb hello | |
jponge@xub:~/Code/java8$ jpkg -m modules/ deb fact | |
jponge@xub:~/Code/java8$ ls *.deb |
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.eclipse.jetty.server.Server; | |
import org.eclipse.jetty.servlet.ServletHandler; | |
import org.eclipse.jetty.servlets.ProxyServlet; | |
import javax.servlet.ServletConfig; | |
import javax.servlet.ServletException; | |
import javax.servlet.ServletRequest; | |
import javax.servlet.ServletResponse; | |
import java.io.IOException; |