comment

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

関連記事

no image

c++ で文字列を「区切り文字」を使って分ける方法

string の find を使って、区切り文字の場所を取得し、その位置で区切る。 例 #include <iostream> #include <string> using namesp …

no image

tex で行に色をつける方法

xcolor パッケージを使っておく。rowcolor で指定する。 例 \usepackage[table]{xcolor} \begin{document} \begin{table} \begi …

no image

tex でダガー記号を入力する方法

ダガー記号には、$\dagger$ を使う。上付きにしたい場合には、$^$ と組み合わせる。 例 $A^{\dagger}$ 結果

no image

tex でブロック行列を入力する方法

ゼロの成分が多いブロック行列を tex で出力する。 \usepackage{amsmath} を使う。 例 \usepackage{amsmath} \begin{document} $$ \lef …

no image

python3 で、指定した文字が最後に現れる場所を取得する

rfind を使うと、指定した文字が最後に現れる場所(インデックス)を取得することができる。 例 str1 = “12345abab” result = str1.rfind(“ab”) print( …