일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- leadership
- Software Engineering
- ubuntu
- hbase
- RFID
- Linux
- MySQL
- essay
- Programming
- Malaysia
- program
- management
- psychology
- django
- Book
- Java
- programming_book
- erlang
- Kuala Lumpur
- Book review
- agile
- comic agile
- history
- Spain
- Italy
- France
- web
- Python
- hadoop
- QT
- Today
- Total
목록JH & HJ (839)
import it.unimi.dsi.fastutil.doubles.Double2IntOpenHashMap; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.math.BigDecimal; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator..
Max Brenner http://www.maxbrenner.com/ Grey Dog http://thegreydog.com/ High line http://www.thehighline.org/ Chelsea
//http://stackoverflow.com/questions/744226/java-reflection-how-to-get-the-name-of-a-variable import java.lang.reflect.Field; public class TestReflect { public int i = 5; public Integer test = 5; public String omghi = "der"; public static String testStatic = "THIS IS STATIC"; public static void main(String[] args) throws IllegalArgumentException, IllegalAccessException { TestReflect t = new Test..
public class TestDebugMode { //http://stackoverflow.com/questions/1109019/determine-if-a-java-application-is-in-debug-mode-in-eclipse //public static void main(String[] args) //{ //System.out.println(System.getProperty("java.vm.info", "")); //} //http://www.rgagnon.com/javadetails/java-detect-if-running-in-debug-mode.html public static void main(String args[]) { boolean isDebug = java.lang.manag..
http://whiteship.me/?p=12338 //TestCategoryInterface.java interface FastTests { /* category marker */ } interface SlowTests { /* category marker */ } //TestCategoryA.java import static org.junit.Assert.fail; import org.junit.Test; import org.junit.experimental.categories.Category; public class TestCategoryA { @Test public void a() { fail(); } @Category(SlowTests.class) @Test public void b() { } ..
//http://cafe.naver.com/javacircle/10682 import java.net.InetAddress; public class TestInetAddress { public static void main(final String[] args) throws Exception { //Get by host name InetAddressjavalobby=InetAddress.getByName("javalobby.org"); //Get by IP as host name InetAddressbyIpAsName=InetAddress.getByName("64.69.35.190"); //Get by IP as highest-order byte array InetAddressbyIp=InetAddress..
import java.net.InetAddress; import java.net.UnknownHostException; class GetHostName { public static void main(final String[] args) { //http://www.devx.com/tips/Tip/13284: try { java.net.InetAddress localMachine = java.net.InetAddress.getLocalHost(); System.out.println("Hostname of local machine: " + localMachine.getHostName()); } catch (java.net.UnknownHostException uhe) { // [beware typo in co..
JUnit test method에서 caller가 main인 경우에는 swing 화면을 출력, JUnit test인 경우에는 출력하지 않도록 하는데 사용했음 class TestStackTrace { static class TestInnerStackTrace { //http://blog.naver.com/clean820818/10086133151 public static void method() { //print current class method StackTraceElement[]stacks=new Throwable().getStackTrace(); StackTraceElementcurrentStack=stacks[0]; System.out.println( "my class : " + currentSt..
// http://kentbeck.github.com/junit/javadoc/latest/index.html?org/junit/runners/Parameterized.html @RunWith(Parameterized.class) public class FibonacciTest { @Parameters public static List>Object[]< data() { return Arrays.asList(new Object[][] { Fibonacci, { { 0, 0 }, { 1, 1 }, { 2, 1 }, { 3, 2 }, { 4, 3 }, { 5, 5 }, { 6, 8 } } }); } private int fInput; private int fExpected; public FibonacciTes..
C의 #ifdef를 java에서 흉내내는 방법 http://cafe.naver.com/javacircle/43981 http://www.experts-exchange.com/Programming/Languages/Java/Q_11152787.html public static final boolean DEBUG = true; if(DEBUG) { System.out.println("Debugging on"); } is functionally equivalent to #define DEBUG 1 #if DEBUG cout