
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
2K+ Views
C++ has a standard library that contains common functionality you use in building your applications like containers, algorithms, etc. If names used by these were out in the open, for example, if they defined a queue class globally, you'd never be able to use the same name again without conflicts. ... Read More

Smita Kapse
433 Views
For this, use the $size operator. Let us first create a collection with documents −> db.checkIfListIsNotEmptyDemo.insertOne({"UserFriendGroup":["John", "David"]}); { "acknowledged" : true, "insertedId" : ObjectId("5cdd99e8bf3115999ed511f7") } > db.checkIfListIsNotEmptyDemo.insertOne({"UserFriendGroup":["Carol"]}); { "acknowledged" : true, "insertedId" : ObjectId("5cdd99e9bf3115999ed511f8") } > db.checkIfListIsNotEmptyDemo.insertOne({"UserFriendGroup":[]}); { "acknowledged" : true, "insertedId" : ObjectId("5cdd99ebbf3115999ed511f9") ... Read More

Smita Kapse
606 Views
Here we will see what are the differences between destructor and the free() functions in C++. The destructor is used to perform some action, just before the object is destroyed. This action may not freeing up the memory, but can do some simple action such as displaying one message on ... Read More

Smita Kapse
7K+ Views
Here we will see how to count number of objects are created from a specific class using some static member functions. The static members are class properties, not the object properties. For a single class there will be only one instance for static members. No new members are created for ... Read More

Smita Kapse
2K+ Views
To count the number of rows of a table, use the getRowCount() method −table.getRowCount()To count the number of columns of a table, use the getColumnCount() method −table.getColumnCount()The following is an example to get the number of rows and columns of a JTable −Examplepackage my; import java.awt.Font; import javax.swing.JFrame; import javax.swing.JScrollPane; ... Read More

Smita Kapse
5K+ Views
To fund a value from JSON data, use the find() along with dot(.) notation. Let us first create a collection with documents −> db.findValueFromJsonDemo.insertOne( { "UserDetails": [{ "_id": new ObjectId(), "UserName": "Carol", "UserMessage": "Hi" ... Read More

Smita Kapse
220 Views
You can use $pull operator. Let us first create a collection with documents −> db.pullAnArrayElementDemo.insertOne( { "StudentDetails": [ { "StudentFirstName":"Chris", "StudentScore":56 }, {"StudentFirstName":"Robert", "StudentScore":59 } ] } ); { "acknowledged" : true, "insertedId" : ObjectId("5cd3b55bedc6604c74817cd5") }Following is the query to display all documents from a collection with the ... Read More

Smita Kapse
651 Views
In C++ or Java we can get the static keyword. They are mostly same, but there are some basic differences between these two languages. Let us see the differences between static in C++ and static in Java.The static data members are basically same in Java and C++. The static data ... Read More

Smita Kapse
310 Views
To get the size of all the documents in a query, you need to loop through documents. Let us first create a collection with documents −> db.sizeOfAllDocumentsDemo.insertOne({"StudentFirstName":"John", "StudentSubject":["MongoDB", "Java"]}); { "acknowledged" : true, "insertedId" : ObjectId("5cd3c0c1edc6604c74817cd7") } > db.sizeOfAllDocumentsDemo.insertOne({"StudentFirstName":"Larry", "StudentSubject":["MySQL", "PHP"], "StudentAge":21}); { "acknowledged" : true, ... Read More

Smita Kapse
168 Views
The sizeof function (Sometimes called operator) is used to calculate the size of the given argument. If some other functions are given as argument, then that will not be executed in the sizeof.In the following example we will put one printf() statement inside the loop. Then we will see the ... Read More