View horizontal-images-same-height.tex
%%%% Preamble >>>
\usepackage{subcaption}
\newlength{\twosubht}
\newsavebox{\twosubbox}
%%%%% <<<
\begin{figure}[htp]
% preliminary
\sbox\twosubbox{%
\resizebox{\dimexpr.99\textwidth-1em}{!}{% {(num of image)-1}em
View wu.nb
(* Sort list of polynomial functions (fs) based on degree of x in ascending order *)
SortByDegree[fs_, x_] := Module[{},
Comp[f1_,f2_] := Exponent[f1,x] < Exponent[f2,x];
Sort[fs,Comp]
];
(* Calculate pseud-remainder *)
Rem[f_, g_, x_] := Module[{q,r,u},
{q,r} = Together[#]&/@PolynomialQuotientRemainder[f,g,x];
u = PolynomialLCM[Denominator[q], Denominator[r]];
View opencv-fourcc-on-mac-os-x.md
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View gist:9616189

Step 0:

MacにHomebrewが入っていない場合はインストールする

Step 1:

highlightをインストールする

brew install highlight
View a3.py
# coding: utf8
import a2
import csv
reader = csv.DictReader(open("evaluation-values.csv"))
leapAvg = 0
leapNum = 0
nonLeapAvg = 0
View a2.py
# coding: utf8
def isLeapYear(x):
return x%4 == 0 and x%100 != 0 or x%400 == 0
View a1.py
# coding: utf8
print [x for x in range(1900, 2201) if x%4 == 0 and x%100 != 0 or x%400 == 0]