INSERT INTO `posts`(
`id`
,`title`
,`body`
,`created_at`
,`updated_at`
)
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
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; | |
} |
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
[package] | |
name = "rust-webpack-template" | |
description = "My super awesome Rust, WebAssembly, and Webpack project!" | |
version = "0.1.0" | |
authors = ["You <you@example.com>"] | |
categories = ["wasm"] | |
readme = "README.md" | |
edition = "2021" | |
[lib] |
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
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; |
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
// 文字列リテラル型を対応するプリミティブ型に変換する | |
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; |
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 { 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 } |
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
{ | |
"require": { | |
"parsica-php/parsica": "^0.8.1" | |
} | |
} |
https://mogul-lang.mudatobunka.org/
左下の枠に評価したい式を入力し、エンターキーを押下すると実行されます。
実行結果は左上の枠に表示されます。定義済みの関数は右の枠に一覧表示されます。
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
/** | |
* ラジオボタンをクリックで OFF 可能にする | |
*/ | |
jQuery(function($) { | |
var names = $('input[type=radio]').map(function() { | |
return $(this).attr('name'); | |
}); | |
names = _.uniq(names); | |
var selected_vals = Object.create(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
/** | |
* 指定した範囲の整数をランダムに取得する | |
* | |
* @param {number} min ランダムに取得したい整数の下限 | |
* @param {number} max ランダムに取得したい整数の上限 | |
* @returns {number} min 以上 max 以下の整数 | |
*/ | |
function randomInt(min, max) { | |
var interval = max - min + 1; |
NewerOlder