
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Smita Kapse has Published 498 Articles

Smita Kapse
413 Views
You need to find the document and after that you need to use update to toggle query. Let us first create a collection with documents −> db.toggleDemo.insertOne({"CustomerName":"John Smith", "CustomerAge":28, "isMarried":true}); { "acknowledged" : true, "insertedId" : ObjectId("5cc7be138f9e6ff3eb0ce43b") } > db.toggleDemo.insertOne({"CustomerName":"David Miller", "CustomerAge":25, "isMarried":false}); { "acknowledged" : true, "insertedId" : ObjectId("5cc7be2e8f9e6ff3eb0ce43c") }Following is the query to display ... Read More

Smita Kapse
633 Views
For this, you need to write some code using forEach(). Let us first create a collection with documents −> db.removingWhiteSpaceDemo.insertOne({"Title":" Introduction to java "}); { "acknowledged" : true, "insertedId" : ObjectId("5cd66f387924bb85b3f4894c") }Following is the query to display all documents from a collection with the help of find() method ... Read More

Smita Kapse
1K+ Views
To pull multiple objects from an array, you can use $pull operator. Let us first create a collection with documents −> db.pullMultipleObjectsDemo.insertOne( ... { ... "ClientId" : "100", ... "ClientName" : "John", ... "ClientPersonalDetails" : [ ... ... Read More

Smita Kapse
2K+ Views
You can use $in operator to check if a value is in an array or not. Let us first create a collection with documents −> db.valueInArrayDemo.insertOne({"UserName":"John", "UserMessage":["Hi", "Hello", "Bye"]}); { "acknowledged" : true, "insertedId" : ObjectId("5cd684cf7924bb85b3f48959") } > db.valueInArrayDemo.insertOne({"UserName":"Larry", "UserMessage":["Thank You", "Amazing", "Nice"]}); { "acknowledged" : true, "insertedId" : ObjectId("5cd684d27924bb85b3f4895a") } >db.valueInArrayDemo.insertOne({"UserName":"Carol", "UserMessage":["Awesome", "Bye", "Cool"]}); { ... Read More

Smita Kapse
2K+ Views
Here we will see the Bind function and the placeholders in C++. Sometimes we need to manipulate the operation of some functions as we need. We can use some default parameters to get some essence of manipulating.In C++11, one new feature is introduced, called the bind function. This helps us ... Read More

Smita Kapse
549 Views
In this section we will see how to see the Host name and IP address of the local system in an easier way. We will write a C program to find the host name and IP.Some of the following functions are used. These functions have a different task. Let us ... Read More

Smita Kapse
146 Views
You can use only $pull operator that removes and updates the existing record in MongoDB. Let us first create a collection with documents −> db.removeDemo.insertOne( ... { ... "UserName" : "Larry", ... "UserDetails" : [ ... { ... ... Read More

Smita Kapse
185 Views
To get the count of siblings of this node, use the getSiblingCount() method. Let’s say you have a node with 4 child nodes. Find the sibling of any of this node’s child node. Here, “eight” is the child node −eight.getSiblingCount());Note − Remember, a node is it’s own sibling.The following is ... Read More

Smita Kapse
330 Views
Let’s say you have saved the Login date of users. Now, you want the users who logged in between specific dates i.e. login date. For this, use $gte and $lt operator along with count(). Let us first create a collection with documents −> db.findDataByDateDemo.insertOne({"UserName":"John", "UserLoginDate":new ISODate("2019-01-31")}); { "acknowledged" : ... Read More

Smita Kapse
619 Views
Let us consider the following example, which uses an array of 3 integers −In CExample Live Demo#include const int MAX = 3; int main () { int var[] = {10, 100, 200}; int i; for (i = 0; i < MAX; i++) { printf("Value ... Read More