Arjun Thakur has Published 1109 Articles

C++ Program to Print the Kind of Rotation the AVL Tree is Undergoing When you Add an Element or Delete an Element

Arjun Thakur

Arjun Thakur

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

95 Views

AVL tree is a self-balancing Binary Search Tree where the difference between heights of left and right subtrees cannot be more than one for all nodesTree rotation is an operation that changes the structure without interfering with the order of the elements on an AVL tree. It moves one node ... Read More

Successive approximation ADC interface

Arjun Thakur

Arjun Thakur

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

428 Views

The Model ALS-NIFC-07 which on approximating successfully ADC is clearly described in this topic. It consists of a programmable timer interface which connects to the kit of ALS-SDA-85M by using a flat cable of 26 crores. The connector C1 gets connected to the interface by the Input Output connector P3 ... Read More

IntStream limit() method in Java

Arjun Thakur

Arjun Thakur

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

960 Views

The limit() method of the IntStream class is used to return a stream consisting of the elements of this stream, truncated to be no longer than maxSize in length. Here, maxSize is the parameter.The syntax is as followsIntStream limit(long maxSize)Here, the maxSize parameter is the count of elements the stream ... Read More

Inserting the current datetime in MongoDB?

Arjun Thakur

Arjun Thakur

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

3K+ Views

To insert current datetime in MongoDB, use the $setOnInsert operator. Let us first implement the following query to create a collection with documents>db.addCurrentDateTimeDemo.insertOne({"StudentName":"John", "StudentAdmissionDate":new Date("2012-01-21") }); {    "acknowledged" : true,    "insertedId" : ObjectId("5c97ae45330fd0aa0d2fe49f") } >db.addCurrentDateTimeDemo.insertOne({"StudentName":"Carol", "StudentAdmissionDate":new Date("2013-05-24") }); {    "acknowledged" : true,    "insertedId" : ObjectId("5c97ae54330fd0aa0d2fe4a0") } ... Read More

Rotation of stepper motor in forward and reverse directions

Arjun Thakur

Arjun Thakur

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

2K+ Views

Let us consider ALS-NIFC-01, which is a stepper motor interface. Using 26-core flat cable, it is connected to ALS kit. It will be used for interfacing two stepper motors. In our current experiment, we use only one stepper motor. The motor has a step size of 1.8°. The stepper motor ... Read More

Is there an operator in MySQL to implement multiple NOT conditions like WHERE id != 5 AND id != 10 AND id != 15?

Arjun Thakur

Arjun Thakur

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

395 Views

Yes, for this MySQL comes with a NOT IN.The syntax is as followsSELECT *FROM yourTableName WHERE yourColumnName NOT IN(1, 2, 7);To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table User_informations    - > (    - > UserId ... Read More

IntStream forEach() method in Java

Arjun Thakur

Arjun Thakur

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

351 Views

The forEach() method is used in Java to perform an action for each element of this stream. Display the stream using the forEach() method in Java IntStreamThe syntax is as followsvoid forEach(IntConsumer action)Here, action is a non-interfering action to perform on the elements.Create IntStream and add elementsIntStream intStream = IntStream.of(15, ... Read More

What is Ennead class in JavaTuples?

Arjun Thakur

Arjun Thakur

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

69 Views

An Ennead class is a Tuple of 9 elements. It is in the JavaTuples library. The following is the declaration of the Ennead classpublic final class Ennead extends Tuple implements IValue0, IValue1, IValue2, IValue3, IValue4, IValue5, IValue6, IValue7, IValue8Let us first see what we need to work with JavaTuples. To ... Read More

Can we use NOT and AND together in MongoDB?

Arjun Thakur

Arjun Thakur

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

161 Views

Yes, we can use the NOT and AND together in MongoDB. The syntax is as followsNOT X AND NOT Y = NOT (X AND Y) Let us see the working of above syntax. If both X and Y will be true then last result will be false. If one of ... Read More

C++ Program to Check if a Directed Graph is a Tree or Not Using DFS

Arjun Thakur

Arjun Thakur

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

188 Views

A graph is a tree if it does not contain any cycle. This is a C++ program to check whether a directed graph is tree or not using DFS.AlgorithmBegin function cyclicUtil() :    a) Mark the current node as visited and part of recursion stack    b) Recur for all ... Read More

Advertisements