Wednesday, 24 July 2019
Monday, 22 July 2019
Monday, 15 July 2019
java stream api manupalation for arraylist of integer to comma sepertaed
import java.util.*;
import java.util.stream.Collectors;
class Main {
public static void main(String[] args) {
List<String> strings = new LinkedList<>();
strings.add("Java");strings.add("is");
strings.add("cool");
String message = String.join(", ", strings);
System.out.println(message);
List<Integer> num = new LinkedList<>();
num.add(2);
num.add(5);
num.add(7);
String message1 =num.stream().map((gameId)-> gameId.toString()).collect(Collectors.joining(","));
System.out.println(message1);
//message returned is: "Java is cool"
}
}
https://www.baeldung.com/java-string-with-separator-to-list
Friday, 12 July 2019
s3 bucket naming convention
The legacy rules for bucket names in the US East (N. Virginia) Region allowed bucket names to be as long as 255 characters, and bucket names could contain any combination of uppercase letters, lowercase letters, numbers, periods (.), hyphens (-), and underscores (_).
Thursday, 11 July 2019
Tuesday, 9 July 2019
How to revert a commit from remote branch
1.Take remote branch commit number
2.git revert hashid
git revert b2e9537b33f6a9a9d3d001c33e91ca0d441a8f04
3.then git push to your remote branch
git push origin mybranchname.
Subscribe to:
Posts (Atom)