Let P and Q be discrete probability distributions with pmfs p and q respectively. Let’s also assume and have a common sample space E. Then the KL divergence between discrete probability distributions and is defined by KL(P,Q)=x∈E∑p(x)ln(q(x)p(x)).
KL(P,Q)≥0 (nonnegative)
KL(P,Q)=0 only if P and Q are the same distribution (definite).
Dynamic transform 예제 시나리오 원하는 작업 DB에 요청하는 모든 쿼리를 출력 작업 순서 Agent 작성 ClassFileTransformer 구현 Agent 작성 Java Agent 구성도 Manifest 파일 Manifest-Version: 1.0 Premain-Class: sample.bci.Agent Agent-Class: sample.bci.Agent Can-Redefine-Classes: True must be end with new line - http://docs.oracle.com/javase/tutorial/deployment/jar/modman.html Agent.java /** * example for bci with java agent */ package sample.bci; import java.lang.instrument.Instrumentation; /** * @author k * */ public class Agent { public static void premain(String args, Instrumentation inst) { inst.addTransformer(new JdbcQueryTransformer()); } public static void agentmain(String args, Instrumentation inst) { inst.addTransformer(new JdbcQueryTransformer()); } } JdbcQueryTransformer. java /** * example for bci with java agent */ package sample.bci; import java.lang.instrument.ClassFileTransformer; import java.lang.instrument.IllegalClassFormatException; impor...
원격 JMX 모니터링 가능하게 하기 정리 설정 파일 수정 관련 파일 $JAVA_HOME/jre/lib/management/management.properties 내용추가 com.sun.management.jmxremote.port=8991 com.sun.management.jmxremote.ssl=false 톰캣 설정 수정 관련 파일 /etc/default/tomcat7 JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC -Dcom.sun.management.jmxremote password 파일 소유자 및 권한 수정 sudo chown tomcat7.tomcat7 /etc/java-7-openjdk/management/jmxremote.password sudo chmod 600 /etc/java-7-openjdk/management/jmxremote.password 원격 JMX 모니터링 시 설정 설정이 필요한 파일 $JAVA_HOME/jre/lib/management/jmxremote.access $JAVA_HOME/jre/lib/management/jmxremote.password 두 파일이 필요하다는데. Ubuntu 14.04 Java Home Directory 에서 JAVA_HOME은 /usr/lib/jvm/default-java임을알아냈다. 물론, /usr/lib/jvm/default-java/jre/lib/management/jmxremote.access와 같은 직접적인 접근도 가능하다. linux의 주 설정파일 들이 모여있는 디렉토리는 /etc이며, 위의 파일 또한 실제로는 /etc/java-7-openjdk/management/jmxremote.access라는 실제 파일에 ...
RecyclerView is new in Android 5.0 (Lollipop) . To use with support library add compile 'com.android.support:recyclerview-v7:21.0.0' in build.gradle file dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:21.0.0' compile 'com.android.support:recyclerview-v7:21.0.0' } and import import android.support.v7.widget.RecyclerView; Get from layout xml RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recycle_list); Plug in LayoutManager recyclerView.setLayoutManager(layoutManager); Create Adapter NameRecyclerAdapter mAdapter; ... mAdapter = new NameRecyclerAdapter(); Plug in Adapter recyclerView.setAdapter(mAdapter); NameRecyclerViewAdapter.java import android.database.Cursor; import android.support.v7.widget.RecyclerView; import android.view.ViewGroup; import android.widget.TextView; /** * * Recycler Adapter for TestDB...
댓글
댓글 쓰기