George John has Published 1234 Articles

Bipolar Junction Transistor

George John

George John

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

14K+ Views

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

86 Views

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

222 Views

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

179 Views

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

Sound-playing interface for Windows in Python (winsound)

George John

George John

Updated on 30-Jun-2020 09:25:07

2K+ Views

The winsound module is specific to Python installation on Windows operating system. The module defines following functions −Beep()When this function is called a beep is heard from the PC’s speaker. The function needs two parameters. The frequency parameter specifies frequency of the sound, and must be in the range 37 ... Read More

A Simplex Stop-and-Wait Protocol for a Noisy Channel

George John

George John

Updated on 30-Jun-2020 08:12:32

8K+ Views

Simplex Stop – and – Wait protocol for noisy channel is data link layer protocol for data communications with error control and flow control mechanisms. It is popularly known as Stop – and –Wait Automatic Repeat Request (Stop – and –Wait ARQ) protocol. It adds error control facilities to Stop ... Read More

What are the difference ways to replace nulls values in MySQL using SELECT statement?

George John

George John

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

829 Views

There are lots of options available to replace NULL values using select statement. You can use CASE statement or IFNULL() or COALESCE()Case 1 − Using IFNULL()The syntax of IFNULL() is as follows −SELECT IFNULL(yourColumnName, ’yourValue’) AS anyVariableName from yourTableName;Case 2 − Using COALESCE()The syntax of COALESCE() is as follows −SELECT ... Read More

How can I change root username in MySQL?

George John

George John

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

2K+ Views

To change the root username in MySQL, you need to use UPDATE and SET command. The syntax is as follows −UPDATE user set user = ’yourNewUserName’ WHERE user = ’root’;To understand the above syntax, let us switch the database to MySQL using USE command.The query is as follows to switch ... Read More

Replace 0 with null in MySQL?

George John

George John

Updated on 30-Jun-2020 07:36:05

1K+ Views

You can use NULLIF() from MySQL to replace 0 with NULL. The syntax is as follows −SELECT *, NULLIF(yourColumnName, 0) 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 Replace0WithNULLDemo    -> (   ... Read More

MySQL LIMIT to select a single row

George John

George John

Updated on 30-Jun-2020 07:28:32

360 Views

To select a single row in MySQL, you can use LIMIT. At first, let us create a table. The query to create a table is as follows −mysql> create table selectWithPrimaryKey    -> (    -> Id int NOT NULL AUTO_INCREMENT,    -> Name varchar(20),    -> Age int,   ... Read More

Previous 1 ... 4 5 6 7 8 ... 124 Next
Advertisements