Articles on Trending Technologies

Technical articles with clear explanations and examples

How to use toLowerCase () in Android textview?

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 1K+ Views

This example demonstrate about How to use toLowerCase () 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.         In the above code, we have taken name as Edit text, when user click on button it will take data and Convert into lower letters.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; ...

Read More

How to work with array variable in MySQL?

Rama Giri
Rama Giri
Updated on 30-Jul-2019 2K+ Views

MySQL does not support array variables. To get the same result, use the table DUAL. Following is the syntax:SELECT yourValue1 AS ArrayValue FROM DUAL UNION ALL SELECT yourValue2 FROM DUAL UNION ALL SELECT yourValue3 FROM DUAL UNION ALL SELECT yourValue4 FROM DUAL UNION ALL . . . . . . SELECT yourValueN FROM DUAL;Let us create a sample table:mysql> SELECT 1 AS ArrayValue FROM DUAL       UNION ALL       SELECT 2 FROM DUAL       UNION ALL       SELECT 3 FROM DUAL       UNION ALL       SELECT 4 FROM ...

Read More

How to disable "Establishing SSL connection without server's identity verification is not recommended" warning when connecting to MySQL database in Java?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 13K+ Views

To disable the warning while connecting to a database in Java, use the below concept −autoReconnect=true&useSSL=falseThe complete syntax is as follows −yourJdbcURL="jdbc:mysql://localhost:yourPortNumber/yourDatabaseName?autoReconnect=true&useSSL=false";Here is the warning message if you do not include “useSSL=false” −Wed Feb 06 18:53:39 IST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore ...

Read More

JavaTuples setAt0() method for Quintet class

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 167 Views

The setAt0() method is used to set the Quintet value in JavaTuples and a copy with a new value at the specified index i.e. index 0 here.Let us first see what we need to work with JavaTuples. To work with Quintet class in JavaTuples, you need to import the following package −import org.javatuples.Quintet;Note − Steps to download and run JavaTuples program If you are using Eclipse IDE to run Quintet Class in JavaTuples, then Right Click Project → Properties → Java Build Path → Add External Jars and upload the downloaded JavaTuples jar file.The following is an example −Exampleimport org.javatuples.Quintet; ...

Read More

How to increment all the rows of a particular column by 1 in a single MySQL query (ID column +1)?

Ankith Reddy
Ankith Reddy
Updated on 30-Jul-2019 2K+ Views

To increment all the rows of a particular ID column by 1, you need to use UPDATE command and update the table. The syntax of the query is as follows. We have also used ORDER BY hereUPDATE yourTableName SET yourIdColumnName=yourIdColumnName+1 ORDER BY yourIdColumnName DESC;To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table IdColumnadd1Demo - > ( - > Id int NOT NULL AUTO_INCREMENT PRIMARY KEY - > ); Query OK, 0 rows affected (0.58 sec)Insert some records in the ...

Read More

How to append data from priority queue to arraylist for listview in Android?

Samual Sam
Samual Sam
Updated on 30-Jul-2019 248 Views

This example demonstrate about How to append data from priority queue to arraylist for listview 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.                                 In the above code, we have taken name as Edit text, when user click on save button it will store the data into arraylist. Click on refresh button to get the changes of ...

Read More

How to call a stored procedure using select statement in MySQL?

Rama Giri
Rama Giri
Updated on 30-Jul-2019 5K+ Views

In MySQL, it is not possible to use select from procedure in FROM clause. You can use CALL command and after that the SELECT statement can be executed.Let us first create a table:mysql> create table DemoTable2    -> (    -> CustomerId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> CustomerName varchar(100),    -> ShippingDateTime datetime    -> ); Query OK, 0 rows affected (0.66 sec)Following is the query to create stored procedure:mysql> DELIMITER // mysql> CREATE PROCEDURE insert_information(Name varchar(100), shippingtime datetime)    -> BEGIN    ->    -> INSERT INTO DemoTable2(CustomerName, ShippingDateTime) VALUES(Name, shippingtime);    -> END    -> ...

Read More

Do computers today offer better internet communication than smartphones?

Anuradha Nanda
Anuradha Nanda
Updated on 30-Jul-2019 148 Views

As per a recent survey, more than a third of all adults (34%) use their smartphone within five minutes of waking up, which is a figure that takes a sharp rise to almost half (49%) of those aged 18-24. While there are many important factors, but the biggest contributor to this has been subscriptions to the high-speed 4G mobile internet, which was first introduced in the UK in 2012.4G Subscriptions: providing easy access to 4G speed networks to India, one of the youngest and most populous countries in the world made smartphone usage rise eightfold from 2.7 million in the ...

Read More

How to share intent from intentservice in android?

Nitya Raut
Nitya Raut
Updated on 30-Jul-2019 480 Views

Before getting into example, we should know what Intent service is in android. Intent Service is going to do back ground operation asynchronously. When user call startService() from activity , it doesn’t create instance for each request. It going to stop service after done some action in service class or else we need to stop service using stopSelf().This example demonstrate about How to share intent from intentservice.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

Where is the MySQL database gets saved when it is created?

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 580 Views

If you want the database location i.e. where it is created in MySQL, you can use system variable @@datadir.The syntax is as followsSELECT @@datadir;The following is the querymysql> select @@datadir;Here is the output. The above query returns the location+---------------------------------------------+ | @@datadir | +---------------------------------------------+ | C:\ProgramData\MySQL\MySQL Server 8.0\Data\ | +---------------------------------------------+ 1 row in set (0.00 sec)Now reach the above directory in your system. The screenshot of the ...

Read More
Showing 59791–59800 of 61,297 articles
Advertisements