Candidates for name of the lib
namespaced-inputs
input-namespace
namespaced-fieldset
nested-input
(nested-input*s*
is taken)uncontrolled-inputs
namespaced-inputs
input-namespace
namespaced-fieldset
nested-input
(nested-input*s*
is taken)uncontrolled-inputs
[lib name here]
(README draft)Navigates? | declarative? | Makes GET, triggers loader | Makes POST, triggers action | No requests |
---|---|---|---|---|
navigates | declarative | <Link to=""> <Form method="get"> |
<Form method="post"> |
<Link to="#..."> |
navigates | imperative | navigate() setSearchParams() |
submit() |
navigate("#") |
stays | declarative | <fetcher.Form method="get"> |
<fetcher.Form method="post"> |
(doesn't make sense) |
s |
const fs = require('fs'); | |
const {JKFPlayer} = require('json-kifu-format'); | |
const {Iconv} = require("iconv"); | |
let dir = "muso"; | |
const result = []; | |
const sjisIconv = new Iconv("cp932", "utf-8"); | |
fs.readdir(`./${dir}`, async (err, files) => { |
$ sh ./run.sh | |
ts4029.ts(5,2): error TS4029: Public property 'mod' of exported class has or is using name '' from external module "mod" but cannot be named. | |
ts4029-another-variable.ts(6,2): error TS4029: Public property 'mod2' of exported class has or is using name '' from external module "mod" but cannot be named. |
import mod = require('./mod'); | |
console.log(mod.version); |
Number number = getNumber(); | |
// before | |
if(number instanceof Integer){ | |
((Integer)number).someIntegerMethod(); | |
}else if(number instanceof Float){ | |
((Float)number).someFloatMethod(); | |
} | |
// after | |
match(number){ | |
case Integer: |
javascript:!function(){var s = document.createElement("script");s.src = "http://81.la/tmp/masao-bookmarklet-public.js";document.body.appendChild(s);}();void 0;
//順位変動時に自動でカラーリングされる(つもり) | |
//http://icpc.iisf.or.jp/2014-waseda/domestic/selection/ | |
//上記選抜ルールの手順2までです. | |
//ブックマークレット用 | |
javascript:function showChosen(){console.log("show");var $teams = $("div.row li.team");var teamsByUniv = {};var chosenTeams = 0;for(var i=0; i<$teams.length; i++){var row = $teams[i];var univ = $("td.team-university", row).text();$(row).css("background-color", "");if(!teamsByUniv[univ])teamsByUniv[univ]=0;if(chosenTeams<5){if(teamsByUniv[univ]>=4) continue;}else if(chosenTeams<10){if(teamsByUniv[univ]>=3) continue;}else if(chosenTeams<20){if(teamsByUniv[univ]>=2) continue;}else if(chosenTeams<29/*26*/){if(teamsByUniv[univ]>=1) continue;}else{continue;}teamsByUniv[univ]++;chosenTeams++;$(row).css("background-color", "#ccc")}}var f = console.log.bind(console);console.log = function(arg){f(arg);if(arg=="Update success."){showChosen();}};showChosen(); | |
//可読形式 | |
function showChosen(){ | |
console.log("show"); |
IFPH 3.1.4 m*nの評価に必要な評価ステップ数はいくつか. | |
ただし自然数及び加算,乗算は次の通り. | |
data Nat = Zero | Succ Nat | |
(+) :: Nat->Nat->Nat | |
m + Zero = m | |
m + Succ n = Succ (m+n) | |
(*) :: Nat->Nat->Nat | |
m * Zero = Zero | |
m * Succ n = (m*n)+m |
import Data.List(sort, nub) | |
makeNumByN :: [[Integer]] | |
makeNumByN = [0..9] : map f [0..] -- memoize | |
where f k = nub$sort$ do | |
l<-[0..k] | |
a<-makeNumByN!!l | |
b<-makeNumByN!!(k-l) | |
[a*b, a+b, if a>b then a-b else b-a] -- negative value has no meaning |