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
<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 / bad-newenvironment-lstlisting.tex
Created June 23, 2012 15:00
lstlisting の新しい環境を定義する \lstnewenvironment ref: http://qiita.com/items/8ac529870144884f2951
\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-fun-math-0.txt
Created June 19, 2012 15:35
boost::numeric::interval<int>(2): C++ Boost 区間演算ライブラリ 数学関数 ref: http://qiita.com/items/abcf31a7b1787604a4f4
a = [-1,3]
b = [2,4]
min(a, b) = [-1,3]
max(a, b) = [2,4]
abs(a) = [0,3]
@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]