1. Introduction
This section introduces ACP with an overview of key terminology, an explanation of the conventions used in this document, example graphs to illustrate basic concepts of resource access description and validation, a diagram representing the main elements of the ACP data model, and an RDF representation of the ACP ontology.
1.1. RDF terminology
This document uses the terms resource, property, RDF vocabulary, namespace, namespace IRI, namespace prefix, graph, IRI, literal, blank node, node, term, IRI equality and literal term equality as defined in RDF 1.1 Concepts and Abstract Syntax RDF11 CONCEPTS.
1.2. RDF vocabularies and namespace IRIs
This document uses the following RDF vocabularies and corresponding namespace prefix bindings:
| Prefix | Namespace |
|---|---|
acp:
|
http://www.w3.org/ns/solid/acp#
|
acl: |
http://www.w3.org/ns/auth/acl#
|
ex: |
https://example.org/
|
ldp: |
http://www.w3.org/ns/ldp#
|
rdf: |
http://www.w3.org/1999/02/22-rdf-syntax-ns#
|
rdfs: |
http://www.w3.org/2000/01/rdf-schema#
|
owl: |
http://www.w3.org/2002/07/owl#
|
1.3. ACP terminology
This section is non-normative.
- Context graph
- Context graphs describe the attributes of resource access instances. An access request's attributes can be matched to sets of conditions defined in the form of an authorization graph in order to determine Access Modes granted over resources.
- Authorization graphs authoritatively define the conditions for granting Access Modes over resources through Access Control Resources, Access Controls, Policies and Matchers. The result of applying an authorization graph to a described instance of resource access is an access grant graph.
- Access grant graph
- Access grant graphs describe sets of Access Modes granted over resources in the context of resource access requests. Access grants are the result of access control resolution.
- Access control resolution
- Access control resolution describes the algorithm used to apply an authorization graph to a context graph in order to obtain an access grant graph.
1.4. Example graphs
This section is non-normative.
Throughout this document, color-coded boxes contain the RDF representation of example context graphs, authorization graphs, and access grant graphs serialized in turtle RDF11-TURTLE. Those graphs use a mix of IRIs and blank nodes where applicable to better show the range of possible representations.
The following example context graph describes an instance of resource access and could be translated as: "Bob is trying to read resource X using client application Y with their identity asserted by identity provider Z.".
# This box contains a context graph # It describes an instance of resource access [] acp:target ex:resourceX ; acp:agent ex:Bob ; acp:mode acl:Read ; acp:client ex:clientApplicationY ; acp:issuer ex:identityProviderZ .
The following example
authorization graph
defines the conditions of access to resource X and could be
translated as:
"Access to resource X is mandated by one Access Control that
applies one Policy which allows access mode
acl:Read
when Alice or Bob are the agent trying to
access resource X.".
# This box contains an authorization graph # It describes the conditions required for accessing a resource [] a acp:AccessControlResource ; acp:resource ex:resourceX ; acp:accessControl [ a acp:AccessControl ; acp:apply [ a acp:Policy ; acp:allow acl:Read ; acp:anyOf [ a acp:Matcher ; acp:agent ex:Alice, ex:Bob ; ] ] ] .
The following example
access grant graph
is the result of
applying
the previous example authorization graph which defines access to
resource X to the previous example context graph which describes a
read access request to target resource X. Bob is matched as the
context agent and since the policy allowing
acl:Read
defines no further restrictions, it is
satisfied. The following access grant graph could be read as:
"The access mode acl:Read
is granted to Bob who
requested read access to resource X using client application Y
with their identity asserted by identity provider Z.".
# This box contains an access grant graph # It describes in context the granted access over a resource [] acp:grant acl:Read ; acp:context [ acp:agent ex:Bob ; acp:target ex:resourceX ; acp:mode acl:Read ; acp:client ex:ClientApplicationY ; acp:issuer ex:IdentityProviderZ ; ] .
1.5. Data model
This section is non-normative.
The following diagram illustrates the main elements of ACP.
1.6. Ontology
All terms defined by the Access Control Policy Language are present in an RDF representation of the ACP ontology serialized in turtle.
2. Conformance
All assertions, diagrams, examples, pseudocode and notes are non-normative, as are all sections explicitly marked non-normative. Everything else is normative.
The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, are to be interpreted as defined in RFC 2119.
Only UPPERCASE usage of the key words defined in RFC 2119 have special meanings, as per RFC 8174.
3. Context Graph
This section introduces the ACP terms used to describe instances of resource access.
3.1. Context
-
acp:Context
- Instances of the Context class describe instances of resource access.
-
acp:attribute
- Sub-properties of ACP attribute are used to describe instances of resource access.
-
acp:target
- The target attribute describes requested resources.
-
acp:mode
- The mode attribute describes requested modes of access.
-
acp:agent
- The agent attribute describes agents initiating requests.
-
acp:creator
- The creator attribute describes creators of requested resources.
-
acp:owner
- The owner attribute describes owners of requested resources.
-
acp:client
- The client attribute describes client applications used to request resources.
-
acp:issuer
- The issuer attribute describes identity providers used to assert the identity of agents requesting resources.
-
acp:vc
- The vc attribute describes types of Verifiable Credentials (VC) presented as part of resource access requests.
3.1.1. Example Context
The following example context graph denotes instances of resource access initiated by Bob.
[] a acp:Context ; acp:agent ex:Bob .
The following example context graph means that Bob requests access to resource X using client application Y and with their identity asserted by identity provider Z; furthermore, resource X was created by Alice and is owned by Bob.
ex:contextA acp:target ex:resourceX ; acp:agent ex:Bob ; acp:client ex:ClientApplicationY ; acp:issuer ex:IdentityProviderZ ; acp:owner ex:Bob ; acp:creator ex:Alice .
The following example context graph denotes instances of resource access where client application X or client application Y are used and identity is asserted by identity provider Z.
[ acp:client ex:ClientApplicationX, ex:ClientApplicationY ; acp:issuer ex:IdentityProviderZ ; ] .
3.2. Context extensibility
Sub-properties of acp:attribute
can be created to fit
the specific access control requirements of applications.
3.2.1. Example Context extension
Let's imagine a property ex:tag
defined as a an
rdfs:subPropertyOf acp:attribute
that would describe
tags applied to requested resources. If such a property was
defined, then the following example context graph would denote
instances of resource access over resource X initiated by Bob
where resource X was tagged ex:Music
and
ex:FavouriteRecord
.
ex:contextA acp:target ex:resourceX ; acp:agent ex:Bob ; ex:tag ex:Music, ex:FavouriteRecord .
4. Authorization Graph
This section introduces the ACP terms used to control access to resources.
4.1. Access Control Resource
-
acp:AccessControlResource
- Instances of the Access Control Resource (ACR) class connect resources to their Access Controls.
-
acp:resource
-
The resource property connects
ACRs
to
resources
they control. It is the inverse of
acp:accessControlResource
. -
acp:accessControl
- The access control property connects ACRs to Access Controls.
-
acp:memberAccessControl
- The member access control property transitively connects ACRs of member resources to Access Controls.
4.1.1. Example Access Control Resource
The following example authorization graph means that access to resource X is controlled by both Access Controls B and C; furthermore, access to members of resource X is controlled by Access Control D; furthermore, member control is transitive, therefore, further members of member resources will also be controlled by Access Control D.
ex:accessControlResourceA acp:resource ex:resourceX ; acp:accessControl ex:accessControlB, ex:accessControlC ; acp:memberAccessControl ex:accessControlD .
4.2. Access Control
-
acp:AccessControl
- Instances of the Access Control class connect Access Control Resources to their Policies.
-
acp:apply
- The apply property connects Access Controls to the Policies they apply to resources.
4.2.1. Example Access Control
The following example authorization graph means that access to resource X is controlled by Policy C.
ex:accessControlResourceA acp:resource ex:resourceX ; acp:accessControl [ acp:apply ex:policyC ; ] .
The following two example authorization graphs both mean that access to resource X is controlled by Policy D and Policy E.
ex:accessControlResourceA acp:resource ex:resourceX ; acp:accessControl ex:accessControlB, ex:accessControlC . ex:accessControlB acp:apply ex:policyD . ex:accessControlC acp:apply ex:policyE .
[] acp:resource ex:resourceX ; acp:accessControl ex:accessControlF . ex:accessControlF acp:apply ex:policyD, ex:policyE .
4.3. Policy
-
acp:Policy
- Instances of the Policy class connect Access Controls to allowed and denied Access Modes as well as sets of Matchers describing instances of resource access.
-
acp:allow
- The allow property connects Policies to the Access Modes they allow if satisfied.
-
acp:deny
- The deny property connects Policies to the Access Modes they deny if satisfied.
-
acp:allOf
- The all of property connects Policies to a set of Matchers, all of which MUST be satisfied for the Policy to be satisfied.
-
acp:anyOf
- The any of property connects Policies to a set of Matchers, at least one of which MUST be satisfied for the Policy to be satisfied.
-
acp:noneOf
- The none of property connects Policies to a set of Matchers, all of which MUST NOT be satisfied for the Policy to be satisfied.
4.3.1. Example Policy
The following example authorization graph means that Policy A will
allow acl:Read
for instances of resource access
satisfying both Matcher B and Matcher C.
ex:policyA acp:allow acl:Read ; acp:allOf ex:matcherB, ex:matcherC .
The following example authorization graph means that a Policy will
deny acl:Write
for instances of resource access
satisfying either Matcher B or Matcher C.
[] acp:deny acl:Write ; acp:anyOf ex:matcherB, ex:matcherC .
The following example authorization graph means that reading and writing resource X will be allowed for instances of resource access satisfying Matcher A and not Matcher B.
[ acp:resource ex:resourceX ; acp:accessControl [ acp:apply [ acp:allow acl:Read, acl:Write ; acp:anyOf ex:matcherA ; acp:noneOf ex:matcherB ; ] ; ] ; ] .
4.4. Matcher
-
acp:Matcher
- Instances of the Matcher class are descriptions of matching Contexts.
-
acp:agent
- In a Matcher, agent attributes define a set of agents, at least one of which MUST match the Context for the Matcher to be satisfied.
-
acp:PublicAgent
- In a Matcher, agent attributes using the Public Agent named individual MUST match all Contexts.
-
acp:AuthenticatedAgent
- In a Matcher, agent attributes using the Authenticated Agent named individual MUST match Contexts that contain an agent.
-
acp:CreatorAgent
- In a Matcher, agent attributes using the Creator Agent named individual MUST match Contexts where a defined creator matches the defined agent.
-
acp:OwnerAgent
- In a Matcher, agent attributes using the Owner Agent named individual MUST match Contexts where a defined owner matches the defined agent.
-
acp:client
- In a Matcher, client attributes define a set of clients, at least one of which MUST match the Context for the Matcher to be satisfied.
-
acp:PublicClient
- In a Matcher, client attributes using the Public Client named individual MUST match all Contexts.
-
acp:issuer
- In a Matcher, issuer attributes define a set of issuers, at least one of which MUST match the Context for the Matcher to be satisfied.
-
acp:PublicIssuer
- In a Matcher, issuer attributes using the Public Issuer named individual MUST match all Contexts.
-
acp:vc
- In a Matcher, vc attributes define a set of types of Verifiable Credentials (VC), at least one of which MUST match the Context for the Matcher to be satisfied. A VC type present in the Context MUST be a valid VC presented as part of the resource access request.
-
acp:AlwaysSatisfiedRestriction
- Defined instances of the Always Satisfied Restriction class are used in Matcher restrictions to indicate that the restriction is always satisfied. The default behaviour of a Matcher is to not be satisfied, so this is the only way to make a Matcher always satisfied.
4.4.1. Example Matcher
The following example authorization graph means that Matcher A will be satisfied when either Alice or the owner of the access controlled resource are requesting access.
ex:matcherA a acp:Matcher ; acp:agent ex:Alice, acp:OwnerAgent .
The following example authorization graph means that the defined Matcher will be satisfied when matched against a context graph where the client used to access the access controlled resource is client B.
[ a acp:Matcher ; acp:client ex:clientB ; ] .
The following example authorization graph means that Matcher A will be satisfied when matched against a context graph where the identity provider used to assert the identity of the agent requesting access to the access controlled resource is issuer B.
ex:matcherA a acp:Matcher ; acp:issuer ex:issuerB .
The following example authorization graph means that the defined Matcher will be satisfied when matched against a context graph showing that a valid VC of type credential B has been presented by the agent requesting access to the access controlled resource.
[] a acp:Matcher ; acp:vc ex:credentialB .
The following example authorization graph means that matcher A will be satisfied only if either Alice or Bob are the agent requesting resource access and their identity was asserted by Identity Provider B.
ex:matcherA a acp:Matcher ; acp:agent ex:Bob, ex:Alice ; acp:issuer ex:IdentityProviderB .
The following example authorization graph means that the defined matcher will be satisfied only if Alice, whose identity is asserted by Identity Provider B, is the agent requesting resource access and is doing so presenting a VC that is a valid instance of credential A.
[ a acp:Matcher ; acp:agent ex:Alice ; acp:issuer ex:IdentityProviderB ; acp:vc ex:credentialA ; ] .
The following example authorization graph means that Policy A denies Read and Write access to all clients but client C and policy B allows read to all clients. If Policy A and B control access to a resource, then anyone using client C will have Read access to that resource.
ex:policyA acp:deny acl:Read, acl:Write ; acp:anyOf [ acp:client acp:PublicClient ; ] , acp:noneOf [ acp:client ex:clientC ] . ex:policyB acp:allow acl:Read ; acp:anyOf [ acp:client:PublicClient ; ] .
4.5. Matcher extensibility
ACP implementations supporting sub-properties of
acp:attribute
other than the ones defined by ACP SHOULD
also define and implement corresponding matching algorithms.
4.5.1. Example Matcher extension
Given the property ex:tag
previously defined in the
example context extension
as a an rdfs:subPropertyOf acp:attribute
that
describes tags applied to requested resources; the following
example context graph would mean that Policy 1 allows Read and is
satisfied by instances of resource access initiated over a
resource that was tagged ex:FavouriteRecord
or
ex:Wishlist
.
ex:policy1 acp:allow acl:Read ; acp:anyOf [ ex:tag ex:FavouriteRecord, ex:Wishlist ; ] .
5. Access Grant Graph
This section introduces the ACP terms used to grant access to resources.
5.1. Access Grant
-
acp:AccessGrant
- Instances of the Access Grant class define sets of Access Modes granted in particular Contexts.
-
acp:context
- The context property connects Access Grants to the Contexts in which they're given.
-
acp:grant
- The grant property connects Access Grants to the Access Modes they grant.
5.1.1. Example Access Grant
The following example access grant graph means that Access Modes
acl:Read
and acl:Write
have been granted
to Alice for accessing resource X.
[] acp:grant acl:Read, acl:Write ; acp:context [ acp:agent ex:Alice ; acp:target ex:resourceX ; ] .
5.2. Access Mode extensibility
-
acp:AccessMode
- The ACP specification does not define specific Access Modes. Instead, any Access Mode granted is an instance of the Access Mode class. Access Modes and their granularity can be tailored to the needs of an application and Access Modes defined in other vocabularies can also be used (for example, instances of ACL Access).
5.2.1. Example Access Mode
The following example access grant graph means that
acl:Read
and ex:Delete
are Access Modes;
furthermore, it means that acl:Read
and
ex:Delete
have been granted to Bob over resource X.
[] acp:grant acl:Read, ex:Delete ; acp:context [ acp:target ex:resourceX ; acp:agent ex:Bob ; ] .
6. Access Control resolution
This section introduces the ACP access control resolution algorithm for resolving permissions to access controlled resources.
6.1. Resolved Access Control
An ACP engine MUST grant exactly those Access Modes allowed by Effective Policies.
6.1.1. Resolved Access Control pseudocode
function resolveAccessControl(acr, ancestorAcrs, context) {
const effectivePolicies = gatherEffectivePolicies(acr, ancestorAcrs)
const allowedAccessModes = grantAccessModes(effectivePolicies, context)
const grantGraph = {
context,
grant: allowedAccessModes
}
return grantGraph
}
6.2. Effective Policies
Effective Policies are the Policies controlling access to a resource.
A Policy MUST control access to a resource if:
- it is applied by an Access Control of an ACR of the resource; or,
- it is applied by a member Access Control of an ACR of an ancestor of the resource.
6.2.1. Effective Policies example
The following example authorization graph means that access to resource X is controlled by both Access Controls B and C, access to resource X is therefore controlled by Policy E and Policy F. The member Access Controls are not taken into account at this level. Member Access Control D will be included in the effective authorization graph of resource X's members' ACRs both as an Access Control and a member Access Control. Therefore, Policy G will be part of the set of effective Policies controlling access to resource X's members and transitively to further members of member resources.
ex:accessControlResourceA acp:resource ex:X ; acp:accessControl ex:accessControlB, ex:accessControlC ; acp:memberAccessControl ex:accessControlD . ex:accessControlB acp:apply ex:PolicyE . ex:accessControlC acp:apply ex:PolicyF . ex:accessControlD acp:apply ex:PolicyG .
6.2.2. Effective Policies pseudocode
function gatherEffectivePolicies(acr, ancestorAcrs) {
const effectivePolicies = new Set
// Direct access controls of own ACR.
for (const accessControl of acr.accessControls)
for (const policy of accessControl.appliedPolicies)
effectivePolicies.add(policy)
// Member access controls of ancestor ACRs.
for (const acr of ancestorAcrs)
for (const accessControl of acr.memberAccessControls)
for (const policy of accessControl.appliedPolicies)
effectivePolicies.add(policy)
return effectivePolicies
}
6.3. Granted Access Modes
An Access Mode MUST be granted if and only if in the set of Effective Policies:
- a satisfied policy allows the Access Mode; and,
- no satisfied policy denies it.
6.3.1. Granted Access Modes example
The following example authorization graph means that access to resource X is controlled by Policy B and Policy C. Depending on the satisfaction of Policies B and C, different access modes will be granted.
-
If only Policy B is satisfied, then Access Modes
acl:Read
andacl:Write
will be granted. -
If both Policy B and Policy C are satisfied, then only Access
Mode
acl:Read
will be granted. - If only Policy C is satisfied, then no Access Mode will be granted.
[ acp:resource ex:X ; acp:accessControl [ acp:apply ex:policyB, ex:policyC ; ] ] . ex:policyB acp:allow acl:Read, acl:Write . ex:policyC acp:deny acl:Write .
6.3.2. Granted Access Modes pseudocode
function grantAccessModes(policies, context) {
const allowedAccessModes = new Set, deniedAccessModes = new Set
// Gather allowed and denied access modes from satisfied policies
for (const policy of policies)
if (isSatisfiedPolicy(policy, context)) {
for (const mode of policy.allowedAccessModes)
allowedAccessModes.add(mode)
for (const mode of policy.deniedAccessModes)
deniedAccessModes.add(mode)
}
// Deny overrules allow.
for (const mode of deniedAccessModes)
allowedAccessModes.delete(mode)
return allowedAccessModes
}
6.4. Satisfied Policy
A Policy MUST be satisfied if and only if:
-
it references at least one Matcher via an
acp:allOf
oracp:anyOf
property; and, -
all of its
acp:allOf
Matchers are satisfied; and, -
at least one of its
acp:anyOf
Matchers is satisfied; and, -
none of its
acp:noneOf
Matchers are satisfied.
6.4.1. Satisfied Policy example
The following example authorization graph means that access to resource X is controlled by Policy A. Depending on the satisfaction of Matchers B, C, D, E and F, Policy A will be satisfied or not.
- If either Matcher B or Matcher C are not satisfied, then Policy A will not be satisfied.
- If neither Matcher D nor Matcher E are satisfied, then Policy A will not be satisfied.
- If either Matcher F or Matcher G is satisfied, then Policy A will not be satisfied.
- If both Matcher B and Matcher C are satisfied, and, either Matcher D or Matcher E are satisfied, and, Matcher F and Matcher G are not satisfied, then Policy A will be satisfied.
[ acp:resource ex:X ; acp:accessControl [ acp:apply ex:policyA ; ] ] . ex:policyA acp:allOf ex:matcherB, ex:matcherC ; acp:anyOf ex:matcherD, matcherE ; acp:noneOf ex:matcherF, ex:matcherG .
6.4.2. Satisfied Policy pseudocode
function isSatisfiedPolicy(policy, context) {
// If any 'none of' matcher is satisfied then the policy is not satisfied.
for (const matcher of policy.noneOfMatchers)
if (isSatisfiedMatcher(matcher, context))
return false
// If any 'all of' matcher is not satisfied then the policy is not satisfied.
for (const matcher of policy.allOfMatchers)
if (!isSatisfiedMatcher(matcher, context))
return false
// If any 'any of' matcher is satisfied then the policy is satisfied.
for (const matcher of policy.anyOfMatchers)
if (isSatisfiedMatcher(matcher, context))
return true
// At this point there are
// - no satisfied 'none of' matchers,
// - no unsatisfied 'all of' matchers and
// - no satisfied 'any of' matchers.
// Hence, the policy is satisfied if it has
// - an 'all of' condition and
// - no 'any of' condition.
return policy.allOfMatchers.size !== 0 && policy.anyOfMatchers === 0
}
6.5. Satisfied Matcher
A Matcher MUST be satisfied if and only if:
- it defines at least one attribute; and,
- at least one value of each defined attribute matches the Context.
ACP engines MUST match the context attributes defined by this specification according to IRI equality and literal term equality.
6.5.1. Satisfied Matcher example
The following example authorization graph means that access to resource X is controlled by a Policy that will allow read if it is satisfied and be satisfied if either matcher A or matcher B or both are satisfied.
Matcher A will be satisfied if:
- either Alice or Bob are the requesting agent or if the requesting agent is an owner or creator; and,
- client 1 is used by the requesting agent; and,
- issuer 2 is used by the requesting agent to assert their identity.
Matcher B will be satisfied if:
- a valid VC of type "Family Member" is presented.
[ acp:resource ex:X ; acp:accessControl [ acp:apply [ acp:allow acl:Read ; acp:anyOf ex:matcherA, ex:matcherB ; ] ] ] . ex:matcherA acp:agent ex:Alice, ex:Bob, acp:CreatorAgent, acp:OwnerAgent ; acp:client ex:client1 ; acp:issuer ex:issuer2 . ex:matcherB acp:vc ex:FamilyMember .
6.5.2. Satisfied Matcher pseudocode
function isSatisfiedMatcher(matcher, context) {
// An empty matcher is never satisfied.
if (matcher.agents.size === 0 && matcher.clients.size === 0 && matcher.issuers.size === 0 && matcher.vcs.size === 0)
return false
// For each attribute, if any values are defined, then at least one of them must match the context.
if (matcher.agents.size !== 0) {
let isMatch = false
for (const agent of matcher.agents)
if (agentMatches(agent, context)) {
isMatch = true
break
}
if (!isMatch)
return false
}
if (matcher.clients.size !== 0) {
let isMatch = false
for (const client of matcher.clients)
if (clientMatches(client, context)) {
isMatch = true
break
}
if (!isMatch)
return false
}
if (matcher.issuers.size !== 0) {
let isMatch = false
for (const issuer of matcher.issuers)
if (issuerMatches(issuer, context)) {
isMatch = true
break
}
if (!isMatch)
return false
}
if (matcher.vcs.size !== 0) {
let isMatch = false
for (const vc of matcher.vcs)
if (vcMatches(vc, context)) {
isMatch = true
break
}
if (!isMatch)
return false
}
// At this point, the matcher is satisfied because
// - there was at least one defined attribute and
// - at least one value of each defined attribute matched the context.
return true
}
const publicAgent = "https://www.w3.org/ns/solid/acp#PublicAgent"
const authenticatedAgent = "https://www.w3.org/ns/solid/acp#AuthenticatedAgent"
const creatorAgent = "https://www.w3.org/ns/solid/acp#CreatorAgent"
const ownerAgent = "https://www.w3.org/ns/solid/acp#OwnerAgent"
function agentMatches(agent, context) {
if (agent === publicAgent)
return true
if (agent === authenticatedAgent && context.agent !== null)
return true
if (agent === creatorAgent && context.creators.includes(context.agent))
return true
if (agent === ownerAgent && context.owners.includes(context.agent))
return true
if (agent === context.agent)
return true
}
const publicClient = "https://www.w3.org/ns/solid/acp#PublicClient"
function clientMatches(client, context) {
if (client === publicClient)
return true
if (client === context.client)
return true
}
const publicIssuer = "https://www.w3.org/ns/solid/acp#PublicIssuer"
function issuerMatches(issuer, context) {
if (issuer === publicIssuer)
return true
if (issuer === context.issuer)
return true
}
function vcMatches(vc, context) {
if (context.vcs.includes(vc))
return true
}
7. Server implementation
This section introduces conforming resource server and ACP server requirements.
7.1. Conforming resource server
Conforming resource servers MUST provide ACP servers with resource access Contexts and MUST authorize resource access according to grant graphs produced by a conforming ACP server.
When responding to requests targetting access controlled resources,
conforming resource servers MUST include a Link
header
with the rel
value of acl
and controlled
resources' ACRs as the link target
RFC 8288.
Conforming resource servers MUST provide ACP servers with sufficient resource membership information to resolve ancestor ACRs.
7.2. Conforming ACP server
When responding to requests targetting an ACR, conforming ACP
servers MUST include a Link
header with the
rel
value of type
and the
http://www.w3.org/ns/solid/acp#AccessControlResource
IRI as the link target.
When responding to OPTIONS requests targetting an ACR, conforming
ACP servers MUST include a Link
header for each
supported Access Mode with the rel
value of
http://www.w3.org/ns/solid/acp#grant
and the full IRI
of the supported Access Mode as the link target.
When responding to OPTIONS requests targetting an ACR, conforming
ACP servers MUST include a Link
header for each
supported attribute with the rel
value of
http://www.w3.org/ns/solid/acp#attribute
and the full
IRI of the supported attribute as the link target.
Conforming ACP engines MAY be conforming resource servers.
The lifecycle of Access Control Resources SHOULD take into account the lifecycle of resources they control access to.


---
title: Blog
layout: default
ref: blog
lang: en
description: Official blog of the Data Food Consortium
---
{% include header-blog.html %}
{% assign posts = site.posts | sort: 'date' | reverse %}
{% for post in posts limit:1 %}
{% endfor %}
{% for post in posts %}
{% include post-list.html %}
{% endfor %}


{% extends "layout.html" %} {% block main %} {% from "flask_user/_macros.html" import back_btn %} {% from "profile/profile_macros.html" import profileProcedures %}
{{ _("The TrueNTH system asks these questions in order to give you information that best fits") }} you. {{ _("You may skip any question you prefer not to answer.") }}


Category is... CATEGORY
This month, your challenge is to build something that generates descriptions of new CATEGORY!
Some examples to inspire you:
Example 1
Example 2
Example 3
Good luck!


Project report
Project goals
The objective of the project is to offer a visualisation of the populations of the different types of penguins living in Antarctica.
Data Source
The main dataset used is the list of all penguin observations in Antarctica (from various sources) compiled by the Mapping Application for Penguin Populations and Projected Dynamics (MAPPPD).
For each observation in the dataset, the following data is given:
- The name given to the observation site, as well as the site initials
- The coordinates of the site
- The common name given to the species of penguin
- The number of penguins observed
- The accuracy level of the observation (1 being the most accurate, 5 the least)
- The exact date of the observation
- The year of the beginning of the season (For example, January 2010 observations belong to a season starting in 2009)
- The type of penguin observed (adults, chicks, nests)
- The source of the observation
Optionally, we are are providing a visualization for the antarctic facilities (
COMNAP). Which can be freely used for educational purpose.
- The facility names given to the installed, as well as its unique identifier
- The facility coordinates
- The date of installation
- The facility type (stations, camps, refuge, airfield camp, laboratory, depot)
- The countries owning the facilities
- A link to the facility photos
Features
Our project is set up as an interactive website, allowing the user to discover the dataset and its implications. Using a menu at the top of each page, the user can browse different sections of the site.
- The index of the site is a homepage, allowing access to all the pages.
- The map page contains our interactive map, allowing the user to see the locations and species of all observed penguins for any given years, as well as a heat map of penguin activity.
- The penguin page displays a chart of all observations, grouped by month, allowing the user to see how the data is distributed as well as see, for any given parameters, the observations with the most penguins corresponding to those parameters.
- The final page is the one you're reading right now!
Technologies
- The website is based on a free to use Bootstrap template from StartBootstrap. Using a base template, we can quickly start to add our own content without worrying about the basics.
- The graphs were created using D3.js, dc.js and Crossfilter.
- Using Crossfilter, we can select what data dimensions to consider and natively feed to DC.js graphs, which in turn uses D3.js to render and display them. Crossfilter allows interactive data filtering without completely recreating all graphs, allowing for fast modification of the data displayed.
- Regarding the interactive map, we are using the Leaflet library and its polar projection and webgl heatmapplugins.
Usability
Here are the rules of usability according to
Eric Steven Raymond and Rob W. Landley
and whether the interactive map is compliant to those rules or not.
- Rule of Bliss : The user can understand the map without prior knowledge of the UI. The time slider and filters are self-explanatory, and advanced settings are hidden by default.
However, a few minutes of exploration are necessary to understand all the different types of available information (population, sites, nests).
- Rule of Distractions : The UI doesn't require sustained attention from the user.
- Rule of Flow : The UI doesn't disrupt the user's focus with pop-ups or anything.
- Rule of Documentation : The interface needs a bit of an introduction to explain the meaning of the underlying data, which is an infraction to the rule of documentation.
- Rule of Least Surprise : The UI doesn't try to impress with anything exotic or novel.
- Rule of Transparency : The user doesn't need to memorize the state of the application unless he hides the filters.
- Rule of Modelessness : The UI doesn't react to inputs differently depending on a hidden mode.
- Rule of Seven : The UI shouldn't have more than seven control elements on the screen, or the user might forget their function. Unfortunately, it does.
- Rule of Reversibility : The UI doesn't have any destructive operation. As such, it doesn't require an "undo" button. Each input can be cancelled by repeating it once.
- Rule of Confirmation : The UI doesn't use confirmation prompts.
- Rule of Failure : Failures should be informative. Our UI doesn't fail.
- Rule of Silence : When nothing surprising happens, the UI should stay silent. Our map doesn't even have sound at all.
- Rule of Automation : Automate the input of information that can be deduced. There's not much to automate on our UI but the autocompletion of the site names (which is implemented).
- Rule of Defaults : Choose safe defaults. The default filters hide data such as human facilities, which would introduce too much visual noise on a first visit.
- Rule of Respect : The UI should be as simple as possible. It's not, as some filters are rarely useful ("record types").
- Rule of Predictability : Again, the UI doesn't do anything surprising, and the user instinctively knows he can click penguins to show more info, check filters to activate them, select a year with the slider, and zoom and pan with the mouse and scroll wheel.
- Rule of Reality : User testing is important, be we were out of time to test it on a good sample of potential users.
Based on
With the goal to accelerate the development process and data analysis, we based our project on the following:
Conclusion
Unfortunately, the data isn't complete enough for us to be able to make assumptions. We observe an increase in the number of penguins in time, which is undoubtedly just an increase in the frequency of expeditions rather than population. Indeed, more records have been made in the last few years. The visualisation we provide still has the benefit of showing the wildlife hotspots and the location of human settlements.


Welcome to Pooch Match!
Find your new best friend!
Are you interested in adding a new dog to your household? Pooch Match is here to help you find your best possible new best friend!
We have made a quiz, designed to help you find the dog breeds that match best with your lifestyle and preferences, so that your pup is exactly what you need.
 Are you ready to see what dogs are out there waiting for you?
These are the breeds that match your specifications. Click on the breed name to see the adoptable pets with that breed!
About Us
Mark Reynoso
Mark hails from the Island of Whidbey in the great Pacific Northwest. He has found his way into the wonderful world of coding via non-profit fundraising and someday hopes to marry the two paths into some useful technology to benefit those in need. For fun, you might find Mark playing on his boat, hiking in the mountains, or just hanging out with his wife Janna and two little boys, Silas and Caleb.
Kinley Ramson
Kinley enjoys spending their time with their service dog, Asha, learning new things, coding, and spending time with their friends. They are an aspiring rationalist and a member of Seattle Effective Altruists. They also have a penchant for getting lost in the woods on purpose.
Brian Wheeler
Brian is originally from Arizona and is an aspiring developer aiming to seek out new challenges. Formerly a worker in IT for Snowflake Unified School District.
Daniel Pillay
Daniel was born and raised in Mountlake Terrace, Washington. He joined the Air Force in 2013 which led him to Japan and Oklahoma City. On his free time, he enjoys training Brazilian Jiu Jitsu and watching combat sports. His aspires to graduate Code Fellows as a Full Stack JavaScript Developer.
Asha Ramson
I'm a service dog. Woof!


A.Register on site www.internalhackathon.com
B.create team(with at least one female member)
C.submit ppt
D.wait for results
All team members should be from same college; no inter-coollege teams are allowed. However, members from diferent branches of the same college insitute are encouraged to form a team. Each team would comprise of 6 members including the team leader. Each team must have AT LEAST ONE FEMALE TEAM MEMBER. muli-disciplinary teams d whicoh means your team should have a good miv of Mechanical Engineers, Electronic Engineers, Product Designers and Programmers. The team name should be unique and MUST NOT contain the name of your institute in any form. A team can make muliple idea submissions for diferent problem statements under the same team name Team members CANNOT be assocoiated with muliple teams in parallel! Afer intra campus hackathon, the college SPOC has to enter the selected teams on our portal. Following this, the team leader can register his/her team on the same portal at www.sih.gov.in.
Create ppt of selected idea and submit it through our portal
Based on criteria.
Evalution criteria will include novelty of the idea, complexity, clarity and details in the prescribed format, feasibility, practability, sustainability, scale of impact, user experiencoe and potenial for future work progression.
Refer rules on home page.
NO
NO
Your choice.
1.
1.
1.
1.
We are sorry for the trouble. Please provide the details using contact Us option.
From account setting.
It can be because of following reasons:
1.You are a team leader.
2.You are already in some other group.
And they are not the reasons then contact us.


Facts About World-Wide Executions
- The United States ranked fifth for the highest number of executions.
- China keeps its execution numbers secret.
- Just 21 countries in the world carried out the death penalty last year.(total countries being 195)
- Hangings, Guillotines and even Beheading are still used as modern execution methods
- The countries that executed the most people include Iran with at least 388, Iraq at least 120, Saudi Arabia at least 69, and the United States with 52. But China has likely conducted more executions than the rest of the world combined.
- A crazy amount of Innocent people have been convicted and executed.
- Race plays a role in determining who lives and who dies. Why must we be racist?
- Capital punishment goes against almost every religion. But who needs religion, right?
- Millions currently spent on the death penalty could be used to assist the families of murder victims.
- The death penalty:
- denies the possibility of rehabilitation and reconciliation.
- promotes simplistic responses to complex human problems, rather than pursuing explanations that could inform positive strategies.
- prolongs the suffering of the murder victim’s family, and extends that suffering to the loved ones of the condemned prisoner.
- diverts resources and energy that could be better used to work against violent crime and assist those affected by it.
- is a symptom of a culture of violence, not a solution to it. It is an affront to human dignity.
- should be abolished. Now.


|
|
Portable browser - PAC
|
You can create independent websites and serve these from the same Apache server using Apache’s virtual hosting. Local testing requires resolving their domain names to the local PC. This is achieved by inserting an ip/domain-name pair in the local machine's Hosts file.
Unfortunately resolving domain-names with this method is not portable because you are required to edit the new target PC’s Hosts file. This page looks at resolving this issue using a PAC file and a portable browser. This combination makes the server completely portable.
Background
Testing multi-web sites is relatively easy. First create a virtual host section for each site in the Apache configuration file. Use the hosts file on your machine to resolve the web site names to IP address. That’s it; finished. Suppose you do not have access to the host file. What alternatives are there?
If you use only relative links on your site, you can use the Apache alias and re-map. However if your sites are using absolute or root-relative links, this method will fail.
So what other methods are there for resolving IP addresses? A local DNS server would do nicely, even allow you to enter MX records. That seems a bit of overkill, since all we want to do is convince our browser to pick up pages from a different server masquerading as the real server. Enter the world of proxy servers.
PAC
Web browsers can be configured to use a proxy server, allowing the use of files or other resources available on a different server.
This process is automated with a Proxy Auto-Configuration (PAC) file. Sounds complicated! Not really. The PAC file is a simple text file containing a few instructions. Just tell your browser where to find it by setting the appropriate options. Your browser reads this file when it is re-started and whenever it needs to resolve an IP address.
Any special instructions are executed before your browser attempts to resolve an IP address. This is why PAC is so powerful. PAC allows you to simulate a DNS server locally, with one line per CNAME entry. Unlike the hosts file it is dynamic. PAC is a standard and uses a single file that is supported by all modern browsers.
PAC file
|
The PAC file is a JavaScript consisting of a single function. This function receives two parameters (url and host).
Parameters are automatically provided by a browser.
Internally your browser calls this function using the following line: ret = FindProxyForURL(url, host)
|
PAC file:
function FindProxyForURL(url, host)
{
...
}
|
| url |
|
The full URL being accessed e.g.: http://wiki.uniformserver.com/index.php/Main_Page |
| host |
|
The hostname extracted from the URL. It is the string between :// and the first (: or /) for example
http://wiki.uniformserver.com/index.php/Main_Page
Note: The port number is not included. If required, it can be extracted from the URL
|
| ret |
|
The return value is a string describing the configuration. |
Return Value:
The JavaScript function must return a single string. If the string is null, no proxies will be used. The string can contain any of the following:
| DIRECT |
|
Connections should be made directly, without any proxies. |
| PROXY host:port |
|
The specified proxy should be used. It's this return value we are interested in |
| SOCKS host:port |
|
The specified SOCKS server should be used. |
Note: In the FindProxyForURL function you can use a number of predefined functions. We are interested in only two: shExpMatch and dnsDomainIs.
If these do not suit your needs, you can easily find more information on the Internet.
Compare function - shExpMatch
The function shExpMatch(str, shexp) compares two strings:
| str |
|
Any string to be compared for example the url or the host. |
| shexp |
|
The expression to compare against. This expression can contain wildcard characters:
| * | matches anything |
| ? | matches one character |
| \ | will escape a special character |
| $ | matches the end of the string |
| [abc] | matches one occurrence of a, b, or c. The only character that needs
to be escaped in this is ], all others are not special. |
| [a-z] | matches any character between a and z
| | [^az] | matches any character except a or z |
| ~ | followed by another shell expression will remove any pattern
matching the shell expression from the match list |
| (foo|bar) | will match either the substring foo, or the substring bar.
These can be shell expressions as well. |
|
The function returns true if the string matches the specified expression.
Examples:
- Example 1:
shExpMatch("http://home.unicenter.com/site1/index.html", "*site1*") returns true.
- Example 2:
shExpMatch("http://home.unicenter.com/site2/index.html", "*site1*") returns false
- Example 3:
shExpMatch("http://home.unicenter.com/site1/index.html", "*unicenter.com*") returns true.
- Example 4:
shExpMatch("http://home.unicenter.com/site2/index.html", "*unicenter.com*") returns true.
The above is just an example. Replace the fixed string with a variable such as the url or host, for example:
- Example 5:
shExpMatch("url", "*site1*") Any url passed to the function containing the string site1 (anywhere) returns true.
- Example 6:
shExpMatch("url", "*unicenter.com*") Any url passed to the function containing the string unicenter.com (anywhere) returns true.
- Example 7:
shExpMatch("host", "unicenter.com") A host passed to the function containing the string unicenter.com returns true.
- Example 8:
shExpMatch("host", "*unicenter.com") A host passed to the function containing the string unicenter.com returns true. This includes a sub-host such as wiki.unicenter.com
Complete PAC file
Add the above filter to the PAC function and we have our very own DNS resolver, with the ability to define any CNAME that we wish.
The PAC file shown below currently resolves localhost, like the host file it maps localhost to IP address <IP_ADDRESS>
|
Note: If any of the shExpMatch functions do not find a match function FindProxyForURL returns a null value. In this situation to resolve the host name a browser needs to do a little more work. It checks the hosts file, then any local DNS server, and as a last resort puts a request onto the Internet to a DNS server.
|
function FindProxyForURL(url, host){
if (shExpMatch(host, "*localhost*")) return "PROXY <IP_ADDRESS>:80";
...Other shExpMatch statments ....
...Other shExpMatch statments ....
return "";}
|
Hosts file emulation with a PAC file
Local testing requires an entry in the Windows hosts. Typical entries contained in this hosts file is show below:
|
Windows host:
For local testing the host file maps a domain name to IP address (<IP_ADDRESS>).
If the domain includes sub-domains for example www.fred.com and wiki.fred.com
they each requires a separate entry in the hosts file.
This is one limitation of the hosts file.
|
Hosts file:
<IP_ADDRESS> localhost
<IP_ADDRESS> www.ric.com
<IP_ADDRESS> fred.com
<IP_ADDRESS> www.fred.com
<IP_ADDRESS> wiki.fred.com
|
With a PAC file, specific strings can be targeted. We are interested in resolving domain names (host) and not what is typed into a browser (url). There are only three domains to resolve: localhost, www.ric.com and fred.com hence our PAC file requires only three enteries as follows:
|
PAC:
The domain fred.com is resolved using the wildcard star (*) operator. This picks
out fred.com's sub-domains www and wiki
|
proxy.pac file:
function FindProxyForURL(url, host){
if (shExpMatch(host, "*localhost")) return "PROXY <IP_ADDRESS>:80";
if (shExpMatch(host, "www.ric.com")) return "PROXY <IP_ADDRESS>:80";
if (shExpMatch(host, "*fred.com")) return "PROXY <IP_ADDRESS>:80";
return "DIRECT";}
|
Summary
|
Uniform Server PAC:
The above was just a quick introduction to the PAC file; it is much more powerful and worth further investigation. Search the Internet for more information. I have only covered what is need for the Uniform Server proxy.pac file.
|
proxy.pac file:
function FindProxyForURL(url, host){
if (shExpMatch(host, "*localhost")) return "PROXY <IP_ADDRESS>:80";
... Other shExpMatch statements automatically added and deleted ....
return "DIRECT";}
|
The basic structure is shown on the right and is about as complex as it gets.
Note: Creating an Apache Vhost automatically adds its domain name to the proxy.pac file. Deleting a Vhost also deletes its corresponding domain name entry in the PAC file.
--oOo--
|


In Trident the children (not descendants) of an element are made focusable, if the element is focusable/tabbable and has display: flex.
display: flex


| < Day Day Up > |
1.6 Getting HelpGiven that Squid is free software, you may need to rely on the kindness of strangers for occasional assistance. The best place to do this is the squid-users mailing list. Before posting a message to the mailing list, however, you should check Squid's FAQ document to see if your question has already been asked and answered. If neither resource provides the help you need, you can contact one of the many services offering professional support for Squid. 1.6.1 Frequently Asked QuestionsSquid's FAQ document, located at http://www.squid-cache.org/Doc/FAQ/FAQ.html, is a good source of information for new users. The FAQ evolves over time, so it will contain entries written after this book. The FAQ also contains some historical information that may be irrelevant today. Even so, the FAQ is one of the first places you should look for answers to your questions. This is especially true if you are a new user. While it is certainly less effort for you to simply write to the mailing list for help, veteran mailing list members grow tired of reading and answering the same questions. If your question is frequently asked, it may simply be ignored. The FAQ is quite large. The HTML version exists as approximately 25 different chapters, each in a separate file. These can be difficult to search for keywords and awkward to print. You can also download PostScript, PDF, and text versions by following links at the top of the HTML version. 1.6.2 Mailing ListsSquid has three mailing lists you might find useful. I explain how to become a subscriber below, but you may want to check Squid's mailing list page, http://www.squid-cache.org/mailing-lists.html, for possibly more up-to-date information. <IP_ADDRESS> squid-usersThe squid-users mailing list is an excellent place to find answers for such questions as:
Note that you must subscribe before you can post a message. To subscribe to the squid-users list, send a message to<EMAIL_ADDRESS>If you prefer, you can receive the digest version of the list. In this case, you'll receive multiple postings in a single email message. To sign up this way, send a message to<EMAIL_ADDRESS>Once you subscribe, you can post a message to the list by writing to<EMAIL_ADDRESS>If you have a question, consider checking the FAQ and/or mailing list archives first. You can browse the list archive by visiting http://www.squid-cache.org/mail-archive/squid-users/. However, if you are looking for something specific, you'll probably have more luck with the search interface at http://www.squid-cache.org/search/. <IP_ADDRESS> squid-announceThe moderated squid-announce list is used to announce new Squid versions and important security updates. The volume is quite low, usually less than one message per month. Write to<EMAIL_ADDRESS>if you'd like to subscribe. <IP_ADDRESS> squid-devThe squid-dev list is a place where Squid hackers and developers can exchange ideas and information. Anyone can post a message to squid-dev, but subscriptions are moderated. If you'd like to join the discussion, please send a message about yourself and your interests in Squid. One of the list members should subscribe you within a few days. The squid-dev messages are archived at http://www.squid-cache.org/mail-archive/squid-dev/, where anyone may browse them. 1.6.3 Professional SupportA number of companies now offer professional assistance for Squid. They may be able to help you get started with Squid for the first time, recommend a configuration for your network environment, and even fix some bugs. Some of the consulting companies are associated with core Squid developers. By giving them your business, you ensure that fixes and features will be committed to future Squid software releases. If necessary, you can also arrange for development of private features. Visit http://www.squid-cache.org/Support/services.html for the list of professional support services. |
| < Day Day Up > |


Main modules¶
Loads¶
-
class
actions.loads.
BaseVectorLoad
(name, loadVector)¶ Bases:
object
Base class for loads introduced using a load as an xcVector
Variables: - name – name identifying the load
- loadVector – load xc.Vector
-
class
actions.loads.
EarthPressLoad
(name, xcSet, soilData, vDir)¶ Bases:
actions.loads.BaseVectorLoad
Earth pressure applied on the elements (shell or beams) included in the set xcSet.
Variables: - name – name identifying the load
- xcSet – set that contains the elements (shells and/or beams)
- soilProp – instance of the class EarthPressureModel that defines the soil parameters required to calculate the earth pressure (K:coefficient of pressure, zGround: global Z coordinate of ground level,gammaSoil: weight density of soil, zWater: global Z coordinate of groundwater level, gammaWater: weight density of water) . soilProp==None if earth thrust is not considered.
:ivar vDir:unit xc vector defining pressures direction :ivar stripLoads: list of instances of the class
StripLoadOnBackfill to define (if any) strip surcharge loads on the backfill (defaults to [], no loads)Variables: - lineLoads – list of instances of the class LineVerticalLoadOnBackfill to define (if any) line surcharge loads acting in vertical direction on the backfill (defaults to [], no loads)
- horzLoads – list of instances of the class HorizontalLoadOnBackfill to define (if any) surcharge loads acting in horizontal direction on the backfill (defaults to [], no loads)
-
appendLoadToCurrentLoadPattern
()¶ Append load to the current load pattern.
-
class
actions.loads.
InertialLoad
(name, lstMeshSets, vAccel)¶ Bases:
actions.loads.BaseVectorLoad
Inertial load (density*acceleration) applied to the elements in the list of mesh-sets
Variables: - name – name identifying the load
- lstMeshSets – list of mesh-sets (of type LinSetToMesh or SurfSetToMesh)
- vAccel – acceleration vector xc.Vector([ax,ay,az])
-
appendLoadToCurrentLoadPattern
()¶
-
class
actions.loads.
NodalLoad
(name, lstNod, loadVector)¶ Bases:
actions.loads.BaseVectorLoad
Point load applied on a list of nodes
Variables: - name – name identifying the load
- lstNod – list of nodes on which the load is applied.
- loadVector – xc.Vector with the six components of the load: xc.Vector([Fx,Fy,Fz,Mx,My,Mz]).
-
appendLoadToCurrentLoadPattern
()¶
-
class
actions.loads.
StrainGradientLoadOnBeams
(name, xcSet, strain)¶ Bases:
object
Strain load applied on the beam elements generated from all the lines in the xcSet.
-
appendLoadToLoadPattern
(loadPattern)¶ Append load to the load pattern passed as parameter.
-
-
class
actions.loads.
StrainGradientLoadOnSurfaces
(name, xcSet, nabla)¶ Bases:
object
Strain gradient applied on the shell elements generated from all the surfaces in the xcSet.
Variables: - name – name identifying the load
- xcSet – set that contains the surfaces
- nabla – strain gradient in the thickness of the elements: nabla=espilon/thickness
-
appendLoadToLoadPattern
(loadPattern)¶ Append load to the load pattern passed as parameter.
-
class
actions.loads.
UniformLoadOnBeams
(name, xcSet, loadVector, refSystem='Global')¶ Bases:
actions.loads.BaseVectorLoad
Uniform load applied on the beam elements generated from all the lines in the xcSet.
Variables: - name – name identifying the load
- xcSet – set that contains the lines
- loadVector – xc.Vector with the six components of the load: xc.Vector([Fx,Fy,Fz,Mx,My,Mz]).
- refSystem – reference system in which loadVector is defined: ‘Local’: element local coordinate system ‘Global’: global coordinate system (defaults to ‘Global)
-
appendLoadToCurrentLoadPattern
()¶ Append load to the current load pattern.
-
class
actions.loads.
UniformLoadOnLines
(name, xcSet, loadVector)¶ Bases:
actions.loads.BaseVectorLoad
Uniform load applied to all the lines (not necessarily defined as lines for latter generation of beam elements, they can be lines belonging to surfaces for example) found in the xcSet The uniform load is introduced as point loads in the nodes
Variables: - name – name identifying the load
- xcSet – set that contains the lines
- loadVector – xc.Vector with the six components of the load: xc.Vector([Fx,Fy,Fz,Mx,My,Mz]).
-
appendLoadToCurrentLoadPattern
()¶
-
class
actions.loads.
UniformLoadOnSurfaces
(name, xcSet, loadVector, refSystem='Global')¶ Bases:
actions.loads.BaseVectorLoad
Uniform load applied on the shell elements generated from all the surfaces in the xcSet.
Variables: - name – name identifying the load
- xcSet – set that contains the surfaces
- loadVector – xc.Vector with the six components of the load: xc.Vector([Fx,Fy,Fz,Mx,My,Mz]).
- refSystem – reference system in which loadVector is defined: ‘Local’: element local coordinate system ‘Global’: global coordinate system (defaults to ‘Global)
-
appendLoadToCurrentLoadPattern
()¶ Append load to the current load pattern.
Load cases¶
-
class
actions.load_cases.
LoadCase
(preprocessor, name, loadPType='default', timeSType='constant_ts')¶ Bases:
object
Definition of a load case.
Variables: - name – name given to the load case
- loadPType – type of load pattern. Available types: “default”, “uniform_excitation”, “multi_support_pattern”, “pbowl_loading”. Defaults to “default”
- timeSType – type of Time Series. Available time series: “constant_ts”,”linear_ts”,”path_ts”,”pulse_ts”,”rectangular_ts”,”triangular_ts”,”trig_ts”. Defaults to “constant_ts”
- timeSName – name of the Time Serie
-
addLstLoads
(lstLoads)¶ list of loads to be added to the load case.
-
create
()¶ Create the load case and set it as current
-
class
actions.load_cases.
LoadCaseManager
(preprocessor)¶ Bases:
object
Manager for XC load cases.
-
defineSimpleLoadCases
(names)¶ Define load patterns with constant time series.
-
getCurrentLoadCase
()¶ Returns current load case.
-
getLoadCase
(name)¶
-
setCurrentLoadCase
(name)¶ Sets current load case.
-
-
actions.load_cases.
resetAccionesConstantTS
(preprocessor, tipoTimeSeries, nmbTimeSeries, fct)¶ Clear all load patterns in the model and create a new TimeSeries
Parameters: - tipoTimeSeries – time series type
- nmbTimeSeries – time series name.
- fct – Factor
Combinations¶
combinations.py: manages the container for load combinations.
-
class
actions.combinations.
CombContainer
¶ Bases:
object
Container of load combinations :ivar SLS: serviceability limit state combination :ivar ULS: ultimate limit state combination
-
dumpCombinations
(preprocessor)¶ Introduces the combinations into the XC combination loader.
-
getNames
()¶ returns a list of the combination names.
-
getNeutralFormat
(mapLoadCases)¶
-
getRecordLoadCaseDisp
(combName, setsToDispLoads, setsToDispDspRot, setsToDispIntForc)¶ Returns a suitable RecordLoadCaseDisp for the combination.
Variables: - setsToDispLoads – ordered list of sets of elements to display loads.
- setsToDispDspRot – ordered list of sets of elements to display displacements.
- setsToDispIntForc – ordered list of sets of elements to display internal forces.
-
-
class
actions.combinations.
CombinationRecord
(name, expr)¶ Bases:
object
Combination name and expression (i.e. ELS01= 1.0*G+1.0*Q)
-
createCombination
(xcCombLoader)¶ Create combination and insert it into the XC combination loader.
-
getRecordLoadCaseDisp
(setsToDispLoads, setsToDispDspRot, setsToDispIntForc)¶ Return a suitable RecordLoadCaseDisp for the combination.
Variables: - setsToDispLoads – ordered list of sets of elements to display loads.
- setsToDispDspRot – ordered list of sets of elements to display displacements.
- setsToDispIntForc – ordered list of sets of elements to display internal forces.
-
-
class
actions.combinations.
SLSCombinations
¶ Bases:
actions.combinations.SituationsSet
Combinations of actions for serviceability limit states
Variables: - name – name to identify the limit state (serviceability, ultimate,...)
- rare – combination for a rare design situation
- freq – combination for a frequent design situation
- qp – combination for a quasi-permanent design situation
- earthquake – combination for a earthquake design situation
-
getNeutralFormat
(counter, mapLoadCases)¶
-
class
actions.combinations.
SituationCombs
(desc)¶ Bases:
dict
Combinations for a situation (frequent, rare, persistent,...).
-
add
(name, expr)¶
-
dumpCombinations
(xcCombLoader)¶ Introduces the combinations into the XC combination loader.
-
getNames
()¶ returns a list of the combination names.
-
getNeutralFormat
(counter, typ, mapLoadCases)¶
-
getRecordLoadCaseDisp
(combName, setsToDispLoads, setsToDispDspRot, setsToDispIntForc)¶ Returns a suitable RecordLoadCaseDisp for the combination.
Variables: - setsToDispLoads – ordered list of sets of elements to display loads.
- setsToDispDspRot – ordered list of sets of elements to display displacements.
- setsToDispIntForc – ordered list of sets of elements to display internal forces.
-
-
class
actions.combinations.
SituationsSet
(name)¶ Bases:
object
Set of situations as used in limit states
Variables: - name – name to identify the situation set
- situations – set of situations
-
dumpCombinations
(xcCombLoader)¶ Introduces the combinations into the XC combination loader.
-
getNames
()¶ returns a list of the combination names.
-
getRecordLoadCaseDisp
(combName, setsToDispLoads, setsToDispDspRot, setsToDispIntForc)¶ Returns a suitable RecordLoadCaseDisp for the combination.
Variables: - setsToDispLoads – ordered list of sets of elements to display loads.
- setsToDispDspRot – ordered list of sets of elements to display displacements.
- setsToDispIntForc – ordered list of sets of elements to display internal forces.
-
class
actions.combinations.
ULSCombinations
¶ Bases:
actions.combinations.SituationsSet
Combinations of actions for ultimate limit states
Variables: - name – name to identify the limit state (ultimate,...)
- perm – combination for a persistent or transient design situation
- acc – combination for a accidental design situation
- fatigue – combination for a fatigue design situation
- earthquake – combination for a seismic design situation
-
getNeutralFormat
(counter, mapLoadCases)¶


The generalized toroidal angle α is numerically calculated in my code. To verify B ⋅∇α = 0 along a magnetic ﬁeld-line, ﬁgure 24 plots the values of α along a magnetic ﬁeld line, which indicates that α is constant. This indicates the numerical implementation of the ﬁeld-aligned coordinates is correct.


This is the set of function pointers that will be called after each describe block.
This is the set of function pointers that will be called after each test.
If the test group did not error, this is the number of allocations that occurred durring the the group's exection.
This is the set of function pointers that will be called before each describe block.
This is the set of function pointers that will be called before each test.
If the test group did not error, this is the number of block decrements that occurred during the group's exection.
The group end time.
If the test group did not error, this is the number of deallocations that occurred durring the the group's exection.
If the test group did not error, this is the number of block increments that occurred during the group's exection.
This is the set of log values that were collected before and after the tests ran.
This is the name of the test.
The parent describe context that contains callbacks that also apply to this context.
This is a value indicating if the group's tests passed successfully.
This is the reason that the group's tests did not pass.
If the test group completed, this is the delta number of allocations that occured during the
TestGroup
execution.
If the test group completed, this is the number of allocations currently on the heap when the
TestGroup
execution ends.
This is the number of allocations currently on the heap when the TestGroup
execution starts.
The group start time.
This is the list of tests that the TestContext
ran for this group.
This is how long the group ran in ms.
This is a list of "todos" that were collected for this group.
A set of warnings that were reported for this test.
A value indicating if this test group should run.
This method creates a new TestGroup that contains a reference to all of the current flow
functions of this TestGroup
.
Generated using TypeDoc
This test group class is designed with a data oriented layout in mind. Each test property is represented by an array.


{% extends "mxv/base.html" %} {% load static widget_tweaks %} {% block title %}Update details{% endblock %} {% block content %}
Can't look up details, please contact Momentum and let them know<EMAIL_ADDRESS>{% elif nation_builder_busy %}Whoops, lots of people are getting involved at the moment and there was an error. Click here to try again.
{% else %}


Where should you start your business?
Find out now and click
here
Corporate Tax rate around the world
Political Stability Index
Questions
A high minimum wage is?
A high percentage of English speaking inhabitants is?
The lack of child labour is?
A Government that protects the environment is?
A highly educaded workforce is?
A high level of innovation is?
A high quality of infrastructure is?
A high ICT-acces level is?
The tax rate should be high to contribute to the country?
GO
RESET
Unimportant
Important
Match with selected country
Top 5 countries to start your business


| Trees | Indices | Help |
|
|---|
|
|
|
|||
|
DateFormat Class which helps us manage the date formats allowed by the standard |
|||
|
ResumptionTokenException Exception class for any issues with Resumption Tokens |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|
|
|
|
Make a suitable tag identifier for records in the OAI response. Identifiers are of the form: oai:[namespace]/[qualifier]:[identifier] Namespace is taken from configuration (OAIPMH_IDENTIFIER_NAMESPACE)
|
|
|
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Dec 16 17:54:29 2015 | http://epydoc.sourceforge.net |


Free vouchers for Azure Certification were offered in our company. Surprisingly for myself I signed up for the exam. But there is a catch.
This post starts in exactly same way is my previous one: Infinite redirect in Firefox:
Our company uses Microsoft services for emails, calendars, sharepoints, doing the work...
Opinion of developers is barely checked when the company selects a software. For example Skype for Business was the company’s choice as a communicator, despite high percentage of employees having troubles with it on Linux. These days enterprises switch to Teams. It works on Linux, but feature parity and support for Linux is the worst.
Anyway, recently in my company free certification tracks for Azure were offered. Learning about a new cloud provider could be interesting. So I signed up for the first exam: Azure Fundamentals. There were two ways to go through the exam: go to a certification center or online. Who still goes to cetification centers for cloud certification?! Sounds a bit absurd. So, online was chosen.
The Azure Fundamentals has reading and exercise material. Microsoft provided that it will take apprximately 9 hours to go through the learning material. Briefly checked the material, I thought that an evening before the exam will be enough for preparation.
Fast forward to today, one night before the exam. I successfully went through 70% of leaning material. Decided to take a break and check exactly what is needed for the exam. Oh, it looks very serious: they require ID, digital photo, a phone near you during an exam so that someone can call you and check on you. Before the exam they will examine your room. Ok, I guess Microsoft wants to increase value of certificates.
There is also something like “Perform a system test” in the invitation email. Probably something that can be skipped, as video chats work smoothly from all major systems and browsers. Wait, wait, wait, there is something like “download the software”. I did not even want to do “a system test” before, but now they mention something about “Ensure you have administrative rights on your computer to be able to download the software.”
Ok, you got me interested in a system test. Click the link and the website offers “OnVUE-3.22.30.exe” for download. That’s strange that they cannot detect that I am from Linux. After a minute of trying to find download link for Linux I am getting worried that it might not exist. Let me find the requirements for this online exam software:
System requirements
Windows 10 (64-bit) Windows 8.1 (64-bit)
Mac OS 10.13 and above (excluding beta versions)
Windows Vista, Windows XP and Windows 7 are strictly prohibited for exam delivery
All Linux/Unix based Operating Systems are strictly prohibited.
Oh wow, “Linux is strictly prohibited” :) For Azure Certification Exam. That’s the irony.
The last quick attempt: wine OnVUE-3.22.30.exe
- does not work. Ok, not worth trying to make it work.
Since the exam cannot be rescheduled or even cancelled less than 24 hours before the start, I wanted to express my frustration and notify the exam people that I won’t be able to join. So I contacted the exam center through the online chat:
Marat: Hi. I have an Azure exam scheduled for tomorrow.
Just found funny statement: "All Linux/Unix based
Operating Systems are strictly prohibited."
Is this a joke? I though that we were talking about
Azure clouds in which a lot of Linux services are running.
Microsoft "surpises" again. I don't care about refund
as it was a company voucher, but that is just the feedback.
Thank you.
......: Hi. I would be happy to help you with that.
There are system requirements decided by the Microsoft.
......: Therefore, if there is any difference with that please
contact Microsoft directly in this concern.
Marat: I understand that there are reasons :) Anyway, if you can
cancel the exam so that no one will be wasting time
waiting for me to join tomorrow, I guess that's the best to do.
......: I can see that you are scheduled for AZ-900 exam in English
via Online (Internet Based Test)
Marat: yes, but I guess I cannot dail in from Linux
......: I have checked and the exam can neither be canceled
nor rescheduled within 24 hours from the scheduled appointment.
Marat: I saw that as well, but I just wanted to notify that
I won't be able to dial in. If that's fine for you - also fine for me
......: The exam cannot be rescheduled or cancelled
......: Is there anything else I can assist you with today?
Marat: No, thank you
Info: Thank you for contacting Pearson VUE Live Chat. Have a great day!
It is even impossible to cancel the exam without no-show.


Sample run of chapter's interpreter examples
// In file modular-programming-using-objects/Food.scala package org.stairwaybook.recipe abstract class Food(val name: String) { override def toString = name }
// In file modular-programming-using-objects/Ex4.scala package org.stairwaybook.recipe class Recipe( val name: String, val ingredients: List[Food], val instructions: String ) { override def toString = name }
// In file modular-programming-using-objects/Foods.scala package org.stairwaybook.recipe object Apple extends Food("Apple") object Orange extends Food("Orange") object Cream extends Food("Cream") object Sugar extends Food("Sugar") object FruitSalad extends Recipe( "fruit salad", List(Apple, Orange, Cream, Sugar), "Stir it all together." )
// In file modular-programming-using-objects/Ex1.scala package org.stairwaybook.recipe object SimpleDatabase { def allFoods = List(Apple, Orange, Cream, Sugar) def foodNamed(name: String): Option[Food] = allFoods.find(_.name == name) def allRecipes: List[Recipe] = List(FruitSalad) } object SimpleBrowser { def recipesUsing(food: Food) = SimpleDatabase.allRecipes.filter(recipe => recipe.ingredients.contains(food)) }
scala> val apple = SimpleDatabase.foodNamed("Apple").get apple: Food = Apple scala> SimpleBrowser.recipesUsing(apple) res0: List[Recipe] = List(fruit salad)
// In file modular-programming-using-objects/Ex2.scala package org.stairwaybook.recipe object SimpleDatabase { def allFoods = List(Apple, Orange, Cream, Sugar) def foodNamed(name: String): Option[Food] = allFoods.find(_.name == name) def allRecipes: List[Recipe] = List(FruitSalad) case class FoodCategory(name: String, foods: List[Food]) private var categories = List( FoodCategory("fruits", List(Apple, Orange)), FoodCategory("misc", List(Cream, Sugar))) def allCategories = categories } object SimpleBrowser { def recipesUsing(food: Food) = SimpleDatabase.allRecipes.filter(recipe => recipe.ingredients.contains(food)) def displayCategory(category: SimpleDatabase.FoodCategory) = { println(category) } }
SimpleDatabase.allRecipes.filter(recipe => ...
// In file modular-programming-using-objects/Browser.scala abstract class Browser { val database: Database def recipesUsing(food: Food) = database.allRecipes.filter(recipe => recipe.ingredients.contains(food)) def displayCategory(category: database.FoodCategory) = { println(category) } }
// In file modular-programming-using-objects/Ex3.scala abstract class Database { def allFoods: List[Food] def allRecipes: List[Recipe] def foodNamed(name: String) = allFoods.find(f => f.name == name) case class FoodCategory(name: String, foods: List[Food]) def allCategories: List[FoodCategory] }
// In file modular-programming-using-objects/Ex4.scala object SimpleDatabase extends Database { def allFoods = List(Apple, Orange, Cream, Sugar) def allRecipes: List[Recipe] = List(FruitSalad) private var categories = List( FoodCategory("fruits", List(Apple, Orange)), FoodCategory("misc", List(Cream, Sugar))) def allCategories = categories }
// In file modular-programming-using-objects/SimpleBrowser.scala object SimpleBrowser extends Browser { val database = SimpleDatabase }
scala> val apple = SimpleDatabase.foodNamed("Apple").get apple: Food = Apple scala> SimpleBrowser.recipesUsing(apple) res1: List[Recipe] = List(fruit salad)
// In file modular-programming-using-objects/StudentDatabase.scala object StudentDatabase extends Database { object FrozenFood extends Food("FrozenFood") object HeatItUp extends Recipe( "heat it up", List(FrozenFood), "Microwave the 'food' for 10 minutes.") def allFoods = List(FrozenFood) def allRecipes = List(HeatItUp) def allCategories = List( FoodCategory("edible", List(FrozenFood))) } object StudentBrowser extends Browser { val database = StudentDatabase }
// In file modular-programming-using-objects/FoodCategories.scala trait FoodCategories { case class FoodCategory(name: String, foods: List[Food]) def allCategories: List[FoodCategory] }
// In file modular-programming-using-objects/Database.scala abstract class Database extends FoodCategories { def allFoods: List[Food] def allRecipes: List[Recipe] def foodNamed(name: String) = allFoods.find(f => f.name == name) }
// In file modular-programming-using-objects/Ex5.scala object SimpleDatabase extends Database with SimpleFoods with SimpleRecipes
// In file modular-programming-using-objects/Ex5.scala trait SimpleFoods { object Pear extends Food("Pear") def allFoods = List(Apple, Pear) def allCategories = Nil }
trait SimpleRecipes { // Does not compile object FruitSalad extends Recipe( "fruit salad", List(Apple, Pear), // Uh oh "Mix it all together." ) def allRecipes = List(FruitSalad) }
// In file modular-programming-using-objects/SimpleRecipes.scala trait SimpleRecipes { this: SimpleFoods => object FruitSalad extends Recipe( "fruit salad", List(Apple, Pear), // Now Pear is in scope "Mix it all together." ) def allRecipes = List(FruitSalad) }
// In file modular-programming-using-objects/GotApples.scala object GotApples { def main(args: Array[String]) = { val db: Database = if(args(0) == "student") StudentDatabase else SimpleDatabase object browser extends Browser { val database = db } val apple = SimpleDatabase.foodNamed("Apple").get for(recipe <- browser.recipesUsing(apple)) println(recipe) } }
$ scala GotApples simple fruit salad $ scala GotApples student $
scala> val category = StudentDatabase.allCategories.head category: StudentDatabase.FoodCategory = FoodCategory(edible,List(FrozenFood)) scala> SimpleBrowser.displayCategory(category) ^ error: type mismatch; found : StudentDatabase.FoodCategory required: SimpleBrowser.database.FoodCategory
// In file modular-programming-using-objects/GotApples2.scala object GotApples { // same definitions... for (category <- db.allCategories) browser.displayCategory(category) // ... } GotApples2.scala:14: error: type mismatch; found : db.FoodCategory required: browser.database.FoodCategory browser.displayCategory(category) ^ one error found
// In file modular-programming-using-objects/GotApples2.scala object browser extends Browser { val database: db.type = db }
|
For more information about Programming in Scala, Fourth Edition (the "Stairway Book"), please visit: http://www.artima.com/shop/programming_in_scala_4ed and: |
Copyright © 2007-2019 Artima, Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |


{% trans "FRBR-Redis Datastore App Home" %} {% trans "Access, Discovery, and Productivity Apps for Bibliographic Functions" %}
{% comment %}END page-header DIV{% endcomment %}{% trans "Vision" %}
The FRBR-Redis Datastore App portfolios are mobile, tablet, and PC single purpose apps that allow the user to discovery and access bibliographic and library information. Productivity apps are available to authenticated users for managing the bibliographic and library information stored in a Redis datastore.
These apps can be used in isolation, be developed independently from each other, and are released in an incremental fashion. Eventually, this collection of apps will supercede the need to have a traditional intregrated library system.
{% trans "Activity" %}
Current app activity


Square pie charts (a.k.a. waffle charts) can be used to communicate parts of a whole for categorical quantities. To emulate the percentage view of a pie chart, a 10x10 grid should be used with each square representing 1% of the total. Modern uses of waffle charts do not necessarily adhere to this rule and can be created with a grid of any rectangular shape. Best practices suggest keeping the number of categories small, just as should be done when creating pie charts. Tools are provided to create waffle charts as well as stitch them together, and to use glyphs for making isotype pictograms.
| Version: | 0.7.0 |
| Depends: | R (≥ 3.2.0), ggplot2 (≥ 2.0.0) |
| Imports: | RColorBrewer, grid, gridExtra, gtable, extrafont |
| Suggests: | testthat |
| Published: | 2017-01-07 |
| Author: | Bob Rudis [aut, cre], Dave Gandy [aut] (Font Awesome) |
| Maintainer: | Bob Rudis <bob at rud.is> |
| BugReports: | https://github.com/hrbrmstr/waffle/issues |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| URL: | https://github.com/hrbrmstr/waffle/tree/cran |
| NeedsCompilation: | no |
| Materials: | README NEWS |
| CRAN checks: | waffle results |
| Reference manual: | waffle.pdf |
| Package source: | waffle_0.7.0.tar.gz |
| Windows binaries: | r-devel: waffle_0.7.0.zip, r-release: waffle_0.7.0.zip, r-oldrel: waffle_0.7.0.zip |
| OS X binaries: | r-release: waffle_0.7.0.tgz, r-oldrel: waffle_0.7.0.tgz |
| Old sources: | waffle archive |
Please use the canonical form https://CRAN.R-project.org/package=waffle to link to this page.


{% if prediction == "legitimate" %}
Software is safe to install !
Thanks for checking out our work :)
Click To Scan More !
{% elif prediction == "malicious" %}
Software is malicious !
Thanks for checking out our work :)
Click To Scan More !
{% endif %}


About
Contact
Login
Sign up
Username *
Password *
Name *
Address
Marriage
single
married
Gender
male
female
age
back


Featured Event
Happy Birthday, Vai
May Allah bless you everyday in your life.
and have a wonderful year ahead.
Next


So far, we have seen two distinct kinds of memory management, although we have not discussed them explicitly. The first kind is usually called automatic memory management, and is associated with local variables: A local variable occupies memory that the system allocates when it encounters the variable's definition during execution. The system automatically deallocates that memory at the end of the block that contains the definition.
Once a variable has been deallocated, any pointers to it become invalid. It is the programmer's responsibility to avoid using such invalid pointers. For example,
// this function deliberately yields an invalid pointer. // it is intended as a negative example—don't do this! int* invalid_pointer() { int x; return &x; // instant disaster! }
This function returns the address of the local variable x
. Unfortunately, when the function
returns, doing so ends execution of the block that contains the definition of x
, which
deallocates x
. The pointer that &x
created is now invalid, but the function tries to return
it anyway. What happens at this point
is anybody's guess. In particular, C++ implementations
are not required to diagnose the error—you get what you get.
If we want to return the address of a variable such as x
, one way to do so is to use the
other kind of memory management, by asking for x
to be statically allocated:
// This function is completely legitimate. int* pointer_to_static() { static int x; return &x; }
By saying that x
is static
, we are saying that we want to allocate it once, and only once,
at some point before the first time that pointer_to_static
is ever called, and that we
do not want to deallocate it as long as our program runs. There is nothing wrong with
returning the address of a static
variable; the pointer will be valid as long as the program
runs, and it will be irrelevant afterward.
However, static
allocation has the potential disadvantage that every call to
pointer_to_static
will return a pointer to the same object! Suppose we want to
define a function such that each time we call it, we get a pointer to a brand new object,
which stays around until we decide that we no longer want it. To do so, we use dynamic
allocation, which we request by using the new and delete keywords.
If T
is the type of an object, new T
is an expression that allocates an object of type T
, which
is default-initialized, and yields a pointer to this (unnamed) newly allocated object. It is
possible to give a specific value to use when initializing the object by executing new
T
(args). The object stays around until the program either ends or executes delete p
(whichever happens first), where p
is (a copy of) the pointer returned by new. In order to
delete
a pointer, the pointer must point to an object that was allocated by new
, or be
equal to zero. Deleting a zero pointer has no effect. As an example,
int* p = new int(42);
will allocate an unnamed new object of type int
, initialize the object to 42, and cause p
to
point to that object. We can affect the value of the object by executing statements such as
++*p; // p is now 43
after which the object has the value 43. When we're done with the object, we can execute
delete p;
after which the space occupied by *p
is freed and p
becomes an invalid pointer, with a
value that we can no longer use until we have assigned a new value to it.
As another example, we might write a function that allocates an int
object, initializes
it, and returns a pointer to it:
int* pointer_to_dynamic() { return new int(0); }
which imposes on its caller the responsibility of freeing the object at an appropriate time.
If T
is a type and n
is a non-negative integral value, new T[n]
allocates an array of
n
objects of type T
and returns a pointer (which has type T*
) to the initial element of the
array. Each object is default-initialized, meaning that if T
is a built-in type and the array is
allocated at local scope, then the objects are uninitialized. If T
is a class type, then each
element is initialized by running its default constructor.
When T
is a class type, there are two important implications of this initialization process:
First, if the class doesn't allow default-initialization, then the compiler will reject the
program. Second, each of the n
elements in the array is initialized, which can be a substantial
execution overhead. In Chapter 11, we'll see that the standard library provides a
more flexible mechanism for dynamically allocating arrays. It is often preferable to use
that mechanism, rather than new, when dynamically allocating an array.
Although every ordinary array is required to have at least one element, it is possible
to allocate an "array" with no elements by executing new T[n]
with n
equal to zero. In this
case, new has a little trouble returning a pointer to the initial element—because there isn't
one. What it does instead is return a valid off-the-end pointer, which we can later use as
an argument to delete[]
, and which we can think of as being a pointer to where the initial
element would be if it existed.
The point of this curious behavior is to permit programs such as
T* p = new T[n]; vector<T> v(p, p + n); delete[] p;
to work even if n
is zero. The fact that p
doesn't point to an element when n
is zero is
irrelevant; all that matters is that p
and p + n
are pointers that can legitimately be compared
with each other and found to be equal. In all cases, the vector
will have n elements.
It is a great convenience for such programs to work properly even when n
is zero.
Note the use of delete[]
in this example. The brackets are necessary to tell the system
to deallocate an entire array, rather than a single element. An array allocated by
new[]
stays around until the program ends or until the program executes delete[] p
,
where p
is (a copy of) the pointer that new[]
yielded. Before deallocating the array, the
system destroys each element, in reverse order.
As an example, here is a function that takes a pointer to the initial character of a null- terminated character array such as a string literal, copies all the characters in the array (including the null character at the end) into a newly allocated array, and returns a pointer to the initial element of the new array:
char* duplicate_chars(const char* p) { // allocate enough space; remember to add one for the null size_t length = strlen(p) + 1; char* result = new char[length]; // copy into our newly allocated space and return pointer to first element copy(p, p + length, result); return result; }
Recall from §10.2/176 that strlen
returns the number of characters in a null-terminated
array, excluding the null character at the end. We therefore add 1 to the result of strlen
to account for the null, and allocate that many characters. Because pointers are iterators,
we can use the copy
algorithm to copy characters from the array denoted by p
into the
array denoted by result
. Because length
includes the null character at the end of the
array, the call to copy
copies that character as well as the ones before it.
As before, this function imposes on its caller the obligation to free the memory that it allocated. In general, finding an opportune time to free dynamically allocated memory is far from easy. We shall discuss techniques for automating this task in §11.3.4/200.


Applications
Content Management System (CMS)
Users are welcome to register for a CMS account, manage threads, and manage messages associated with threads. These accounts are used across other site applications in unique ways.
Points of Interest (POI)
This is a mapping application using OpenStreetMaps. Keep track of your favorite places around the world.
My personal POI can be viewed using this link.
Tanks
A multi-user, WebGL, Websocket application. Minimalistic implementation. Click with the mouse to start. Try playing with a friend!
Chat
A simple multi-user chat application. Messages are not recorded in a database.
API Explorer
A dynamically generated API explorer. Work in progress.
Site Index
A dynamically generated site index.
LISP Experiment
A cool example of how simple programming can be. An easily extensible LISP interpreter using JavaScript.
Personal Blog
A longstanding blog which tracks progress developing libjaypea, and some of my favorite findings. Data is managed via the CMS above.
Webcam and Microphone Test
A work in progress.
Java
Java is the language where I first had the chance to explore a wide variety of technical avenues.
You can find an assortment of organized, working projects in my javagasm repository.
I recreated one of my favorite old games in high school, Asteroids!
Download it here: asteroids.jar


* required fields
Model ID: *
Name of the model:
Description of the model:
* required fields
Insert reactions of the model:
* required fields
Insert compartments of the model:
* required fields
Insert species of the model:
* required fields
List of function definitions:
* required fields
Insert parameters of the model:
* required fields
Insert constraints of the model:


Amazon EMR Cluster InstanceFleetProvisioningSpecifications
The InstanceFleetProvisioningSpecifications
property specifies the launch specification for Spot instances in the fleet,
which determines the defined duration and provisioning timeout behavior.
InstanceFleetProvisioningSpecifications
is the property type for the LaunchSpecifications
property of the Amazon EMR
Cluster InstanceFleetConfig property type.
Note
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "SpotSpecification" : SpotProvisioningSpecification }
Properties
SpotSpecification
-
The launch specification for Spot instances in the fleet, which determines the defined duration and provisioning timeout behavior.
Required: Yes
Type: Amazon EMR Cluster SpotProvisioningSpecification
Update requires: No interruption


PREFACE
1. INTRODUCTION
2. INITIAL RESEARCH
3. THE CROSSING PROJECT
5. YIELD
6. DATA FIELD
7. CONTEXT
8. CONCLUSION
END NOTES
REFERENCES
Acknowledgements