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
cmd1 1 | |
cmd2 2 | |
stop | |
#deffunc cmd1 int a, local b | |
b = 10 | |
mes "1->" + a + "/" + b | |
goto *COMMON | |
#deffunc cmd2 int a, local c |
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
goto *L0000 | |
#module m0 | |
#defcfunc vdot array v0, array v1 | |
return v0.0 * v1.0 + v0.1 * v1.1 + v0.2 * v1.2 | |
#defcfunc vdot1 array v0 | |
return v0.0 * v0.0 + v0.1 * v0.1 + v0.2 * v0.2 |
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
#uselib "winmm.dll" | |
#func timeGetTime "timeGetTime" | |
#module | |
#deffunc fooA \ | |
local a00, local a01, local a02, local a03, local a04, local a05, local a06, local a07, local a08, local a09,\ | |
local a10, local a11, local a12, local a13, local a14, local a15, local a16, local a17, local a18, local a19,\ | |
local a20, local a21, local a22, local a23, local a24, local a25, local a26, local a27, local a28, local a29,\ | |
local a30, local a31, local a32, local a33, local a34, local a35, local a36, local a37, local a38, local a39,\ |
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
package jp.peppermint.vec.immutable | |
case class Vec3d(x:Double, y:Double, z: Double) { | |
def +(v: Vec3d) = Vec3d(x + v.x, y + v.y, z + v.z) | |
def -(v: Vec3d) = Vec3d(x - v.x, y - v.y, z - v.z) | |
def *(s: Double) = Vec3d(x * s, y * s, z * s) | |
def *(v: Vec3d) = x * v.x + y * v.y + z * v.z | |
def **(v: Vec3d) = Vec3d(y * v.z - z * v.y, | |
z * v.x - x * v.z, | |
x * v.y - y * v.x) |
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
for(n<-0 to 99)println(Seq(n+1,"Fizz","Buzz","FizzBuzz")(n%3/2+n%5/4*2)) |
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
#Tue Sep 06 23:32:28 JST 2011 | |
file_export_version=3.0 | |
/instance/org.eclipse.ui/KEY_CONFIGURATION_ID=org.eclipse.ui.emacsAcceleratorConfiguration | |
@org.eclipse.ui=3.7.0.I20110602-0100 | |
@org.eclipse.ui.workbench=3.7.0.I20110519-0100 | |
/instance/org.eclipse.ui.workbench/org.eclipse.ui.commands=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<org.eclipse.ui.commands>\r\n<activeKeyConfiguration keyConfigurationId\="org.eclipse.ui.emacsAcceleratorConfiguration"/>\r\n<keyBinding contextId\="org.eclipse.ui.textEditorScope" keyConfigurationId\="org.eclipse.ui.emacsAcceleratorConfiguration" keySequence\="CTRL+M"/>\r\n<keyBinding contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.emacsAcceleratorConfiguration" keySequence\="CTRL+M"/>\r\n<keyBinding commandId\="org.eclipse.ui.edit.text.deletePrevious" contextId\="org.eclipse.ui.textEditorScope" keyConfigurationId\="org.eclipse.ui.emacsAcceleratorConfiguration" keySequence\="CTRL+H"/>\r\n<keyBinding contextId\="org.eclipse.ui.textEditorScope" keyConfi |
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
static int* hoge_impl() { | |
static int hoge = 0; | |
return &hoge; | |
} | |
int get_hoge() { | |
return *hoge_impl(); | |
} | |
void set_hoge(int i) { | |
*hoge_impl() = i; |
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
package test; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.lang.reflect.Method; | |
import org.objectweb.asm.ClassWriter; | |
import org.objectweb.asm.MethodVisitor; | |
import org.objectweb.asm.Opcodes; |
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
public class Make implements Opcodes { | |
public static void main(String[] args) { | |
ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); | |
cw.visit(V1_1, ACC_PUBLIC, "test/Ov", null, "java/lang/Object", null); | |
MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, | |
"<init>", | |
"()V", | |
null, |
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
public void test() { | |
System.out.println("primitive"); | |
{ | |
float nan = Float.NaN; | |
System.out.println(nan); | |
System.out.println(nan + 10); | |
System.out.println(nan - 20); | |
System.out.println(nan / 10); | |
System.out.println(nan * 5); | |
System.out.println(nan > 1e10); |
OlderNewer