comment

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

関連記事

no image

tex で href の色を変更する方法

例で、urlcolor=red と書けば、「link to google」の文字列は赤色(red)になる。 もし urlcolor=blue と書けば、リンクは青色になる。 例 \usepackage …

no image

tex で分数がつぶれないようにする

tex で、複数行を書いたときに分数がつぶれないようにする。 displaystyle を使う。 例 first $\frac{1}{1+\sqrt{x}+\sqrt{y}}$ のかわりに、 seco …

no image

python3 で文字列を区切り文字を指定してリストに変換する方法

split メソッドを使う。 例 str1 = ‘this, is, a, pen’ str2 = str1.split(‘,’) print(str2) 結果 [‘this’, ‘ is’, ‘ a …

no image

python3 でクラスの初期化を __init__ で行う

python でクラスのオブジェクトを生成したとき、__init__ メソッドが呼び出される(コンストラクタ)__init__ の引数には自身(self)を指定することが通例。一方、オブジェクト破棄の …

no image

c++ で文字列(string)の長さを取得する方法

length() で取得する。 例 #include <iostream> #include <string> using namespace std; int main () { str …