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
import static org.junit.Assert.assertEquals; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.Set; | |
import org.junit.Test; |
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
import static org.junit.Assert.assertEquals; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.junit.Test; | |
class Register { | |
int power; |
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
import static org.junit.Assert.assertEquals; | |
import java.math.BigInteger; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.junit.Test; | |
/** | |
* Question: http://nabetani.sakura.ne.jp/hena/ord17scheherazade/ |
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
import static org.junit.Assert.assertEquals; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import org.junit.Test; | |
/*** | |
* Question: http://nabetani.sakura.ne.jp/hena/ord16boseg/ -- this answer is a |
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
blockdiag { | |
default_fontsize = 14; | |
allocation [color = "#ff0000"]; | |
generation, heap, iterator, memRegion, resourceArea, space, watermark [color = "#ff9900"]; | |
// include generation | |
generationSpec, compactPermGen, genCollectedHeap, "generation.inline", "genOopClosures.inline", permGen, sharedHeap, tenuredGeneration [color = "#ffff00"]; | |
// include iterator | |
genOopClosures, permGen [color = "#ffff00"]; | |
// include memRegion |
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
blockdiag { | |
default_fontsize = 14; | |
ResourceObj -> AllocatedObj; | |
AllocStats, ReallocMark -> StackObj; | |
Chunk, Arena -> CHeapObj; | |
SharedHeap [color = "#FFFFFF"]; | |
GenClosure -> StackObj; | |
GenCollectedHeap -> SharedHeap -> CollectedHeap -> CHeapObj; |
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
blockdiag { | |
default_fontsize = 14; | |
AllStatic [color = "#FF9999"]; | |
Universe -> AllStatic; | |
oopFactory -> AllStatic; | |
GenMarkSweep -> MarkSweep -> AllStatic; | |
HeapInspection -> AllStatic; | |
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
import static org.junit.Assert.assertEquals; | |
import static org.junit.Assert.assertTrue; | |
import java.util.Arrays; | |
import org.junit.Test; | |
enum Rune { | |
U(3, new char[] { '1', '0', '1' }, new char[] { '1', '1', '1' }), N(3, | |
new char[] { '1', '1', '1' }, new char[] { '1', '0', '1' }), S(3, |
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
import java.util.ArrayList; | |
import java.util.EnumSet; | |
import java.util.List; | |
enum Arm { | |
a, c, e, g, i, k; | |
} | |
enum Monster { | |
B(Arm.a, Arm.c), D(Arm.c, Arm.e), F(Arm.e, Arm.g), H(Arm.g, Arm.i), J( |
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
import java.util.ArrayList; | |
import java.util.List; | |
enum Direction { | |
E { | |
@Override | |
Dice go(Dice d) { | |
return d.goEast(); | |
} | |
}, |