George John has Published 1299 Articles

Fetch rows where first character is not alphanumeric in MySQL?

George John

George John

Updated on 30-Jun-2020 12:42:48

To fetch rows where first character is not alphanumeric, you can use the following regular expression.Case 1 − If you want those rows that starts from a digit, you can use the following syntax −SELECT *FROM yourTableName WHERE yourColumnName REGEXP '^[0-9]';Case 2 − If you want those rows that start ... Read More

gmp_intval() function in PHP

George John

George John

Updated on 30-Jun-2020 11:37:58

The gmp_intval() function returns the integer value of a variable.Syntaxintval ( $var, $base )Parametersvar − The variable which needs to be converted to its integer value.base − The base for conversion of $var to its corresponding integer.ReturnThe gmp_intval() function returns the integer value for var.Example Live DemoThe following is an example ... Read More

gmp_cmp() function in PHP

George John

George John

Updated on 30-Jun-2020 11:30:46

The gmp_cmp() function compares two GMP numbers.Syntaxgmp_cmp(n1, n2)Parametersn1 − The first GMP number. It can be GMP object in PHP version 5.6 and later. Can also be numeric strings.n2 − The second GMP number. It can be GMP object in PHP version 5.6 and later. Can also be numeric strings.ReturnThe ... Read More

What is Gray code?

George John

George John

Updated on 30-Jun-2020 11:18:18

The reflected binary code or Gray code is an ordering of the binary numeral system such that two successive values differ in only one bit (binary digit). Gray codes are very useful in the normal sequence of binary numbers generated by the hardware that may cause an error or ambiguity ... Read More

Role of CSS :nth-child(n) Selector

George John

George John

Updated on 30-Jun-2020 11:18:06

Use the CSS :nth-child(n) selector to style every element that is the second child of its parent with CSS. You can try to run the following code to implement the :nth-child(n) selectorExampleLive Demo                    p:nth-child(4) {       ... Read More

Style every element that is the nth element of its parent with CSS

George John

George John

Updated on 30-Jun-2020 11:15:07

Use the CSS :nth-of-type(n) selector to style every element that is the nth element of its parent. You can try to run the following code to implement the :nth-of-type(n) selectorExampleLive Demo                    p:nth-of-type(2) {         ... Read More

Bipolar Junction Transistor

George John

George John

Updated on 30-Jun-2020 10:57:50

A Bipolar Junction Transistor (BJT) is a three terminal circuit or device that amplifies flow of current. It is solid state device that flows current in two terminals, i.e., collector and emitter and controlled by third device known as terminal or base terminal. Unlike a normal p-n junction diode, this ... Read More

Role of CSS :first-of-type Selector

George John

George John

Updated on 30-Jun-2020 09:48:52

Use the CSS :first-of-type selector to style every element that is the first element of its parent with CSS.ExampleYou can try to run the following code to implement the :first-of-type selectorLive Demo                    p:first-of-type {             background: orange;          }                     This is demo text1.       This is demo text2.    

Conversions between color systems using Python (colorsys)

George John

George John

Updated on 30-Jun-2020 09:30:03

The RGB color model, named so because of the initials of the three additive primary colors, is an additive color model in which red, green and blue light are added to reproduce various colors.The RGB color model is used in representation and display of images in electronic systems, such as ... Read More

Determine type of sound file using Python (sndhdr)

George John

George John

Updated on 30-Jun-2020 09:28:38

The sndhdr module in Python's standard library provides utility functions that read the type of sound data which is in a file. The functions return a namedtuple(), containing five attributesfiletypestring representing 'aifc', 'aiff', 'au', 'hcom', 'sndr', 'sndt', 'voc', 'wav', '8svx', 'sb', 'ub', or 'ul'.frameratethe sampling_rate will be either the actual ... Read More

Advertisements