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
public class BST <T extends Comparable<T>> implements Iterable<T> | |
{ | |
public static void main(String[] args) | |
{ | |
Integer[] a = {1,5,2,7,4}; | |
BST<Integer> bst = new BST<Integer>(); | |
for(Integer n : a) bst.insert(n); | |
bst.preOrderTraversal(); | |
System.out.println(); |
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
alias tdebug='cd /opt/tomcat; bin/catalina.sh jpda start; cd - > /dev/null' | |
alias tlogd='rm /opt/tomcat/logs/*' | |
alias tstart='cd /opt/tomcat; bin/startup.sh; cd - > /dev/null' | |
alias tstat='ps -ef|grep tomcat|grep -v grep' | |
alias tstop='/opt/tomcat/bin/shutdown.sh' | |
//void arrays - Which of the following doesn’t compile | |
void[] voids1 = new void[1]; (1) |
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
ApplicationContext ctx = SpringApplication.run(Application.class, args); | |
String[] beanNames = ctx.getBeanDefinitionNames(); | |
Arrays.sort(beanNames); | |
for (String beanName : beanNames) { | |
System.out.println(beanName); | |
} |
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
# get all 2 char unix utilities | |
for i in /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin ; do find $i >> qq ; done | |
while read i; do basename $i >> qq.basename ; done < qq | |
cat qq.basename |sort|uniq|grep -w '^\w\{2\}$' > qq.basename.sort.2 | |
# print man description | |
while read i; do man -f $i >> qq.basename.sort.2.man ; done < qq.basename.sort.2 | |
7z (1) - A file archiver with highest compression ratio | |
ar (1) - create, modify, and extract from archives | |
as (1) - the portable GNU assembler. |
NewerOlder