This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{listings} | |
\lstset{language=C++} | |
\newenvironment{C++}{\begin{lstlisting}}{\end{lstlisting}} | |
\begin{document} | |
\begin{C++} | |
#include <iostream> | |
int main () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\PassOptionsToClass{hiresbb}{graphicx} | |
\documentclass[dvipdfmx]{beamer}\listfiles | |
\usepackage{graphicx} | |
\usepackage{pgf} | |
%\usetheme{Warsaw} | |
%\setbeamertemplate{blocks}[default] | |
\newcommand{\thickhrulefill}{\leavevmode\leaders\hrule depth-1.2pt height 3.2pt\hfill\kern0pt} | |
\newcommand{\indicatewidth}[1]{\thickhrulefill{#1}\thickhrulefill} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% 縦に大きくならないハット付き文字を作る。 | |
%%%% \hbox to 0pt : 幅 0pt のボックスを作る。 | |
%%%% \phantom : その文字列の大きさで何も表示されないボックスを作る。 | |
%%%% \raisebox : ボックスの位置・サイズを変更する。 | |
%%%% \mathchoice : 数式モードに応じて条件分岐する。 | |
\def\Hat#1{{\fboxsep0pt\mathchoice | |
{\hbox to 0pt{\phantom{$\displaystyle #1$} }\raisebox{0ex}[0pt][0pt]{$\displaystyle\hat{#1}$}} | |
{\hbox to 0pt{\phantom{$\textstyle #1$} }\raisebox{0ex}[0pt][0pt]{$\textstyle\hat{#1}$}} | |
{\hbox to 0pt{\phantom{$\scriptstyle #1$} }\raisebox{0ex}[0pt][0pt]{$\scriptstyle\hat{#1}$}} | |
{\hbox to 0pt{\phantom{$\scriptscriptstyle #1$}}\raisebox{0ex}[0pt][0pt]{$\scriptscriptstyle\hat{#1}$}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
$memo = [1] | |
JUMAN = 100000 | |
def removeZeros(x) | |
while (x % 10 == 0) do | |
x /= 10 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = [-1,3] | |
b = [2,4] | |
min(a, b) = [-1,3] | |
max(a, b) = [2,4] | |
abs(a) = [0,3] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Hoge (a) { | |
this.x = a; | |
} | |
var a = new (function () { return Hoge.apply(this, ["hoge"]); })(); | |
a instanceof Hoge; // => false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
sb = show-branch -a | |
br = branch | |
st = !git status -s && git stash list | cat | |
cfm = !git sb && git br && git st |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ g++ test-interval-transc-error.cpp | |
In file included from /usr/include/boost/numeric/interval.hpp:30:0, | |
from test-interval-transc-error.cpp:2: | |
/usr/include/boost/numeric/interval/transc.hpp: In function ‘boost::numeric::interval<T, Policies> boost::numeric::exp(const boost::numeric::interval<T, Policies>&) [with T = double, Policies = boost::numeric::interval_lib::policies<boost::numeric::interval_lib::rounded_math<double>, boost::numeric::interval_lib::checking_strict<double> >]’: | |
test-interval-transc-error.cpp:12:30: instantiated from here | |
/usr/include/boost/numeric/interval/transc.hpp:34:64: error: ‘boost::numeric::interval_lib::policies<boost::numeric::interval_lib::rounded_math<double>, boost::numeric::interval_lib::checking_strict<double> >::rounding’ has no member named ‘exp_down’ | |
/usr/include/boost/numeric/interval/transc.hpp:34:64: error: ‘boost::numeric::interval_lib::policies<boost::numeric::interval_lib::rounded_math<double>, boost::numeric::interval_lib::checking_strict<double |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo aptitude install wpasupplicant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[connection] | |
id=MY_HOME | |
uuid=***-***-***-***-*** | |
type=802-11-wireless | |
[802-11-wireless] | |
ssid=MY_HOME | |
mode=infrastructure | |
mac-address=**:**:**:**:**:** | |
security=802-11-wireless-security |
NewerOlder