- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Ankith Reddy has Published 1070 Articles
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
7K+ Views
These instructions are used to perform operations where data bits are involved, i.e. operations like logical, shift, etc. We can say that these instructions are logical instructions. In 8086, the destination register may or may not the Accumulator.Let us see the logical instructions of 8086 microprocessor. Here the D, S ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
80 Views
The LongStream builder() class in Java is used to return a builder for a LongStream.The syntax is as follows.static LongStream.Builder builder()Here, LongStream.Builder is a mutable builder for a LongStream.To use the LongStream class in Java, import the following package.import java.util.stream.LongStream;The following is an example to implement LongStream builder() method in ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
152 Views
In order to connect to my table by command line, you need to use db commanddb.yourCollectionName.find();Let’s say we have a database “sample” with some collections. First check the current database> use sample; switched to db sample > db; Sample Now we have reached the database sample. The database “sample” is ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
551 Views
The action can be used to write the template text in JSP pages and documents. Following is the simple syntax for this action −Template dataThe body of the template cannot contain other elements; it can only contain text and EL expressions (Note − EL expressions are explained in a ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
60 Views
The listIterator() method of the AbstractSequentialList class returns a list iterator over the elements in this list.The syntax is as followspublic abstract ListIterator listIterator(int index)Here, index is the index of the first element to be returned from the list iterator. The ListIterator here is the iterator for lists.To work with ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
418 Views
To get distinct values and count them, you can use GROUP BY clause.The syntax is as followsselect yourColumnName, count(*) as anyAliasName from yourTableName group by yourColumnName;To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table GroupByAndCountDemo -> ( ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
1K+ Views
In order to insert Date() in MongoDB through Mongo shell, use the following syntaxvar yourVariableName= new Date(year, month, day, hour, minute); db.yourCollectionName({yourDateFieldName:yourVariableName});Let us first create a date variable> var creatingDate = new Date(2019, 03, 29, 13, 12);Let us create a collection with documents:>db.insertingDateUsingVariableDemo.insertOne({"UserName":"John", "UserMessages":["Hi", "Hello", "Awesome"], "UserPostDate":creatingDate});Following is the query ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
768 Views
In this C++ program, we find out one of the peaks in the array can be found Using binary search approach. This algorithm returns the first peak found as a result with time complexity of the algorithm is O(log(n)).AlgorithmBegin PeakElement() function has ‘arr’ the array of data, start and ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
87 Views
The contains() method of AbstractSequentialList in Java is used to check whether an element is in the Collection.The syntax is as followspublic boolean contains(Object ob)Here, ob is the element to be checked. To work with the AbstractSequentialList class in Java, you need to import the following packageimport java.util.AbstractSequentialList;The following is ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
2K+ Views
Yes, to retrieve multiple docs from MongoDB by id, use the $in operator. The syntax is as followsdb.yourCollectionName.find({_id:{$in:[yourValue1, yourValue2, yourValue3, ...N]}});Let us first create a collection with documents:> db.retrieveMultipleDocsByIdDemo.insertOne({"_id":10, "CustomerName":"John"}); { "acknowledged" : true, "insertedId" : 10 } > db.retrieveMultipleDocsByIdDemo.insertOne({"_id":14, "CustomerName":"Chris"}); { "acknowledged" : true, "insertedId" : 14 } > ... Read More