Skip to content

Instantly share code, notes, and snippets.

@Expertweblancer
Created May 21, 2019 18:38
Show Gist options
  • Save Expertweblancer/88fe087052302385b9eff6a0542d7b4c to your computer and use it in GitHub Desktop.
Save Expertweblancer/88fe087052302385b9eff6a0542d7b4c to your computer and use it in GitHub Desktop.
PagedMedia.org —rendering the @page
h1 Randomness
p "Random" redirects here. For other uses, see Random (disambiguation).
p For a random Wikipedia article, see Special:Random. For information about Wikipedia's random article feature, see Wikipedia:Random.
p Randomness is the lack of pattern or predictability in events.[1] A random sequence of events, symbols or steps has no order and does not follow an intelligible pattern or combination. Individual random events are by definition unpredictable, but in many cases the frequency of different outcomes over a large number of events (or "trials") is predictable. For example, when throwing two dice, the outcome of any particular roll is unpredictable, but a sum of 7 will occur twice as often as 4. In this view, randomness is a measure of uncertainty of an outcome, rather than haphazardness, and applies to concepts of chance, probability, and information entropy.
p The fields of mathematics, probability, and statistics use formal definitions of randomness. In statistics, a random variable is an assignment of a numerical value to each possible outcome of an event space. This association facilitates the identification and the calculation of probabilities of the events. Random variables can appear in random sequences. A random process is a sequence of random variables whose outcomes do not follow a deterministic pattern, but follow an evolution described by probability distributions. These and other constructs are extremely useful in probability theory and the various applications of randomness.
p Randomness is most often used in statistics to signify well-defined statistical properties. Monte Carlo methods, which rely on random input (such as from random number generators or pseudorandom number generators), are important techniques in science, as, for instance, in computational science.[2] By analogy, quasi-Monte Carlo methods use quasirandom number generators.
p Random selection, when narrowly associated with a simple random sample, is a method of selecting items (often called units) from a population where the probability of choosing a specific item is the proportion of those items in the population. For example, with a bowl containing just 10 red marbles and 90 blue marbles, a random selection mechanism would choose a red marble with probability 1/10. Note that a random selection mechanism that selected 10 marbles from this bowl would not necessarily result in 1 red and 9 blue. In situations where a population consists of items that are distinguishable, a random selection mechanism requires equal probabilities for any item to be chosen. That is, if the selection process is such that each member of a population, of say research subjects, has the same probability of being chosen then we can say the selection process is random.
p Randomness is the lack of pattern or predictability in events.[1] A random sequence of events, symbols or steps has no order and does not follow an intelligible pattern or combination. Individual random events are by definition unpredictable, but in many cases the frequency of different outcomes over a large number of events (or "trials") is predictable. For example, when throwing two dice, the outcome of any particular roll is unpredictable, but a sum of 7 will occur twice as often as 4. In this view, randomness is a measure of uncertainty of an outcome, rather than haphazardness, and applies to concepts of chance, probability, and information entropy.
p The fields of mathematics, probability, and statistics use formal definitions of randomness. In statistics, a random variable is an assignment of a numerical value to each possible outcome of an event space. This association facilitates the identification and the calculation of probabilities of the events. Random variables can appear in random sequences. A random process is a sequence of random variables whose outcomes do not follow a deterministic pattern, but follow an evolution described by probability distributions. These and other constructs are extremely useful in probability theory and the various applications of randomness.
p Randomness is most often used in statistics to signify well-defined statistical properties. Monte Carlo methods, which rely on random input (such as from random number generators or pseudorandom number generators), are important techniques in science, as, for instance, in computational science.[2] By analogy, quasi-Monte Carlo methods use quasirandom number generators.
p Random selection, when narrowly associated with a simple random sample, is a method of selecting items (often called units) from a population where the probability of choosing a specific item is the proportion of those items in the population. For example, with a bowl containing just 10 red marbles and 90 blue marbles, a random selection mechanism would choose a red marble with probability 1/10. Note that a random selection mechanism that selected 10 marbles from this bowl would not necessarily result in 1 red and 9 blue. In situations where a population consists of items that are distinguishable, a random selection mechanism requires equal probabilities for any item to be chosen. That is, if the selection process is such that each member of a population, of say research subjects, has the same probability of being chosen then we can say the selection process is random.
<script src="https://unpkg.com/pagedjs/dist/paged.legacy.polyfill.js"></script>
/* Paged.js fragmentation rendering on screen */
/* print css that's being rendered on screen */
@page {
size: 17cm 24cm;
margin: 30mm 25mm;
}
/* Everything below is related to the styles of the book and the way the pages are shown on the screen */
/* variable used for the book */
:root {
--background: lightgrey;
--color-paper: white;
--color-margin-box: grey;
--width-margin-box: 2px;
}
body {
padding: 1em;
}
/* To define how the book look on the screen: */
@media screen {
body {
background-color: var(--background);
}
.pagedjs_pages {
display: flex;
width: calc(var(--width) * 2);
flex: 0;
flex-wrap: wrap;
margin: 0 auto;
}
.pagedjs_page {
background: var(--color-paper);
box-shadow: 0 0 0 var(--width-margin-box) inset var(--color-margin-box);
margin: 0;
flex-shrink: 0;
flex-grow: 0;
margin-top: 10mm;
}
.pagedjs_first_page {
margin-left: var(--width);
}
/* show the margin-box */
[class*="pagedjs_margin-top"], [class*="pagedjs_margin-right"], [class*="pagedjs_margin-left"], [class*="pagedjs_margin-bottom"] {
box-shadow: 0 0 0 var(--width-margin-box) inset var(--color-margin-box);
}
}
body {
font-family: serif;
}
@Expertweblancer
Copy link
Author

Good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment