Skip to content

Instantly share code, notes, and snippets.

View mizdra's full-sized avatar

mizdra mizdra

View GitHub Profile
$ CMakeFiles/CMakeError.log
Determining if the pthread_create exist failed with the following output:
Change Dir: ~/.vim/bundle/color_coded/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTC_b7387/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_b7387.dir/build.make CMakeFiles/cmTC_b7387.dir/build
gmake[1]: ディレクトリ `~/.vim/bundle/color_coded/CMakeFiles/CMakeTmp' に入ります
Building C object CMakeFiles/cmTC_b7387.dir/CheckSymbolExists.c.o
~/local/bin/gcc -o CMakeFiles/cmTC_b7387.dir/CheckSymbolExists.c.o -c ~/.vim/bundle/color_coded/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_b7387
$ vim ~/src/10/main.cpp
<作業>
clang version 3.8.0 (tags/RELEASE_380/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: ~/local/bin
Found candidate GCC installation: ~/local/lib/gcc/x86_64-redhat-linux/6.1.0
Selected GCC installation: ~/local/lib/gcc/x86_64-redhat-linux/6.1.0
Candidate multilib: .;@m64
@mizdra
mizdra / iterable-iterator-test.js
Last active June 19, 2016 10:52
IterableIteratorの挙動テスト。
function* gen() {
let i = 0;
while(true) {
yield i++;
}
}
const g1 = gen();
console.log(g1.next()); // { value: 0, done: false }
@mizdra
mizdra / glossary.md
Last active October 1, 2016 10:02
乱数調整関連の用語集
  • 用語の定義
    • 乱数(Random number)
    • 乱数列(Random number sequence)
      • 乱数からなる数列のこと
    • 擬似乱数(Pseudorandom number)
      • 擬似乱数とは、確定的な計算によって生成した乱数のように見える数列の乱数のこと
      • 一般に「乱数」というと「擬似乱数」を指す
        • 乱数列 → 擬似乱数列
  • 擬似乱数 ⇔ 自然乱数(真の乱数)
@mizdra
mizdra / AbuseDrUtsugi.cpp
Last active December 29, 2016 11:53
ウツギ博士にポケモンの進化について熱く語ってもらう.
#include <iostream>
#include <iomanip>
using namespace std;
// 次の乱数を取得
uint32_t next(uint32_t s) {
return 0x41C64E6D * s + 0x00006073;
}
@mizdra
mizdra / list.ts
Created December 5, 2016 15:26
闇に葬り去るのは勿体無い気がしたので
'use strict';
import {LCG, IndexedLCG} from '../core';
import {GEN4_ARG} from '../constant';
const seed = 0x89070502;
const lcg = new LCG(GEN4_ARG, seed);
function toHex(dight) {
const key = 'VIGENERECODEVIGENERECODEVIGENERECODEVIGENER';
const table = {
'A': 'ABCDEFGHIJKLMNOPQRSTUVWXYZ{}',
'B': 'BCDEFGHIJKLMNOPQRSTUVWXYZ{}A',
'C': 'CDEFGHIJKLMNOPQRSTUVWXYZ{}AB',
'D': 'DEFGHIJKLMNOPQRSTUVWXYZ{}ABC',
'E': 'EFGHIJKLMNOPQRSTUVWXYZ{}ABCD',
'F': 'FGHIJKLMNOPQRSTUVWXYZ{}ABCDE',
'G': 'GHIJKLMNOPQRSTUVWXYZ{}ABCDEF',
@mizdra
mizdra / AbuseMaxChainDrUtsugi.cpp
Last active December 11, 2016 11:12
ウツギ博士への電話における同一メッセージの最大連続数を求める
#include <iostream>
#include <iomanip>
using namespace std;
// 次の乱数を取得
uint32_t next(uint32_t s) {
return 0x41C64E6D * s + 0x00006073;
}
@mizdra
mizdra / CalcInitialSeed.cpp
Last active December 29, 2016 11:55
初期Seedを計算
#include <iostream>
#include <iomanip>
using namespace std;
// 次の乱数を取得
uint32_t next(uint32_t s) {
return 0x41C64E6D * s + 0x00006073;
}
@mizdra
mizdra / settings.json
Created March 6, 2017 14:17
2017/3/6時点でのvscodeの設定
{
"editor.fontFamily": "Ricty for Powerline",
"editor.fontSize": 14,
"guides.normal.style": "dashed",
"git.confirmSync": false,
"files.associations": {
"*.vue": "html" // .vue で emmet を有効化
},
"editor.wordWrap": "off",
"workbench.colorTheme": "Atom One Dark",