Ankith Reddy has Published 996 Articles

Remove all elements in Java IdentityHashMap

Ankith Reddy

Ankith Reddy

Updated on 29-Jun-2020 13:22:48

140 Views

Use the clear() method to remove all the elements from IdentityHashMap in Java.Create a IdentityHashMap and add some elementsMap m = newIdentityHashMap(); m.put("1", 100); m.put("2", 200); m.put("3", 300); m.put("4", 150); m.put("5", 110); m.put("6", 50); m.put("7", 90); m.put("8", 250); m.put("9", 350); m.put("10", 450);Now, let us remove all the elementm.clear();The following is ... Read More

NavigableMap lowerEntry() method in Java

Ankith Reddy

Ankith Reddy

Updated on 29-Jun-2020 13:12:15

122 Views

The lowerEntry() method in NavigabelMap returns a key-value mapping associated with the greatest key strictly less than the given key.The following is an example to implement lowerEntry() methodExample Live Demoimport java.util.*; public class Demo {    public static void main(String[] args) {       NavigableMap n = new TreeMap();   ... Read More

List MySQL tables and sizes ordered by size?

Ankith Reddy

Ankith Reddy

Updated on 29-Jun-2020 12:17:27

2K+ Views

You can do this with the help of information_schema.tables. The syntax is as follows -SELECT TABLE_NAME, table_rows, data_length, index_length, round(((data_length + index_length) / 1024 / 1024), 2) "MB Size" FROM information_schema.TABLES WHERE table_schema = "yourDatabaseName" ORDER BY (data_length + index_length) ASC;To understand the above syntax, let us implement it for ... Read More

How to get volley elements in array list in android?

Ankith Reddy

Ankith Reddy

Updated on 29-Jun-2020 12:04:45

734 Views

This example demonstrate about How to get volley elements in array list 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. In ... Read More

How to read volley json array in android?

Ankith Reddy

Ankith Reddy

Updated on 29-Jun-2020 11:58:05

2K+ Views

This example demonstrate about How to read volley json array 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.     In the ... Read More

How to sort volley elements in android?

Ankith Reddy

Ankith Reddy

Updated on 29-Jun-2020 11:29:15

163 Views

This example demonstrate about How to sort volley elements 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.     In the above ... Read More

How to sort volley json array based on id in android?

Ankith Reddy

Ankith Reddy

Updated on 29-Jun-2020 11:26:30

522 Views

This example demonstrates How to sort volley JSON array based on id 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

HTML

Ankith Reddy

Ankith Reddy

Updated on 29-Jun-2020 09:37:40

417 Views

The datetime attribute of the element is used to display the machine-readable date time.Following is the syntax −Above, the attribute datetime displays the datetime −YYYY - yearMM - monthDD - day of the monthhh - hourmm - minutesss - secondsTZD - Time Zone DesignatorYou can also set PTDHMS −P - ... Read More

How to check android mobile supports magnetometer?

Ankith Reddy

Ankith Reddy

Updated on 29-Jun-2020 09:37:37

405 Views

This example demonstrate about How to check android mobile supports magnetometerStep 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. In the above code, ... Read More

How to check android mobile supports GYROSCOPE sensor?

Ankith Reddy

Ankith Reddy

Updated on 29-Jun-2020 09:36:08

808 Views

This example demonstrates about How to check android mobile supports GYROSCOPE sensorStep 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.     In the ... Read More

Previous 1 ... 5 6 7 8 9 ... 100 Next
Advertisements