- 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
Nishtha Thakur has Published 564 Articles
Nishtha Thakur
102 Views
To get the same result like AND in MongoDB, use the $all operator. Let us first create a collection with documents −> db.andQueryDemo.insertOne({"StudentName":"Carol Taylor", "FavouriteSubject":["C", "Java", "MongoDB", "MySQL"]}); { "acknowledged" : true, "insertedId" : ObjectId("5cc73e7a8f9e6ff3eb0ce433") } > db.andQueryDemo.insertOne({"StudentName":"David Miller", "FavouriteSubject":["C++", "Java", "MongoDB", "SQL Server"]}); { "acknowledged" : ... Read More
Nishtha Thakur
107 Views
You can use $in operator. Let us first create a collection with documents −> db.tagCountDemo.insertOne({"ListOfNames":["John", "Sam", "Carol"]}); { "acknowledged" : true, "insertedId" : ObjectId("5cd64b387924bb85b3f48944") } > db.tagCountDemo.insertOne({"ListOfNames":["Bob", "David", "John"]}); { "acknowledged" : true, "insertedId" : ObjectId("5cd64b4b7924bb85b3f48945") } > db.tagCountDemo.insertOne({"ListOfNames":["Mike", "Robert", "Chris"]}); { "acknowledged" : true, ... Read More
Nishtha Thakur
596 Views
Let’s say we want the parent of a node, then use the getParent() method -node3.getFirstChild()You can also get the parent of child node. Here, “nine” is the child node −nine.getParent()The output is as follows displaying this node’s parent on Console −Examplepackage my; import javax.swing.JFrame; import javax.swing.JTree; import javax.swing.tree.DefaultMutableTreeNode; public class ... Read More
Nishtha Thakur
336 Views
Here we will see when we need to create own assignment operator in C++. If a class do not have any pointers, then we do not need to create assignment operator and copy constructor. C++ compiler creates copy constructor and assignment operator for each class. If the operators are not ... Read More
Nishtha Thakur
3K+ Views
Threaded binary tree is a binary tree that provides the facility to traverse the tree in a particular order.It makes inorder traversal faster and do it without stack and without recursion. There are two types of threaded binary trees.Single Threaded Each node is threaded towards either left or right means ... Read More
Nishtha Thakur
233 Views
In this program we will see how to perform modulus of the first array corresponding to the next array.Problem StatementWrite 8086 Assembly language program perform modulus of the first array corresponding to the next array.DiscussionIn this example there are two different arrays. The arrays are stored at location 501 onwards ... Read More
Nishtha Thakur
1K+ Views
You can use find() for this. Let us first create a collection with documents −> db.findInDictionaryDemo.insertOne( ... { ... "_id":101, ... "AllCustomerDetails": ... { ... "SomeCustomerDetail1": ... { ... ... Read More
Nishtha Thakur
1K+ Views
For this, work with the concept of forEach(). Let us first create a collection with documents −> db.printDocuementValueDemo.insertOne({"InstructorName":"John Smith"}); { "acknowledged" : true, "insertedId" : ObjectId("5cd6804f7924bb85b3f48950") } > db.printDocuementValueDemo.insertOne({"InstructorName":"Sam Williams"}); { "acknowledged" : true, "insertedId" : ObjectId("5cd680577924bb85b3f48951") } > db.printDocuementValueDemo.insertOne({"InstructorName":"David Miller"}); { "acknowledged" : true, ... Read More
Nishtha Thakur
10K+ Views
This problem is to find an arrangement of N queens on a chess board, such that no queen can attack any other queens on the board.The chess queens can attack in any direction as horizontal, vertical, horizontal and diagonal way.A binary matrix is used to display the positions of N ... Read More
Nishtha Thakur
2K+ Views
This example demonstrate about Create and Manage Notification Channels in AndroidStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − ... Read More