home / programming / css
CSS in Depth, Keith Grant
- Ch. 1 Reviewing the fundamentals
- Ch. 2 Working with relative units
- Ch. 3 Mastering the box model
- Ch. 4 Making sense of floats
- Ch. 5 Flexbox
- Ch. 6 Grid layout
- Ch. 7 Positioning and stacking contexts
1 Cascade, specificity, and inheritance
Listing 1.1 (Wombat Coffee Roasters)
When two or more rules target the same element, they conflict. For example:
h1 { font-family:serif; } #page-title { font-family: sans-serif; } .title { font-family: monospace; }
The cascade is the name of the set of rules that determines how conflicts are resolved. The cascade considers:
- Stylesheet origin (where the styles come from)
- Selector specificity (which selectors take precedence)
- Source order (order in which styles are declared in the stylesheet)
Terminology
Declaration: a property and a value
Example: color: black;
Do not confuse declarations with attributes, which is HTML syntax. For example, in <a href="/">
, the attribute is href
.
A group of declarations inside curly braces is a declaration block. It is preceded by a selector, such as body
shown below:
body { color: black; font-family: sans-serif; }
Together, a selector and declaration block is called a ruleset.
Language constructs beginning with an "at" symbol (@) are called at-rules. For example, @import
rules and @media
queries.
1.1.1 Understanding stylesheet origin
The browser's default styles are user agent styles. Custom styles are called author styles. A user stylesheet may also be defined, and fall in between the user agent and author styles. However, they are fairly rare.
A declaration can be marked !important
(added to the end of the declaration, before the semicolon).
Important declarations are treated with a higher priority, even higher than inline styles (except !important inline styles).
1.1.2 Understanding specificity
Inline styles (defined with the HTML style
attribute), are applied only to that element (effectively "scoped" to that element). They have no selectors and override any declarations from stylesheets, except those marked !important
.
Important inline styles cannot be overridden by anything.
Selector specificity
The rules of selector specificity are:
- If a selector has more IDs, it wins
- If it is a tie, the selector with most classes wins
- If it is a tie, the selector with most tag names wins
Pseudo-class selectors such as :hover
and attribute selectors such as [type="input"]
have the same specificity as a class selector.
Since IDs take precedence over classes, it becomes harder to override later. You would have to use another ID.
A notation for specificity
A number form such as "1,2,2" indicates a specificity of one ID, two classes, and two tags.
If including inline styles, the leftmost digit as 1 represents an inline style, while 0 means it's not.
Instead of trying to raise the specificity of a selector, also consider reducing the specificity of neighboring selectors.
Generally, it's best to keep specificity as low as you can, so that there are more options to override them later.
1.1.3 Understanding source order
If everything up to here are the same, then the declaration that appears later in the stylesheet (or in later stylesheets included in the page) takes precedence.
Link styles and source order
Styles for links should appear in this order:
a:link
a:visited
a:hover
a:active
Cascaded values
The declaration that "wins" the cascade is called a cascaded value.
Two rules of thumb
- Don't use IDs in your selector. It becomes hard to override it later.
- Don't use
!important
. This is even harder to override later.
1.2 Inheritance
An element can receive styles from inheritance. Although it is often conflated with the cascade, they are not the same thing.
When an element has no cascaded value for a given property, it may inherit one from an ancestor element. For example, the value of font-family
may be inherited from the <body>
element.
Note: Not all properties are inherited. Primarily, text properties are inherited.
DevTools show which values are cascaded and inherited.
1.3 Special values
inherit
and initial
are special values that help you manipulate the cascade.
1.3.1 The inherit keyword
inherit
overrides a cascaded value, using the parent's value instead. For example, if you wish a footer's links to be gray instead of its typical value, set:
a:link { color: blue; } .footer { color: #666; background-color: #ccc; } .footer a { color: inherit; text-decoration: underline; }
inherit
also forces inheritance of a property not normally inherited, such as border and padding.
1.3.2 The initial keyword
Using initial
as the value will reset it to its default value.
Note: setting width: auto;
resets the width because auto
is its default (initial) value. However, auto
isn't the default value for all properties, nor is it valid for some properties.
Warning: shorthand properties (such as font
, border
, and background
) will silently set omitted values to their initial values. This behavior can override styles you specified elsewhere.
1.4.2 Understanding the order of shorthand values
The border, margin, and padding properties accept up to four values, starting from the top and going clockwise. If only two values are given, they are the vertical, then horizontal values.
On the other hand, two-value properties like background-position, box-shadow, and text-shadow have this order reversed. The mnemonic is that these more accurately represent Cartesian coordinates, (x, y), that correspond to horizontal, then vertical, values.
2 Working with relative units
Pixels are absolute units. em and rem are relative units. In general, 96 pixels are around 1 physical inch. A pixel is not necessarily the physical monitor's pixel, such as in high-resolution displays.
CSS brings a late-binding of styles to a web page. Styles aren't pulled together until after the authoring of both HTML and CSS is complete.
Responsive styles "respond" differently based on the size of the browser window.
Relative units allow you to create more general solutions (that work under different circumstances).
2.2 Ems and rems
1 em is the font size of the current element.
Values declared using relative units are evaluated by the browser to an absolute value, called the computed value.
font-size
ems are derived from the inherited font size.
For most browsers, the default font size is 16 px. The keyword medium
calculates to 16 px.
Calculation of ems is cumulative. So nested lists might result in shrinking font sizes. Rems (root ems) may be used to avoid this repeated calculation.
2.2.2 Using rems for font-size
In the DOM (Document Object Model), the root node is the ancestor of all other elements in the document. It has a special pseudo-class selector, :root
that you can use to target it. Using :root
will have the specificity of a class rather than of a tag (html
).
rem is short for root em. They are relative to the root element.
Always specify font sizes with relative units or percentages, because the user can then simply zoom in and out.
Tip: When in doubt, use rems for font size, pixels for borders, and ems for everything else.
Setting a sane default font size
Set a value at the root:
:root { font-size: 0.875em; }
A > in the selector is a direct descendant combinator. .panel > h2
targets an h2
element that is a child element of a .panel
element.
2.3.2 Making the panel responsive
@media
rules specify styles that will be applied only to certain screen sizes or media types.
:root { font-size: 0.75em; } @media (min-width: 800px) { :root { font-size: 0.875em; } } @media (min-width: 1200px) { :root { font-size: 1em; } }
Each ruleset will override the rulesets above it if the size of the screen is at least that many pixels wide.
2.3.3 Resizing a single component
By using rem for the main ruleset and em for a variation, the component's size can be easily changed:
.panel { font-size: 1rem; padding: 1em; } .panel > h2 { font-size: 0.8em; } .panel.large { font-size: 1.2rem; }
A normal panel would only have class="panel"
while the larger one will be class="panel large"
2.4 Viewport-relative units
The viewport is the framed area in the browser window where the web page is visible.
vh is 1/100th of the viewport height, and vw is 1/100th of the viewport width.
vmin is 1/100th of the smaller dimension (width or height). vmaxis the larger dimension.
2.4.2 Using calc() for font size
Arithmetic operators (+, -, *, /) must be surrounded by whitespace.
A combination of em and vw can be used for a reasonable auto-scaling font size. It is a good alternative to using media queries.
:root { font-size: calc(0.5em + 1vw); }
Using vw
alone results in a range that is too large between mobile devices and a large widescreen monitor.
2.6 Custom properties (aka CSS variables)
A custom property is defined like this:
:root { --main-font: Helvetica, Arial, sans-serif; }
Custom property names must start with two dashes, --
. They must also be declared inside a declaration block. When a descendant element uses a variable, it resolves to this value.
The var()
function is used to refer to previously defined custom properties. It accepts a second argument as a fallback value:
p { color: var(--primary-color, blue); }
An alternative way to define a fallback (for old browsers that don't have var
) is:
color: black; color: var(--main-color);
Custom properties shadow those of the element's ancestors. So a variable in :root can be overridden by a dark container.
2.6.2 Changing custom properties with JavaScript
var rootElement = document.documentElement; var styles = getComputedStyle(rootElement); var mainColor = styles.getPropertyValue('--main-bg');
To set a new value:
rootElement.style.setProperty('--main-bg', '#cde');
3 Mastering the box model
The target webpage should look like this:
The default behavior of the box model is that the width and height values you define apply to the content. Then, the border and margins are added to the width and height.
For example, you might define a width of 300 px, a padding of 10 px and a 1 px border. The total rendered width is 322 px (padding and border apply to the left and right).
Avoid magic numbers such as 26% because they are unreliable. It may not work on different viewports.
Using calc()
is an improvement, but there is still a better way.
3.1.2 Adjusting the box model
The box-sizing
property has a default value of content-box
.
Setting box-sizing
to border-box
will change the rendering behavior so that the width and height values set will be the combined size of the contend, padding, and border.
3.1.3 Using universal border-box sizing
To use the same box-sizing everywhere, use the following:
*, ::before, ::after { box-sizing: border-box; }
If this setup conflicts with third-party CSS rulesets, use:
:root { box-sizing: border-box; } *, ::before, ::after { box-sizing: inherit; } .third-party-component { box-sizing: content-box; }
3.1.4 Adding a gutter between columns
calc()
is a good way to remove some space of an object and allow that free space to be used in another way. Also, units may be mixed.
... width: calc(30% - 1.5em); margin-left: 1.5em;
3.2 Difficulties with element height
Typically, it's best to avoid setting explicit heights on elements. Normal document flow is designed to work with a constrained width, but an unlimited height.
Inline elements flow along with the text of the page, from left to right, while block-level elements fall on individual lines, with a line break above and below.
3.2.1 Controlling overflow behavior
The overflow
property supports four values:
visible
(default): everything is visible, even when it overflows the container's edgeshidden
: content that overflows the padding edge is clippedscroll
: scrollbars are added, even when there's no overflow, in which case, they will be disabled (grayed)auto
: scrollbars are added only if the content overflows
When control is needed horizontally or vertically, set the overflow-x
and overflow-y
properties.
3.2.2 Applying alternatives to percentage-based heights
The height of containers is typically determined by the height of its children, leading to a circular definition (percentages refers to the size of an element's containing block).
Instead of writing the ineffective height: 100%;
rule, a height of 100vh
can be used.
Columns of equal height
There are two ways of accomplishing this: a table layout and a flexbox.
CSS table layouts
First, make the container a display: table;
and each column display: table-cell;
Note: margins do not work with tables. A border-spacing
must be defined, plus a wrapper with negative margins to cancel out the outer border-spacing. Note that the x, y order is reversed in border-spacing.
.wrapper { margin: 0 -1.5em; } .container { display: table; width: 100%; border-spacing: 1.5em 0; } .main { display: table-cell; width: 70%; } .sidebar { display: table-cell; width: 30%; }
Negative margins pull the edges out.
Flexbox
By default, flexbox produces elements of equal height.
.container { display: flex; } .main { width: 70%; } .sidebar { width: 30%; padding: 1.5em; margin-left: 1.5em; }
3.2.3 Using min-height and max-height
Instead of explicitly defining a height, specify the minimum and maximum bounds.
3.2.4 Vertically centering content
vertical-align
only affects inline and table-cell elements. Within a cell, vertical-align
controls the alignment of the contents within the cell.
Adding top and bottom padding is one way of vertically centering content.
For a container of a specific height, use display: table-cell;
and vertical-align: middle;
For a single line of text, you can set a large line-height.
3.3 Negative margins
For negative left and top margins, the entire element is pulled leftward or upward.
For negative right or bottom margins, the succeeding elements are pulled leftward or upward.
Warning: Elements that overlap because of negative margins may become unclickable.
3.4 Collapsed margins
Adjoining margins will overlap, combining to form a single margin. The size of the collapsed margin is equal to the largest of the joined margins. More than two margins may collapse.
Only top and bottom margins collapse. Horizontal ones do not.
Margins of flexbox items don't collapse.
Padding may also be used instead of margins.
Applying overflow: auto;
(or anything other than visible
) prevents margins inside the container from collapsing with those outside the container.
table-cell
elements don't have a margin.
3.5 Spacing elements within a container
The adjacent sibling combinator (+
) will target only elements that immediately follow other elements as siblings.
.button-link { display: block; padding: 0.5em; } .button-link + .button-link { margin-top: 1.5em; }
A more general solution is * + *
, that targets any element that follows any other element.
body * + * { margin-top: 1.5em; }
Some elements might have to override this global setting with margin-top: 0;
4 Making sense of floats
4.1 The purpose of floats
A float pulls an element (often an image) to one side of its container, allowing the document flow to wrap around it.
Floating multiple elements in the same direction causes them to stack alongside one another.
The double container pattern places content inside two nested containers, then sets margins on the inner container to position it within the outer one.
<body>
can serve as the outer container.
Using clear
to a float
causes the container to expand to the bottom of the floats.
Pseudo-elements begin with a double colon (::
). The most common pseudo-elements are ::before
and ::after
A clearfix is an approach to solve the problem of containing floats.
.clearfix::after { display: block; content: " "; clear: both; }
Another version of clearfix contains all margins.
.clearfix::before, .clearfix::after { display: table; content: " "; } .clearfix::after { clear: both; }
A block formatting context (BFC) is a region of the page where elements are laid out, and isolates its contents from the outside context. Contents inside a BFC will not overlap or interact with elements on the outside.
Applying any of the following triggers a BFC:
float: left
orright
(anything butnone
)overflow: hidden, auto,
orscroll
(anything butvisible
)display:
(any of the following block containers):inline-block
table-cell
table-caption
flex
inline-flex
grid
inline-grid
position: absolute
orfixed
A block formatting context should have overflow
set to hidden
or auto
. Often, auto
is the simplest approach.
A CSS framework is a library of prebuilt CSS code that provides styles for common patterns.
[class*="column-"] { ... }
is an attribute selector targeting elements based on their class
attribute. It is used in the custom column grid CSS code in section 4.5.2, Building a grid system.
5 Flexbox
5.1 Flexbox principles
Applying display: flex;
to an element turns it into a flex container, and its direct children turn into flex items.
By default, flex items align side by side, left to right, all in one row.
While the flex container fills all available width (like a block element), the flex items do not necessarily fill all the way to the end.
Flex items are all the same height.
display: inline-flex;
behaves like an inline-block element.
Flex items are placed along a line called the main axis. Perpendicular to it is the cross axis. Its endpoints are called main-start, main-end, cross-start, cross-end.
5.2 Flex item sizes
The flex
property controls the size of the flex items along the main axis.
flex
is shorthand for three different sizing properties:
flex-grow
: determines how space will be consumed by the flex items. Must be a non-negative integer. If an item has a flex-grow of 0, it won't grow past its flex basis. Higher values have more "weight". (default:1
)flex-shrink
: determines whether a flez item should shrink to prevent overflow. If flex-shrink is 0, it will not shrink. (default:1
)flex-basis
: an initial "main size" for each flex item (default:0%
orauto
)
Tip: prefer using the flex
shorthand instead of defining the three individual properties. The default values are generally useful.
Example: The "Holy Grail" layout has two sidebars with fixed width, and a center column that is "fluid" (grows to fill the available space)
[ flex: 0 0 200px ] [ flex: 1 ] [ flex: 0 0 200px ]
Skipped: 5.3 (p. 130) to end of chapter
6 Grid layout
The CSS grid lets you define a two-dimensional layout of columns and rows and then place elements within this grid.
6.1.1 Building a basic grid
The objective of this section is to create this kind of grid:
[ a ] [ b ] [ c ] [ d ] [ e ] [ f ]
The HTML above is rendered as:
An element with display: grid;
becomes a grid container. Its child elements become grid items.
The container behaves like a block display element, taking up all 100% of the available width. It is also possible to use the value inline-grid
.
The fr
unit stands for fraction unit. It behaves like the factor in flex-grow
.
The declaration grid-template-columns: 1fr 1fr 1fr;
creates three columns with an equal size. Other units may be used, such as px, em, 50%
.
grid-gap
defines the amount of space to add to the gutter between each grid cell. Using two values specifies the vertical and horizontal spacing (for example, grid-gap: 0.5em 1em
).
6.2 Anatomy of a grid
The most important elements of a grid are:
- Grid line: makes up the structure of the grid. It may be vertical or horizontal and lie on either side of a row or a column. The grid gap lies atop the grid lines.
- Grid track: the space between two adjacent grid lines. Horizontal tracks are rows and vertical tracks are columns.
- Grid cell: a single space on the grid, where a horizontal grid track and vertical grid track overlap.
- Grid area: a rectangular area on the grid made up by one or more grid cells. Such an area is between two vertical grid lines and two horizontal grid lines.
Declaring grid-template-columns: 1fr 1fr 1fr;
defines three vertical grid tracks of equal width. At the same time, four grid lines are defined (the two edges and two between each grid track).
The repeat(n, value)
function serves to copy the value n times. For example, repeat(4, auto)
is the same as auto auto auto auto
.
6.2.1 Numbering grid lines
The browser assigns numbers to each grid line as follows:
These numbers are used to indicate where each item should be placed by setting the grid-column
and grid-row
properties.
For example, if you want a grid item to span from grid line 1 to 3, apply grid-column: 1 / 3;
to the element.
grid-column
and grid-row
are shorthand for grid-column-start
and grid-column-end
. The forward slash is needed in the shorthand version. The spaces before and after the slash are optional.
The keyword span
defines how many grid tracks to span (for example, grid-row: span 1;
).
Generally speaking, flexbox is one-dimensional, and grid is two-dimensional.
Flexbox works from the content out, whereas a grid works from the layout in.
6.3 Alternate syntaxes for laying out grid items
It is possible to have named grid lines and named grid areas.
6.3.1 Naming grid lines
When declaring grid tracks, place a name in brackets to name a grid line between any two tracks:
grid-template-columns: [start] 2fr [center] 1fr [end]; grid-column: start / center;
A grid line may have multiple names: [left-end right-start] 1fr
By naming lines with the suffixes -start
and -end
, an area in between them will be implicitly defined (for example, grid-column: left
spans from left-start
to left-end
).
Names may be repeated. To refer to them, write: row 3
.
Skipped: 6.3.2 (p. 160) to end of chapter.
7 Positioning and stacking contexts
The position
property is often used for building dropdown menus, modal dialogs, and other commonly used effects.
Use variables to keep track of z-indexes (p. 196)
It's easy for a stylesheet to devolve into a z-index war. It's better to use custom properties (variables) to keep them organized:
--z-loading-indicator: 100; --z-nav-menu: 200; --z-dropdown-menu: 300; --z-modal-backdrop: 400; --z-modal-body: 410;
Use increments of 10 or 100 to leave room for new values without being forced to rewrite other values.
END OF FILE


JavaScript Functions
This example calls a function which performs a calculation, and returns the result:


{% from "util.html" import render_field_grid %} {% extends "base.html" %} {% block content %}
Your token will be used instead of a password to authenticate with the login server during gameplay. Enter a name for the token below so you can keep track of where you used it and revoke the token if necessary.
Examples: Home, Work, Michael's iMac


- Coke
-
Coca-Cola, or Coke, is a carbonated soft drink manufactured by The
Coca-Cola Company. Originally marketed as a temperance drink and
intended as a patent medicine,
- Limca
-
Limca is a lemon- and lime-flavoured carbonated soft drink made
primarily in India and certain parts of the U.S. It contains 60
calories per 150ml can. The formula does not include fruit, relying
instead on artificial flavours.
- Sprite
-
Sprite is a colorless, lemon and lime-flavored soft drink created by
The Coca-Cola Company. It was first developed in West Germany in
1959 as Fanta Klare Zitrone and was introduced in the United States
under the current brand name Sprite in 1961 as a competitor to 7 Up.
- 7UP
-
7 Up is an American brand of lemon-lime-flavored non-caffeinated
soft drink. The rights to the brand are held by Keurig Dr Pepper in
the United States and by 7 Up international in the rest of the
world.
- Thums Up
-
Thums Up is a brand of cola in India. The logo is a red thumbs up.
It was introduced in 1977 to offset the withdrawal of The Coca-Cola
Company from India. The brand was later bought by Coca-Cola who
re-launched it in order to compete against Pepsi.
- Pepsi
-
Pepsi is a carbonated soft drink manufactured by PepsiCo. Originally
created and developed in 1893 by Caleb Bradham and introduced as
Brad's Drink, it was renamed as Pepsi-Cola in 1898, and then
shortened to Pepsi in 1961.


WELCOME TO INBOX HEALTH
Less stress. More room. Unsubscribe and Delete instantly from junk mail.
Unique senders
Inbox Health safely sniffs through the emails in your inbox and exposes the emails that are subscribed. Every unique sender is identified and listed at once in order to shortlist all senders, so you can easily make know and make design on them.
Unsubscribe or Delete
Once you've login with gmail, you have all list of unique senders and with each sender it shows numbers of email you have from that unique sender. You can easily delete all emails in a single click from here. Unsubscribe by clicking Unsubscribe.
Contact Us
Share us on Twitter linkedin and Facebook. If you run into any problems, please feel free to send us an email @Inbox-Health
Tweet Post to SlackDisclaimer
inbox-health does not store, transfer, transmit or save any of your data.
About Us
Let us make your life easier with a little bit of email management - we identify your subscription emails and list them out for you. All you do is login to your Gmail account, view the list of all your subscription emails that we generate for you (do you even remember signing up for that newsletter? That coupon list? Didn’t think so), and then unsubscribe instantly from the ones you don’t need. This is a free app that will give you more space and organization in your inbox.


|
cpuaff
Multi-platform C++ interface to CPU affinity management
|
#include <fwd.hpp>
Public Types | |
| typedef TRAITS::cpu_identifier_type | cpu_identifier_type |
| typedef TRAITS::cpu_identifier_wrapper_type | cpu_identifier_wrapper_type |
| typedef TRAITS::cpu_loader_type | cpu_loader_type |
| typedef TRAITS::cpu_loader_vector_type | cpu_loader_vector_type |
| typedef TRAITS::get_affinity_type | get_affinity_type |
| typedef TRAITS::set_affinity_type | set_affinity_type |
| typedef TRAITS::native_cpu_type | native_cpu_type |
| typedef TRAITS::native_cpu_wrapper_type | native_cpu_wrapper_type |
| typedef TRAITS::native_get_affinity_type | native_get_affinity_type |
| typedef basic_cpu< TRAITS > | cpu_type |
| typedef basic_cpu_set< TRAITS > | cpu_set_type |
Public Member Functions | |
| basic_affinity_manager () | |
| bool | has_cpus () const |
| bool | get_cpu_from_id (cpu_type &cpu, const cpu_identifier_wrapper_type &id) const |
| bool | get_cpu_from_id (cpu_type &cpu, const cpu_identifier_type &id) const |
| bool | get_cpu_from_spec (cpu_type &cpu, const cpu_spec &spec) const |
| bool | get_cpu_from_index (cpu_type &cpu, const int32_t i) const |
| bool | get_cpus (cpu_set_type &cpus) const |
| bool | get_cpus_by_numa (cpu_set_type &cpus, const numa_type &numa) const |
| bool | get_cpus_by_socket_and_core (cpu_set_type &cpus, const socket_type &socket, const core_type &core) |
| bool | get_cpus_by_socket (cpu_set_type &cpus, const socket_type &socket) const |
| bool | get_cpus_by_core (cpu_set_type &cpus, const core_type &core) const |
| bool | get_cpus_by_processing_unit (cpu_set_type &cpus, const processing_unit_type &processing_unit) const |
| bool | get_affinity (cpu_set_type &cpus) const |
| bool | set_affinity (const cpu_set_type &cpus) const |
| bool | pin (const cpu_type &cpu) |
basic_affinity_manager is a collection of all the valid cpus. It provides interfaces to get and set cpu affinity as well as ways to classify cpus on the system so that intelligent choices can be made about what affinity a thread should have.
| typedef TRAITS::cpu_identifier_type cpuaff::impl::basic_affinity_manager< TRAITS >::cpu_identifier_type |
| typedef TRAITS::cpu_identifier_wrapper_type cpuaff::impl::basic_affinity_manager< TRAITS >::cpu_identifier_wrapper_type |
| typedef TRAITS::cpu_loader_type cpuaff::impl::basic_affinity_manager< TRAITS >::cpu_loader_type |
| typedef TRAITS::cpu_loader_vector_type cpuaff::impl::basic_affinity_manager< TRAITS >::cpu_loader_vector_type |
| typedef basic_cpu_set< TRAITS > cpuaff::impl::basic_affinity_manager< TRAITS >::cpu_set_type |
| typedef basic_cpu< TRAITS > cpuaff::impl::basic_affinity_manager< TRAITS >::cpu_type |
| typedef TRAITS::get_affinity_type cpuaff::impl::basic_affinity_manager< TRAITS >::get_affinity_type |
| typedef TRAITS::native_cpu_type cpuaff::impl::basic_affinity_manager< TRAITS >::native_cpu_type |
| typedef TRAITS::native_cpu_wrapper_type cpuaff::impl::basic_affinity_manager< TRAITS >::native_cpu_wrapper_type |
| typedef TRAITS::native_get_affinity_type cpuaff::impl::basic_affinity_manager< TRAITS >::native_get_affinity_type |
| typedef TRAITS::set_affinity_type cpuaff::impl::basic_affinity_manager< TRAITS >::set_affinity_type |
|
inline |
Construct an uninitialized basic_affinity_manager.
|
inline |
Get the affinity of the calling thread
| cpus | [out] set of cpus that this thread can run on |
|
inline |
Get the cpu with the given identifier.
| cpu | [out] the cpu with the given identifier |
| id | [in] the cpu identifier |
|
inline |
Get the cpu with the given identifier.
| cpu | [out] the cpu with the given identifier |
| id | [in] the cpu identifier |
|
inline |
Get a cpu by arbitrary numeric index.
| cpu | [out] the cpu with the given numeric index |
| i | [in] the numeric index |
|
inline |
|
inline |
Get all the cpus.
| cpus | [out] the set of cpus |
|
inline |
Get all the cpus for the given core identifier. Note: core identifiers are zero based per socket, so this will return the nth core on every socket.
| cpus | [out] the cpus for the given core identifier |
| core | [in] the zero based core identifier |
|
inline |
Get all the cpus for a given numa node.
| cpus | [out] the cpus for the given numa node |
| numa | [in] the zero based numa identifier |
|
inline |
Get all the cpus for the given processing unit identifier. Note: processing unit identifiers are zero based per core, so this will return the nth processing unit on every core.
| cpus | [out] the cpus for the given processing unit identifier |
| processing_unit | [in] the zero based processing unit identifier |
|
inline |
Get all the cpus for the given socket identifier.
| cpus | [out] the cpus for the given socket identifier |
| socket | [in] the zero based socket identifier |
|
inline |
Get all the cpus for the given socket and core.
| cpus | [out] the cpus for the given socket and core |
| socket | [in] the zero based socket identifier |
| core | [in] the zero based core identifier |
|
inline |
Check if this basic_affinity_manager has been successfully initialized and has cpus defined.
|
inline |
Set the affinity of the calling thread to a single cpu
| cpu | the cpu to pin this thread to |
|
inline |
Set the affinity of the calling thread.
| cpus | [in] the set of cpus that this thread can run on |


Servers.
The BBS software offers various servers which are triggered when machinable
messages are received. The number of offered servers is is without limit.
The servers are activated when receiving a message whose destination had
been given at the end of the INIT.SRV file.
Declaration of servers at the end of INIT.SRV :
------
#
# List of servers :
#
# Destination Name of program
#
REQDIR REQDIR.COM
REQFIL REQFIL.COM
NEWDOC NEWDOC.EXE
#
# End of file INIT.SRV
#
Servers are exec programs whose behaviour is explained in appendix 9. They
should be found in the directory containing the exec program SERV.EXE and the
configuration file INIT.SRV.
When a private message is received, whose destination is defined in the
INIT.SRV file, the corresponding program to the destination is called with
the name of a temporary file on the command line. This temporary file
contains a message function of the requested server (see description of
servers below).
At the completion of the server program, the incoming mail file is checked
to import an answer, should there be one. The message addressed to the server
is erased after this processing. The temporary file must be erased by the
server-program.
Various services can be developped, time available has its limits, but the
imagination has not !
REQDIR : Request directory-listing from a BBS's files-area.
REQFIL : Request an ASCII-file from a remote BBS.
NEWDOC : Update DOC-area of the BBS.
REQCFG : Request a list of the BBS's configuration.
MULTI : Send multippel identical messages to different adressees.
This page was last updated


Title: {{revision.title || 'N/A'}}
N/A
{{revision.author}}
{{revision.published}}
{{revision.timestamp | timestamp}}


| oauth2client.tools | index /usr/local/google/home/jcgregorio/projects/apiclient/oauth2client/tools.py |
Command-line tools for authenticating via OAuth 2.0
Do the OAuth 2.0 Web Server dance for a command line application. Stores the
generated credentials in a common file that is used by other example apps in
the same directory.
| Modules | ||||||
|
| Functions | ||
|
| Data | ||
| __all__ = ['run'] __author__ =<EMAIL_ADDRESS>(Joe Gregorio)' |
| Author | ||
|<EMAIL_ADDRESS>(Joe Gregorio) |


Millionaire lottery winner continues to pinch pennies by shopping at Poundland
Marie Kibler and her husband Paul from Sutton Coldfield won £2.1 million on the National Lottery back in 2012 but she still shops in Poundland
by Andy RichardsonA woman who scooped £2.1m alongside her husband still likes to pinch the pennies despite her jackpot win.
Back in 2012 Marie Kibler and her husband Paul got lucky on the lottery and their life changed forever.
They were able to immediately pay off their £50,000 mortgage, purchase a Mercedes each and his and hers Rolex watches, reports BirminghamLive.
Yet while they continue to enjoy some of the finer things in life one thing will never change for Marie and that is her love for bargain shop Poundland.
Marie, 72, said: "I have always loved Poundland and I always will. I sometimes pop in there two or three times a week. I may have won the lottery but one thing will never change and that is my love for a bargain.
"I will go in there and I will stock up on toiletries, batteries and cleaning materials. Before I won the lottery I would still be careful about how much I spent in there but now I can buy it in bulk, whole job lots.
"That's the difference but I will always shop in Poundland.
"I am down to earth and I will always be down to earth. I don't think we will ever lose that. When you have been careful with your money it is difficult to go and be reckless.
"The money we won, £2.1 million, sounds a lot of money and it is. However, we have both given up our jobs and have no income coming in so we can't go out and be totally reckless."
Paul, 59, who ran a gardening business, even worked for a further four years after the win to keep active before deciding to call it a day.
The couple regularly give to charity and carry out voluntary work.
Marie added: "The proudest thing I have done with the money is to buy my grandson’s school a defibrillator."
Paul added: "It is a special school and we were over the moon to give them that."
The couple also raise money for Cancer Research as their daughter suffered from ovarian cancer and Paul volunteers his services looking after Lichfield War Memorial.
The couple spoke on the 20th floor of a penthouse suite at the Rotunda in Birmingham city centre as part of the National Lottery's 25th anniversary celebrations.
Birmingham was chosen as the National Lottery's location to celebrate the milestone because of West Midlands' B postcode has proved to be the luckiest in the UK.
Since the National Lottery began back in 1994 an incredible 168 millionaires have been made - equivalent to one every two months.
And in total 1,277 top tier prizes of at least £50,000 have been banked by lucky players in the B postcode.


Adriva Analytics Server
Overview
Adriva.Extensions.Analytics.Server
library provides a base server implementation that provides the common functionality to listen for incoming analytics data, parse and store the data in virtually any repository.
Adriva.Extensions.Analytics.Server.AppInsights
library provides the functionality to parse incoming Microsoft AppInsights data and convert it to a common format. You can then store the output data in your custom on-premise repository or any other repository of your choice.
Flow
This section describes the basic flow of the Adriva.Extensions.Analytics.Server
in order to customize the analytics server and add support for any incoming analytics data or persisting analytics data in your own repository.
There are 3 main components in the server side flow. Which are:
- Middleware
- Handler
- Repository
Middleware
Analytics middleware captures the incoming requests and tries to parse and queue them for further processing. Middleware should return Http status code 204 for success. The default middleware is an internal class and cannot be customized.
Handler
Handler is a concrete implementation of Adriva.Extensions.Analytics.Server.IAnalyticsHandler
interface and is responsible of processing the incoming HttpRequest
object and returning a collection of Adriva.Extensions.Analytics.Server.Entities.AnalyticsItem
objects. Please take a look at the default implementation of AppInsightsHandler class. A handler is basically is a parser. The default implementation of AppInsightsHandler
parses the incoming Microsoft AppInsights requests and converts them to a common format to be stored in a repository.
Common entities (common format) is defined in the Adriva.Extensions.Analytics.Server.Entities
namespace which can be found here.
In the common data model the root object is called AnalyticsItem
all other types are linked to a parent AnalyticsItem
class. For example a RequestItem
which stores the data for a request analytics data is the child of an AnalyticsItem
class. Please take a look at the definition of the AnalyticsItem class.
Repository
Once the incoming data is parsed and converted to the common format successfully and added to the buffer, the system will try to persist it in a repository. All default repository libraries provided in this frame work can be found here and all repository libraries start with the prefix Adriva.Extensions.Analytics.Repository
. Support for custom repositories can be very useful when you need to store analytics data on your own servers, such as storing Microsoft AppInsights data on an on-premise database.
A custom repostitory should implement the Adriva.Extensions.Analytics.Server.IAnalyticsRepository
interface and the simplest repository implementation, which actually doesn't do anything, can be found here.
asp.net Core Service Configuration
In order to use the analytics server-side services we need to register them in the application service collection and add the middleware to the application pipeline.
Here is a sample that uses the default AppInsights handler and an in-memory entity framework repository.
The following code registers the required services:
public void ConfigureServices(IServiceCollection services)
{
services.AddAppInsightsAnalyticsServer(builder =>
{
...
builder
.SetProcessorThreadCount(1)
.SetBufferCapacity(100)
.UseInMemoryRepository()
;
...
});
}
SetProcessorThreadCount
tells the system how many threads will be allocated to verify and store the buffered data on the server. This value cannot be less than 1.
SetBufferCapacity
tells the system how many items can be buffered berfore they are persisted in the repository. This value is not a hard limit and system may decide to flush the buffer before it is full.
The following code adds the middleware to the pipeline:
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
...
app.UseAnalyticsServer("/analytics");
...
}
UseAnalyticsServer
method accepts a string parameter which is the endpoint (path) it will listen for incoming requests. The system will add a/track
suffix to the given base path so that the final relative url to send the analytics data will be[/prefix]/track
which is/analytics/track
in our example.


GREENVILLE ASSOCIATES INTRANET PAGE
GREENVILLE ASSOCIATES INTRANET
WELCOME ABOARD!
PROGRAM MENU
GEM
PEM
SEM
GACARES
DOLLAS
HELPSELL


---
title: 'SharePoint MOSS 2007 - Error: HRESULT: 0x80040E14'
date: '2008-06-05T09:29:00.000-07:00'
tags:
- MOSS
- SharePoint
modified_time: '2008-06-11T16:54:04.729-07:00'
blogger_id: tag:blogger.com,1999:blog-19111454.post-7062662466435125194
blogger_orig_url: http://www.bryansgeekspeak.com/2008/06/sharepoint-moss-2007-error-hresult.html
---
If you happen to run into the "HRESULT: 0x80040E14" error message in sharepoint, be sure to check your SQL server disk space and log file size. Sharepoint complains with this error when SQL server is out of disk space for whatever reason, but it also throws the same error if youre having problems with the way you applied sharepoint SP 1 (http://support.microsoft.com/kb/841216).
Check the SQL server disk space first, thats the easier solution. If that doesnt do it for you, try the KB article.


29
1 This is a message from Yahweh:
Terrible things will happen to Jerusalem, the city where King David lived.
You people continue to celebrate your festivals each year.
2 But I will cause you to experience a great disaster,
and when that happens,
people will weep and lament very much.
Your city will become like an altar to me
where people are burned as sacrifices.
3 I will cause your enemies to come and camp all around your city;
they will surround it by building towers
and putting in place other things with which to attack you.
4 Then you will talk as though you were buried deep in the ground;
it will sound like someone whispering from under the ground,
like a ghost speaking from a grave.
5 But suddenly your enemies will be blown away like dust;
their armies will disappear
like chaff that is blown away by the wind.
It will happen very suddenly:
6 Yahweh, Commander of the angel armies, will come to help you
with thunder and an earthquake and a very loud noise,
with a strong wind and a big storm and a fire that will burn up everything.
7 Then the armies of all the nations that will be attacking Jerusalem will quickly disappear like a dream in the night.
Those who will be attacking Jerusalem will suddenly vanish.
8 People who are asleep dream about eating food,
but when they wake up, they are still hungry.
People who are thirsty dream about drinking something,
but when they wake up they are still thirsty.

Do not believe what I have said!
And continue to be blind about what Yahweh is doing.

You stagger, but not from drinking alcoholic drinks.
10 Because Yahweh has prevented the prophets from understanding and telling you his messages,
it is as though he had made you go fast asleep.
11 Yahweh gave me visions; but for you, they are only words on a scroll that is sealed shut. If you give it to those who can read and request they read it, they will say, "We cannot read it because the scroll is sealed."
12 When you give it to others who cannot read, they will say, "We cannot read it because we do not know how to read."
13 So the Lord says, "These people say that they belong to me.
They honor me by what they say,
but they do not think about what I desire.
When they worship me,
all they do is recite rules that people have made and that they have memorized.
14 Therefore, again I will do something to amaze these people;
I will perform many miracles.
And I will show that the people who tell others that they are wise are not really wise,
and I will show that the people who tell others that they are intelligent are not really intelligent.
15 Terrible things will happen to those who try to conceal from me, Yahweh,
the evil things that they plan to do;
they do those deeds in the darkness
and they think, 'Yahweh certainly cannot see us;
he cannot know what we are doing!'
16 They are extremely foolish!
They act as though they were the potters and I were the clay!
Something that was created should certainly never say to the one who made it,
'You did not make me!'
A jar should never say,
'The potter who made me did not know what he was doing!'"
17 Soon the forests in Lebanon will become fertile fields,
and abundant crops will grow in those fields,
and that will happen very soon.
18 At that time, deaf people will be able to hear;
they will be able to hear when someone reads from a book;
and blind people will be able to see;
they will be able to see things when it is gloomy and even when it is dark.
19 Yahweh will enable humble people to be very joyful again.
Poor people will rejoice about what the Holy One of Israel has done.
20 There will be no more people who ridicule others
and no more arrogant people.
And those who plan to do evil things will be executed.
21 Those who testify falsely in order to persuade judges to punish innocent people will vanish.
Similar things will happen to those who by lying in court persuade the judges to make unjust decisions.
22 That is why Yahweh, who rescued Abraham, says about the people of Israel,
"My people will no longer be ashamed;
no longer will they show on their faces that they are ashamed.
23 When they see that I have blessed them by giving them many children, and all that I have done for them,
they will honor the holy name of the Holy One of Israel,
and they will revere me, the God to whom they, the descendants of Jacob, belong.
24 When that happens, those who are not able to think well will think clearly,
and those who complain about what I am doing will accept what I am teaching them."


--- layout: post title: Configuring Zense VM date: type: post parent_id: '0' published: false password: '' status: draft categories: [] tags: [] meta: _edit_last: '1' rcp_user_level: None _um_custom_access_settings: '0' _um_accessible: '0' _um_access_redirect2: '' _um_access_roles: a:1:{i:0;s:1:"0";} _um_access_redirect: '' author: login: vik-y email<EMAIL_ADDRESS>display_name: Vikas Yadav first_name: Vikas last_name: Yadav ---
This article is for the book keeping of information used to configure the Zense VM.
Important packages installed
Deployment architecture
The deployment model had to support two use cases : 1, when containerised version of an app is available, 2 , when containerised version of app is not available.
Internet -> nginx-passenger running on host machine -> nginx-containerised (Will be used to reverse proxy to containers)


Class: CacheStore
Overview
CacheStore provides methods to mutate and fetch data from a persistent storage mechanism.
Direct Known Subclasses
Instance Method Summary collapse
-
#delete! ⇒ Object
abstract
Deletes data from the cache based on a condition defined in a concrete class.
-
#fetch ⇒ Object
abstract
Fetches cached values in persistent storage according to the type of data stored.
-
#initialize(database) ⇒ nil
constructor
-
#update! ⇒ Object
abstract
Inserts new values or updates existing cached values to persistent storage.
Constructor Details
#initialize(database) ⇒ nil
160 161 162 |
# File 'cache_store.rb', line 160 def initialize(database) @database = database end |
Instance Method Details
#delete! ⇒ Object
This method is abstract.
Deletes data from the cache based on a condition defined in a concrete class.
182 183 184 |
# File 'cache_store.rb', line 182 def delete!(*) raise NotImplementedError end |
#fetch ⇒ Object
This method is abstract.
Fetches cached values in persistent storage according to the type of data stored.
175 176 177 |
# File 'cache_store.rb', line 175 def fetch(*) raise NotImplementedError end |
#update! ⇒ Object
This method is abstract.
Inserts new values or updates existing cached values to persistent storage.
167 168 169 |
# File 'cache_store.rb', line 167 def update!(*) raise NotImplementedError end |


This template is used to test new functionalities, which in the future will be added to ThereIsAPhishingInMySoup


CollectionViewSlantedLayout
@objc
open class CollectionViewSlantedLayout : UICollectionViewLayout
CollectionViewSlantedLayout is a subclass of UICollectionViewLayout allowing the display of slanted content on UICollectionView.
By default, this UICollectionViewLayout has initialize a set of properties to work as designed.
-
The slanting size.
The default value of this property is
75
.Declaration
Swift
@IBInspectable open var slantingSize: UInt { get set }
-
The slanting direction.
The default value of this property is
upward
.Declaration
Swift
@objc open var slantingDirection: SlantingDirection { get set }
-
The angle, in radians, of the slanting.
The value of this property could be used to apply a rotation transform on the cell’s contentView in the
collectionView(_:cellForItemAt:)
method implementation.if let layout = collectionView.collectionViewLayout as? CollectionViewSlantedLayout { cell.contentView.transform = CGAffineTransform(rotationAngle: layout.rotationAngle) }
Declaration
Swift
@objc open fileprivate(set) var slantingAngle: CGFloat
-
The scroll direction of the grid.
The grid layout scrolls along one axis only, either horizontally or vertically. The default value of this property is
vertical
.Declaration
Swift
@objc open var scrollDirection: UICollectionView.ScrollDirection { get set }
-
Allows to disable the slanting for the first cell.
Set it to
true
to disable the slanting for the first cell. The default value of this property isfalse
.Declaration
Swift
@IBInspectable open var isFirstCellExcluded: Bool { get set }
-
Allows to disable the slanting for the last cell.
Set it to
true
to disable the slanting for the last cell. The default value of this property isfalse
.Declaration
Swift
@IBInspectable open var isLastCellExcluded: Bool { get set }
-
The spacing to use between two items.
The default value of this property is 10.0.
Declaration
Swift
@IBInspectable open var lineSpacing: CGFloat { get set }
-
The default size to use for cells.
If the delegate does not implement the
collectionView(_:layout:sizeForItemAt:)
method, the slanted layout uses the value in this property to set the size of each cell. This results in cells that all have the same size.The default value of this property is 225.
Declaration
Swift
@IBInspectable open var itemSize: CGFloat { get set }
-
The zIndex order of the items in the layout.
The default value of this property is
ascending
.Declaration
Swift
@objc open var zIndexOrder: ZIndexOrder { get set }


Customer name is required.
Currency pair is required.
Transfer amount is required.
Currency rate can not be empty.


graphics
The native.display.Graphics object to use for drawingtileData
An array of all position, ID and optional values for use in drawingsmooth
(Optional) Whether drawn tiles should be smoothed(Default: false)flags
(Optional) Flags to enable scale, rotation, RGB and/or alpha when drawing(Default: 0)
0, 0, 0, 10, 10, 1
would draw tile 0 to(0, 0) and tile 1 to(10, 10) You can also set flags for TILE_SCALE, TILE_ROTATION, TILE_RGB and TILE_ALPHA. Depending on which flags are active, this is the full order of the array:x, y, tile ID, scale, rotation, red, green, blue, alpha, x, y ...