ACCOUNT OWNER/CEO'S INFORMATION:
*Note: Account owner's user type will be General Manager (GM).
*Note: Please choose a strong password! Use upper- and
lower-case letters, numbers, AND symbols.
Almost done! When you're finished entering your details, click below.
(Note: You can start adding employee user accounts after you set up your own first.)


Decoding Aesthetic cultures
Studio Ghibli's Manga
10 visual elements and interaction dynamics:
Immersive realism . Tactile . Run cycle sequences . Mature . Magical . Characters often have large eyes (female characters usually have larger eyes than male characters) . Small noses . Childlike facial features in which they believe increases attractiveness . Nostalgic . Coming of age medium. Flat Shading
Studio Ghibli is the Japanese animation powerhouse, has cast its spell over wide-eyed anime audiences across four decades. Hayao Miyazaki the creator of studio Ghibli and believes in making the character’s emotions yours by the studio house’s major asset “immersive realism”(Cafolla, 2016).
Striking a balance between fantasy and reality is difficult, and something major animators aside from Ghibli strive to create. “Every visual element in the film must be created from scratch, there’s nothing there before it’s drawn. “Their animators demonstrate a mastery of technique and attention to detail with every single scene, to really bring the world of the storyteller’s mind to life.” So, no matter how far-fetched the story, the world of a Ghibli film “feels tactile and realistic” (Cafolla, 2016).
Hayao Miyazaki’s art style is unique, distinct and combines both Japanese (anime/manga) and American animation together. Many of his films are diversely stylized, mainly due to the fact that Miyazaki traveled to many different places as a child. He uses a mix of innovative animation techniques to produce amazing landscapes, scenery, and environmentalism (Cafolla, 2016).
The studio house’s style is never purely realistic nor fantastical. It is always consistent in its animation style and the characters never have proportional human like features (Cafolla, 2016).
Cafolla, A. (2016). What makes Studio Ghibli so magically immersive?. [online] Dazed. Available at: https://www.dazeddigital.com/artsandculture/article/33864/1/what-makes-studio-ghibli-so-magically-immersive [Accessed 29 Nov. 2016].


A switch behaves like a checkbox - it can be on or off (i.e checked or unchecked) - and under the hood, that's exactly what it is. Whereas checkboxes are often used to allow multi-selection from a group of choices, switches are more often used in isolation or as a series of unrelated options.
IMPORTANT: The example below shows the switch in isolation, without any label. Please see the field module for details on labelling controls. Remember: every switch requires a label!


Create custom ONNX graphs with AST#
Converting a scikit-learn pipeline is easy when the pipeline contains only pieces implemented in scikit-learn associated to a converter in sklearn-onnx. Outside this scenario, the conversion usually requires to write custom code either directly with onnx operators, either by writing a custom converter. This tutorial addresses a specific scenario involving an instance of FunctionTransformer.
Translation problem#
The following pipeline cannot be converted into ONNX when using the first examples of sklearn-onnx tutorial.
<<<
import numpy
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import FunctionTransformer, StandardScaler
from skl2onnx import to_onnx
log_scale_transformer = make_pipeline(
FunctionTransformer(numpy.log, validate=False),
StandardScaler())
X = numpy.random.random((5, 2))
log_scale_transformer.fit(X)
print(log_scale_transformer.transform(X))
# Conversion to ONNX
try:
onx = to_onnx(log_scale_transformer, X)
except (RuntimeError, TypeError) as e:
print(e)
>>>
[[ 1.106 0.633]
[-1.305 0.143]
[ 0.259 -1.03 ]
[-1.031 1.447]
[ 0.971 -1.193]]
FunctionTransformer is not supported unless the transform function is of type <class 'numpy.ufunc'> wrapped with onnxnumpy.
The first step is a FunctionTransformer with a custom function written with numpy functions. The pipeline can be converted only if the function given to this object as argument can be converted into ONNX. Even if function numpy.log does exist in ONNX specifications (see ONNX Log), this problem is equivalent to a translation from a language, Python, to another one, ONNX.
Translating numpy to ONNX with AST#
The first approach was to use module ast to convert a function into a syntax tree and then try to convert every node into ONNX to obtain an equivalent ONNX graph.
mlprodict implements function
translate_fct2onnx
which converts the code
of a function written with numpy and scipy
into an ONNX graph.
The kernel ExpSineSquared is used by sklearn.gaussian_process.GaussianProcessRegressor and its conversion is required to convert the model. The first step is to write a standalone function which relies on scipy or numpy and which produces the same results. The second step calls this function to produces the ONNX graph.
<<<
import numpy
from scipy.spatial.distance import squareform, pdist
from sklearn.gaussian_process.kernels import ExpSineSquared
from mlprodict.onnx_tools.onnx_grammar import translate_fct2onnx
from mlprodict.onnx_tools.onnx_grammar.onnx_translation import (
squareform_pdist, py_make_float_array)
from mlprodict.onnxrt import OnnxInference
# The function to convert into ONNX.
def kernel_call_ynone(X, length_scale=1.2, periodicity=1.1,
pi=3.141592653589793, op_version=15):
# squareform(pdist(X, ...)) in one function.
dists = squareform_pdist(X, metric='euclidean')
# Function starting with 'py_' --> must not be converted into ONNX.
t_pi = py_make_float_array(pi)
t_periodicity = py_make_float_array(periodicity)
# This operator must be converted into ONNX.
arg = dists / t_periodicity * t_pi
sin_of_arg = numpy.sin(arg)
t_2 = py_make_float_array(2)
t__2 = py_make_float_array(-2)
t_length_scale = py_make_float_array(length_scale)
K = numpy.exp((sin_of_arg / t_length_scale) ** t_2 * t__2)
return K
# This function is equivalent to the following kernel.
kernel = ExpSineSquared(length_scale=1.2, periodicity=1.1)
x = numpy.array([[1, 2], [3, 4]], dtype=float)
# Checks that the new function and the kernel are the same.
exp = kernel(x, None)
got = kernel_call_ynone(x)
print("ExpSineSquared:")
print(exp)
print("numpy function:")
print(got)
# Converts the numpy function into an ONNX function.
fct_onnx = translate_fct2onnx(kernel_call_ynone, cpl=True,
output_names=['Z'])
# Calls the ONNX function to produce the ONNX algebric function.
# See below.
onnx_model = fct_onnx('X')
# Calls the ONNX algebric function to produce the ONNX graph.
inputs = {'X': x.astype(numpy.float32)}
onnx_g = onnx_model.to_onnx(inputs, target_opset=15)
# Creates a python runtime associated to the ONNX function.
oinf = OnnxInference(onnx_g)
# Compute the prediction with the python runtime.
res = oinf.run(inputs)
print("ONNX output:")
print(res['Z'])
# Displays the code of the algebric function.
print('-------------')
print("Function code:")
print('-------------')
print(translate_fct2onnx(kernel_call_ynone, output_names=['Z']))
>>>
ExpSineSquared:
[[1. 0.267]
[0.267 1. ]]
numpy function:
[[1. 0.267]
[0.267 1. ]]
ONNX output:
[[1. 0.267]
[0.267 1. ]]
-------------
Function code:
-------------
def kernel_call_ynone(X, length_scale=1.2, periodicity=1.1, pi=3.141592653589793, op_version=15, dtype=numpy.float32):
_onnx_squareform_pdist = lambda *args, op_version=op_version, **kwargs: onnx_squareform_pdist(*args, dtype=dtype, op_version=op_version, **kwargs)
dists = (
_onnx_squareform_pdist(
X,
metric="euclidean",
op_version=op_version
)
)
t_pi = (
py_make_float_array(
pi,
op_version=op_version
)
)
t_periodicity = (
py_make_float_array(
periodicity,
op_version=op_version
)
)
arg = (
OnnxMul(
OnnxDiv(
dists,
t_periodicity,
op_version=op_version
),
t_pi,
op_version=op_version
)
)
sin_of_arg = (
OnnxSin(
arg,
op_version=op_version
)
)
t_2 = (
py_make_float_array(
2,
op_version=op_version
)
)
t__2 = (
py_make_float_array(
-2,
op_version=op_version
)
)
t_length_scale = (
py_make_float_array(
length_scale,
op_version=op_version
)
)
K = (
OnnxExp(
OnnxMul(
OnnxPow(
OnnxDiv(
sin_of_arg,
t_length_scale,
op_version=op_version
),
t_2,
op_version=op_version
),
t__2,
op_version=op_version
),
op_version=op_version
)
)
return OnnxIdentity(
K,
output_names=['Z'],
op_version=op_version
)
The output of function
translate_fct2onnx
is not an ONNX graph but the code of a function which
produces an ONNX graph. That’s why the function is called
twice. The first call compiles the code and a returns a new
python function. The second call starts all over but
returns the code instead of its compiled version.
This approach has two drawback. The first one is not every function can be converted into ONNX. That does not mean the algorithm could not be implemented with ONNX operator. The second drawback is discrepencies. They should be minimal but still could happen between a numpy and ONNX implementations.
From ONNX to Python#
The Python Runtime can be optimized by generating
custom python code and dynamically compile it.
OnnxInference
computes predictions based on an ONNX graph with a
python runtime or onnxruntime.
Method to_python
goes further by converting the ONNX graph into a standalone
python code. All operators may not be implemented.
Another tool is implemented in onnx2py.py and converts an ONNX graph into a python code which produces this graph.
Numpy API for ONNX#
This approach fixes the two issues mentioned above. The goal is write a code using the same function as numpy offers but executed by an ONNX runtime. The full API is described at Complete Numpy API for ONNX and introduced here. This section is developped in notebook numpyapionnxrst and Numpy to ONNX: Create ONNX graphs with an API similar to numpy.


| Class | Description |
|---|---|
| ApiUtils |
Utility functions to reduce boilerplate when developing HTTP APIs
|
| Emoji |
A simple wrapper class that contains icons and support for printing them only when we're connected to a terminal.
|
| LogHelper |
A configuration helper that allows modifying the log level for specific loggers
|
| LoggingKt | |
| NonEmptySet<T> |
A set which is constrained to ensure it can never be empty. An initial value must be provided at
construction, and attempting to remove the last element will cause an IllegalStateException.
The underlying set is exposed for Kryo to access, but should not be accessed directly.
|
| NonEmptySetKt | |
| NonEmptySetSerializer |
Custom serializer which understands it has to read in an item before
trying to construct the set.
|
| ProgressTracker |
A progress tracker helps surface information about the progress of an operation to a user interface or API of some
kind. It lets you define a set of steps that represent an operation. A step is represented by an object (typically
a singleton).
|
| TestConstants | |
| TimeWindow |
A class representing a window in time from a particular instant, lasting a specified duration.
|
| UntrustworthyData<T> |
A small utility to approximate taint tracking: if a method gives you back one of these, it means the data came from
a remote source that may be incentivised to pass us junk that violates basic assumptions and thus must be checked
first. The wrapper helps you to avoid forgetting this vital step. Things you might want to check are:
|


23 May 2003
Disease Outbreak Reported
The Department of Health has reported a cholera outbreak in the Mpumalanga region. From 26 April to 18 May, the cumulative number of suspected and confirmed cholera cases is 174 with 3 deaths (case fatality ratio 1.7%). The outbreak has included 27 areas bordering Swaziland and Mozambique, with Tonga being the most affected area.
A team from the Department of Health, joined by a medical officer from the WHO country office, has travelled to Mpumalanga to assess the situation and make recommendations to contain the outbreak.
This is the third province after Eastern Cape and Kwazulu-Natal to report a cholera outbreak this year. From 1 January to 28 March 2003, the cumulative number of reported cholera cases in South Africa is 2362.


{% extends "base.html" %} {% block main %}
Invalid message type specified.
Your message has been sent. Thank you.


|
Walking Simulator
Assessment for Cross-platform development at the AiE
|
Static Public Member Functions | |
| static void | change_collected_status (GameObject obj, Declarations.collect_status update_status_to) |
| static int | collected_amount () |
| static void | late_add (GameObject obj, Declarations.collect_status status) |
Static Public Attributes | |
| static crystal_manager | _crystal_manager |
Manager class for crystals in the game scene with functions that can be used staticly to modify the data of the manager
|
static |
Change the collected status of the crystal in the list
| GameObject | Object of a crystal |
| collect_status | Status to update the crystal too |
|
static |
Get the amount of collected crystals
|
static |
Add a crystal to the crystal manager manually
| GameObject | Object of a crystal |
| collect_status | Status to set the crystal too |
|
static |
Static crystal manager object


PageNodeCurrently defines all currently
functions of PageNode.
PageNode for which PageNodeCurrently defines all currently
functions
the PageNode for which PageNodeCurrently defines all currently
functions
returns the negated variants of PageElementGroupCurrently's state check functions
Returns true if the actual direct texts of all PageNodes managed by PageElementGroup currently do not contain the expected direct texts.
A direct text is a text that resides on the level directly below the selected HTML element. It does not include any text of the HTML element's nested children HTML elements.
the expected direct texts supposed not to be contained in the actual direct texts
Returns true if the actual texts of all PageNodes managed by PageElementGroup currently do not contain the expected texts.
the expected texts supposed not to be contained in the actual texts
Returns true if all PageNodes managed by PageElementGroup currently do not exist.
can be used to skip the invocation of the exists
function for some or all managed
PageNodes
Returns true if all PageNodes managed by PageElementGroup currently do not have any direct text.
A direct text is a text that resides on the level directly below the selected HTML element. It does not include any text of the HTML element's nested children HTML elements.
can be used to skip the invocation of the hasAnyDirectText
function for some or all managed
PageNodes
Returns true if all PageNodes managed by PageElementGroup currently do not have any text.
can be used to skip the invocation of the hasAnyText
function for some or all managed
PageNodes
Returns true if the actual direct texts of all PageNodes managed by PageElementGroup currently do not equal the expected direct texts.
A direct text is a text that resides on the level directly below the selected HTML element. It does not include any text of the HTML element's nested children HTML elements.
the expected direct texts supposed not to equal the actual direct texts
Returns true if the actual texts of all PageNodes managed by PageElementGroup currently do not equal the expected texts.
the expected texts supposed not to equal the actual texts
Returns true if all PageNodes managed by PageElementGroup are currently not enabled.
can be used to skip the invocation of the isEnabled
function for some or all managed
PageNodes
Returns true if all PageNodes managed by PageElementGroup are currently not visible.
can be used to skip the invocation of the isVisible
function for some or all managed
PageNodes
Returns true if the actual direct texts of all PageNodes managed by PageElementGroup currently contain the expected direct texts.
A direct text is a text that resides on the level directly below the selected HTML element. It does not include any text of the HTML element's nested children HTML elements.
the expected direct texts supposed to be contained in the actual direct texts
Returns true if the actual texts of all PageNodes managed by PageElementGroup currently contain the expected texts.
the expected texts supposed to be contained in the actual texts
Returns true if all PageNodes managed by PageElementGroup currently exist.
can be used to skip the invocation of the exists
function for some or all managed
PageNodes
Returns the current 'containsDirectText' status of all PageNodes managed by PageElementGroup as a result structure.
A PageNode's 'containsDirectText' status is set to true if its actual direct text contains the expected direct text.
A direct text is a text that resides on the level directly below the selected HTML element. It does not include any text of the HTML element's nested children HTML elements.
the expected direct texts used in the comparisons which set the 'containsDirectText' status
Returns the current 'containsText' status of all PageNodes managed by PageElementGroup as a result structure.
A PageNode's 'containsText' status is set to true if its actual text contains the expected text.
the expected texts used in the comparisons which set the 'containsText' status
Returns the current direct texts of all PageNodes managed by PageElementGroup as a result structure.
A direct text is a text that resides on the level directly below the selected HTML element. It does not include any text of the HTML element's nested children HTML elements.
can be used to skip the invocation of the getDirectText
function for some or all managed
PageNodes. The results of skipped function invocations are not included in the total results structure.
Returns the current 'exists' status of all PageNodes managed by PageElementGroup as a result structure.
can be used to skip the invocation of the getExists
function for some or all managed
PageNodes. The results of skipped function invocations are not included in the total results structure.
Returns the current 'hasAnyDirectText' status of all PageNodes managed by PageElementGroup as a result structure.
A PageNode's 'hasAnyDirectText' status is set to true if the PageNode has any direct text.
A direct text is a text that resides on the level directly below the selected HTML element. It does not include any text of the HTML element's nested children HTML elements.
can be used to skip the invocation of the getHasAnyDirectText
function for some or all managed
PageNodes. The results of skipped function invocations are not included in the total results structure.
Returns the current 'hasAnyText' status of all PageNodes managed by PageElementGroup as a result structure.
A PageNode's 'hasAnyText' status is set to true if the PageNode has any text.
can be used to skip the invocation of the getHasAnyText
function for some or all managed
PageNodes. The results of skipped function invocations are not included in the total results structure.
Returns the current 'hasDirectText' status of all PageNodes managed by PageElementGroup as a result structure.
A PageNode's 'hasDirectText' status is set to true if its actual direct text equals the expected direct text.
A direct text is a text that resides on the level directly below the selected HTML element. It does not include any text of the HTML element's nested children HTML elements.
the expected direct texts used in the comparisons which set the 'hasDirectText' status
Returns the current 'hasText' status of all PageNodes managed by PageElementGroup as a result structure.
A PageNode's 'hasText' status is set to true if its actual text equals the expected text.
the expected texts used in the comparisons which set the 'hasText' status
Returns the current 'enabled' status of all PageNodes managed by PageElementGroup as a result structure.
can be used to skip the invocation of the getIsEnabled
function for some or all managed
PageNodes. The results of skipped function invocations are not included in the total results structure.
Returns the current 'visible' status of all PageNodes managed by PageElementGroup as a result structure.
can be used to skip the invocation of the getIsVisible
function for some or all managed
PageNodes. The results of skipped function invocations are not included in the total results structure.
Returns the current texts of all PageNodes managed by PageElementGroup as a result structure.
can be used to skip the invocation of the getText
function for some or all managed
PageNodes. The results of skipped function invocations are not included in the total results structure.
Returns true if all PageNodes managed by PageElementGroup currently have any direct text.
A direct text is a text that resides on the level directly below the selected HTML element. It does not include any text of the HTML element's nested children HTML elements.
can be used to skip the invocation of the hasAnyDirectText
function for some or all managed
PageNodes
Returns true if all PageNodes managed by PageElementGroup currently have any text.
can be used to skip the invocation of the hasAnyText
function for some or all managed
PageNodes
Returns true if the actual direct texts of all PageNodes managed by PageElementGroup currently equal the expected direct texts.
A direct text is a text that resides on the level directly below the selected HTML element. It does not include any text of the HTML element's nested children HTML elements.
the expected direct texts supposed to equal the actual direct texts
Returns true if the actual texts of all PageNodes managed by PageElementGroup currently equal the expected texts.
the expected texts supposed to equal the actual texts
Returns true if all PageNodes managed by PageElementGroup are currently enabled.
can be used to skip the invocation of the isEnabled
function for some or all managed
PageNodes
Returns true if all PageNodes managed by PageElementGroup are currently visible.
can be used to skip the invocation of the isVisible
function for some or all managed
PageNodes
Generated using TypeDoc
This class defines all
currently
functions of PageElementGroup.Store type of the PageNodeStore instance which can be used to retrieve/create PageNodes
Content an arbitrary object structure of PageNode instances as values and the names used to identify these PageNodes as keys
GroupType type of the PageElementGroup for which PageElementGroupCurrently defines all
currently
functions


This is the offline version of the documentation. We recommend you to use the online documentation.
Import 3D data
Game4Automation professional is including CADLink for importing CAD data. Please check section CADLink. With CADLink you can import CAD files from any CAD system which is able to export Step or 3MF files.
Another option for importing 3D data is to use the PIXYZ plugin see https://www.pixyz-software.com/. Game4Automation Professional is including an advance PIXYZ import and update mechanism. Please check section PIXYZ Import and update for more information about this..
© 2019 in2Sight GmbH https://game4automation.com - All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including printing, saving, photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher.


initialize Helm on both client and server
This command installs Tiller (the Helm server-side component) onto your Kubernetes Cluster and sets up local configuration in $HELM_HOME (default ~/.helm/).
As with the rest of the Helm commands, ‘helm init’ discovers Kubernetes clusters by reading $KUBECONFIG (default ‘~/.kube/config’) and using the default context.
To set up just a local environment, use ‘–client-only’. That will configure $HELM_HOME, but not attempt to connect to a Kubernetes cluster and install the Tiller deployment.
When installing Tiller, ‘helm init’ will attempt to install the latest released version. You can specify an alternative image with ‘–tiller-image’. For those frequently working on the latest code, the flag ‘–canary-image’ will install the latest pre-release version of Tiller (e.g. the HEAD commit in the GitHub repository on the master branch).
To dump a manifest containing the Tiller deployment YAML, combine the ‘–dry-run’ and ‘–debug’ flags.
helm init [flags]
--canary-image use the canary Tiller image
-c, --client-only if set does not install Tiller
--dry-run do not install local or remote
--force-upgrade force upgrade of Tiller to the current helm version
-h, --help help for init
--history-max int limit the maximum number of revisions saved per release. Use 0 for no limit.
--local-repo-url string URL for local repository (default "http://<IP_ADDRESS>:8879/charts")
--net-host install Tiller with net=host
--node-selectors string labels to specify the node on which Tiller is installed (app=tiller,helm=rocks)
-o, --output OutputFormat skip installation and output Tiller's manifest in specified format (json or yaml)
--override stringArray override values for the Tiller Deployment manifest (can specify multiple or separate values with commas: key1=val1,key2=val2)
--replicas int amount of tiller instances to run on the cluster (default 1)
--service-account string name of service account
--skip-refresh do not refresh (download) the local repository cache
--stable-repo-url string URL for stable repository (default "https://kubernetes-charts.storage.googleapis.com")
-i, --tiller-image string override Tiller image
--tiller-tls install Tiller with TLS enabled
--tiller-tls-cert string path to TLS certificate file to install with Tiller
--tiller-tls-key string path to TLS key file to install with Tiller
--tiller-tls-verify install Tiller with TLS enabled and to verify remote certificates
--tls-ca-cert string path to CA root certificate
--upgrade upgrade if Tiller is already installed
--wait block until Tiller is running and ready to receive requests
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--kubeconfig string absolute path to the kubeconfig file to use
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system")


1. Introduction
This section is non-normative.
Media is used extensively today on the web to play a variety of different types of content. It is often used to play music, podcasts and radio content. At other times web media is used to provide background music, sound effects, notification sounds and to render WebRTC media stream content.
When playing media on the web, developers are currently forced to adopt a single default platform modality for playing all media content. On the other hand, native applications can access much richer media integration options with an underlying platform. On mobile devices, native application developers can request many different forms of media integration with the platform to obtain access to headphone buttons, lock screens and notification areas as needed. On desktop devices, native applications have access to keyboard media key events. Native application developers can specify the conditions in which media content should pause or duck on audio interruptions (i.e. pause or lower the volume for the duration of an interruption), continue playing out when application focus is lost or the device screen is switched off and interface with internal and external remote controllers.
This specification provides these platform media integration features for web media. By allowing web developers to express the intended usage of their media content, user agents can supply the most suitable platform-level interactions for that content and enforce logical interoperation behavior on the current platform between any number of different sources of media.
This specification describes the mechanism that allows web developers to specify the most appropriate category for their media content and for user agents to then use these supplied hints to enforce how different sources of web media should interact with each other, other native media content and the underlying platform.
2. Conformance
All diagrams, examples, and notes in this specification are non-normative, as are all sections explicitly marked non-normative. Everything else in this specification is normative.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119. For readability, these words do not appear in all uppercase letters in this specification. [RFC2119]
Requirements phrased in the imperative as part of algorithms (such as "strip any leading space characters" or "return false and terminate these steps") are to be interpreted with the meaning of the key word ("must", "should", "may", etc) used in introducing the algorithm.
Conformance requirements phrased as algorithms or specific steps may be implemented in any manner, so long as the end result is equivalent. (In particular, the algorithms defined in this specification are intended to be easy to follow, and not intended to be performant.)
User agents may impose implementation-specific limits on otherwise unconstrained inputs, e.g. to prevent denial of service attacks, to guard against running out of memory, or to work around platform-specific limitations.
When a method or an attribute is said to call another method or attribute, the user agent must invoke its internal API for that attribute or method so that e.g. the author can’t change the behavior by overriding attributes or methods with custom properties or functions in JavaScript.
Unless otherwise stated, string comparisons are done in a case-sensitive manner.
3. Dependencies
The IDL fragments in this specification must be interpreted as required for conforming IDL fragments, as described in the Web IDL specification. [WEBIDL]
4. Media sessions
A media session represents one or more audio-producing objects within the same top-level browsing context that share the same media session category. Each media session then defines the interactions of its audio-producing objects with both the underlying platform and other audio-producing objects belonging to other media sessions within the user agent.
A media session may have a media remote controller that provides access to media remote controls. A media remote controller can be used to request particular media key access and respond to hardware or software remote control events. Such events may be triggered by e.g. keyboard media keys, headphone buttons, remote controller buttons or notification and lock screen media buttons.
A media session may have associated media session metadata that can consist of title, artist name, album name, artwork URL and artwork resource.
To create a media session, given a media session category,
run these steps:
- Let media session be a new media session.
-
Set media session’s current media session type to the
corresponding media session type of media session
category. If no corresponding media session type can be found
for the provided
media session category or media session category is
empty, then set media session’s
current media session type to "
content
". -
If media session’s current media session type is
"
content
", then create a new media remote controller for media session. (Otherwise media session has no media remote controller.) -
Set media session’s current state to
idle
. - Return media session.
4.1. States
A media session has a current state that describes its current status with respect to any platform-level interactions and interactions with other media sessions. The possible values are as follows:
-
idle
- The media session does not have any platform-level media focus nor is it in a suspended state.
-
active
- The media session currently has platform-level media focus.
-
interrupted
- The media session is currently suspended from having platform-level media focus and its active audio-producing participants are either paused or ducked based on the media session’s current media session type.
4.2. Types
A media session category is a keyword that maps to a well-defined interaction state for a media session – called its media session type – that user agents use to enforce platform-specific interaction and interoperation between media content.
A media session has a current media session type that is set when a new media session is created.
The following table lists the available media session categories keywords and their corresponding media session type states — the keywords in the left column map to the states in the cell in the second column on the same row as the keyword. Media session categories and media session types should be used based on their preferred definitions in the table’s third and fourth columns.
| Category | State | Definition | Examples |
|---|---|---|---|
"content "
| Content |
| Music, podcasts, radio streams. |
"transient "
| Transient |
| Notification sounds. Spoken driving directions where playback of music in the background is acceptable. |
"transient-solo "
| Transient Solo |
| Playback of driving directions. Other spoken notifications. |
"ambient "
| Ambient |
| UI sounds. In-game sound effects and background music. |
" " (empty
string)
| Default |
| Legacy media content |
4.3. Participants
An audio-producing object is any object or element that is capable of emitting sound within the user agent and is therefore also potentially capable of interacting with the media focus system available in different underlying platforms.
Initially the term audio-producing objects
is taken to only refer to media element objects. In the future it may
be possible to extend this specification to allow e.g. AudioContext
objects to also be attached to a media session as audio-producing
objects.
A media session may have one or more audio-producing objects attached to it; called its audio-producing participants. A media session must keep a list of active audio-producing participants that consists of zero of more audio-producing objects.
Audio-producing participants are attached to a media session when they are invoked; at that point becoming one of media session’s active audio-producing participants. Audio-producing participants are detached from a media session when they are released; at that point no longer being one of media session’s active audio-producing participants.
When the user agent is to pause a given audio-producing object it must run the following steps:
-
If audio-producing object is not a media element then
terminate these steps.
This algorithm currently only supports audio-producing objects that are media elements.
- Pause media element audio-producing object.
When the user agent is to indefinitely pause a given audio-producing object, the user agent must pause audio-producing object and, then proceed to remove it from its current media session’s list of active audio-producing participants.
When the user agent is to unpause a given audio-producing object it must run the following steps:
-
If audio-producing object is not a media element then
terminate these steps.
This algorithm currently only supports audio-producing objects that are media elements.
- Unpause media element audio-producing object.
When an audio-producing object is to duck the user agent must ensure its output volume is lowered.
When an audio-producing object is to unduck the user agent should restore its output volume to the same level that was observed prior to the original corresponding duck request.
When an audio-producing object is ducked any reduction in volume applied by the user agent is not intended to be observable to web pages.
4.4. Resources
The fetch steps for a given media session media session are:
-
If the platform supports displaying media artwork, fetch
media session’s artwork URL, if artwork URL is set.
Then, in parallel:
- Wait for the response.
- If the response’s internal response’s type is default, attempt to decode the resource as image.
- If the image format is supported, set media session’s artwork resource to the decoded resource. (Otherwise media session has no artwork resource.)
4.5. Lifecycle
When creating a new media session a media
session’s current state is initially set to idle
.
When the media session invocation algorithm is run a media
session’s current state may be set from idle
to
active
.
When the media session interruption algorithm is run a media
session’s current state may be set from
active
to either idle
or interrupted
depending on its associated media
session category.
When the media session continuation algorithm is run a media
session’s current state may be set from interrupted
to active
.
When the media session release algorithm is run a media session’s
current state
may be set from either active
or interrupted
to
idle
.
4.5.1. Activating a media session
The media session invocation algorithm takes one argument, media session, and consists of the following steps:
-
If media session is already
active
, then return success. -
Optionally, based on platform conventions, request the most appropriate
platform-level media focus for media session based on its
current media session type.
If this step is run and platform-level media focus can not be obtained for any reason, then return failure.
-
Run these substeps:
-
If media session’s current media session type is
Content
-
- Optionally, based on platform conventions, the user agent may show an ongoing media interface in the underlying platform’s notifications area and/or show an ongoing media interface in the underlying platform’s lock screen area for media session based on its media remote controller, if any, and using any available media session metadata.
- Optionally, based on platform conventions, the user agent may allow hardware and/or software media keys to control playback of media session’s active audio-producing participants based on its media remote controller, if any.
-
If media session’s current media session type is
Transient
orTransient Solo
-
The user agent should not provide user access to any hardware or
software media keys and not display any ongoing media interface in the
underlying platform’s notifications area or show any ongoing media
interface in the underlying platform’s lock screen area for
Transient
orTransient Solo
-based media sessions. -
If media session’s current media session type is
Ambient
-
If media session’s top-level browsing context is not
at least partially visible on at least one screen, then return failure.
The user agent should not provide user access to any hardware or software media keys and not display any ongoing media interface in the underlying platform’s notifications area or show any ongoing media interface in the underlying platform’s lock screen area for
Ambient
-based media sessions.
-
If media session’s current media session type is
-
Set media session’s current state to
active
, then return success.
4.5.2. Interrupting a media session
A media session may be interrupted at any time after its media session invocation algorithm has been run. This typically occurs when another application or another media session requests and is granted a level of platform media focus that affects the media session based on its current media session type.
Interruptions can be both transient or permanent. A transient interruption means we can either choose to duck our media content and continue playing it out at a reduced volume for the duration of the interruption; or pause our media content for the duration of the interruption and, then, resume playback when that interruption ends. A permanent interruption means we must pause our media content indefinitely.
When a start-of-interruption notification event is received from the platform, then the user agent must run the media session interruption algorithm against all known media sessions, passing in each media session as media session.
The media session interruption algorithm takes one argument, media session, and consists of the following steps.
-
If media session’s current state is not
active
, then terminate these steps. -
Let interrupting media session category be the media session
category that triggered this interruption. If this interruption has no
known
media session category, let interrupting media session
category be
Default
. -
Run these substeps:
-
If interrupting media session category is
Content
-
-
If media session’s current media session type is
Default
orContent
then indefinitely pause all of media session’s active audio-producing participants and set media session’s current state toidle
.This implies that the next time the media session invocation algorithm is run against media session that we will re-request media focus according to the steps defined in that algorithm.
- Optionally, based on platform conventions, the user agent must remove any previously established ongoing media interface in the underlying platform’s notifications area and any ongoing media interface in the underlying platform’s lock screen area for media session, if any.
- Optionally, based on platform conventions, the user agent must prevent any hardware and/or software media keys from controlling playback of media session’s active audio-producing participants.
-
If media session’s current media session type is
-
If interrupting media session category is
Transient
-
-
If media session’s current media session type is
Default
orContent
then duck all of media session’s active audio-producing participants and set media session’s current state tointerrupted
.This implies that the next time the media session continuation algorithm is run for media session that we will re-activate this media session according to the steps defined in that algorithm.
-
If media session’s current media session type is
-
If interrupting media session category is
Transient Solo
-
-
If media session’s current media session type is
Default
,Content
,Transient
orTransient Solo
then pause all of media session’s active audio-producing participants and set current media session’s current state tointerrupted
.This implies that the next time the media session invocation algorithm is run against media session that we will re-request media focus according to the steps defined in that algorithm.
It also implies that the next time the media session continuation algorithm is run against media session that we will re-activate this media session according to the steps defined in that algorithm.
-
If media session’s current media session type is
-
If interrupting media session category is
When an end-of-interruption notification event is received from the platform, then the user agent must run the media session continuation algorithm against all known media sessions, passing in each media session as media session.
The media session continuation algorithm takes one argument, media session, and consists of the following steps.
-
If media session’s current state is not
interrupted
, then terminate these steps. -
Let interrupting media session category be the media session
category that initially triggered this interruption. If this
interruption has no known media session category, let
interrupting media session category be
Default
. -
Run these substeps:
-
If interrupting media session category is
Transient
-
-
If media session’s current media session type is
Default
orContent
, then unduck all of media session’s active audio-producing participants and set media session’s current state toactive
.
-
If media session’s current media session type is
-
If interrupting media session category is
Transient Solo
-
-
If media session’s current media session type is
Default
,Content
,Transient
, orTransient Solo
, then unpause the media session’s active audio-producing participants and set media session’s current state toactive
.
-
If media session’s current media session type is
-
If interrupting media session category is
After a visibilitychange
event [PAGE-VISIBILITY] has been fired at a
top-level browsing context, known as the browsing context, the
user agent must run the following steps:
-
If
visibilityState
is not "hidden
" or "visible
" [PAGE-VISIBILITY], then terminate these steps. -
For each media session, known as s, in the browsing
context with an current media session type of
Ambient
run the following substeps:-
If
visibilityState
is "hidden
" [PAGE-VISIBILITY] and s’s current state isactive
, then pause all of s’s active audio-producing participants and set s’s current state tointerrupted
, then terminate these substeps and continue at the next available s. -
If
visibilityState
is "visible
" [PAGE-VISIBILITY] and s’s current state isinterrupted
, then unpause all of s’s active audio-producing participants and set s’s current state toactive
, then terminate these substeps and continue at the next available s.
-
If
4.5.3. Releasing a media session
The media session release algorithm takes one argument, media session, and consists of the following steps.
-
If media session’s current state is
idle
, then terminate these steps. - If media session still has one or more active audio-producing participants, then terminate these steps.
- Optionally, based on platform conventions, the user agent must release any currently held platform media focus for media session.
- Optionally, based on platform conventions, the user agent must remove any previously established ongoing media interface in the underlying platform’s notifications area and any ongoing media interface in the underlying platform’s lock screen area for media session, if any.
-
Optionally, based on platform conventions, the user agent must prevent any
hardware and/or software media keys from controlling playback of
media session’s
active audio-producing participants.
If the algorithm reaches this step then media session can not have any active audio-producing participants.
-
Set media session’s current state to
idle
.This implies that the next time the media session invocation algorithm is run against media session that we will re-request media focus according to the steps defined in that algorithm.
5. API
5.1. The MediaSession
interface
[Constructor(optional MediaSessionKind kind)] interface MediaSession { readonly attribute MediaRemoteControls? controls; void setMetadata(MediaMetadata metadata); void release(); }; enum MediaSessionKind { "content", "transient", "transient-solo", "ambient" }; dictionary MediaMetadata { DOMString title = ""; DOMString artist = ""; DOMString album = ""; USVString artwork; };
MediaSession
objects are simply known as media sessions.
5.1.1. Garbage collection
A MediaSession
object must not be garbage collected while its corresponding
media session is attached to at least one audio-producing object.
Additionally, a MediaSession
object must not be garbage collected while it
has a
media remote controller and that object has an event listener
whose
type is previoustrack
,
nexttrack
, seekforward
or seekbackward
.
5.1.2. Constructors
-
session = new MediaSession([kind])
-
Returns a new
MediaSession
object.
The MediaSession(kind) constructor, when invoked, must run these steps:
- Let media session be the result of creating a media session given kind.
-
Let s be a new
MediaSession
object associated with media session. - Return s.
5.1.3. Object members
-
session .
controls
- Returns the media remote controller assigned to the media session, if any.
The controls
attribute must return the media remote controller that was assigned to a
media session when it was created. If media session’s current
media session type is not "content
", then this attribute should return null.
-
session .
setMetadata(metadata)
-
Provides the user agent with meta data to use when a media session is
showing media control interfaces (e.g. in an OS-level notification area or
on a lock screen).
The metadata argument allows for setting a media session’s current meta data via object members. These are the object members that can be used:
-
title
- The title to display for the media session, if any.
-
artist
- The artist name to display for the media session, if any.
-
album
- The album name to display for the media session, if any.
-
artwork
- The artwork URL for an image resource to display for the media session, if any.
-
When the setMetadata(metadata)
method is invoked, the user agent must run the following steps:
- Let media session be the current media session.
- Let baseURL be the API base URL specified by the entry settings object.
-
Set media session’s title to
metadata’s
title
. -
Set media session’s artist name to metadata’s
artist
. -
Set media session’s album name to metadata’s
album
. -
If metadata’s
artwork
is present, parse it using baseURL, and if that does not return failure, set media session’s artwork URL to the return value. (Otherwise artwork URL is not set.) - Run the fetch steps for media session.
-
session .
release()
-
Releases platform-level media focus, sets the media session’s
current state to
idle
and applies any changes necessary to its active audio-producing participants.
When the release()
method is invoked, the user agent
must run the following steps:
- Let media session be the current media session.
- Indefinitely pause all of media session’s active audio-producing participants.
- Reset media session’s active audio-producing participants to an empty list.
- Run the media session release algorithm for media session.
5.2. The MediaRemoteControls
interface
interface MediaRemoteControls : EventTarget { attribute boolean previousTrackEnabled; attribute boolean nextTrackEnabled; attribute boolean seekForwardEnabled; attribute boolean seekBackwardEnabled; // Event handlers attribute EventHandler onprevioustrack; attribute EventHandler onnexttrack; attribute EventHandler onseekforward; attribute EventHandler onseekbackward; };
Objects implementing the MediaRemoteControls
interface are simply known as
media remote controls.
5.2.1. Object members
-
controls .
previousTrackEnabled
- Determines if a user can interact with a 'previous track' button.
-
controls .
nextTrackEnabled
- Determines if a user can interact with a 'next track' button.
-
controls .
seekForwardEnabled
- Determines if a user can interact with a 'seek forward' button.
-
controls .
seekBackwardEnabled
- Determines if a user can interact with a 'seek backward' button.
The previousTrackEnabled
attribute is intended to provide a hint that the user agent should enable a
'previous track' button for users in all applicable hardware or software remote
control interfaces. By default, this attribute is false.
The nextTrackEnabled
attribute is intended to provide a hint that the user agent should enable a
'next track' button for users in all applicable hardware or software remote
control interfaces. By default, this attribute is false.
The seekBackwardEnabled
attribute is intended to provide a hint that the user agent should enable a
'seek backward' button for users in all applicable hardware or software remote
control interfaces. By default, this attribute is false.
The seekForwardEnabled
attribute is intended to provide a hint that the user agent should enable a
'seek forward' button for users in all applicable hardware or software remote
control interfaces. By default, this attribute is false.
While the attributes above can be set at any time they must only be read by
the user agent during the media session invocation algorithm in order
to correctly configure any connected remote control interfaces at the point
they become active
.
A user agent is not required to always implement each of these buttons
separately in an ongoing notification area or lock screen interface. For
example, if both nextTrackEnabled
and
seekForwardEnabled
are set to true, the user agent may
present a single unified button. When short-pressed this button may trigger a
nexttrack
event to be fired. When
long-pressed this same button may trigger a seekforward
event to be fired. The exact
notification and lock screen interfaces required to acheive this interaction
are left up to implementers.
5.2.2. Event handlers
The following are the event handlers (and their corresponding event
handler event types) that must be supported, as IDL attributes, by all
objects implementing the MediaRemoteControls
interface:
| Event handler | Event handler event type |
|---|---|
onprevioustrack
|
previoustrack
|
onnexttrack
|
nexttrack
|
onseekbackward
|
seekbackward
|
onseekforward
|
seekforward
|
The task source for the tasks listed in this section is the DOM manipulation task source.
When the user presses the MediaPlayPause
media key, or an equivalent key, on
any hardware or software interface (e.g. on a keyboard or OS-level button) then
the user agent must, for each media session known by the user agent, run
the following steps:
- Let m be the media session.
-
If m’s current media session type
is not
Default
orContent
; or m’s current state is notactive
, then terminate these steps. - For each active audio-producing participant in m, called active element, run the following substeps:
When the user presses the MediaTrackPrevious
media key, or an equivalent
key, on any hardware or software interface (e.g. on a keyboard or OS-level
button), then the user agent must, for each
Content
-based media session
that is currently active
,
has a media remote controller with its
previousTrackEnabled
attribute set to true,
queue a task to fire a simple event named previoustrack
at its media remote
controller.
When the user presses the MediaTrackNext
media key, or an equivalent key, on
any hardware or software interface (e.g. on a keyboard or OS-level button) then
the user agent must, for each Content
-based media session that is currently active
, has a media remote
controller with its nextTrackEnabled
attribute set
to true, queue a task to
fire a simple event named nexttrack
at its media remote controller.
When the user presses a 'seek backward' media key, or an equivalent key, on any
hardware or software interface (e.g. on a keyboard or OS-level button), then the
user agent must, for each Content
-based media session that is currently active
, has a media remote
controller with its seekBackwardEnabled
attribute
set is true, queue a task to
fire a simple event named seekbackward
at its media remote
controller.
When the user presses a 'seek forward' media key, or an equivalent key, on any
hardware or software interface (e.g. on a keyboard or OS-level button), then the
user agent must, for each
Content
-based media session
that is currently active
,
has a media remote controller with its
seekForwardEnabled
attribute set to true,
queue a task to
fire a simple event named seekforward
at its media remote controller.
5.2.3. Events summary
This section is non-normative.
The following events fire on media remote controllers as part of the processing model described above:
| Event name | Interface | Fired when... | Preconditions |
|---|---|---|---|
previoustrack
|
Event
| The user presses the 'previous track' media key or button on any hardware or software media interface. |
current media session type is Content , current state is active and
previousTrackEnabled is true.
|
nexttrack
|
Event
| The user presses the 'next track' media key or button on any hardware or software media interface. |
current media session type is Content , current state is active and
nextTrackEnabled is true.
|
seekbackward
|
Event
| The user presses the 'seek backward' media key or button on any hardware or software media interface. |
current media session type is Content , current state is active and
seekBackwardEnabled is true.
|
seekforward
|
Event
| The user presses the 'seek forward' media key or button on any hardware or software media interface. |
current media session type is Content , current state is active and
seekForwardEnabled is true.
|
6. Media element extensions
This section describes how a web developer can assign a media session to a media element both declaratively and programmatically and how, once attached, the media element can control state of a media session.
A media element may have a current media session, which is a media session. When a media element is created, the user agent must set its current media session to the current top-level browsing context’s media session.
A media session’s participating media elements are media elements whose current media session is that media session.
6.1. Extensions to the
HTMLMediaElement
interface
partial interface HTMLMediaElement { // media session attribute DOMString kind; attribute MediaSession? session; };
-
media .
kind
-
Returns the category the given media falls into. The possible media categories are defined above.
Setting, changing or removing this attribute updates the media element’s
session
attribute. -
media .
[ =session
session
] -
Returns the current media session for the media element, if
any; returns null otherwise.
Can be set, to set an explicit
MediaSession
. Doing so updates the media element’skind
attribute.
The kind
IDL
attribute is intended to provide a hint to the user agent about what the author
thinks will lead to the best user experience for media playback. The attribute
may be ignored altogether, for example based on explicit user preferences or
based on the capabilities of the underlying platform.
The
attribute must
reflect the kind
video
and audio
element content attribute of the same name, limited
to only known values.
When a media element’s kind
attribute is set,
changed, or removed the user agent must update media element’s media
session for media element.
A media element’s
attribute can be
changed at any time even once a media element is potentially
playing; but it is only read by the user agent at the time that it is set,
changed or removed. Thus, setting, changing, or removing the
kind
attribute once a
media element is potentially playing does not dynamically change
the media session to which the media element belongs until the
media session invocation algorithm is subsequently re-run.kind
The session
attribute on a media element, on
getting, must return the element’s current media session, if any, or null
otherwise. On setting, the user agent must run the following steps:
- Let m be the media element in question.
- Let old media session be m’s current media session, if it has one, and null otherwise.
- Let new media session be null.
- Set m’s current media session to null, if it currently has one.
- Let m’s current media session be the new value or the top-level browsing context’s media session if the new value is null.
-
If the new value is null, then set the m’s
kind
IDL attribute to the empty string. Otherwise, set m’skind
IDL attribute to the value of current media session’s current media session type attribute. - Let new media session be m’s current media session.
- Update media sessions: If old media session and new media session are the same (whether both null or both the same media session), then terminate these steps.
- If m is an active audio-producing participant of old media session, then pause m and remove m from old media session’s active audio-producing participants.
- If old media session is not null and no longer has one or more active audio-producing participants, then run the media session release algorithm for old media session.
6.2. Assigning a media session declaratively
The kind
content attribute
on media elements is an enumerated attribute
and must return the media element’s media session category, if it
has one, or the empty string otherwise.
When a media element is created with a kind
content
attribute, then the user agent must update media element’s media session,
for media element.
When the user agent is to update media element’s media session for a given media element it must run the following steps:
-
Let media session type be the media element’s
current media session type. If no known category match is found, let
media session type be
Default
. - Let media session be null.
-
If media session type is
Default
, then set media session to the current top-level browsing context’s media session and set media element’s current media session to this media session. Otherwise, if media session type is the same as media element’s current media session type, then set media session to media element’s current media session. Otherwise, set media session the result of invoking theMediaSession(kind)
constructor passing in the corresponding media session category value of media session type as its kind. -
If media session type is
Default
, then set media element’ssession
attribute to null.Default
media sessions do not expose asession
attribute but may still maintain an internal current media session reference.
6.2.1. Extensions to the video
element
- Additional content attributes:
-
kind
— The type of video
video
element’s kind
content attribute can be declared as follows HTML:
<video src="short_ping.webm" kind="transient">
6.2.2. Extensions to the audio
element
- Additional content attributes:
-
kind
— The type of audio
audio
element’s kind
content attribute can be declared as follows in
HTML:
<audio src="track1.ogg" kind="content">
6.3. Media elements and the media session lifecycle
6.3.1. Activating a media session from a media element
When the play()
method on a media element is invoked and the media
element’s paused
attribute is true and the media element’s
readyState
attribute has the value HAVE_FUTURE_DATA
or
HAVE_ENOUGH_DATA
, then the user agent must run the following steps passing
in media element media element:
- Let media session be the value of media element’s current media session.
- If media element is not currently in media session’s list of active audio-producing participants, then append media element to this list.
- Let activated be the result of running the media session invocation algorithm for media session.
- If activated is failure, pause current media element.
6.3.2. Interrupting a media session from a media element
When the user agent is to pause a media element for a given a media element it must run that media element’s internal pause steps.
After thepause()
method on a media element has been invoked and that
media element has a current media session type set to
Transient
or Transient Solo
, then the user agent
must run the media session continuation algorithm against all known
media sessions, passing in each media session as media
session. Then, for the original indefinitely
paused media session, the user agent must immediately run the
media session release algorithm for its current media session.
Transient
or
Transient Solo
-based
media sessions from indefinitely blocking the continuation of other
interrupted
media
sessions when they are indefinitely paused.
After we have completed this process, the original Transient
or
Transient Solo
-based
media session will have a current state of idle
and all interrupted
media sessions
will have returned to a current state of active
.
When the user agent is to unpause a media element for a given a
media element it must invoke that media element’s play()
method.
6.3.3. Releasing a media session from a media element
When a media element’s playback has ended, the user agent must release media element from its media session.
Any time a media element’s load algorithm is run by the user agent, it must release media element from its media session.
When a media element is removed
from a Document
and is not attached to another Document
,
then release media element from its media session.
When the user agent is to release media element from its media session for a given media element it must run the following steps:
- Let media session be the value of media element’s current media session.
- If media element is not currently in media session’s list of active audio-producing participants, then terminate these steps.
- Remove media element from media session’s list of active audio-producing participants.
- Run the media session release algorithm for media session.
6.4. Examples
This section and all its subsections are non-normative.
6.4.1. Setting up a media session
An audio
element’s kind
content attribute can be declared as follows in HTML
to associate that audio
element to a media
session:
<audio src=track1.mp3 kind=content autoplay>
As both audio
and video
elements implement the HTMLMediaElement
interface, these element’s
kind
attribute can also be set via JavaScript to associate
that audio
or video
element to a media session:
var myAudio = document.createElement("audio"); myAudio.src = "music.mp3"; console.log(myAudio.session) // --> null myAudio.kind = "content"; console.log(myAudio.session) // --> [object MediaSession] myAudio.play(); // Go!
A media session can also be assigned to one or more audio
and video
elements by setting their respective session
attributes to
the same MediaSession
object in JavaScript:
var myAudio = document.createElement("audio"); myAudio.src = "track1_audio.mp3"; var myVideo = document.createElement("audio"); myVideo.src = "track1_video.mp3"; var mySession = new MediaSession(); myAudio.session = mySession; myVideo.session = mySession; myAudio.play(); // Go! myVideo.play(); // Go!
An AudioContext
object [WEBAUDIO] can be rendered via audio
or video
elements. As both audio
and video
elements implement the HTMLMediaElement
interface, these element’s
kind
attribute can be set via JavaScript:
var audioCtx = new AudioContext(); // ... var destinationNode = audioCtx.createMediaStreamDestination(); var myAudio = document.createElement("audio"); myAudio.srcObject = destinationNode.stream; console.log(myAudio.session) // --> null myAudio.kind = "transient-solo"; console.log(myAudio.session) // --> [object MediaSession] myAudio.play(); // Go!
Web developers should ensure that, when an AudioContext
object is attached
to an audio
or video
element, that they apply subsequent pause
and play
events dispatched
on that audio
or video
element to their AudioContext
object appropriately.
6.4.2. Setting media session meta data
When a Content
-based media
session is active
it may
be possible to display meta data within platform-level interfaces. Media session
meta data can be added at any time to update these interfaces:
// Set some media session metadata // to display to the user mySession.setMetadata({ title: "Demo Track 1", artwork: "/resources/cover1.png" }); // ... time passes ... // Change the media session metadata // to display to the user mySession.setMetadata({ title: "Demo Track 2", artwork: "/resources/cover2.png" });
6.4.3. Responding to media remote control events
Before a Content
-based media
session becomes active
a
web developer must set which remote control keys they want to enable:
var mySession = new MediaSession("content"); // Enable previous and next track media key inputs if (mySession.controls) { mySession.controls.nextTrackEnabled = true; mySession.controls.previousTrackEnabled = true; } // ... assign media session to a media element and play // that media element to activate the media session ...
When a Content
-based media
session then becomes active
it is possible to listen for any interaction with the
registered remote control keys and respond appropriately to those inputs in a
web application:
// Respond to previous and next track media key inputs if (mySession.controls) { mySession.controls.addEventListener('nexttrack', function() { // Play next track if (myAudio.src === "track1.mp3") { myAudio.src = "track2.mp3"; myAudio.play(); // Set appropriate meta data for track 2 mySession.setMetadata({ title: "Demo Track 2", artwork: "/resources/cover2.png" }); } }, false); mySession.controls.addEventListener('previoustrack', function() { // Play previous track if (myAudio.src === "track2.mp3") { myAudio.src = "track1.mp3"; myAudio.play(); // Set appropriate meta data for track 1 mySession.setMetadata({ title: "Demo Track 1", artwork: "/resources/cover1.png" }); } }, false); }
Acknowledgments
The editor would like to thank Paul Adenot, Jake Archibald, Tab Atkins, Jonathan Bailey, Marcos Caceres, Domenic Denicola, Ralph Giles, Anne van Kesteren, Tobie Langel, Michael Mahemoff, Jer Noble, Elliott Sprehn, Chris Wilson, and Jörn Zaefferer for their participation in technical discussions that ultimately made this specification possible.
Special thanks go to Philip Jägenstedt and David Vest for their help in designing every aspect of media sessions and for their seemingly infinite patience in working through the initial design issues; Jer Noble for his help in building a model that also works well within the iOS audio focus model; and Mounir Lamouri and Anton Vayvod for their early involvement, feedback and support in making this specification happen.
This standard is written by Rich Tibbett (Opera, richt@opera.com).
Per CC0, to the extent possible under law, the editors have waived all copyright and related or neighboring rights to this work.


Uniting the Diaspora with Puerto Rico
Lorem ipsum dolor sit amet, consectetur adipisicing elit
Find People On The Island
Donate From The US
Check Utilities Status
Fundraisers
People Finder
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
LAUNCHOrganizations
Tools & Resources
In collaboration with Maria Tech Brigade
This website is open-source and not affiliated to any specific organization. Just an attempt to help out our island. Any help would help and gratefully accepted; You don't need to be Puerto Rican to do so.


This tutorial shows you how to use Apache Camel to process files and send them to a web service over HTTP. To do this, the sample application defines two Camel routes. The first sends JSON files directly to an HTTP endpoint, and the second uses MIME multipart form encoding for the file upload.
The goal of this tutorial is to show the minimal code to define and run a Camel route that uses the Scala DSL and standard Camel components. In addition, a second route shows an example of customising Camel’s default behaviour.
This tutorial demonstrates how little code and configuration is required to start using Camel with Scala.
The application is simple enough that there is almost no structure.
CamelApplication
contains minimal code to configure and run Camel.JsonPost.scala
defines a Camel route that sends JSON files to an HTTP endpoint.FileUpload.scala
defines a Camel route that uploads XML/PDF files to an HTTP endpoint.src/main/resources/
contains a logging configuration file and sample files that you can use to
test the routes.build.sbt
specifies the Camel and logging library dependencies.The rest of the tutorial will explain the two Camel routes, and then show you how to try them out.
JsonPost
defines a Camel route that sends the contents of a JSON file to a URL using
HTTP POST. This route definition uses the
Scala DSL.
The thing in the route is a string that starts file:
which
uses the File component to
define a URI for the route’s message source. For this example, this is a local
target/incoming/
directory, which Camel creates on start-up if
it does not exist. This URI uses the File component’s include
option to specify that only JSON files are processed.
The route itself consists of four steps.
The route ID is not used in the route itself, but is output in log
statements. This gives you a way to identify the route in log statements,
which is useful for debugging production systems whose log files interleave
logging from different routes that execute simultaneously. To make this work,
CamelApplication
enables Mapped Diagnostic Context
logging, and the logging configuration in
logback.xml
uses %X{camel.routeId}
in the pattern layout to output the
route ID. The logging pattern also includes the Camel exchange ID, so you can
separate log statements for different executions of the same route.
In JsonPost
,
before anything else happens, the route outputs a log message, giving the
incoming message file name. In a production system, this allows you to trace
log messages (identified by route and exchange ID) back to the file received
from an upstream system.
Next, the route defines exception handlers for whenever the route throws
specific HTTP exceptions. In this example, the exception handler logs an
error and moves the incoming file to a
Dead Letter Channel.
Note the call to the handled
method, which indicates that the
exception has been handled and prevents any further processing.
Finally, the route uses the
HTTP component to send the
current message to a web service, presumed to be running at
http://localhost:9000/
. This means sending the current message
body - the contents of the incoming JSON file - using HTTP POST. The call to
setHeader
sets a Camel exchange header, which the HTTP component
translates to an HTTP request header.
There is more logging around the call to the external web service, because you need this to be able to isolate systems for debugging. In production, you need to be able to see what was sent and received for an HTTP request.
In this example, the target/incoming/
source directory and
http://localhost:9000/
are hard-coded for readability. In a
production system, you would use configuration parameters instead, because
these locations will depend on the machine and the environment - development,
test or production.
The next route illustrates a different use case. Suppose you have a legacy web service that is designed to handle file uploads from an HTML form. For example, it might use a form like this, which uploads a file and uses additional form fields for a file name and date:
<form action="/" enctype="multipart/form-data">
<input name="file" type="file">
<input name="name">
<input name="date" type="date">
<button>Upload File</button>
</form>
To send binary file data in the request, the form must use the multipart/form-data encoding. This encoding handles multiple form parameters, each of which can be text or encoded binary. To use this legacy API from a Camel route, you will have to apply the same form encoding.
FileUpload
is a second Camel route that is based on
JsonPost
but has two key differences.
You can see the first difference in the route’s source URL. This time, the
include
option’s regular expression matches on two different file
extensions. In addition, the keepLastModified
option preserves
the incoming file’s last-modified date when copying the file for processing,
so you can use it later.
Using multipart/form-data encoding has two parts:
process
method encodes the message body using
toMultipart
- a custom message processormultipart/form-data
content typetoMultipart
is a Camel Processor that transforms
the Camel exchange, acting as a
Message Translator.
In this context, the processor is just a Scala function with a single
org.apache.camel.Exchange
parameter that gives us access to the
inbound and outbound messages.
First, the processor collects file information from the inbound message - the input to the processor. For this example, you need the file itself (to access its contents), the file name and the file’s modification date. Next, the processor uses this information to translate the message and create the body of the outbound message.
To implement the message translation - the MIME encoding - you can use the Apache HttpComponents library. MultipartEntityBuilder has a straightforward API for creating a MIME multipart entity.
When you run the application, org.apache.camel.impl.DefaultCamelContext
logs start-up information, including:
Route: json started and consuming from: Endpoint[file://target/incoming/?include=.*%5C.json%24] Route: upload started and consuming from: Endpoint[file://target/incoming/?include=.*%5C.%28xml%7Cpdf%29&keepLastModified=true] Total 2 routes, of which 2 is started. Apache Camel 2.13.2 (CamelContext: camel-1) started in 0.580 seconds
Camel is now ready to process files. For example, use the console to copy the sample JSON file to the incoming directory:
cp src/main/resources/test.json target/incoming/
This will result in a Cannot connect to the HTTP server error,
because there is no HTTP server running at localhost:9000
.
The simplest way to make localhost:9000
accept an HTTP
connection is to run the Unix netcat command on another console:
nc -l 9000
Now copy the test.json
file again. Now the Camel console logs
output from the route:
Incoming file: test.json
Meanwhile, netcat outputs the raw HTTP request:
POST / HTTP/1.1 Content-Length: 62 Content-Type: application/json Host: localhost:9000 Connection: Keep-Alive User-Agent: Apache-HttpClient/4.3.5 (java 1.5) Accept-Encoding: gzip,deflate { "quantity": 11, "mood": "elated", "animal": "elephants" }
However, netcat is not an HTTP server, so it does not return an HTTP response, which is why there is no additional Camel logging.
To successfully execute the whole route, use an HTTP server that will
return a success response. For example, in
JsonPost
at the bottom of the route, change localhost:9000/
to
httpbin.org/post
, restart the Camel application, and copy the
test file to target/incoming/
again. This time, you should see a
detailed JSON response from httpbin.
You can test the
FileUpload
route the same way. Alternatively, write a simple
Play Framework application to
implement an HTTP server that handles the file uploads.


This is the text above the list of results
| title | author | type | location | |
|---|---|---|---|---|
| 1984 | george orwell | book | home | |
| Der Prozess | franz kafka | book | home | |
| Decamerone | giovanni boccaccio | book | home | |
| Spring Enterprise Recipies | josh long, gavin mak | book | home |
This is a simple single page responsive application for tracking where my books, cds and other medias are stored.
this is a small text and should disappear in mobile
this is a small text and should disappear in mobile
This is the text above the list of results
| title | author | type | location | |
|---|---|---|---|---|
| 1984 | george orwell | book | home | |
| Der Prozess | franz kafka | book | home | |
| Decamerone | giovanni boccaccio | book | home | |
| Spring Enterprise Recipies | josh long, gavin mak | book | home |


Advantages of establishing a cat
- Owning a cat is better fot the environment.
- They fulfill your need for companionship.
- They can tell you a lot about your personality.
- You'll sleep better.
- Cat ownership means fewer allergies.
- They can quite literally save your life.
- Cat owners are smart.
Back


Test of using a $10/mo vector tiles NodeJS server server to host parcel data for a county wide parcel map. Since the parcel vector tiles are being pushed to the client by the server, there is no size limit on the number of features for the parcel layer, or any other layer. For this map, the entire basemap as well as the parcels are being served as vector tiles by NodeJS. These vector tiles can also be dynamically styled client-side.
The search function is provided by a client-side script and the loading of a json file containing parcel attribute data and a unique key. This could be adapted to NodeJS as well to run server-side for larger counties.
Zoom in to see the parcels.


https://www.python.org/
https://en.wikipedia.org/wiki/Python_(programming_language)
Python is a general purpose, interpreted, high-level, and open source computer programming language.
The creator of Python is Guido van Rossum. His title given by the Python community is 'Benevolent Dictator for Life' (BDFL).
The Python Software Foundation (2001) is responsible for developing the core Python distribution, managing intellectual rights, developer conferences including 'PyCon', and raising funds.
Python's development is conducted largely through the 'Python Enhancement Proposal' (PEP) process, the primary mechanism for proposing major new features, collecting community input on issues and documenting Python design decisions. Python coding style is covered in PEP 8.
Python was named after the BBC TV show 'Monty Python's Flying Circus'.
Python's release culture: X.Y.Z
X is a main branch ('earth-shattering'), X=2 or X=3 today,
Y denotes major releases (new features), 2.7 or 3.10 today,
Z denotes bug-fix releases.
https://wiki.python.org/moin/GlobalInterpreterLock
https://realpython.com/python-gil/
Speed. But:
(a) Some parts of Python run with C speed (specialized libraries).
(b) Coding time is reduced, many ideas can be implemented and tested
(making working prototypes).
(c) Sometimes there are other slow components: internet connection,
database response, etc.
(d) Faster algorithms can be used.
(e) There are tools to improve the Python performance:
compilation with Cython, compilation 'just in time' with Numba, caching.
Python GIL (Global Interpreter Lock).
It is a mutex (or a lock) that protects access to Python objects,
preventing multiple threads from executing Python bytecodes at once.
This mutex is necessary mainly because CPython's memory management
is not thread-safe [threads share the same memory].
(a) Luckily, many potentially blocking or long-running operations,
such as I/O, image processing, and NumPy number crunching,
happen outside the GIL.
(b) The most popular way to avoid GIL is to use a multiple processes
instead of threads (a 'multiprocessing' module).
(c) One can use alternative Python interpreters, not CPython.
https://www.python.org/download/alternatives/
Beginnig: December 1989, a 'hobby' programming project based on ABC language.
Python 1.0, released 1994-01-26
Python 2.0, released 2000-10-16
Python 2.1, released 2002-04-15
Python 2.2, released 2001-12-21
Python 2.3, released 2003-07-29
Python 2.4, released 2004-11-30
Python 2.5, released 2006-09-19
Python 2.6, released 2008-10-01
Python 2.7, released 2010-07-03, status end-of-life from 2020
Python 2.8, it will never be released
Python 3.0, released 2008-12-04
Python 3.1, released 2009-06-27
Python 3.2, released 2011-02-20
Python 3.3, released 2012-09-29
Python 3.4, released 2014-03-17
Python 3.5, released 2015-09-13
Python 3.6, released 2016-12-23
Python 3.7, released 2018-06-27
Python 3.8, released 2019-10-14
Python 3.9, released 2020-10-05,
the last version providing some Py2 backward compatibility layers
Python 3.10, released 2021-10-04
Python 3.11, released 2022-10-24


News Archive
Here is an overview of all Wicket related news items posted on our
front page
.
October 30, 2005 - Wicket 1.1 Available
The Wicket team is proud to announce the availability of Wicket 1.1 for
download! Wicket is a Java component oriented web application framework
that takes simplicity, separation of concerns and easy of use to a whole
new level. Wicket web applications consist of HTML markup and Java
classes. No strange languages, no strange markup, no configuration files
, no specialized, expensive tools: just Java, HTML and you.
This Wicket version contains a lot of improvements from the 1.0 version.
New features include:
- Simplified feedback and validation - enables custom feedback strategies
- Live Component Reference - the examples project contains a component reference showing how to use the components.
- JavaScript and CSS support for components - contribute JavaScript and CSS from your component to the using page
- Markup Inheritance - enables template pages and components
- Inclusion of external markup
- Simplified Choice component - creating drop down, radio and list components was never this easy
- Less dependencies - we removed several library dependencies
- Customizable Form handling - easy for quick forms, easily enables full custom form processing
- Improved resource handling
- Date picker component - will not get you dates, but a JavaScript and text field enabled localized calendar component.
- Improved URL handling
- AJAX request handling support - support for two leading AJAX JavaScript libraries is available as separate downloads from our Wicket Stuff project: scriptaculous and DOJO toolkit
The Wicket team wishes to extend their gratitude to the user and
developer community for their testing efforts and help, making this
release a reality!
The Wicket 1.1 distribution can be downloaded from the SourceForge servers by
following
this link.
The Wicket 1.1 release documentation can be found at:
http://wicket.sourceforge.net/wicket-1.1
Thank you for downloading and using Wicket!
- the Wicket Team
October 19, 2005 - Moved to Wicket home
The Wicket Quickstart project has been upgraded from the Wicket Stuff project
and moved to the Wicket core project.
In preparation for the Wicket 1.1 release, we have updated the project with regard
to the following sections:
-
now includes an Ant build.xml
file for building your WAR archive using Apache Ant
-
now includes a Maven 1 project descriptor
for those that want to build their project using Apache Maven (1.0.x and 1.1)
-
now also includes a sysdeo Tomcat plugin configuration file, so you can now run
the project directly using the Eclipse tomcat plugin.
Juli 17, 2005 - Wicket 1.0.1 maintenance release available
The first maintenance release of the 1.0 release of
Wicket is available. The Kickstart project
has been updated to reflect this maintenance release.
June 7, 2005 - Wicket 1.0 final Launched!
With the launch of
Wicket 1.0 final
we also upgraded the Wicket Kickstart project to be 1.0 based.
May 4, 2005 - Eclipse Live Demo added
Using
Wink we have
put together a live
Eclipse Demo
showing how to get started developing your first
Wicket application.
April 18, 2005 - Netbeans guide added
Finally we have a Netbeans guide for running the kick start project in Netbeans.
April 15, 2005 - QuickStart has moved
The project formerly known as 'Wicket QuickStart' has moved into the Wicket Stuff
project and has been renamed to 'Wicket Kick Start'.


Swedbank cuts management team in revamp after laundering probe
Swedbank said on Monday its chief risk officer was leaving as the Swedish bank revamps its structure to regain customer trust after a money laundering scandal in its Baltic branches sent its shares down 40per cent in the past year.
REUTERS: Swedbank said on Monday its chief risk officer was leaving as the Swedish bank revamps its structure to regain customer trust after a money laundering scandal in its Baltic branches sent its shares down 40per cent in the past year.
Helo Meigas will leave the bank along with head of Baltic Banking Charlotte Elsnitz, the bank said in a statement on Monday. Gunilla Hallros and Jon Lidefelt will take over, respectively, in an interim capacity. The search for permanent replacements has already started, the bank said.
The departures are part of an organizational revamp aimed at boosting confidence in the Swedish lender and simplifying its structure, said chief executive Jens Henriksson.
"Today I introduce a new executive team to develop Swedbank and strengthen trust. Consequently, some executives leave the bank," he said. "I also initiate an assessment of the corporate culture in Swedbank".
The bank also said it would merge several business units, including its IT and digital banking divisions, while Swedbank Pay and payment infrastructure functions will be integrated within the Large Corporates & Institutions department.
It said responsibility for the ongoing internal and external investigations into ``historical shortcomings in anti-money laundering work'' would be moved to a new Special Task Force unit, reporting directly to Henriksson.
As a result of the merger of the bank’s product units, the head of Group Lending & Payments Leif Karlsson will leave the bank in early 2020, it added.
Swedbank said there would be 14 people in group management following the changes, down from 17 previously.
(Reporting by Colm Fulton; editing by Mike Harrison)


|
Bullet Collision Detection & Physics Library
|
#include "btContactConstraint.h"
#include "BulletDynamics/Dynamics/btRigidBody.h"
#include "LinearMath/btVector3.h"
#include "btJacobianEntry.h"
#include "btContactSolverInfo.h"
#include "LinearMath/btMinMax.h"
#include "BulletCollision/NarrowPhaseCollision/btManifoldPoint.h"
Go to the source code of this file.
Functions | |
| btScalar | resolveSingleCollision (btRigidBody *body1, btCollisionObject *colObj2, const btVector3 &contactPositionWorld, const btVector3 &contactNormalOnB, const btContactSolverInfo &solverInfo, btScalar distance) |
| void | resolveSingleBilateral (btRigidBody &body1, const btVector3 &pos1, btRigidBody &body2, const btVector3 &pos2, btScalar distance, const btVector3 &normal, btScalar &impulse, btScalar timeStep) |
| resolveSingleBilateral is an obsolete methods used for vehicle friction between two dynamic objects More... | |
| void resolveSingleBilateral | ( | btRigidBody & | body1, |
| const btVector3 & | pos1, | ||
| btRigidBody & | body2, | ||
| const btVector3 & | pos2, | ||
| btScalar | distance, | ||
| const btVector3 & | normal, | ||
| btScalar & | impulse, | ||
| btScalar | timeStep | ||
| ) |
resolveSingleBilateral is an obsolete methods used for vehicle friction between two dynamic objects
Definition at line 105 of file btContactConstraint.cpp.
| btScalar resolveSingleCollision | ( | btRigidBody * | body1, |
| btCollisionObject * | colObj2, | ||
| const btVector3 & | contactPositionWorld, | ||
| const btVector3 & | contactNormalOnB, | ||
| const btContactSolverInfo & | solverInfo, | ||
| btScalar | distance | ||
| ) |
Definition at line 60 of file btContactConstraint.cpp.


Nigel Gardner
Welcome to my page! I am a Full Stack Developer with experince in
JavaScript, Jquery, Mustache.js, React.js, Node.js, Ruby, Ruby on Rails, SQL
US Veteran - Outdoor and Sports Enthusiast
Welcome to my page! I am a Full Stack Developer with experince in
JavaScript, Jquery, Mustache.js, React.js, Node.js, Ruby, Ruby on Rails, SQL
Thanks for taking the time to read about my background. I am a proud US Veteran who is a former Marine Corp Sergeant for 8 years. I then received my ROTC Commission from Fordham University and have spent the last 8 years as a US Army Captain. I have served multiple tours overseas including Iraq, Afghanistan, Japan and Norway. With these opportunities, I have been fortunate to work with a diverse group and team that has given me a good perspective on cultures and values.
I am a driven professional who embraces new technology with proven ability to handle multiple projects and make targeted deadlines. I am also a team oriented person who has the ability to thrive in any environment, accomplish all tasks and exceed expectations. I am a quick learner and good troubleshooter who can provide feedback and recommendations on how to handle issues as they arise.
Prior to making this successful transition into web development I spent over 10 years in operations and project management, audit and compliance.
I spent the majority of my time analyzing data, researching best practices and implementing various programs to improve business productivity. With the rapid shift to web based technology, I constantly found myself researching and relying on technology to automate our processes and increase efficiency and client satisfaction. I look forward to achieving the same success and applying these same skills as a full stack web developer.


Talks confirmed: AC Milan look to bring Zlatan Ibrahimovic back to Italy
by Tom McNeilThis does feel like it might be one of the worst kept secrets in football over the past few weeks. We’ve seen a lot of speculation and clubs trying to get some publicity on social media over where Zlatan might go next, but one name has been consistently linked.
Football Italia has quoted Ansa and Sky Sports Italia in saying that AC Milan have officially opened talks to bring AC Milan back to the club. They state they met with his agent – Mino Raiola – for the first time about bringing him back today.
He would be able to join up with the team in January after his contract with LA Galaxy expires at the end of December.
READ MORE: LA Galaxy hope to replace Zlatan Ibrahimovic with out-of-favour PSG attacker
They do go on to say that his contract demands are quite high and that it would likely be an 18 month deal, but there’s no figures given for what his weekly wage would amount to.
He is now 38 so it will be fascinating to see how he fares at the top level again. He was sensational for LA Galaxy last season and averaged a goal a game, but the level in Serie A is so much higher.
Milan are struggling this season and need somebody to kick start their season. We all know that Zlatan takes his fitness seriously and it will be hugely important for him to go out on top of his game and looking like a hero.
Nothing is confirmed yet, but it’s a move that makes sense for both parties. Let’s hope it happens.


WHO ARE WE?
Tetris Retails, a new age business that manufactures and Retails contemporary urban streetwear.
WHAT WE'RE ABOUT
Making you (yes you!) our esteemed customer look better, be more stylish and ultimately feel more confident. To that effect we have partnerships with innovative fashion brands to keep you on the edge of your fad as well as style seats.
OUR PRIORITY
Customer experience, hence we are working tirelessly and around the clock to make the experience better for you. We are open to any suggestions or enquiries. Do enjoy the Tetris experience!


Information request
Name:
Email address:
School attending:
Major:
IT
Nursing
Law
Arts
I agree to the terms.


Tinystat is a very minimalist, free to use and Open Source metrics API used for recording action counts on a hourly basis.
The need for a basic metrics system came while I ran into an issue trying to display database statistics on a
few of my personal web-apps. The issue was that querying a
COUNT
of large datasets (6Million Records) resulted in extremely long response times, often in the minutes.
When trying to display real time (almost) statistics in a timely manner, this is not an ideal situation.
Rather than reproducing the same sort of polling-then-caching logic or creating a metrics table for every API I build
I decided to write a basic shared service with a single central database that would provide metrics tracking
for all my projects in a simple and secure way. By storing the total actions per hour in an actions table, we
can easily
SUM
up years worth of actions extremely quickly and provide accurate action statistics in a timely manner.
To keep things simple for right now, Tinystat consists of only a select few endpoints. There is a single reporting endpoint that has a rate-limit of 1RPS. All others are unlimited as of right now.
To create a new app:
Optional: To reqiure the app_token on all metrics retrieval (
GET
) requests, apply a query param as
?strict_auth=true
(might be desireable for security of applications that only retrieve metrics from their
backend).
POST https://tinystat.io/v1/app/create/{app_name}
?token={token}
) or in the header as
TOKEN={token}
POST https://tinystat.io/v1/app/{app_id}/action/{action_name}/create/{count}
GET https://tinystat.io/v1/app/{app_id}/action/{action_name}/count
GET https://tinystat.io/v1/app/{app_id}/action/{action_name}/count/{duration}


Performs textual search on the sidebar
search(str)
| str |
string, text to search |
Returns undefined.
Description
This method will search all nodes of the sidebar and those that match search criteria will be made visible, those that are not will be made hidden.
If you have sidebar defined in the following way:
You can:


Request values
A request value of type RequestVal<T> is a typed structure that represents some aspect of the request that can be interpreted as a value of type T. A RequestVal instance abstracts the knowledge about how to extract a certain value from the request and interpret it as a T. It is used in combination with Handlers.
The advantage of representing a request detail as a RequestVal instead of performing ad-hoc analysis of a request are:
- you can define an "inventory" of HTTP primitives for your application that you can reuse in many places of your application
- automatic handling of errors when an expected value was not found in a request or if it could not be interpreted as the expected Java type
Note, that the Scala version of the routing DSL has no direct correspondent to RequestVals. Instead, a Scala-side Directive can have "extractions" that are reflected in the type of the Directive.
Predefined Request values
akka-http provides a set of predefined request values for request data commonly accessed in a web service.
These request values are defined in the following objects:
- akka.http.javadsl.server.values.FormFields
- Contains request values for basic data like URI components, request method, peer address, or the entity data.
- akka.http.javadsl.server.values.FormFieldsCookies
- Contains request values representing cookies.
- akka.http.javadsl.server.values.FormFields
- Contains request values to access form fields unmarshalled to various primitive Java types.
- akka.http.javadsl.server.values.Headers
- Contains request values to access request headers or header values.
- akka.http.javadsl.server.values.FormFieldsHttpBasicAuthenticator
- An abstract class to implement to create a request value representing a HTTP basic authenticated principal.
- akka.http.javadsl.server.values.FormFieldsParameters
- Contains request values to access URI paramaters unmarshalled to various primitive Java types.
- akka.http.javadsl.server.values.FormFieldsPathMatchers
- Contains request values to match and access URI path segments.
- akka.http.javadsl.server.values.FormFieldsCustomRequestVal
- An abstract class to implement arbitrary custom request values.
- akka.http.javadsl.server.values.HttpBasicAuthenticator.scala
- An abstract class to implement HTTP basic authentication
- akka.http.javadsl.server.values.OAuth2Authenticator
- An abstract class to implement Oauth 2 bearer token authentication
Contents


In 2013-15 The Events, My Perfect Mind, The Valley of Astonishment, Oh My Sweet Land, Kafka’s Monkey, The Secret Agent, Trash Cuisine were seen in locations including…
Belfast, Connecticut, Ohio, Pennsylvania, New York, Barcelona, Bremen, Tokyo, Arras, Luxembourg, Piraeus, Paris, Chennai, Birmingham, Liverpool, Bristol, Deptford, Plymouth, Southampton, Edinburgh, Glasgow, Vienna, Drammen, Amsterdam, Shanghai.


Research and analysis
Find out what impact federations have on outcomes for pupils.
PDF , 348KB , 32 pages
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
PDF , 289KB , 23 pages
The report explores how different types of federations impact on outcomes for pupils.
It identifies several types of federations:
Evidence from the case studies suggests performance federations have the strongest impact on outcomes for pupils. However, there is a time lag of between 2 and 4 years between forming the federation and seeing an impact.