Skip to content

Instantly share code, notes, and snippets.

@akinomyoga
akinomyoga / msc17bug-class-definition-changes.cpp
Last active March 2, 2017 14:30
msc17 (VIsual Studio 2012 cl.exe) の信じがたいバグ: std::remove_pointer<void (*)()>::type の結果が変化する
#include <cstdio>
#include <type_traits>
struct C {
C() {}
template<typename F> explicit C(const F& f, typename std::remove_pointer<F>::type* = nullptr) {}
template<typename F> void operator=(const F&) {}
};
void f() { return 0; }
@wsuzume
wsuzume / repo.py
Last active December 17, 2016 11:30
#!/usr/bin/env python
#coding: UTF-8
import Image
import sys
def threshold(x,a):
if x > a:
return 1
else:
emerge -uDNavt -j2 world --reinstall-atoms='XML-LibXML XML-Simple perl-File-Spec perl-Storable XML-NamespaceSupport File-Temp XML-Parser texinfo XML-SAX-Base Text-Unidecode Unicode-EastAsianWidth Locale-gettext XML-SAX Data-Dumper libintl-perl'

今まで試したカメラアップロード機能について

  • 追加料金を支払わずに使用する場合。

Dropbox

長所

  • スクショも写真も勝手に判断して上げてくれる手軽さ
  • 反映早め
echo nr2char(len([[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[
@kb10uy
kb10uy / ごちうさ.rb
Created August 18, 2014 11:37
Brainf*ckの派生言語「ごちうさ」 Ruby実装
#coding: utf-8
#+-----------------------------------------------------------------------------+
#| Brainfuckをごちうさチックにしたやつ |
#| Gochiusa v1.0 |
#| MIT License |
#| |
#| ソースコードファイルの拡張子はitoarかgudを適当に推奨 |
#| (Is The Order A Rabbit と [ご]注文は[う]さぎ[で]すか?から採用) |
#| デフォルトでは出力・入力ともにUTF-8なので必要なら適当に変えて |
#| 所定の文字列以外では空白と改行が許されます |
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs