Arjun Thakur has Published 1109 Articles

IntStream mapToDouble() method in Java

Arjun Thakur

Arjun Thakur

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

696 Views

The mapToDouble() method returns a DoubleStream consisting of the results of applying the given function to the elements of this stream.The syntax is as follows.DoubleStream mapToDouble(IntToDoubleFunction mapper)Here, the parameter mapper is the stateless function applied to each element.Create an IntStream with some elements.IntStream intStream = IntStream.of(5, 20, 25, 45, 60, ... Read More

How do I view the auto_increment value for a table in MySQL?

Arjun Thakur

Arjun Thakur

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

1K+ Views

In order to view the auto_increment value for a table, you can use SHOW TABLE command.The syntax is as followsSHOW TABLE STATUS LIKE 'yourTableName'\GThe syntax is as followsSELECT `AUTO_INCREMENT`    FROM `information_schema`.`TABLES`    WHERE `TABLE_SCHEMA` = ‘yourDatabaseName’    AND `TABLE_NAME` =’yourTableName';To understand the above syntaxes, let us create a table. ... Read More

Read and Write the stack in 8085 Microprocessor

Arjun Thakur

Arjun Thakur

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

1K+ Views

Reading from the StackLet us consider that SP contents the address FC78H, and we want to read information from a stack location. In this case, we are not interested in reading from a location whose address is less than the memory address present in SP. This is because 8085 interprets ... Read More

How to change the password in MongoDB for existing user?

Arjun Thakur

Arjun Thakur

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

700 Views

To change the password in MongoDB for existing user, you can use changeUserPassword(). Following is the syntaxdb.changeUserPassword("yourExistingUserName", "yourPassword");Let us first switch the database to admin. Following is the syntax> use adminThis will produce the following outputswitched to db adminNow, display users from the database. Following is the query> db.getUsers();This will ... Read More

How to create a new table from merging two tables with MySQL union?

Arjun Thakur

Arjun Thakur

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

3K+ Views

The following is the syntax to merge two tables using MySQL unioncreate table yourTableName ( select *from yourTableName1 ) UNION ( select *from yourTableName2 );To understand the above syntax, let us create a table. The query to create first table is as followsmysql> create ... Read More

Difference between call and jump instructions in 8085 Microprocessor

Arjun Thakur

Arjun Thakur

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

3K+ Views

The main differences between a JMP instruction and a CALL instruction is as follows –If a JMP instruction is executed, we jump to the destination location, and the execution carries on from there, without bothering to come back later to the instruction after the JMP. On the other hand, if ... Read More

IntStream boxed() method in Java

Arjun Thakur

Arjun Thakur

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

2K+ Views

The boxed() method of the IntStream class returns a Stream consisting of the elements of this stream, each boxed to an Integer.The syntax is as follows.Stream boxed()At first, create an IntStreamIntStream intStream = IntStream.range(20, 30);Now, use the boxed() method to return a Stream consisting of the elements of this stream, ... Read More

Add new MySQL table columns and create indexes?

Arjun Thakur

Arjun Thakur

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

138 Views

To add a new MySQL table column and index, you can use ALTER TABLE command.The syntax is as followsALTER TABLE yourTableName ADD COLUMN yourColumnName dataType, ADD INDEX(yourColumnName );To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table AddColumnAndIndexDemo   ... Read More

2D vector in C++ with user defined size

Arjun Thakur

Arjun Thakur

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

2K+ Views

A vector of a vector is called 2D vector.AlgorithmBegin    Declare a variable v to the 2D vector type.    Initialize values to the vector v.    Print “the 2D vector is:”.    for (int i = 0; i < v.size(); i++)       for (int j = 0; ... Read More

Multiplexer/demultiplexer in 8085 Microprocessor

Arjun Thakur

Arjun Thakur

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

5K+ Views

Let us consider the instruction to be executed as “MOV A, C”. Here in this case the value of 8 bit in the register C must be moved to the register. The given set of registers namely B, C, D, E, H, and L must be connected to the internal ... Read More

Advertisements