(Solved) Merge Arraylists inside an ArrayLists of Arraylists [closed]

The following method should do the trick: public static <T> void merge(ArrayList<ArrayList<T>> arrayLists) { int blockSize = 6; for(int i=blockSize; i<arrayLists.size(); i++) { arrayLists.get(i % blockSize).addAll(arrayLists.get(i)); } arrayLists.subList(blockSize, arrayLists.size()).clear(); } You can convert blockSize to the method parameter if you like. 1 solved Merge Arraylists inside an ArrayLists of Arraylists [closed]

(Solved) Java permutation algorithm

Your question is of mathematics nature – combinations and permutations. You are actually asking the number of possible permutation for string length 7. The formula is factorial(numOfchar). In this case 7! = 7x6x5x4x3x2x1 = 5040. public static void main(String[] args) { String str = “ABCDEFH”; System.out.println(“Number of permutations for ” + str + ” is … Read more

(Solved) Taking Screen shot continuously without slow down the PC – C#

You won’t find a basic answer here. They use much more involved mechanisms for detecting changes on the screen and sending them. Check out how terminal svcs work – http://technet.microsoft.com/en-us/library/cc755399%28WS.10%29.aspx ideally you are hooking into the GUI and monitoring events, etc. much more advanced than simply screen scraping. If you want to look at less … Read more

(Solved) Two by two matching between dataframes in r

You want the merge function. Since your column names that you want to match on already have the same name you don’t even need to do anything special. If that wasn’t the case you would want to look into the by.x and by.y parameters that merge takes. df1 = data.frame(Site.1=c(“A”,”A”,”B”),Site.2=c(“B”,”C”,”C”),Score1=c(60,70,80)) df2 = data.frame(Site.1=c(“B”,”A”,”A”),Site.2=c(“C”,”B”,”C”), Score2=c(10,20,30)) df3 … Read more