Archive

Archive for January, 2011

Two NetBeans Keyboard Shortcuts That Will Change Your Life (Forever)

January 28, 2011 1 comment

ctrl + ;
ctrl + shift + ;

That’s all.

Detail – Two NetBeans Keyboard Shortcuts That Will Change Your Life (Forever)

try also “shift + enter”.

Categories: JAVA, Tip Tags: , ,

Double integration between Chrome and Delicious

January 26, 2011 Leave a comment

Right click on the address bar and select edit search engines. Click on add to create a new engine and add the following values, obviously replacing USERNAME with your Delicious username.

Click on ok and you’re done!

http://blog.andreaolivato.net/open-source/double-integration-between-chrome-and-delicious.html

Categories: Tip Tags: , ,

TestNG – Test Class Life cycle

January 26, 2011 1 comment

 

TestNG를 사용하면 테스트 메소드 외의 것들을 지정할 수 있다; @Configuration어노테이션을 사용하여 클래스 안에 설정 메소드라고 하는 특정 메소드를 지정할 수 있다. 다음은 네 가지 유형의 설정 메소드들이다:

  • beforeTestClass 메소드 : 테스트 메소드가 실행되기 전, 클래스가 인스턴스로 된 후에 실행된다.
  • afterTestClass 메소드 : 클래스의 모든 테스트 메소드가 실행된 후 이 메소드가 실행된다.
  • beforeTestMethod 메소드 : 클래스의 모든 테스트 메소드가 실행되기 전에 이 메소드가 실행된다.
  • afterTestMethod 메소드 : 클래스의 모든 테스트 메소드들이 실행된 후 이 메소드가 실행된다.

그림 2는 테스트 클래스의 수명주기 이다.

 
그림 2. 테스트 클래스 수명주기

Lifecycle of a test class

발취 : http://www.ibm.com/developerworks/kr/library/j-testng/

 

Categories: JAVA Tags: , ,

Make it work and then make it fast.

January 26, 2011 Leave a comment
Categories: JAVA, Memo

RTSP URI scheme for DVB services in a MPEG-2 TS delivered over IP sessions controlled by RTSP

January 19, 2011 Leave a comment

A.2
RTSP URI scheme for DVB services in a MPEG-2TS delivered over IP sessions controlled by RTSP


The RTSP URI as defined in RFC2326 [12] is extended in order to reference specific components (e.g. services,program events) in a MPEG-2 transport stream delivered over IP and controlled by RTSP [12].
The URI scheme is defined as follows:

rtsp_URL  =   ( "rtsp:" | "rtspu:" )
                 "//" host [ ":" port ] [ abs_path ]
   host      =   <A legal Internet host domain name of IP address
                 (in dotted decimal form), as defined by Section 2.1

 

Protocol suite: TCP/IP.
Protocol type: Application layer protocol.
Port: 554 (TCP, UDP).
URI: rtsp:
SNMP MIBs:
Working groups: mmusic, Multiparty Multimedia Session Control.
Links:

RFC 2326:

 

https://docs.google.com/viewer?url=http://www.dvb.org/technology/standards/a106_BCG-over-IP_dTS_102539v010301.pdf&pli=1

http://www.networksorcery.com/enp/protocol/rtsp.htm

 

Categories: IPTV Tags: , ,

Get DvbLocator(DVB Locator) from XletContext(Xlet context)

January 19, 2011 Leave a comment

ServiceContext sc = ServiceContextFactory.getInstance().getServiceContext(xletcontext);
Service current=sc.getService();
System.out.println("Service: "+ current.toString());
DvbLocator locator = (DvbLocator) sc.getService().getLocator();
Categories: IPTV Tags: , ,

IBM UltraNav SK-8840(IBM keyboard 89P8500) Driver

January 18, 2011 Leave a comment
Categories: ETC, Memo Tags: , , ,

LG 엑스캔버스 하드 디스크 교체 Tip

January 18, 2011 Leave a comment
Categories: ETC, Memo Tags: , ,

Singleton pattern

January 13, 2011 Leave a comment

The solution of Bill Pugh
University of Maryland Computer Science researcher Bill Pugh has written about the code issues underlying the Singleton pattern when implemented in Java.[8] Pugh’s efforts on the “Double-checked locking” idiom led to changes in the Java memory model in Java 5 and to what is generally regarded as the standard method to implement Singletons in Java. The technique known as the initialization on demand holder idiom, is as lazy as possible, and works in all known versions of Java. It takes advantage of language guarantees about class initialization, and will therefore work correctly in all Java-compliant compilers and virtual machines.

The nested class is referenced no earlier (and therefore loaded no earlier by the class loader) than the moment that getInstance() is called. Thus, this solution is thread-safe without requiring special language constructs (i.e. volatile or synchronized).

public class Singleton {
 
   // Private constructor prevents instantiation from other classes
   // (외부에서 인스턴스 생성을 막기 위함)
   private Singleton() {
      super();
   }
 
   /**
    * SingletonHolder is loaded on the first execution of Singleton.getInstance() 
    * or the first access to SingletonHolder.INSTANCE, not before.
    */
   private static class SingletonHolder { 
     public static final Singleton INSTANCE = new Singleton();
   }
 
   public static Singleton getInstance() {
     return SingletonHolder.INSTANCE;
   }
 
 }

참고: Wikipedia Link

Categories: JAVA

jni for android with ndk

January 13, 2011 Leave a comment

android 에서 native application 을 이용하기 위해서는 다음과 같은 과정을 거치면 된다.

링크

Categories: Android
Design a site like this with WordPress.com
Get started