- 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](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
235 Views
To search a sub-filed in MongoDB, you can use double quotes along with dot notation. Let us first create a collection with documents −> db.searchSubFieldDemo.insertOne( ... { ... "UserDetails": ... {"UserEmailId":"John123@gmail.com", "UserAge":21} ... } ... ); { "acknowledged" : true, "insertedId" : ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
2K+ Views
In C++, the friendship is not inherited. It means that, if one parent class has some friend functions, then the child class will not get them as friend.In this example it will generate an error because the display() function is friend of MyBaseClass but not the friend of MyDerivedClass. The ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
238 Views
Let us first create a collection with documents −>db.missingDocumentDemo.insertOne({"StudentFirstName":"Adam", "StudentLastName":"Smith"}); { "acknowledged" : true, "insertedId" : ObjectId("5cd3fb1eedc6604c74817ce6") } >db.missingDocumentDemo.insertOne({"StudentFirstName":"Carol", "StudentLastName":"Taylor"}); { "acknowledged" : true, "insertedId" : ObjectId("5cd3fb29edc6604c74817ce7") } >db.missingDocumentDemo.insertOne({"StudentFirstName":"David", "StudentLastName":"Miller", "StudentAge":21}); { "acknowledged" : true, "insertedId" : ObjectId("5cd3fb40edc6604c74817ce8") }Following is the query to display ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
1K+ Views
To disable only the vertical scrollbar, use the VERTICAL_SCROLLBAR_NEVER constant, which displays only the horizontal scrollbar.The following is an example to disable only the vertical scrollbar in Java −Examplepackage my; import java.awt.BorderLayout; import java.awt.Dimension; import javax.swing.Box; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JScrollPane; public class SwingDemo { public static void ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
220 Views
This example demonstrate about How can I marquee the text content in Android Notification.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. ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
136 Views
You can use aggregate framework for this. Let us first create a collection with documents −> db.summingSubDocumentDemo.insertOne( ... { "_id" :101, "CustomerDetails" : { "CustomerPurchase" : { "CustomerPurchaseAmount" : 2000 } } }); { "acknowledged" : true, "insertedId" : 101 } > db.summingSubDocumentDemo.insertOne( { "_id" :102, "CustomerDetails" : { ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
284 Views
This example demonstrate about How to create an Android notification with a longer textStep 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. ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
281 Views
You can use $avg operator along with aggregate framework. Let us first create a collection with documents −> db.averageOfRatingsInArrayDemo.insertOne( ... { ... "StudentDetails":[ ... { ... "StudentId":1, ... "StudentScore":45 ... ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
3K+ Views
One way to get the name of the underlying database you have connected with is by invoking the getDatabaseProductName() method of the DatabaseMetaData interface. This method returns the name of the underlying database in String format.Therefore, to retrieve the name of your current database using Java code −Retrieve the DatabaseMetaData ... Read More