This file contains hidden or 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
import java.util.*; | |
public class R { | |
public static void main(String[] args) { | |
List<String> x = new ArrayList<>(); | |
System.out.printf("x: %s\n", x); // "x: []" | |
add(x); | |
System.out.printf("x: %s\n", x); // "x: ["xxx"]" | |
} |
This file contains hidden or 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
:%s/> *<\([^/]\)/>^M<\1/g | filetype indent on | setf xml | set et | set sw=4 | normal gg=G |
This file contains hidden or 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
#!/bin/bash | |
for f in *.mp3; do mv "${f}" $(echo ${f} | awk '{print $1 ".mp3"}'); done |
This file contains hidden or 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
public class VarAnonymousClass{ | |
public static void main (String[] args) { | |
var obj = new Object(){ | |
int value() { | |
return 1; | |
} | |
}; | |
System.out.println(obj.value()); | |
} |
This file contains hidden or 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
curl <kifu-url> | grep receiveMove | sed -E 's/( +receiveMove\("|[A-Z_]+"\);|,L[0-9]+)//g' | sed 's/^/PI\t+\t/' | sed 's/\t/\n/g' > [output-file] |
This file contains hidden or 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
import java.util.Optional; | |
public class Java9OptionalTrial { | |
public static void main(String[] args) { | |
new Java9OptionalTrial().ifPresentTrial(); | |
} | |
public void ifPresentTrial() { | |
present().ifPresentOrElse( |