Skip to content

Instantly share code, notes, and snippets.

View t-uda's full-sized avatar

Tomoki UDA t-uda

  • AIMR, Tohoku University
  • Sendai
  • X @t_uda
View GitHub Profile
@t-uda
t-uda / .zshenv
Created August 1, 2012 16:17
zsh global alias でエラー出力だけを楽々パイプする ref: http://qiita.com/items/986235bd1879692e54a1
alias -g L="|& $PAGER"
alias -g E='2>&1 > /dev/null'
<html>
<head>
<style>v\:oval { behavior:url(#default#VML); display:inline-block }</style>
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$(document).submit(function () {});
$('oval').click();
})
@t-uda
t-uda / bad-newenvironment-lstlisting.tex
Created June 23, 2012 15:05
lstlisting の新しい環境を定義する \lstnewenvironment ref: http://qiita.com/items/a971b925fc6526d324c1
\documentclass{article}
\usepackage{listings}
\lstset{language=C++}
\newenvironment{C++}{\begin{lstlisting}}{\end{lstlisting}}
\begin{document}
\begin{C++}
#include <iostream>
int main () {
@t-uda
t-uda / .gitconfig
Created June 22, 2012 12:53
.gitconfig で他のファイルを include ref: http://qiita.com/items/c3fd33604c3888e64868
[include]
path = .gitconfig.local
" 表示行単位で上下移動するように
nnoremap j gj
nnoremap k gk
nnoremap <Down> gj
nnoremap <Up> gk
" 逆に普通の行単位で移動したい時のために逆の map も設定しておく
nnoremap gj j
nnoremap gk k
@t-uda
t-uda / output-for-test-interval-arith-RxR.txt
Created June 16, 2012 16:59
boost::numeric::interval<int>(1): C++ Boost 区間演算ライブラリ 四則演算と基本的な関数 ref: http://qiita.com/items/e4f554b8af864b638a6d
a = 1.7
b = 3.3
a + b = [5,5]w(8.88178e-16)
a - b = [-1.6,-1.6]w(0)
a * b = [5.61,5.61]w(8.88178e-16)
a / b = [0.515152,0.515152]w(1.11022e-16)
@t-uda
t-uda / file1.txt
Created June 15, 2012 15:22
boost::numeric::interval<int>(0): C++ Boost 区間演算ライブラリ 概要 ref: http://qiita.com/items/7712671389e016d24df6
$ g++ hello-interval.cpp -o hello-interval
$ ./hello-interval
[-1,2]
@t-uda
t-uda / file2.txt
Created April 25, 2014 14:53
switch(true) イディオム考察 ref: http://qiita.com/t_uda/items/1969e09a970d71e4cfd6
もし条件 condition が成り立つならば hoge する.