Javaっぽく取得する
データバインディングというらしい?
1 | |
Kotlinっぽく取得する(Kotlin Android Extensions使用)
Kotlin Android Extensions
Kotlinが公式で提供している、Androidアプリ開発をサポートしてくれる拡張機能
https://archive-blog.yagi2.dev/2017/10/18/good-bye-findviewbyid.html
1 | |
データバインディングというらしい?
1 | |
Kotlinが公式で提供している、Androidアプリ開発をサポートしてくれる拡張機能
https://archive-blog.yagi2.dev/2017/10/18/good-bye-findviewbyid.html
1 | |
sudo dpkg-reconfigure keyboard-configurationを入力 1 | |
Debianパッケージがdebconfを採用している場合に、パッケージの再設定をすることができるコマンドdebconfに対応しているリストはls /var/lib/dpkg/info/*.configでみることができるGeneric 105-key (Intl)PCを選択
Japaneseを選択
Japaneseを選択
/etc/default/keyboardの設定を書き換えている場合表示される
Yesを選択、初期化していい場合はNoを選択
「The default for the keyboard layout」を選択
「No compose key」を選択するとコンソール画面に戻る
コンソール画面が表示され必要んな情報を生成してくれるので少し待つ(ネットワークが必要?)
1 | |
/etc/default/keyboardのXKBOPTIONSに以下を書き加える
デフォルト
1 | |
書き換え後
1 | |
□が現在カーソルのある位置| コマンド | 動作解説 | 動作前 | 動作後 |
|---|---|---|---|
| Ctrl + a | 行の先頭にカーソルを移動 | cd ~/Deskctop□/test/ | □cd ~/Deskctop/test/ |
| Ctrl + e | 行の末にカーソルを移動 | cd ~/Deskctop□/test/ | cd ~/Deskctop/test/□ |
| Ctrl + k | カーソルの右側を全て消去 | cd ~/Deskctop□/test/ | cd ~/Deskctop□ |
| Ctrl + h | カーソルの左側にある文字を消去 | cd ~/Deskctop□/test/ | cd ~/Deskcto□/test/ |
| Ctrl + d | カーソルの右側にある文字を消去 | cd ~/Deskctop□/test/ | cd ~/Deskctop□test/ |
| Ctrl + u | コマンドラインの文字を全て消去 | cd ~/Deskctop□/test/ | |
| Ctrl + y | Ctrl + kで消去した文字列を貼り付け |
矢印キーの上下(↑,↓)で一つ前のコマンド、一つ後のコマンドを呼び出せる。
履歴を見たい場合は、historyコマンドでみることのできる
1 | |
行番号を指定して実行する
!履歴番号1 | |
Code -> Preferences -> Settingsの順でSettings画面を開く
- `Cmd + ,(カンマ)`でも開ける

検索欄から、「autoGuessEncoding」を検索

再度ファイルを開き直せば、文字化けが解消されているはず
1 | |
${ZDOTDIR:-$HOME}とは?$ZDOTDIR : .zshrcの保存場所を設定する環境変数$HOME : ホームディレクトリ:- : 左辺の値が設定されていor空文字列であれば、右辺に設定されてる値が使用される1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
prompt -sだと、そのセッションではテーマが変更されるが、再起動ログインし直すとデフォルトのテーマになってしまうので、設定~/.zshrcに追記しておく必要がある1
2
3
4
5
6
7$ prompt -s powerline
Set and save not yet implemented. Please ensure your ~/.zshrc
contains something similar to the following:
autoload -Uz promptinit
promptinit
prompt powerline
1 | |
install.shを叩く
1 | |
使用しているターミナルでフォントを設定
Powerlineが入っていれば使えるはず1 | |
1 | |
| コマンド | 説明 | 参考 | ||
|---|---|---|---|---|
| —version | バージョン確認 | |||
| —help | 概要と最も一般的に使用されるコマンドのリストを出力 | |||
| -C |
カレントディレクトリではなくGit実行する |
|||
| -c |
設定ファイルの |
|||
| —exec-path[= |
Gitのコアファイルのパスを出力する。パスを設定することもできる。 | |||
| —html-path | ドキュメントファイルの補完されているパスを出力する | |||
| —man-path | Gitのmanファイルが格納されているパスを出力する | |||
| —info-path | Gitのドキュメントを文書かしたファイルがあるパスを出力する(私の環境ではパスは表示されたが、パスが存在しなかった) | |||
| -P \ | —paginate | ページャーに出力をパイプする | ||
| -p \ | —no-paginate | ページャーに出力をパイプしないようにする | ||
| —no-replace-objects | Gitオブジェクトを置換しない | https://git-scm.com/docs/git-replace | ||
| —bare | ベアリポジトリとして扱う | https://qiita.com/devzooiiooz/items/56a02342d9d65d79f6c3 https://cpplover.blogspot.com/2015/04/git10linus-torvals.html |
||
| —git-dir= |
リポジトリへのパスを設定する(環境変数 GIT_DIR を設定するのと同じ) | |||
| —work-tree= |
作業ツリーへのパスを設定する(環境変数 GIT_WORK_TREE や設定変数 core.worktree を設定するのと同じ) | |||
| —namespace= |
Gitの名前空間を設定する(環境変数 git_namespace を設定するのと同じ) |
ls-filesコマンドの-cオプションを使用する
ls-filesはデフォルトで-cオプションがついている
-c, —cached
Show cached files in the output (default)
1 | |
ls-filesコマンドの-oオプションを使用する
-o, —others
Show other (i.e. untracked) files in the output
1 | |
余白background-colorを設定している場合、色の領域は広がらないmargin-bottom:20pxとmargin-top:30pxが上下に並んでいる場合、2つの要素の距離は2つの値を足した50pxにはならず、重なった部分のマージンは重なったままになるので、結果は30pxのマージンが取られた状態になる上下左右のマージンが同じだけ設定される1 | |
上下、左右のマージンが別々に設定される1 | |
上、左右、下のマージンが別々に設定される1 | |
1 | |
background-colorを設定している場合、色の領域も広がる-width属性はpaddingのピクセル数に対する値ではなく、画面に対する値を設定している
- なので、`padding`を広げても文字は広く表示されない
上下左右のパディングが同じだけ設定される1 | |
上下、左右のパディングが別々に設定される1 | |
上、左右、下のパディングが別々に設定される1 | |
1 | |
線の太さ、線の色、線の種類を設定する1 | |
各要素を別々にかつ、上下左右を変えて設定できる
設定方法が細かくあるので、参考リンクだけを紹介する
1 | |
1 | |
1 | |
まとめると1
2
3
4.test{
position: relative;
top: 200px;
}
コード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
46
47
48
49<!DOCTYPE html>
<html>
<head>
<title>position</title>
<style type="text/css">
.first-section{
background: lightgreen;
width: 100px;
height: 100px;
position:relative;
left:200px;
top:200px;
}
.second-section{
background: pink;
width: 100px;
height: 100px;
position:absolute;
left:200px;
top:200px;
}
.third-section{
background: red;
width: 100px;
height: 100px;
position:fixed;
left:400px;
top:400px;
}
</style>
</head>
<body>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<div class="first-section">
<p>1</p>
</div>
<div class="second-section">
<p>2</p>
</div>
<div class="third-section">
<p>3</p>
</div>
</body>
</html>

z-index属性を使って指定する
- 大きい値を設定したスタイルを適応した要素が上に描画される
1 | |
opacity属性を使って0~1までの間で指定する1 | |
|(パイプ)+pbcopy
pbとはpast boardの略1 | |
1 | |
zshには、aliasでpbcが設定されているらしく、こっちの方が短くかける
pbcopyと同じ1 | |