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. |
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
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
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
import static java.util.stream.Collectors.counting; | |
import static org.junit.Assert.assertArrayEquals; | |
import java.util.Arrays; | |
import java.util.Map; | |
import java.util.function.Function; | |
import java.util.stream.Collectors; | |
import java.util.stream.IntStream; |
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
package trp2.redonejunit4; | |
import static org.junit.Assert.assertTrue; | |
import static org.junit.Assert.fail; | |
import org.junit.Test; | |
public class TradeExecutorJUnit4Test { |
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
package trp2.redonejunit5; | |
import static org.junit.Assert.assertTrue; | |
import static org.junit.jupiter.api.Assertions.assertThrows; | |
import org.junit.jupiter.api.Test; | |
class TradeExecutorJUnit5Test { |
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
import static org.junit.jupiter.api.Assertions.assertEquals; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.junit.jupiter.api.Test; | |
public class ConvertMoneyToEnglish { | |
public static String convertMoneyToEnglish(int i) { |
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
<!DOCTYPE NETSCAPE-Bookmark-file-1> | |
<!-- This is an automatically generated file. | |
It will be read and overwritten. | |
DO NOT EDIT! --> | |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> | |
<TITLE>Bookmarks</TITLE> | |
<H1>Bookmarks Menu</H1> | |
<DL><p> | |
<DL><p> |
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
git log --oneline --decorate --all --graph |
OlderNewer