Nishtha Thakur has Published 495 Articles

How to bring up list of available notification sounds on Android?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:26

442 Views

This example demonstrate about How to bring up list of available notification sounds on 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

Search an array of hashes in MongoDB?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:26

260 Views

Let us first create a collection with documents −> db.searchAnArrayDemo.insertOne({_id:1, "TechnicalDetails":[{"Language":"MongoDB"}]}); { "acknowledged" : true, "insertedId" : 1 } > db.searchAnArrayDemo.insertOne({_id:2, "TechnicalDetails":[{"Language":"MySQL"}]}); { "acknowledged" : true, "insertedId" : 2 } > db.searchAnArrayDemo.insertOne({_id:3, "TechnicalDetails":[{"Language":"MongoDB"}]}); { "acknowledged" : true, "insertedId" : 3 } > db.searchAnArrayDemo.insertOne({_id:4, "TechnicalDetails":[{"Language":"MongoDB"}]}); { "acknowledged" : true, "insertedId" : ... Read More

Display a custom alert or a view on receiving a notification in Android

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:26

513 Views

This example demonstrate about How to display a custom alert or a view on receiving a 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 ... Read More

Delete partial data in MongoDB?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:26

181 Views

You can use map() for this. Let us first create a collection with documents −> db.deleteDemo.insertOne({"Name":"John"}); {    "acknowledged" : true,    "insertedId" : ObjectId("5cd550492cba06f46efe9f06") } > db.deleteDemo.insertOne({"Name":"Carol"}); {    "acknowledged" : true,    "insertedId" : ObjectId("5cd5504d2cba06f46efe9f07") } > db.deleteDemo.insertOne({"Name":"Sam"}); {    "acknowledged" : true,    "insertedId" : ObjectId("5cd550512cba06f46efe9f08") } ... Read More

How to create custom Push Notification for an Android App?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:26

593 Views

This example demonstrate about How can I insert an EditText (for inserting text) on an Android notificationStep 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

How to set the location of a button anywhere in JFrame?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:26

6K+ Views

To set location of a button anywhere a JFrame, use the setBounds() method. Let us first create a frame and a panel −JFrame frame = new JFrame("Demo Frame"); JPanel panel = new JPanel(); frame.getContentPane();Create a component i.e. label and set the dimensions using setBounds(). Here, you can set the location ... Read More

How to create an Android notification without the icon in the status bar?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:26

585 Views

This example demonstrate about How to create an Android notification without the icon in the status barStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details tocreate a new project.Step 2 − Add the following code to res/layout/activity_main.xml. ... Read More

How to create everyday notifications at certain time in Android?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:26

2K+ Views

This example demonstrate about How to create everyday notifications at certain time 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 ... Read More

The Adaptive Tree Walk Protocol

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:26

8K+ Views

Adaptive Tree Walk Protocol is a technique for transmitting data over shared channels that combines the advantages of collision based protocols and collision free protocols.In computer networks, when more than one station tries to transmit simultaneously via a shared channel, the transmitted data is garbled, an event called collision. In ... Read More

How to retrieve a DATALINK object from a table using JDBC?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:26

230 Views

A DATALINK object represents an URL value which refers to an external resource (outside the current database/data source), which can be a file, directory etc..You can retrieve a DATALINK object an SQL table using the getURL() method of the PreparedStatement interface. This method accepts an integer value representing an index ... Read More

Advertisements