Skip to main content

Posts

How to get date between given days.

  suppose we  have two dates. from_Date=12-01-2021 and to_Date=13-04-2021  and we want to calculate all dates in-between these two dates,
Recent posts

Reading csv/Google Sheet in Python

 Reading google sheet file using function: File_Url= "https://docs.google.com/spreadsheets/d/458qrjGFH9CD050rRwEHfayWVd4x9VheVAiZkGsj4lIo/export?format=tsv" def getGoogle(google):     import pandas as pd     import numpy as np     import sys     if sys.version_info.major == 3:         import ssl         ssl._create_default_https_context = ssl._create_unverified_context     try:         df = pd.read_csv(google, delimiter='\t').rename(columns=lambda x: x.strip())     except Exception as e:         import requests, io         x = requests.get(url=google).content         df = pd.read_csv(io.StringIO(x.decode('utf8')), delimiter='\t').rename(columns=lambda x: x.strip())     df = df.replace({np.nan: None})     return df.to_dict('records')     googleSheetRecord=getGoogle(File_Url) ...

Java 8 installation

Java 8 installation setup:       First of all ,we need to install java 8 jdk in your  machine.so for that you can download  it from following  url. click here download  jdk 1.8.0_11 and install it on your machine. Once installation has been done. Please checkout version of jdk. C:\Users\hp>java -version java version "1.8.0_11" Java(TM) SE Runtime Environment (build 1.8.0_11-b12) Java HotSpot(TM) Client VM (build 25.11-b03, mixed mode, sharing) once you have installed Java on your machine, you would need to set environment variables to point to correct installation directories                                                       ...

What is java 8

What is java 8?  Java 8   is a major release of java development.  Java 8 initial version  was released on 18 march 2014.  Java 8 changes are done both at JVM and compiler level.  Java 8 provide following feature:              1)support functional  programing language. 2)new java script engine. 3)new date time api. 4)new streaming api. 5) Lambda expression. 6)  support Default method implementation. 7) support  Method reference.

MongoDB Overview

         MongoDB is an open-source document database, and leading NoSQL database. MongoDB is written in c++.                MongoDB is a cross-platform, document oriented database that provides, high performance, high availability,   and easy scalability.                 MongoDB works on concept of collection and document. Database Database is a physical container for collections. Each database gets its own set of files on the file system. A single MongoDB server typically has multiple databases. Collection Collection is a group of MongoDB documents. It is the equivalent of an RDBMS table. A collection exists within a single database. Collections do not enforce a schema. Documents within a collection can have different fields. Typically, all documents in a collection are of similar or related purpose. Document A document is a set of key-value pairs. Document...

HashMap in Java

    -What is HashMap:       A HashMap has value and  key. store value based on Key. HasMap implements the Map interface and extends AbstractMap class.       Allow only one null as key and can contain   multiple null value.       Also Conatin Order of element.         HasMap----extend---->AbstractMap----implement---->Map                 Now we see how to Put and Retrive value from HashMap.                Example.             import java.util.*;               class MapTest{                        public static void main(String args[]){     HashMap<Integer,String> map=new HashMap<Integer,String>();     map.put(1,"vjp");   map.put(...

Interface in Java

Interface:          An interface is a nothing but  reference type,it is same as class.In short Interface is collection of Abstract Method .          It can  also contain  final, static fields  .               you can't create object of Interface.    it can't have Constructor.   Interface can't implement another interface it can extend another one. Interface not extended by class but implemented. Declare Interface: public interface Example {     // final, static fields  .     //Method } Example 1.create interface that contain method. public interface IA {     public void show(); } 2.implement by class  public class ClassA  implements IA{     @Override     public void show() {         System.out.println("from class A called");   ...