comment

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

関連記事

no image

std::map の内容が空かどうか判定する方法

map の中身が空であるかどうかには、empty() を使う。 map の要素を消去するには、erase を使う。 例 #include <iostream> #include <map> …

no image

matplotlib で、y軸に二種類の軸を設定する方法

y軸に、2種類のグラフを異なるスケールでプロットする。 matplotlib axes の twinx() を使う。 https://matplotlib.org/stable/api/_as_gen …

no image

tex で打ち消し線を入力する方法

次のように入力すればよい。打ち消し線は、英語で strikethrough と呼ぶ。 例 \usepackage[normalem]{ulem} \begin{document} Good \sout …

no image

tex で かけ算の中点を入力する方法

かけ算に使うような中点を入力するには、 $cdot$ を使う。 例 $a = b \cdot c$ 結果

no image

python の __str__ と __repr__ とは

python でクラスの情報を文字列で表示するとき、__str__ メソッドと __repr__ メソッドが使える。__str__ は、プログラマーとは限らないユーザーに「読める形で情報を表示」するこ …