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.paninij.lang.*; | |
@Capsule | |
public class GreeterTemplate { | |
@Imports Console c; | |
String message; | |
void init() { | |
message = "Hello"; |
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.paninij.lang.*; | |
@Root | |
@Capsule | |
public class HelloWorldTemplate { | |
@Local Greeter g; | |
@Local Console c; | |
void design(HelloWorld self) { | |
g.imports(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
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.io.ObjectInputStream; | |
import java.io.ObjectOutputStream; | |
public class DeepCopy { | |
private DeepCopy() { } |
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
const lerp = (f0, f1, t) => (1 - t) * f0 + t * f1; | |
const lerp2 = (v1, v2, t) => { | |
return { | |
x: lerp(v1.x, v2.x, t), | |
y: lerp(v2.y, v2.x, t) | |
}; | |
}; |
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
<?php | |
/* get a relative path to the sites root */ | |
$root = preg_replace(':/[^/]+:', '../', dirname($_SERVER['SCRIPT_NAME'])); |
NewerOlder