VNC Notes

1.每次服务器关闭后,都要重新kill,重新申请vnc端口号。否则出现“authentication failure”

#vncpassword 修改密码
#vncserver -geometry 1280x1024(不能是*,用小写x(字母)) 设置vnc server分辨率
#vncserver -alwaysshared 设置vnc的同一个显示窗口可以连接多个客户机,一般默认是连接最后发送连接请求的客户机
vncserver -kill :15 暴力停止vnc server(一定要记得冒号前加空格,否则kill失败。开多个端口而不用,很浪费资源,一般就一个)

(检查下是否需要更改权限 chmod 777 xstartup 用ll可查看文件的读写权限--不确定)。

VNC的基本运行原理和一些Windows下的远程控制软件很相象。VNC的服务器端应用程序在UNIX和Linux操作系统中适应性很强,图形用户界面十分友好,看上去和Windows下的软件界面也很类似。在任何安装了客户端的应用程序(vncviewer)的Linux平台的计算机都能十分方便的和安装了服务器端的应用程序(vncserver)的计算机相互连接。另外,服务器端 (vncserver)还内建了Java Web接口,这样用户通过服务器端对其他计算机的操作就能通过Netscape显示出来了,这样的操作过程和显示方式比较直观方便。







Xvnc --help


Miscellaneous Notes

  1. The objective of natural language processing:
    The processing power of computers is huge, we need to take advantage of this processing power. There is a gap between natural language and computer language (formal language). NLP is designed to fill this gap.

  2. A sentence can be syntatically correct while semantically meaningless.
    Semantic grammar should be replaced by syntactic grammar in semantic parsing.

  3. Dependency grammar (dependency relations) are used to generate subject-verb-predict relationship, then this s-v-p relation is used to generate a semantic representation of the sentence (first-order-logic). To interoperate with other semantic systems. this FOL representation may need to be aligned with other representations.

  4. IN pycharm setting, saving theme settings (on your own name) should be performed on the "font" section instead of the "Colors&Fonts" section to change the background color of editor.

  5. In java, a package name must be a fully qualified name start from the top of the package. An import can be performed at the package level or the class level. In contrast, a golang package import can only be performed at the package level, also, the package declaration are at the current package only, fully qualified name is not needed.

  6. If a method has side-effect, then it will modify the value of memory outside of the local space.

  7. C++ function without overload can accept the specified type value as argument, such as sleep() in time.h.

  8. In C/C++ context, the programming API is mostly provided by the OS instead of the language spec/std library itself. Notably, glibc, posix standards, etc. However, C++11 provides standard libraries that are quite convinent. Most c and c++ "standard" libraries are provided by GNU, with a few useful third-party libraries such as boost being popular as well.

ES6 and JSX Study Note

  1. A function can be legidmitly called without giving required arguments.

  2. The building block of a react app is react element (which is a html element with JSX sytax embedded). React element can be generated by expanding react component (which is a collection of react elements).

  3. React component take the form of either ES6 function or ES6 class. React elements or smaller react components should be returned by the parent component when implemented as a ES6 function. When implemented as a ES6 class, react elements or smaller react components should be provided in the render() method definition (via "return" keyword).

  4. React components accepts props as the container to pass data down through the component chain.

  5. In react, an event is defined as a function and passed as inline HTML event property: "onClick=function" using JSX syntax.

  6. "state" can be updated via setState function. This function assign a new object to the state of a component. "setState" function accepts a annonymous function rather than a property assignment.

  7. State and preState are predefined react properties.

  8. React.Component has setState method

  9. In react, a render(return()) mehthod can only accepts a as input, that is to say, only "one" element can be rendered. Multiple elements should be wrapped into one to be rendered. A react component can render multiple smaller components without wrapping.

  10. In react, inline css style should be put into an object definition rather than string. The naming convention is camel case.

  11. The local state of a component can only be assigned directly when initialization (in the constructor). Otherwise the only way to revise it is through setState method.

Linux Path Notes

Path of Executable

This is the path that corresponds to the first part in a full command.

Executable can be either full path or just file name.
Example: gcc abc.c

The full path of an incomplete executable (gcc) is looked up in the path list defined by the environment variable PATH (defined in the .bashrc, .configure, system init scripts, etc).

Path of Arguments

Arguments (if it is a file in the file system) can be either full path or just file name.

If the argument is given by only a file name. The path is regarded as a relative path (relative to the current working directory). The full path is then generated to be used by the executable.

Maven Plugin Notes


  1. 协助Jar打包
  2. org.apache.maven.plugins



  1. The Assembly Plugin for Maven is primarily intended to allow users to aggregate the project output along with its dependencies, modules, site documentation, and other files into a single distributable archive.
  2. org.apache.maven.plugins





1.加载jar包到本地 (以加载saxon-dom-9.0.jar为例)




mvn install:install-file -DgroupId=net.sf.saxon -DartifactId=saxon-dom -Dversion=9.0 -Dpackaging=jar -Dfile=/home/ubuntu/saxon-dom-9.0.jar


  1. 例子:
    mvn install:install-file -DgroupId=log4j -DartifactId=log4j -Dversion=1.2.17 -Dpackaging=jar -Dfile=/home/rao/.m2/repository/log4j-1.2.17.jar

mvn install:install-file -DgroupId=org.apache.htrace -DartifactId=htrace-core -Dversion=3.1.0-incubating -Dpackaging=jar -Dfile=/home/rao/.m2/repository/htrace-core-3.1.0-incubating.jar

Polymorphism and Generics

  1. Polymorphism refers to the fact that method invocation of a variable (identifier) is applied by calling the specific method of the object that it refers to rather than the method defined by the variable's type. Polymorphism occurs when a parent method is overloaded by the child class. Or by method overload in the same class level.

  2. Generics refers to the mechanism that the type of the argument(s) allowed in class instantiation/method invocation is more than one.

  3. The possible overlapping of polymorphism and generics: method with only one parameter.

Unity3d Study Notes


(Also called physics step)

Runs with physics
1. Input.GetAxis will return a value between 0 and 1
2. Input.GetAxisRaw will return a value -1, 0, 1


Runs with rendering


Axes are actually inputs.


This is a constructor that returns the reference of a component object of the same GameObject that this class attached on by type name.