George John has Published 1234 Articles

How to get a list of MySQL indexes?

George John

George John

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

349 Views

Let us first see how we can display an index from MySQL. For that, use the SHOW command. The query to show an index is as follows − mysql> SHOW INDEX FROM indexingdemo; Here is the output. +--------------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+ | Table ... Read More

JDToJulian() function in PHP

George John

George John

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

27 Views

The JDToJulian() function converts a Julian day count to a Julian date. It returns the julian date as a string in the form "month/day/year". Syntax jdtojulian(julian_day); Parameters julian_day − A julian day number. Required. Return The jdtojulian() function returns the julian date as a string ... Read More

How to copy a table from one MySQL database to another?

George John

George John

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

5K+ Views

The following is the syntax to copy a table from one database to another. INSERT INTO yourDestinationDatabaseName.yourTableName SELECT * from yourSourceDatabaseName.yourtableName; Let us see an example. The CREATE command is used to create a table in the database ‘business’. We are creating a new table here. ... Read More

Python program to reverse each word in a sentence?

George John

George John

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

3K+ Views

Here we use python built in function. First we split the sentence into a list of word. Then reverse each word and creating a new list ,here we use python list comprehension technique and last joining the new list of words and create an new sentence. Example Input :: ... Read More

How to get a list of MySQL views?

George John

George John

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

3K+ Views

To get a list of MySQL views, we can use the SELECT command with LIKE operator. Let us see the syntax first. mysql> SELECT TABLE_SCHEMA, TABLE_NAME -> FROM information_schema.tables -> WHERE TABLE_TYPE LIKE 'VIEW'; The following is the output that displays the ... Read More

How to use union and order by clause in MySQL?

George John

George John

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

5K+ Views

Union is a type of operator in MySQL. We can use ORDER BY with this to filter records. Use UNION if you want to select rows one after the other from several tables or several sets of rows from a single table all as a single result set. Let us ... Read More

How to create CircularImageView in android?

George John

George John

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

843 Views

This example demonstrate about how to Create CircularImageView 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 −To make circler view, we should add CircularImageView library in gradle file as shown ... Read More

Difference between == and is operator in python.

George John

George John

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

723 Views

is and equals(==) operators are mostly same but they are not same. is operator defines if both the variables point to the same object whereas the == sign checks if the values for the two variables are the same. Example Code # Python program to # illustrate ... Read More

Escaping/encoding single quotes in JSON encoded HTML5 data attributes

George John

George John

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

3K+ Views

To escape single quotes, use json_encode() to echo arrays in HTML5 data attributes.printf('', htmlspecialchars(json_encode(array('html5', ...)), ENT_QUOTES, 'UTF-8'));Or you can also using built-injson_encode(array('html5', ...), JSON_HEX_APOS)

How to divide large numbers using Python?

George John

George John

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

860 Views

You can divide large numbers in python as you would normally do. But this has a lot of precision issues as such operations cannot be guaranteed to be precise as it might slow down the language. You would be better off using a numeric computation library like bigfloat to perform ... Read More

Advertisements