subtle ggplot2 techniques

  1. His­tograms (geom_his­togram) dis­play the count with bars;
    fre­quen­cy poly­gons (geom_fre­qpoly), dis­play the counts with lines.
  2. how to remove extra base line in ggplot2-den­si­ty plots? (https://groups.google.com/forum/#!topic/ggplot2/I3fXMH8foEs) ggplot(a,aes(x=V1))+geom_density() = ggplot(a,aes(x=V1))+geom_line(stat=“density”)

VNC (virtual network computing) server

  1. realVNC
  2. TigerVNC
    1. 在被远程操控端安装TigerVNC服务器端
    
    vncserver :3 #启动用户窗口(非root)
    设置密码
    
    2. 安装tigerVNC本地版:https://bintray.com/tigervnc/stable/tigervnc/1.8.0#files
    3. 在使用端安装并运行TigerVNC客户端
    
    输入ip:3
    输入密码
  3. teamview­er

Install Perl and package (local)

Install local Perl

1. down­load source code

http://www.cpan.org/src/5.0/perl-5.26.0.tar.gz

2. ./configure prefix=/path/to/directory

3. make –j 60

4. make –j 60 test

Failed 12 tests out of 2373, 99.49% okay.
        ../cpan/Memoize/t/errors.t
        ../cpan/Memoize/t/tie_ndbm.t
        ../dist/Storable/t/lock.t
        ../dist/Tie-File/t/14_lock.t
        ../dist/Time-HiRes/t/utime.t
        ../ext/GDBM_File/t/fatal.t
        ../ext/GDBM_File/t/gdbm.t
        ../ext/NDBM_File/t/ndbm.t
        ../lib/AnyDBM_File.t
        ../lib/perlbug.t
        op/coreamp.t
        op/dbm.t

5. make –j 60 install DESTDIR=/path/to/dir

6. setup envi­ron­ment:

export PATH=/bin 
export PERL5LIB=/lib/perl5/5.26.0 #about @INC

Install local pack­ages

7. install local pack­age

perl Makefile.PL PREFIX=/path/to/directory
make
make install

or build
perl Build.PL
./Build --prefix=/path/to/directory

export PERL5LIB="/path/to/directory/lib64/perl5/:/path/to/directory/share/perl5/:

JAVA parameters

Document: http://docs.oracle.com/javase/6/docs/technotes/tools/windows/java.html

  1. 查看各种参数默认值:java -XX:+PrintFlagsFinal
  2. -Xmx: Specify the maximum size, in bytes, of the memory allocation pool. (MaxHeapSize)
    设置太小,程序一超过就会产生错误OOM:

    Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
  3. -Xms: Specify the initial size, in bytes, of the memory allocation pool. (InitialHeapSize)
    设置太大,程序一运行就会产生错误:

    # There is insufficient memory for the Java Runtime Environment to continue.
    # Native memory allocation (mmap) failed to map 143165751296 bytes for committing reserved memory.# There is insufficient memory for the Java Runtime Environment to continue.
    # Native memory allocation (mmap) failed to map 143165751296 bytes for committing reserved memory.
    Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00002b1f93400000, 143165751296, 0) failed; error='Cannot allocate memory' (errno=12)
  4. foobar