Skip to content

Instantly share code, notes, and snippets.

View butchi's full-sized avatar

IWABUCHI Yu(u)ki (butchi) butchi

View GitHub Profile
@butchi
butchi / file0.txt
Created December 5, 2016 16:38
Mathematicaで使う記号あれこれ ref: http://qiita.com/butchi_y/items/1d13c18cc195f0e9cf36
In[1]:= Map[f, {a, b, c, d, e}]
Out[1]= {f[a], f[b], f[c], f[d], f[e]}
@butchi
butchi / file0.txt
Created December 4, 2016 14:58
Mathematicaで浮動小数点数を扱う ref: http://qiita.com/butchi_y/items/3c44e94cdac369509bca
In[1]:= ExportString[12345, "Real32"]
Out[1]= ä@F
@butchi
butchi / blur.nb
Created December 3, 2016 14:42
SoundNoteをPlayで再実装してきよしこの夜を鳴らす ref: http://qiita.com/butchi_y/items/d8b85aa3e13a835a33fa
sound[{SoundNote[7], SoundNote[7], SoundNote[7], SoundNote[3, 4]}, 1.5]
@butchi
butchi / hilight-table.nb
Last active December 1, 2016 14:34
Mathematicaで数表のハイライト ref: http://qiita.com/butchi_y/items/40123394f9acd32c288f
highlightTable[tbl_, crit_, color_: Red] :=
Grid[tbl] /. {n_?crit -> Item[n, Background -> color]}
$ yarn
yarn install v0.17.8
info No lockfile found.
[1/4] 🔍 Resolving packages...
warning [email protected]: Babel's CLI commands have been moved from the babel package to the babel-cli package
warning debowerify > bower > glob > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning browser-sync > resp-modifier > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning debowerify > bower > bower-config > [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
warning debowerify > bower > insight > [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
warning debowerify > bower > request > [email protected]: use uuid module instead
[
"a",
"abbr",
"address",
"area",
"article",
"aside",
"audio",
"b",
"base",
<!DOCTYPE html><title>Hello, world!</title><style>head,title{display:block}
@butchi
butchi / es5.js
Created November 9, 2016 09:31
2次元配列の初期化(ES2015) ref: http://qiita.com/butchi_y/items/db3078dced4592872a9c
var x, y;
var tbl = new Array(3);
for(y = 0; y < 3; y++) {
tbl[y] = new Array(3);
for(x = 0; x < 3; x++) {
tbl[y][x] = 0;
}
}
@butchi
butchi / index.html
Last active November 8, 2016 03:10
JSだけでソーシャルボタン設置 ref: http://qiita.com/butchi_y/items/f2253ddd504d30686f62
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>JS share button</title>
<meta property="og:title" content="XHTML like">
<meta property="og:type" content="website">
<meta property="og:url" content="http://example.com/">
@butchi
butchi / primality_test_by_digital_root.js
Created June 3, 2016 12:51
素数判定(37まで)
function isPrime(n) {
var ret = true;
for(let i = 2; i < n - 1; i++) {
if(isMultiple(n, i)) {
ret = false;
}
}
return ret;
}