How to log an object in Node.js
Learning how to log an object in Node.js helps you work with objects comfortably. Although you can use multiple ways to console-log an object's content, the
5 ways to check if a string is an integer in Python
When operating with numbers and strings, many times while fetching the data from the text box, we fetch it as a string. Now, on back-end this data may be
How to use async for loop in Node.js
Node async for loop helps to fetch resources in a controlled environment. It would be best to understand the concepts of loops, iterables, and numerables,
JavaScript assertequals Explained [6 Practical Examples]
JavaScript assertequals are some of the crucial software development assertion tools. You can import the NodeJS built-in assert module or install it with npm.
Learn async while loop in Nodejs from SCRATCH
This tutorial explains async while loop Nodejs without assuming you understand the concepts of promises, looping, and timers.
How to make HTTP GET Request in Node.js
In NodeJS, several methods that provide the functionalityto make HTTP GET request from the http module provided in the standard library. While the HTTP module works properly making get requests is complicated. You need …
How to Paginate with Mongoose in Node.js [Practical Examples]
It is a traditional way to paginate with mongoose. Here, It simply uses limit and offset in SQL queries to paginate the data from database. If you are working
In NodeJs, why is new Date constructor setting default time to 7am?
In Nodejs, the new Date constructor time defaults to 7 am if your time zone is 7 hours behind the Greenwich Meridian Time.
How to implement 3 stacks in an array
A Stack is a Last in First out(LIFO) data structure. Push and pop operations are used for insertion and deletion of a value from the stack respectively. In
Find merge point of two lists in Java
In this article we explored three different methods which can be used in Java to find merge point of two lists i.e Brute Force Approach, Marking Node as visited and Using HashSet
How to find a height of a tree data structure in Java
The Tree is a non linear data structure consisting of nodes and edges. Depending upon the type of tree, it can have 0 or more child nodes. There are two ways to calculate the height of a tree using Recursive Approach or …
4 ways to convert char to int in Java
In this tutorial, we covered four different approaches to convert char to int in Java, Using ASCII Values, Integer.parseInt() method, Character.getNumericValue() method and Subtracting '0'
How to get sublist from a list in Java
In order to get sublist either in an ArrayList or LinkedList, we have to use the sublist() method which is a method of AbstractList class.
How to split String into Array
In this tutorial we will cover multiple examples to understand how to split string into array for different scenarios
How to return an Array in Java [Practical Examples]
There are three different ways to return an array from a function in Java as listed below: Return an array of primitive type, Return an array of objects, Return a multidimensional array
How to convert Set to list in Java [Practical Examples]
There are several ways to convert the set to list in java as listed below. Using looping, ArrayList Constructor, LinkedList Constructor, List.addAll() Method, List.copyOf() method, stream API, Apache Commons Collections
How to convert String to Date in Java [Practical Examples]
There are five ways to convert a String to Date in java as listed below. Using SimpleDateFormat Class, LocalDate Class, DateTimeFormater Class, Instant Class, Apache Commons Lang - DateUtils
How to Compare Characters in Java
There are several ways to compare characters in java as listed below, Using Relational Operators, Using Character.compare(), Using Character.hashCode(), Using compareTo() method, Using equals() method, Using charValue() …
How to initialize List in Java
Following methods can be used in Java to initialize list. The list interface can be initialized through 4 list classes: ArrayList, LinkedList, Stack, Vector
How to Copy a File in Java [Practical Examples]
The list below shows five different ways in which we can copy a file in Java. Using FileInputStream and FileOutputStream Using Paths and Files Using RandomAccessFile Class Using FileChannel Using Files.copy()
How to check if file exists in Java [Practical Examples]
In Java, there are three different ways to check if file exists or not such as Using exists method of Legacy I/O File class, Using isFile method of File class, Using exists method of NIO File class
How to get Current Date in Java
The list below shows eight different ways to get current date in Java Using java.util.Date, java.util.Calendar, java.time.LocalDateTime, java.time.LocalDate, java.time.Year, java.time.MonthDay, java.time.OffsetDateTime, …
How to reverse a list in Java [4 Different Methods]
We can reverse a list in Java using four different ways i.e. Using add and remove method, Using recursion, Using reverse method of Collections, Using ListIterator Interface
Return Multiple Values in Java [5 Different Methods]
We can use any of the five shown approaches as per the program requirement to return multiple values in Java. Return an array of specific type or object, Return using the Pair class of util package, Return a String …
Java string length Examples [Multiple Scenarios]
Multiple examples to use the java string length method to get length of java string.
SOLVED: Check if path is subdirectory of another in Node.JS
In this tutorial we learned how to check if path is subdirectory of another directory using Node.JS. Tutorial on NodeJS Path module.
4 programs that shows how Java global variables work
A Java global variable is a variable that is declared outside a method or at the start of a code is a global variable, there are no access restrictions on a global variable. A Java global variable is mostly declared in …
Node.Js forEach() statement Explained [Practical Examples]
In this article, you learned how you can use the Node.Js forEach() to iterate over an iterable in JavaScript. When iterating over array elements, you should opt for forEach() whereas using map() and reduce() would work …
3 ways to convert CHAR to INT in Java
There are 3 methods to convert char to int in java i.e ASCII values, getNumericalValue, ParseInt using ValueOf method.
3 different ways to detect a loop in a Linked List
There are three ways to detect a loop in a linked list cycle. They are as listed below. Traversing through the list, Using HashSet, Using Floyd's Cycle Detection Algorithm






