View 0_reuse_code.js
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
View import.html
<script src="jquery.min.js"></script> | |
<script src="bootstrap.min.js"></script> | |
<script src="bootstrap-table.min.js"></script> | |
<link rel="stylesheet" href="bootstrap.min.css"> | |
<link rel="stylesheet" href="bootstrap-table.min.css"> |
View hop.html
<table data-toggle="table" data-url="http://kuneo.org/sandbox/bootstrap-table/json/getstart.json"> | |
<thead> | |
<tr> | |
<th data-field="id">ID</th> | |
<th data-field="name">名前</th> | |
<th data-field="price">価格</th> | |
</tr> | |
</thead> | |
</table> |
View step.html
<table id="table"></table> | |
<script> | |
$('#table').bootstrapTable({ | |
url: 'http://kuneo.org/sandbox/bootstrap-table/json/getstart.json', | |
columns: [{ | |
field: 'id', | |
title: 'ID' | |
}, { | |
field: 'name', | |
title: '名前' |
View table-classes.html
<table data-toggle="table" data-url="http://kuneo.org/sandbox/bootstrap-table/json/getstart.json" data-classes="table table-hover table-no-bordered"> | |
<thead> | |
<tr> | |
<th data-field="id">ID</th> | |
<th data-field="name">名前</th> | |
<th data-field="price">価格</th> | |
</tr> | |
</thead> | |
</table> |
View bidimapサンプルコード
// 通常のマップを生成 | |
Map<String, Integer> map = new HashMap<>(); | |
map.put("suzuki", 1); | |
map.put("tanaka", 2); | |
// 生成した通常のマップを双方向マップに挿入 | |
BidiMap<String, Integer> bidiMap = new DualHashBidiMap<>(map); | |
// getKey()でvalueからkeyを取得できる | |
System.out.println(bidiMap.getKey(1)); | |
// 当然、get()でkeyからvalueも取得できる |
View bidimap出力結果
suzuki | |
1 | |
--- 拡張for文を回してみる --- | |
key:suzuki | |
value:1 | |
key:sato | |
value:3 | |
key:yamada | |
value:2 |
View bidimapバージョン
<dependency> | |
<groupId>org.apache.commons</groupId> | |
<artifactId>commons-collections4</artifactId> | |
<version>4.1</version> | |
</dependency> |
View mockito_RepositoryIF
public interface LoginRepository { | |
String findHashPassword(String loginId); | |
} |
View mockito_試験クラス
package kuneo.org.sample.mockito; | |
import static org.hamcrest.CoreMatchers.is; | |
import static org.junit.Assert.assertThat; | |
import static org.mockito.Matchers.anyString; | |
import static org.mockito.Mockito.mock; | |
import static org.mockito.Mockito.when; | |
import javax.naming.AuthenticationException; |
OlderNewer