- 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
Arjun Thakur has Published 1109 Articles
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
65 Views
The summaryStatistics() method of the DoubleStream class returns a DoubleSummaryStatistics describing various summary data about the elements of this stream. This is a special case of a reduction.The syntax is as followsDoubleSummaryStatistics summaryStatistics()Here, DoubleSummaryStatistics is a state object for collecting statistics such as count, min, max, average, etc. It works ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
453 Views
Following is the syntax to count the number of documents in a MongoDB collectionlet anyVariableName= db.getCollection(‘yourCollectionName’); yourVariableName.count();Let us first create a collection with documents> db.countNumberOfDocumentsDemo.insertOne({"CustomerName":"Bob"}); { "acknowledged" : true, "insertedId" : ObjectId("5c9a5e2015e86fd1496b38a1") } >db.countNumberOfDocumentsDemo.insertOne({"CustomerName":"Ramit", "CustomerAge":23}); { "acknowledged" : true, "insertedId" : ObjectId("5c9a5e3515e86fd1496b38a2") } >db.countNumberOfDocumentsDemo.insertOne({"CustomerName":"Adam", "CustomerAge":27, "CustomerCountryName":"US"}); ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
149 Views
Get the create and update tables exact date using the create_time or update_time in MySQL.At first, use the SHOW command. The syntax is as followsSHOW TABLE STATUS;We are considering our database ‘test3’, which is already having some tablesmysql> use test3; Database changedNow use the following query to display all the ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
103 Views
The LongStream class in Java the following two forms of the of() method.The following of() method returns a sequential LongStream containing a single element. Here is the syntaxstatic LongStream of(long t)Here, parameter t is the single element.The following of() method returns a sequential ordered stream whose elements are the specified ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
244 Views
Type inference or deduction refers to the automatic detection of the data type of an expression in a programming language. It is a feature present in some strongly statically typed languages. In C++, the auto keyword(added in C++ 11) is used for automatic type deduction. For example, you want to ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
288 Views
The AbstractSequentialList class provides an implementation of the List interface. For an unmodifiable list, implement the list iterator's hasNext, next, hasPrevious, previous and index methods. For a modifiable list the programmer should implement the list iterator's set method.The syntax is as followspublic abstract class AbstractSequentialList extends AbstractListTo work with the ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
648 Views
Yes, you can use pull and add at the same time with $addToSet and $pull operator. Let us first create a collection with documents> db.pullAndAddToSetDemo.insertOne({StudentScores : [78, 89, 90]} ... ); { "acknowledged" : true, "insertedId" : ObjectId("5c9a797e15e86fd1496b38af") }Following is the query to display all documents from a ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
4K+ Views
It is possible to pass some values from the command line to your C programs when they are executed. These values are called command line arguments and many times they are important for your program especially when you want to control your program from outside instead of hard coding those ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
2K+ Views
Achieve this with the help of where clause.The syntax is as followsSELECT yourColumnName1, yourColumnName2, ...N FROM yourTableName WHERE ( SELECT COUNT(*) FROM yourTableName )=2;To understand the concept, let us create a table. The query to create a table is as followsmysql> create table CountWithSubqueryDemo - > ( ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
967 Views
Following is the query to get distinct values with sorted data in MongoDBdb.yourCollectionName.distinct("yourFieldName").sort();Let us first create a collection with documents>db.getDistinctWithSortedDataDemo.insertOne({"StudentId":10, "StudentName":"John", "StudentAge":23}); { "acknowledged" : true, "insertedId" : ObjectId("5c9b1e3315e86fd1496b38c3") } >db.getDistinctWithSortedDataDemo.insertOne({"StudentId":20, "StudentName":"Carol", "StudentAge":21}); { "acknowledged" : true, "insertedId" : ObjectId("5c9b1e3e15e86fd1496b38c4") } >db.getDistinctWithSortedDataDemo.insertOne({"StudentId":10, "StudentName":"John", "StudentAge":23}); { ... Read More