- 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
68 Views
We are inserting a tab just after the first tab by using the index value 1. Here, index 1 would be location 2nd i.e. just after the first tab of the JTabbedPane container.The following is an example to insert a tab after the first tab −Examplepackage my; import javax.swing.*; import ... Read More
Anvi Jain
79 Views
This example demonstrate about Android NotificationBuilder.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 to ... Read More
Anvi Jain
510 Views
Use $mod to get the even numbers and pull them from the array. Let us first create a collection with documents −>db.pullEvenNumbersDemo.insertOne({"AllNumbers":[101, 102, 104, 106, 108, 109, 110, 112, 14, 17, 18, 21]}); { "acknowledged" : true, "insertedId" : ObjectId("5cd45b072cba06f46efe9eea") }Following is the query to display all documents ... Read More
Anvi Jain
4K+ Views
To connect with a database using JDBC you need to select get the driver for the respective database and register the driver. You can register a database driver in two ways −Using Class.forName() method − The forName() method of the class named Class accepts a class name as a String ... Read More
Anvi Jain
2K+ Views
This example demonstrate about How to send parameters from a notification-click to an Android activity.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
Anvi Jain
56 Views
You can use $set operator along with update(). Let us first create a collection with documents −> db.workingOfUpdateMethod.insertOne({"ClientCountryName" : "AUS"}); { "acknowledged" : true, "insertedId" : ObjectId("5cd506fe2cba06f46efe9efa") } > db.workingOfUpdateMethod.insertOne({"ClientCountryName" : "AUS"}); { "acknowledged" : true, "insertedId" : ObjectId("5cd507022cba06f46efe9efb") } > db.workingOfUpdateMethod.insertOne({"ClientCountryName" : "AUS"}); { ... Read More
Anvi Jain
1K+ Views
This example demonstrate about How to play a custom sound on receiving notification 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. ... Read More
Anvi Jain
527 Views
To set FlowLayout for a frame, use the Container. At first, set a JFrame −JFrame frame = new JFrame();Now, use Container and set the layout as FlowLayout−Container container container = frame.getContentPane(); container.setLayout(new FlowLayout());The following is an example to set FlowLayout for JFrame −Examplepackage my; import java.awt.Container; import java.awt.FlowLayout; import javax.swing.JButton; ... Read More
Anvi Jain
215 Views
You can use aggregate framework for this. Let us first create a collection with documents −>db.aggregationOperatorDemo.insertOne({"FirstValue":392883, "SecondValue":10000000000}); { "acknowledged" : true, "insertedId" : ObjectId("5cd541452cba06f46efe9f01") }Following is the query to display all documents from a collection with the help of find() method −> db.aggregationOperatorDemo.find().pretty();This will produce the following output ... Read More
Anvi Jain
269 Views
This example demonstrate about How to add an extra new notification when push notification received in Android App.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 ... Read More