This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Properties类继承了Hashtable<object, object>, 隶属于Java.util package */ | |
/* Properties可以load 文件流, 但文件的格式是line-oriented, 就是一行一个属性, | |
key=value,中间无空格*/ | |
/* System.getProperty("app.home"), 是利用java 执行时的设置系统变量option, -Doption=value | |
(command line)*/ | |
public static void updateCCProperties(GenomixJobConf conf) throws FileNotFoundException, IOException, InterruptedException { | |
Properties CCProperties = new Properties(); | |
CCProperties.load(new FileInputStream(System.getProperty("app.home", ".") + File.separator + "conf" | |
+ File.separator + "cluster.properties")); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* parseBoolean 能解析 string to boolean, 若string = “true” 就为true,反之亦然; conf.get() | |
返回一个string, 尽管FOLLOWS_GRAPH_BUILD 属性是Boolean */ | |
followingBuild = Boolean.parseBoolean(conf.get(GenomixJobConf.FOLLOWS_GRAPH_BUILD)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Patterns 是一个静态enum, arrayFromString()返回一个enum数组,注意遍历style*/ | |
for (Patterns step : Patterns.arrayFromString(pipelineSteps)) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 如果同时引入2个driver类, 因为分不清,则可以写全名*/ | |
private edu.uci.ics.genomix.hyracks.graph.driver.Driver hyracksDriver; | |
private edu.uci.ics.pregelix.core.driver.Driver pregelixDriver; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hadoop jar pregelix-core-0.2.3-SNAPSHOT-balancer.jar /user/nzhang/test.txt /user/nzhang/good 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Eclipse-Preferences-Java-Editor-Templates. | |
1. the shortcut of editor templates is ctrl + space, however, this shortcut had conflict with system spotLight's shortcut. | |
2. System->spotlight, then turn off the shortcut | |
eg,"sysout"coud genereate “System.out.println()","foreach" could generate for Loop framwork. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Tab go from parent bullet to child bullet | |
2. Shift + Tab go back from child bullet to parent bullet | |
3. Shift type letter without new bullet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Notice that the TeXmacs menus and keyboard behavior are contextual, i.e. they depend on the current mode (i.e. text mode or “math mode”). eg. >= this shortcut can be applied only when current mode is math mode(expression) | |
2. When using the F1, F2, ..., F12, these keys have conflicts with OS. So please add fn + Fx to remove the conflicts when using these keys. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^ key: Control key. This acts like a normal control key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TreeNode prev = null; | |
public void inorder(TreeNode root, ArrayList<TreeNode> t, TreeNode prev) { | |
//do sth with prev (Note: this prev is the local variable, and has nothing to do with the static prev) | |
} |
OlderNewer