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 { Vertex } from "./Vertex"; | |
| const SANITY_CHECKS = false; | |
| export class IntrusiveIndexedPriorityQueue< | |
| A extends { | |
| pqRank: number, | |
| inPq: boolean, | |
| pqPrev: A | null, | |
| pqNext: A | null, |
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
| <svg version="1.1" viewBox="-16 -16 32 32" style="width: 192px; height: 192px; user-select: none; outline: none; --rot: 20deg;"> | |
| <defs> | |
| <linearGradient id="shape-fill" x1="0" x2="0" y1="0" y2="1"> | |
| <stop offset="0%" stop-color="rgb(80, 80, 81)"/> | |
| <stop offset="100%" stop-color="rgb(30, 30, 31)"/> | |
| </linearGradient> | |
| <path id="shape" d=" | |
| M14.876 -5.890A-16 -16 0 0 0 14.876 5.890A16 16 0 0 112.539 9.938A-16 -16 0 0 0 2.337 15.828 | |
| A16 16 0 0 1-2.337 15.828A-16 -16 0 0 0 -12.539 9.938A16 16 0 0 1-14.876 5.890A-16 -16 0 0 0 -14.876 -5.890 | |
| A16 16 0 0 1-12.539 -9.938A-16 -16 0 0 0 -2.337 -15.828A16 16 0 0 12.337 -15.828A-16 -16 0 0 0 12.539 -9.938 |
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
| // https://playground.solidjs.com/anonymous/7ccf3971-2a47-45d5-82ed-1bc3a0481637 | |
| import { render } from "solid-js/web"; | |
| import { type Accessor, createSignal, createMemo, type Signal, onCleanup, untrack, For } from "solid-js"; | |
| function createSelector(a: Accessor<string | undefined>): (k: string) => boolean { | |
| let map = new Map<string,{ | |
| s: Signal<boolean>, | |
| refCount: number, | |
| }>(); |
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
| /** | |
| * Performs 4-bit integer addition using direct, unrolled carry-lookahead logic. | |
| * This function serves as a building block for the 32-bit adder. | |
| * | |
| * @param {number} nibbleA The first 4-bit input (0-15). | |
| * @param {number} nibbleB The second 4-bit input (0-15). | |
| * @param {number} carryIn The carry-in from the previous 4-bit block (0 or 1). | |
| * @returns {{sum: number, carryOut: number}} An object containing the 4-bit sum and the carry-out. | |
| */ | |
| function add4BitCarryLookahead(nibbleA, nibbleB, carryIn) { |
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
| export function projectMutableOverAutomergeDocV2<T extends object>( | |
| json: any, | |
| updateJson: (cb: (json: any) => any) => void, | |
| typeSchema: TypeSchema<T> | |
| ): T { | |
| if (typeof typeSchema != "object" || typeSchema.type != "Object") { | |
| throw new Error("Expected object."); | |
| } | |
| let properties = typeSchema.properties; | |
| let result = new Proxy<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
| import { Cont, do_, exec, execR, } from "prelude"; | |
| let freeVar = 0; | |
| let code = ""; | |
| function main(): Cont<void> { | |
| return do_(() => { | |
| let name = ask(_("What is your name?")); | |
| print(append(_("Hello "), name)); | |
| }); |
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 { Cont } from "prelude"; | |
| let div = document.createElement("div"); | |
| div.style.setProperty("position", "absolute"); | |
| div.style.setProperty("left", "20px"); | |
| div.style.setProperty("top", "20px"); | |
| div.style.setProperty("width", "300px"); | |
| div.style.setProperty("z-index", "100"); | |
| div.style.setProperty("background-color", "rgba(0,0,0,0.7)"); | |
| setTimeout(() => { |
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
| type Extract<Type, Union> = Type extends Union ? Type : never; | |
| export type TypeSchema<A> = | |
| TypeSchemaInvariantMap<unknown, A> | | |
| TypeSchemaRecursive<A> | | |
| { type: "MaybeUndefined", elemTypeSchema: TypeSchema<NonNullable<A>>, } | ( | |
| A extends ({ has: true, value: unknown, } | { has: false, }) ? { type: "Optional", elemTypeSchema: TypeSchema<Extract<A, { value: unknown, }>["value"]>, } : | |
| A extends boolean ? { type: "Boolean", } : | |
| A extends number ? { type: "Number", } : | |
| A extends string ? { type: "String", possibleValues?: string[], } : |
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 { SetStoreFunction, Store, createStore, reconcile, unwrap } from "solid-js/store"; | |
| import { parseJsonViaPropertiesSchema, writeJsonViaPropertiesSchema } from "../model/PropertiesSchema"; | |
| import { Result, err, ok } from "../model/Result"; | |
| import { Component, ComponentType, IsComponent, IsComponentType } from "./Component"; | |
| import { Registry } from "./Registry"; | |
| import { generateUUID } from "three/src/math/MathUtils"; | |
| import { parentComponentType } from "./components/ParentComponent"; | |
| import { childrenComponentType, ChildrenState } from "./components/ChildrenComponent"; | |
| import { Accessor, batch, createMemo, createSignal, onCleanup, untrack } from "solid-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
| function ProcessFile { | |
| param( | |
| [string]$inputFilename, | |
| [string]$outputFilename | |
| ) | |
| $csv = @() | |
| $sr = New-Object System.IO.StreamReader($inputFilename) | |
| try { | |
| while ($true) { |
NewerOlder