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

maven-jar-plugin

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



    sparkexample1.App


maven-assembly-plugin

  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
    maven-assembly-plugin
    2.4


    jar-with-dependencies



    com.your-package.MainClass




    package
    single


手动添加jar包以满足mvn依赖需求

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

首先在工程的pom.xml文件中加入


net.sf.saxon
saxon-dom
9.0

pom.xml配置完成后,再执行以下命令:

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

说明:-Dfile指第三方jar的路径,其它的注意要确保maven命令中groupId、artifactId、version与pom.xml中的配置相同,-Dpackaging表示加载的文件类型

  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

FixedUpdate

(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

NormalUpdate

Runs with rendering

Axis

Axes are actually inputs.

GetComponent<>()

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