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 Generator { | |
| public static void main(String[] args){ | |
| for ( String str : new String[] { "いなむのみたま" }) { | |
| java.util.List<String> array = java.util.Arrays.<String>asList(str.split("")); | |
| java.util.Collections.shuffle(array); | |
| array.stream().forEach(e->java.lang.System.out.printf(e)); | |
| } | |
| } | |
| } |
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 Generator { | |
| public static void main(String[] args){ | |
| for ( String str : new String[] { "いなむのみたま" }) { | |
| java.util.stream.Stream.<java.util.List<String>>of( | |
| java.util.Arrays.<String>asList(str.split("")) | |
| ).peek( | |
| e -> java.util.Collections.shuffle(e) | |
| ).forEach( | |
| e -> e.stream().forEach(t -> java.lang.System.out.printf(t)) | |
| ); |
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 Test { | |
| public static <T> T do_something(java.util.function.Consumer<T> cons, T a){ | |
| cons.andThen(/*ここをモック化したい*/).accept(a); | |
| return a; | |
| } | |
| } |
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.function.Function; | |
| class Interval<T extends Number> implements IntervalExtended | |
| { | |
| private Class<? extends Number> type; | |
| private T lower; | |
| private T upper; | |
| public Interval() {} |
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
| // 宣言 | |
| /* | |
| [Note : 宣言は何回でも書ける | |
| - end note] | |
| */ | |
| class Hoge; | |
| class Hoge; | |
| class Hoge; | |
| void f(); |
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
| int main(){ | |
| int i; | |
| int *p = &i; // セーフ | |
| int a = i; // アウトー | |
| } |
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
| struct S{ | |
| constexpr int x = 1; | |
| }; | |
| int main(){ | |
| int i = S::x + 1; // セーフ | |
| } |
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
| class X; // 不完全型 | |
| void f(X &x){ | |
| &x; // セーフ | |
| reinterpret_cast<X*>(&x); // セーフ | |
| static_cast<X>(x); // アウトー | |
| } |
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
| struct S{ | |
| constexpr int x = 1; | |
| }; | |
| int main(){ | |
| S::x; // discarded-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
| i = 5 || i++ |