Status of This Document
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
This is a work in progress. No section should be considered final, and the absence of any content does not imply that such content is out of scope, or may not appear in the future. If you feel something should be covered here, tell us! The initial version of this document will focus on books, and at this time will not include requirements specific to magazines or newspapers. The scope will depend heavily on the willingness of people to contribute to this document. Please contact the Digital Publishing Interest Group if you would like to help. Once the document is stable, the group will publish it as an Interest Group Note.
This document was published by the Digital Publishing Interest Group as an Editor’s Draft. If you wish to make comments regarding this document, please send them to<EMAIL_ADDRESS>(subscribe, archives). All comments are welcome.
Publication as an Editor’s Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
This document is governed by the 1 August 2014 W3C Process Document.
1. Introduction
Not all stories worth telling can fit in a tweet, on a computer screen, or on a single piece of paper. Ever since the codex replaced the scroll, humans have divided our stories into pages. Pagination is the art and the craft of turning that scroll of content into discrete pieces, whether destined for book pages or screens. Pagination requires us to think about the document at all levels, from the total number of pages to the tiny spaces between letters. Along with graphic design and typography, it determines the look of the page.Typography is the craft of endowing human language with a durable visual form, and thus with an independent existence.
—Robert Bringhurst, The Elements of Typographic Style
Good pagination, like good typography, aims to be invisible. As the reader turns the page, the stream of words and images in her mind should not be interrupted. Two thousand years of experience have taught us how best to do this. The goal of this document is to describe those rules, as clearly as possible, so they can be implemented in the Open Web Platform. We hope for a day where the pagination of digital books will be as beautiful and transparent as the best printed books.
Note: Our goal is for this document to describe layout and pagination for all languages that use the Latin script.
2. Fundamentals
Makeup is a highly skilled procedure. If the text is merely divided mechanically into portions of equal length, without regard to where the divisions fall, some of the pages that result are bound to be unacceptable logically or aesthetically: they will incorporate bad breaks.
—Chicago Manual of Style, 14th Edition, 19.40.
What therefore God hath joined together, let not man put asunder.
—The Bible, Matthew 19:6
Every rule of pagination boils down to a single principle: break pages with as little disruption to the reading experience as possible. A widow leaves the last line of a paragraph isolated from the rest of the thought.  A heading at the bottom of a page removes the title from the section, and the section from the title.
2.1. Tradeoffs
Pagination involves tradeoffs. Fixing a widow may result in a misaligned spread. Fixing that may result in a loose line or paragraph. What is acceptable in one book, or for one publisher, may be unacceptable to another. What is acceptable in one country, or language, may be unacceptable elsewhere.
2.2. Untangling the Vertical and the Horizontal
Page breaks are often line breaks. The tiniest change in kerning can make a paragraph longer or shorter, and thus create a widow or an orphan. The work of pagination, as done by typesetters, human or machine, inevitably involves the consideration of the lines of text. And so we will not try too hard to avoid talking about line breaks, when they potentially influence pagination.
3. The Spatial Geometry of Pages: Spreads and Bleeds
Open a printed book and what you see isn’t a single page, but two pages side by side—a spread.
Books set in Latin scripts typically share some common features.
- Books are bound on the left-hand side.
- Text is written left-to-right and top-to-bottom.
- Recto and verso pages may not be symmetric.
3.1. Crossing the Gutter
Large images, tables, or sidebars may extend across both pages of a spread.
3.2. Page size, orientation, and arrangement
The size, orientation, and arrangement of pages might vary even in a single book:
- Turned pages TK
- Foldouts are pages larger than the trim size of the book, folded in order to not extend beyond the other pages.
3.3. Bleeds
Books are printed on large sheets of paper, which are then folded and cut. Since the cutting is not infinitely precise, any object that should extend to the very edge of the page in fact needs to extend a bit outside the page boundary. A bleed is the part of an object that extends outside the page, generally by a small amount such as 9 points.
Note: Imposition and related topics are out-of-scope for this document.
4. Hyphenation and Justification
Good hyphenation and justification is critically important to the appearance and readability of text. Print typesetting systems can often achieve very good results, but most online reading systems do this very poorly.
4.1. Hyphenation
Text is often easier to read when words are allowed to break at the end of lines, thus avoiding massive variations in word-spacing or margins. But determining acceptable places to break words is a difficult problem:
All of the following are the results of automated hyphenation algorithms:
pre-ached wee-knights read-just leg-ends ex-acting co-inage
Words hyphenate differently based on pronunciation or meaning:
photo-graph pho-togra-pher re-cord (verb) rec-ord (noun) pres-ent (verb) pre-sent (noun) cre-ator crea-ture
4.1.1. Parameters for Hyphenation
The following choices need to be made when considering hyphenation of text.
- Should this text be hyphenated at all? Hyphenation is generally suppressed in headings. [CSS3TEXT] includes a hyphens property, to enable or disable hyphenation.
- What’s the shortest word that can be hyphenated? Five or six is typical.
- What’s the minimum number of characters allowed before a hyphen? Two is typical, and is sometimes stated as “two-up.” PrinceXML has the
prince-hyphenate-before
property, but this is not in any current CSS draft. - What’s the minimum number of characters allowed after a hyphen? Three is typical, and can be stated as “three-down.” PrinceXML has the
prince-hyphenate-after
property, but this is not in any current CSS draft. - How many consecutive lines can end with a hyphen (known as a “ladder”)? Two or three is typical. PrinceXML has the
prince-hyphenate-lines
property, but this is not in any current CSS draft. - Should capitalized words be hyphenated?
- Can the last word of a paragraph be hyphenated?
- Can the last word in a column, page, or spread be hyphenated?
4.1.2. Choosing hyphenation points
A key question is, “who decides what is acceptable?” The answer depends on the language, the culture, the subject matter, and the material being typeset.
<IP_ADDRESS>. Language
Each language has its own conventions about hyphenation. U.S. English hyphenates differently than U.K. English. In some European languages, words may be spelled differently when hyphenated.
Of course, the same text may include words from many different languages.
<IP_ADDRESS>. Culture
Even within the same language, authorities differ on the proper hyphenation of words.
Copyeditors will often specify a canonical reference for hyphenation, which is usually a particular edition of a particular dictionary.
<IP_ADDRESS>. Subject Matter
Specialized subject matter may require additional hyphenation dictionaries. This is common in medicine, law, and science.
<IP_ADDRESS>. Exceptions
Authors should be able to provide a list of exceptions, which add to or override what the system would normally do. The format for doing so should be easily understood.
TeX uses the following format. Possible hyphenation positions are indicated with (surprise!) hyphens. Hyphenation should be prevented where hyphens are absent.
\hyphenation { sur-pris-ingly tan-ta-liz-ing-ly these }
PrinceXML uses a prefixed property prince-hyphenate-patterns: url('en_US.dic');
to load a hyphenation dictionary. No current CSS specification includes support for this idea.
4.2. Justification
4.2.1. Algorithms
<IP_ADDRESS>. Greedy
<IP_ADDRESS>. Knuth-Plass (TeX)
<IP_ADDRESS>. Adobe (InDesign)
5. Paginating Single-Column Text
The simplest situation, which is very common, is when the content is only text, in a single column. Aside from chapter and book optimizations (to be discussed later) and line-breaking, the biggest issue is likely to be widows (see this figure for an example).
5.1. Widows
A widow is when the last line(s) of a paragraph falls at the top of a page. Publishers have different standards. Most frown on a single line at the top of the page, although some are OK if that line spans at least three-quarters of the page. Others require at least two lines of a paragraph at the top of a page.
Note: [css3-break] includes the widows and orphans properties, with integer values.
[css3-break] does not consider a fractional value for the widow or orphan properties.
Many typesetting systems have settings to prevent widows. CSS discusses these issues in [css3-break]. Unfortunately, these systems usually create another problem when they fix the widow. In this figure, there’s no longer a widow at the top of the page, but since the system merely moved a line from the left page to the right, it left behind an empty line, and the pages no longer align at the bottom.
More needs to be done. Removing one line of text from each page of the spread, shown in this figure, solves the problem.
5.2. Orphans
An orphan has two possible meanings in typesetting. It can refer to the minimum number of lines required before a page break (as in [css3-break]). It can also refer to the last line of a paragraph in any context. In the former context, many publishers now accept a single line of a paragraph before a page break. For the latter, standards vary widely. Some publishers want the last line to be longer than the paragraph indent. Some require one or two full words, or a certain number of characters. Most avoid having only a fragment of a word as the last line.
CSS does not currently address the second meaning of orphan.
5.3. Constraints on page depth
In traditional typesetting, the first defense against bad breaks is to change the depth of the page. “Running long” or “running short” means including one more (or one less) line of text on each page of the spread, thus sidestepping the previously-identified issue.
A typical book design includes instructions on whether it’s acceptable to run short, long, or (more rarely) both. Often there are also constraints on how many consecutive spreads (or pages) may be altered in this way. If running both long and short, it’s usually forbidden to go from one to another without an intervening normal spread.
Running long or short may affect the space between the last line of text and a page footer or folio. Most publishers prefer footers to be in a fixed position. If, instead, the space between the last line of text and the footer is fixed, the footer is said to "bounce."
5.4. Facing Pages
If a document has facing pages, the publisher usually requires that they align top and bottom. Exceptions include:
- It’s the last page of a chapter.
- The page contains no text—only images or tables
- When aligning facing pages will make some other issue worse
5.5. Recto and Verso Hyphens
Publishers sometimes constrain what characters may appear before a page break. Most commonly, the right-hand page of a spread may not end with a word fragment, as the reader must turn the page before reading the rest of the word. Less common is a prohibition on the verso page ending with a hyphen.
5.6. Space Breaks and Ornaments
Many novels, and some narrative non-fiction books, include small breaks in the text. These are usually represented by one to three blank lines, or by a small ornament or dingbat. Problems arise when these breaks fall at the top or bottom of a page.
If, however, the space break falls at the bottom of the page, confusion can result. In the figure below, it’s hard to tell there’s a space break, as it just looks like the page is a few lines short.
In that case, asterisks or some other ornament is added to the top or bottom of a page, as a visual reminder of the break. To get everything to work out, the spread was run short, and the space break (now with ornament) pushed to the top of the second page:
This is an example where the page position of an element determines its content as well as design. A ::page-top
or ::page-bottom
pseudo-element might prove useful.
6. Paragraphs and indentation
7. Fonts
Texts are built from letters. Modern typesetting systems must be able to choose from hundreds or thousands of glyphs depending on the circumstances.
7.1. Ligatures
Two or more letters may be better displayed as a single glyph:
7.2. Numbers and math
7.2.1. Lining, oldstyle, and tabular figures
Traditionally, text set in mixed-case type should use old-style figures. Text set in all caps should use lining figures. Columns of numbers (such as in tables) are clearer using tabular figures, which are of uniform width.
7.3. Alternate forms
7.3.1. Caps
Text may be set in a mix of uppercase and lowercase, exclusively in upper- or lowercase, in small caps, in caps/small caps, etc. In many cases this is purely a design choice, and the displayed text may use a different case than the source document.
7.3.2. Swashes and Stylistic Alternates
8. Initial Capitals
Large, decorative letters have been used to start new sections of text since long before printing. In fact, their use predates lowercase letters entirely.
8.1. Drop caps
A drop cap is a larger-than-usual letter at the start of a paragraph, with a baseline at least one line lower than the first baseline of the paragraph. The size of drop caps is usually indicated by how many lines they occupy—two-line and three-line drop caps are the most common.
Aligning the letter vertically is a challenge. The cap height of the letter should align with the cap height of the first line of text. The baseline of the letter should fall on the baseline of one of the following lines (the second for a 2-line drop cap, etc.).
The horizontal position of the drop cap and the surrounding text is also an issue, as variations in glyph shapes may require increasing or decreasing space to the right of the drop cap, and in some cases separate adjustments may be required for each line adjacent to the drop cap.
The position of a drop cap in relation to the left margin may also need to be adjusted. Letters like "C" may need to move left slightly to visually align with the left margin.
A drop cap may be desired on a paragraph which starts with a punctuation mark, most often a quotation mark. In this case, one option is to delete the quotation mark entirely.
Input on techniques for coping with initial punctuation on drop caps would be appreciated.
8.2. Raised caps and sunken caps
A raised cap is a large letter used to start a paragraph, which uses the same baseline as the rest of the first line. A sunken cap both sinks below the text baseline, and extends above.
Note: The CSS Working Group has proposed an initial-letter property to allow for properly-aligned drop caps. See dev.w3.org/csswg/css-inline/#DropInitial.
9. Running headers and footers
Books often have material printed at the top and/or bottom of each page, outside the normal content area. These headers or footers may serve as guideposts for reader, fodder for designers, low-tech DRM, or merely a way to know what book your fellow train passenger is reading. There’s more to running headers than is dreamt of in the open web platform…
9.1. Content
Running heads and footers may contain:
- Content from the document: book title, chapter or part titles, author name(s). Indexes and notes sections may have running heads to identify which entries are on a particular page.
- Content intended only for running heads: shortened versions of chapter titles…
- Counters of all sorts: page numbers, section numbers, chapter numbers.
- Ornaments, decorative type, or images
- Copyright statements or other boilerplate
- Date and/or time stamps
- File names
- Version numbers
- combinations of the above
In some cases the content of running heads may have an internal structure—a chapter title might have an italic word—or may require different text styles or fonts.
In this example, the running header contains the author name, the page number, and an ornament.  Which content?
An element whose content is used in running heads may appear many times on a page. Authors must be able to specify which instance is used. [css3-gcpm] provides the start, first, last, and first-except keywords to accomplish this:
- first
- The value of the first assignment on the page is used. If there is no assignment on the page, the "entry value" is used.
- start
- If the element is the first element on the page, the value of the first assignment is used. Otherwise the "entry value" is used. The "entry value" may be empty if the element hasn’t yet appeared.
- last
- The "exit value" of the named string is used.
- first-except
- This is identical to
first
, except that the empty string is used on the page where the value is assigned.
Are these values enough to handle indexes, dictionaries, and other use cases?
9.3. Placement
Running headers and footers may appear in almost any position on a page.
- The position of the running head may be different on first pages vs subsequent pages, or the running head may be omitted on first pages
- Running heads may align to the inside or outside, and thus be different on left and right pages.
- Authors may need to control the layering of running head text (i.e. “z-index”).
- The running head may overflow the page boundary (i.e. “bleed”)
- The running head may be rotated
Running headers are addressed by [css3-gcpm].
EPUB 3.0 has now deprecated support for headers and footers using oeb-page-head
and oeb-page-foot
.
10. Heads
10.1. General Considerations
TK
10.2. Heads at the top of a page
When a head falls at the top of a page, a spacing adjustment is often necessary. Here’s a typical arrangement, with a line and a half of space above the head, and a half-line-space below, so that the text stays on the proper baselines.
If that head appears at the top of the page, the subsequent text will be off by a half-line.
Everything works out if we add a half-line-space back.
10.3. Heads at the bottom of a page
A head should never be the last thing on a page; it must be followed by two or three lines of text.
10.4. Bridge heads, side heads, and run-in heads
TK
11. Images
11.1. TK
Some things to note about this image:
- the caption and image are treated as a unit
- Text runs around the image+caption
- image runs right up to the gutter of the page (i.e. extends beyond usual content area)
11.2. Inline images
TK
11.3. Bleeds
TK
Images that cross spread
image before callout?
placing multiple images on page… inside/outside, top/bottom, stagger
broadside
placement of caption/title
12. Tables
12.1. Alignment
Many tables have specialized requirements for the alignment of cells in a given column.
12.1.1. Align on character
All entries in a given column may need to align to a predetermined character, most commonly a decimal point. Typically, the longest entry in the column should be centered, and then the other entries should align to that entry.
In some cases, a composite “longest entry” needs to be constructed:
| 445.85 | | 12345.6 | | 1.234 | | .1 |
In this case, the user agent should act as if 12345.234 was the longest line, so the margin to the left of 12345.6 will be equal to the margin to the right of 1.234.
When a collection of whole numbers with no decimal points are in a column and are asked to align, the longest whole number should center in the column and the rest of the whole numbers should right align on the right indent of the longest whole number.
If the content of a table cell is being aligned to a character, that content should not have wrapping applied by the rendering system.
12.1.2. Flush left center alignment
Also known as centering on the longest line, the longest line in a column is found and centered, and other entries in the column are aligned to the left edge of the longest line.
As before, header and footer cells are ignored, and the author should be able to exclude specified cells from the alignment process.
This type of alignment is often used in text, for poetry or prose extracts.
User agents should not break single-word cells.
12.2. Table widths
In print, tables are not randomly sized but typically set to one of a few fixed widths. This requirement necessitates that a composition engine know how to “snap to” one of the desired widths. This may help show relationships between separate tables.
broadside
placement of caption/title
spread
multi-page
continued lines
13. Lists, Indexes, and Tables of Contents
13.1. Indexes
13.1.1. Collapsing Page Ranges
When generating indexes or referring to page ranges, one often ends up with duplicated or sequential numbers.
1, 3, 3, 7, 8, 9, 10, 16
This should be formatted as:
1, 3, 7–10, 16
with duplicates removed and consecutive numbers replaced by ranges.
14. Footnotes
Having to read footnotes resembles having to go downstairs to answer the door while in the midst of making love.
—Noël Coward
In print publishing, a footnote consists of two parts: a reference (often rendered as an asterisk or superscripted number) and the footnote body.
Footnotes themselves can be quite complicated. Footnotes can contain multiple paragraphs, block quotes, poems, lists, and tables. Footnotes can contain other footnotes (an edge case, admittedly, but David Foster Wallace was notorious for this). Footnotes can extend across multiple pages. In short, a footnote is a container that can hold almost anything.
In order to describe footnotes in HTML, one must separate the footnote reference (which is an inline element) from the footnote itself, as HTML frowns on placing complex block structures inside paragraphs. This is quite different from something like DocBook, where the content model allows a footnote element inside a paragraph, and that footnote can itself contain multiple paragraphs, etc.
<p>It was the best of times<span class="ref-footnote-rw">*</span>, it was the blurst of times.</p> <div class="block-rw footnotes-rw"> <p><span class="num-footnote-rw">*</span>Oh yes, but the telephone is so impersonal.</p> <p>I prefer the hands-on touch you only get with hired goons.</p> </div>
There may also be more than one reference to the same footnote.
Footnote handling as described in [css3-gcpm] assumes the footnote is coded inline at the point of reference. This situation is under discussion on the www-style list.
14.1. Inline footnotes and multiple footnote regions
Some types of footnotes may be displayed inline, as in the top figure. Other books (see below) may have two separate streams of footnotes, requiring two footnote regions.
14.2. At the foot of what?
Footnotes usually fall at the bottom of the page, but may need to be at placed at the end of a column, table, sidebar, or other document structure.
14.3. Breaking footnotes across pages
Some footnotes can extend across more than one page. Limits on the size of the footnote area(s) may be required, so that a page containing only footnotes is avoided.
Note: Sometimes, footnotes may require so much space that they cannot all be placed before the end of a document section. In this case, it’s acceptable to have pages that consist only of footnotes.
14.4. Numbering
Three questions must be answered when numbering footnotes. First, which numbering scheme should be used? Second, what are we actually numbering? Third, is the numbering system reset at some point in the document?
14.4.1. Numbering schemes
Footnotes are most commonly numbered with arabic numerals, lower-case letters, or a sequence of symbols: *, †, ‡, and §, ||, and #. With symbols, they may be doubled or tripled after exhausting the sequence, but long before |||||| is used, the choice of numbering should be re-evaluated.
14.4.2. What are we counting?
Usually, footnote numbers count footnotes. But in some cases, the reference may be a line number, paragraph number, or section number.
14.4.3. Resetting numbers
Footnote numbering may restart with each new chapter, or each new page. The former is common with numeric footnotes, the latter with footnotes using symbols.
Note: Footnotes are addressed by [css3-gcpm].
Note: Digital publications often render footnotes differently from print. They may become pop-ups, move to the end of the section, or to the end of the document. We are not currently attempting to document digital best practices around footnotes.
15. Cross-references
Books often contain text that refers to other components of the same book. Such text commonly consists of the name or title of that component, along with a number used to identify that component.
as described in Chapter 14
From the Aiguille du Midi, follow A16 to 2950m
Make Anchovy Mayonnaise (page 762), with 6 or 8 anchovies.
For another example, see Figure 1.4.
and equation (31.3) shows it does not!
Many typesetting systems allow authors to generate numbers for such components. A cross-reference needs to be able to access such generated content from another location in the document.
Note: CSS provides counters to number things; creating cross-references would require a mechanism to access the value of a counter at a particular location. The target-counter and target-counters functions in [css3-content] are designed to do this.
[css3-content] does not have a mechanism to customize the content of a cross-reference based on the type of element being referred to. See https://lists.w3.org/Archives/Public/public-digipub/2015Aug/0079.html and subsequent discussion.
16. Sidebars
Some things to notice:
- The image floats to the top of the column inside the sidebar
- The columns themselves base-align
- The sidebar title and “supertitle” are on the same line.
17. Marginalia
alignment with reference
18. Equations
Mathematics is a critical part of many books, from learning materials for kindergartners to monographs on physics.
18.1. Breaking equations
TK
18.2. Numbering equations
Equations are often numbered. In the figure below, note that the equations are centered horizontally, the equation number is flush right, and the equation number is centered vertically relative to the equation.
Note: The alignment in this figure was implemented with [css-flexbox-1].
18.3. Aligning equations
Some publishers require that all equations on a page align on the equals sign.
x + 3z = 7 + 2y 2x + y + z = 4 Intervening text which may extend for several lines 10 + 2y = 3x + 2z
Note: the alignment is generally scoped to a page or (more likely) a defined set of equations.
Note: this is similar to how numbers in a table column may align on a decimal point or other character.
18.4. Annotating equations
19. Columns
Often the first page of a chapter or article will be set in a single column, and subsequent pages set in multiple columns.
20. Punctuation
Spacing around punctuation marks is a known obsession of typographers.
20.1. Language-specific spacing rules
| Punctuation | English | French | Spanish |
| Exclamation Point | ! | [thin space]! | ¡text! |
| Colon | : | [thin space]: | : |
| Question Mark | ? | [thin space]? | ¿text? |
| Open Quote | “ | «[thin space] | “ |
| Close Quote | ” | [thin space]» | ” |
20.2. Em-dashes and en-dashes
To space or not to space? That is the question. Even within publishing houses, arguments continue over the proper display of em-dashes. Some imprints at Hachette use closed em-dashes, others insist on thin spaces around em-dashes. If the same book is to be published in the United Kingdom, em-dashes would be replaced with en-dashes, with larger spaces around them.
Given the subtlety of many of these rules, it’s helpful to use CSS to generate typographically-sophisticated output from material written by lay authors, or to adapt content to varying publisher or language requirements.
Older drafts of [css3-gcpm] contained a text-replace property, which has been implemented by PrinceXML.
body { prince-text-replace: "—" "\200A—\200A"; }
In this example, we’re adding hair spaces around em-dashes.
20.3. Number formatting
Different languages have different conventions for formatting numbers. Punctuation marks are inserted at specified points in numbers to aid readability. For example, in English commas are used to separate groups of digits, and a period to denote the decimal point.
However, in Spanish and Norwegian the roles are reversed, with the period used to group digits, and the comma for the decimal point:
| Language | Grouping separator | Decimal separator |
|---|---|---|
| Austria, Belgium, Brazil, Canada (fr), Czech Republic, Denmark, Estonia, Finland, France, Germany, Hungary, Italy, Netherlands, Norway, Peru, Poland, Portugal, Romania, South Africa, Spain, Sweden, Switzerland | space | comma |
| Argentina, Austria, Brazil, Denmark, Germany, Italy, Portugal, Romania, Slovenia, Spain (older) | period | comma |
| Great Britain, United States | comma | period |
Note: The CSSWG has informally proposed a method for formatting numbers.
21. Special Considerations for Genres
21.1. Education
- College textbooks
- Elhi
- Language
- Study guides
21.2. Trade
- Fiction
- Narrative nonfiction
- Children’s
- YA
-
Religious
- Bibles
- Travel
- How-to
- Manga/Comics/Graphic Novels
21.3. STEM
21.4. Reference
- Legal
- Dictionaries
22. Digital Issues
23. Large-Scale Issues in Pagination
23.1. Book optimization
In trade publishing, we often know how many pages will be in a book before it is written. The nature of printing and binding also mandate that the number of pages in a book be some multiple of eight, sixteen, or thirty-two pages. Publishers often limit how many blank pages are allowed at the end of a book.
23.2. Chapter optimization
A chapter that ends with only a few lines of text looks like a mistake, and wastes paper (or electrons!) Generally a page should contain at least five lines of text.
Appendix A: Baseline Grids
A baseline grid is a series of evenly-spaced horizontal alignment lines. This is used to provide a vertical rhythm for a design, to align adjacent content (text or graphics), and to align baselines on facing pages in printed material.
The grid lines can be spaced at line-height intervals or a factor of line-height.
Content can be aligned to the grid in various ways. Roman body text typically sets the baseline on a grid line. Graphics might have their top, bottom or both set on grid lines, or be centered between grid lines. Text blocks (consider a multi-line heading with line-height at 1.4x grid height) might have their last baseline or first baseline on a grid line, or have the block’s combined height centered between grid lines. Centering is much more important in ideographic type systems.
If normal layout would result in a misalignment, content shifts down to the next available grid line.
Sometimes it’s necessary to have particular content opt out of aligning to a grid.
There can be one or more grids per document. Multiple grids can overlap (body grid and side content grid) or run in series (a vertical stack of pages). Grids can be nested (think of a document being represented as a graphic inside another document). A particular piece of content only aligns to a single grid.
Appendix B: Of Leading and Sinkage: The Language of Print
Translating print designs to the open web platform can be tricky.
- vertical distances are usually measured baseline to baseline.
- print designers sometimes talk about a "text page" which includes the running head.
- The basic text area is often specified with a gutter margin and a text "measure". In [css3-page] this area is described by left/right or inside/outside margins.
- Leading
- Line-height
- Recto
- Right-hand page of a spread
- Verso
- Left-hand page of a spread
The Classical Rules of Hyphenation and Pagination
- At hyphenated line-ends, leave at least two characters behind, and take at least three forward.
- Avoid leaving the stub-end of a hyphenated word, or any word shorter than four letters, as the last line of a paragraph.
- Avoid more than three consecutive hyphenated lines.
- Hyphenate proper names only as a last resort unless they occur with the frequency of common nouns.
- Hyphenate according to the conventions of the language.
- Link short numerical and mathematical expressions with hard spaces.
- Avoid beginning more than two consecutive lines with the same word.
- Never begin a page with the last line of a multi-line paragraph.
- Balance facing pages by moving single lines.
- Avoid hyphenated breaks where the text is interrupted.
- Abandon any and all rules of hyphenation and pagination that fail to serve the needs of the text.
Further Reading
Bringhurst, Robert. The Elements of Typographic Style
Felici, Jim. The Complete Manual of Typography
Haralambous, Yannis. Fonts & Encodings: From Advanced Typography to Unicode and Everything in Between
Haslam, Andrew. Book Design
Highsmith, Cyrus. Inside Paragraphs
Kane, John. A Type Primer
Knuth, Donald. Digital Typography
Lawson, Alexander. Anatomy of a Typeface
Mitchell; Wightman. Book Typography
Nickel, Kristina. Ready to Print
Steer, Vincent. Printing Design and Layout (1948)
Tracy, Walter. Letters of Credit: A View of Type Design
Tschichold, Jan. The Form of the Book: Essays on the Morality of Good Design
Acknowledgments
Eric Aubourg, Luc Audrain, Bert Bos, Tom Byrer, James Clark, Brady Duga, Ivan Herman, Tony Graham, Bill Kasdorf, Jean Kaplansky, Sanders Kleinfeld, Liam Quin, Alan Stearns, Tzviya Siegman


If your email address is known in the system, you will receive a confirmation email with further instructions.
Click here to login


Package it.polimi.ingsw.controller
Class GameController
java.lang.Object
it.polimi.ingsw.controller.GameController
- All Implemented Interfaces:
Observer
,java.io.Serializable
public class GameController extends java.lang.Object implements Observer, java.io.Serializable
This class controls the evolution of the
Game
.
Messages are read and responses are elaborated.- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SAVED_GAME_FILE
-
Constructor Summary
Constructors Constructor Description GameController()
Controller of the Game. -
Method Summary
Modifier and Type Method Description void
addVirtualView(java.lang.String nickname, VirtualView virtualView)
Adds a Player VirtualView to the controller if the first player max_players is not exceeded.void
broadcastDisconnectionMessage(java.lang.String nicknameDisconnected, java.lang.String text)
Sends a broadcast disconnection message.void
broadcastGenericMessage(java.lang.String messageToNotify)
Sends a Message which contains Game Information to everyPlayer
in Game.void
broadcastGenericMessage(java.lang.String messageToNotify, java.lang.String excludeNickname)
Sends a Message which contains Game Information to all players but the one specified in the second argument.boolean
checkLoginNickname(java.lang.String nickname, View view)
Verifies the nickname through the InputController.void
endGame()
Reset the Game Instance and re-initialize GameController Class.java.util.List<ReducedGod>
getActiveGods()
Returns a List of Gods sorted with their own players.java.util.List<Color>
getAvailableColors()
java.util.List<ReducedGod>
getAvailableGods()
java.util.List<Color>
getColorList()
java.util.List<Color>
getPlayersColors()
Returns the list of colors of players in nicknameQueue.TurnController
getTurnController()
Return Turn Controller of the Game.java.util.Map<java.lang.String,VirtualView>
getVirtualViewMap()
void
initGameController()
Initialize Game Controller.boolean
isGameStarted()
Checks if the game is already started, then no more players can connect.void
loginHandler(java.lang.String nickname, VirtualView virtualView)
Handles the login of a player.void
onMessageReceived(Message receivedMessage)
Switch on Game State.void
removeVirtualView(java.lang.String nickname, boolean notifyEnabled)
Removes a VirtualView from the controller.void
update(Message message)
Receives an update message from the effect model.void
win()
Broadcasts the winner, disconnects all clients and resets whole game.
-
Field Details
-
SAVED_GAME_FILE
public static final java.lang.String SAVED_GAME_FILE- See Also:
- Constant Field Values
-
-
Constructor Details
-
GameController
public GameController()Controller of the Game.
-
-
Method Details
-
initGameController
public void initGameController()Initialize Game Controller. -
onMessageReceived
Switch on Game State.- Parameters:
receivedMessage
- Message from Active Player.
-
win
public void win()Broadcasts the winner, disconnects all clients and resets whole game. -
endGame
public void endGame()Reset the Game Instance and re-initialize GameController Class. -
loginHandler
Handles the login of a player. If the player is new, his VirtualView is saved, otherwise it's discarded and the player is notified. If it's the first Player then ask number of Players he wants, add Player to the Game otherwise change the GameState.- Parameters:
nickname
- the nickname of the player.virtualView
- the virtualview of the player.
-
getAvailableGods
- Returns:
- a List of available Gods.
-
getAvailableColors
- Returns:
- a List of available Colors.
-
getColorList
- Returns:
- a list with all possible colors
-
getPlayersColors
Returns the list of colors of players in nicknameQueue.- Returns:
- a list of colors.
-
getActiveGods
Returns a List of Gods sorted with their own players.- Returns:
- a List of Gods picked by the Challenger.
-
addVirtualView
Adds a Player VirtualView to the controller if the first player max_players is not exceeded. Then adds a controller observer to the view. Adds the VirtualView to the game and board model observers.- Parameters:
nickname
- the player nickname to identify his associated VirtualView.virtualView
- the VirtualView to be added.
-
getVirtualViewMap
- Returns:
- Virtual View Map.
-
removeVirtualView
public void removeVirtualView(java.lang.String nickname, boolean notifyEnabled)Removes a VirtualView from the controller.- Parameters:
nickname
- the nickname of the VirtualView associated.notifyEnabled
- set totrue
to enable a lobby disconnection message,false
otherwise.
-
broadcastGenericMessage
public void broadcastGenericMessage(java.lang.String messageToNotify, java.lang.String excludeNickname)Sends a Message which contains Game Information to all players but the one specified in the second argument.- Parameters:
messageToNotify
- Message to send.excludeNickname
- name of the player to be excluded from the broadcast.
-
broadcastGenericMessage
public void broadcastGenericMessage(java.lang.String messageToNotify)Sends a Message which contains Game Information to everyPlayer
in Game.- Parameters:
messageToNotify
- Message to send.
-
broadcastDisconnectionMessage
public void broadcastDisconnectionMessage(java.lang.String nicknameDisconnected, java.lang.String text)Sends a broadcast disconnection message.- Parameters:
nicknameDisconnected
- user who had a connection drop.text
- generic text.
-
update
Receives an update message from the effect model. -
checkLoginNickname
Verifies the nickname through the InputController.- Parameters:
nickname
- the nickname to be checked.view
- the view of the player who is logging in.- Returns:
- see
InputController.checkLoginNickname(String, View)
-
isGameStarted
public boolean isGameStarted()Checks if the game is already started, then no more players can connect.- Returns:
true
if the game isn't started yet,false
otherwise.
-
getTurnController
Return Turn Controller of the Game.- Returns:
- Turn Controller of the Game.
-


Milliseconds matter.
Amazon found that each 100ms delay cost them over a billion dollars in sales. Google found that 1/3 of this hit remained after decreasing loading times. Your CSS framework is costing you money.
Tried and tested.
Min is used by over 65,000 people in 195+ countries, from North Korea to South Sudan to Mongolia to Somalia. Think your software is critical? Try a webapp keeping you alive in a warzone.
Works everywhere.
That's no exaggeration. Min works on your decade-old Opera 9 install, your grandpa's IE5.5, and your kid's Nintendo DS. Wikipedia gets 500MM hits from IE6 a month... Bootstrap 4 doesn't even support IE8.
Save time.
Min provides easy copy-and-paste examples for every element. You can get started with any of the provided templates, or you can read the complete and concise documentation with visual examples for every part of Min.
Min also styles your page using hundreds of times fewer properties vs. other CSS frameworks. This makes it easy to customize your page to look novel, avoiding the "bootstrapization" trend that makes your page look exactly like the rest.


Pagination is used with standard tables that require larges amounts of data. If you are using Data grid, you should use infinite scrolling


{% if role_as.project == project %} {# Local member role #}
Update Member
Remove Member
{% else %} {# Inherited member role #}
{# Query for possible inactive (lower rank) role in the project #}
{# If found, link to update form instead #}
{% get_inactive_role project role_as as inactive_as %}
{% if inactive_as %}
Update Member
{% else %}
Promote Member
{% endif %}
{% endif %}
{% get_history_dropdown obj=user project=project as history_item %}
{{ history_item|safe }}


“It is not a game engine – it is a rendering engine. It puts things on your screen and thats it.”
Why use it?
Performance!
Another (big!) plus...
Inspired by Flash
Composite hierarchy
DisplayObject
this is the base class for all objects that are rendered on the screen.
DisplayObjectContainer
A DisplayObjectContainer represents a collection of display objects. It is the base class of all display objects that act as a container for other objects.
Stage
A Stage represents the root of the display tree. Everything connected to the stage is rendered
Graphics
The Graphics class contains a set of methods that you can use to create primitive shapes and lines.
Sprite
The Sprite object is the base for all textured objects that are rendered to the screen
MovieClip
A MovieClip is a simple way to display an animation depicted by a list of textures.
Getting started
// create an new instance of a pixi stage
var stage = new PIXI.Stage(0x66FF99);
// create a renderer instance.
var renderer = PIXI.autoDetectRenderer(400, 300);
// add the renderer view element to the DOM
document.body.appendChild(renderer.view);
requestAnimFrame( animate );
function animate() {
requestAnimFrame( animate );
// render the stage
renderer.render(stage);
}
Getting started
// create a texture from an image path
var texture = PIXI.Texture.fromImage("bunny.png");
// create a new Sprite using the texture
var bunny = new PIXI.Sprite(texture);
// centre the sprite's anchor point
bunny.anchor.x = 0.5;
bunny.anchor.y = 0.5;
// move the sprite to the centre of the screen
bunny.position.x = 200;
bunny.position.y = 150;
stage.addChild(bunny);


This page needs a web-browser capable of displaying inline frames!
This page needs a web-browser capable of displaying inline frames!


☰
PLAY
WAGERS
TOURNAMENTS
LEADERBOARD
SUPPORT
SHOP
$0.00
Daniyal
My Bank
Profile
General
Logout
×
PLAY
WAGERS
TOURNAMENTS
LEADERBOARD
SUPPORT
SHOP
Daniyal
My Bank
Profile
General
Logout
Create Team
Team Name
Social Media Accounts
Create Team
×
[Price of Game] will be deducted from your account


HueHero
By:
Tim Ganter
|
View on GitHub
Return
or
spacebar
to start.
Arrow keys
to move.
Mobile version in development.
Please play on your desktop for now. =)
Start


- saveAs(String) - Method in class com.jaunt.Element
-
Saves the current element and it's children/descendants as (UTF-8) HTML in the file specified by the relative filepath.
- saveAsXML(String) - Method in class com.jaunt.Element
-
Saves the current element and it's children/descendants as (UTF-8) XML in the file specified by the relative filepath.
- saveCompleteWebPage(File) - Method in class com.jaunt.Document
-
Saves the document in the specified file and creates a folder in the same directory where associated content (eg., images, js, css, nested frames, etc) is saved, so that the document may be viewed offline;
The name of the content folder is "content_for_FILENAME" where FILENAME is the specified file's name.
- saveCookies(File) - Method in class com.jaunt.Cookies
-
Saves cookies to the specified file.
- SearchException - Exception in com.jaunt
-
Represents an error related to a search function.
- SearchException(String) - Constructor for exception com.jaunt.SearchException
-
Creates a new Exception with the specified error message.
- send(HttpRequest) - Method in class com.jaunt.UserAgent
-
Sends the specified HttpRequest (GET, POST, HEAD, DELETE, or PUT)
- sendDELETE(String) - Method in class com.jaunt.UserAgent
-
Sends an HTTP DELETE request for the specified url; UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
- sendDELETE(String, String...) - Method in class com.jaunt.UserAgent
-
Sends an HTTP DELETE request for the specified url; UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
- sendGET(String) - Method in class com.jaunt.UserAgent
-
Sends an HTTP GET request for the specified url; UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
- sendGET(String, String...) - Method in class com.jaunt.UserAgent
-
Sends an HTTP GET request for the specified url; UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
- sendHEAD(String, String...) - Method in class com.jaunt.UserAgent
-
Sends an HTTP HEAD request to the specified url; UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information), and is also the return value.
- sendHEAD(String) - Method in class com.jaunt.UserAgent
-
Sends an HTTP HEAD request to the specified url; UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information), and is also the return value.
- sendPOST(String, String) - Method in class com.jaunt.UserAgent
-
Sends an HTTP POST request for the specified url and queryString; UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
- sendPOST(String, String, String...) - Method in class com.jaunt.UserAgent
-
Sends an HTTP POST request for the specified url and queryString; UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
- sendPUT(String, String) - Method in class com.jaunt.UserAgent
-
Sends an HTTP PUT request for the specified url and content; UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
- sendPUT(String, String, String...) - Method in class com.jaunt.UserAgent
-
Sends an HTTP PUT request for the specified url and content; UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
- set(String, String) - Method in class com.jaunt.component.Form
-
Sets the form input with the specified name to the specified value; FileComponents are set to upload the file who's location is specified by the specified value;
Checkboxes are 'checked' if the specified value is the same (case insensitive) as the value attribute of the checkbox (or if the specified value is "on" in cases where the checkbox has no value attribute).
- setAction(String) - Method in class com.jaunt.component.Form
-
Sets the action attribute of the form to the specified url.
- setAttribute(String, String) - Method in class com.jaunt.Element
-
Adds a new attribute name and attribute value or associates an existing attribute name with a new attribute value.
- setCache(Cache) - Method in class com.jaunt.UserAgent
-
Sets the specified cache; the cache must be enabled before being used.
- setCacheEnabled(boolean) - Method in class com.jaunt.UserAgent
-
Turns on/off caching, which causes HTML/XHTML source retrieved by HTTP GET request to be stored in the cache and pulled from that cache for any subsequent GET requests to the same url, as long as caching is enabled; by default, caching is handled by the FileSystemCache, which stores files in a directory called "jaunt_cache", which is in the directory specified by UserAgentSettings.outputPath.
- setCheckBox(String, boolean) - Method in class com.jaunt.component.Form
-
Sets whether the first checkbox with the specified (case-insensitive) name is checked and throws an Exception if the checkbox was not found.
- setCredentials(String, String) - Static method in class com.jaunt.util.ProxyAuthenticator
-
Sets the ProxyAuthenticator with the specified username and password; The System properties http.proxyHost and http.proxyPort should be set before calling this method.
- setDomain(String) - Method in class com.jaunt.Cookie
-
Sets the domain of the cookie to the specified value.
- setEnctype(short) - Method in class com.jaunt.component.Form
-
Sets the enctype of the form to the specified enctype (constant of HttpRequest).
- setEnctype(short) - Method in class com.jaunt.HttpRequest
-
Sets the enctype to the specified enctype constant.
- setExpires(String) - Method in class com.jaunt.Cookie
-
Sets the expires field of the cookie to the specified (GMT String) value, eg Thu, 15-Apr-2010 20:00:00 GMT
- setFile(String, File) - Method in class com.jaunt.component.Form
-
Sets the first FileComponent with the specified (case insensitive) name to upload the specified File and throws an Exception if no FileComponent with specified name was found.
- setFilter(FilterCallback) - Method in class com.jaunt.UserAgent
-
Deprecated.
- setHandler(String, Handler) - Method in class com.jaunt.UserAgent
-
Sets the content handler for the specified contentType; the Handler receives callbacks to process the content rather than having it handled by the parser.
- setHidden(String, String) - Method in class com.jaunt.component.Form
-
Sets the first hidden field with the specified (case insensitive) name to the specified value and throws an Exception if no field with specified name exists.
- setHttpOnly(boolean) - Method in class com.jaunt.Cookie
-
Sets whether the cookie has the HttpOnly flag.
- setMethod(short) - Method in class com.jaunt.component.Form
-
Sets the method (GET or POST) to the specified method constant in HttpRequest.
- setName(String) - Method in class com.jaunt.Cookie
-
Sets the name field of the cookie to the specified value.
- setNameValuePair(String, String) - Method in class com.jaunt.HttpRequest
-
Adds the specified name and value, removing any other values associated with the specified name, irrespective of the case of the name; the added values should be url-encoded if creating a request of who's enctype is ENCTYPE_APPLICATION_X_WWW_FORM_URLENCODED.
- setPassword(String, String) - Method in class com.jaunt.component.Form
-
Sets the first password field with the specified (case insensitive) name to the specified value and throws an Exception if no field with specified name exists.
- setPath(String) - Method in class com.jaunt.Cookie
-
Sets the path of the cookie to the specified value.
- setProxyHost(String) - Method in class com.jaunt.UserAgent
-
Sets or clears the ip address of the http proxy.
- setProxyPort(int) - Method in class com.jaunt.UserAgent
-
Sets the port number of the http proxy to be used.
- setRadio(String, String) - Method in class com.jaunt.component.Form
-
Sets the radiobutton with the specified (case insensitive) name and
(case insensitive) value to 'checked' and deselects all other radiobuttons
with the same name.
- setRadio(String, int) - Method in class com.jaunt.component.Form
-
Sets the radiobutton at index n and with the specified name to be 'checked' and
deselects all onther radiobuttons with the same name, throwing an exception if no such radiobutton exists.
- setReferer(String) - Method in class com.jaunt.UserAgent
-
Sets the value of the referer header in the next HTTP request.
- setSecure(boolean) - Method in class com.jaunt.Cookie
-
Sets whether the cookie has the secure flag.
- setSelect(String, String) - Method in class com.jaunt.component.Form
-
Sets the first menu option with specified (case insensitive) name and (case insensitive) value to 'selected' and
deselects all other options in the same select tag if the select tag does
not have 'multiple' keyword; throws an Exception if no such menu option exists.
- setSelect(String, int) - Method in class com.jaunt.component.Form
-
Sets the nth menu option with the specified (case insensitive) name to 'selected',
and deselects all other options in the same select tag, throwing an Exception if no such menu option was found.
- setText(String) - Method in class com.jaunt.Comment
-
Sets the text content of the Comment.
- setTextArea(String, String) - Method in class com.jaunt.component.Form
-
Sets the textarea with specified (case insensitive) name to the specified value and throws an Exception if no such button exists.
- setTextField(String, String) - Method in class com.jaunt.component.Form
-
Sets the first textfield with the specified (case insensitive) name to the specified value and throws an Exception if no field with specified name was found.
- settings - Variable in class com.jaunt.UserAgent
-
The UserAgent's settings.
- setValue(String) - Method in class com.jaunt.Cookie
-
Sets the value field of the cookie to the specified value.
- setValue(String) - Method in class com.jaunt.Text
-
Sets the text value.
- showHeaders - Variable in class com.jaunt.UserAgentSettings
-
UserAgent setting indicating whether to print HTTP request headers and response headers to System.out.
- showTravel - Variable in class com.jaunt.UserAgentSettings
-
UserAgent setting indicating whether to print current request/location to System.out (including requests when downloading a complete web page).
- showWarnings - Variable in class com.jaunt.UserAgentSettings
-
UserAgent setting indicating whether to print warning messages to System.out.
- size() - Method in class com.jaunt.Elements
-
Returns the number of child Elements.
- size() - Method in class com.jaunt.JNode
-
If this Node does not represent a JSON object or array, return -1; otherwise returns the number of child nodes in the object/array.
- size() - Method in class com.jaunt.util.MultiMap
-
Returns the number of unique keys.
- sort(K) - Method in class com.jaunt.util.MultiMap
-
Sorts the objects associated with the specified key alphabetically.
- stackTraceToString(Throwable) - Static method in class com.jaunt.util.IOUtil
-
Returns a String representation of the stracktrace generated by the specified Throwable.
- submit() - Method in class com.jaunt.component.Form
-
Submits the the form without pressing any particular submit button; no name-value pair contribution from any submit button is added to the query string.
- submit(int) - Method in class com.jaunt.component.Form
-
Submits the the form by pressing the submit button specified by its index, with indexing starting at 0 for the first submit button, throwing a NotFound Exception if the specified submitButton is not found.
- submit(String) - Method in class com.jaunt.component.Form
-
Submits the the form by pressing the first submit button who's value (ie, text label) matches the specified (case-insensitive) regular expression (using Matcher.matches) and throws an Exception if the specified submitButton does not exist.
- submit() - Method in class com.jaunt.Document
-
Submits the active form by pressing the submit button, throws a MultipleFound exception if more than one submit button exists in the form.
- submit(String) - Method in class com.jaunt.Document
-
Submits the active form using the submit button who's text matches the specified (case insensitive) regular expression, using Matcher.matches.


| Winter | Spring | Summer | Autumn |
|---|
Brussels sprouts
Cabbage
Carrot
Cauliflower
Leek
Onion
Parsnip
Potato
Pumpkin
Purple sprouting broccoli
Swede
Turnip
Asparagus
Brussels sprouts
Cabbage
Carrot
Cauliflower
Cucumber
Lettuce
Onion
Potato
Purple broccoli
Radish
Red onion
Beans
Broccoli
Carrot
Cauliflower
Celery
Courgette
Cucumber
Lettuce
Onion
Potato
Radish
Rocket
Butternut squash
Brussels sprouts
Cabbage
Carrot
Cauliflower
Celery
Kale
Leek
Onion
Parsnip
Pumpkin
Spinach


Main Concepts
PW3 - Routes & components
Let's create a new route and a new component "Contacts" to our application!
-
Create a new component Contact ( create the
src/app/contact
folder to do so)
-
Routes are defined in the App component (so src/app/app.routing.ts).
Add a new route to Contact:
- Name of the route: 'Contact'
- Path of the route: '/contact'
-
In the template of the app component, there is a link to Contact which
"does nothing", do the necessary to make it navigate to your new Contact component
-
Complete the Contact component:
-
Our contact should look like this (we don't care about css):
-
Add the fields mail/phone/postalMail in the Contact class and use them in the template
-
Use a textarea element to let the user write a message
-
Add an updateTextContent method in your component class, and call this
method each time the text is modified in the textarea
(by using the input event). The method does nothing, just be sure that
you can access the textarea message from this method...
-
Add a click button which listen for click events and call a method.
Again, the method does nothing for now.


Congratulations! You have started the container for this tutorial! Let’s first explain the command that you just ran. In case you forgot, here’s the command:
docker run -d -p 80:80 docker/getting-started
You’ll notice a few flags being used. Here’s some more info on them:
-d
- run the container in detached mode (in the background)-p 80:80
- map port 80 of the host to port 80 in the containerdocker/getting-started
- the image to use!!! info “Pro tip”
You can combine single character flags to shorten the full command.
As an example, the command above could be written as:
docker run -dp 80:80 docker/getting-started
Before going too far, we want to highlight the Docker Dashboard, which gives you a quick view of the containers running on your machine. It gives you quick access to container logs, lets you get a shell inside the container, and lets you easily manage container lifecycle (stop, remove, etc.).
To access the dashboard, follow the instructions for either
Mac or
Windows. If you open the dashboard
now, you will see this tutorial running! The container name (jolly_bouman
below) is a
randomly created name. So, you’ll most likely have a different name.
Now that you’ve run a container, what is a container? Simply put, a container is simply another process on your machine that has been isolated from all other processes on the host machine. That isolation leverages kernel namespaces and cgroups, features that have been in Linux for a long time. Docker has worked to make these capabilities approachable and easy to use.
!!! info “Creating Containers from Scratch” If you’d like to see how containers are built from scratch, Liz Rice from Aqua Security has a fantastic talk in which she creates a container from scratch in Go. While she makes a simple container, this talk doesn’t go into networking, using images for the filesystem, and more. But, it gives a fantastic deep dive into how things are working.
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/8fi7uSYlOdc" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
When running a container, it uses an isolated filesystem. This custom filesystem is provided by a container image. Since the image contains the container’s filesystem, it must contain everything needed to run an application - all dependencies, configuration, scripts, binaries, etc. The image also contains other configuration for the container, such as environment variables, a default command to run, and other metadata.
We’ll dive deeper into images later on, covering topics such as layering, best practices, and more.
!!! info
If you’re familiar with chroot
, think of a container as an extended version of chroot
. The
filesystem is simply coming from the image. But, a container adds additional isolation not
available when simply using chroot.


pyfos_brocade_zone
- PyFOS module to provide rest support for Zoning.¶
The pyfos_brocade_zone
provides a REST support for Zoning.
-
class
pyfos_brocade_zone.
defined_configuration
(dictvalues={})¶ Class of defined zone configuration
Important class members:
Attribute name Description Frequently used methods cfg a list of cfg set_cfg()
peek_cfg()
cfg-name name of cfg set_cfg_cfg_name()
peek_cfg_cfg_name()
member_zone/zone-name list of zone members in cfg set_cfg_member_zone_zone_name()
peek_cfg_member_zone_zone_name()
zone a list of zone set_zone()
peek_zone()
zone-name name of zone set_zone_zone_name()
peek_zone_zone_name()
zone-type type of zone set_zone_zone_type()
peek_zone_zone_type()
member-entry/entry-name list of device members in zone set_zone_member_entry_entry_name()
peek_zone_member_entry_entry_name()
member-entry/principal-entry-name list of principal device members in zone set_zone_member_entry_principal_entry_name()
peek_zone_member_entry_principal_entry_name()
alias a list of alias set_alias()
peek_alias()
alias-name name of alias set_alias_alias_name()
peek_alias_alias_name()
member-entry/alias-entry-name list of entries in alias set_alias_member_entry_alias_entry_name()
peek_alias_member_entry_alias_entry_name()
Object methods
-
get
()¶ Return
defined_configuration
object with values for all the attributes. The object can be printed usingpyfos_utils.response_print()
Parameters: session – session handler returned by pyfos_auth.login()
Return type: dictionary of error or defined_configuration
object
-
post
()¶ Create an entry. Fields involved are set within the object using attribute’s set method. This command is used to create a new cfg, zone, or alias.
Example usage of the method to create a new cfg:
defined_configuration_obj = pyfos_newzone.defined_configuration() defined_configuration_obj.set_cfg_cfg_name("newcfg") zones = {"zone1", "zone2"} defined_configuration_obj.set_cfg_member_zone_zone_name(zones) defined_configuration_obj.post(session)
Note
refer to
effective_configuration
for saving or enabling the changeParameters: session – session handler returned by pyfos_auth.login()
Return type: dictionary of error or success response
-
patch
()¶ Replace entry members. Fields involved are set within the object using attribute’s set method. This command is used to add to the existing members of cfg, zone or alias.
Example usage of the method to add to an existing cfg:
defined_configuration_obj = pyfos_newzone.defined_configuration() defined_configuration_obj.set_cfg_cfg_name("newcfg") zones = {"zone3", "zone4"} defined_configuration_obj.set_cfg_member_zone_zone_name(zones) defined_configuration_obj.patch(session)
Note
refer to
effective_configuration
for saving or enabling the changeParameters: session – session handler returned by pyfos_auth.login()
Return type: dictionary of error or success response
-
delete
()¶ Delete an entry or entry members. Fields involved are set within the object using attribute’s set method. This command is used to delete an cfg, zone, or alias or delete the existing members of cfg, zone or alias.
Example usage of the method to delete from an existing cfg:
defined_configuration_obj = pyfos_newzone.defined_configuration() defined_configuration_obj.set_cfg_cfg_name("newcfg") zones = {"zone3", "zone4"} defined_configuration_obj.set_cfg_member_zone_zone_name(zones) defined_configuration_obj.delete(session)
Example usage of the method to delete an existing cfg:
defined_configuration_obj = pyfos_newzone.defined_configuration() defined_configuration_obj.set_cfg_cfg_name("newcfg") defined_configuration_obj.set_cfg_member_zone_zone_name(zones) defined_configuration_obj.delete(session)
Note
refer to
effective_configuration
for saving or enabling the changeParameters: session – session handler returned by pyfos_auth.login()
Return type: dictionary of error or success response
Attribute methods
-
set_cfg
(cfg)¶ Sets cfg in the object
Parameters: cfg – cfg dictionary of cfg name and list of members Return type: dictionary of error or success response
-
peek_cfg
()¶ Reads cfg in the object.
Return type: None or cfg
-
set_cfg_cfg_name
(cfg_name)¶ Sets cfg_name in the object
Parameters: cfg_name – name of cfg Return type: dictionary of error or success response
-
peek_cfg_cfg_name
()¶ Reads cfg_name in the object.
Return type: None or cfg name
-
set_cfg_member_zone_zone_name
(zone_list)¶ Sets a list of zone names in cfg in the object
Parameters: zone_list – list of mbmers zone names Return type: dictionary of error or success response
-
peek_cfg_member_zone_zone_name
()¶ Reads a list of zone members in cfg in the object.
Return type: None or list of zone members
-
set_zone
(zone)¶ Sets zone in the object
Parameters: zone – zone dictionary of zone name, zone type and list of members Return type: dictionary of error or success response
-
peek_zone
()¶ Reads zone in the object.
Return type: None or zone
-
set_zone_zone_name
(zone_name)¶ Sets zone name in the object
Parameters: zone_name – name of zone Return type: dictionary of error or success response
-
peek_zone_zone_name
()¶ Reads zone name in the object.
Return type: None or zone name
-
set_zone_zone_type
(zone_type)¶ Sets zone type to default or peer zone in the object. Type of 0 indicate normal Zone while type of 1 indicates Peer Zone.
Parameters: zone_type – zone type Return type: dictionary of error or success response
-
peek_zone_zone_type
()¶ Reads zone type in the object.
Return type: None or zone type
-
set_zone_member_entry_entry_name
(entry_list)¶ Sets a list of device entries in zone in the object
Parameters: entry_list – list of member devices Return type: dictionary of error or success response
-
peek_zone_member_entry_entry_name
()¶ Reads a list of device members in zone in the object.
Return type: None or list of device members
-
set_zone_member_entry_principal_entry_name
(entry_list)¶ Sets a list of principal device entries in zone in the object
Parameters: entry_list – list of member devices Return type: dictionary of error or success response
-
peek_zone_member_entry_principal_entry_name
()¶ Reads a list of principal device members in zone in the object.
Return type: None or list of device members
-
set_alias
(alias)¶ Sets alias in the object
Parameters: alias – alias dictionary of alias name and list of members Return type: dictionary of error or success response
-
peek_alias
()¶ Reads alias in the object.
Return type: None or alias
-
set_alias_alias_name
(alias_name)¶ Sets alias name in the object
Parameters: alias_name – name of alias Return type: dictionary of error or success response
-
peek_alias_alias_name
()¶ Reads alias name in the object.
Return type: None or alias name
-
set_alias_member_entry_alias_entry_name
(entry_list)¶ Sets a list of alias members in zone in the object
Parameters: entry_list – list of alias members Return type: dictionary of error or success response
-
peek_alias_member_entry_alias_entry_name
()¶ Reads a list of alias members in cfg in the object.
Return type: None or list of alias members
-
-
class
pyfos_brocade_zone.
effective_configuration
(dictvalues={})¶ Class of effective zone configuration
class members:
Attribute name Description Frequently used methods cfg-name enabled cfg name set_cfg_name()
peek_cfg_name()
checksum current db checksum peek_checksum()
cfg-action cfg actions to enable, disable, clear, or save set_cfg_action()
peek_cfg_action()
default-zone-access default zone access to all or none set_default_zone_access()
peek_default_zone_access()
db-avail current db available size peek_db_avail()
db-max current db max size peek_db_max()
db-committed current db committed size peek_db_committed()
db-transaction current db pending trans size peek_db_transaction()
db-transaction current db pending trans size peek_db_transaction()
transaction-token current db pending trans token peek_transaction_token()
db-chassis-wide-committed current db chassis size peek_db_chassis_wide_committed()
enabled-zone list of enabled zones peek_enabled_zone()
zone-name name of zone peek_enabled_zone_zone_name()
zone-type type of zone peek_enabled_zone_zone_type()
member-entry/entry-name device entry list peek_enabled_zone_member_entry_entry_name()
embmer-entry/principal-entry-name principal device entry list peek_enabled_zone_member_entry_principal_entry_name()
Object methods
-
get
()¶ Return
effective_configuration
object with values for all the attributes. The object can be printed usingpyfos_utils.response_print()
Parameters: session – session handler returned by pyfos_auth.login()
Return type: dictionary of error or effective_configuration
object
-
patch
()¶ Apply changes. Fields involved are set within the object using attribute’s set method.
Example usage of the method to enable an cfg:
current_effective_configuration = pyfos_newzone.effective_configuration_get(session) effective_configuration_obj = pyfos_newzone.effective_configuration() effective_configuration_obj.set_cfg_name("newcfg") effective_configuration_obj.set_checksum( current_effective_configuration.peek_checksum()) effective_configuration_obj.patch(session)
Example usage of the method to save an cfg:
current_effective_configuration = pyfos_newzone.effective_configuration_get(session) effective_configuration_obj = pyfos_newzone.effective_configuration() effective_configuration_obj.set_cfg_action(pyfos_zone.CFG_ACTION_SAVE) effective_configuration_obj.set_checksum( current_effective_configuration.peek_checksum()) effective_configuration_obj.patch(session)
Example usage of set_cfg_action:
effective_configuration_obj.set_cfg_action(pyfos_zone.CFG_ACTION_SAVE) effective_configuration_obj.set_cfg_action(pyfos_zone.CFG_DISABLE) effective_configuration_obj.set_cfg_action(pyfos_zone.CFG_CLEAR) effective_configuration_obj.set_cfg_action(pyfos_zone.CFG_ABORT)
Note
cfg enable, save, and disable requires the current checksum to be passed
Parameters: session – session handler returned by pyfos_auth.login()
Return type: dictionary of error or success response
Attribute methods
-
set_cfg_name
(cfg_name)¶ Sets cfg name in the object
Parameters: cfg_name – cfg name Return type: dictionary of error or success response
-
peek_cfg_name
()¶ Reads cfg name in the object.
Return type: None or cfg name
-
peek_checksum
()¶ Reads checksum in the object.
Return type: None or checksum
-
set_cfg_action
(cfg_action)¶ Sets cfg action in the object
Parameters: cfg_action – cfg action such as enable, disable, save, or clear Return type: dictionary of error or success response
-
peek_cfg_action
()¶ Reads cfg action in the object.
Return type: None or cfg action
-
set_default_zone_access
(mode)¶ Sets default zone access mode in the object. Mode of 1 is all access & 0 is no access.
Parameters: mode – default zone access mode Return type: dictionary of error or success response
-
peek_default_zone_access
()¶ Reads default zone access mode in the object. Mode of 1 is all access & 0 is no access.
Return type: None or default zone access mode
-
peek_db_avail
()¶ Reads available db size in the object.
Return type: None or available db size
-
peek_db_max
()¶ Reads max db size in the object.
Return type: None or max db size
-
peek_db_committed
()¶ Reads committed db size in the object.
Return type: None or committed db size
-
peek_db_transaction
()¶ Reads transaction buffer size in the object.
Return type: None or transactdion buffer size
-
peek_transaction_token
()¶ Reads transaction token in the object.
Return type: None or transactdion token
-
peek_db_chassis_wide_committed
()¶ Reads chassis wide committed db size in the object.
Return type: None or db size
-
peek_enabled_zone
()¶ Reads list of enabled zones in the object.
Return type: None or list of enabled zones
-
peek_enabled_zone_zone_name
()¶ Reads zone name in the object.
Return type: None or zone name
-
peek_enabled_zone_zone_type
()¶ Reads zone type in the object.
Return type: None or zone type
-
peek_enabled_zone_member_entry_entry_name
()¶ Reads list of zone member devices in the object.
Return type: None or list of devices
-
peek_enabled_zone_member_entry_principal_entry_name
()¶ Reads list of zone member principal devices in the object.
Return type: None or list of devices
-
See also
Module pyfos_auth


QOS¶
Por hacer
Hacer.
QOS: Lo que la red da
COS: Lo que se requere de la red, es indistinto a QOS
TOS: Un campo de IPv4 obsoleto
IP QOS peermite calidad de servicio extremo a extremo, de capa 2 como VLAN no
La cola es punteros a memoria. Un buffer es la memoria.
Es lo mismo QoS en IPv4 que en IPv6 basicamente, cambian un poco los headers nomas
Solamente se puede controlar lo que sale para el tema de prioridades. El marcado es a la entrada.
Arquitectura¶
Grandes grupos: mecansimos de control de datos o control de caminos.
Clasificación:
Por flujo: Secuencia de datagramas (IP origen y destino, puerto origen y destino, protocolo). Cada conexion TCP tiene tiene 2 flujos.
Stream.
Clase trafico.
Campo de IP.
MPLS.
Capa 2.
Inspección profunda.
Policing: En
tc
ocurre en el arribo de paquetes en la interfaz en lugar de la salida. Cuando el tráfico supera el máximo los paquetes son descartados. Tengo entendido que no soporta ráfagas superiores al límite.Shaping: En
tc
ocurre en la salida de paquetes por la interfaz en lugar de la entrada. Cuando el tráfico supera el máximo los paquetes son encolados para ser transmitidos más tarde. Tengo entendido que no soporta ráfagas superiores al límite.Marking: Marcado de paquetes, en el origen o en el ingreso de la red. Hay varias formas de marcar. Para marcar usamos la tabla mangle de iptables.
Por hacer
Random Early Detection, RED, WRED.
TOS¶
En IPv4: 3 bit para precedencia, o sea 8 prioridades distintas. Despues 4 bits DTRC. Nunca se usó.
DSCP¶
Creo que es DiffServ tambien
El DS RFC 2474 le dio otro significado a ese campo. EN IPv6 le pusieron significado al campo de clase y al primer pedazo del campo flow type o algo asi. Se definio DSCP.
Primero 3 bits para 8 prioridades (coincide con el TOS de IPv4) despues hay 2 bits para tener 4 prioridades de descarte. El sexto bit se pone en cero.
Si los primeros 3 bits dan:
7: Control de la red
6: Control de la red
5: Expedited forwarding
4: Assured forwarding: Linea dedicada, garantiza todo
3: Assured forwarding
2: Assured forwarding
1: Assured forwarding
0: Best Effort
Expedited forwarding: Linea dedicada, garantiza todo, como CBR en ATM
Assured forwarding: Preferencial
Best Effort: Sin garantías.
Despues para cada clase tenes tres probabilidades de descarte.
PHB: Per Hop Behavior. Lo que hace cada router. Los routers en conjunto son un dominio DiffServ.
SLA¶
Service Level Agreement.
Contrato entre usuario y operador de red.
ITU-T E.860 define el marco? una estructura generica.
Parametros posibles:
Disponibilidad. por porcentaje, cuantas hhoras por dia, cuantas horas seguidas, etc.
Ancho de banda.
Perdida de paquetes, por porcentaje. 1 de cada 100 vs 10 de cada 1000.
RTT.
Jitter.
Etc.
La IPTF estableció la IPPM que hace estandares de medicion.
Netflow¶
Netflow
ELK: Elastic search, ???, Kibana?
Control de tráfico en Linux¶
Desde man tc
:
Qdiscs
qdisc is short for 'queueing discipline' and it is elementary to
understanding traffic control. Whenever the kernel needs to send a packet to
an interface, it is enqueued to the qdisc configured for that interface.
Immediately afterwards, the kernel tries to get as many packets as possible
from the qdisc, for giving them to the network adaptor driver.
A simple QDISC is the 'pfifo' one, which does no processing at all and is a
pure First In, First Out queue. It does however store traffic when the
network interface can't handle it momentarily.
Classes
Some qdiscs can contain classes, which contain further qdiscs - traffic may
then be enqueued in any of the inner qdiscs, which are within the classes.
When the kernel tries to dequeue a packet from such a classful qdisc it can
come from any of the classes. A qdisc may for example prioritize certain
kinds of traffic by trying to dequeue from certain classes before others.
Filters
A filter is used by a classful qdisc to determine in which class a packet
will be enqueued. Whenever traffic arrives at a class with subclasses, it
needs to be classified. Various methods may be employed to do so, one of
these are the filters. All filters attached to the class are called, until
one of them returns with a verdict. If no verdict was made, other criteria
may be available. This differs per qdisc.
It is important to notice that filters reside within qdiscs - they are not
masters of what happens.
qdisc¶
Sacado de acá:
Simply put, a qdisc is a scheduler (Section 3.2). Other qdiscs available under Linux will rearrange the packets entering the scheduler’s queue in accordance with that scheduler’s rules.
The qdisc is the major building block on which all of Linux traffic control is built, and is also called a queuing discipline.
The classful qdiscs can contain classes, and provide a handle to which to attach filters. There is no prohibition on using a classful qdisc without child classes, although this will usually consume cycles and other system resources for no benefit.
The classless qdiscs can contain no classes, nor is it possible to attach filter to a classless qdisc. Because a classless qdisc contains no children of any kind, there is no utility to classifying. This means that no filter can be attached to a classless qdisc.
A source of terminology confusion is the usage of the terms root qdisc and ingress qdisc. These are not really queuing disciplines, but rather locations onto which traffic control structures can be attached for egress (outbound traffic) and ingress (inbound traffic).
Each interface contains both. The primary and more common is the egress qdisc, known as the root qdisc. It can contain any of the queuing disciplines (qdiscs) with potential classes and class structures. The overwhelming majority of documentation applies to the root qdisc and its children. Traffic transmitted on an interface traverses the egress or root qdisc.
For traffic accepted on an interface, the ingress qdisc is traversed. With its limited utility, it allows no child class to be created, and only exists as an object onto which a filter can be attached. For practical purposes, the ingress qdisc is merely a convenient object onto which to attach a policer to limit the amount of traffic accepted on a network interface.
In short, you can do much more with an egress qdisc because it contains a real qdisc and the full power of the traffic control system. An ingress qdisc can only support a policer. The remainder of the documentation will concern itself with traffic control structures attached to the root qdisc unless otherwise specified
class¶
Sacado de acá:
Classes only exist inside a classful qdisc (e.g., HTB and CBQ). Classes are immensely flexible and can always contain either multiple children classes or a single child qdisc. There is no prohibition against a class containing a classful qdisc itself, which facilitates tremendously complex traffic control scenarios.
Any class can also have an arbitrary number of filters attached to it, which allows the selection of a child class or the use of a filter to reclassify or drop traffic entering a particular class.
A leaf class is a terminal class in a qdisc. It contains a qdisc (default FIFO) and will never contain a child class. Any class which contains a child class is an inner class (or root class) and not a leaf class.
Colas¶
CIR¶
Por hacer
Es un buffer cicular? Supuestamente es policer?
EBS¶
Por hacer
No la encuentro?? Supuestamente es policer?
T¶
Por hacer
No la encuentro?? Supuestamente es policer?
pfifo¶
Classless.
FIFO significa que el primer paquete que entra es el primero en salir.
Ver man tc-pfifo
:
They are the simplest queues possible and therefore have no overhead. pfifo
constrains the queue size as measured in packets. bfifo does so as measured
in bytes.
pfifo_fast¶
Classless.
Es la cola por defecto en Linux y Mikrotik. Es classless pero contienen tres colas en el caso que se quiera dar prioridades.
Ver man tc-pfifo_fast
:
pfifo_fast is the default qdisc of each interface.
The algorithm is very similar to that of the classful tc-prio(8) qdisc.
pfifo_fast is like three tc-pfifo(8) queues side by side, where packets can
be enqueued in any of the three bands based on their Type of Service bits or
assigned priority.
Not all three bands are dequeued simultaneously - as long as lower bands have
traffic, higher bands are never dequeued. This can be used to prioritize
interactive traffic or penalize 'lowest cost' traffic.
Each band can be txqueuelen packets long, as configured with ifconfig(8) or
ip(8). Additional packets coming in are not enqueued but are instead dropped.
See tc-prio(8) for complete details on how TOS bits are translated into bands.
CBS¶
Classless.
De shaping.
Creo que nunca la usamos. Ver man tc-cbs
:
The CBS (Credit Based Shaper) qdisc implements the shaping algorithm defined
by the IEEE 802.1Q-2014 Section <IP_ADDRESS>, which applies a well defined rate
limiting method to the traffic.
This queueing discipline is intended to be used by TSN (Time Sensitive
Networking) applications, the CBS parameters are derived directly by what is
described by the Annex L of the IEEE 802.1Q-2014 Specification. The algorithm
and how it affects the latency are detailed there.
CBS is meant to be installed under another qdisc that maps packet flows to
traffic classes, one example is mqprio(8).
Tocken Bucket Filter¶
Classless.
Ver man tc-tbf
:
The Token Bucket Filter is a classful queueing discipline available for
traffic control with the tc(8) command.
As the name implies, traffic is filtered based on the expenditure of tokens.
Tokens roughly correspond to bytes, with the additional constraint that each
packet consumes some tokens, no matter how small it is. This reflects the fact
that even a zero-sized packet occupies the link for some time.
tc qdisc add dev eth0 root tbf rate 220kbit latency 50ms burst 1540
SFQ¶
Classless.
Como la FIFO con bandas.
Ver man tc-sfq
:
Stochastic Fairness Queueing is a classless queueing discipline available for
traffic control with the tc(8) command.
SFQ does not shape traffic but only schedules the transmission of packets,
based on 'flows'. The goal is to ensure fairness so that each flow is able to
send data in turn, thus preventing any single flow from drowning out the rest.
This may in fact have some effect in mitigating a Denial of Service attempt.
Ver el manual de Mikrotik:
Stochastic Fairness Queuing (SFQ) is ensured by hashing and round-robin algorithms. A traffic flow may be uniquely identified by a 4 options(src-address, dst-address, src-port and dst-port), so these parameters are used by SFQ hashing algorithm to classify packets into one of 1024 possible sub-streams. Then round-robin algorithm will start to distribute available bandwidth to all sub-streams, on each round giving sfq-allot bytes of traffic. The whole SFQ queue can contain 128 packets and there are 1024 sub-streams available.
SFQ is called «Stochastic» because it does not really allocate a queue for each flow, it has an algorithm which divides traffic over a limited number of queues (1024) using a hashing algorithm.
Nosotros ponemos que se reconfigure cada 10 segundos:
tc qudisc add dev ent0 root sfq perturb 10
PCQ¶
Classless.
Similar a SFQ pero solo para Mikrotik creo.
Ver el manual de Mikrotik:
Per Connection Queuing (PCQ) is a similar to SFQ, but it has additional features.
It is possible to choose flow identifiers (from dst-address | dst-port | src-address | src-port). For example if you classify flows by src-address on local interface (interface with your clients), each PCQ sub-stream will be one particular client’s upload.
It is possible to assign speed limitation to sub-streams with pcq-rate option. If pcq-rate=0 sub-streams will divide available traffic equally.
PCQ was introduced to optimize massive QoS systems, where most of the queues are exactly the same for different sub-streams. For example a sub-stream can be download or upload for one particular client (IP) or connection to server.
PCQ algorithm is very simple - at first it uses selected classifiers to distinguish one sub-stream from another, then applies individual FIFO queue size and limitation on every sub-stream, then groups all sub-streams together and applies global queue size and limitation.
PRIO¶
Classful.
Es como pfifo_fast que ordena paquetes en solamente 3 bandas.
Hay que tener cuidado de que la suma de las hijas no sea mayor a la de arriba, porque en tal caso deja de andar y es como que no limita nada, pasa todo de largo.
Ver man tc-prio
:
The PRIO qdisc is a simple classful queueing discipline that contains an
arbitrary number of classes of differing priority. The classes are dequeued in
numerical descending order of priority. PRIO is a scheduler and never delays
packets - it is a work-conserving qdisc, though the qdiscs contained in the
classes may not be.
Very useful for lowering latency when there is no need for slowing down traffic.
On creation with 'tc qdisc add', a fixed number of bands is created. Each band
is a class, although is not possible to add classes with 'tc qdisc add', the
number of bands to be created must instead be specified on the command line
attaching PRIO to its root.
When dequeueing, band 0 is tried first and only if it did not deliver a packet
does PRIO try band 1, and so onwards. Maximum reliability packets should
therefore go to band 0, minimum delay to band 1 and the rest to band 2.
As the PRIO qdisc itself will have minor number 0, band 0 is actually major:1,
band 1 is major:2, etc. For major, substitute the major number assigned to the
qdisc on 'tc qdisc add' with the handle parameter.
CBQ¶
Classful.
Permite prestar trafico a otra rama cuando no lo usa, creo que es el único que deja hacer eso de las que vemos, pero hay otras variaciones. Muy dificil de configurar, hay que hacer cuentas.
Es como la prio pero hace un round robin con pesos que se van calculando dinamicamene que se yo.
Ver man tc-cbq
:
Class Based Queueing is a classful qdisc that implements a rich linksharing
hierarchy of classes. It contains shaping elements as well as prioritizing
capabilities. Shaping is performed using link idle time calculations based on
the timing of dequeue events and underlying link bandwidth.
HTB¶
Classful.
Token Bucket Filter con prioridades.
Ver man tc-htb
:
HTB is meant as a more understandable and intuitive replacement for the CBQ
qdisc in Linux. Both CBQ and HTB help you to control the use of the outbound
bandwidth on a given link.
Both allow you to use one physical link to simulate several slower links and to
send different kinds of traffic on different simulated links. In both cases, you
have to specify how to divide the physical link into simulated links and how to
decide which simulated link to use for a given packet to be sent.
Unlike CBQ, HTB shapes traffic based on the Token Bucket Filter algorithm which
does not depend on interface characteristics and so does not need to know the
underlying bandwidth of
the outgoing interface.


loading
Bulk add members (not invite) to the group. Simply paste a list of Jive User IDs (i.e. 1234) 1 per line into the box below and click Bulk Add Member(s)
0 lines
loading
Bulk add members (not invite) to the group. Simply paste a list of Jive User IDs (i.e. 1234) 1 per line into the box below and click Bulk Add Member(s)
0 lines


Speed dials are meant for adjusting the speed of a set of functions from virtual console, much like bus-mode sliders in the previous versions of QLC+. While the bus concept relied on assigning functions and a slider to the same bus, the speed dial's method is a simpler and more straightforward one: The user directly selects a set of functions whose speed properties are controlled with the dial, thus removing the need for buses in the middle.
The speed dial itself looks and works just the same as the speed dials in various function editors: There is a big dial in the middle that increases the time when rotated clockwise and decreases it when rotated counter-clockwise. The plus and minus buttons are an alternative way of adjusting the speed.
The current time value is displayed in four parts. When any of these fields is clicked, the dial and the plus/minus buttons will increase/decrease that unit of time. The mouse wheel can also be used instead of the dial/buttons and the fields also accept values entered on the numeric keypad.
Clicking the infinite button disables all of the dial's controls and sets the currently adjusted functions' speed to infinity. For example, with a Chaser, an infinite duration means that it will never switch to the next step unless manually instructed to (see Cue List).
The tap button can be used to match the time to a beat. The elapsed time between clicks is measured and this time is set for the controlled functions, just as if the dial had been adjusted to that particular time.
For cuelists/chasers and RGB Matrices, the tap button advances things to next step/position when speed dial is set to adjust duration. The tapped tempo must be more than 1/4 of the original duration.
Speed dials can be configured with the properties button found in the toolbar or by double clicking the speed dial itself.
| Speed Dial Name | Change the dial's name. | ||||||
| Function table |
Displays the list of functions, whose speed value(s) are being controlled by the dial. For each speed value (fade in, fade out, duration), it is possible to set a multiplier.
This multiplier will be applied to the speed dial value before adjusting the functions' speed value. Select (Not Sent) so the functions' speed value will not be affected by this speed dial. |
||||||
| Add function(s) to be controlled by the speed dial. | |||||||
| Remove the selected functions from the speed dial's list of controlled functions. |
External input can be configured here: one for value with minimum and maximum and another for tap button.
Individual visibility of the widget's layout elements can be switched on or off here. This way it is possible to save some screen real estate if some of the fields are not needed (e.g. when controlled by an external controller, the big dial is not needed).
| Show the plus and minus buttons |
| Show the central dial |
| Show the tap button |
| Show the hours field |
| Show the minutes field |
| Show the seconds field |
| Show the milliseconds field |
| Show the inifinite option |


So basically, I had heard mixed stories of people who smoked mushrooms. One side of people said it's better to just eat them, and another side said it was really fun to do. So, I got a hold off 1.5g of Mushrooms, and 3g of Marijuana, two crushed up 10mg pills of Ritalin. I had the ritalin because I have a prescription of it. Myself and 2 other friends decided to go smoke all this stuff mixed in together. We rolled like 5 or 6 joints, I can't even remember really.
So we smoked the first one. Blam, we were stoned, but energetic. We all felt the pot buzz. Kind of laughing, slow moving, that sort of thing. After the 2nd Joint, we were completely screwed. We were seeing things, laughing at whatever each other said, and it was hilarious. It was a great time, and we all had a good trip. We walked around town smoking the 3rd, and 4th joints. I can't remember what happened after them. It was really fun though.
Ritalin is great to crush up and put on pot. I've done this before and it gives you a cool buzz. Very different, more absorbed, and Focused. So anyhow, the mix of the 3 drugs was a blast. We also added one full cigarette into the mix. I forgot to mention that. Tobacco adds a smooth fix to the joints. And you can role alot more joints, evenly. All of the mixed substances were broken up as usual.
But back to the story. I'm a really good roller, so the joints burned fantastic, and we got alot of good hauls. We even played games where, each of us would take a huge haul, and would hold the pot in for the longest amount of time. The high lasted about 4 or 5 hours. They were long ours, but fun ones. Near the end of the night, everyone went their seprate ways. And it's still messed to be on it alone. I was sitting at home, able to think and just stare at my floor in my bedroom.
I could think so clearly about the way I think. How we analyze everything. The usage of language as an object to form our opinions and beliefs. The way everything works. The nothing that always seems to exist in anything. It's depressing, and tough. But I got over all of that at the end of the trip. I just understood things. I knew my surroundings. I realized the physics and meaning behind everything. And just took part in the pointlessness that exists in everything. I don't thrive on it, I just go with it.
I can still be happy and caring while knowing this information. It's just something I see now. Another thing, it's not as chaotic, and brutally honest as the buzz I get from eating mushrooms. Smoking them is much more comfortable, and personalized. I didn't feel as alienated, and overbeared by smoking this mix. It was a great mix, and it allowed me to see things differently.
I have a small sketch book I write or draw art in. I wrote in it for about 3 hours straight, rants, points, objectives, judgements, facts, nothing, whatever, and I did a few pictures too. Just abstract. Anyhow, it was great, and I had a nice sleep.
It was very fun to do. I never laughed so much, everyone was happy. The scenery was joyous, and triumphant. It feels like drinking and being stoned off pot. I had poor motor skills, and laughed hysterically. But it's really fun. And I could still walk efficiently, but just not straight. I felt very akward. It was great, and we're going to do it more often. I encourage people to try this mix.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.