- Delete Line
- Ctrl + a and Ctrl + k
- Ctrl + s + BackSpace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maven | |
target/ | |
!.mvn/wrapper/maven-wrapper.jar | |
# IntelliJ | |
.idea | |
*.iws | |
*.iml | |
*.ipr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stream<String> stream = | |
Arrays.asList("a", "b", "c").stream() | |
.filter(s -> !s.equals("a")); | |
System.out.println(stream.collect(Collectors.toList())) | |
// ココでエラーになる | |
// java.lang.IllegalStateException: stream has already been operated upon or closed | |
System.out.println(stream.collect(Collectors.toList())); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------- 入力受ける系 | |
// 数値 | |
val N = readLine()?.toInt() ?: 0 | |
// スペース区切り | |
val steps = readLine()!!.split(" ").map(String::toInt) | |
// 連続受け取り kotlin 1.3〜 | |
val inputs = List(N) { readLine()!!.split(" ").map(String::toInt) } | |
// 連続受け取り kotlin ~1.0 | |
val list: ArrayList<List<Int>> = arrayListOf() | |
for (n in 0 until N) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StreamPlactice { | |
public static void main(String[] args) { | |
List<Bean> list = Arrays.asList( | |
new Bean(1, "a"), | |
new Bean(2, "b"), | |
new Bean(3, "c"), | |
new Bean(1, "aa"), | |
new Bean(1, "aaa"), | |
new Bean(2, "bb") | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run \ | |
-e MYSQL_ROOT_PASSWORD=password \ | |
-e MYSQL_USER=test \ | |
-e MYSQL_PASSWORD=password \ | |
-e MYSQL_DATABASE=test \ | |
-e TZ=Asia/Tokyo \ | |
-p 3306:3306 \ | |
--name mysql_db \ | |
-d mysql:5.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input id="date-form" type="date" min="2019-04-01" max="2030-03-31"> | |
<script> | |
(function() { | |
var dateForm = document.querySelector('#date-form'); | |
var today = new Date(); | |
var month = ('0' + (today.getMonth() + 1)).slice(-2); | |
var day = ('0' + today.getDate()).slice(-2); | |
// set today as default value | |
dateForm.value = `${today.getFullYear()}-${month}-${day}` | |
}()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="[vue js training template]"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
.v-enter-active, .v-leave-active { | |
transition: opacity 1s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- String | |
-- convert int into String | |
String.fromInt 1 | |
-- "1" : String | |
-- create String from List | |
String.join "," ["a", "b", "c"] | |
-- "a,b,c" : String | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## -------------- syntax | |
l = ['a', 'b'] | |
l[0], l[1] = l[1], l[0] | |
print(l) | |
# ['b', 'a'] | |
0 <= 1 <=1 | |
# True | |
0 <= 4 <=3 | |
# False |
NewerOlder