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
| /// @desc Returns a clone of an array. | |
| /// @param variable {Array} The array to clone. | |
| /// @author Kat @katsaii | |
| if (array_length_1d(argument0) < 1) then return []; | |
| argument0[0] = argument0[0]; | |
| return argument0; |
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
| (async () => { | |
| const require_ = async (jsURL) => { | |
| // we can have a little security vulnerability, as a treat! | |
| return await fetch(jsURL).then(data => data.text()).then(eval); | |
| }; | |
| if (!this.includedJSZip) { | |
| this.includedJSZip = true; | |
| await require_("https://raw.githubusercontent.com/Stuk/jszip/refs/heads/main/dist/jszip.min.js"); | |
| await require_("https://raw.githubusercontent.com/eligrey/FileSaver.js/refs/heads/master/src/FileSaver.js"); | |
| } |
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
| /// @ignore | |
| function __pool() { | |
| static pool = []; | |
| return pool; | |
| } | |
| function pool_get(container) { | |
| var pool = __pool(); | |
| var poolMax = array_length(pool) - 1; |
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
| #![feature(generic_const_exprs)] | |
| #![allow(incomplete_features)] | |
| trait Factorialable<const N : usize> { | |
| fn value() -> usize; | |
| } | |
| impl Factorialable<0> for () { | |
| fn value() -> usize { 1 } | |
| } |
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
| fst((A, _), A). | |
| snd((_, B), B). | |
| name("katsaii"). | |
| ?- | |
| name(Name), | |
| findall((Prefix, Suffix), string_concat(Prefix, Suffix, Name), Pairs), | |
| maplist(fst, Pairs, Prefixes), | |
| maplist(snd, Pairs, Suffixes), |
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
| distance(A, B, Dist) :- | |
| A = (X1, Y1), | |
| B = (X2, Y2), | |
| Dx is X2 - X1, | |
| Dy is Y2 - Y1, | |
| Dist is sqrt(Dx * Dx + Dy * Dy). | |
| closest([X | Xs], Target, Min) :- | |
| distance(X, Target, Dist), | |
| closest_ext(Xs, Target, (X, Dist), Min). |
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
| /* Deferred Exeuction of Code | |
| * -------------------------- | |
| * Kat @Katsaii | |
| */ | |
| #macro DEFER for (;; { | |
| #macro UNTIL ; break; }) |
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
| /* Singleton object utilities | |
| * -------------------------- | |
| * Kat @Katsaii | |
| */ | |
| #macro __instance_create_layer_internal instance_create_layer | |
| #macro __instance_create_depth_internal instance_create_depth | |
| #macro instance_create_layer instance_create_checked_layer | |
| #macro instance_create_depth instance_create_checked_depth | |
| #macro PREFIX_SINGLETON "the" |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| void swap(int* a, int i, int j) { | |
| int temp = a[i]; | |
| a[i] = a[j]; | |
| a[j] = temp; | |
| return; | |
| } |
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
| @echo off | |
| set fmt=%1 | |
| set url=%* | |
| :: Strip fmt from url | |
| set s=%fmt% | |
| :loop | |
| if [%s%] NEQ [] ( | |
| set s=%s:~1% | |
| set url=%url:~1% | |
| goto loop |
NewerOlder