StateType
Defines the shadowing behavior for a property. f.lux uses StateType instances to configure Shader instances that are then used to proxy the store's state using shadow properties.
Property subclasses usually expose a type
'class variable to specify their default shadowing behavior.
The
typeclass variable should be a getter property and is typically attached to the class using the
StateType.defineType()`` function.
Example of defining a type
class variable:
StateType.defineType(TodoRootProperty, type => { type.initialState({}) // empty object initial state .autoshadowOff // do not shadow state values without explicit definitions .properties({ // define sub-properties (just one in this case) todos: TodoCollection.type, // 'todos' is a collection property }) .readonly // prevent reassigning the 'todos' collection (paranoia) .typeName("TodoRootProperty"); // useful for certain diagnostic situations });
Shadowing behavior may be customized by setting the following StateType values:
- autoshadow - shadow implicit state properties using default f.lux property types (default=true)
- defaults - specifies default values for an object's initial state. A default value is applied when the initial state for this property is 'undefined'. (default=undefined)
- element type - StateType used for shadowing each sub-property, such as elements in an array or properties of an object. (default=null)
- jit properties - dynamically extends the 'properties' based on the property's state through a callback function (experimental)
- implementation class - ShadowImpl subclass used to back shadow state property (default=null)
- initial state - the initial property value. The store's state will take precedence and this value is used when the store's state is undefined for the specific property. (default=undefined)
- managed type - StateType instance used by CollectionProperty to specify the property type for each model contained in the collection. Other collection types could utilize the same mechanism. (default=null)
- properties - literal object with name/value pairs where name is the sub-property name and the value is a StateType instance describing the property shadowing behavior (default={})
- shadow class - Shadow subclass used to represent a shadow state property. Built-in implementation classes set a default so only need to set when want to customize parent type default. (default=null)
Methods/properties used when setting up a StateType
description:
addProperty(name, type)
- add a single property type where 'name' is the sub-property name and value is a StateType. Consider using StateType.properties() instead.autoshadow
- turn on auto-shadowing (default)autoshadowOff
- turn off auto-shadowingdefault(state)
- used with ObjectProperty and MapProperty sub-properties to set defaults for values. The default value is only applied if the initial state for this property is undefined. Example usage:stateType.properties({ name: PrimitiveProperty.type.default(null), })
elementType(type)
- StateType for shadowing each sub-property. Regularly used with IndexedProperty and ArrayProperty. Used with ObjectProperty and MapProperty when each value is the same type such as in a dictionary.jitProperties(callback)
- Sets a callback used for dynamically extending properties definition. Callback signature is 'callback(state, parentProperty)' and returns object with name/value pairs where name is the sub-property name and the value is a StateType instance describing the property shadowing behavior. (advanced feature)implementationClass(cls)
- sets the ShadowImpl subclass to be used for backing the shadow state (should not be needed)initialState(state)
- value suitable for the property type: boolean, array, object,...managedType(type)
- StateType for shading managed properties (used with CollectionProperty) Example usage:stateType.managedType(TodoProperty.type)
properties(propTypes)
- add multiple properties using a literal object with property-name/StateType key/value pairs Example usage:stateType.properties({ completed: PrimitiveProperty.type.initialState(false), created: PrimitiveProperty.type.readonly, desc: PrimitiveProperty.type, id: PrimitiveProperty.type.readonly, })
readonly
- set property to readonlyreadonlyOff
- set property to read/write (default unless parent property has set readonly to true since readonly property cascades through the state tree)typeName(name)
- set a label for the type. Useful for debugging situations where shadowing is not acting as expected. Example usage:const root = store.shadow; const rootProperty = root.$$(); console.log(rootProperty.typeName()); console.log(rootProperty.stateType().getTypeName());
Instances of this class are rarely directly created and instead are created using the defineType
static functions of each built-in property class.
Static Method Summary
| Static Public Methods | ||
| public static |
Convenience class method to avoid using 'new StateType(...)' making chaining on the newly created StateType easier to read. |
|
| public static |
defineType(PropertyClass: Property, typeCallback: function): * Sets a |
|
| public static |
defineTypeEx(PropClass: Property, ShadowType: Shadow, typeCallback: function, initialState: *) Sets a |
|
| public static |
Walks the prototype chain and returns the first StateType returned by a |
|
| public static |
implementationClassForProperty(property: Property, defaultClass: ShadowImpl): * Determines the ShadowImpl subclass to use for the property. |
Constructor Summary
| Public Constructor | ||
| public |
|
Member Summary
| Public Members | ||
| public get |
autoshadow: StateType: * Shadowing configuration getter to enable auto-shadowing. |
|
| public get |
Shadowing configuration getter to disable auto-shadowing. |
|
| public get |
Shadowing configuration getter to set the readonly attribute. |
|
| public get |
readonlyOff: StateType: * Shadowing configuration getter to disable the readonly attribute. |
Method Summary
| Public Methods | ||
| public |
accessClass(Cls: *): * |
|
| public |
addProperty(name: string, type: StateType): StateType Shadowing configuration method to add a child property. |
|
| public |
Creates a shallow copy of this |
|
| public |
computeInitialState(): * Generates the initial state for this property and its immediate child properties. |
|
| public |
Sets the default property values for child properties. |
|
| public |
elementType(type: StateType): StateType Sets the |
|
| public |
Gets the descriptive type name from the StateType#_PropertyClass. |
|
| public |
implementationClass(cls: *): StateType The ShadowImpl class to use for backing the properties Shadow. |
|
| public |
initialState(state: *): StateType Sets the initial state for the property if the f.lux store's state does not have a value for this property. |
|
| public |
initialStateWithDefaults(state: *): * Generates the initial state for this property and its immediate child properties. |
|
| public |
jitProperties(callback: function): * Sets a callback used for dynamically extending the child property definitions. |
|
| public |
managedType(type: StateType): StateType Sets the |
|
| public |
properties(propTypes: *): StateType Sets |
|
| public |
propertyClass(PropertyClass: Property): StateType Sets the Property class used for shadowing the state property. |
|
| public |
shadowClass(cls: Shadow): StateType Sets the Shadow class to be used for shadowing the property. |
|
| public |
Sets a descriptive type name on a property class. |
Static Public Methods
public static create(PropertyClass: Property): * source
Convenience class method to avoid using 'new StateType(...)' making chaining on the newly created StateType easier to read.
Return:
| * |
public static defineType(PropertyClass: Property, typeCallback: function): * source
Sets a type
getter on a Property class. The type
getter is used to define properties
in the StateType#properties method. The type
getter may be set once per class and all
further requests are ignored.
Example usage:
StateType.defineType(CounterProperty); // and the use it ObjectProperty.createClass({}, type => { type.properties({ counter: CounterProperty.type.readonly, }) });
Return:
| * |
public static defineTypeEx(PropClass: Property, ShadowType: Shadow, typeCallback: function, initialState: *) source
Sets a type
getter on a Property class with the ability to set the initial state. The
type
getter is used to define properties in the StateType#properties method. The type
getter may be set once per class and all further requests are ignored.
Params:
| Name | Type | Attribute | Description |
| PropClass | Property | Property subclass (required) |
|
| ShadowType | Shadow |
|
Shadow subclass or will pick up default set by parent class |
| typeCallback | function | callback of form |
|
| initialState | * |
|
the initial state for the new property. |
public static from(prop: Property): * source
Walks the prototype chain and returns the first StateType returned by a type
class
variable.
public static implementationClassForProperty(property: Property, defaultClass: ShadowImpl): * source
Determines the ShadowImpl subclass to use for the property.
Params:
| Name | Type | Attribute | Description |
| property | Property | the |
|
| defaultClass | ShadowImpl |
|
=ShadowImpl - the |
Return:
| * |
Public Constructors
public constructor() source
Public Members
public get autoshadow: StateType: * source
Shadowing configuration getter to enable auto-shadowing. Auto-shadowing is enabled by default and the shadowing attribute does not cascade through the state hieararchy.
public get autoshadowOff: StateType: * source
Shadowing configuration getter to disable auto-shadowing. Auto-shadowing is enabled by default and the shadowing attribute does not cascade through the state hieararchy.
public get readonly: StateType: * source
Shadowing configuration getter to set the readonly attribute. Readonly is disabled by
default and the attribute cascades through the state hieararchy. This means all child
properties will be readonly once an upper level property's readonly
attribute is enabled
until explicitly disabled using StateType#readonlyOff.
public get readonlyOff: StateType: * source
Shadowing configuration getter to disable the readonly attribute. Readonly is disabled by
default and the attribute cascades through the state hieararchy. This means all child
properties will be readonly once an upper level property's readonly
attribute is enabled
until explicitly disabled using StateType#readonlyOff.
Public Methods
public addProperty(name: string, type: StateType): StateType source
Shadowing configuration method to add a child property. The current implementation support 'keyed' properties only, such as ObjectProperty and MapProperty.
Consider using StateType#properties for adding multiple properties.
public computeInitialState(): * source
Generates the initial state for this property and its immediate child properties. This method does not account for any explicit default values set using StateType#default.
Return:
| * | the initial state |
public default(state: *): StateType source
Sets the default property values for child properties. A default value is used when the
Store state and the property type
descriptor's initial state are not defined.
Params:
| Name | Type | Attribute | Description |
| state | * | the default state value |
public elementType(type: StateType): StateType source
Sets the StateType
to use for shadowing each immediate child property.
Params:
| Name | Type | Attribute | Description |
| type | StateType |
|
public getTypeName(): string source
Gets the descriptive type name from the StateType#_PropertyClass. This value is set using StateType#typeName.
public implementationClass(cls: *): StateType source
The ShadowImpl class to use for backing the properties Shadow. This rarely required.
Params:
| Name | Type | Attribute | Description |
| cls | * |
public initialState(state: *): StateType source
Sets the initial state for the property if the f.lux store's state does not have a value for this property.
Params:
| Name | Type | Attribute | Description |
| state | * | the initial value |
public initialStateWithDefaults(state: *): * source
Generates the initial state for this property and its immediate child properties. The intial state is merged with any explicit default values set using StateType#default.
Params:
| Name | Type | Attribute | Description |
| state | * |
Return:
| * | the initial state |
public jitProperties(callback: function): * source
Sets a callback used for dynamically extending the child property definitions. Callback signature is:
callback(state, parentProperty)
where:
state
- the parent property stateparentProperty
- the parent property
Params:
| Name | Type | Attribute | Description |
| callback | function | the function to call during the shadowing process to obtain any additional property definitions beyond those statically configured. |
Return:
| * |
|
public managedType(type: StateType): StateType source
Sets the StateType
for the 'managed type'. Complex Property subclasses use the
managed type for determining how to shadow contained data. More common is the use of
StateType#elementType to specify a StateType
for each immediate child property.
See CollectionProperty for an example of a property employing managed types.
Params:
| Name | Type | Attribute | Description |
| type | StateType | the |
public properties(propTypes: *): StateType source
Sets StateType
values describing the shadowing behavior for multiple child properties.
Params:
| Name | Type | Attribute | Description |
| propTypes | * |
public propertyClass(PropertyClass: Property): StateType source
Sets the Property class used for shadowing the state property.
Params:
| Name | Type | Attribute | Description |
| PropertyClass | Property | a |
public shadowClass(cls: Shadow): StateType source
Sets the Shadow class to be used for shadowing the property.
Params:
| Name | Type | Attribute | Description |
| cls | Shadow | The |


"""
This example demonstrates what things from Python land can be used in JS.
Flexx detects what names are used in the transpiled JS of a Model (or
Widget class, and tries to look these up in the module, converting the
used objects if possible.
Check out the source of the generated page to see what Flexx did.
Note that once running, there is no interaction with the Python side, so this
example be exported to standalone HTML.
"""
from flexx import app, ui
# Define a value. This can be used in JS as long as it can be serialized
# using JSON (None, bool, int, float, str, list, dict).
# The definition of this value is inside the JS version of this module.
info = dict(name='John', age=42)
# Import a value from another module. It's still just a value, and there is
# no way for Flexx to tell where it was defined, so on the JS side it is
# defined in *this* module just like info. This means that if you import
# and use a value in different modules, in JS these are different instances.
from sys import version
# Define a function (or a class). Provided that its compatible with PyScript,
# you can just use this in the JS. Note that if this function used a value
# or a function, that would be converted too.
def poly(x, *coefs):
degree = len(coefs) - 1
y = 0
for coef in coefs:
y += coef * x ** degree
degree -= 1
return y
# Import a (PyScript-compatible) function from another module. In this case
# Flexx can tell where it was defined and put it in its own module. See
# the page source.
from html import escape
class UsingPython(ui.Widget):
def init(self):
self.label = ui.Label(wrap=0)
class JS:
def init(self):
# A rather boring way to present the info. The point is that
# we're using all sorts of Python stuff here, that is automatically
# converted for us.
lines = []
lines.append('This JS was generated from Python ' + version)
lines.append('Person %s is %i years old' % (info.name, info.age))
lines.append('Evaling 4*x**2 + 5*x + 6 with x=4: ' + poly(4, 4, 5, 6))
lines.append('... and with x=12: ' + poly(12, 4, 5, 6))
lines.append('String with escaped html: ' + escape('html <tags>!'))
lines.append('String with escaped html: ' + escape('Woezel & Pip'))
self.label.text = '<br />'.join(lines)
if __name__ == '__main__':
m = app.launch(UsingPython, 'browser')
app.run()


Go to the first, previous, next, last section, table of contents.
Some diagnostics produced by g77
require sufficient explanation
that the explanations are given below, and the diagnostics themselves
identify the appropriate explanation.
Identification uses the GNU Info format--specifically, the info
command that displays the explanation is given within square
brackets in the diagnostic.
For example:
foo.f:5: Invalid statement [info -f g77 M FOOEY]
More details about the above diagnostic is found in the g77
Info
documentation, menu item `M', submenu item `FOOEY',
which is displayed by typing the UNIX command
`info -f g77 M FOOEY'.
Other Info readers, such as EMACS, may be just as easily used to display the pertinent node. In the above example, `g77' is the Info document name, `M' is the top-level menu item to select, and, in that node (named `Diagnostics', the name of this chapter, which is the very text you're reading now), `FOOEY' is the menu item to select.
In this printed version of the g77
manual, the above example
points to a section, below, entitled `FOOEY'---though, of course,
as the above is just a sample, no such section exists.
f771
fails.
CMPAMBIG
Ambiguous use of intrinsic intrinsic ...
The type of the argument to the invocation of the intrinsic
intrinsic is a COMPLEX
type other than COMPLEX(KIND=1)
.
Typically, it is COMPLEX(KIND=2)
, also known as
DOUBLE COMPLEX
.
The interpretation of this invocation depends on the particular
dialect of Fortran for which the code was written.
Some dialects convert the real part of the argument to
REAL(KIND=1)
, thus losing precision; other dialects,
and Fortran 90, do no such conversion.
So, GNU Fortran rejects such invocations except under certain circumstances, to avoid making an incorrect assumption that results in generating the wrong code.
To determine the dialect of the program unit, perhaps even whether that particular invocation is properly coded, determine how the result of the intrinsic is used.
The result of intrinsic is expected (by the original programmer)
to be REAL(KIND=1)
(the non-Fortran-90 interpretation) if:
REAL(KIND=1)
.
For example,
a procedure with no DOUBLE PRECISION
or IMPLICIT DOUBLE PRECISION
statement specifying the dummy argument corresponding to an
actual argument of `REAL(Z)', where `Z' is declared
DOUBLE COMPLEX
, strongly suggests that the programmer
expected `REAL(Z)' to return REAL(KIND=1)
instead
of REAL(KIND=2)
.
REAL(KIND=2)
but where treating the intrinsic
invocation as REAL(KIND=2)
would result in unnecessary
promotions and (typically) more expensive operations on the
wider type.
For example:
DOUBLE COMPLEX Z ... R(1) = T * REAL(Z)The above example suggests the programmer expected the real part of `Z' to be converted to
REAL(KIND=1)
before being
multiplied by `T' (presumed, along with `R' above, to
be type REAL(KIND=1)
).
Otherwise, the conversion would have to be delayed until after
the multiplication, requiring not only an extra conversion
(of `T' to REAL(KIND=2)
), but a (typically) more
expensive multiplication (a double-precision multiplication instead
of a single-precision one).
The result of intrinsic is expected (by the original programmer)
to be REAL(KIND=2)
(the Fortran 90 interpretation) if:
REAL(KIND=2)
.
For example, a procedure specifying a DOUBLE PRECISION
dummy argument corresponding to an
actual argument of `REAL(Z)', where `Z' is declared
DOUBLE COMPLEX
, strongly suggests that the programmer
expected `REAL(Z)' to return REAL(KIND=2)
instead
of REAL(KIND=1)
.
REAL(KIND=2)
operands,
or is assigned to a REAL(KIND=2)
variable or array element.
For example:
DOUBLE COMPLEX Z DOUBLE PRECISION R, T ... R(1) = T * REAL(Z)The above example suggests the programmer expected the real part of `Z' to not be converted to
REAL(KIND=1)
by the REAL()
intrinsic.
Otherwise, the conversion would have to be immediately followed
by a conversion back to REAL(KIND=2)
, losing
the original, full precision of the real part of Z
,
before being multiplied by `T'.
Once you have determined whether a particular invocation of intrinsic expects the Fortran 90 interpretation, you can:
REAL
) or `DIMAG(expr)' (if intrinsic
is AIMAG
)
if it expected the Fortran 90 interpretation.
This assumes expr is COMPLEX(KIND=2)
---if it is
some other type, such as COMPLEX*32
, you should use the
appropriate intrinsic, such as the one to convert to REAL*16
(perhaps DBLEQ()
in place of DBLE()
, and
QIMAG()
in place of DIMAG()
).
REAL(KIND=1)
in all working
Fortran compilers.
If you don't want to change the code, and you are certain that all ambiguous invocations of intrinsic in the source file have the same expectation regarding interpretation, you can:
g77
option `-ff90', to enable the
Fortran 90 interpretation.
g77
options `-fno-f90 -fugly-complex',
to enable the non-Fortran-90 interpretations.
See section REAL()
and AIMAG()
of Complex, for more information on this
issue.
Note: If the above suggestions don't produce enough evidence as to whether a particular program expects the Fortran 90 interpretation of this ambiguous invocation of intrinsic, there is one more thing you can try.
If you have access to most or all the compilers used on the program to create successfully tested and deployed executables, read the documentation for, and also test out, each compiler to determine how it treats the intrinsic intrinsic in this case. (If all the compilers don't agree on an interpretation, there might be lurking bugs in the deployed versions of the program.)
The following sample program might help:
PROGRAM JCB003 C C Written by James Craig Burley 1997-02-23. C C Determine how compilers handle non-standard REAL C and AIMAG on DOUBLE COMPLEX operands. C DOUBLE COMPLEX Z REAL R Z = (3.3D0, 4.4D0) R = Z CALL DUMDUM(Z, R) R = REAL(Z) - R IF (R .NE. 0.) PRINT *, 'REAL() is Fortran 90' IF (R .EQ. 0.) PRINT *, 'REAL() is not Fortran 90' R = 4.4D0 CALL DUMDUM(Z, R) R = AIMAG(Z) - R IF (R .NE. 0.) PRINT *, 'AIMAG() is Fortran 90' IF (R .EQ. 0.) PRINT *, 'AIMAG() is not Fortran 90' END C C Just to make sure compiler doesn't use naive flow C analysis to optimize away careful work above, C which might invalidate results.... C SUBROUTINE DUMDUM(Z, R) DOUBLE COMPLEX Z REAL R END
If the above program prints contradictory results on a particular compiler, run away!
EXPIMP
Intrinsic intrinsic referenced ...
The intrinsic is explicitly declared in one program unit in the source file and implicitly used as an intrinsic in another program unit in the same source file.
This diagnostic is designed to catch cases where a program
might depend on using the name intrinsic as an intrinsic
in one program unit and as a global name (such as the name
of a subroutine or function) in another, but g77
recognizes
the name as an intrinsic in both cases.
After verifying that the program unit making implicit use of the intrinsic is indeed written expecting the intrinsic, add an `INTRINSIC intrinsic' statement to that program unit to prevent this warning.
This and related warnings are disabled by using the `-Wno-globals' option when compiling.
Note that this warning is not issued for standard intrinsics.
Standard intrinsics include those described in the FORTRAN 77
standard and, if `-ff90' is specified, those described
in the Fortran 90 standard.
Such intrinsics are not as likely to be confused with user
procedures as intrinsics provided as extensions to the
standard by g77
.
INTGLOB
Same name `intrinsic' given ...
The name intrinsic is used for a global entity (a common block or a program unit) in one program unit and implicitly used as an intrinsic in another program unit.
This diagnostic is designed to catch cases where a program
intends to use a name entirely as a global name, but g77
recognizes the name as an intrinsic in the program unit that
references the name, a situation that would likely produce
incorrect code.
For example:
INTEGER FUNCTION TIME() ... END ... PROGRAM SAMP INTEGER TIME PRINT *, 'Time is ', TIME() END
The above example defines a program unit named `TIME', but
the reference to `TIME' in the main program unit `SAMP'
is normally treated by g77
as a reference to the intrinsic
TIME()
(unless a command-line option that prevents such
treatment has been specified).
As a result, the program `SAMP' will not invoke the `TIME' function in the same source file.
Since g77
recognizes libU77
procedures as
intrinsics, and since some existing code uses the same names
for its own procedures as used by some libU77
procedures, this situation is expected to arise often enough
to make this sort of warning worth issuing.
After verifying that the program unit making implicit use of the intrinsic is indeed written expecting the intrinsic, add an `INTRINSIC intrinsic' statement to that program unit to prevent this warning.
Or, if you believe the program unit is designed to invoke the
program-defined procedure instead of the intrinsic (as
recognized by g77
), add an `EXTERNAL intrinsic'
statement to the program unit that references the name to
prevent this warning.
This and related warnings are disabled by using the `-Wno-globals' option when compiling.
Note that this warning is not issued for standard intrinsics.
Standard intrinsics include those described in the FORTRAN 77
standard and, if `-ff90' is specified, those described
in the Fortran 90 standard.
Such intrinsics are not as likely to be confused with user
procedures as intrinsics provided as extensions to the
standard by g77
.
LEX
Unrecognized character ... Invalid first character ... Line too long ... Non-numeric character ... Continuation indicator ... Label at ... invalid with continuation line indicator ... Character constant ... Continuation line ... Statement at ... begins with invalid token
Although the diagnostics identify specific problems, they can be produced when general problems such as the following occur:
C On XYZZY systems, remove "C" on next line: C CALL XYZZY_RESETThe result of editing the above line might be:
C On XYZZY systems, remove "C" on next line: CALL XYZZY_RESETHowever, that leaves the first `C' in the
CALL
statement in column 6, making it a comment line, which is
not really what the author intended, and which is likely
to result in one of the above-listed diagnostics.
Replacing the `C' in column 1 with a space
is the proper change to make, to ensure the CALL
keyword starts in or after column 7.
Another common mistake like this is to forget that fixed-form
source lines are significant through only column 72, and that,
normally, any text beyond column 72 is ignored or is diagnosed
at compile time.
See section Source Form, for more information.
#define
,
#include
, #if
, and so on is likely one that
requires preprocessing.
If the file's suffix is `.f', `.for', or `.FOR',
the file normally will be compiled without preprocessing
by g77
.
Change the file's suffix from `.f' to `.F'
(or, on systems with case-insensitive file names,
to `.fpp' or `.FPP'),
from `.for' to `.fpp',
or from `.FOR' to `.FPP'.
g77
compiles files with such names with
preprocessing.
Or, learn how to use gcc
's `-x' option to specify
the language `f77-cpp-input' for Fortran files that
require preprocessing.
See section Options Controlling the Kind of Output.
GLOBALS
Global name name defined at ... already defined... Global name name at ... has different type... Too many arguments passed to name at ... Too few arguments passed to name at ... Argument #n of name is ...
These messages all identify disagreements about the global procedure named name among different program units (usually including name itself).
Whether a particular disagreement is reported as a warning or an error can depend on the relative order of the disagreeing portions of the source file.
Disagreements between a procedure invocation and the subsequent procedure itself are, usually, diagnosed as errors when the procedure itself precedes the invocation. Other disagreements are diagnosed via warnings.
This distinction, between warnings and errors,
is due primarily to the present tendency of the gcc
back end
to inline only those procedure invocations that are
preceded by the corresponding procedure definitions.
If the gcc
back end is changed
to inline "forward references",
in which invocations precede definitions,
the g77
front end will be changed
to treat both orderings as errors, accordingly.
The sorts of disagreements that are diagnosed by g77
include
whether a procedure is a subroutine or function;
if it is a function, the type of the return value of the procedure;
the number of arguments the procedure accepts;
and the type of each argument.
Disagreements regarding global names among program units in a Fortran program should be fixed in the code itself. However, if that is not immediately practical, and the code has been working for some time, it is possible it will work when compiled with the `-fno-globals' option.
The `-fno-globals' option causes these diagnostics to all be warnings and disables all inlining of references to global procedures (to avoid subsequent compiler crashes and bad-code generation). Use of the `-Wno-globals' option as well as `-fno-globals' suppresses all of these diagnostics. (`-Wno-globals' by itself disables only the warnings, not the errors.)
After using `-fno-globals' to work around these problems, it is wise to stop using that option and address them by fixing the Fortran code, because such problems, while they might not actually result in bugs on some systems, indicate that the code is not as portable as it could be. In particular, the code might appear to work on a particular system, but have bugs that affect the reliability of the data without exhibiting any other outward manifestations of the bugs.
LINKFAIL
If the above command failed due to an unresolved reference to strtoul, _strtoul, bsearch, _bsearch, or similar, see [info -f g77 M LINKFAIL] (a node in the g77 documentation) for information on what causes this, how to work around the problem by editing ${srcdir}/proj.c, and what else to do.
See section Missing strtoul or bsearch, for more information on
this problem,
which occurs only in releases of g77
based on gcc
.
(It does not occur in egcs
.)
On AIX 4.1, g77
might not build with the native (non-GNU) tools
due to a linker bug in coping with the `-bbigtoc' option which
leads to a `Relocation overflow' error. The GNU linker is not
recommended on current AIX versions, though; it was developed under a
now-unsupported version. This bug is said to be fixed by `update PTF
U455193 for APAR IX75823'.
Compiling with `-mminimal-toc' might solve this problem, e.g. by adding
BOOT_CFLAGS='-mminimal-toc -O2 -g'
to the make bootstrap
command line.
Y2KBAD
Intrinsic `name', invoked at (^), known to be non-Y2K-compliant...
This diagnostic indicates that the specific intrinsic invoked by the name name is known to have an interface that is not Year-2000 (Y2K) compliant.
See section Year 2000 (Y2K) Problems.
Go to the first, previous, next, last section, table of contents.


27. Greenbar Tags¶
27.1. if¶
Provides a small set of operators to express conditional logic.
Conditionally evaluates its body based on the value of the cond
attribute.
27.1.1. Example¶
~if cond=$doit bound?`~
Hello there!
~`end`~
Given the variable $doit
is bound, the above template would produce:
- ::
- Hello there!
Given that the variable $doit
is not bound, the above template would
produce an empty string.
27.1.2. Operators¶
| Symbol | Name | Variable value types |
| :— | :— | :— |
| > | greater than | int, float |
| >= | greater than equal | int, float |
| < | less than | int, float |
| ⇐ | less than equal | int, float |
| == | equal | int, float, string |
| != | not equal | int, float, string |
| bound? | is bound | any |
| empty? | is empty | list, map |
27.2. Each¶
Iterates over a list binding each item to a variable scoped to the tag’s
body. Uses the value of the as
attribute as the name of the variable
during each iteration. If not provided it defaults to item
.
27.2.1. Examples¶
Using the default body variable item
:
~each var=$users~
First Name: ~$item.first_name~
Last Name: ~$item.last\_name~
~end~
Customizing the body variable:
~each var=$users as=user~
First Name: ~$user.first\_name~
Last Name: ~$user.last\_name~
~end~
Given the variable $users
is bound to
[%{"first_name" => "John", "last_name"
=> "Doe"}]
then both of the above templates would produce:
First Name: John
Last Name: Doe
27.3. Join¶
Iterates over a list, joining the rendered items with the value of the
with
attribute, which defaults to ", "
. Similar to the each
tag, you may also provide an as
attribute which sets the name of the
variable scoped to the body of the tag.
27.3.1. Examples¶
Create a comma-delimited list
~join var=$names~~$item~~end~
Given that the variable $names
is bound to
["Mark", "Kevin", "Shelton"]
then the above template would produce:
Mark, Kevin, Shelton
Specify a custom joiner
~join var=$names with="-"~~$item~~end~
Custom binding
~join var=$names as=name~~$name~~end~
Bodies can contain arbitrary instructions
~join var=$users~~$item.profile.username~~end~
27.4. Count¶
Returns the size of the referenced variable. When referencing lists the size is the length of the list. For maps, size is the number of the map’s unique keys. Any other value type will display “N/A”.
27.4.1. Examples¶
There are ~count var=$users~ users.
Given that the variable $users
is bound to
[{ "name": "Mark" }, { "name":
"Kevin" }]
then the above template would produce:
There are 2 users.
Given that the variable $users
is bound to
{ "imbriaco": 1, "kevsmith": 2,
"shelton": 3 }
then the above template would produce:
There are 3 users.
27.5. Break¶
Inserts a hard newline into the rendered template. This can be useful to work around situtions where Markdown consolidates newlines.
27.5.1. Examples¶
Normally Markdown will combine two code blocks into one if they are separated by a single newline.
`This is a line of code`
`This is another line of code`
will render as
This a line of codeThis is another line of code
`This is a line of code`
~br~
`This is another line of code`
will render as
This is a line of code
This is another line of code
27.6. Attachment¶
Wraps body in an attachment directive. The initial design is heavily influenced by Slack’s attachment API.
27.6.1. Attributes¶
| Name | Description |
| title | Attachment title |
| title_url | Optional title link URL |
| color | Color to be used when rendering attachment (interpretation may vary by provider) |
| image_url | Link to image asset (if any) |
| author | Author name |
| pretext | Preamble text displayed before attachment body |
| footer | Brief text that appears as the attachment’s footer |
Any other attributes will be interpreted as custom fields and included
in the attachments’ fields
field. Custom fields have the following
structure:
{
"title": <attribute\_name>,
"value": <attribute\_value>,
"short": false
}
27.6.2. Examples¶
The template
~attachment title="VM Use By Region" runtime=$timestamp~
|Region|Count|
|---|---|
~each var=$regions as=region~
|~$region.name~|~$region.vm_count~|
~end~
~end~
when executed with the data
%{"timestamp" => "Mon Sep 12 13:06:57 EDT 2016",
"regions" => [%{"name" => "us-east-1", "vm_count" => 113},
%{"name" => "us-west-1", "vm_count" => 105}]}
generates the rendering directives
[%{name: :attachment,
title: "VM Use By Region",
fields: [%{short: false,
title: "runtime",
value: "Mon Sep 12 13:06:57 EDT 2016"}],
children: [%{name: :table, children: [%{name: :table_header,
children: [%{name: :table_cell,
children: [%{name: :text, text: "Region"}]},
%{name: :table_cell,
children: [%{name: :text, text: "Count"}]}]},
%{name: :table_row,
children: [%{name: :table_cell,
children: [%{name: :text, text: "us-east-1"}]},
%{name: :table_cell,
children: [%{name: :text, text: "113"}]}]},
%{name: :table_row,
children: [%{name: :table_cell,
children: [%{name: :text, text: "us-west-1"}]},
%{name: :table_cell,
children: [%{name: :text, text: "105"}]}]}]}]}]


ENABLE this extension ONLY on the following websites
DISABLE this extension on the following websites
Enter one URL per line.
Enable this extension on...
All tabs
Pinned tabs only
Unpinned tabs only
Alternate icon
Preview
© 2018 Will Groenendyk. Released under the MIT License.
Icon made by
Smashicons
from
www.flaticon.com
is licensed by
CC 3.0 BY


I am a software developer who graduated from Queens University Belfast with an Meng Computer Science degree. I have been programming now for about 10 years and worked as an Assistant Software Developer in Liberty I.T. for 14 months. I have now returned to Liberty I.T. as a Principal Software Engineer focusing on User Experience and have been working there from 27th June 2011.
I like to do projects in my spare time so who knows I might stumble upon something interesting someday...
Web: HTML5, CSS3, Javascript, TypeScript, Ajax, JQuery, Flash, JSP, PHP, ASP, MySQL, XML, XSL, JSTL Desktop: .NET, C, C++, C#, Objective C, CUDA C, WCF, Java, VB, SQL, Prolog, XML, XSL
Codeigniter, Wordpress, Play, SpringBoot, Angular, Angular2 Backbone
QTP, Winrunner, Watir and HP Quality Center


Highway Framework
The fastest road to good architecture.
- Updated to remove chance of calling non-writable properties – Thanks Ed Blakes
- Updated Async API and Sync API to be independent
- Added
Context
on Command
and Scalar
Interceptors – Thanks Marcin Dzwonnik
- Fixed bug that allowed
InMemoryDataContext
to return null results
- Fixing null reference in adding back reference to non-existent collection
- Adding back reference population for
InMemoryDataContext
- Adding Async API for
DataContext
- Adding Expand behavior config option for OData provider
- Adding Enum to Text and Enum to Number support for OData provider
- Updated Entity Framework minimum dependency to 6.1.3
- Fixed an issue with inherited objects not returning for queries on
InMemoryDataContext
- Adding Virtual keyword for
DataContext
extension to most methods
- Fixed
StackOverflowException
in InMemoryDataContext
- Alignment fix in Readme.markdown – Thanks Ken Dale
- Adding Fluent query for testing
FindWhere
under prebuilt queries. – Thanks Philip Mateescu
DomainRepositoryFactory
doesn’t throw on null event collection – Eric Burcham
- Added
InMemoryActiveDataContext
to allow for multiple repositories using a single in memory – The beginnings of a “prod” in memory context – Long Mai
- Queued Add and Remove –
InMemoryDataContext
now acts more like a real database as it doesn’t return added records or modify collections in loops. – Long Mai
- Identity Strategies are invoked automatically on commit – Long Mai
- Brought back .NET 4.0 support
- Updated to Entity Framework 6.0.2
- Updated to CommonServiceLocator 1.2
- Updated to Common.Logging 2.2.0


| Top |
| gboolean | hhomogeneous | Read / Write |
| gboolean | homogeneous | Read / Write |
| gboolean | interpolate-size | Read / Write |
| guint | transition-duration | Read / Write |
| gboolean | transition-running | Read |
| GtkStackTransitionType | transition-type | Read / Write |
| gboolean | vhomogeneous | Read / Write |
| GtkWidget * | visible-child | Read / Write |
| gchar * | visible-child-name | Read / Write |
The GtkStack widget is a container which only shows one of its children at a time. In contrast to GtkNotebook, GtkStack does not provide a means for users to change the visible child. Instead, the GtkStackSwitcher widget can be used with GtkStack to provide this functionality.
Transitions between pages can be animated as slides or
fades. This can be controlled with gtk_stack_set_transition_type()
.
These animations respect the “gtk-enable-animations”
setting.
The GtkStack widget was added in GTK+ 3.10.
void gtk_stack_add_named (GtkStack *stack
,GtkWidget *child
,const gchar *name
);
Adds a child to stack
.
The child is identified by the name
.
Since: 3.10
void gtk_stack_add_titled (GtkStack *stack
,GtkWidget *child
,const gchar *name
,const gchar *title
);
Adds a child to stack
.
The child is identified by the name
. The title
will be used by GtkStackSwitcher to represent
child
in a tab bar, so it should be short.
stack |
a GtkStack |
|
child |
the widget to add |
|
name |
the name for |
|
title |
a human-readable title for |
Since: 3.10
GtkWidget * gtk_stack_get_child_by_name (GtkStack *stack
,const gchar *name
);
Finds the child of the GtkStack with the name given as
the argument. Returns NULL
if there is no child with this
name.
Since: 3.12
void gtk_stack_set_visible_child (GtkStack *stack
,GtkWidget *child
);
Makes child
the visible child of stack
.
If child
is different from the currently
visible child, the transition between the
two will be animated with the current
transition type of stack
.
Note that the child
widget has to be visible itself
(see gtk_widget_show()
) in order to become the visible
child of stack
.
Since: 3.10
GtkWidget *
gtk_stack_get_visible_child (GtkStack *stack
);
Gets the currently visible child of stack
, or NULL
if
there are no visible children.
Since: 3.10
void gtk_stack_set_visible_child_name (GtkStack *stack
,const gchar *name
);
Makes the child with the given name visible.
If child
is different from the currently
visible child, the transition between the
two will be animated with the current
transition type of stack
.
Note that the child widget has to be visible itself
(see gtk_widget_show()
) in order to become the visible
child of stack
.
Since: 3.10
const gchar *
gtk_stack_get_visible_child_name (GtkStack *stack
);
Returns the name of the currently visible child of stack
, or
NULL
if there is no visible child.
Since: 3.10
void gtk_stack_set_visible_child_full (GtkStack *stack
,const gchar *name
,GtkStackTransitionType transition
);
Makes the child with the given name visible.
Note that the child widget has to be visible itself
(see gtk_widget_show()
) in order to become the visible
child of stack
.
stack |
a GtkStack |
|
name |
the name of the child to make visible |
|
transition |
the transition type to use |
Since: 3.10
void gtk_stack_set_homogeneous (GtkStack *stack
,gboolean homogeneous
);
Sets the GtkStack to be homogeneous or not. If it is homogeneous, the GtkStack will request the same size for all its children. If it isn't, the stack may change size when a different child becomes visible.
Since 3.16, homogeneity can be controlled separately for horizontal and vertical size, with the “hhomogeneous” and “vhomogeneous”.
Since: 3.10
gboolean
gtk_stack_get_homogeneous (GtkStack *stack
);
Gets whether stack
is homogeneous.
See gtk_stack_set_homogeneous()
.
Since: 3.10
void gtk_stack_set_hhomogeneous (GtkStack *stack
,gboolean hhomogeneous
);
Sets the GtkStack to be horizontally homogeneous or not. If it is homogeneous, the GtkStack will request the same width for all its children. If it isn't, the stack may change width when a different child becomes visible.
Since: 3.16
gboolean
gtk_stack_get_hhomogeneous (GtkStack *stack
);
Gets whether stack
is horizontally homogeneous.
See gtk_stack_set_hhomogeneous()
.
Since: 3.16
void gtk_stack_set_vhomogeneous (GtkStack *stack
,gboolean vhomogeneous
);
Sets the GtkStack to be vertically homogeneous or not. If it is homogeneous, the GtkStack will request the same height for all its children. If it isn't, the stack may change height when a different child becomes visible.
Since: 3.16
gboolean
gtk_stack_get_vhomogeneous (GtkStack *stack
);
Gets whether stack
is vertically homogeneous.
See gtk_stack_set_vhomogeneous()
.
Since: 3.16
void gtk_stack_set_transition_duration (GtkStack *stack
,guint duration
);
Sets the duration that transitions between pages in stack
will take.
Since: 3.10
guint
gtk_stack_get_transition_duration (GtkStack *stack
);
Returns the amount of time (in milliseconds) that
transitions between pages in stack
will take.
Since: 3.10
void gtk_stack_set_transition_type (GtkStack *stack
,GtkStackTransitionType transition
);
Sets the type of animation that will be used for
transitions between pages in stack
. Available
types include various kinds of fades and slides.
The transition type can be changed without problems at runtime, so it is possible to change the animation based on the page that is about to become current.
Since: 3.10
GtkStackTransitionType
gtk_stack_get_transition_type (GtkStack *stack
);
Gets the type of animation that will be used
for transitions between pages in stack
.
Since: 3.10
gboolean
gtk_stack_get_transition_running (GtkStack *stack
);
Returns whether the stack
is currently in a transition from one page to
another.
Since: 3.12
gboolean
gtk_stack_get_interpolate_size (GtkStack *stack
);
Returns wether the GtkStack is set up to interpolate between the sizes of children on page switch.
Since: 3.18
void gtk_stack_set_interpolate_size (GtkStack *stack
,gboolean interpolate_size
);
Sets whether or not stack
will interpolate its size when
changing the visible child. If the “interpolate-size”
property is set to TRUE
, stack
will interpolate its size between
the current one and the one it'll take after changing the
visible child, according to the set transition duration.
Since: 3.18
These enumeration values describe the possible transitions between pages in a GtkStack widget.
New values may be added to this enumeration over time.
|
No transition |
||
|
A cross-fade |
||
|
Slide from left to right |
||
|
Slide from right to left |
||
|
Slide from bottom up |
||
|
Slide from top down |
||
|
Slide from left or right according to the children order |
||
|
Slide from top down or bottom up according to the order |
||
|
Cover the old page by sliding up. Since 3.12 |
||
|
Cover the old page by sliding down. Since: 3.12 |
||
|
Cover the old page by sliding to the left. Since: 3.12 |
||
|
Cover the old page by sliding to the right. Since: 3.12 |
||
|
Uncover the new page by sliding up. Since 3.12 |
||
|
Uncover the new page by sliding down. Since: 3.12 |
||
|
Uncover the new page by sliding to the left. Since: 3.12 |
||
|
Uncover the new page by sliding to the right. Since: 3.12 |
||
|
Cover the old page sliding up or uncover the new page sliding down, according to order. Since: 3.12 |
||
|
Cover the old page sliding down or uncover the new page sliding up, according to order. Since: 3.14 |
||
|
Cover the old page sliding left or uncover the new page sliding right, according to order. Since: 3.14 |
||
|
Cover the old page sliding right or uncover the new page sliding left, according to order. Since: 3.14 |
“hhomogeneous”
property“hhomogeneous” gboolean
TRUE
if the stack allocates the same width for all children.
Flags: Read / Write
Default value: TRUE
Since: 3.16
“homogeneous”
property“homogeneous” gboolean
Homogeneous sizing.
Flags: Read / Write
Default value: TRUE
“interpolate-size”
property“interpolate-size” gboolean
Whether or not the size should smoothly change when changing between differently sized children.
Flags: Read / Write
Default value: FALSE
“transition-duration”
property“transition-duration” guint
The animation duration, in milliseconds.
Flags: Read / Write
Default value: 200
“transition-running”
property“transition-running” gboolean
Whether or not the transition is currently running.
Flags: Read
Default value: FALSE
“transition-type”
property“transition-type” GtkStackTransitionType
The type of animation used to transition.
Flags: Read / Write
Default value: GTK_STACK_TRANSITION_TYPE_NONE
“vhomogeneous”
property“vhomogeneous” gboolean
TRUE
if the stack allocates the same height for all children.
Flags: Read / Write
Default value: TRUE
Since: 3.16
“visible-child”
property“visible-child” GtkWidget *
The widget currently visible in the stack.
Flags: Read / Write
“visible-child-name”
property“visible-child-name” gchar *
The name of the widget currently visible in the stack.
Flags: Read / Write
Default value: NULL
“icon-name”
child property“icon-name” gchar *
The icon name of the child page.
Flags: Read / Write
Default value: NULL
“name”
child property“name” gchar *
The name of the child page.
Flags: Read / Write
Default value: NULL
“needs-attention”
child property“needs-attention” gboolean
Sets a flag specifying whether the child requires the user attention. This is used by the GtkStackSwitcher to change the appearance of the corresponding button when a page needs attention and it is not the current one.
Flags: Read / Write
Default value: FALSE
Since: 3.12
“position”
child property“position” gint
The index of the child in the parent.
Flags: Read / Write
Allowed values: >= -1
Default value: 0
“title”
child property“title” gchar *
The title of the child page.
Flags: Read / Write
Default value: NULL


Various utility classes¶
- class asab.abc.Singleton[source]¶
Bases:
type
The singleton pattern is a software design pattern that restricts the instantiation of a class to one object.
Note: The implementation idea is borrowed from “Creating a singleton in Python” question on StackOverflow.
Singleton¶
- class asab.abc.singleton.Singleton[source]¶
The singleton pattern is a software design pattern that restricts the instantiation of a class to one object.
Note: The implementation idea is borrowed from “Creating a singleton in Python” question on StackOverflow.
Usage:
import asab
class MyClass(metaclass=asab.Singleton):
...
Persistent dictionary¶
- class asab.pdict.PersistentDict(path)[source]¶
Bases:
dict
The persistent dictionary works as the regular Python dictionary but the content of the dictionary is stored in the file. You cat think of a
PersistentDict
as a simple key-value store. It is not optimized for a frequent access. This class provides commondict
interface.Warning: You must explicitly load() and store() content of the dictionary Warning: You can only store objects in the persistent dictionary that are serializable.
- update(other=(), **kwds) None [source]¶
Update D from mapping/iterable E and F. * If E present and has a .keys() method, does: for k in E: D[k] = E[k] * If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v * In either case, this is followed by: for k, v in F.items(): D[k] = v
Inspired by a https://github.com/python/cpython/blob/3.8/Lib/_collections_abc.py
Note: A recommended way of initializing the persistent dictionary:
PersistentState = asab.PersistentDict("some.file")
PersistentState.setdefault('foo', 0)
PersistentState.setdefault('bar', 2)
Timer¶
- class asab.timer.Timer(app, handler, autorestart=False)[source]¶
Bases:
object
The relative and optionally repeating timer for asyncio.
This class is simple relative timer that generate an event after a given time, and optionally repeating in regular intervals after that.
- Parameters:
app – An ASAB application.
handler – A coro or future that will be called when a timer triggers.
autorestart (boolean) – If True then a timer will be automatically restarted after triggering.
- Variables:
Handler – A coro or future that will be called when a timer triggers.
Task – A future that represent the timer task.
App – An ASAB app.
AutoRestart (boolean) – If True then a timer will be automatically restarted after triggering.
The timer object is initialized as stopped.
Note: The implementation idea is borrowed from “Python - Timer with asyncio/coroutine” question on StackOverflow.
- restart(timeout)[source]¶
Restart the timer.
- Parameters:
timeout (float/int) – A timer delay in seconds.
Sockets¶
- class asab.socket.StreamSocketServerService(app, service_name)[source]¶
Bases:
Service
Example of use:
class ServiceMyProtocolServer(asab.StreamSocketServerService):
- async def initialize(self, app):
host = asab.Config.get(‘http’, ‘host’) port = asab.Config.getint(‘http’, ‘port’)
L.debug(“Starting server on {} {} …”.format(host, port)) await self.create_server(app, MyProtocol, [(host, port)])


Pause/continue: space
Use more revealing colors
Run faster than one calculation pass per frame.
Show debugging controls
Source
toggleRun
FPS:
0.0
step
test
Show test canvas
Show debug area


JUnit tests should include at least one assertion. This makes the tests more robust, and using assert with messages provide the developer a clearer idea of what the test does.
public class Foo extends TestCase { public void testSomething() { Bar b = findBar(); b.work(); // violation, we could use assertNotNull("bar not found", b); } }


SUPPORT LINKS
Honeywell
Fireye
HELPFUL LINKS
Thomas Register
Hester-Bradley
ABMA
© Copyright,
Debco Equipment Co., Inc 2003
Home
Boiler Room Specialists Since 1953
Did You Know? -
Many boilers are misapplied?
Energy Reduction upgrades are available for your current equipment?
Some boilers cost more to maintain than others?
High Burner Turndown can shorten boiler life?
Some boilers are safer to operate than others?
Boiler steam space can affect your plant operation?
Changing out a boiler is not as simple as like-for-like?
Some boilers fit certain applications better than others?
Hot oil can be better than high pressure steam?
Air and Dirt in your hydronic system may be a high and unknown expense?
DEBCO EQUIPMENT COMPANY
º
1814 South Third St.
º
St. Louis, MO 63104


Family: Count de Morcerf (father), Madame de Morcerf (mother)
Good friend of Baron Franz d'Épinay. He partied with Franz at the Carnival in Rome. There, they became acquanticed with the Count of Monte Cristo, who happened to be staying in the same hotel as them. In Rome, Albert was kidnapped and held for ransom by Luigi Vampa's group of bandits. Being good friends with Vampa, the Count was able to rescue Albert and Albert declares himself eternally indebted to the Count. Because of this, the Count was able to be introduced into Paris society.
After discovering that the Count was responsible for the denunciation of his father, Albert insults the Count and challenges him to a duel. Before the duel is able to take place, Albert apologizes to the Count, who gratefully forgives him.
Tarnished by the name of his father, Albert and his mother relinquish the Count de Morcef's fortune and flee to live in Marseilles in a house bought by the Count for Mercédès. Albert joins the Spahi regiment to support himself and his mother.


new User()
User is the parent class of all Curse users we'll find here
Properties:
| Name | Type | Description |
|---|---|---|
client |
Client | |
ID |
number | Curse ID of the current user. |
Methods
username(callback)
Get the name of the curse account for this user (asynchronously).
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function | Callback: (errors, username) => {}.
|


Angular JS is a library written in JS.
When writing an application that uses angular it is required to include it
with the ‹ script › tag
locally - that is by downloading angular.js and including it
globally - by including the same file by CDN (Content Developer Network)
It is prefered to use the global method , because the client has the newest, most stable version of angulars library
Also this way makes the connection between the client and the server more efficient, by reducing the traffic.
Having a local copy gives independence from the internet connection


OpenBazaar Charts
Shows the number of nodes currently being run on the network
Look at the total number of listings that have been created
View how many ratings have been given for listings
Discover how many people are selling their products
Find out which version of OB people are running
Learn about the API and find more information about OpenBazaar


One-way bindings
First name: {{bob.firstName}}
Last name: {{bob.lastName}}
Full name: {{bob.fullName}}
Age: {{bob.age}}
Signed agreement? {{bob.signedAgreement}}
Number of favorite colors: {{bob.favoriteColors.length}}
Number of addresses: {{bob.addresses.length}}
Dotted notation works into lists: {{bob.favoriteColors[0].name}}
Dotted notation works into maps: {{bob.addresses['home'].city}}
Conditional attributes
Check my attributes, I have a signed-agreement attr
I will not have a has-company attr
Two-way binding
First name:
Iteration aka looping aka repeat
Looping over keys in a map:
- {{bob.addresses[k].city}}
Expressions
You can do math: {{ (1+2) / 3 * 100 }}
You can logical not (!): {{ !bob.signedAgreement }}
Conditionals
< work
&& and || also works
== also works, as does !=
With a boolean
Yay they signed the agreement.
Why you no like to sign?
With a null
conditionals also work with null (false) (see source)
Does not show up, company is null
This does show up, company is null, which is treated as false
Filters and transformers
Uppercase: {{bob.fullName | uppercase}}
Gracefully handle a non-existant property
This should not break the app, even though we're accessing a null: {{ thisIsNull.street }}
this should not break the app


0% EMI Available
Apple Macbook Pro
01 Year Warranty
HP ENVY x360 Core i7 11th Gen
Price: 1,22,000৳ 1,40,000৳
HP ENVY x360 Convert 13m-bd0023dx Touch Laptop comes with Intel Core i7-1165G7 Processor (12M Cache, up to 4.70 GHz, with IPU), 8GB DDR4-2933 SDRAM, 512 GB PCIe NVMe M.2 SSD, Intel Iris Xe Graphics and Windows 10 Home.


|
hcash
2.0.0
hcash
|
#include <BalanceOperations.hpp>
Public Member Functions | |
| DepositContractOperation () | |
| DepositContractOperation (const ContractIdType &id, const Asset &amount, const fc::enum_type< uint8_t, DepositContractType > &type) | |
| BalanceIdType | balance_id () const |
| void | evaluate (TransactionEvaluationState &eval_state) const |
Public Attributes | |
| ShareType | amount |
| WithdrawCondition | condition |
Static Public Attributes | |
| static const OperationTypeEnum | type = deposit_contract_op_type |
|
inline |
|
inline |
| BalanceIdType hsrcore::blockchain::DepositContractOperation::balance_id | ( | ) | const |
| void hsrcore::blockchain::DepositContractOperation::evaluate | ( | TransactionEvaluationState & | eval_state | ) | const |
| ShareType hsrcore::blockchain::DepositContractOperation::amount |
| WithdrawCondition hsrcore::blockchain::DepositContractOperation::condition |
|
static |


The report aims to serve as an introduction to sorting algorithms and to present the ideas, the design and the technology used for the implementation of a software in JavaScript capable of visualising sorting processes. The software takes advantage of the latest JavaScript technology for creating optimized CPU and battery-friendly web animations known as requestAnimationFrame(). The web application is highly interactive and equipped with powerful tools for visualising the sorting approaches covered in COM1009 Introduction to Algorithms and Data Structures. The software is able to compare the performance of different sorting algorithms on large inputs based on number of comparisons and swaps, distance traveled and time required to execute.


The Drinking Game
Use developer console to test the code or a play a game
to add a player: persons.push(new Person('A Name'))
to view all players all info: show_persons()
Game Console
- Console Commands:
- persons.push(new Person('A Name')) -> Adds a new player to list
- show_persons() -> Lists all the players in the game
- Notes
- persons is a list of player which the call Persons randomly assign a Race to a player
You have to give it a Name
You can optionally assign it an experiences as well
persons.push(new Person('A Name', 'have to exist experience'))
The push.persons() command put the new player into the persons list of players
- show_persons() -> Lists all the player that are the list and thus in the game
- Data
- Races
- "Human"
- "Orc"
- "Elf"
- 'Troll'
- 'Giant'
- 'Orc'
- 'Fairy'
- 'Were Creature'
- 'Vampire'
- 'Dragon Kin'
- 'Centaur'
- 'Golem'
- 'Goblin
- Experiences
- 'Wizard'
- 'Summoner'
- 'Warlock'
- 'Knight'
- 'Rogue'
- 'Cleric'
- 'Monk'
- 'Paladin'
- 'Ranger'
- 'Hedge Witch'
- 'Black Smith'
- 'Engineer'
- 'Hunter


An Object-Oriented Database V. 0.1 Mail to: ODB for Win 95 / NT |
The datatype collection is somewhat more complex than the other datatypes supported by ODB. A collection is similar to a set with the difference that a collection can contain several equal objects or values.
Collections are created by sending the create_collection message to the database object. On successful creation a handle to an empty collection is returned. This handle must ALWAYS be assigned a reference owned by the application since the collection otherwise will be unaccessible to the application. The application owned reference can be released when the collection is referenced from elswhere, e.g. through an attribute of some object.
A collection which may contain references to other objects is created and assigned a collection handle ch as:
ODB_SET ch; ch=My_DB.create_collection(_OBJECT_);Valid type identifiers are to the create_collection method are:
When a collection has been created elements may be inserted into the collection. ODB supports two way of doing this; by sending the collection_insert message to the database object or by sending the insert message directly to the collection object.
In the following example a collection of character strings are created and bound to the handle coll. Then two elements are inserted into the set by collection_insert and by insert.
ODB_SET coll; //Create a collection coll=My_DB.create_collection(_CHAR_); My_DB.collection_insert(coll,"Object"); coll->insert("Orientation");The difference with these two ways is that by sending the collection_insert message to the database objects all necessary checks are performed before insertion. When the insert message is sent to a collection the application must ensure that the collection is of the correct type and that the collection handle is initialized properly.
The return value from collection_insert is:
Elements may be deleted from a collection by either sending the delete_element message to the set object or by sending the delete_from_collection message to the database object. In the following example objects are deleted from the set coll.
ODB_SET coll; //Create collection coll=My_DB.create_collection(_INT_); //Insert into collection using both //insertion methods My_DB.collection_insert(coll,2); coll->insert(3); //remove from collection My_DB.delete_from_collection(coll,3); coll->delete(2);Using the delete_from_collection message to the database object is a safer way since all necessary checks are performed before deketion of any element. However, sending the delete message directly to the collection object is slightly faster but then the application must ensure that the handle is initialized etc.
Note especially that before using the delete message directly to the collection object to delete an ODB_CHAR the characterstring must be substituted with the characterstring stored in the string table. The same is true for inserting characterstrings directly into a collection The following example illustrates the correct procedure:
ODB_REF cstr, cstr2; ODB_SET coll; coll=My_DB.create_collection(_CHAR_); //Get a handle to the stored ODB string //Don't bother if you know it does not //exist, ODB takes all reqd actions cstr=My_DB.getstring("ODB"); //Insert it into the collection My_DB.collection_insert(coll,cstr); //The following will not delete //ODB from the collection coll.delete("ODB"); //The following will delete // "ODB" from the collection cstr2=My_DB.getstring("ODB"); coll.delete(cstr2);
Collections are deleted by either sending the delete_collection message to the database object or the delete_set message to the collection object.
There are a number of ODB specific datatypes and type identifiers that are used to interface ODB in the API.
There are a number of C++ datatypes and classes defined in the API these are:
| C++ datatype | Type of data |
|---|---|
| ODB_INT | integer |
| ODB_REAL | real |
| ODB_OID | oid |
| ODB_CHAR | charstring |
| ODB_REF | object handle |
| ODB_SET | collection handle |
| ODB_QSTREAM | query stream handle |
| ODB_SSTREAM | select stream handle |
| ODB_SJSTREAM | semi-join stream handle |
| ODB_DB | database object |
| ODB_DB_HANDLE | odb database handle |
| ODB_TYPE | odb type handle |
These types are used by the application using ODB to declare interface variables to ODB. The C++ classes the API provides are:
| C++ Class | Ref. decl | Description |
|---|---|---|
| Database | ODB_DB | The ODB database class |
| Type | ODB_TYPE(ref.) | The ODB type class |
| Object | ODB_REF (ref.) | The ODB object class |
| Outputbuffer | N/A | The ODB outputbuffer class |
There are a number of type identifiers defined in the API which are used to specify to ODB which type to consider. These are:
| Type Id | C++ Type |
|---|---|
| _INT_ | ODB_INT |
| _REAL_ | ODB_REAL |
| _CHAR_ | ODB_CHAR |
| _OBJECT_ | ODB_REF |
| _OBJECT_COLLECTION_ | ODB_SET |
| _INT_COLLECTION_ | ODB_SET |
| _REAL_COLLECTION_ | ODB_SET |
| _CHAR_COLLECTION_ | ODB_SET |
Note that the C++ datatype ODB_SET is used to denote all collection types. The type identifiers are used to denote the result type of properties when these are created and to denote which type of elements a collection can contain.
In addition to database creation, maintenance and querying there a methods to print objects, retrieve object and types etc. these are described here.
Each database object contains a stringtable where all strings used by the datbase are stored. Before some operatons involving strings can be executed the application must get a handle to the string maintained by the database otherwise equality tests etc. will not function properly. In most cases ODB does this for you.
A string handle to a prticular string is obtained by sending the getstring message to the database object. In the following example a handle is obtained to the string "ODB Rules".
ODB_CHAR str; str=My_DB.getstring("ODB Rules");The following example demonstrates the benefit if the string table:
ODB_CHAR s1, s2; s1=My_DB.getstring("ODB"); s2=My_DB.getstring("ODB"); if (s1==s2) cout << "\nODB Rules\n"; else cout << "\nYou cheated\n");The output will of course be: ODB Rules
All objects, types and databases may be printed by sending the display message to the object. To support any print-method the application may want to utilize all display methods of all ODB objects print in a buffer which is provided by the ODBAPI.
The display message can be sent to any OBD object with a display buffer as argument as:
displaybuffer buf; database odb; ODB_TYPE tp; //Create a type tp=odb.create_type("Person"); //print type to buffer tp->display(buf); //print buffer to stdout cout << buf.get_buffer(); //reset buffer before used buf.reset_buffer();
OBD provides a class named outputbuffer which all display methods use. A buffer, Disp_Buf is declared in the application as:
outputbuffer DispBuf;The buffer can be retrieved by sending the get_buffer message as:
Disp_Buf.getbuffer();The return value is a reference to a character buffer as:
ODB_CHAR BufPtr BufPtr=Disp_Buf.getbuffer();The reference to the buffer can then be used by the application to print the content of the buffer on a widget in a GUI or on a tex display using cout etc.as e.g.:
ODB_CHAR BufPtr BufPtr=Disp_Buf.getbuffer(); cout << BufPtr;When the buffer has been printed or to prevent it from overflowing it can be emptied by sending the reset_buffer message to the buffer object as:
DispBuf.reset_buffer();The buffer size is 1k and if there is not enough free space in it when used by some object, the display output from the object will be lost.
If a handle is required to a type for e.g. printing the gettypenamed message to the database object as:
ODB_TYPE tp; tp=My_DB.gettypenemrd("Person");In this example a handle is returned to the type named Person. If no such type exists the NULL handle is returned.
Object handles can retreived by using the query interface, see Section 5.0, or by sending the getobjectwithoid message to the database object as:
ODB_REF o; o=My_DB.getobjectwithoid("Usertypes",45);In this example the object with oid equal 45 is returned, if no such object exist a NULL handle is returned. Note especially that there is no guarantee that objects will get the same oid when reloaded from file, in fact it is very likely that it will get another oid.
If the application for some reason wants to traverse the type tree of the database the application then first sends the getallsubtypes message to the database object to get the first subtype. All subsequent subtypes are retreived one by one by sending the getnextsubtype message to the database object. The following exaple shows how all types in the database are printed on stdout:
ODB_CHAR tp; //type names ODB_TYPE tph; //type handle database My_DB; My_DB.load_database("Compdb.odb"); tp=My_DB.getallsubtypes(); while(tp!=NULL){ cout << tp << `\n'; tp=My_DB.getnextsubtype(); //Type handles to the subtypes //can be obtained as tph=My_DB.gettypenamed(tp); }
char *tp; //type names ODB_TYPE tph; //type handle database My_DB; My_DB.load_database("Compdb.odb"); tp=My_DB.getsubtypes("Person"); while(tp!=NULL){ cout << tp << `\n'; tp=My_DB.getsubtype("Person"); //Type handles to the subtypes //can be obtained as tph=My_DB.gettypenamed(tp); }In this example all direct subtypes of the type named Person are retreived.
The supertype name of a particular type can be retreived by using the getsupertype message to the database object.
In this example the supertypename of the type named Employee is retreived and then used to get a handle to the supertype to the type named Employee.
ODB_CHAR stpnm; ODB_TYPE stp; stpnm=My_DB.getsupertype("Employee"); stp=My_DB.gettypenamed(stpnm);
The names of all properties of a type can be retreived b y first sending the getfirstprop messageto the database object and then get the rest of the property names by sending the getnextprop message to the database object.
In this example all properties of the type named Employee are printed to stdout.
ODB_CHAR pn; //prop names database My_DB; My_DB.load_database("Compdb.odb"); pn=My_DB.getfirstprop("Employee"); while(pn!=NULL){ cout << pn << `\n'; pn=My_DB.getnextprop("Employee"); }
As described in Section 4.3 all properties are associated with a type where the type describes which objects the property can have as values.
The type of a property can be retreived by sending the getpropertytype message to the database object. The returned value is a type identifier see section 4.3. In the following example the type identifier is retreived from the name property of the Person type.
ODB_TYPE_TAG ttg; ttg=My_DB.getpropertytype("Person","Name");
Each property denotes a value or other object. To retreive the denoted value or object the application sends the getproperty_value message to the database object.
It is important to note that the return value is a code indicating the success of the operation. The value is retreived by sending the reference to the variable the result is intendet to be retreived into. In the next example the value of a set valued property is retreived into the variable coll:
ODB_SET coll; ODB_REF obj; //obj is assigned a person object //and person have a collection //valued property named Parents //defined to them. ok=My_DB.getproperty_value(obj,"Parents",&coll);The return value is:
This system is intended to support developers in managing moderately sized data in an easy manner. The data can be created and changed outside the application by using a graphical user interface and later loaded into the application easily without any recompilation or other cumbersome procedure.
The system supports the object-oriented data modelling paradigm for the data stored.
The data can easily be queried
through a high level stream based interface which the API provides.
This is the firs released version of the system and any bug reports or comments
are welcomned to me.
| Mail to ODB for Win 95 / NT |


18-year-old Golden Gate Estates man reported missing
COLLIER COUNTY, Fla. -- Deputies are asking for help locating a missing Golden Gate Estates 18-year-old.
According to the Collier County Sheriff's Office, Justin Wimmer was last seen around 2:30 a.m. Thursday, November 14 by his roommates at their residence in the 200 block of 15th Street Southwest.
Wimmer is described as 5 feet 11 inches tall and 140 pounds with brown hair and brown eyes.
If you have any information on his whereabouts, please contact the Collier County Sheriff's Office at<PHONE_NUMBER>.


what we do for you
We will help you with support 24/7 to create an incredible BucketList that you can keep and store your memories forever and then view from wherever you are.
We will help you with support 24/7 to create an incredible BucketList that you can keep and store your memories forever and then view from wherever you are.
We ensure that your BucketList will be safe from those dreaded hackers and that your pictures and memories will always be accessible in your account.
No matter what your age is you can make and achieve your bucket list. Don't let anyone tell you otherwise. The sky is the limit.
Don't know where to start?


Shell¶
The Corda shell is an embedded command line that allows an administrator to control and monitor the node. Some of its features include:
- Invoking any of the RPCs the node exposes to applications.
- Starting flows.
- View a dashboard of threads, heap usage, VM properties.
- Uploading and downloading zips from the attachment store.
- Issue SQL queries to the underlying database.
- View JMX metrics and monitoring exports.
- UNIX style pipes for both text and objects, an
egrep
command and a command for working with columnular data.
Note
A future version of Corda will add SSH access to the node.
It is based on the popular CRaSH shell used in various other projects and supports many of the same features.
The shell may be disabled by passing the --no-local-shell
flag to the node.
Getting help¶
You can run help
to list the available commands.
The shell has a man
command that can be used to get interactive help on many commands. You can also use the
--help
or -h
flags to a command to get info about what switches it supports.
Commands may have subcommands, in the same style as git
. In that case running the command by itself will
list the supported subcommands.
Starting flows and performing remote method calls¶
Flows are the way the ledger is changed. If you aren’t familiar with them, please review “Writing flows”
first. The flow list
command can be used to list the flows understood by the node and flow start
can be
used to start them. The flow start
command takes the class name of a flow, or any unambiguous substring and
then the data to be passed to the flow constructor. The unambiguous substring feature is helpful for reducing
the needed typing. If the match is ambiguous the possible matches will be printed out. If a flow has multiple
constructors then the names and types of the arguments will be used to try and determine which to use automatically.
If the match against available constructors is unclear, the reasons each available constructor failed to match
will be printed out. In the case of an ambiguous match, the first applicable will be used.
RPCs (remote procedure calls) are commands that can be sent to the node to query it, control it and manage it.
RPCs don’t typically do anything that changes the global ledger, but they may change node-specific data in the
database. Each RPC is one method on the CordaRPCOps
interface, and may return a stream of events that will
be shown on screen until you press Ctrl-C. You perform an RPC by using run
followed by the name.
Whichever form of change is used, there is a need to provide parameters to either the RPC or the flow constructor. Because parameters can be any arbitrary Java object graph, we need a convenient syntax to express this sort of data. The shell uses a syntax called Yaml to do this.
Data syntax¶
Yaml (yet another markup language) is a simple JSON-like way to describe object graphs. It has several features that make it helpful for our use case, like a lightweight syntax and support for “bare words” which mean you can often skip the quotes around strings. Here is an example of how this syntax is used:
flow start CashIssue amount: $1000, issueRef: 1234, recipient: Bank A, notary: Notary Service
This invokes a constructor of a flow with the following prototype in the code:
class CashIssueFlow(val amount: Amount<Currency>,
val issueRef: OpaqueBytes,
val recipient: Party,
val notary: Party) : AbstractCashFlow(progressTracker)
Here, everything after CashIssue
is specifying the arguments to the constructor of a flow. In Yaml, an object
is specified as a set of key: value
pairs and in our form, we separate them by commas. There are a few things
to note about this syntax:
- When a parameter is of type
Amount<Currency>
you can write it as either one of the dollar symbol ($), pound (£), euro (€) followed by the amount as a decimal, or as the value followed by the ISO currency code e.g. “100.12 CHF” OpaqueBytes
is filled with the contents of whatever is provided as a string.Party
objects are looked up by name.- Strings do not need to be surrounded by quotes unless they contain a comma or embedded quotes. This makes it a lot more convenient to type such strings.
Other types also have sensible mappings from strings. See the defined parsers for more information.
Nested objects can be created using curly braces, as in { a: 1, b: 2}
. This is helpful when no particular
parser is defined for the type you need, for instance, if an API requires a Pair<String, Int>
which could be represented as { first: foo, second: 123 }
.
The same syntax is also used to specify the parameters for RPCs, accessed via the run
command, like this:
run getCashBalances
Attachments¶
The shell can be used to upload and download attachments from the node interactively. To learn more, see the tutorial “Using attachments”.
Extending the shell¶
The shell can be extended using commands written in either Java or Groovy (Groovy is a scripting language that is Java compatible). Such commands have full access to the node internal APIs and thus can be used to achieve almost anything.
A full tutorial on how to write such commands is out of scope for this documentation, to learn more please
refer to the CRaSH documentation. New commands can be placed in the shell-commands
subdirectory in the
node directory. Edits to existing commands will be used automatically, but at this time commands added after the
node has started won’t be automatically detected. Commands should be named in all lower case with either a
.java
or .groovy
extension.
Warning
Commands written in Groovy ignore Java security checks, so have unrestricted access to node and JVM internals regardless of any sandboxing that may be in place. Don’t allow untrusted users to edit files in the shell-commands directory!
Limitations¶
The shell will be enhanced over time. The currently known limitations include:
- You cannot use it to upload/download attachments.
- SSH access is currently not available.
- There is no command completion for flows or RPCs.
- Command history is not preserved across restarts.
- The
jdbc
command requires you to explicitly log into the database first. - Commands placed in the
shell-commands
directory are only noticed after the node is restarted. - The
jul
command advertises access to logs, but it doesn’t work with the logging framework we’re using.


Weekend Plan
Hi All,
咱们这周六去 Wachusett Montain 滑雪，以下是我查到的票价。
Bring a Friend for Fun
(BFF Package) $110
External Link
Package includes:
- One Day Lift Ticket ($71 value)
- One Day Learn To Ski/Ride Package ($99 value)
(includes Monadnock Lift, Rentals and Lesson)
All Area Lifts Ticket (Weekend)
External Link
Monadnock Quad & Carpet Lifts
(Saturday One-Day) $74
Rental
- Ski/snowboard
$40
- Helmet
$9
我女朋友已经有票了，我这次想买一个BBF Package，学一下单板，这样还能拼出一张Lift票。What do you say？


The uiIntegrationProvider interface can be implemented to customize ui-component creation and template resolving. The custom implementation needs to be published as 'uiIntegrationProvider' in the $injector-service of the angular application running the ui-components. The ui-components implementations checks the $injector, if the 'uiIntegrationProvider' is available and invokes the necessary callback functions.
- Version:
- 1.1
- Source:
Methods
-
createComponentInstance(pkg, name, attrs, scope)
-
Create the component instance that can be referenced as comp parameter in the corresponding template of the ui-component. By default, an empty object ({}) is created.
Parameters:
Name Type Description pkg
string The package of the ui-component as given in the ui.component function. name
string The name of the ui-component as given in the ui.component function. attrs
map The attribute specification of the ui-component as given in the ui.component function. scope
Scope The angular scope this component will be bound to. - Source:
-
getTemplateUrl(pkg, name, tAttrs)
-
Return the template url that should be used to load the html-template for the ui-component denoted by pkg and name. This callback method allows ui-component users to implement a custom strategy for loading html-templates. See also templateUrl-function in angulars directive API documentation. By default, the ui-components use the following strategy to create template-urls
templateUrl = (pkg != '' ? pkg + '/' : '') + name + '.html'
Parameters:
Name Type Description pkg
string The package of the ui-component as given in the ui.component funciton. name
string The name of the ui-component as given in the ui.component funciton. tAttrs
Attributes The template atttributes used for angulars template directives. - Source:


Channel
Branch
Branch Group
Region
City
Brand
- by
Unit
Refresh
Export as Excel
Show Filter
{{template "_loader.html"}}
{{template "_filter.html"}}


--- layout: default ---
Kansei Engineering.
Deep Learning for Design.
Decision making support.
Optimization tectiques.
Conceptual design CAD.
DEL
DEL
email@toyota-ti.ac.jp


Allows for battery friendly monitoring of geofences on a device.
This module requires Titanium 3.1.2 or greater.
View the Using Titanium Modules document for instructions on getting started with using this module in your application.
To access this module from JavaScript, require it as follows:
var Geofence = require("ti.geofence");
The Geofence
variable is a reference to the Module object.
See the example application(s) in the example
folder of the module.
Jon Alter
View the change log for this module.
Please direct all questions, feedback, and concerns to<EMAIL_ADDRESS>Copyright(c) 2013 by Appcelerator, Inc. All Rights Reserved. Please see the LICENSE file included in the distribution for further details.


Print and Play the Royal Game of Ur
Print and plays are a great way to try out games before investing money on a nice set.  They are also great for classroom use or group use. If anything, it’s fun and cheap entertainment. I recently explored creating one for the Royal Game of Ur using pocket change for pieces and casting tokens. It was a fun experiment and for those interested, I was able to create the entire PDF (diagrams and all) using Google Docs.
Feel free to download the PDF, grab a pocket full of change and some friends to re-live those college budget nights. :) Happy Gaming!


Welcome my resource site
This is a semi-dynamic website for you to access learning and support resources to assist you in your design projects and also act as a hub of working examples.
- Example Projects: Working examples of projects for you to use as models and access the source code to base your projects.
- Support Resources: There are generic resources you will need regardless of the design project you are working on.
- Contact: How to contact Mr Jones.


Class EnrolRequest
Represents a request to allow a device to request the client id and secret required to request authorisation tokens.
Inherited Members
Namespace: Yort.Zip.InStore
Assembly: Yort.Zip.InStore.dll
Syntax
public class EnrolRequest : ZipRequestOptionsBase
Properties
| Improve this Doc View SourceActivationCode
The activation code generated in the Zip merchant portal. Required.
Declaration
public string ActivationCode { get; set; }
Property Value
| Type | Description |
|---|---|
| String |
Secret
The secret used when generating the activation code in the Zip merchant portal. Required.
Declaration
public string Secret { get; set; }
Property Value
| Type | Description |
|---|---|
| String |
Terminal
The name of the terminal being enroled. Required.
Declaration
public string Terminal { get; set; }
Property Value
| Type | Description |
|---|---|
| String |
Methods
| Improve this Doc View SourceApplyDefaults(ZipClientConfiguration)
Applies the default store id, terminal id and operator if appropriate.
Declaration
public override void ApplyDefaults(ZipClientConfiguration config)
Parameters
| Type | Name | Description |
|---|---|---|
| ZipClientConfiguration | config | A ZipClientConfiguration instance containing the default values to use. |
Overrides
| Improve this Doc View SourceValidate()
Validates this request as much as possible prior to sending it to the Zip API.
Declaration
public override void Validate()
Overrides
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if any required properties are null. |
| ArgumentException | Thrown if any of request properties are invalid. |


A clean, composable way to manipulate sequences of values with asynchronous functions
Dealing with control flow in heavily asynchronous code can be a big challange. Without any helper functions the code can easily degenerate into a christmas tree shape because of the callback of a callback of a callback syndrome.
asncFunction1(function(err, result) {
asncFunction2(function(err, result) {
asncFunction3(function(err, result) {
asncFunction4(function(err, result) {
asncFunction5(function(err, result) {
// do something useful
})
})
})
})
})
With async.js this can be written as
async.list([
asncFunction1,
asncFunction2,
asncFunction3,
asncFunction4,
asncFunction5,
]).call().end(function(err, result) {
// do something useful
});
It gets even worse if an asynchronous function has to be applied to a sequence of values. There is a nice example of this in the howtonode.org article Control Flow in Node Part III:
// Here is the async version without helpers
function loaddir(path, callback) {
fs.readdir(path, function (err, filenames) {
if (err) { callback(err); return; }
var realfiles = [];
var count = filenames.length;
filenames.forEach(function (filename) {
fs.stat(filename, function (err, stat) {
if (err) { callback(err); return; }
if (stat.isFile()) {
realfiles.push(filename);
}
count--;
if (count === 0) {
var results = [];
realfiles.forEach(function (filename) {
fs.readFile(filename, function (err, data) {
if (err) { callback(err); return; }
results.push(data);
if (results.length === realfiles.length) {
callback(null, results);
};
});
});
}
});
});
});
}
This code reads the contents of a directory, filters out all directory and returns the contens of all files as an array. Without any helpers the whole control flow management totally obscures the intent of the code. With async.js it is possible to move the control flow aspects of the code out of the function and rewrite it like this:
function loaddir(path, callback) {
async.readdir(".")
.stat()
.filter(function(file) {
return file.stat.isFile()
})
.readFile("utf8")
.filter(function(file) {
return file.data
})
.toString(callback)
}
JavaScript Array like abstraction, which supports almost all JavaScript array functions with asynchronous versions of
All functions are chainable.
Most of the functions from the fs
module in node.js are exposed as chainable filters.
stat
(lstat, fstat)unlink
mkdir
/rmdir
realpath
open
/close
exists
(from path.exists
)chmod
readFile
/writeFile
Constructors
files
: convert a list of files into a file sequencereaddir
: create a file sequence from the files in a directorywalkfiles
: recursive file walkerglob
: Unix style file matching. Creates a file sequence of all matching files.Utility functions to work with the file system
abspath
: convert a relative to an absolute pathcopyfile
: copy a single filecopytree
: copy whole diroctory treermtree
: remove whole direcory tree (like rm -rf
)Generic filters:
delay
: wait a given time before returning the next valuetimeout
: If the source doesn’t respond in a given time an error is returned.inspect
: print the source value as JSONprint
: print the source value as stringConstructors are the sources of async streams. They return an async.Generator
instance which generates a sequence of values.
Filters work on the sequence generated by a source generator. They can remove, add and modify values in the sequence. Filters return themselves generator instances.
Driver methods drive the actual execution of the iteration. The hole system is based on the principle of pulling the values from the end. Until any of the drivers is called no value will be generated.
This project is tested with Travis CI
Creates a generator generating an arithmetic progression of integers. range(i, j)
returns [i, i+1, i+2, …, j-1] and start
defaults to 0. When step is given, it specifies the increment (or decrement). If stop
is not given an infinite number of values if generated. This generates all positive odd numbers:
async.range(1, null, 2)
The optional construct
argument must be a sub class of async.Generator
and can be used to tell the function to return instances of the class.
Creates a generator, which returns the elements of the given array. This generates e.g. the values 1
, 2
and 3
:
async.list([1, 2, 3])
The optional construct
argument must be a sub class of async.Generator
and can be used to tell the function to return instances of the class.
Generators are implementing the ‘Iterator’ design pattern in an asynchronous way. It has a next(callback)
method, which passes on each call the next generated value to the given callback. Generators can be chained and all construcors and filters return new Generator
instances.
The source
is either another async.Generator
or a generator function. All filters in the generator operate on the values generated by the source.
var i=0;
var gen = new async.Generator(function(callback) {
if (i>4)
callback(async.STOP)
else
callback(null, i++) // no error
})
gen
in this example generates the sequence [0, 1, 2, 3, 4]. The first argument of the callback can be used to indicate an error the the end of the iteration, whicle the second argument is the generated value.
Special error value, which indicates the end of the iteration.
Calls the callback with the next generated value:
gen.next(function(err, value) {
//
})
The generated value is passed in the value
argument. If an error occured while computing the value the err
argument is set. In this case value the meaning of value is undefined. async.STOP
can be passed as special error value to indicate the end of the iteration.
Usually this method is only needed to write custom filters.
Applies the mapper
function to all values of the generator’s source and generates the result of the mapping.
async.range(0, 3)
.map(function(item, next) {
next(null, item + 1)
})
This will add one to each incoming item and thus generate the sequence [1, 2, 3].
The mapper can also be synchronous and simply return the result. In this case the mapper must not have the next
argument.
Calls filter for each of the generator’s source values. If the filter
returns false
for a passed value, the value is dropped from the sequence, otherwise the value is forwarded.
async.list([1, 2, 3, 4])
.filter(function(item, next) {
next(null, item % 2 == 0)
})
This will filter out all odd values and generate the sequence [2, 4].
Counts the generator’s source values starting with 0 and skips all values with an index smaller then begin
. If the index is >= end
the sequence is stopped.
async.range(0)
.slice(1, 4)
The async.range
call generates an infinite sequence of all integers and the slice
call transforms this into the sequence [1, 2, 3] by dropping the first value and stopping the sequence after the 4th value.
Sum up the number from 1 to 5:
async.range(1, 5)
.reduce(function(previousValue, currentValue) {
return previousValue + currentValue;
})
Sum up the number from 1 to 5 but with a first ‘initialValue’ of 10:
async.range(1, 5)
.reduce(function(previousValue, currentValue, index, next) {
next(null, previousValue + currentValue);
}, 10)
Alias for each
.
Calls fn
for each of the source generator’s values. The returned generator passes on the source values.
async.range(1, 10)
.each(function(item, next) {
console.log(item);
})
Prints the numbers from 1 to 9. Otherwise the source sequence is not changed.
Check if any of the values in the source sequence match the condition (i.e. the condition
callback returns true). The returned generator generates a one elmement sequence, which contains the boolean value of the result.
Check if the source generates an even number:
async.list([1, 8, 3, 5])
.some(function odd(item) {
return item % 2 == 0
})
This generates [true].
Check if all of the values in the source sequence match the condition (i.e. the condition
callback returns true). The returned generator generates a one elmement sequence, which contains the boolean value of the result.
Check if the source generates only even numbers:
async.list([1, 8, 3, 5])
.every(function odd(item) {
return item % 2 == 0
})
This returns [false]
Calls each of source values in sequence, which have to be functions. The functions can either be synchronous and return a value of be asynchronous and call the passed callback on completion. The generated sequence are the function’s return values. The optional context
argument defines the this
context of the called functions.
async.list([
function sync() {
return "juhu"
},
function async(next) {
next(null, "kinners")
}
]).call()
This calls the two functions in sequence and generates the sequence [“juhu”, “kinners”].
Concatenates a variable number of generators with this generator.
async.range(1, 4)
.concat(async.range(10, 13))
This returns a generator, which generates the values of the first range
followed by the values of the second range
: [1, 2, 3, 10, 11, 12]
Returns a generator, which generates on each next()
an arroy of the next values of this generator and each of the passed arguments. The length of the generated sequence is truncated to the lenght of the shortest input sequence. This function expects a variable list of generators as arguments.
async.range(1, 4)
.zip(async.range(10, 14))
This will generate [[1, 10], [2, 11], [3, 13]]
Performs an Array.prototype.sort on the source values and returns a generator, which generates the result as one element sequence. Since this requires reading all source elements, the source must not generate an infinite number of values. Generates the read values in sorted order.
async.list([4, 2, 3, 9])
.sort()
This generates the sequence [2, 3, 4, 9]
Performs an Array.prototype.join on the source values and returns a generator, which generates the result as one element sequence. Since this requires reading all source elements, the source must not generate an infinite number of values.
async.list([1, 4, 5])
.join(" - ")
This will generate [“1 - 4 - 5”]
Reverses the elements generated by the generator’s source. Since this requires reading all source elements, the source must not generate an infinite number of values.
async.list([1, 4, 5])
.revers()
This will generate [5, 4, 1]
Perform the iteration until the generator’s source either returns async.STOP
or indicates an error. The value of the last generated value is passed to the callback.
async.list([1, 8, 3, 5])
.every(function odd(item) {
return item % 2 == 0
})
.end(function(err, allEven) {
console.log("All values are even: " + allEven)
})
This will print the last generated value (the result of very
) on the console.
Perform the iteration until the generator’s source either returns async.STOP
. If breakOnError
is true the iteration is stopped on the first error. Otherwise the iteration continues and all errors are collected in an error array. An array of all generated values is passed to the callback.
async.list([1, 8, 3, 5])
.map(function odd(item, next) {
next(err, item * 10)
})
.toArray(function(err, values) {
console.log(values)
})
The last callback will be called with arr set to [10, 80, 30, 50].