Smita Kapse has Published 498 Articles

MySQL query to display databases sorted by creation date?

Smita Kapse

Smita Kapse

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

576 Views

You can display databases sorted by creation date with ORDER BY clause. Following is the query to display all databases −mysql> show databases;This will produce the following output −+---------------------------+ | Database                  | +---------------------------+ | bothinnodbandmyisam       | | business   ... Read More

MongoDB aggregation framework match OR is possible?

Smita Kapse

Smita Kapse

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

232 Views

Let us first create a collection with the document. The query to create a collection with a document is as follows −> db.aggregationFrameworkWithOrMatchDemo.insertOne({"StudentFirstName":"John",    "StudentLastName":"Smith", "StudentAge":23}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c8ac3a96cea1f28b7aa080d") } > db.aggregationFrameworkWithOrMatchDemo.insertOne({"StudentFirstName":"Carol",    "StudentLastName":"Tayor", "StudentAge":24}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c8ac3bc6cea1f28b7aa080e") ... Read More

How to use unlikely () in Android sqlite?

Smita Kapse

Smita Kapse

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

132 Views

Before getting into example, we should know what sqlite database in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to access ... Read More

How to remove partial text from value in MySQL?

Smita Kapse

Smita Kapse

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

556 Views

In order to remove partial text from value, you can use REPLACE() from MySQL. Following is the syntax −update yourTableName set yourColumnName = replace(yourColumnName ,'yourValue ', '' );Let us first create a table −mysql> create table removePartialTextDemo    -> (    -> JavaVersionDetails varchar(100)    -> ); Query OK, 0 ... Read More

How to change date and time format in Android sqlite?

Smita Kapse

Smita Kapse

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

708 Views

Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to ... Read More

How to use isEmpty() in Android textview?

Smita Kapse

Smita Kapse

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

1K+ Views

This example demonstrate about How to use isEmpty() in Android textview.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

How to get current address from Network provider in android?

Smita Kapse

Smita Kapse

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

346 Views

This example demonstrate about How to get current address from Network provider 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 res/layout/activity_main.xml.     ... Read More

The indexOf() method of AbstractSequentialList in Java

Smita Kapse

Smita Kapse

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

122 Views

The indexOf() method is inherited from the AbstractList class. It is used to return the index of the first occurrence of the specified element in this list. If the list is empty, it returns -1.The syntax is as follows −public int indexOf(Object ele)Here, ele is the element for which you ... Read More

How to get device make and model on iOS?

Smita Kapse

Smita Kapse

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

3K+ Views

When we talk about the device make, we refer to the Phone manufacturer (e.g. Apple, Samsung, Nokia and so on) and device model is generally the specific product such as iPhone, iPad/TAB etc.Any mobile devices will be categorized using make and model only.Now let’s understand how do I get device ... Read More

Search for a value in Java LabelValue Tuple

Smita Kapse

Smita Kapse

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

110 Views

To search for a value in the LabelValue tuple in Java, use the contains() method. It returns a boolean value. TRUE is returned if the value exists, else FALSE is the return value. Let us first see what we need to work with JavaTuples. To work with LabelValue class in ... Read More

Advertisements