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.*; | |
import org.junit.Test; | |
import org.springframework.util.ClassUtils; | |
public class GetAllInterfacesTest { | |
@Test | |
public void getInterfaceTest() throws Exception { | |
Class<?>[] interfaces = new ConcreteClass1().getClass().getInterfaces(); | |
assertEquals(0, interfaces.length); |
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
<div id="fb-root"></div> | |
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script> | |
<h1>きょうのうらない</h1> | |
<div id="account-info"></div> | |
<p id="result_button" style="display: none;"><button onclick="javascript:show_result()">うらなってみる</button></p> | |
<p id="result_area"></p> | |
<p id="post_button" style="display: none;"><button onclick="javascript:post_result('result_area')">ウォールに投稿する</button></p> | |
<script type="text/javascript"> |
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
#!/bin/sh | |
for file in `find $1 -name "*.dat"`;do | |
echo "move: $file" | |
mv $file $1 | |
done |
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
package com.kamatama41.sandbox4j; | |
import org.junit.Test; | |
public class OrverrideConstructorTest { | |
@Test(expected=NullPointerException.class) | |
public void test_Aの初期化時にBのsomeMethodが呼ばれてぬるぽ発生() throws Exception { | |
new OrverrideConstructorTest().new B(); | |
} |
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
package com.kamatama41.sandbox4j; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collection; | |
import java.util.HashSet; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.Set; |
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
package com.kamatama41.sandbox4j; | |
import static org.hamcrest.CoreMatchers.is; | |
import static org.junit.Assert.assertThat; | |
import org.junit.Test; | |
public class DangerousCopyTest { | |
@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
package com.kamatama41.sandbox4j; | |
import static org.hamcrest.CoreMatchers.is; | |
import static org.junit.Assert.*; | |
import org.junit.Test; | |
public class SafetyCopyTest { |
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
package com.kamatama41.sandbox4j; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Iterator; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.Random; | |
public class ArrayListCompareToLinkedList { |
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
package com.kamatama41.sandbox4j; | |
import static org.hamcrest.CoreMatchers.is; | |
import static org.junit.Assert.*; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; |
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
package com.kamatama41.sandbox4j; | |
import java.io.ByteArrayInputStream; | |
import java.io.DataInputStream; | |
import java.io.IOException; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.Collection; | |
import java.util.HashMap; | |
import java.util.Map; |