Ankith Reddy has Published 996 Articles

Style every element that has no children with CSS

Ankith Reddy

Ankith Reddy

Updated on 30-Jun-2020 09:50:29

961 Views

To style every element that has no children with CSS, use the: empty selector t. You can try to run the following code to implement the: empty selectorExampleLive Demo                    p.demo {             width: ... Read More

Style the active link with CSS

Ankith Reddy

Ankith Reddy

Updated on 30-Jun-2020 09:43:02

909 Views

To style the active links, use the CSS :active selector. You can try to run the following code to style the active linksExampleLive Demo                    a:active {             background-color: green;          }                     Welcome to Qries       Click on the above link to see the effect.    

Access to Python’s configuration information

Ankith Reddy

Ankith Reddy

Updated on 30-Jun-2020 09:27:46

610 Views

Configuration information of Python's installation can be accessed by the sysconfig module. For example the list of installation paths and the configuration variables specific to the installation platform.The sysconfig module provides the following functions to access Configuration variablessysconfig.get_config_vars()With no arguments, this function returns a dictionary of all configuration variables relevant ... Read More

Count values from comma-separated field in MySQL?

Ankith Reddy

Ankith Reddy

Updated on 30-Jun-2020 07:51:30

4K+ Views

You can count values from comma-separated field using CHAR_LENGTH() method from MySQL. The syntax is as follows −SELECT *, (CHAR_LENGTH(yourColumnName) - CHAR_LENGTH(REPLACE(yourColumnName, ', ', '')) + 1) as anyVariableName from yourTableName;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> ... Read More

Style the element that has focused on CSS

Ankith Reddy

Ankith Reddy

Updated on 30-Jun-2020 07:45:24

126 Views

To select the element that has focus, use the: focus selector. You can try to run the following code to implement the: focus selector −Example                    input:focus {             background-color: green;          }                              Subject          Student:          Age:

MySQL Query to remove all characters after last comma in string?

Ankith Reddy

Ankith Reddy

Updated on 30-Jun-2020 07:40:45

4K+ Views

To remove all characters after the last comma in the string, you can use SUBSTRING_INDEX().If you do not know the location of the last comma, then you need to find the last comma dynamically using LENGTH().The syntax is as follows −UPDATE yourTableName set yourColumnName = SUBSTRING_INDEX(yourColumnName, ', ', LENGTH(yourColumnName) - ... Read More

Find out if a varchar contains a percent sign in MySQL?

Ankith Reddy

Ankith Reddy

Updated on 30-Jun-2020 07:31:59

444 Views

To find out a varchar contains a percent sign in MySQL, you can use LIKE operator. The syntax is as follows −SELECT * FROM yourTableName WHERE yourColumnName like '%|%%' escape '|';To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> ... Read More

MySQL get hash value for each row?

Ankith Reddy

Ankith Reddy

Updated on 30-Jun-2020 07:24:41

2K+ Views

Get hash value of each row using MD5() function from MySQL. The syntax is as follows −SELECT MD5(CONCAT(yourColumnName1, yourColumnName2, yourColumnName3, .......N)) as anyVariableName FROM yourTableName;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table getHashValueForEachRow    -> ( ... Read More

MySQL BETWEEN without endpoints?

Ankith Reddy

Ankith Reddy

Updated on 30-Jun-2020 07:01:10

252 Views

If you do not want to include the end value in between, then use the following syntax −SELECT * FROM yourTableName WHERE yourColumnName BETWEEN yourStartingValue and yourEndingValue and    yourColumnName not in (yourEndingValue );To understand the above syntax, let us create a table. The query to create a table is ... Read More

MySQL - SELECT … WHERE id IN (..) order with particular column?

Ankith Reddy

Ankith Reddy

Updated on 30-Jun-2020 06:42:32

5K+ Views

You can SELECT ….WHERE id IN(..) using field() function to order with any column. The syntax is as follows −SELECT *FROM yourTableName WHERE yourColumnName IN(‘value1’, ’value2’, .......N) ORDER BY FIELD(yourColumnName, value1’, ’value2’, .......N);To understand the above syntax, let us create a table −mysql> create table SelectOrderbyField    -> (   ... Read More

Previous 1 ... 3 4 5 6 7 ... 100 Next
Advertisements