One #install package install.packages("ggplot2") #load library library(ggplot2) #update.packages() #vector v=c(1,4,4,3,2,2,3) #get vector elements, index is 2,3,4 v[c(2,3,4)] #get vector elements, index range is 2 to 4 v[2:4] #get vector element…
## String comparison is too slow in R language ## it will take 3 minutes, it is too slow date() strArray1<-rep("1234567890",10000) strArray2<-rep("1234567890",10000) tt<-0 for(xx in 1:10000) { for(yy in 1:10000) { if(strArray1…
Linux Essentials Certification Globbing ls ?.txt --- ? stands for one character while * means one or more characters ls [F]*.txt --- list file starting with F ls [F]*.txt --- list file starting with F ls f[igh] --- the first character is f, but the s…
Main reference: [1] http://winterbe.com/posts/2014/03/16/java-8-tutorial/ [2] https://plus.google.com/107771575694787223844/posts 1. Add default methods for Interfaces In java 8, Interface could have concrete methods using keyword 'default'. interfac…
References: [1] http://www.tldp.org/LDP/Bash-Beginners-Guide/html/ 1. Executing programs from a script When the program being executed is a shell script, bash will create a new bash process using a fork. This subshell reads the lines from the shell s…
Main reference [1] http://winterbe.com/posts/2014/07/31/java8-stream-tutorial-examples 1. How Streams Work A stream represents a sequence of elements and supports different kind of operations to perform computations upon those elements: List<String>…