Git LFS (Large File Strage) で管理したファイルのチェックアウトを試みると下記のようなエラーとなる
|
1 |
Encountered 2 file(s) that should have been pointers, but weren't: |
Git LFS (Large File Strage) で管理したファイルのチェックアウトを試みると下記のようなエラーとなる
|
1 |
Encountered 2 file(s) that should have been pointers, but weren't: |
"windows.h" は、16bit版 Windowsのヘッダファイルを多数インクルードしている。WIN32_LEAN_AND_MEAN を define することで、32bitアプリには不要なヘッダファイルのインクルードを抑止してコンパイル時間を短縮できる。
表計算ソフト(LibreOffice Calc)を使って、SNSなどで使うアイコンをつくってみました。
派生クラスで override することができるのは、基底クラスで virtual をつけたメンバー関数(=仮想関数)だけです。しかし、もし virtualをつけていない(つけるのを忘れた)メンバー関数(=非仮想関数)を派生クラスで override しようと試みると何が起こるでしょうか?
続きを読む
git add の結果を取り消す方法
|
1 |
$ git reset HEAD mistake.txt |
補足 : ステージングの情報をリセットするだけ。ワーキングやコミットには影響しない。
下記のようなコマンドを実行すれば、コミットもワーキングもリセットする(コミット前に戻す)ことになる。
|
1 |
$ git reset --hard HEAD^ |
git remote add コマンドを実行するとエラーとなる。
|
1 2 |
$ git remote add origin https://JaneDoe@dev.azure.com/JaneDoe/MyRepository/_git/MyRepository fatal: remote origin already exists. |
Windows形式の改行コード (CR+LF) の表示 ^M を抑止する方法
下記の例のように行末の ^M が目障りである。
|
1 2 |
-// Created on: 2019/01/26 9:22:59 +// Created on: 2019/01/26 10:04:07^M |
^M == CR == 0x0A
|
1 |
$ git config --local core.whitespace cr-at-eol |
|
1 |
$ git config --local --unset core.whitespace |
robocar store から購入したSD cardにインストールされているOSイメージ
d2.localpiasdfasdf|
1 |
$ ssh pi@d2.local |
|
1 2 3 4 5 6 |
$ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 8.0 (jessie) Release: 8.0 Codename: jessie |
プログラミング言語 C++ における演算子オーバーロードの糖衣構文的な解釈と、フレンド関数による解決
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
#include <iostream> using namespace std; class coord { int x, y; public: coord() : x(0), y(0) {} coord(int i, int j) : x(i), y(j) {} void show() { cout << "x = " << x << ", y = " << y << endl; } coord operator+(coord position); coord add(coord position); }; coord coord::operator+(coord position) { coord temp; temp.x = this->x + position.x; temp.y = this->y + position.y; return temp; } coord coord::add(coord position) { coord temp; temp.x = this->x + position.x; temp.y = this->y + position.y; return temp; } int main() { coord position_a(10, 10), position_b(5, 3); coord position_m = position_a + position_b; position_m.show(); // => x = 15, y = 13 coord position_n = position_a.add(position_b); position_n.show(); // => x = 15, y = 13 return 0; } |
※ 説明をシンプルにするために参照渡しやconst修飾は省略しています。