Ankith Reddy has Published 1132 Articles

How to check visibility of virtual keyboard on Android?

Ankith Reddy

Ankith Reddy

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

797 Views

There are some situations, we should find keyboard is visible or not in particular activity. In this example we can check visibility of virtual keyboard on android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a ... Read More

strtr() function in PHP

Ankith Reddy

Ankith Reddy

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

38 Views

The strstr() is used to translate a character or replace substring. Syntax strstr(str, from, to) or strstr(str, arr) Parameters str − The string to translate from − The characters to change. A required parameter if array is not used. to − The characters to ... Read More

How should I enable LOAD DATA LOCAL INFILE in my.cnf in MySQL?

Ankith Reddy

Ankith Reddy

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

2K+ Views

We can enable it with the help of the SET command with GLOBAL. The first time, local infile will be off. The following is the syntax. mysql> SHOW GLOBAL VARIABLES LIKE 'local_infile'; Here is the output. +---------------+-------+ | Variable_name | Value | +---------------+-------+ | local_infile  | OFF ... Read More

How to install Python MySQLdb module using pip?

Ankith Reddy

Ankith Reddy

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

2K+ Views

To install python MySQLdb module, we need to install Python current version i.e. 3.7 We need to find the location of Python Scripts where pip command is located. First, open the cmd and reach the location of Python Scripts. To open cmd, press “Windows+R” and type cmd. Here is the ... Read More

How to shrink/ purge ibdata1 file in MySQL?

Ankith Reddy

Ankith Reddy

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

2K+ Views

The ibdata1 file cannot shrink, it is a particularly troublesome feature of MySQL. The ibdata1 file can be shrinked if you delete all databases, remove the files and reload the mysqldump. We can configure MySQL so that each table, including its indexes, is stored as a separate file. It is ... Read More

Swapping two column values in MySQL?

Ankith Reddy

Ankith Reddy

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

6K+ Views

To swap two columns, we can apply the below swapping logic. Add both values and store them into the first column Subtract the first column’s value from the second and store it into the second column. Subtract the first column’s value from the updated second column and store it ... Read More

Methods of the Thread Class

Ankith Reddy

Ankith Reddy

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

403 Views

Some of the popular methods of a Thread class is start, sleep, jon, and abort. Let us see the complete list of methods − Sr.No. Method & Description 1 public void Abort() Raises a ThreadAbortException in the thread on which it is invoked, to begin the ... Read More

ERROR 1396 (HY000): Operation CREATE USER failed for 'root'@'localhost'?

Ankith Reddy

Ankith Reddy

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

10K+ Views

In the system, the root is defined by another name as well as password. Then the user is created as a root with the help of the create command. This will result in the ERROR 1396. The query for this is given as follows − mysql> create user 'root'@'localhost' ... Read More

How can I tell when a MySQL table was last updated?

Ankith Reddy

Ankith Reddy

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

7K+ Views

We can know that with the help of the column name ‘UPDATED_TIME’ using information_schema.tables with WHERE clause. Let us first create a table for our example. mysql> create table MyISAMTableDemo   -> (   -> id int   -> ); Query OK, 0 rows affected (0.56 sec) Inserting ... Read More

How to add super privileges to MySQL database?

Ankith Reddy

Ankith Reddy

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

6K+ Views

Firstly, check the MySQL database with DESC command. mysql>DESC mysql.db; The following is the output. +-----------------------+---------------+------+-----+---------+-------+ | Field | Type | Null ... Read More

Advertisements