Arjun Thakur has Published 1109 Articles

C++ Program to Perform Left Rotation on a Binary Search Tree

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

2K+ Views

A Binary Search Tree is a sorted binary tree in which all the nodes have following two properties − The right sub-tree of a node has all keys greater than to its parent node's key. The left sub-tree of a node has all keys less than to its parent node's key. Each ... Read More

How to get the records of the last two days from the current date in MySQL?

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

2K+ Views

To get the records of the last days from the current date, you need to use DATE_SUB(). We will also use NOW() to get the current date. The syntax for the same is as followsSELECT *FROM yourTableName WHERE yourDateTimeColumnName BETWEEN DATE_SUB(DATE(NOW()), INTERVAL 2 DAY) AND DATE_SUB(DATE(NOW()), INTERVAL 1 DAY);Let us ... Read More

PHP and MYSQL database connection and table creation only once if it does not already exist?

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

810 Views

To create database only once, use the below syntax.CREATE DATABASE IF NOT EXISTS yourDatabaseName;To create table only once, use the below syntax −CREATE TABLE IF NOT EXISTS yourTableName (    yourColumnName yourDatatype,    .    .    .    N );Let us implement both the above syntaxes to create database ... Read More

How to make custom dialog with custom dialog view actions in android?

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

856 Views

This example demonstrate about How to make custom dialog with custom dialog view actions in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. ... Read More

Collectors toCollection() method in Java 8

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

850 Views

The toCollection() method of the Collectors class in Java returns a Collector that accumulates the input elements into a new Collection in encounter order.The syntax is as followsstatic Collector toCollection(Supplier collectionFactory)Here, the parameterT - Type of the input elementsC - Type of the resulting CollectionSupplier: A supplier of resultscollectionFactory ... Read More

Assessing compatibility of 27128-20 with 8085AH-2 in 8085 Microprocessor

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

49 Views

The 8085AH-2 always works with a clock period of 200nS. We start the calculations by assuming that the valid address, and IO/M* signals are sent by the 8085AH-2 time 0 nS. After that the, Arithmetic Logical Unit moves to state 0 at 50 nS (tAL), and RD* gets activated at ... Read More

ArrayBlockingQueue take() method in Java

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

164 Views

The take() method of the ArrayBlockingQueue class fetch and removes the head of this queue, waiting if necessary until an element becomes available.The syntax is as followspublic E take() throws InterruptedExceptionTo work with ArrayBlockingQueue class, you need to import the following packageimport java.util.concurrent.ArrayBlockingQueue;The following is an example to implement take() ... Read More

Decimal counter using logic controller

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

209 Views

We write a program in the 8085 which is written in assembly language just for the implementation of a decimal counter which is used by the logic controller interface. The input of the starting count must be the input through the complete interface and moreover we display the count on ... Read More

Check if value exists in a comma separated list in MySQL?

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

10K+ Views

To check if value exists in a comma separated list, you can use FIND_IN_SET() function.The syntax is as followsSELECT *FROM yourTablename WHERE FIND_IN_SET(‘yourValue’, yourColumnName) > 0;Let us first create a table. The query to create a table is as followsmysql> create table existInCommaSeparatedList - > ( ... Read More

The hashCode() method of CopyOnWriteArrayList method in Java

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

80 Views

To get the hash code value of the list, you need to use the hashCode() method of the CopyOnWriteArrayList class.The syntax is as followspublic int hashCode()To work with CopyOnWriteArrayList class, you need to import the following packageimport java.util.concurrent.CopyOnWriteArrayList;The following is an example to implement CopyOnWriteArrayList class hashCode() method in JavaExample Live ... Read More

Advertisements