This manual describes how to use the C API of the UDUNITS-2 library. Among other things, the library allows C code to obtain a binary representation of a unit of a physical quantity, to operate on such units, and to convert numeric values between compatible units.
The library comes with an extensive database of units all referenced to the SI system of units.
Copyright 2008, 2009 University Corporation for Atmospheric Research
Access and use of this software shall impose the following obligations and understandings on the user. The user is granted the right, without any fee or cost, to use, copy, modify, alter, enhance and distribute this software, and any derivative works thereof, and its supporting documentation for any purpose whatsoever, provided that this entire notice appears in all copies of the software, derivative works and supporting documentation. Further, UCAR requests that the user credit UCAR/Unidata in any publications that result from the use of this software or in any product that includes this software, although this is not an obligation. The names UCAR and/or Unidata, however, may not be used in any advertising or publicity to endorse or promote any products or commercial entity unless specific written permission is obtained from UCAR/Unidata. The user also understands that UCAR/Unidata is not obligated to provide the user with any support, consulting, training or assistance of any kind with regard to the use, operation and performance of this software nor to provide the user with any updates, revisions, new versions or "bug fixes."

Where includedir is the installation-directory for C header
files (e.g., /usr/local/include
).
Linking:
c89 ... -Llibdir -ludunits2 -lexpat ... -lm
Where libdir is the installation-directory for object code
libraries (e.g., /usr/local/lib
).
The existance of a software package is justified by what you can do with it. The three main things you can do with the UDUNIT-2 package are
ut_parse()
.
A unit-system is a set of units that are all defined in terms of the same set of base units. In the SI system of units, for example, the base units are the meter, kilogram, second, ampere, kelvin, mole, and candela. (For definitions of these base units, see http://physics.nist.gov/cuu/Units/current.html.)
In the UDUNITS-2 package, every accessible unit belongs to one and only one unit-system. It is not possible to convert numeric values between units of different unit-systems. Similarly, units belonging to different unit-systems always compare unequal.
There are several categories of operations on unit-systems:
Typically, you would obtain a unit-system of predefined units by reading
the default unit database using ut_read_xml()
with a NULL
pathname argument.
If this doesn't quite match your needs, then there are alternatives.
Together with the typical solution, the means for obtaining a useful
unit-system are (in order of increasing difficulty):
ut_read_xml(NULL)
.
ut_read_xml()
with the pathname of the customized
database to obtain a customized unit-system.
ut_new_base_unit()
and
ut_new_dimensionless_unit()
.
ut_new_system()
,
in which case you will definitely have to start with
ut_new_base_unit()
and
ut_new_dimensionless_unit()
.
You should pass every unit-system pointer to ut_free_system()
when you no longer need the corresponding unit-system.
ut_system*
ut_read_xml (const char*
path)
Reads the XML-formatted unit-database specified by path and returns the corresponding unit-sytem. If path is
NULL
, then the pathname specified by the environment variableUDUNITS2_XML_PATH
is used if set; otherwise, the compile-time pathname of the installed, default, unit database is used. You should pass the returned pointer tout_free_system()
when you no longer need the unit-system. If an error occurs, then this function writes an error-message usingut_handle_error_message()
and returnsNULL
. Also,ut_get_status()
will return one of the following:
UT_OPEN_ARG
- path is non-
NULL
but the file couldn't be opened. Seeerrno
for the reason.UT_OPEN_ENV
- path is
NULL
and environment variableUDUNITS2_XML_PATH
is set but the file couldn't be opened. Seeerrno
for the reason.UT_OPEN_DEFAULT
- path is
NULL
, environment variableUDUNITS2_XML_PATH
is unset, and the installed, default, unit database couldn't be opened. Seeerrno
for the reason.UT_OS
- Operating-system error. See
errno
.UT_PARSE
- The database file couldn't be parsed.
ut_system*
ut_new_system (void)
Creates and returns a new unit-system. On success, the unit-system will be empty except for the dimensionless unit one. You should pass the returned pointer to
ut_free_system()
when you no longer need the unit-system. If an error occurs, then this function writes an error-message usingut_handle_error_message()
and returnsNULL
. Also,ut_get_status()
will return the following:
UT_OS
- Operating-system error. See
errno
.
NOTE: This section covers low-level access to the indidual units of a unit-system. General parsing of arbitrary unit specifications is coverted in the section Parsing.
A unit-system contains mappings from identifiers to units (and
vice versa).
Consequently, once you have a unit-system, you can easily
obtain a unit for which you know the name or symbol using
the function ut_get_unit_by_name()
or
ut_get_unit_by_symbol()
.
ut_unit*
ut_get_unit_by_name (const ut_system*
system, const char*
name)
Returns the unit to which name maps from the unit-system referenced by system or
NULL
if no such unit exists. Name comparisons are case-insensitive. If this function returnsNULL
, thenut_get_status()
will return one of the following:
UT_SUCCESS
- name doesn't map to a unit of system.
UT_BAD_ARG
- system or name is
NULL
.
ut_unit*
ut_get_unit_by_symbol (const ut_system*
system, const char*
symbol)
Returns the unit to which symbol maps from the unit-system referenced by system or
NULL
if no such unit exists. Symbol comparisons are case-sensitive. If this function returnsNULL
, thenut_get_status()
will return one of the following:
UT_SUCCESS
- symbol doesn't map to a unit of system.
UT_BAD_ARG
- system or symbol is
NULL
.
ut_unit*
ut_get_dimensionless_unit_one (const ut_system*
system)
Returns the dimensionless unit one of the unit-system referenced by system. While not necessary, the returned pointer may be passed to
ut_free()
when you no longer need the unit. If system isNULL
, then this function writes an error-message usingut_handle_error_message()
and returnsNULL
. Also,ut_get_status()
will returnUT_BAD_ARG
.
If you use ut_read_xml()
, then you should not normally need to
add any new units to a unit-system.
Because you get units via their names or symbols, adding a unit to a
unit-system actually means mapping one or more identifiers (i.e., names
or symbols) to the unit.
Thereafter, you can use ut_get_unit_by_name()
and
ut_get_unit_by_symbol()
to retrieve the unit.
The mapping of identifiers to units is covered here.
Having said that, it is possible to create a new base or dimensionless
unit within a unit-system using ut_new_base_unit()
or
ut_new_dimensionless_unit()
—you'll just also have to map
identifiers to the newly-created unit in order to be able to retrieve
it later by identifier.
ut_unit*
ut_new_base_unit (ut_system*
system)
Creates and adds a new base-unit to the unit-system referenced by system. This function returns the new base-unit. You should pass the returned pointer to
ut_free()
when you no longer need the unit. If an error occurs, then this function writes an error-message usingut_handle_error_message()
and returnsNULL
. Also,ut_get_status()
will return one of the following:If you use
UT_BAD_ARG
- system is
NULL
.UT_OS
- Operating-system failure. See
errno
.ut_read_xml()
, then you should not normally need to call this function.
ut_unit*
ut_new_dimensionless_unit (ut_system*
system)
Creates and adds a new dimensionless-unit to the unit-system referenced by system. This function returns the new dimensionless-unit. You should pass the returned pointer to
ut_free()
when you no longer need the unit. If an error occurs, then this function writes an error-message usingut_handle_error_message()
and returnsNULL
. Also,ut_get_status()
will return one of the following:If you use
UT_BAD_ARG
- system is
NULL
.UT_OS
- Operating-system failure. See
errno
.ut_read_xml()
, then you should not normally need to call this function.
A prefix is a word or symbol that is appended to the beginning of a word or symbol that represents a unit in order to modify the value of that unit. For example, the prefix “kilo” in the word “kiloamperes” changes the value from one ampere to one-thousand amperes.
If you use ut_read_xml()
, then you should not normally need to
add any new prefixes to a unit-system.
ut_status
ut_add_name_prefix (ut_system*
system, const char*
name, double
value)
Adds the name-prefix name with the value value to the unit-system system. A name-prefix is something like “mega” or “milli”. Comparisons between name-prefixes are case-insensitive. This function returns one of the following:
UT_SUCCESS
- Success.
UT_BAD_ARG
- system or name is
NULL
, or value is0
.UT_EXISTS
- name already maps to a different value.
UT_OS
- Operating-system failure. See
errno
.
ut_status
ut_add_symbol_prefix (ut_system*
system, const char*
symbol, double
value)
Adds the symbol-prefix symbol with the value value to the unit-system system. A symbol-prefix is something like “M” or “m”. Comparisons between symbol-prefixes are case-sensitive. This function returns one of the following:
UT_SUCCESS
- Success.
UT_BAD_ARG
- system or symbol is
NULL
, or value is0
.UT_EXISTS
- symbol already maps to a different value.
UT_OS
- Operating-system failure. See
errno
.
void
ut_free_system (ut_system*
system)
Frees the unit-system referenced by system. All unit-to-identifier and identifier-to-unit mappings are removed. Use of
system
after this function returns results in undefined behavior.
ut_status
ut_set_second (const ut_unit*
second)
Sets the “second” unit of a unit-system. This function must be called before the first call to
ut_offset_by_time()
for a unit in the same unit-system.ut_read_xml()
calls this function if the unit-system it's reading contains a unit named “second”. This function returns one of the following:
UT_SUCCESS
- The “second” unit of system was successfully set.
UT_EXISTS
- The “second” unit of system is set to a different unit.
UT_BAD_ARG
- second is
NULL
.
You can convert numeric values in one unit to equivalent values in another, compatible unit by means of a converter. For example
#include <udunits2.h> ... ut_unit* from = ...; ut_unit* to = ...; cv_converter* converter = ut_get_converter(from, to); double fromValue = ...; double toValue = cv_convert_double(converter, fromValue); cv_free(converter);
The converter API is declared in the header-file <converter.h>
,
which is automatically included by the UDUNITS-2 header-file
(<udunits2.h>
) so you don't need to explicitly include it.
int
ut_are_convertible (const ut_unit*
unit1, uconst t_unit*
unit2)
Indicates if numeric values in unit unit1 are convertible to numeric values in unit unit2 via ut_get_converter(). In making this determination, dimensionless units are ignored. This function returns a non-zero value if conversion is possible; otherwise,
0
is returned and ut_get_status() will return one of the following:
UT_BAD_ARG
- unit1 or unit2 is
NULL
.UT_NOT_SAME_SYSTEM
- unit1 and unit2 belong to different unit-systems.
UT_SUCCESS
- Conversion between the units is not possible (e.g., unit1 refers to a meter and unit2 refers to a kilogram.
cv_converter*
ut_get_converter (ut_unit* const
from, ut_unit* const
to)
Creates and returns a converter of numeric values in the from unit to equivalent values in the to unit. You should pass the returned pointer to
cv_free()
when you no longer need the converter. If an error occurs, then this function writes an error-message usingut_handle_error_message()
and returnsNULL
. Also,ut_get_status()
will return one of the following:
UT_BAD_ARG
- from or to is
NULL
.UT_NOT_SAME_SYSTEM
- The units from and to don't belong to the same unit-system.
UT_MEANINGLESS
- The units belong to the same unit-system but conversion between them is meaningless (e.g., conversion between seconds and kilograms is meaningless).
UT_OS
- Operating-system failure. See
errno
.
float
cv_convert_float (const cv_converter*
converter, const float
value)
Converts the single floating-point value value and returns the new value.
double
cv_convert_double (const cv_converter*
converter, const double
value)
Converts the single double-precision value value and returns the new value.
float*
cv_convert_floats (const cv_converter*
converter, const float*
in, size_t
count, float*
out)
Converts the count floating-point values starting at in, writing the new values starting at out and, as a convenience, returns out. The input and output arrays may overlap or be identical.
double*
cv_convert_doubles (const cv_converter*
converter, const double*
in, size_t
count, double*
out)
Converts the count double-precision values starting at in, writing the new values starting at out and, as a convenience, returns out. The input and output arrays may overlap or be identical.
void
cv_free (cv_converter*
conv)
;Frees resources associated with the converter referenced by conv. You should call this function when you no longer need the converter. Use of conv upon return results in undefined behavior.
Here's an example of parsing a string representation of a unit into its binary representation:
#include <stdlib.h> #include <udunits2.h> ... ut_system* unitSystem = ut_read_xml(NULL); const char* string = "kg.m2/s3"; ut_unit* watt = ut_parse(unitSystem, string, UT_ASCII); if (watt == NULL) { /* Unable to parse string. */ } else { /* Life is good. */ }
ut_unit*
ut_parse (const ut_system*
system, const char*
string, ut_encoding
encoding)
Returns the binary unit representation corresponding to the string unit representation string in the character-set encoding using the unit-system system. string must have no leading or trailing whitespace (see
ut_trim()
). If an error occurs, then this function returnsNULL
andut_get_status()
will return one of the following:
UT_BAD_ARG
- system or string is
NULL
.UT_SYNTAX
- string contained a syntax error.
UT_UNKNOWN
- string contained an unknown identifier.
UT_OS
- Operating-system failure. See
errno
for the reason.
size_t
ut_trim (char*
string, ut_encoding
encoding)
Removes all leading and trailing whitespace from the NUL-terminated string string. Returns string, which is modified if it contained leading or trailing whitespace.
For the most part, the UDUNITS-2 package follows the syntax for unit-strings promulgated by the US National Institute for Standards and Technology (NIST). Details, of which, can be found at http://physics.nist.gov/cuu/Units/index.html. The one general exception to this is the invention of a syntax for “offset”-units (e.g., the definition of the degree Celsius is “K @ 273.15”).
String Type Using Names Using Symbols Comment Simple meter m Raised meter^2 m2 higher precedence than multiplying or dividing Product newton meter N.m Quotient meter per second m/s Scaled 60 second 60 s Prefixed kilometer km Offset kelvin from 273.15 K @ 273.15 lower precedence than multiplying or dividing Logarithmic lg(re milliwatt) lg(re mW) "lg" is base 10, "ln" is base e, and "lb" is base 2 Grouped (5 meter)/(30 second) (5 m)/(30 s)
The above may be combined, e.g., "0.1 lg(re m/(5 s)^2) @ 50".
You may also look at the <def>
elements in the units database to see examples of string unit specifications.
You may use the udunits2
utility
to experiment with string unit specifications.
Here is the unit-syntax understood by the UDUNITS-2 package. Words printed Thusly indicate non-terminals; words printed THUSLY indicate terminals; and words printed <thusly> indicate lexical elements.
 "*" <space>+ <centered middot> DIVIDE: <space>* <divide_op> <space>* <divide_op>: one of per PER "/" EXPONENT: ISO-8859-9 or UTF-8 encoded exponent characters RAISE: one of "^" "**" ID: one of <id> "%" "'" "\"" degree sign greek mu character <id>: <alpha> <alphanum>* <alpha>: [A-Za-z_] ISO-8859-1 alphabetic characters non-breaking space <alphanum>: one of <alpha> <digit> <digit>: [0-9] LOGREF: <log> <space>* <logref> <log>: one of "log" "lg" "ln" "lb" <logref>: "(" <space>* <re> ":"? <space>* DATE: <year> "-" <month> ("-" <day>)? <year>: [+-]?[0-9]{1,4} <month>: "0"?[1-9]|1[0-2] <day>: "0"?[1-9]|[1-2][0-9]|"30"|"31" CLOCK: <hour> ":" <minute> (":" <second>)? TIMSTAMP: <year> (<month> <day>?)? "T" <hour> (<minute> <second>?)? <hour>: [+-]?[0-1]?[0-9]|2[0-3] <minute>: [0-5]?[0-9] <second>: (<minute>|60) (\.[0-9]*)?
Use the ut_format()
function to obtain the string representation
of a binary unit.
For example, the following gets the definition of the unit "watt" in
ASCII characters using unit-symbols rather than unit-names:
ut_unit* watt = ...; char buf[128]; unsigned opts = UT_ASCII | UT_DEFINITION; int len = ut_format(watt, buf, sizeof(buf), opts); if (len == -1) { /* Couldn't get string */ } else if (len == sizeof(buf)) { /* Entire buffer used: no terminating NUL */ } else { /* Have string with terminating NUL */ }
int
ut_format (const ut_unit*
unit, char*
buf, size_t
size, unsigned
opts)
Formats the unit unit (i.e., returns its string representation) into the buffer pointed-to by buf of size size. The argument opts specifies how the formatting is to be done and is a bitwise OR of a ut_encoding value and zero or more of the following:
UT_NAMES
- Use unit names instead of symbols.
UT_DEFINITION
- The formatted string should be the definition of unit in terms of basic-units instead of stopping any expansion at the highest level possible.
On succes, this function returns the number of characters written into buf, which will be less than or equal to size. If the number is equal to size, then the buffer is too small to have a terminating
NUL
character.On failure, this function returns
-1
and ut_get_status() will return one of the following:
UT_BAD_ARG
- unit or buf is
NULL
, or opts contains the bit patterns of bothUT_LATIN1
andUT_UTF8
.UT_CANT_FORMAT
- unit can't be formatted in the desired manner (e.g., opts contains
UT_ASCII
but unit doesn't have an identifier in that character-set or opts doesn't contain UT_NAMES and a necessary symbol doesn't exist).
You can use unit operations to construct new units, get information about units, or compare units.
void
ut_free (ut_unit*
unit)
Frees resources associated with unit. You should invoke this function on every unit that you no longer need. Use of unit upon return from this function results in undefined behavior.
ut_unit*
ut_scale (double
factor, const ut_unit*
unit)
Returns a unit equivalent to another unit scaled by a numeric factor. For example:
const ut_unit* meter = ... const ut_unit* kilometer = ut_scale(1000, meter);The returned unit is equivalent to unit multiplied by factor. You should pass the returned pointer to
ut_free()
when you no longer need the unit.
ut_unit*
ut_offset (const ut_unit*
unit, double
offset)
Returns a unit equivalent to another unit relative to a particular origin. For example:
const ut_unit* kelvin = ... const ut_unit* celsius = ut_offset(kelvin, 273.15);The returned unit is equivalent to unit with an origin of offset. You should pass the returned pointer to
ut_free()
when you no longer need the unit. If an error occurs, then this function returnsNULL
andut_get_status()
will return one of the following:
UT_BAD_ARG
- unit is
NULL
.UT_OS
- Operating-system error. See
errno
for the reason.
ut_unit*
ut_offset_by_time (const ut_unit* const
unit, const double
origin)
Returns a timestamp-unit equivalent to the time unit unit referenced to the time-origin origin (as returned by
ut_encode_time()
). For example:const ut_unit* second = ... const ut_unit* secondsSinceTheEpoch = ut_offset_by_time(second, ut_encode_time(1970, 1, 1, 0, 0, 0.0));Leap seconds are not taken into account. You should pass the returned pointer to
ut_free()
when you no longer need the unit. If an error occurs, then this function returnsNULL
andut_get_status()
will return one of the following:
UT_BAD_ARG
- unit is
NULL
.UT_OS
- Operating-system error. See
errno
for the reason.UT_MEANINGLESS
- Creation of a timestamp unit based on unit is not meaningful. It might not be a time-unit, for example.
UT_NO_SECOND
- The associated unit-system doesn't contain a “second” unit. See
ut_set_second()
.CAUTION: The timestamp-unit was created to be analogous to, for example, the degree celsius—but for the time dimension. I've come to believe, however, that creating such a unit was a mistake, primarily because users try to use the unit in ways for which it was not designed (such as converting dates in a calendar whose year is exactly 365 days long). Such activities are much better handled by a dedicated calendar package. Please be careful about using timestamp-units. See also the section on The Handling of Time.
ut_unit*
ut_invert (const ut_unit*
unit)
Returns the inverse (i.e., reciprocal) of the unit unit. This convenience function is equal to
ut_raise(
unit,-1)
. You should pass the returned pointer tout_free()
when you no longer need the unit. If an error occurs, then this function writes an error-message usingut_handle_error_message()
and returnsNULL
. Also,ut_get_status()
will return one of the following:
UT_BAD_ARG
- unit is
NULL
.UT_OS
- Operating-system error. See
errno
for the reason.
ut_unit*
ut_raise (const ut_unit*
unit, int
power)
Returns the unit equal to unit unit raised to the power power. You should pass the returned pointer to
ut_free()
when you no longer need the unit. If an error occurs, then this function writes an error-message usingut_handle_error_message()
and returnsNULL
. Also,ut_get_status()
will return one of the following:
UT_BAD_ARG
- unit is
NULL
.UT_OS
- Operating-system error. See
errno
for the reason.
ut_unit*
ut_root (const ut_unit*
unit, int
root)
Returns the unit equal to the root root of unit unit. You should pass the returned pointer to
ut_free()
when you no longer need the unit. If an error occurs, then this function writes an error-message usingut_handle_error_message()
and returnsNULL
. Also,ut_get_status()
will return one of the following:
UT_BAD_ARG
- unit is
NULL
.UT_MEANINGLESS
- It's meaningless to take the given root of the given unit. This could be because the resulting unit would have fractional (i.e., non-integral) dimensionality, or because the unit is, for example, a logarithmic unit.
UT_OS
- Operating-system error. See
errno
for the reason.
ut_unit*
ut_log (double
base, const ut_unit*
reference)
Returns the logarithmic unit corresponding to the logarithmic base base and a reference level specified as the unit reference. For example, the following creates a decibel unit with a one milliwatt reference level:
const ut_unit* milliWatt = ...; const ut_unit* bel_1_mW = ut_log(10.0, milliWatt); if (bel_1_mW != NULL) { const ut_unit* decibel_1_mW = ut_scale(0.1, bel_1_mW); ut_free(bel_1_mW); /* no longer needed */ if (decibel_1_mW != NULL) { /* Have decibel unit with 1 mW reference */ ... ut_free(decibel_1_mW); } /* "decibel_1_mW" allocated */ }You should pass the returned pointer to
ut_free()
when you no longer need the unit. If an error occurs, then this function writes an error-message usingut_handle_error_message()
and returnsNULL
. Also,ut_get_status()
will return one of the following:
UT_BAD_ARG
- reference is
NULL
.UT_OS
- Operating-system error. See
errno
for the reason.UT_BAD_ARG
- base is invalid (e.g., it must be greater than one).
const char*
ut_get_name (const ut_unit*
unit, ut_encoding
encoding)
Returns the name to which the unit referenced by unit maps in the character-encoding specified by encoding. If this function returns
NULL
, thenut_get_status()
will return one of the following:
UT_BAD_ARG
- name is
NULL
.UT_SUCCESS
- unit doesn't map to a name in the given character-set.
const char*
ut_get_symbol (const ut_unit*
unit, ut_encoding
encoding)
Returns the symbol to which the unit referenced by unit maps in the character-encoding specified by encoding. If this function returns
NULL
, thenut_get_status()
will return one of the following:
UT_BAD_ARG
- symbol is
NULL
.UT_SUCCESS
- unit doesn't map to a symbol in the given character-set.
ut_system*
ut_get_system (const ut_unit*
unit)
Returns the unit-system to which the unit referenced by unit belongs. If unit is
NULL
, then this function writes an error-message usingut_handle_error_message()
and returnsNULL
. Also,ut_get_status()
will returnUT_BAD_ARG
.
int
ut_is_dimensionless (const ut_unit*
unit)
Indicates if unit unit is dimensionless (like “radian”). This function returns a non-zero value if the unit is dimensionfull; otherwise,
0
is returned and ut_get_status() will return one of the following:
UT_BAD_ARG
- unit1 is
NULL
.UT_SUCCESS
- The unit is dimensionless.
ut_unit*
ut_clone (const ut_unit*
unit)
Returns a copy of the unit referenced by unit. You should pass the returned pointer to
ut_free()
when you no longer need the unit. If an error occurs, then this function writes an error-message usingut_handle_error_message()
and returnsNULL
. Also,ut_get_status()
will return one of the following:If you use
UT_BAD_ARG
- unit is
NULL
.UT_OS
- Operating-system failure. See
errno
.ut_read_xml()
, then you should not normally need to call this function.
ut_status
ut_accept_visitor (const ut_unit*
unit, const ut_visitor*
visitor, void*
arg)
Accepts the visitor visitor to the unit unit. The argument arg is passed to the visitor's functions. This function returns one of the following:
UT_BAD_ARG
- visitor or unit is
NULL
.UT_VISIT_ERROR
- An error occurred in visitor while visiting unit.
UT_SUCCESS
- Success.
You pass a pointer to a data object of this type if and when you call
ut_accept_visitor()
. It contains the following pointers to functions that implement your unit-visitor:
ut_status (*visit_basic)(const ut_unit*
unit, void*
arg);
- Visits the basic-unit unit. A basic-unit is a base unit like “meter” or a non-dimensional but named unit like “radian”. This function returns
UT_SUCCESS
on and only on success.ut_status (*visit_product)(const ut_unit*
unit, int
count, const ut_unit* const*
basicUnits, const int*
powers, void*
arg);
- Visits the product-unit unit. The product-unit is a product of the count basic-units referenced by basicUnits, each raised to their respective, non-zero power in powers. This function returns
UT_SUCCESS
on and only on success.ut_status (*visit_galilean)(const ut_unit*
unit, double
scale, const ut_unit*
underlyingUnit, double
origin, void* arg);
- Visits the Galilean-unit unit. The Galilean-unit has the underlying unit underlyingUnit and either the non-unity scale factor scale or the non-zero origin origin, or both. This function returns
UT_SUCCESS
on and only on success.ut_status (*visit_timestamp)(const ut_unit*
unit, const ut_unit*
timeUnit, double
origin, void*
arg);
- Visits the timestamp-unit unit. The timestamp-unit has the underlying unit of time timeUnit and the
ut_encode_time()
-encoded time-origin origin. This function returnsUT_SUCCESS
on and only on success.ut_status (*visit_logarithmic)(const ut_unit*
unit, double
base, const ut_unit*
reference, void*
arg);
- Visits the logarithmic-unit unit. The logarithmic-unit has the logarithmic base base and the reference-level is specified by the unit reference. This function returns
UT_SUCCESS
on and only on success.
Binary unit operations act on two units.
NOTE: The functions
ut_are_convertible()
and ut_get_converter()
are also
binary unit operations but are documented elsewhere.
ut_unit*
ut_multiply (const ut_unit*
unit1, const ut_unit*
unit2)
Returns the result of multiplying unit unit1 by unit unit2. You should pass the pointer to ut_free() when you no longer need the unit On failure, this function returns
NULL
and ut_get_status() will return one of the following:
UT_BAD_ARG
- unit1 or unit2 is
NULL
.UT_NOT_SAME_SYSTEM
- unit1 and unit2 belong to different unit-systems.
UT_OS
- Operating-system error. See errno for the reason.
ut_unit*
ut_divide (const ut_unit*
numer, const ut_unit*
denom)
Returns the result of dividing unit numer by unit denom. You should pass the pointer to ut_free() when you no longer need the unit On failure, this function returns
NULL
and ut_get_status() will return one of the following:
UT_BAD_ARG
- numer or denom is
NULL
.UT_NOT_SAME_SYSTEM
- unit1 and unit2 belong to different unit-systems.
UT_OS
- Operating-system error. See
errno
for the reason.
int
ut_compare (const ut_unit*
unit1, const ut_unit*
unit2)
Compares two units. Returns a value less than, equal to, or greater than zero as unit1 is considered less than, equal to, or greater than unit2, respectively. Units from different unit-systems never compare equal. The value zero is also returned if both unit pointers are
NULL
.
int
ut_same_system (const ut_unit*
unit1, const ut_unit*
unit2)
Indicates if two units belong to the same unit-system. This function returns a non-zero value if the two units belong to the same unit-system; otherwise,
0
is returned and ut_get_status() will return one of the following:
UT_BAD_ARG
- unit1 or unit2 is
NULL
.UT_SUCCESS
- The units belong to different unit-systems.
Within a unit-system, you can map an identifier to a unit and vice versa. If an identifier maps to a unit, then the unit can be retrieved from the unit-system via the identifier. Similarly, if a unit maps to an identifier, then the unit can be printed using the identifier.
There a two kinds of identifiers: names and symbols.
You can map a name to a unit and vice versa. If you use
ut_read_xml()
, then you shouldn't normally need to do this.
ut_status
ut_map_name_to_unit (const char*
name, const ut_encoding
encoding, const ut_unit*
unit)
Maps the name referenced by name, in character-set encoding, to the unit referenced by unit in the unit-system that contains unit. This function returns one of the following:
UT_SUCCESS
- Success.
UT_BAD_ARG
- name or unit is
NULL
.UT_OS
- Operating-system failure. See
errno
.UT_EXISTS
- name already maps to a different unit.
ut_status
ut_unmap_name_to_unit (ut_system*
system, const char*
name, const ut_encoding
encoding)
Removes any mapping from name name, in character-set encoding, to a unit in unit-system system. This function returns one of the following:
UT_SUCCESS
- Success.
UT_BAD_ARG
- system or name is
NULL
.
ut_status
ut_map_unit_to_name (const ut_unit*
unit, const char*
name, ut_encoding
encoding)
Maps the unit unit to the name name, which is in character-set encoding, in the unit-system that contains the unit. This function returns one of the following:
UT_SUCCESS
- Success.
UT_BAD_ARG
- unit or name is
NULL
, or name is not in the character-set encoding.UT_OS
- Operating-system failure. See
errno
.UT_EXISTS
- unit already maps to a different name.
ut_status
ut_unmap_unit_to_name (const ut_unit*
unit, ut_encoding
encoding)
Removes any mapping from unit unit to a name in character-set encoding from the unit-system that contains the unit. This function returns one of the following:
UT_SUCCESS
- Success.
UT_BAD_ARG
- unit is
NULL
.
You can map a symbol to a unit and vice versa. If you use
ut_read_xml()
, then you shouldn't normally need to do this.
ut_status
ut_map_symbol_to_unit (const char*
symbol, const ut_encoding
encoding, const ut_unit*
unit)
Maps the symbol referenced by symbol, in character-set encoding, to the unit referenced by unit in the unit-system that contains unit. This function returns one of the following:
UT_SUCCESS
- Success.
UT_BAD_ARG
- symbol or unit is
NULL
.UT_OS
- Operating-system failure. See
errno
.UT_EXISTS
- symbol already maps to a different unit.
ut_status
ut_unmap_symbol_to_unit (ut_system*
system, const char*
symbol, const ut_encoding
encoding)
Removes any mapping from symbol symbol, in character-set encoding, to a unit in unit-system system. This function returns one of the following:
UT_SUCCESS
- Success.
UT_BAD_ARG
- system or symbol is
NULL
.
ut_status
ut_map_unit_to_symbol (const ut_unit*
unit, const char*
symbol, ut_encoding
encoding)
Maps the unit unit to the symbol symbol, which is in character-set encoding, in the unit-system that contains the unit. This function returns one of the following:
UT_SUCCESS
- Success.
UT_BAD_ARG
- unit or symbol is
NULL
.UT_BAD_ARG
- Symbol symbol is not in the character-set encoding.
UT_OS
- Operating-system failure. See
errno
.UT_EXISTS
- unit already maps to a different symbol.
ut_status
ut_unmap_unit_to_symbol (const ut_unit*
unit, ut_encoding
encoding)
Removes any mapping from unit unit to a symbol in character-set encoding from the unit-system that contains the unit. This function returns one of the following:
UT_SUCCESS
- Success.
UT_BAD_ARG
- unit is
NULL
.
You should use a true calendar package rather than the UDUNITS-2 package
to handle time. Having said that, many people use the time-handling
capabilities of the UDUNITS-2 package because it supports "units" like
"seconds since 1970-01-01
". You should be aware, however, that the
hybrid Gregorian/Julian calendar used by the UDUNITS-2 package cannot be
changed. Dates on or after 1582-10-15 are assumed to be Gregorian dates;
dates before that are assumed to be Julian dates. In particular,
the year 1 BCE is immediately followed by the year 1 CE.
In general, the UDUNITS-2 package handles time by encoding it as double-precision value, which can then be acted upon arithmetically.
double
ut_encode_time (int
year, int
month, int
day, int
hour, int
minute, double
second)
Encodes a time as a double-precision value. This convenience function is equivalent to
ut_encode_date(year,month,day) + ut_encode_clock(hour,minute,second)
double
ut_encode_date (int
year, int
month, int
day)
Encodes a date as a double-precision value. You probably won't use this function. Dates on or after 1582-10-15 are assumed to be Gregorian dates; dates before that are assumed to be Julian dates. In particular, the year 1 BCE is immediately followed by the year 1 CE.
double
ut_encode_clock (int
hour, int
minute, double
second)
Encodes a clock-time as a double-precision value. You probably won't use this function.
void
ut_decode_time (double
time, int*
year, int*
month, int*
day, int*
hour, int*
minute, double*
second, double*
resolution)
Decodes a time from a double-precision value into its individual components. The variable referenced by resolution will be set to the resolution (i.e., uncertainty) of the time in seconds.
Error-handling in the units module has two aspects: the status of the last operation performed by the module and the handling of error-messages:
UDUNITS-2 functions set their status by calling ut_set_status()
.
You can use the function ut_get_status()
to retrieve that
status.
ut_status
ut_get_status (void)
Returns the value specified in the last call to
ut_set_status()
This enumeration has the following values:
UT_SUCCESS
- Success
UT_BAD_ARG
- An argument violates the the function's contract (e.g., it's
NULL
).UT_EXISTS
- Unit, prefix, or identifier already exists
UT_NO_UNIT
- No such unit exists
UT_OS
- Operating-system error. See
errno
for the reason.UT_NOT_SAME_SYSTEM
- The units belong to different unit-systems
UT_MEANINGLESS
- The operation on the unit or units is meaningless
UT_NO_SECOND
- The unit-system doesn't have a unit named “second”
UT_VISIT_ERROR
- An error occurred while visiting a unit
UT_CANT_FORMAT
- A unit can't be formatted in the desired manner
UT_SYNTAX
- String unit representation contains syntax error
UT_UNKNOWN
- String unit representation contains unknown word
UT_OPEN_ARG
- Can't open argument-specified unit database
UT_OPEN_ENV
- Can't open environment-specified unit database
UT_OPEN_DEFAULT
- Can't open installed, default, unit database
UT_PARSE
- Error parsing unit database
int
ut_handle_error_message (const char*
fmt, ...)
Handles the error-message corresponding to the format-string fmt and any subsequent arguments referenced by it. The interpretation of the formatting-string is identical to that of the UNIX function
printf()
. On success, this function returns the number of bytes in the error-message; otherwise, this function returns-1
.Use the function
ut_set_error_message_handler()
to change how error-messages are handled.
ut_error_message_handler
ut_set_error_message_handler (ut_error_message_handler
handler)
Sets the function that handles error-messages and returns the previous error-message handler. The initial error-message handler is
ut_write_to_stderr()
.
int
ut_write_to_stderr (const char*
fmt, va_list
args)
Writes the variadic error-message corresponding to formatting-string fmt and arguments args to the standard-error stream and appends a newline. The interpretation of the formatting-string is identical to that of the UNIX function
printf()
. On success, this function returns the number of bytes in the error-message; otherwise, this function returns-1
.
int
ut_ignore (const char*
fmt, va_list
args)
Does nothing. In particular, it ignores the variadic error-message corresponding to formatting-string fmt and arguments args. Pass this function to
ut_set_error_message_handler()
when you don't want the unit module to print any error-messages.
This is the type of an error-message handler. It's definition is
typedef int (*ut_error_message_handler)(const char* fmt, va_list args);
The database of units that comes with the UDUNITS-2 package is an
XML-formatted file that is based on the SI system of units.
It contains the names and symbols of most of the units that you will ever
encounter.
The pathname of the installed file is
datadir/udunits2.xml
, where datadir is the
installation-directory for read-only, architecture-independent data
(e.g., /usr/local/share
).
This pathname is the default that ut_read_xml()
uses.
Naturally, because the database is a regular file, it can be edited to add new units or remove existing ones. Be very careful about doing this, however, because you might lose the benefit of exchanging unit-based information with others who haven't modified their database.
The data types ut_visitor
, ut_status
, and
ut_error_message_handler
are documented elsewhere.
This enumeration has the following values:
UT_ASCII
- US ASCII character-set.
UT_ISO_8859_1
- The ISO-8859-1 character-set.


| column_misc_functions {SparkR} | R Documentation |
Miscellaneous functions defined for Column
.
assert_true(x, errMsg = NULL)
crc32(x)
hash(x, ...)
md5(x)
raise_error(x)
sha1(x)
sha2(y, x)
xxhash64(x, ...)
## S4 method for signature 'Column'
crc32(x)
## S4 method for signature 'Column'
hash(x, ...)
## S4 method for signature 'Column'
xxhash64(x, ...)
## S4 method for signature 'Column'
assert_true(x, errMsg = NULL)
## S4 method for signature 'characterOrColumn'
raise_error(x)
## S4 method for signature 'Column'
md5(x)
## S4 method for signature 'Column'
sha1(x)
## S4 method for signature 'Column,numeric'
sha2(y, x)
x |
Column to compute on. In |
errMsg |
(optional) The error message to be thrown. |
... |
additional Columns. |
y |
Column to compute on. |
crc32
: Calculates the cyclic redundancy check value (CRC32) of a binary column
and returns the value as a bigint.
hash
: Calculates the hash code of given columns, and returns the result
as an int column.
xxhash64
: Calculates the hash code of given columns using the 64-bit
variant of the xxHash algorithm, and returns the result as a long
column.
assert_true
: Returns null if the input column is true; throws an exception
with the provided error message otherwise.
raise_error
: Throws an exception with the provided error message.
md5
: Calculates the MD5 digest of a binary column and returns the value
as a 32 character hex string.
sha1
: Calculates the SHA-1 digest of a binary column and returns the value
as a 40 character hex string.
sha2
: Calculates the SHA-2 family of hash functions of a binary column and
returns the value as a hex string. The second argument x
specifies the number
of bits, and is one of 224, 256, 384, or 512.
crc32 since 1.5.0
hash since 2.0.0
xxhash64 since 3.0.0
assert_true since 3.1.0
raise_error since 3.1.0
md5 since 1.5.0
sha1 since 1.5.0
sha2 since 1.5.0
## Not run:
##D # Dataframe used throughout this doc
##D df <- createDataFrame(cbind(model = rownames(mtcars), mtcars)[, 1:2])
##D tmp <- mutate(df, v1 = crc32(df$model), v2 = hash(df$model),
##D v3 = hash(df$model, df$mpg), v4 = md5(df$model),
##D v5 = sha1(df$model), v6 = sha2(df$model, 256))
##D head(tmp)
## End(Not run)
## Not run:
##D tmp <- mutate(df, v1 = assert_true(df$vs < 2),
##D v2 = assert_true(df$vs < 2, "custom error message"),
##D v3 = assert_true(df$vs < 2, df$vs))
##D head(tmp)
## End(Not run)
## Not run:
##D tmp <- mutate(df, v1 = raise_error("error message"))
##D head(tmp)
## End(Not run)


Animal Wiki
Select an animal below:
Here's some information about goats.
- Adult goats weight between 45 to 60lbs(20 to 27 kg)
- They have rectangle shaped pupils
- Both male and female goats have beards
Here's some information about Platypuses.
- David Collin's who discovered Platypuses was thought to be a fraud who had made them up.
- Adult Platypuses can weight up to 1.5 to 5.3lbs(0.7 to 2.4kg)
- They have venomous barbs on above their webbed feet
Here's some information about Mantis Shrimp.
- There are 451 species of Mantis Shrimp
- Adult Mantis Shrimp range from 10cm(3.9in) to 38cm(15in) in length
- Mantis Shrimp can see from deep ultraviolet to infrared.


Proposal aims to improve access to legal services for homeless vets
by Samantha ManningAs the country honored veterans for Veterans Day Monday, volunteers with the nonprofit group Veterans on the Rise handed out bags with everyday essentials like toothpaste and hand sanitizer for homeless veterans in Washington D.C.
Rep. Kurt Schrader (D-OR) joined the group in handing out the supplies to the homeless.
"It's difficult," Veterans on the Rise Executive Director David Kurtz said. "I had a guy salute me here a little while ago. You could tell this guy was a soldier once. Nobody comes into homelessness on a winning streak. There's always chronic underlying conditions."
Unresolved legal issues can be a big factor in keeping some homeless veterans on the streets. For instance, veterans with a dishonorable discharge are not able to get benefits through the VA.
Related:
The Homeless Veterans Prevention Act of 2019 aims to help the problem. It requires the Department of Veterans Affairs to give grants to groups that provide legal services to homeless veterans or veterans at risk of becoming homeless.
"That would go a long way to helping veterans who are homeless," Kurtz said.
"A lot of times it's getting them back into the system," Schrader said. "The idea to have taxpayer dollars to match up with the pro-bono work that a lot of our lawyers do on behalf of our veterans would be a wonderful asset."
It's estimated more than 16,000 veterans could get legal help through the grant program.


Nfa Class
Definition
Line
83
of
scmlg/Nfa.cm
Constructors & Destructor
public
Nfa
()
public
Nfa
(
NfaState
* start_,
NfaState
* end_)
Member Functions
public
NfaState
*
End
()
const
public
void
SetEnd
(
NfaState
* end_)
public
void
SetStart
(
NfaState
* start_)
public
NfaState
*
Start
()
const
Member Variables
private
NfaState
*
end
private
NfaState
*
start
Constructor& Destructor Details
Nfa Constructor
public
Nfa()
Definition
Line
85
of
scmlg/Nfa.cm
Nfa Constructor
public
Nfa(
NfaState
* start_,
NfaState
* end_)
Definition
Line
89
of
scmlg/Nfa.cm
Member Function Details
End Member Function
public
NfaState
* End()
Definition
Line
101
of
scmlg/Nfa.cm
SetEnd Member Function
public
void
SetEnd(
NfaState
* end_)
Definition
Line
105
of
scmlg/Nfa.cm
SetStart Member Function
public
void
SetStart(
NfaState
* start_)
Definition
Line
97
of
scmlg/Nfa.cm
Start Member Function
public
NfaState
* Start()
Definition
Line
93
of
scmlg/Nfa.cm


{% extends "layout.html" %} {% block content %}
Welcome to the NZ ORCID Hub. Please have a look around, any feedback is much appreciated.
Initial Release
Phone: +644 472 7421
Email<EMAIL_ADDRESS>{{work}}


{% extends "master.html" %} {% block title %}500: server error{% endblock %} {% block content %}
{% trans "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." %}
{% endblock %}


Isotope Mass Abundance Spin Mag Moment
70Ge 69.924250 20.5% 0 72Ge 71.922079 27.4% 0 73Ge 72.923463 7.8% 9/2 -0.87946 74Ge 73.921177 36.5% 0 76Ge 75.921401 7.8% 0
Ge I Ground State 1s22s22p63s23p63d104s24p2 3P0 Ionization energy 63713.24 cm-1 (7.89943 eV) Ref. SM93b Ge II Ground State 1s22s22p63s23p63d104s24p 2P°1/2 Ionization energy 128521.3 cm-1 (15.93461 eV) Ref. SM93b


Using image manipulation class, you can do the following actions:
$this->load->systemLibrary('Image');will load the class and the image object will be available within your code.
Within your controller:
$this->load->systemLibrary('Image'); $this->Image->loadImage('/var/www/test/EdgarPoe.jpg');will load the image (EdgarPoe.jpg in our example) to be manipulated.
Within your controller:
$this->Image->save('/var/www/test/EdgarPoeThumb.jpg');will save the manipulated image.
$this->Image->resize(100 , 50);will create a thumbnail with width = 100px and height = 50px
$this->Image->resize(100 , NULL);will create a thumbnail with width = 100px and height proportional to the width of the original image. If our original width was 200 x 80, the new height will be 40.
$this->Image->resize(NULL , 100);will create a thumbnail width height = 100px and width proportional to the height of the original image. If our original height was 80 x 200, the new width will be 40.
$this->Image->crop(40 , 50);will crop the image 40 pixels from X axis and 50 pixels from Y axis.
$this->Image->rotate(90);will rotate the image 90 degrees counter-clockwise.
Be our image to be watermarked /var/www/testImage.jpg and our watermark image /var/www/watermark.png
$this->Image->setWatermarkImage('/var/www/watermark.png'); $this->Image->watermark();will merge our watermark image at the bottom-right corner of the image to be watermarked, /var/www/testImage.jpg.
We want to open /var/www/testImage.jpg , watermark it using /var/www/watermark.png and save it as /var/www/testWatermark.jpg. Our complete cotroller function would be:
public function watermark() { $this->load->systemLibrary('Image'); $this->Image->loadImage('/var/www/testImage.jpg'); $this->Image->setWatermarkImage('/var/www/watermark.png'); $this->Image->watermark(); $this->Image->save('/var/www/testWatermark.jpg'); }


py2store
Your portal to many Data Object Layer goodies
-
py2store.
ihead
(store, n=1)[source]
Get the first item of an iterable, or a list of the first n items
-
py2store.
kvhead
(store, n=1)[source]
Get the first item of a kv store, or a list of the first n items


User Activation
Thank You!
Your email address has been validated and your Ximpia account created. Login to enter your account.


libstddjb
libskarnet
skalibs
Software
skarnet.org
The following functions are declared in the skalibs/tai.h header, and implemented in the libskarnet.a or libskarnet.so library.
tai is a set of data structures and primitives to represent and perform operations on time.
The point of tai is to handle time without ever having to deal with annoyances such as Y2K, Y2038, NTP limits, non-linear clocks, and the like. By using the tai interface, you ensure your program will behave properly no matter what.
The standard APIs for time management under Unix are broken in more or less subtle ways. The most obvious thing is that they do not pass year 2038. A less obvious problem is that they do not handle leap seconds correctly. Here are a few references you should read to understand what is going on:
The meat and potatoes of all this is that programmers cannot simply rely on standard Unix APIs such as gettimeofday() (which, by the way, is marked as obsolescent, but it's not going to disappear tomorrow) to measure time intervals or even to give precise absolute time, and in any case those APIs will become obsolete in 2038.
tai implements - among other things - the TAI64 and TAI64N formats, which are used in all of skalibs. This gives a programmer access to precise linear absolute time, which is suitable for both timestamping (wallclock usage) and time interval measurements (stopwatch usage). Additionally, TAI64 passes Y2038 (it can represent dates exceeding the estimated lifespan of the universe).
tai has been inspired by Dan J. Bernstein's libtai library, but does not borrow any code from it.
A tai structure holds an absolute date with a one-second precision. A tain structure holds an absolute date with a maximum of one-nanosecond precision, as permitted by the underlying system call. If flag-usert is clear, the system clock will be read via gettimeofday() system call, which has a one-microsecond precision; if it is set, the system clock will be read via the clock_gettime() system call, which has a one-nanosecond precision. In either case, a current tain will be unable to be more precise than the underlying implementation.
A tai, as well as a tain, can also hold a (possibly negative) relative time, i.e. a difference of absolute dates. It is up to the programmer to make sure that a relative time is never interpreted as an absolute TAI64 date, and vice-versa.
int tai_now (tai *t)
Writes the current time as a TAI value to *t, with a
1-second precision. The current time is based on the system clock.
Make sure skalibs has been compiled with or without the
--enable-tai-clock configure option according
to your system clock synchronization method: skalibs supports a
system clock set to TAI-10 or to UTC.
The function returns 1 if it succeeds, or 0 (and sets errno) if
it fails.
int sysclock_get (tain *a)
Reads the current value of the system clock (as in CLOCK_REALTIME) into *a.
Returns 1 if it succeeds or 0 (and sets errno) if it fails.
Note that despite being a tain, *a
does not contain a TAI value - it only contains
an internal, Y2038-safe representation of the value of the system
clock, which should be either TAI-10 or UTC. You should not use
this function directly unless you know exactly what you are doing.
int sysclock_set (tain const *a)
Sets the system clock to *a, provided *a has
the correct internal representation. You should not use this
function directly unless you know exactly what you are doing.
int tain_wallclock_read (tain *a)
Reads the current time into *a, as a TAI64N value.
Returns 1 if it succeeds or 0 (and sets errno) if it fails.
Here a contains a valid TAI64N stamp, no matter what the
system clock is set to: arithmetic operations can be performed
on it.
int tain_setnow (tain const *a)
Sets the current time to *a.
Returns 1 if it succeeds or 0 (and sets errno) if it fails.
a must contain a valid TAI64N stamp; proper
operations will be automatically run to convert that stamp into
the right format for the system clock.
int tain_now_set_wallclock (tain *a)
Tells skalibs that future invocations of tain_now()
(see below) should use a wall clock, i.e. the system time
as returned by clock_gettime(CLOCK_REALTIME) or
gettimeofday(). Also reads the current time into *a.
Returns 1 if it succeeds or 0 (and sets errno) if it fails.
A wall clock is the default: it is not necessary
to call this function before invoking tain_now() at the
start of a program.
The following two operations can only succeed if your system provides the clock_gettime() primitive with at least one of the CLOCK_MONOTONIC or CLOCK_BOOTTIME clocks. Otherwise, they will fail with errno set to ENOSYS.
int tain_stopwatch_init (tain *a, clock_t cl, tain *offset)
Initializes a stopwatch in *offset, using a clock named cl.
Typically, cl is something like CLOCK_MONOTONIC, when it is defined
by the system. The actual value of
*offset is meaningless to the user; offset's only
use is to be given as a second parameter to tain_stopwatch_read().
The function returns 1 if it succeeds or 0 (and sets errno) if it fails.
On success, the current time, as given by the system clock (a
wall clock), is returned in *a.
What tain_stopwatch_init() does is synchronize the "stopwatch clock" to the system clock. Right after tain_stopwatch_init() has been called, the absolute times given by tain_stopwatch_read() and tain_wallclock_read() are the same. Then, depending on the accuracy of the system clock, a drift may appear; calling tain_stopwatch_init() again resets that drift to zero.
int tain_stopwatch_read (tain *a, clock_t cl, tain const *offset)
Gives the absolute time, as a TAI64N value, in *a. This
absolute time is computed as a linear increase (as measured with
the cl clock, which should be a monotonic clock such as
CLOCK_MONOTONIC) since the last time tain_stopwatch_init()
was called with parameter offset. tain_stopwatch_read()
guarantees precise time interval measurements; however, the time it
gives can slightly differ from the result of tain_wallclock_read().
The function returns 1 if it succeeds or 0 (and sets errno) if it fails.
int tain_now_set_stopwatch (tain *a)
Tells skalibs that future invocations of tain_now()
(see below) should use a stopwatch, i.e. the system time
as returned by clock_gettime(CLOCK_MONOTONIC) or similar,
if supported by the system. This is useful when it is more important
for a program to compute unchanging time intervals no matter what the
system clock does, than to display absolute time that is in sync with a
human view of time (which is the cause and reason of most system clock
jumps).
If no monotonic clock is supported by the system, this function does
not change what tain_now() refers to (i.e. it will keep
referring to the system clock).
Returns 1 on success and 0 (and sets errno) on failure. On success,
the current time, as given by the system clock (a wall clock),
is returned in *a.
int tain_now (tain *a)
Writes the current time, as a TAI value, to *a. This is the
function you should use by default. It returns 1 if it succeeds or
0 (and sets errno) if it fails.
tain_now() relies on the concept that there is One True Time Source for the process, and that is where it reads time from. By default, the One True Time Source is the system clock (a wall clock), and tain_now() is actually an alias to tain_wallclock_read(). At the start of a program, calling tain_now_set_stopwatch() will define a monotonic clock (if supported by the system) as the One True Time Source, which will make tain_now() resistant to system clock jumps, but will also make it unsuitable for timestamping.
In other words: the first time you need to read the clock, or at the start of your program, you should use tain_now_set_wallclock() or tain_now_set_stopwatch() depending on whether you want the One True Time Source to be the system clock (CLOCK_REALTIME or gettimeofday()) or a stopwatch (CLOCK_MONOTONIC, if supported). Afterwards, every time you need to read from that time source, use tain_now(). skalibs functions that may block, such as iopause_g, internally call tain_now() to update the timestamp they're using, so they will use the time source you have defined. (Functions ending in _g use the STAMP global variable to store the current timestamp.)
The following functions only convert from a certain structure format to another; they do not make any assumption about the format of the time contained in those structures. For instance, for the tai_from_timeval function, if the struct timeval contains an absolute UTC time, then the tai will also contain the same UTC time. Despite being a tai, it may contain something else than TAI time.
If you need conversion from the native machine system clock format to TAI, see the next section.
int tai_from_time (tai *t, time_t u)
int tai_relative_from_time (tai *t, time_t u)
Those functions convert an absolute (resp. relative) time in a
time_t to an absolute (resp. relative)
time in a tai, with a 1-second precision. They return 1,
unless the time_t value is invalid (in which case they return 0).
int time_from_tai (time_t *u, tai const *t)
int time_from_tai_relative (time_t *u, tai const *t)
The inverse functions of the previous ones. Be aware that
time_t is 32 bits on some systems and cannot store all values
of a tai (in which case the functions will return 0 EOVERFLOW).
int tain_from_timeval (tain *a, struct timeval const *tv)
int tain_relative_from_timeval (tain *a, struct timeval const *tv)
int tain_from_timespec (tain *a, struct timespec const *ts)
int tain_relative_from_timespec (tain *a, struct timespec const *ts)
int timeval_from_tain (struct timeval *tv, tain const *a)
int timeval_from_tain_relative (struct timeval *tv, tain const *a)
int timespec_from_tain (struct timespec *ts, tain const *a)
int timespec_from_tain_relative (struct timespec *ts, tain const *a)
Same conversion operations, between tain and a
struct timeval or struct timespec. The 1-microsecond
(for struct timeval) or 1-nanosecond (for struct timespec)
precision is preserved.
Unlike the previous functions, the functions listed here will always operate on valid absolute timestamps. Only TAI64 time is stored in tai structures, and only TAI64N time is stored in tain structures. These functions will convert to/from TAI, from/to the machine system clock format, i.e. TAI-10 or UTC depending on whether skalibs was compiled with the --enable-tai-clock configure option). This is useful to get valid TAI/TAI64N timestamps out of information exported by the system, for instance the time_t returned by time(), or in the st_atim, st_mtim or st_ctim fields of a struct stat.
The functions return 1 in case of success, or 0 if the conversion could not be performed; in which case errno is set to EINVAL if the input argument was not a valid timestamp, to EOVERFLOW if the output could not be represented in the chosen format (which may happen on systems with a 32 bit time_t), or other error codes.
int tai_from_time_sysclock (tai *a, time_t t)
int time_sysclock_from_tai (time_t *t, tai const *a)
int tain_from_timeval_sysclock (tain *a, struct timeval const *tv)
int timeval_sysclock_from_tain (struct timeval *tv, tain const *a)
int tain_from_timespec_sysclock (tain *a, struct timespec const *ts)
int timespec_sysclock_from_tain (struct timespec *ts, tain const *a)
int tain_uint (tain *a, unsigned int c)
Stores a relative time of c seconds into a.
Normally returns 1, but may return 0 EINVAL on pathological numbers.
int tain_from_millisecs (tain *a, int ms)
This function makes a tain representing a relative
time of ms milliseconds. ms must be non-negative.
The function returns 1, unless ms is negative, in which case
it returns 0 EINVAL.
int taino_millisecs (tain const *a)
If *a contains a non-negative relative time that fits into
a 31-bit integer number of milliseconds, the function returns that
number. Else it returns -1 EINVAL.
int tai_add (tai *t, tai const *t1, tai const *t2)
Stores *t1 + *t2 into t. Of course, *t1
and *t2 must not both represent absolute times.
The function normally returns 1, but will return 0 on bad inputs.
int tai_sub (tai *t, tai const *t1, tai const *t2)
Stores *t1 - *t2 into t. *t1 cannot
be relative if *t2 is absolute. If they are both relative or
both absolute, then *t is relative, else it's absolute.
The function normally returns 1, but will return 0 on bad inputs.
int tain_add (tain *a, tain const *a1, tain const *a2)
int tain_sub (tain *a, tain const *a1, tain const *a2)
Same thing with tain.
int tain_addsec (tain *a, tain const *a1, int c)
Adds c seconds to *a1 and stores the result into a.
c may be negative.
void tain_half (tain *a, tain const *b)
Stores *b/2 into a. *b must be relative.
int tai_less (tai const *t1, tai const *t2)
int tain_less (tain const *t1, tain const *t2)
Those functions return nonzero iff *t1 is lesser than *t2.
*t1 and *t2 must be both relative, or both absolute.
void tai_pack (char *s, tai const *t)
Marshals *t into the buffer s points to, which
must be preallocated with at least TAI_PACK (8) characters. Afterwards,
the buffer contains the
external TAI64 format
representation of *t.
void tai_unpack (char const *s, tai *t)
Unmarshals the
external TAI64 format
label pointed to by s (at least TAI_PACK characters) and stores
the result into t.
void tain_pack (char *s, tain const *a)
void tain_unpack (char const *s, tain *a)
Same thing with
external TAI64N format,
using TAIN_PACK (12) characters.
unsigned int tain_fmt (char *s, tain const *a)
Writes into s an ASCII representation of *a in external
TAI64N format. s must point to a preallocated buffer of at least
TAIN_PACK*2 (24) characters. The function returns the number of bytes that
have been written to s (24).
unsigned int tain_scan (char const *s, tain *a)
Reads 24 characters from s; if those characters are a valid ASCII
representation of the external TAI64N format of some time value, this value
is stored into a, and 24 is returned. Else 0 is returned.
A TAI64N timestamp is a string of 25 characters: a single '@' character followed by the ASCII representation of the TAI64N external format of an absolute date.
unsigned int timestamp_fmt (char *s, tain const *a)
Writes a TAI64N timestamp representing the absolute date *a
into the 25 characters pointed to by s. Returns 25.
unsigned int timestamp_scan (char const *s, tain *a)
Reads 25 characters at s. If those characters are a valid TAI64N
timestamp, stores the absolute date in a and returns 25. Else,
returns 0.
int timestamp (char *s)
Writes the current time (read from the system clock) as a TAI64N timestamp
into s. Returns 1 if it succeeds or 0 (and sets errno) if it fails.
TAI64N timestamps are an efficient, robust, and easy-to-use way of timestampping log lines. They're easy to recognize in automatic data parsers. Log files where every line starts with a TAI64N timestamp can be merged and alphanumerically sorted: the resulting file will be chronologically sorted.
The s6 package provides tools to convert TAI64N timestamps into human-readable dates. Please do not embed human-readable dates in your log files, thus making parsing tools unnecessarily hard to write; use TAI64N timestamps instead, design tools that can parse them, and translate them to human-readable form at human analysis time.


[Gecode] Internal area on www.gecode.org, tarballs
Guido Tack
tack at ps.uni-sb.de
Tue Jun 21 17:51:07 CEST 2005
Hi everyone!
We will from now on (until we actually release) provide tarballs of the
Gecode CVS whenever we find that something substantial has changed and the
CVS is relatively stable. You can download them from our internal pages:
https://www.gecode.org/Internal
The login is gecode, the password pr.p.g.t. (that is propagate with a .
instead of each vowel). Note that these pages are from now on only
accessible via https - please ignore if your browser complains that the
certificate is not valid.
We have recently restructured some parts of the library, and we think what
we have now is pretty much what we are going to release (in terms of
structure). Comments and bug reports (and of course patches that fix the
bugs ;-) are highly welcome! On the internal pages, you will find a
bugzilla bug tracking system.
Please keep in mind that these are pre-release versions, and the same
restrictions apply as for the tarballs Christian has sent you: please do
not redistribute them.
Cheers,
Guido
More information about the gecode-users
mailing list


Settings
Settings
Logout
Notifications
2
All Notifications
Profile
Wall
Personal Information
edit
Username
*
edit
First Name
*
edit
Last Name
*
edit
Birthday
*
edit
Email
*
edit
Phone
*
edit
Update Profile


Merchant Zenkin:
Come on in, customer! Welcome to the most honest shop in northern Aden.
 Can you believe those lunatics?
Anyway, have a look around. Let me know if you see anything you like, eh?
Buy/Sell/Refund.
Ask about the local lord and tax rate.
Quest


Open a dialog over the app's content. Press escape or click outside to close the dialog and send focus back to the triggering button.
Note: The Confirm dialog does not use $mdDialog.clickOutsideToClose(true).
$mdDialog.clickOutsideToClose(true)
Documentation
API Documentation


| Constellation Action | Keyboard Shortcut | User Action | Menu Icon |
|---|---|---|---|
| Run Select Half Hop Induced Subgraph | Selection -> Select Half Hop Induced Subgraph | ||
| Run Select One Hop Induced Subgraph | Selection -> Select One Hop Induced Subgraph |
Half Hop Induced Subgraph will add all the transactions whose source and destination nodes are already selected to the current selection.
One Hop Induced Subgraph will add to the current selection everything the Half Hop Induced Subgraph will add as well as any nodes that have at least two selected neighbours and the transactions connecting the node and those neighbours.
Before Any Induced Subgraph Selection is run:
After Select Half Hop Induced Subgraph is run:
After Select One Hop Induced Subgraph is run:


Mustfa The Poet
Objective
I wanted to create somethign that'd represent the poetic work of art "Stay Alive"
"In 2018, Ahmed released Remember Me, Toronto, a short film about gun violence that captures various people and rappers from his community having honest, difficult conversations about loss. The film features both Drake and the voice of Ahmed's good friend Smoke Dawg, who was murdered in 2018. He tells Complex in reference to the film, "When you get lost to gun violence, there's a stigma. There’s a narrative in the media that insinuates that the victims deserved to die." Like much of Ahmed's work, the film has a brutally humanizing impact." - Krista Marina Apardian
I resonate with the sentement of the song heavily as, I too can relate to loosing a family member to gun violence.


The whole cellular space was equally divided in BLOCK_SIZE_X
chunks of threads on the x-dimension and in BLOCK_SIZE_Y
on the y one. Then each thread within the blocks was mapped to
one cell of the cellular space. We simple used the block and thread
indexing provided by the CUDA framework (see section [kernels]) to
implement that kind of mapping. More in detail the problem here is to
calculate the global index
\(o\) (unique) of the thread given a grid-block organization. As stated
before the launch configuration can be set up with all the combinations
of possible dimensions values for grids and blocks (1 to 3 dimensions
each). In particular here the thread organization used is always:
2D grid and 2D blocks reflecting the 2D nature of the model.
so the approach used was to find first a unique couple of indexes mapping to the 2D coordinate of the cellular automata, and then use the formula (see section [1Dto2Dmemory]) to transform it into the 1D index, needed to refer to 1D CUDA buffers.
\[col=threadIdx.x+blockIdx.x \times blockDim.x;\] \[row=threadIdx.y+blockIdx.y \times blockDim.y;\] \[linearIndex=row \times DIMROW + COL\]
The two values, BLOCK_SIZE_X
and BLOCK_SIZE_Y
are considered in effect parameters and a tuning phase was needed in
order to find the better configuration in terms of minimizing the
execution time. Obviously is possible to allocate only an integer
number of blocks and hence a simple blocks number calculation like
\[BLOCK\_NUM\_X=\frac{SIZE\_CELL\_SPACE\_X}{BLOCK\_SIZE\_X}\]
\[BLOCK\_NUM\_Y=\frac{SIZE\_CELL\_SPACE\_Y}{BLOCK\_SIZE\_Y}\] would
fail in most of cases (it would work only when
\(SIZE\_CELL\_SPACE\_\{X\_Y\}\) is multiple of
\(BLOCK\_SIZE\_\{X\_Y\}\)). So the approach used was :
\[BLOCK\_NUM\_X=\Bigl\lfloor\frac{SIZE\_CELL\_SPACE\_X}{BLOCK\_SIZE\_X}\Bigl\rfloor
+ 1 \cdot \alpha\]
\[BLOCK\_NUM\_Y=\Bigl\lfloor\frac{SIZE\_CELL\_SPACE\_Y}{BLOCK\_SIZE\_Y}\Bigl\rfloor
+ 1 \cdot \beta\]
where \[\alpha = \begin{cases} 1 &\mbox{if } \frac{SIZE\_CELL\_SPACE\_X}{BLOCK\_SIZE\_X} \not\in \mathbb{N} \\ 0 & \mbox{otherwise } \end{cases}\] \[\beta = \begin{cases} 1 &\mbox{if } \frac{SIZE\_CELL\_SPACE\_Y}{BLOCK\_SIZE\_Y} \not\in \mathbb{N} \\ 0 & \mbox{otherwise } \end{cases}\] For example let \(SIZE\_CELL\_SPACE\_X=500\), \(SIZE\_CELL\_SPACE\_Y=800 \) and \(BLOCK\_SIZE\_X=16,BLOCK\_SIZE\_Y=8\) be respectively the X and Y dimension sizes of the cellular space and the X and Y block sizes; the number of blocks is so calculated: \[BLOCK\_NUM\_X=\Bigl\lfloor\frac{500}{16} \Bigl\rfloor + 1 \cdot 1 = \floor{31.25}+1\cdot1= 31 + 1= 32\] \[BLOCK\_NUM\_Y=\Bigl\lfloor\frac{800}{8} \Bigl\rfloor + 1 \cdot 0 =\floor{100}+0= 100 + 1\cdot0= 100\] This means that it is possible to ceate more threads than the total number of cells that make up the whole cellular space. Regarding the latter example: \[(32\cdot 16) \cdot (100\cdot 8)=409600 > 800 \cdot 500= 400000\] meaning that \(409600-400000=9600\) allocated threads are “superfluous” in a context of one-cell one-thread mapping and have to be managed into code and taken into account when designing the porting and evaluating performances. We handled the bad consequence of this scenario just denying them from computation within each kernel (see listing [code:wastedThreads])
//calculating 2D coordinate of the cellular
//space cell to be handled by this specific thread
int col=(threadIdx.x+blockIdx.x*blockDim.x);
int row=(threadIdx.y+blockIdx.y*blockDim.y);
if(col>=0 && col <= SIZE_X){
if(row>=0 && row <= SIZE_Y){
/*
Do work only here
*/
}
}


×
Home
GPS
Timer
LoRa
Terminal
☰ EJA Buoy B
GPS
Sattelites:
HDOP:
Lattitude:
Longitude:
Age:
DateTime:
Altitude:
Course:
Speed:
isValid:


Chairman of Joint Chiefs of Staff of US Armed Forces in Israel
General Mark A. Milley of US Armed Forces visits Israel on the invitation of IDF Chief of Staff Aviv Kochavi.
by Arutz Sheva StaffGeneral Mark A. Milley, Chairman of the Joint Chiefs of Staff (US Armed Forces), visited Israel on Sunday at the invitation of Lieutenant General Aviv Kochavi, IDF Chief of the General Staff.
During the visit, Milley inspected an honor guard at the IDF headquarters in Tel Aviv, where the two generals also discussed operational issues and regional developments.
Kochavi expressed his appreciation for Milley’s longstanding leadership in promoting cooperation between the IDF and the US Armed Forces.
Milley’s visit is the peak of a series of visits by senior generals from the US armed services and combatant commands over recent weeks, further demonstrating the depth of the partnership between the forces and its importance in promoting regional stability.
The IDF Defense Attaché to the US, Major General Yehuda Fox, and the US Defense Attaché to Israel, Brigadier General Charles (Chip) Brown, accompanied the visit.


First enter in one or more ingredients that you have on hand.
Then click on the "Add Ingredient" or "Add Drink" button.
Once you have entered all the ingredients which you want, click on the "Find Some ___" button.
At the bottom of the page you will see different recipe titles. When you click on them the full recipe will become available.
And that's pretty much all it takes! Feel free to use as many times as needed.


http://www.oracle.com/technetwork/java/javase/downloads/index.html
Since Java 9, Oracle Java does not support 32-bit Windows systems.
Therefore, install the latest version of Java 8 on 32-bit Windows systems.
Installation can be completed simply by clicking the "Next" button.
The JDK is installed in "C:\Program Files\Java\jdk-<version>".
Click Start, then Control Panel, then System.
Select Advanced tab, then Click Environment Variables button.
Click New button in User Variables.
Creates a new environment variable named JAVA_HOME in User Variables.
The value of JAVA_HOME is the installation directory of the JDK.
To obtain the correct value, use the Windows Explorer.
| Variable name: | |
| Variable value: |
Click New button in User Variables again.
Creates a new environment variable named Path in User Variables.
The value of Path is %JAVA_HOME%\bin.
| Variable name: | |
| Variable value: |
public class Test { public static void main(String[] args) { System.out.println("Hello World!"); } }C:\ Command Prompt
C:\Users>javac Test.java C:\Users>java Test Hello World!
javac Test.java
'javac' is not recognized as an internal or external command, operable program or batch file.
Update the Path Environment Variable
java Test
Exception in thread "main" java.lang.NoClassDefFoundError: Test
The above error occurs when Test.class file was not found.
When you run "java Test" in the directory where Test.class file does not exist, you will get this error.
If you want to run the class in the directory where the class file does not located, use the -cp option of java.exe, such as:
C:\javawork>java -cp C:\Users Test
C:\Users is the directory where the class file is located.
Test is a Java class to run.
Until Package and Modifiers,
it is better to use a simple editor such as editPlus and Notepad++.
After you finish the Package and Modifiers, use Eclipse.


Everton snubbed chance to sign £88m Man Utd, Liverpool stars for bargain £20m
Former Everton director of football Steve Walsh has claimed that the club turned down the possibility of signing Harry Maguire and Andy Robertson for just £20million.
Maguire joined Manchester United in the summer for £80million from Leicester City, while Robertson signed for Liverpool from Hull in 2017 for just £8m before going on to win the Champions League with the Reds last term.
And Walsh, who was replaced by Marcel Brands at Goodison Park in May 2018, claims he offered Everton a chance to sign the duo for only £20m, while current Man Utd and City target Erling Haaland was also suggested.
Walsh told The Athletic: “While I was at Everton, I offered them Andrew Robertson and Harry Maguire deals, when they were at Hull, and it was worth £20 million for the pair. Everton wouldn’t take them.
“I had a deal done for Jonny Evans too before he came to Leicester, but again they wouldn’t take him. Erling Haaland, the striker with Salzburg, I had him and his dad at the club with a deal done for £3.4m (€4m). The club wouldn’t back me.”


Symbol Index for "Relevant Focus"
Symbol Index for diagram
"Relevant Focus"
Established Focus (Class)
FFA/State (Generalization Node)
Focus For Further Activity (Class)
Rejected Focus (Class)
Relevant Focus (Class)


This new amp couples 16 watts of cathode-biased 6V6 output tube power with features usually found on larger amps such as reverb, a full TMB tone stack, and our transparent PRS master volume circuit. All amps are hand wired in Stevensville, Maryland using hybrid circuitry techniques for consistency and durability.


This document recommends how to mark the primary language(s) in a HTML document. It could be considered a clarification of the HTML 4.0 Specification [HTML40]; in particular, it is not in contradiction with the HTML 4.0 Specification. The objective is to have a best practice in this field; at present there is some confusion.
lang
attribute specifies the natural language.
This document is mostly concerned with how to specify the primary language(s)
(there could be more than one)
and the base language
(there is only one)
in HTML documents.
Some documents are bilingual and few are trilingual or n-lingual. Bilingual documents are usually short; i.e, a few paragraphs. N-lingual documents are usually very short; a few sentences.
The main reason for the existence of n-lingual documents is political; i.e., in certain situations it is not politically correct to assume a base language. A common practice is to have one small document that is a menu of languages. For example, the Europa server of the European Commission [EUR].
Another approach to choose the language is to set the client (e.g., the browser) to the preferred language(s). The client will transmit the language(s) in the Accept-Language field of HTTP. Immediately, the server will send an appropriate document. For example, the Spanish version will be presented if the language preferences (in the browser) are Spanish and French and the document is available (in the server) in French, German and Spanish.
<HTML> <HEAD> <META HTTP-EQUIV="Content-Language" Content="fr"> <TITLE>Mon doc</TITLE> </HEAD> <BODY> Je suis un Berlinois. </BODY> </HTML>
The value of the Content
attribute
of the META element is the same as the
value of the Content-Language
header in HTTP;
i.e,
a comma-separated list of language codes.
For example:
<META HTTP-EQUIV="Content-Language" Content="fr,en">
These language codes are the same used in the lang
attribute of some HTML elements.
For example:
<BODY LANG=fr>
The language codes are defined in [RFC1766]. See also 8.1.1 Language codes of the HTML 4.0 Specification [HTML40] and [RFC2068].
The order of the languages in the Content-Language is significant.
The first language in the list is the base language of the document;
i.e., any text not re-specified with the lang
attribute is in
the base language.
The META should not be marked with more than one language in documents with minor fragments in other languages. The rules to specify a document as monolingual, bilingual or n-lingual are the same as for printed books.
The reason for recommending META as opposed to the HTML element with
the lang
attribute are:
A lang
attribute in the HTML element overrides the language
specified in the META element.
The inheritance rules are in
8.1.2 Language information and text direction
of the HTML 4.0 Specification
[HTML40].
In particular, thanks to


Quaka
Quaka is an Earhquakes Data visualization app.
Course Instructor Dr. Peter Bak - IBM Haifa Research Lab *
Publication date: 16/8/2017
License: MIT
We used Project general descriptiond3 (v3) library to draw the data, leaflet for viewing the map. We also used the following plug-ins/libs to help us building the app:
- Select area: A leaflet plugin for selecting area on the map. *
- d3 slider: A d3 plugin for building sliders easily.*
- IntroJS: A javascript library for displaying quick tour for first site visit.*
- USGS: Used to get the data in GeoJSON format.*
When you visit the app, you get the following page: Documentation
After that, when the Data download finish successfully, you get the app's main page:
App Elements
Navigation bar:
The navigation bar contain most of the app buttons and tools, it is always available for easy access.
Maps:
The Maps menu contain different map layers, the user can select the layer he prefer with a click. We think the most suitable map is the one we created, it is simple, clear, beatiful, we chose it to be the default map.
Tools:
The Tools menu contain different tools the user can use:
- Toggle Labels: This tool is special for our simple map, it add a labels layer to our simple map.
- Toggle Layer: This tool Show/Hide the hover Layer, this layer is useful to highlight current country borders, zooming when clicking a country.
- Toggle Felt Data: This tool used to add/remove a green stroke for events that have been felt by at least one person.
- Toggle Theme: This tool is special for our simple map, toggle between Light (default) and Dark Theme.
Data:
The Data menu contain different data types:
- Last Day: Default data type, display events during the past 24 hours.
- Past 7 Days: Display events during the past 7 days.
- All Month: Display events during the past 30 days.
Filter By:
The Filter By menu contain different data filters:
- Select Area: A tool that give the user the ability to view only events from spesific area by selecting it.
- Time:A tool that give the user the ability to view only events at spesific time range.
- Magnitude: A tool that give the user the ability to view only events that fall in spesific magnitude range.
- Depth: A tool that give the user the ability to view only events that fall in spesific depth range.
- Felt: A tool that give the user the ability to view only events that have been felt by at lease one person. Significance
Animate:
This tool allow the user to view the date dynamically, ordered by the time the event occured, it is useful to see if there is
a patterent or some relation between event size, location ,etc.
It also give the user the ability to choose the time interval between each event view (in ms):
Reset:
The reset button reset the map to it's original state, with the last choosen data type (past day, past 7 days..), it does so without re-downloading the data again.it is useful to restore the map at the end of applaying different filters.
Refresh:
The refresh button is used to enable or disable the "auto refresh" feature, this feature update the data every 5 minutes without user interaction. It is useful for keeping the data up to date with the USGS website.
Download:
The download button allow the user to update the data on-demand, It is useful when the user want to view the last data.
Help:
The help button show a quick tour for the user, the same tour that displayed on the first time the user visit the site.
Full screen:
The full screen button toggle between full/normal screen mode, It is useful to give the user all the available space to view the data clearly.
Country name:
This card show the user current hovered country name. It also tell the user to click a country to zoom to it.
Point Info:
This card show the user infromation about the current hovered point.
Legend:
This card show the user the legend of the viewd attributes: Magnitude, Significance, Felt. You can hide it by clicking it.
Controls:
- The "+" button: Zoom in button.
- The "-" button: Zoom out button.
- The "R" button: Reset Zoom to view all the world.
- The "L" button: Show/hide the Legend card.
- The "S" button: Stop the animation. only shown during animation
Summary Table:
The summary table show the user useful infromation about the current viewd data, number of events, minimum/maximum attributes range...
Filter Table:
The filter table help the user to keep track with what filters he applied to the data. It only shown when filters applied.


Aerial_Photos_Summer_1998
Aerial_Photos_Summer_2000
Aerial_Photos_Summer_2003
Aerial_Photos_Summer_2005
Aerial_Photos_Summer_2006
Aerial_Photos_Summer_2007
Aerial_Photos_Summer_2008
Aerial_Photos_Summer_2009
Aerial_Photos_Summer_2010
Aerial_Photos_Summer_2011
Aerial_Photos_Summer_2012
Aerial_Photos_Summer_2013
Aerial_Photos_Summer_2014
Aerial_Photos_Summer_2015
Aerial_Photos_Summer_2016
Aerial_Photos_Winter_2005
Aerial_Photos_Winter_2012


Fetch performing GET, POST, PUT, DELETE & JSONP
This page has links to examples of get, post, put and delete Ajax requests using PHP controllers on the back end.
This page has links to examples of get, post, put and delete Ajax requests using PHP controllers on the back end.


|
|
The Draft button will create a new empty draft message. |
|
|
Creates a new address in the current address book shown in the address book pane. |
|
|
Creates a new group in the current address book shown in the address book pane. |
|
|
Edits the selected addresses or groups. |
|
|
Deletes the addresses or groups selected in the address book pane. |


--- layout: post title: Weekly Roundup Week 2 date: '2012-02-06T08:16:06-08:00' tags: tumblr_url: http://alexhwilliams.tumblr.com/post/17156438308/weekly-roundup-week-2 ---
http://bit.ly/x3bIc7


An unknown error has occurred.
Username is required.
Username must be less than 50 characters.
Username is already taken.
An email address is required.
The email address must be a valid email address.
The email address must be less than 100 characters.
The email address is already taken.
Password fields do not match.
Password is required.


?HEW
Yq^
New
York
Botanteal
Garden
"11,5251.2
JARDIN
BOTANICO
NACIONAL
OR.
RAFAEL
M.
MOSCOSO
SANTO
DOMINGO,
REPUBLICA
DOMINICANA
NO__£gg£AMIUA_Araran»
Anthurium
scandens
Engl.
terrestrial,
spathe
green,
spadix
«rreenish
white,
mature
fr.
milky
white,
on
slope,
República
Dominicana,
Prov.
Peravia,
"Dieciseis”,
6.1
km.
SW
of
Juan
Aldian,
on
Piedra
Blanca
to
Pancho
Arriba
road,
18
degrees
44*
H,
70
degrees
?3'V,
alt.
900
m.,
moist
slope
with
native
trees,
underbrush
removed
for
cultivation,
spring
and
stream
along
roa:}-,
June
10,
1980
M.
Mejia,
T.
Zanoni
1622562
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


NEW CA (CORRECTIVE ACTIONS)
Finding ID
Corrective Action Description
Date of CAP approval
Due date
Contact Person
Closure Date
Due Date History
Audit corrective actions:
Date:
Description:
New proposed due date:
CAA follow up actions:
Date:
Description:
Who is responsible:
New due date:
Documents attached:
1. Foto:
Browse
2. Evidenca:
Browse
3. Raporti:
Browse
4. Orari:
Browse
5. Checklists:
Browse
Save


Pousse-Café Doc Domain Model
Version Test
Table of Contents
- Table of Contents
- Introduction
- Pousse-Café Doc Domain
- Doc
- Aggregates
- AggregateDoc
- DomainProcessDoc
- EntityDoc
- ModuleDoc
- ProcessStepDoc
- Relation
- ServiceDoc
- ValueObjectDoc
- Services
- AggregateEventsGraphFactory
- AnnotationsResolver
- ClassDocPredicates
- ClassDocRepository
- ComponentDocFactory
- ConsumedMessageExtractor
- DocletAccess
- DocletServices
- DomainFactory
- DomainProcessStepsFactory
- GraphFactory
- ProcessStepDocExtractor
- UbiquitousLanguageFactory
- Domain Processes
- AggregateDocCreation
- ComponentLinking
- DomainProcessDocCreation
- EntityDocCreation
- ModuleDocCreation
- ProcessStepDocCreation
- ServiceDocCreation
- ValueObjectDocCreation
- Ubiquitous Language
Introduction
This document describes Pousse-Café Doc domain using concepts defined by
Domain-Driven Design (DDD) methodology. It was generated
directly from source code and can be considered as a close summary of what is actually implemented.
The following DDD elements are described in the remainder and shortly defined below. For more precise and complete
definitions, please refer to the litterature:
- Value Object: an object fully described by its attributes and with no identity nor life-cycle,
- Entity: an object with a life-cycle and an identity;
- Aggregate: a group of related value objects and entities, one of which being called the root of the aggregate;
- Service: an object representing an operation that is not naturally part of a value object or an entity;
- Domain Event: an object representing an event and used to communicate information between aggregates potentially
located in different bounded contexts;
- Modules: they describe boundaries inside of which each component has a unique name and a given definition.
Some concepts might appear in different modules with the same name but with a slightly or completely different
definition.
The identity of an entity is generally represented by a special value object called the key. An aggregate is identified
by its root's key.
An additional non-DDD component is also described in next sections: the Domain Process. Domain processes are responsible
for calling commands on aggregates (and therefore, starting transactions when necessary). Expect for some commands initiating
a process, most of them are called when handling a Domain Event.
The following conventions are being used:
- As this document is generated directly from code, the domain is described by a set of modules.
Each module is composed of a set of aggregates, services and domain processes.
- An undirected graph representing a module is composed of boxes representing the aggregates. Edges represent relations
between aggregates i.e. the fact that one aggregate makes reference to another one.
- Value objects and entities are presented in the context of their aggregate. An undirected graph representing an aggregate
is composed of boxes (Entities) and ellipses (Value Objects). The aggregate root has thicker borders. Edges
represent relations between the different components. Dashed edges represent a reference made to another aggregate
via a Value Object (the key of the aggregate root). Dashed edges represent the relations shown in module
graph.
- Domain processes are represented using directed graphs, each node being a step of the process. Entering a step of
a domain process generally implies the creation of a new aggregate or the update of an existing one. External steps
(i.e. steps executed outside of the process) are represented as dashed boxes. Edges are labeled with the name of the
domain event which implies the transition from one node to another.
The rest of the document is split in two parts:
- the description of the different modules and their components,
- the ubiquitous language, presented in the form of a glossary. Each entry is composed of a name, the module (if
relevant), the type of component and a short description.
Pousse-Café Doc Domain
Doc
Aggregates
AggregateDoc
Value Objects
- ComponentDoc:
- ModuleComponentDoc:
Relations
Events
DomainProcessDoc
Value Objects
- ComponentDoc:
- ModuleComponentDoc:
Relations
Events
EntityDoc
Value Objects
- ComponentDoc:
- ModuleComponentDoc:
Relations
Events
ModuleDoc
Value Objects
Relations
Events
ProcessStepDoc
Value Objects
- ComponentDoc:
- ModuleComponentDoc:
Relations
Events
Relation
Value Objects
- ComponentType:
- RelationId:
Relations
Events
ServiceDoc
Value Objects
- ComponentDoc:
- ModuleComponentDoc:
- ServiceDocId:
Relations
Events
ValueObjectDoc
ValueObjectDoc describes the documentation of a Value Object in a given Bounded Context.
Value Objects
- ComponentDoc:
- ModuleComponentDoc:
- ValueObjectDocId:
Relations
Events
Services
AggregateEventsGraphFactory
AnnotationsResolver
ClassDocPredicates
ClassDocRepository
ComponentDocFactory
DocletAccess
DocletServices
DomainFactory
DomainProcessStepsFactory
GraphFactory
UbiquitousLanguageFactory
Domain Processes
AggregateDocCreation
- AggregateDocFactory.newAggregateDoc(CreateAggregateDoc):
ComponentLinking
DomainProcessDocCreation
EntityDocCreation
ModuleDocCreation
ProcessStepDocCreation
ServiceDocCreation
ValueObjectDocCreation
Ubiquitous Language
- AggregateDoc (Doc), Aggregate,
- AggregateDocCreation (Doc), Domain Process,
- AggregateEventsGraphFactory (Doc), Service,
- AnnotationsResolver (Doc), Service,
- ClassDocPredicates (Doc), Service,
- ClassDocRepository (Doc), Service,
- ComponentDoc (Doc), Value Object,
- ComponentDocFactory (Doc), Service,
- ComponentLinking (Doc), Domain Process,
- ComponentType (Doc), Value Object,
- ConsumedMessageExtractor (Doc), Service,
- Doc, Bounded Context,
- DocletAccess (Doc), Service,
- DocletServices (Doc), Service,
- DomainFactory (Doc), Service,
- DomainProcessDoc (Doc), Aggregate,
- DomainProcessDocCreation (Doc), Domain Process,
- DomainProcessStepsFactory (Doc), Service,
- EntityDoc (Doc), Aggregate,
- EntityDocCreation (Doc), Domain Process,
- GraphFactory (Doc), Service,
- ModuleComponentDoc (Doc), Value Object,
- ModuleDoc (Doc), Aggregate,
- ModuleDocCreation (Doc), Domain Process,
- ProcessStepDoc (Doc), Aggregate,
- ProcessStepDocCreation (Doc), Domain Process,
- ProcessStepDocExtractor (Doc), Service,
- Relation (Doc), Aggregate,
- RelationId (Doc), Value Object,
- ServiceDoc (Doc), Aggregate,
- ServiceDocCreation (Doc), Domain Process,
- ServiceDocId (Doc), Value Object,
- UbiquitousLanguageFactory (Doc), Service,
- ValueObjectDoc (Doc), Aggregate,
ValueObjectDoc describes the documentation of a Value Object in a given Bounded Context.
- ValueObjectDocCreation (Doc), Domain Process,
- ValueObjectDocId (Doc), Value Object,


LASA 'n Found is a crowdsourced solution to LASA's lost and found problem. You can either browse for a lost item, or submit a new one to our database.
Our homepage shows the 10 most recently submitted items in our database, to look further back in time, our archive function lets you look through all current Lost 'n Found items. An item in the database expires after 2 weeks, meaning if it isn't claimed, the item is deleted. To add an item that you have found, please go to the Report a New Lost Item page. To claim an item, make sure it is actually yours, complete a Captcha, and hit 'Claim Me!'.


[1]
best of 1 SAMSUNG or Netflix are great.Very easy.
[2]
best of 1 SAMSUNG or Netflix a decent quality wall mount you purchase a stand.


@since Oak 1.6 Experimental Feature
Compared to SegmentNodeStore DocumentNodeStore has higher latency for reads for the data not present in the cache. This happens due to multiple round trips required to serve a hierarchical read access over remote storage. For e.g. reading content of path /content/assets/nature/sunrise.jpg would require around 4 remote calls if the path content is not present in local cache. Persistent Cache helped in improving this by enabling caching lot more content off heap compared to limited inmemory cache.
With new Secondary NodeStore support its now possible to configure a SegmentNodeStore as a secondary store to store content under certain set of paths locally. SegmentNodeStore act a local copy of remote repository (secondary store) more like a local git repo which gets updated from primary store (remote Mongo storage) via observation. Writes are still routed to primary store but reads can be served from local secondary store.
In above setup 2 Oak Cluser nodes connect to same Mongo server. In each Oak instance a SegmentNodeStore is configured as secondary store. This store gets updated by observer.
Experimental Feature
This feature is currently experimental. Following feature item is currently pending
Reading /a/b at revision r1 would happen like below
Key points here
Note that even if root revision of secondary store is lagging behind current head its possible that read for /a/b can be handled by secondary store if /a has not been modified recently. So those parts of repo which have not been recently modified would most likely be served from Secondary NodeStore and avoid remote calls to Mongo.
Updates to secondary store happen in 3 ways
Key points here
For local changes done on that cluster nodes the writes are applied as part of Observation call where DocumentNodeStore send content change callback to all registered observers. Here Secondary NodeStore registers itself as an Observer and listed for such callback.
So upon any local change it gets a callback with latest state of root paths. There it performs a diff between local head revision and new head revision and applies the changes onto local store
DocumentNodeStore periodically performs background reads to pickup changes from other cluster node. Such a change is then pushed to registered observer as an external change. Secondary NodeStore uses same flow as for local changes to update its state.
This diff based update mechanism would then only read content from remote for the changed paths and further only for paths in which secondary NodeStore is interested
If the cluster node is shutdown and later started then at time of start the secondary NodeStore would try to synchronize its state with remote storage again by performing diff between local head revision and remote head revision. This is done asynchronously and does not block the startup
For enabling this feature following OSGi configurations have to be done
1. Configure SegmentNodeStore in secondary role
Create an OSGi config file org.apache.jackrabbit.oak.segment.SegmentNodeStoreFactory-secondary.config with following content
role="secondary"
This would create a SegmentNodeStore in secondary role and uses default segmentstore-secondary directory to store the segment files. Refer to config options for more details. Note all the options for SegmentNodeStoreService are applicable for SegmentNodeStoreFactory
2. Configure SecondaryStoreCacheService (optional)
By default secondary NodeStore would be activated based on previous config only. However it can be tweaked further by creating an OSGi config file org.apache.jackrabbit.oak.plugins.document.secondary.SecondaryStoreCacheService.config
includedPaths=[ \ "/libs", \ "/apps", \ "/content" ]
Above config would enable secondary NodeStore for paths ‘/libs, /apps and /content’
While enabling secondary NodeStore feature following aspects needs to be considered
Certain maintenance like online RevisionGC for secondary NodeStore i.e. SegmentNodeStore need to be enabled. (This feature is currently pending OAK-5352).
This would ensure that older revision gets garbage collected


All forecast periods beyond those specified in the Indices Tool are generated assuming they follow the last relevant period's year-on-year rate of inflation.
This tool is designed to:
- Input Table: Input, either manually or copy-paste* from a compatable spreadsheet (Ctrl + C, CTRL + V), financial values into the input table. Only cells with values will be converted (e.g. to inflate £100 from 2010 onwards, £100 must be entered from 2010 onwards). *This function is not supported by Internet Explorer.
- Index: select an index from the dropdown menu.
- Conversion (Real/Nominal): select whether to convert from real-to-nominal (inflate) or nominal-to-real (deflate).
- Convert From (Base Period): select the relevant period to use as the base for conversion. Note this cannot be set before 2008.
- Period Reference: select the period reference of interest (financial year, calendar year, or quarterly).
- Start Period: provide the relevant first period to display. This will affect the outputs, so select carefully. Note this cannot be set before 2008.
- End Period: provide the relevant final period to display. This will affect the outputs, so select carefully.
- Number of Required Rows: Number input. Note that arbitrarily large numbers may cause lagged responses or crash the application.
- Percentage Change: select chosen percentage change comparison; either base-to-period (i.e. all relative to base period), or period-to-period (i.e. relative to prior period).
- Update Table: when parameters are set up, this button will generate an updated table.
- Download Results: download output results, tailored to user-selected parameters.
- Output Table: displays the converted results of the input table, based on the user parameters.
- Percentage Change: displays the converted results as percentage changes, referencing either the base-to-period or period-to-period parameter.
- Be explicit in reporting which index is used.
- Real/Nominal conversions: be explicit in the years that are converted to/from.
- Re-basing: be explicit in which year(s) that are converting from, and which year is the new base year.
- For example: [these values] are nominal prices. They were inflated, from 20XX prices; or [these other values] are real prices. They were deflated, and are measured in 20XX prices.
- Download Results: displays the input table, followed by the output table, and then the conversion factor used.


DREAMERS | DEVELOPERS | DESIGNERS
DCube is an all new platform for Developers / Designers , poeple who think of changing the world . Because People who think about changing the world are the one's who actually change it.
JOIN THE TEAM . BE A PART OF CHANGING THE WORLD .
MAIL US AT<EMAIL_ADDRESS>Siddharth Chaudhary | Siddhant Jain