- 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
441 Views
You can use $elemMatch operator for this. Let us create a collection with documents> db.getDocumentsByTagsDemo.insertOne({"Tags":["Tag-1", "Tag-2", "Tag-3"]}); { "acknowledged" : true, "insertedId" : ObjectId("5c9eb4d5d628fa4220163b79") } > db.getDocumentsByTagsDemo.insertOne({"Tags":["Tag-2", "Tag-4", "Tag-5"]}); { "acknowledged" : true, "insertedId" : ObjectId("5c9eb4d5d628fa4220163b7a") } > db.getDocumentsByTagsDemo.insertOne({"Tags":["Tag-6", "Tag-4", "Tag-3"]}); { "acknowledged" : true, ... Read More
Arjun Thakur
168 Views
The max() method of the DoubleStream class returns an OptionalDouble describing the maximum element of this stream, or an empty OptionalDouble if this stream is empty.The syntax is as follows.OptionalDouble max()Here, OptionalDouble is a container object which may or may not contain a double value.To use the DoubleStream class in ... Read More
Arjun Thakur
14K+ Views
In C++ it supports compile time polymorphism. The examples of compile time polymorphism are the function overloading and the operator overloading.There are some rules for the operator overloading. These rules are like belowOnly built-in operators can be overloaded. If some operators are not present in C++, we cannot overload them.The ... Read More
Arjun Thakur
453 Views
To store query result (a single document) into a variable, you can use var. Following is the syntaxvar anyVariableName=db.yourCollectionName.find().limit(1); yourVariableName; //Print the records;Let us first create a collection with documents> db.storeQueryResultDemo.insertOne({"ClientName":"Chris", "ClientAge":23}); { "acknowledged" : true, "insertedId" : ObjectId("5c9ecf8fd628fa4220163b8d") } > db.storeQueryResultDemo.insertOne({"ClientName":"Robert", "ClientAge":21}); { "acknowledged" : true, ... Read More
Arjun Thakur
354 Views
The config object is an instantiation of javax.servlet.ServletConfig and is a direct wrapper around the ServletConfig object for the generated servlet.This object allows the JSP programmer access to the Servlet or JSP engine initialization parameters such as the paths or file locations etc.The following config method is the only one ... Read More
Arjun Thakur
220 Views
Before getting into example , we should know what is vertical Scroll View(Scroll View). Vertical Scroll view provide by android.widget.ScrollView class . It is used to scroll child views in vertical direction.This example demonstrate about how to use Vertical Scroll view.Step 1 − Create a new project in Android Studio, go ... Read More
Arjun Thakur
1K+ Views
In this program we will see how to subtract two 8-bit BCD numbers.Problem StatementWrite 8086 Assembly language program to subtract two 8-bit BCD number stored in memory address offset 600.DiscussionThis task is too simple. Here we are taking the numbers from memory and after adding we need to put DAS ... Read More
Arjun Thakur
220 Views
To find inside a hash MongoDB, you can use dot(.) notation. Let us first create a collection with documents> db.hashDemo.insertOne({"ClientName":"Larry", "ClientAge":23, "ClientDetails":{ "isEducated": true, "ClientProject" : "University Management"}}); { "acknowledged" : true, "insertedId" : ObjectId("5ca1ef1266324ffac2a7dc5e") } > db.hashDemo.insertOne({"ClientName":"Chris", "ClientAge":26, "ClientDetails":{ "isEducated":false, "ClientProject" : "Online Book Store"}}); { ... Read More
Arjun Thakur
71 Views
To create Ennead Tuple from a List collection, use the fromCollection() method. Firstly, create a List like this and then create an Ennead Tuple using ListList myList = new ArrayList(); myList.add("Accessories"); myList.add("Shirt"); myList.add("Trousers"); myList.add("Furniture"); myList.add("Smart Wearable Tech"); myList.add("Smart Home Automation"); myList.add("Books"); myList.add("Stationery"); myList.add("Instrument");Let us first see what we need to ... Read More