Skip to content

Instantly share code, notes, and snippets.

class GaussianNoise
{
double z0, z1;
bool generate;
Random random;
public GaussianNoise()
{
random = new Random();
}
@udaken
udaken / C# Tasks.md
Created July 19, 2016 14:41
C# Tasks

タスクの作成(実行せず)

var task = new Task(() => Thread.Sleep(1000));

タスクの作成と実行

var task = Task.Run(() => Thread.Sleep(1000));
@udaken
udaken / ShellViewSample.cpp
Last active July 22, 2016 14:06
explorerのアイテムの並び順で、アイテムを取得するサンプル
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#define WIN32_LEAN_AND_MEAN
#define STRICT
#define STRICT_CONST
#define STRICT_TYPED_ITEMIDS
#define NOMINMAX
@udaken
udaken / weblio_swf_replacer.user.js
Last active August 28, 2016 06:41
weblio replace swf to html5
// ==UserScript==
// @name weblio swf replacer
// @namespace http://d.hatena.ne.jp/deraw
// @description weblio replace swf to html5
// @include http://ejje.weblio.jp/content/*
// @version 1.0
// @grant none
// @license Public Domain
// @downloadURL https://gist.github.com/udaken/d8c6f6dc5b152d1b9204cab24b9578e8/raw/weblio_swf_replacer.user.js
// ==/UserScript==
@udaken
udaken / pixixxx.user.js
Last active September 24, 2017 10:30
イラストサムネイルのリンク先を表示する小窓を表示します。
// ==UserScript==
// @name pixixxx - pixiv mini browser
// @namespace http://d.hatena.ne.jp/deraw/pixixxx
// @include https://www.pixiv.net/*
// @grant console.log
// @grant GM_getValue
// @grant GM_setValue
// @description イラストサムネイルのリンク先を表示する小窓を表示します。
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.0.1/jquery.min.js
// @require http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js
@namespace url(http://www.w3.org/1999/xhtml);
@font-face {
font-family: "MS Pゴシック";
src: local("MeiryoKe_PGothic"), local("メイリオ"), local("Meiryo"), local("MS Pゴシック");
}
@font-face {
font-family: "MS Pゴシック" !important;
src: local("MeiryoKe_PGothic"), local("メイリオ"), local("Meiryo"), local("MS Pゴシック");
}
* {
text-shadow: transparent 0px 0px 0px, rgba(0,0,0,0.68) 0px 0px 0px !important;
}
@udaken
udaken / comic_meteo_HTML5_Player.user.js
Last active September 11, 2016 15:55
comic meteo HTML5 Player
// ==UserScript==
// @name comic meteo HTML5 Player
// @namespace http://d.hatena.ne.jp/deraw
// @include http://comic-meteor.jp/*
// @version 1.0
// @grant none
// @downloadURL https://gist.github.com/udaken/ff9ba6f875e0193911194e52f34123a6/raw/comic_meteo_HTML5_Player.user.js
// ==/UserScript==
(function(){
@udaken
udaken / sakura_ bat.kwd
Created September 12, 2016 09:19
Sakura Editor Keyword File(bat)
// MS-DOS batch キーワード定義ファイル
// CASE=False
@ECHO
AUX
BREAK
CALL
CD
CHCP
CHDIR
@udaken
udaken / cp932.crlf.txt
Created September 28, 2016 22:02
all charactor of MS Windows Shift-JIS(CP932)
!
"
#
$
%
&
'
(
)