https://www.geeksforgeeks.org/stream-in-java/
Thursday, 28 February 2019
How do I make Git use the editor of my choice for commits?
https://stackoverflow.com/questions/2596805/how-do-i-make-git-use-the-editor-of-my-choice-for-commits
- Set
core.editor
in your Git config:git config --global core.editor "vim"
- Set the
GIT_EDITOR
environment variable:export GIT_EDITOR=vim
Please enter a commit message to explain why this merge is necessary, especially if it merges an updated upstream into a topic branch
https://stackoverflow.com/questions/19085807/please-enter-a-commit-message-to-explain-why-this-merge-is-necessary-especially
811
It's not a Git error message, it's the editor as git uses your default editor.
To solve this:
- press "i"
- write your merge message
- press "esc"
- write ":wq"
- then press enter
What is the difference between ArrayList.clear() and ArrayList.removeAll()?
https://stackoverflow.com/questions/7032070/what-is-the-difference-between-arraylist-clear-and-arraylist-removeall
Monday, 25 February 2019
https://stackoverflow.com/questions/19085807/please-enter-a-commit-message-to-explain-why-this-merge-is-necessary-especially
https://stackoverflow.com/questions/19085807/please-enter-a-commit-message-to-explain-why-this-merge-is-necessary-especially
- press "i"
- write your merge message
- press "esc"
- write ":wq"
- then press enter
Thursday, 21 February 2019
node package.json script tag explanation
https://michael-kuehnel.de/tooling/2018/03/22/helpers-and-tips-for-npm-run-scripts.html
Tuesday, 19 February 2019
remove duplicate elemets from arrayList
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashSet;
class Main {
public static void main(String[] args) {
// ArrayList with duplicate elements
ArrayList<String> numbersList = new ArrayList<>(Arrays.asList("pawan", "kumar", "pawan", "kumar", "pawan"));
System.out.println(numbersList);
LinkedHashSet<String> hashSet = new LinkedHashSet<>(numbersList);
ArrayList<String> listWithoutDuplicates = new ArrayList<>(hashSet);
System.out.println(listWithoutDuplicates);
System.out.print("listWithoutDuplicates"+listWithoutDuplicates.size());
}
}
Friday, 15 February 2019
Monday, 11 February 2019
Understanding JavaScript Truthy and Falsy
List of falsy values in JavaScript:From MDN
false
null
undefined
0
NaN
''
document.all
List of all Falsey values in JavaScript (all other values would be treated as Truthy).
false
0
-0
""
''
null
undefined
NaN
Wednesday, 6 February 2019
Monday, 4 February 2019
get sql record and count toghether
Query: Select SQL_CALC_FOUND_ROWS first_name from sh_players.
rs.close();
rs = selectSQL(stmt, "SELECT FOUND_ROWS() as build_count");while (rs.next()) {
build_count = rs.getInt("build_count");
break;
}
Subscribe to:
Posts (Atom)