Styling Lists with CSS

AmitDiwan
Updated on 30-Dec-2019 11:04:11

223 Views

Lists are ordered as well unordered. With CSS, you can set the set list item markers or an image for the markers. With that, with CSS, we can also set the position for list-item markers.Let us now see some examples −list-style-typeThe list-style-type is used to set the type of list-item marker.ExampleLet us now see an example wherein we are formatting ordered lists (ol) − Live Demo ul {    list-style-type: upper-roman; } Teams India Australia England West Indies South Africa Srilanka Outputlist-style-imageThe list-style-image property is used to set an image as the ... Read More

Text Decoration in CSS

AmitDiwan
Updated on 30-Dec-2019 10:54:26

101 Views

For text decoration in CSS, use the text-decoration property as a shorthand property for the following properties −text-decoration-line text-decoration-color text-decoration-styleExampleLet us see an example for text decoration in CSS − Live Demo .demo {    text-decoration: overline underline; } Details Examination Center near ABC College. Exam begins at 9AM. OutputExampleLet us now see another example wherein we are using separate values − Live Demo p {    writing-mode: vertical-rl;    text-decoration-line: overline;    text-decoration-color: red;    text-decoration-style: wavy; } Demo Heading This is demo text. Output

GMP OR Function in PHP

Ankith Reddy
Updated on 30-Dec-2019 10:53:17

82 Views

The gmp_or() function computes the bitwise OR of two GMP numbers.Syntaxgmp_or(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 gmp_or() function returns the OR of the GMP numbers. The result is also a GMP number.ExampleThe following is an example:OutputThe following is the output:7

Set Text Alignment Using CSS

AmitDiwan
Updated on 30-Dec-2019 10:50:54

2K+ Views

To set text alignment using CSS, use the text-align property. Following are the possible property values −text-align: left|right|center|justify|initial|inherit;ExampleLet us see an example to set text alignment − Live Demo .demo {    -webkit-columns: auto auto; /* Chrome, Safari, Opera */    -moz-columns: auto auto; /* Firefox */    columns: auto auto;    text-align: justify; } Machine Learning Today’s Artificial Intelligence (AI) has far surpassed the hype of blockchain and quantum computing. This is due to the fact that huge computing resources are easily available to the common man. The developers now take advantage of ... Read More

Word Spacing Using CSS

AmitDiwan
Updated on 30-Dec-2019 10:42:42

89 Views

To set spacing between words, use the word-spacing property. The property values are as follows −word-spacing: normal|length|initial|inherit;ExampleLet us now see an example − Live Demo p.demo1 {    word-spacing: normal; } p.demo2 {    word-spacing: 10px; } Demo Heading Heading2 This is demo text. Heading2 This is demo text. OutputExampleLet us now see another example − Live Demo p.demo1 {    word-spacing: 3cm; } p.demo2 {    word-spacing: 40px; } Demo Heading Heading2 This is demo text. Heading2 This is demo text. Output

Python fmod Function

Pradeep Elance
Updated on 30-Dec-2019 10:39:05

558 Views

the fmod()in python implements the math modulo operation. The remainder obtained after the division operation on two operands is known as modulo operation. It is a part of standard library under the math module. In the below examples we will see how the modulo operation gives different out puts under various scenarios.Positive numbersFor positive numbers, the result is the remainder of the operation after the first integer is divided by the second. Interesting the result always comes as a float as we can see from the type of the result.Example Live Demofrom math import fmod print(fmod(6, 7)) print(type(fmod(6, 7))) print(fmod(0, 7)) ... Read More

Find Minimum of Each Index in List of Lists in Python

Pradeep Elance
Updated on 30-Dec-2019 10:36:09

2K+ Views

In some problems we need to identify the minimum of each element in a list. But in solving the matrix operations, we need to find the minimum of each column in the matrix. That needs us to find the minimum value from list of lists. Because each column of a matrix is a list of lists.Using min() and zip()In the below example we use the min() and zip(). Here the zip() function organizes the elements at the same index from multiple lists into a single list. Then we apply the min() function to the result of zip function using a ... Read More

Nested List Comprehension in Python

Pradeep Elance
Updated on 30-Dec-2019 10:32:32

2K+ Views

A nested list is a list within a list. Python provides features to handle nested list gracefully and apply common functions to manipulate the nested lists. In this article we will see how to use list comprehension to create and use nested lists in python.Creating a MatrixCreating a matrix involves creating series of rows and columns. We can use for loop for creating the matrix rows and columns by putting one python list with for loop inside another python list with for loop.Example Live Demomatrix = [[m for m in range(4)] for n in range(3)] print(matrix)Running the above code gives us ... Read More

Multi-Line Printing in Python

Pavitra
Updated on 30-Dec-2019 10:26:04

890 Views

We have usually seen the print command in python printing one line of output. But if we have multiple lines to print, then in this approach multiple print commands need to be written. This can be avoided by using another technique involving the three single quotes as seen below.Example Live Demoprint(''' Motivational Quote : Sometimes later becomes never, Do it now. Great things never come from comfort zones. The harder you work for something, the greater you'll feel when you achieve it. ''') Running the above code gives us the following result:Motivational Quote : Sometimes later becomes never, Do ... Read More

Contingency Table in Python

Pavitra
Updated on 30-Dec-2019 10:22:38

2K+ Views

A contingency table is a table showing the distribution of one variable in rows and another variable in columns. It is used to study the correlation between the two variables. It is a multiway table which describes a dataset in which each observation belongs to one category for each of several variables. Also It is basically a tally of counts between two or more categorical variables. Contingency tables are also called crosstabs or two-way tables, used in statistics to summarize the relationship between several categorical variables.The contingency coefficient is a coefficient of association which tells whether two variables or datasets ... Read More

Advertisements