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
### Keybase proof | |
I hereby claim: | |
* I am martijndwars on github. | |
* I am martijndwars (https://keybase.io/martijndwars) on keybase. | |
* I have a public key ASCjzLNxLHlexZfNDGu9sVMBtIxE-kax2HPwmJh5rPWDtgo | |
To claim this, I am signing this 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
org.metaborg.core.analysis.AnalysisException: Analysis for eclipse:///MiniJava/tests/lab6/constraints/main-class/main-class-instantiation.spt failed | |
at org.metaborg.spoofax.core.analysis.legacy.StrategoAnalyzer.analyze(StrategoAnalyzer.java:203) ~[org.metaborg.spoofax.core_2.0.0.20160612-002403-master.jar:na] | |
at org.metaborg.spoofax.core.analysis.legacy.StrategoAnalyzer.analyze(StrategoAnalyzer.java:99) ~[org.metaborg.spoofax.core_2.0.0.20160612-002403-master.jar:na] | |
at org.metaborg.spoofax.core.analysis.legacy.StrategoAnalyzer.analyze(StrategoAnalyzer.java:1) ~[org.metaborg.spoofax.core_2.0.0.20160612-002403-master.jar:na] | |
at org.metaborg.core.analysis.AnalysisService.analyze(AnalysisService.java:27) ~[org.metaborg.core_2.0.0.20160612-002403-master.jar:na] | |
at org.metaborg.spoofax.core.analysis.SpoofaxAnalysisService.analyze(SpoofaxAnalysisService.java:17) ~[org.metaborg.spoofax.core_2.0.0.20160612-002403-master.jar:na] | |
at org.metaborg.spoofax.core.analysis.SpoofaxAnalysisService.analyze(SpoofaxAnalysis |
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 java.security.PublicKey; | |
public class Encrypted { | |
private final PublicKey publicKey; | |
private final byte[] salt; | |
private final byte[] ciphertext; | |
public Encrypted(final PublicKey publicKey, final byte[] salt, final byte[] ciphertext) { | |
this.publicKey = publicKey; | |
this.salt = salt; |
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
module names | |
namespaces | |
Global | |
binding rules | |
Class(c, _): | |
defines Global 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
/** | |
* Given a length m and elements xs, generate all combinations of length m | |
* from the elements in xs. | |
* | |
* @type (int, List(a)) -> List(List(a)) | |
*/ | |
combinations: | |
(0, _) -> [[]] | |
combinations: |
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 OptionValue { | |
val N = 2 | |
val u: Double = 2 | |
val d: Double = 1/u | |
def main(args: Array[String]): Unit = { | |
println(v(0,4,(s: Double) => 0.0 max (4.0-s))) | |
} | |
def v(n: Double, s: Double, g: Double => Double): Double = |
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
p <- 1/2; | |
u <- 2; | |
d <- 1/u; | |
r <- 1/4; | |
v <- function(n, s) { | |
if (n == 3) { | |
return(pmax(s-10, 0)); | |
} | |
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
crypto = require 'crypto' | |
class RC4 | |
constructor: (@key, drop) -> | |
@cipher = crypto.createCipher 'rc4', key | |
if drop > 0 | |
this.cipher.update new Buffer drop | |
encrypt: (data) -> | |
@cipher.update data |
NewerOlder