- 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
Anvi Jain has Published 629 Articles
![Anvi Jain](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
1K+ Views
In C, we get the qsort() function. This is used to sort some array using quicksort technique. In this function we have to pass the comparator function. This comparator function takes two arguments. Then compares them and get the relative order between them. These two arguments are pointers, and type ... Read More
![Anvi Jain](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
632 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](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
119 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](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
1K+ 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](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
68 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](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
655 Views
Use the getChildCount() method in Java to get the count of child nosed of any node i.e. even if it’s a root node or not.Let’s say we want the count of child nodes for node 1, which is not a root node, therefore −node1.getChildCount()The following is an example to get ... Read More
![Anvi Jain](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
955 Views
Here we will see how to create self-destructing code in C. The self-destructing code is basically executing the code, and then remove the executable file after executing it.This task is very simple. We need to get the executable file name to remove it. We can use the command line arguments. ... Read More
![Anvi Jain](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
165 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](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
450 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](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
58 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