- 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
Smita Kapse has Published 558 Articles
Smita Kapse
281 Views
The $exists is used to check whethre a filed exists, whereas $ne is for not equal condition. Let us first create a collection with documents −> db.existsDemo.insertOne({"Name":"Chris", "Age":21}); { "acknowledged" : true, "insertedId" : ObjectId("5cd7c3916d78f205348bc650") } > db.existsDemo.insertOne({"Name":"", "Age":null}); { "acknowledged" : true, "insertedId" : ObjectId("5cd7c39a6d78f205348bc651") } > db.existsDemo.insertOne({"Name":null, "Age":24}); { "acknowledged" : true, "insertedId" : ObjectId("5cd7c3a66d78f205348bc652") } > db.existsDemo.insertOne({"Age":23}); ... Read More
Smita Kapse
130 Views
In C++, a null pointer can be defined by as a null pointer constant is an integer constant expression with the value 0, like −int*p = 0;But in c, a null pointer can be defined by as a null pointer constant is an integer constant expression with the value 0 ... Read More
Smita Kapse
134 Views
In C++, the inline keyword is used in different places. To create inline variables, or inline namespace, and as well as to create inline methods or functions.C++ inline function is powerful concept that is commonly used with classes. If a function is inline, the compiler places a copy of the ... Read More
Smita Kapse
142 Views
You can use aggregate framework for this. Let us first create a collection with documents −>db.exactPositionDemo.insertOne({"StudentName":"John", "StudentScores":[78, 98, 56, 45, 89]}); { "acknowledged" : true, "insertedId" : ObjectId("5cd29a1c345990cee87fd883") }Following is the query to display all documents from a collection with the help of find() method −> db.exactPositionDemo.find().pretty();This will ... Read More
Smita Kapse
221 Views
Minor Tick marks is the number passed in representing the distance between each minor tick mark. For example, a slider with range from 0 to 70 and minor tick spacing 10, would give minor ticks next to the following values: 0, 10, 20, 30, 40, 50, 60, 70.To set minor ... Read More
Smita Kapse
12K+ Views
Here we will see how to compare two floating point data using C++. The floating point comparison is not similar to the integer comparison.To compare two floating point values, we have to consider the precision in to the comparison. For example, if two numbers are 3.1428 and 3.1415, then they ... Read More
Smita Kapse
284 Views
This example demonstrate about How to create a local Notifications 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
Smita Kapse
554 Views
The stack − All variables declared inside the function will take up memory from the stack. So, any local variable inside a function lives on the stack.The heap − This is unused memory of the program and can be used to allocate the memory dynamically when program runs. So If ... Read More
Smita Kapse
116 Views
You need to use $set operator along with upsert:true. Let us first create a collection with documents −> db.updateWithUpsertDemo.insertOne({"StudentFirstName":"John", "StudentAge":21}); { "acknowledged" : true, "insertedId" : ObjectId("5cd2a61c345990cee87fd890") } > db.updateWithUpsertDemo.insertOne({"StudentFirstName":"Larry", "StudentAge":23}); { "acknowledged" : true, "insertedId" : ObjectId("5cd2a624345990cee87fd891") } > db.updateWithUpsertDemo.insertOne({"StudentFirstName":"David", "StudentAge":24}); { "acknowledged" : ... Read More
Smita Kapse
917 Views
To set the foreground color for different words, use the SimpleAttributeSet and StyleConstants class. With that, use StyledDocument class as well for different words style. For different words, use insertString().At first, create a new JTextPane -At first, create a new JTextPane: JTextPane pane = new JTextPane();Now, use the classes to ... Read More