
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
Anvi Jain has Published 569 Articles

Anvi Jain
2K+ Views
RAII in C++RAII (Resource Acquisition Is Initialization) is C++ technique which control the life cycle of resource. It is a class variant and is tied to object life time.It encapsulates several resources into class where resource allocation is done by constructor during object creation and resource deallocation is done by ... Read More

Anvi Jain
833 Views
Let us first create a collection with documents −> db.excludeIdDemo.insertOne({"StudentFirstName":"John", "StudentAge":21}); { "acknowledged" : true, "insertedId" : ObjectId("5cd701a56d78f205348bc632") } > db.excludeIdDemo.insertOne({"StudentFirstName":"Robert", "StudentAge":20}); { "acknowledged" : true, "insertedId" : ObjectId("5cd701af6d78f205348bc633") } > db.excludeIdDemo.insertOne({"StudentFirstName":"Chris", "StudentAge":24}); { "acknowledged" : true, "insertedId" : ObjectId("5cd701b86d78f205348bc634") }Following is the query ... Read More

Anvi Jain
161 Views
You can use positional operator $ for this. Let us first create a collection with documents −> db.subElementQueryingDemo.insertOne( ... { ... "ClientName":"Chris", ... "Status": [ { "isMarried": true }, { "isMarried": false } ] ... } ... ); { "acknowledged" : ... Read More

Anvi Jain
2K+ Views
To create high precision timer we can use the chrono library. This library has high resolution clock. This can count in nanoseconds.In this program we will see the execution time in nanoseconds. We will take the time value at first, then another time value at the last, then find the ... Read More

Anvi Jain
131 Views
Yes, you can achieve this using aggregate framework. Let us first create a collection with documents −> db.sliceOfSliceDemo.insertOne( ... { ... "Name": "John", ... "Details": [["First 1:1", "First 1:2"], ["second 2:1", "Second 2:2"]] ... } ... ); { "acknowledged" : true, ... Read More

Anvi Jain
227 Views
Use $addToSet operator to update array element. Let us first create a collection with documents −> db.updateArrayDemo.insertOne( ... { ... ... "ClientDetails" : [ ... { ... "ClientName" : "John", ... ... Read More

Anvi Jain
630 Views
This example demonstrate about How to schedule notification in android.Step 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 − Add the following code ... Read More

Anvi Jain
118 Views
Yes, you can use the findOne(). Following is the syntax −db.yourCollectionName.findOne();You can use toArray() as well −db.yourCollectionName.find().toArray();Let us first create a collection with documents −> db.betterFormatDemo.insertOne({"StudentName":"Adam Smith", "StudentScores":[98, 67, 89]}); { "acknowledged" : true, "insertedId" : ObjectId("5cd7ab826d78f205348bc640") } > db.betterFormatDemo.insertOne({"StudentName":"John Doe", "StudentScores":[67, 89, 56]}); { "acknowledged" : ... Read More

Anvi Jain
511 Views
Use drop() to delete a table. Following is the syntax −db.yourCollectionName.drop();Let us first create a collection with documents −> db.deleteTableDemo.insertOne({"Name":"Chris", "Age":23}); { "acknowledged" : true, "insertedId" : ObjectId("5ccfb705140b992277dae0e6") } > db.deleteTableDemo.insertOne({"Name":"Carol", "Age":21}); { "acknowledged" : true, "insertedId" : ObjectId("5ccfb70c140b992277dae0e7") } > db.deleteTableDemo.insertOne({"Name":"David", "Age":24}); { "acknowledged" ... Read More

Anvi Jain
643 Views
Here we will see how to hide some string into some binary code (Here binary code is represented in hexadecimal number).The approach is very simple. We can use the string stream to convert decimal number to hexadecimal numbers. Now from the string, we will read each character, and take its ... Read More