Types of Bullet Symbols in HTML 5 Unordered List:
Pseudo-random numbers in C:
Introduction:
In Ancient Greek, the adjective:
ψευδής[1].
or, when transliterated:
‘pseudḗs’
means:
‘lying,’ ‘false,’ ‘fictitious,’ ‘sham’[2].
.
A classical computer is a deterministic machine, and, in and of itself, cannot generate a truly random number. A classical computer, in and of itself, can only generate a pseudo-random number.[3].
A pseudo-random number is not a true random number, its having been generated through a deterministic process, however it is considered, from a human perspective, random enough for most purposes.
Body:
In C, we use the:
rand()
function so as to generate a pseudo-random integer. Prior to our invoking the:
rand()
function, though, we must first:
include
the:
stdlib.h
header file.
Thus:
#include <stdlib.h>
.
The code needed so as to compile a simple pseudo-random number generator is as follows:
Snippet 1: The code needed so as to compile a simple pseudo-random number generator.
The code, as found in Snippet 1:, when compiled into an executable, outputs the following program:
Types of Bullet Symbols in HTML 5 Unordered List:
In HTML and CSS, bullets introduce items of an unordered list.
We can alter the symbol that we should like to use so as to introduce the items of an unordered list by assigning values to the:
list-style-type
property in CSS.
Without our assigning any value, at all, to the:
list-style-type
property, the default symbol that would be employed so as to introduce items of a list would be round[1] bullets.
First, let us build our list in HTML 5. Our list will concern the genres of film:
<ul>
Genres of films:
<li>Animated</li>
<li>Western</li>
<li>Thriller</li>
<li>Horror</li>
<li>Documentary</li>
</ul>
The above code generates the following unordered list:
-
Genres of films:
- Animated
- Western
- Thriller
- Horror
- Documentary
The above list has not been styled by CSS, at all.
However, we would obtain the same stylistic result, as regards the symbols that would be used to introduce list items should we assign the value:
disc
to the property:
list-style-type
. Hence:
ul.disc
{
list-style-type:disc;
}
Thus:
-
Genres of films:
- Animated
- Western
- Thriller
- Horror
- Documentary
From the above list, we can observe that the symbol that introduces each item on the list is a disc, just as it would have been, by default, had we not applied any styling, at all, to this unordered list.
Next, let us style a replica of the same list, but let us remove the disc symbol...and let us have no symbol at all introduce each list item.
We can do this by assigning the value:
none
to the property:
list-style-type
. Hence:
ul.none
{
list-style-type:none;
}
The above code generates the following list:
-
Genres of films:
- Animated
- Western
- Thriller
- Horror
- Documentary
We observe from the above list that the symbols that introduce each list item have been completely removed.
Next, let us style a copy of the same list; let us assign a value of:
square
to the:
list-style-type
property. Hence:
ul.square
{
list-style-type:square;
}
From employing the above styling, we get the browser to render our list, thus:
-
Genres of films:
- Animated
- Western
- Thriller
- Horror
- Documentary
From the above list, we can observe that the symbol that introduces each item on the list is now a square.
In CSS, we may assign the value of:
circle
so as to introduce the items of our unordered list with circles. We can do that by assigning a value of:
circle
to the property:
list-style-type
. Hence:
ul.circle
{
list-style-type: circle;
}
The above CSS code causes our browser to render our film-genres list thus:
-
Genres of films:
- Animated
- Western
- Thriller
- Horror
- Documentary
From the above list, we can observe that the symbol that introduces each item on our film-genres list is now a circle.
[1]. Technically, the name for this solid filled-in circular bullet symbols is ‘disc’ whereas the name of the unfilled circular bullet symbol is ‘circle.’
Comments
Post a Comment