This file contains 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
#! /bin/bash | |
# this script was downloaded from: | |
# http://jeroen.a-eskwadraat.nl/sw/annotate | |
# and is part of devscripts 2.10.53ubuntu3 | |
# Executes a program annotating the output linewise with time and stream | |
# Version 1.2a | |
# Copyright 2003, 2004 Jeroen van Wolffelaar <jeroen@wolffelaar.nl> |
This file contains 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
// http://nabetani.sakura.ne.jp/hena/ord13updowndouble/ | |
object PlusMinusDouble extends App { | |
def solve(list: List[(Int, Int)]): Int = list match { | |
case (n, 0) :: _ => n | |
case (n, x) :: xs if x % 2 != 0 => | |
solve(xs :+ (n+1, x+1) :+ (n+1, x-1)) | |
case (n, x) :: xs => |
This file contains 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
1 2 | |
1 1 | |
1 2 | |
4 3 | |
4 8 | |
1 5 | |
8 2 | |
8 2 | |
8 7 |
This file contains 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
scala> Seq.tabulate(9,9)((i,j)=>(i+1)*(j+1)).foreach{println} | |
List(1, 2, 3, 4, 5, 6, 7, 8, 9) | |
List(2, 4, 6, 8, 10, 12, 14, 16, 18) | |
List(3, 6, 9, 12, 15, 18, 21, 24, 27) | |
List(4, 8, 12, 16, 20, 24, 28, 32, 36) | |
List(5, 10, 15, 20, 25, 30, 35, 40, 45) | |
List(6, 12, 18, 24, 30, 36, 42, 48, 54) | |
List(7, 14, 21, 28, 35, 42, 49, 56, 63) | |
List(8, 16, 24, 32, 40, 48, 56, 64, 72) | |
List(9, 18, 27, 36, 45, 54, 63, 72, 81) |
This file contains 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.objectweb.asm._ | |
import org.objectweb.asm.tree._ | |
import java.io._ | |
import java.lang.{Iterable => JIterable} | |
import java.util.jar._ | |
import collection.JavaConverters._ | |
/** Jinsei INSpects jar Entries' Inside | |
*/ |
This file contains 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
// wget https://raw.github.com/rubymaniac/coursera/master/scala/week6/assignment/target/scala-2.9.2/classes/forcomp/linuxwords.txt | |
object Hexify extends App { | |
val table = ("abcdefilozsgq" zip | |
"abcdef1102599") toMap | |
def hexify(word: String) = util.Try(word -> (word map table)).toOption | |
val words = io.Source.fromFile("linuxwords.txt").getLines.flatMap { hexify } | |
words foreach println |
This file contains 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
fork := true | |
javaOptions += "-Denv=boo" | |
This file contains 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
Label:<label name> | |
Key Size: 1024 | |
Version: X509 V3 | |
Serial Number: 45 A0 C2 70 8D 77 8F 34 43 A1 5A C1 AE CB 62 DE | |
Issued By: VeriSign Class 3 Secure Server CA | |
VeriSign Trust Network | |
VeriSign, Inc. | |
US | |
Subject: xxx.com | |
<Organization name> |
This file contains 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
::#! | |
@echo off | |
call C:\path\to\sbt\scalas %0 %* | |
goto :eof | |
::!# | |
/*** | |
scalaVersion := "2.9.2" |
NewerOlder