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
obj.pixeloption("type", "rgb") | |
local w, h = obj.getpixel() | |
local inf = 1 / 0 | |
for y = 0, h - 1 do | |
for x = 0, w - 1 do | |
local r, g, b, a = obj.getpixel(x, y) | |
if a < 255 then |
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
-- 交差判定は以下のコードを利用 | |
-- https://en.wikipedia.org/wiki/Even%E2%80%93odd_rule | |
-- 通常ver (x2 SS) | |
function fillPoly(ps, w, h, r, g, b, a) | |
a = a and a or 255 | |
local left, top, right, bottom = w, h, 0, 0 | |
for i = 1, #ps do | |
local v = ps[i] | |
left = math.min(math.max(math.floor(v.x), 0), left) |
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
TEXT_DIALOG_MESSAGE = "Please select target track" | |
TEXT_DIALOG_SELECT_TRACK = "Target track" | |
TEXT_DIALOG_TRACK_ALL = "All" | |
TEXT_DIALOG_TRACK_CURRENT = "Current editing track" | |
function split(inputstr, sep) | |
local t = {} | |
for field, s in string.gmatch(inputstr, "([^"..sep.."]*)("..sep.."?)") do | |
table.insert(t, field) | |
if s == "" then |
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 ExportSample | |
{ | |
public static void Export(string filePath, double framePeriod, ScaleInterpolationType interpolationType, double[] scales) | |
{ | |
var data = new ScaleData | |
{ | |
FramePeriod = framePeriod, | |
InterpolationType = interpolationType, | |
Scales = scales | |
}; |
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 | |
{ | |
public static void main (String[] args) throws java.lang.Throwable | |
{ | |
if (new Main(100, "") == null) { } | |
} | |
Main(int n, String p) throws java.lang.Throwable { | |
if (n > 0 && new Main(n - 1, (n % 3 == 0 && n % 5 == 0 ? "FizzBuzz" : (n % 3 == 0 ? "Fizz" : (n % 5 == 0 ? "Buzz" : n))) + "\n" + p) != null) { } | |
else if (java.io.PrintStream.class.getMethod("println", String.class).invoke(System.out, p) == 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
--[[ | |
何: | |
決まった処理をコマンドとして登録、それをRLEした文字列で書けるようにした何か | |
Sample: | |
TurtleCommandHelper.registerCommand("p", function() print("command") end) | |
TurtleCommandHelper.registerSuffix("d", function(func, table) | |
for i = 1, rawget(table, "loop") do | |
print(rawget(table, "value")) | |
func() | |
end |
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
eval ( o="o= 'e v al (o= % p. split*%p)'%[o,''];b=' a g | |
4a99 fh c5egi 1c 9 b9 804 1 53d ecc515ebeag9342gbd7e6 i6 4 | |
15ad e8 afbbh1 dc4 a 70 a9e 8 67 3 02b5a0784318558gi8g69 1 2 | |
1127 9 3f1957 46 0 2f3 ib1 0 h9 ad 3hf681b3bb6aad1d76bh g4 8 | |
a7527 b6 chb8 3 79 9 a36 c32 f7g 3h 2g21de26986dh3693hg0 d f | |
a7ea 60 535g h b28 e 3f9 2hh c e73 ch h6ag3b0dfd12giec6b7 0 e | |
4953 e da44 b i5 gb 8c5f hi3 6 18 ih4 067047aa07 |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text; | |
namespace ProgrammingContestChallenge.LongestCommonSubsequence | |
{ | |
class CharInfo |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace ProgrammingContestChallenge.IntervalScheduling | |
{ | |
class Program | |
{ | |
private const string S = "1 2 4 6 8"; |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace ProgrammingContestChallenge.Maze | |
{ | |
class FootPrint | |
{ | |
public FootPrint(int x, int y, FootPrint prev) |
NewerOlder