https://mogul-lang.mudatobunka.org/
左下の枠に評価したい式を入力し、エンターキーを押下すると実行されます。
実行結果は左上の枠に表示されます。定義済みの関数は右の枠に一覧表示されます。
| /** | |
| * 様々な色記法を rgb()/rgba() 形式に正規化する | |
| * | |
| * style 属性に書いたり読んだりするだけバージョン | |
| * | |
| * @param {string} colorStr | |
| * @returns {string} | |
| */ | |
| function normalize_v1(colorStr) { | |
| const div = document.createElement('div'); |
| import { assertExists } from "jsr:@std/assert"; | |
| import { crypto } from "jsr:@std/crypto/crypto"; | |
| const arr = Array.from({ length: 1_000_000 }, () => crypto.randomUUID()); | |
| const obj = Object.create(null); | |
| for (const id of arr) { obj[id] = true; } | |
| const set = new Set(arr); | |
| Deno.bench({ | |
| name: 'Object.keys', |
| fn main() { | |
| let mut n: u64 = 1; | |
| let mut sum: f64 = 0.0; | |
| loop { | |
| let a = 1.0 / (n as f64) / (n as f64); | |
| sum += a; | |
| print(n, a, sum); | |
| if n == 100_000 { | |
| break; | |
| } |
| [package] | |
| name = "rust-webpack-template" | |
| description = "My super awesome Rust, WebAssembly, and Webpack project!" | |
| version = "0.1.0" | |
| authors = ["You <[email protected]>"] | |
| categories = ["wasm"] | |
| readme = "README.md" | |
| edition = "2021" | |
| [lib] |
| use strict; | |
| use warnings; | |
| use Test::More; | |
| package MySubstrLeft { | |
| sub TIESCALAR { | |
| my ($class, $string_ref, $offset, $length) = @_; | |
| my $string = $$string_ref; | |
| $offset = $offset < 0 ? length($string) + $offset : $offset; |
| // 文字列リテラル型を対応するプリミティブ型に変換する | |
| type Lift<T> = T extends readonly [ string, ...string[] ] ? LiftTuple<T> | |
| : T extends 'null' ? null | |
| : T extends 'boolean' ? boolean | |
| : T extends 'object' ? { [ key: string ]: any } | |
| : T extends 'array' ? any[] | |
| : T extends 'string' ? string | |
| : T extends 'number' | 'integer' ? number | |
| : any; |
| import { select, subscribe } from '@wordpress/data'; | |
| import { useEffect, useState } from '@wordpress/element'; | |
| /** | |
| * 投稿の保存が完了したタイミングで処理を実行する | |
| * | |
| * @see { @link https://github.com/WordPress/gutenberg/issues/17632#issuecomment-1153888435 } | |
| * @see { @link https://github.com/WordPress/gutenberg/blob/26c8b7149091a315a0da09544cc74cfdc5fbd9c3/docs/reference-guides/data/data-core-editor.md#ispostsavinglocked } | |
| * @see { @link https://github.com/WordPress/gutenberg/blob/26c8b7149091a315a0da09544cc74cfdc5fbd9c3/docs/reference-guides/data/data-core-editor.md#didpostsaverequestsucceed } |
| { | |
| "require": { | |
| "parsica-php/parsica": "^0.8.1" | |
| } | |
| } |
https://mogul-lang.mudatobunka.org/
左下の枠に評価したい式を入力し、エンターキーを押下すると実行されます。
実行結果は左上の枠に表示されます。定義済みの関数は右の枠に一覧表示されます。
| /** | |
| * ラジオボタンをクリックで OFF 可能にする | |
| */ | |
| jQuery(function($) { | |
| var names = $('input[type=radio]').map(function() { | |
| return $(this).attr('name'); | |
| }); | |
| names = _.uniq(names); | |
| var selected_vals = Object.create(null); |