Thursday, 28 February 2019

java Stream

https://www.geeksforgeeks.org/stream-in-java/

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:
  1. press "i"
  2. write your merge message
  3. press "esc"
  4. write ":wq"
  5. 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


  1. press "i"
  2. write your merge message
  3. press "esc"
  4. write ":wq"
  5. 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

package.json explanation

https://flaviocopes.com/package-json/

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

CICD integration

https://dzone.com/articles/learn-how-to-setup-a-cicd-pipeline-from-scratch

Monday, 11 February 2019

Understanding JavaScript Truthy and Falsy

List of falsy values in JavaScript:From MDN
  1. false
  2. null
  3. undefined
  4. 0
  5. NaN
  6. ''
  7. 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;
            }