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
// Processing 3.3.7 | |
int iconSize = 640; | |
float strokeWeightFactor = 1.0 / 24; | |
int lineColorValue = 32; | |
int backgroundColorValue = 255; | |
boolean transparentIndicator = false; | |
float rotationAngleDegrees = -24; |
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
// See also: | |
// https://forum.processing.org/one/topic/how-to-create-a-closed-spline-curve.html | |
float[] radiusArray; | |
void setup() { | |
size(600, 600); | |
noLoop(); | |
noStroke(); | |
fill(32); |
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 java.util.Map.Entry; | |
class WordList { | |
private final StringList words = new StringList(); | |
private final String separator; | |
WordList(String separator) { | |
this.separator = separator; | |
} | |
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
// 命令セット一覧(2019-04-03) | |
// 命名規則が揺れている…… | |
END // 実行終了。以降、速度などそのままに動き続ける | |
VANISH // バイトコードを動かしているActor(敵や弾丸の総称)自体を消して終了 | |
// スタック操作系 | |
PUSH_8 | |
PUSH_16 | |
PUSH_32 |
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
#if macro | |
import haxe.macro.Context; | |
import haxe.macro.Expr; | |
import haxe.macro.TypeTools; | |
class MethodBuilder { | |
public static function build(): Array<Field> { | |
final fields = Context.getBuildFields(); | |
final localType = Context.getLocalType(); |
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
#if macro | |
import haxe.macro.Context; | |
import haxe.macro.Expr.Field; | |
using StringTools; | |
class Macro { | |
static macro function checkMeta():Null<Array<Field>> { | |
warnIfNotFound(":myMeta"); | |
return 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
@:generic // Without this it compiles fine | |
class GenericObject<T> { | |
final value: T; | |
public function new(v: T) | |
this.value = v; | |
} | |
abstract GenericAbstract<T>(GenericObject<T>) from GenericObject<T> { | |
public inline function new(data: GenericObject<T>) |
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
abstract MyInt(Int) from Int to Int { | |
@:op(A...B) static extern inline function iter(a: MyInt, b: MyInt): MyIntIterator | |
return new MyIntIterator(a, b); | |
public extern inline function toInt() | |
return this; | |
} | |
// @:access(IntIterator) | |
// @:forward(min, max, hasNext) |
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
class Main { | |
static function main() { | |
var a: UInt = -1; | |
Sys.println(a); // -1 | |
trace(a); // 4294967295 | |
} | |
} |
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
// Node v13.12.0 | |
const str = "abcde"; | |
const searchString = "c"; | |
const indices = [ | |
str.indexOf(searchString), // 2 | |
str.indexOf(searchString, null), // 2 | |
str.lastIndexOf(searchString), // 2 | |
str.lastIndexOf(searchString, null) // -1 |
OlderNewer