Visual Studio Code において、比較(compare)を開いて、差分(diff)にジャンプする方法。
1. コマンドパレットを開く
2. 比較を開く
compare …
3.1. 次の差分行にジャンプする。
- Windows : Alt + F5
- MacOS : Opt + F5
3.2. 前の差分行にジャンプする。
- Windows : Alt + Shift + F5
- MacOS : Opt + Shift + F5
Visual Studio Code において、比較(compare)を開いて、差分(diff)にジャンプする方法。
compare …
gitでリモートリポジトリにアクセスする(pullやpushをする)と次のようなワーニングメッセージが表示される。
1 2 3 4 5 6 7 |
warning: git-credential-manager-core was renamed to git-credential-manager warning: see https://aka.ms/gcm/rename for more information warning: git-credential-manager-core was renamed to git-credential-manager warning: see https://aka.ms/gcm/rename for more information From https://example.com/example.git * branch master -> FETCH_HEAD Already up to date. |
Language Server Protocol
1 2 3 4 5 6 7 8 9 10 11 12 |
* text=auto *.c text eol=crlf *.h text eol=crlf *.s text eol=crlf *.S text eol=crlf *.asm text eol=crlf *.cpp text eol=crlf *.hpp text eol=crlf *.csv text eol=crlf *.py text eol=crlf *.xls binary *.xlsm binary |
C言語の標準ライブラリ関数 setjmp() と longjmp() を呼び出すことで多段の関数呼出階層を飛び越えるジャンプ(いわゆるGOTO処理)を実現できます。しかしながら、現代的なプログラミングでは GOTO文 が忌避されるように、setjmp() と longjmp() を使ったジャンプは推奨されません。やむを得ず setjmp() と longjmp() で実装された既存のソースコードを理解するための助けとなることを目論んだ解説です。
2010年代前半、プログラミング用の等幅フォントというと VLゴシック か Ricty くらいしか見当たりませんでした。いずれも半角の幅が全角の幅の半分であったため「等幅フォント」を選べば間違いありませんでした。しかし近年は日本語(漢字やカナ)を含むさまざまなプログラミングフォントが登場し、フォントの選択によっては空白文字やタブ文字で揃えた列の位置がずれる現象を引き起こすことがあるため、原因と対策をまとめました。
フォントは大きく分けて『等幅フォント(固定幅フォント)』と『プロポーショナルフォント(可変幅フォント)』の2種類が存在します。
C言語の多次元配列へのポインタの説明とサンプルコードです。
最初は導入です。C言語の入門書にも登場する配列とポインタの関係を説明します。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
#include <stdio.h> #define NUMBER_OF_COLUMNS 4 int main(void) { int linear_array_x[NUMBER_OF_COLUMNS] = { 1, 2, 3, 4}; int linear_array_y[NUMBER_OF_COLUMNS] = { 11, 12, 13, 14}; int *top_of_columns; top_of_columns = linear_array_x; printf("top_of_columns[1] = %d\n", top_of_columns[1]); /* 2 */ printf("top_of_columns[3] = %d\n", top_of_columns[3]); /* 4 */ top_of_columns = linear_array_y; printf("top_of_columns[1] = %d\n", top_of_columns[1]); /* 12 */ printf("top_of_columns[3] = %d\n", top_of_columns[3]); /* 14 */ return 0; } |
もっともシンプルな例です。整数型の1次元配列を定義して、配列の先頭要素へのアドレスをポインタ変数 int *top_of_columns
に代入しています。「ポインタ top_of_columns は一次元配列の先頭要素を指している」ということを明確にするために、2つの一次元配列を用意して、途中で指している一次元配列を書き換えています。
1 |
$_ |
1 2 3 |
$ mkdir foo_directory $ cd $_ # cd for_directory に展開 |
1 2 3 |
$ cp -r foo_dir bar_dir $ cd $_ # cd bar_dir に展開 |