Skip to content

Instantly share code, notes, and snippets.

t.nemoto.x kuneo

Block or report user

Report or block kuneo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kuneo
kuneo / 0_reuse_code.js
Created Jun 21, 2016
Here are some things you can do with Gists in GistBox.
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
@kuneo
kuneo / import.html
Last active Jun 23, 2016
bootstrap-table getstart
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">
@kuneo
kuneo / hop.html
Created Jun 23, 2016
bootstrap-table hop
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>
@kuneo
kuneo / step.html
Created Jun 23, 2016
bootstrap-table step
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: '名前'
@kuneo
kuneo / table-classes.html
Created Jun 28, 2016
bootstrap-table table[classes]
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>
@kuneo
kuneo / bidimapサンプルコード
Last active Sep 29, 2016
apache commonsのBidiMap(双方向マップ)の使い方
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も取得できる
@kuneo
kuneo / bidimap出力結果
Created Sep 29, 2016
bidimapの出力結果
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>
@kuneo
kuneo / mockito_RepositoryIF
Last active Sep 30, 2016
mockito説明用、試験対象クラス
View mockito_RepositoryIF
public interface LoginRepository {
String findHashPassword(String loginId);
}
@kuneo
kuneo / mockito_試験クラス
Last active Sep 30, 2016
mockito説明用試験クラス
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;
You can’t perform that action at this time.