POSIX compliant mutex. More...
#include <cmsis-plus/rtos/os.h>
Classes | |
| class | attributes |
| Mutex attributes. More... | |
| class | attributes_recursive |
| Recursive mutex attributes. More... | |
| class | protocol |
| Mutex protocols. More... | |
| class | robustness |
| Mutex robustness. More... | |
| class | type |
| Mutex types. More... | |
Public Types | |
| using | count_t = uint16_t |
| Type of variables holding mutex recursion counters. | |
| using | protocol_t = uint8_t |
| Type of variables holding mutex protocols. | |
| using | robustness_t = uint8_t |
| Type of variables holding mutex robustness. | |
| using | type_t = uint8_t |
| Type of variables holding mutex behaviours. | |
Public Member Functions | |
Constructors & Destructor | |
| mutex (const attributes &attr=initializer_normal) | |
| Construct a mutex object instance. | |
| mutex (const char *name, const attributes &attr=initializer_normal) | |
| Construct a named mutex object instance. | |
| ~mutex () | |
| Destruct the mutex object instance. | |
Operators | |
| bool | operator== (const mutex &rhs) const |
| Compare mutexes. | |
Public Member Functions | |
| result_t | lock (void) |
| Lock/acquire the mutex. | |
| result_t | try_lock (void) |
| Try to lock/acquire the mutex. | |
| result_t | timed_lock (clock::duration_t timeout) |
| Timed attempt to lock/acquire the mutex. | |
| result_t | unlock (void) |
| Unlock/release the mutex. | |
| thread::priority_t | prio_ceiling (void) const |
| Get the priority ceiling of a mutex. | |
| result_t | prio_ceiling (thread::priority_t prio_ceiling, thread::priority_t *old_prio_ceiling=nullptr) |
| Change the priority ceiling of a mutex. | |
| result_t | consistent (void) |
| Mark mutex as consistent. | |
| thread * | owner (void) |
| Get the thread that owns the mutex. | |
| type_t | type (void) |
| Get the mutex type. | |
| protocol_t | protocol (void) |
| Get the mutex protocol. | |
| robustness_t | robustness (void) |
| Get the mutex robustness. | |
| result_t | reset (void) |
| Reset the mutex. | |
Public Member Functions | |
| const char * | name (void) const |
| Get object name. | |
Static Public Member Functions | |
Operators | |
| static void * | operator new (std::size_t bytes) |
| Allocate space for a new object instance using the RTOS system allocator. | |
| static void * | operator new (std::size_t bytes, void *ptr) |
| Emplace a new object instance. | |
| static void * | operator new[] (std::size_t bytes) |
| Allocate space for an array of new object instances using the RTOS system allocator. | |
| static void * | operator new[] (std::size_t bytes, void *ptr) |
| Emplace an array of new object instances. | |
| static void | operator delete (void *ptr, std::size_t bytes) |
| Deallocate the dynamically allocated object instance. using the RTOS system allocator. | |
| static void | operator delete[] (void *ptr, std::size_t bytes) |
| Deallocate the dynamically allocated array of object. instances using the RTOS system allocator. | |
Static Public Attributes | |
| static const attributes | initializer_normal |
| Default normal mutex initialiser. | |
| static const attributes_recursive | initializer_recursive |
| Default recursive mutex initialiser. | |
| static constexpr count_t | max_count = 0xFFFF |
| Constant with the maximum value for the recursion counter. | |
Friends | |
| class | thread |
| Get the current running thread. | |
POSIX compliant mutex.
A synchronisation object used to allow multiple threads to serialise their access to shared data. The name derives from the capability it provides; namely, mutual-exclusion. The thread that has locked a mutex becomes its owner and remains the owner until that same thread unlocks the mutex.
Many error conditions that can occur are not required to be detected by the implementation in order to let implementations trade off performance versus degree of error checking according to the needs of their specific applications and execution environment. As a general rule, conditions caused by the system (such as insufficient memory) are required to be detected, but conditions caused by an erroneously coded application (such as failing to provide adequate synchronisation to prevent a mutex from being deleted while in use) are specified to result in undefined behaviour.
A wide range of implementations is thus made possible. For example, an implementation intended for application debugging may implement all of the error checks, but an implementation running a single, provably correct application under very tight performance constraints in an embedded computer might implement minimal checks. An implementation might even be provided in two versions, similar to the options that compilers provide: a full-checking, but slower version; and a limited-checking, but faster version. To forbid this optionality would be a disservice to users.
By carefully limiting the use of "undefined behaviour" only to things that an erroneous (badly coded) application might do, and by defining that resource-not-available errors are mandatory, POSIX ensures that a fully-conforming application is portable across the full range of implementations, while not forcing all implementations to add overhead to check for numerous things that a correct program never does. When the behaviour is undefined, no error number is specified to be returned on implementations that do detect the condition. This is because undefined behaviour means anything can happen, which includes returning with any value (which might happen to be a valid, but different, error number). However, since the error number might be useful to application developers when diagnosing problems during application development, a recommendation is made in rationale that implementors should return a particular error number if their implementation does detect the condition.
Providing for static initialisation of statically allocated synchronisation objects allows modules with private static synchronisation variables to avoid runtime initialisation tests and overhead. Furthermore, it simplifies the coding of self-initialising modules. Such modules are common in C libraries, where for various reasons the design calls for self-initialisation instead of requiring an explicit module initialisation function to be called. An example use of static initialisation:
pthread_mutex_t
from <pthread.h>
(IEEE Std 1003.1, 2013 Edition). Definition at line 52 of file os-mutex.h.
| os::rtos::mutex::mutex | ( | const attributes & | attr = initializer_normal | ) |
Construct a mutex object instance.
| [in] | attr | Reference to attributes. |
This constructor shall initialise a mutex object with attributes referenced by attr. If the attributes specified by attr are modified later, the mutex attributes shall not be affected. Upon successful initialisation, the state of the mutex object shall become initialised.
Only the mutex object itself may be used for performing synchronisation. It is not allowed to make copies of condition variable objects.
In cases where default mutex attributes are appropriate, the variables mutex::initializer_normal
or mutex::initializer_recursive
can be used to initialise mutex objects. The effect shall be equivalent to creating a mutex object with the default constructor.
If the attr attributes are modified after the mutex creation, the mutex attributes shall not be affected.
pthread_mutex_init()
from <pthread.h>
(IEEE Std 1003.1, 2013 Edition).Definition at line 430 of file os-mutex.cpp.
| os::rtos::mutex::mutex | ( | const char * | name, |
| const attributes & | attr = initializer_normal |
||
| ) |
Construct a named mutex object instance.
| [in] | name | Pointer to name. |
| [in] | attr | Reference to attributes. |
This constructor shall initialise a mutex object with attributes referenced by attr. If the attributes specified by attr are modified later, the mutex attributes shall not be affected. Upon successful initialisation, the state of the mutex object shall become initialised.
Only the mutex object itself may be used for performing synchronisation. It is not allowed to make copies of condition variable objects.
In cases where default mutex attributes are appropriate, the variables mutex::initializer_normal
or mutex::initializer_recursive
can be used to initialise mutex objects. The effect shall be equivalent to creating a mutex object with the default constructor.
If the attr attributes are modified after the mutex creation, the mutex attributes shall not be affected.
pthread_mutex_init()
from <pthread.h>
(IEEE Std 1003.1, 2013 Edition).Definition at line 466 of file os-mutex.cpp.
| os::rtos::mutex::~mutex | ( | ) |
Destruct the mutex object instance.
This destructor shall destroy the mutex object; the object becomes, in effect, uninitialised. An implementation may cause the destructor to set the object to an invalid value.
It shall be safe to destroy an initialised mutex that is unlocked. Attempting to destroy a locked mutex results in undefined behaviour (for example it may trigger an assert).
pthread_mutex_destroy()
from <pthread.h>
(IEEE Std 1003.1, 2013 Edition).Definition at line 526 of file os-mutex.cpp.
| result_t os::rtos::mutex::consistent | ( | void | ) |
Mark mutex as consistent.
| result::ok | The mutex was marked as consistent. |
| EPERM | Cannot be invoked from an Interrupt Service Routines. |
| EINVAL | The mutex object referenced by mutex is not robust or does not protect an inconsistent state. |
If the robust mutex is in an inconsistent state, the consistent()
function can be used to mark the state protected by the mutex referenced by mutex as consistent again.
If an owner of a robust mutex terminates while holding the mutex, the mutex becomes inconsistent and the next thread that acquires the mutex lock shall be notified of the state by the return value EOWNERDEAD
. In this case, the mutex does not become normally usable again until the state is marked consistent.
If the thread which acquired the mutex lock with the return value EOWNERDEAD
terminates before calling either consistent()
or unlock()
, the next thread that acquires the mutex lock shall be notified about the state of the mutex by the return value EOWNERDEAD
.
pthread_mutex_consistent()
from <pthread.h>
(IEEE Std 1003.1, 2013 Edition).Definition at line 1466 of file os-mutex.cpp.
| result_t os::rtos::mutex::lock | ( | void | ) |
Lock/acquire the mutex.
| result::ok | The mutex was locked. |
| EPERM | Cannot be invoked from an Interrupt Service Routines. |
| ENOTRECOVERABLE | The state protected by the mutex is not recoverable.. |
| EAGAIN | The mutex could not be acquired because the maximum number of recursive locks for mutex has been exceeded. |
| EINVAL | The mutex was created with the protocol attribute having the value mutex::protocol::protect and the calling thread's priority is higher than the mutex's current priority ceiling. |
| EOWNERDEAD | The mutex is a robust mutex and the process containing the previous owning thread terminated while holding the mutex lock. The mutex lock shall be acquired by the calling thread and it is up to the new owner to make the state consistent. |
| EDEADLK | The mutex type is mutex::type::errorcheck and the current thread already owns the mutex. |
If the mutex is free, lock it. If the mutex is already locked by another thread, the calling thread shall block until the mutex becomes available. This operation shall return with the mutex object referenced by mutex in the locked state with the calling thread as its owner. If a thread attempts to relock a mutex that it has already locked, lock()
shall behave as described in the Relock column of the following table. If a thread attempts to unlock a mutex that it has not locked or a mutex which is unlocked, unlock()
shall behave as described in the Unlock When Not Owner column of the following table.
| Mutex Type | Robustness | Relock | Unlock When Not Owner |
|---|---|---|---|
| normal | non-robust | deadlock | undefined behaviour |
| normal | robust | deadlock | error |
| errorcheck | either | error | error |
| recursive | either | recursive | error |
| default | non-robust | undefined | undefined behaviour |
| default | robust | undefined | error |
Where the table indicates recursive behaviour, the mutex shall maintain the concept of a lock count. When a thread successfully acquires a mutex for the first time, the lock count shall be set to one. Every time a thread relocks this mutex, the lock count shall be incremented by one. Each time the thread unlocks the mutex, the lock count shall be decremented by one. When the lock count reaches zero, the mutex shall become available for other threads to acquire.
pthread_mutex_lock()
from <pthread.h>
(IEEE Std 1003.1, 2013 Edition).Definition at line 955 of file os-mutex.cpp.
|
inlineinherited |
Get object name.
All objects return a non-null string; anonymous objects return "-"
.
Definition at line 759 of file os-decls.h.
|
inlinestaticinherited |
Deallocate the dynamically allocated object instance. using the RTOS system allocator.
| ptr | Pointer to object. |
| bytes | Number of bytes to deallocate. |
The deallocation function (<IP_ADDRESS>) called by a delete-expression to render the value of ptr invalid.
ptr shall be a null pointer or its value shall be a value returned by an earlier call to the (possibly replaced) operator new() which has not been invalidated by an intervening call to operator delete(void*).
If ptr is null, does nothing. Otherwise, reclaims the storage allocated by the earlier call to operator new.
The storage is deallocated using the RTOS system allocator.
Definition at line 122 of file os-inlines.h.
|
inlinestaticinherited |
Deallocate the dynamically allocated array of object. instances using the RTOS system allocator.
| ptr | Pointer to array of objects. |
| bytes | Number of bytes to deallocate. |
The deallocation function (<IP_ADDRESS>) called by the array form of a delete-expression to render the value of ptr invalid.
If ptr is null, does nothing. Otherwise, reclaims the storage allocated by the earlier call to operator new.
The storage is deallocated using the RTOS system allocator.
Definition at line 143 of file os-inlines.h.
|
inlinestaticinherited |
Allocate space for a new object instance using the RTOS system allocator.
| bytes | Number of bytes to allocate. |
The allocation function (<IP_ADDRESS>) called by a new-expression (5.3.4) to allocate a storage of size bytes suitably aligned to represent any object of that size. Return a non-null pointer to suitably aligned storage (3.7.4).
The storage is allocated using the RTOS system allocator.
Definition at line 44 of file os-inlines.h.
|
inlinestaticinherited |
Emplace a new object instance.
| bytes | Number of bytes to emplace. |
| ptr | Pointer to location to emplace the object. |
The allocation function (<IP_ADDRESS>) called by a placement new-expression to allocate a storage of size bytes suitably aligned to represent any object of that size. Return a non-null pointer to suitably aligned storage (3.7.4).
The storage is allocated using the RTOS system allocator.
Definition at line 81 of file os-inlines.h.
|
inlinestaticinherited |
Allocate space for an array of new object instances using the RTOS system allocator.
| bytes | Number of bytes to allocate. |
The allocation function (<IP_ADDRESS>) called by the array form of a new-expression (5.3.4) to allocate a storage of size bytes suitably aligned to represent any array object of that size or smaller.
The storage is allocated using the RTOS system allocator.
Definition at line 62 of file os-inlines.h.
|
inlinestaticinherited |
Emplace an array of new object instances.
| bytes | Number of bytes to emplace. |
| ptr | Pointer to location to emplace the object. |
The allocation function (<IP_ADDRESS>) called by the array form of a placement new-expression to allocate a storage of size bytes suitably aligned to represent any array object of that size or smaller.
The storage is allocated using the RTOS system allocator.
Definition at line 98 of file os-inlines.h.
|
inline |
Compare mutexes.
| true | The given mutex is the same as this mutex. |
| false | The mutexes are different. |
Identical mutexes should have the same memory address.
Definition at line 828 of file os-mutex.h.
|
inline |
Get the thread that owns the mutex.
nullptr
if not owned.Definition at line 837 of file os-mutex.h.
| result_t os::rtos::mutex::prio_ceiling | ( | thread::priority_t | prio_ceiling, |
| thread::priority_t * | old_prio_ceiling = nullptr |
||
| ) |
Change the priority ceiling of a mutex.
| [in] | prio_ceiling | new priority. |
| [out] | old_prio_ceiling | pointer to location where to store the previous priority; may be nullptr . |
| result::ok | The priority was changed. |
| EPERM | Cannot be invoked from an Interrupt Service Routines. |
| ENOTRECOVERABLE | The state protected by the mutex is not recoverable.. |
| EAGAIN | The mutex could not be acquired because the maximum number of recursive locks for mutex has been exceeded. |
| EINVAL | The mutex was created with the protocol attribute having the value mutex::protocol::protect and the calling thread's priority is higher than the mutex's current priority ceiling. |
| EOWNERDEAD | The mutex is a robust mutex and the process containing the previous owning thread terminated while holding the mutex lock. The mutex lock shall be acquired by the calling thread and it is up to the new owner to make the state consistent. |
| EDEADLK | The mutex type is mutex::type::errorcheck and the current thread already owns the mutex. |
Attempt to lock the mutex as if by a call to lock()
, except that the process of locking the mutex need not adhere to the priority protect protocol. On acquiring the mutex it shall change the mutex's priority ceiling and then release the mutex as if by a call to unlock()
. When the change is successful, the previous value of the priority ceiling shall be returned in old_prio_ceiling
.
If prio_ceiling()
function fails, the mutex priority ceiling shall not be changed.
pthread_mutex_setprioceiling()
from <pthread.h>
(IEEE Std 1003.1, 2013 Edition).Definition at line 1400 of file os-mutex.cpp.
| thread::priority_t os::rtos::mutex::prio_ceiling | ( | void | ) | const |
Get the priority ceiling of a mutex.
Return the current priority ceiling of the mutex.
pthread_mutex_getprioceiling()
from <pthread.h>
(IEEE Std 1003.1, 2013 Edition).Definition at line 1359 of file os-mutex.cpp.
|
inline |
Get the mutex protocol.
Definition at line 855 of file os-mutex.h.
| result_t os::rtos::mutex::reset | ( | void | ) |
Reset the mutex.
| result::ok | The mutex was reset. |
Return the mutex to the state right after creation. If there were threads waiting for this mutex, wakeup all, then clear the waiting list.
Definition at line 1503 of file os-mutex.cpp.
|
inline |
Get the mutex robustness.
Definition at line 864 of file os-mutex.h.
| result_t os::rtos::mutex::timed_lock | ( | clock::duration_t | timeout | ) |
Timed attempt to lock/acquire the mutex.
| [in] | timeout | Timeout to wait, in clock units (ticks or seconds). |
| result::ok | The mutex was locked. |
| EPERM | Cannot be invoked from an Interrupt Service Routines. |
| ETIMEDOUT | The mutex could not be locked before the specified timeout expired. |
| ENOTRECOVERABLE | The state protected by the mutex is not recoverable. |
| EAGAIN | The mutex could not be acquired because the maximum number of recursive locks for mutex has been exceeded. |
| EDEADLK | The mutex type is mutex::type::errorcheck and the current thread already owns the mutex. |
| EINVAL | The process or thread would have blocked, and the timeout parameter is invalid. |
| EOWNERDEAD | The mutex is a robust mutex and the process containing the previous owning thread terminated while holding the mutex lock. The mutex lock shall be acquired by the calling thread and it is up to the new owner to make the state consistent. |
If the mutex is already locked, the calling thread shall block until the mutex becomes available as in the lock()
function. If the mutex cannot be locked without waiting for another thread to unlock the mutex, this wait shall be terminated when the specified timeout expires.
The timeout shall expire after the number of time units (that is when the value of that clock equals or exceeds (now()+duration). The resolution of the timeout shall be the resolution of the clock on which it is based.
Under no circumstance shall the function fail with a timeout if the mutex can be locked immediately. The validity of the timeout need not be checked if the mutex can be locked immediately.
The clock used for timeouts can be specified via the clock
attribute. By default, the clock derived from the scheduler timer is used, and the durations are expressed in ticks.
As a consequence of the priority inheritance rules (for mutexes initialized with mutex::protocol::inherit
), if a timed mutex wait is terminated because its timeout expires, the priority of the owner of the mutex shall be adjusted as necessary to reflect the fact that this thread is no longer among the threads waiting for the mutex.
pthread_mutex_timedlock()
from <pthread.h>
(IEEE Std 1003.1, 2013 Edition). Definition at line 1152 of file os-mutex.cpp.
| result_t os::rtos::mutex::try_lock | ( | void | ) |
Try to lock/acquire the mutex.
| result::ok | The mutex was locked. |
| EPERM | Cannot be invoked from an Interrupt Service Routines. |
| ENOTRECOVERABLE | The state protected by the mutex is not recoverable.. |
| EAGAIN | The mutex could not be acquired because the maximum number of recursive locks for mutex has been exceeded. |
| EINVAL | The mutex was created with the protocol attribute having the value mutex::protocol::protect and the calling thread's priority is higher than the mutex's current priority ceiling. |
| EOWNERDEAD | The mutex is a robust mutex and the process containing the previous owning thread terminated while holding the mutex lock. The mutex lock shall be acquired by the calling thread and it is up to the new owner to make the state consistent. |
| EDEADLK | The mutex type is mutex::type::errorcheck and the current thread already owns the mutex. |
| EWOULDBLOCK | The mutex could not be acquired because it was already locked. |
Try to lock the mutex as lock()
, except that if the mutex is currently locked (by any thread, including the current thread), the call shall return immediately. If the mutex type is mutex::type::recursive
and the mutex is currently owned by the calling thread, the mutex lock count shall be incremented by one and the try_lock()
function shall immediately return success.
If the mutex is robust and the owning thread terminated while holding the mutex lock, a call to try_lock()
may return the error value EOWNERDEAD
. In these cases, the mutex is locked by the thread but the state it protects is marked as inconsistent. The application should ensure that the state is made consistent for reuse and when that is complete call consistent()
. If the application is unable to recover the state, it should unlock the mutex without a prior call to consistent()
, after which the mutex is marked permanently unusable.
pthread_mutex_trylock()
from <pthread.h>
(IEEE Std 1003.1, 2013 Edition). Definition at line 1076 of file os-mutex.cpp.
|
inline |
Get the mutex type.
Definition at line 846 of file os-mutex.h.
| result_t os::rtos::mutex::unlock | ( | void | ) |
Unlock/release the mutex.
| result::ok | The mutex was unlocked. |
| EPERM | Cannot be invoked from an Interrupt Service Routine; the mutex type is mutex::type::errorcheck or mutex::type::recursive , or the mutex is a robust mutex, and the current thread does not own the mutex. |
| ENOTRECOVERABLE | The recursive mutex whose oner died was not marked consistent() before unlock() . |
The manner in which a mutex is released is dependent upon the mutex's type attribute. If there are threads blocked on the mutex object referenced by mutex when unlock()
is called, resulting in the mutex becoming available, the scheduling policy shall determine which thread shall acquire the mutex.
In the case of mutex::type::recursive
mutexes, the mutex shall become available when the count reaches zero and the calling thread no longer has any locks on this mutex.
pthread_mutex_unlock()
from <pthread.h>
(IEEE Std 1003.1, 2013 Edition).Definition at line 1324 of file os-mutex.cpp.
|
friend |
Get the current running thread.
Definition at line 600 of file os-mutex.h.


Home
About
History
Team
Offices
Services
Web Design
Internet Marketing
Hosting
Domain Names
Broadband
Contact Us
United Kingdom
France
USA
Australia


Boids
Water interactive
Flame Animation
Noise Animation
One Point
RandomShape
Heads
Eyes
DP Knapsack
Terrain inz
To greyscale
Material Ref
Bezier
Shading black and white
Coloring
Hex
Yet Another Hex
Image Preview
Poses
Hands
Lips
Light - Faces
Album Covers
Clothe - Folds


Polar Bear Population Distribution
Switch to different view
Increasing
Declining
Stable
Insufficient


The overview of Mars
Mars is the fourth planet from the Sun and the second-smallest planet in the Solar System after Mercury. In English, Mars carries a name of the Roman god of war, and is often referred to as the "Red Planet" because the iron oxide prevalent on its surface gives it a reddish appearance that is distinctive among the astronomical bodies visible to the naked eye. Mars is a terrestrial planet with a thin atmosphere, having surface features reminiscent both of the impact craters of the Moon and the valleys, deserts, and polar ice caps of Earth.
The days and seasons are likewise comparable to those of Earth, because the rotational period as well as the tilt of the rotational axis relative to the ecliptic plane are very similar. Mars is the site of Olympus Mons, the largest volcano and second-highest known mountain in the Solar System, and of Valles Marineris, one of the largest canyons in the Solar System. The smooth Borealis basin in the northern hemisphere covers 40% of the planet and may be a giant impact feature. Mars has two moons, Phobos and Deimos, which are small and irregularly shaped. These may be captured asteroids, similar to 5261 Eureka, a Mars trojan.
There are ongoing investigations assessing the past habitability potential of Mars, as well as the possibility of extant life. Future astrobiology missions are planned, including the Mars 2020 and ExoMars rovers. Liquid water cannot exist on the surface of Mars due to low atmospheric pressure, which is less than 1% of the Earth's, except at the lowest elevations for short periods. The two polar ice caps appear to be made largely of water. The volume of water ice in the south polar ice cap, if melted, would be sufficient to cover the entire planetary surface to a depth of 11 meters (36 ft). In November 2016, NASA reported finding a large amount of underground ice in the Utopia Planitia region of Mars. The volume of water detected has been estimated to be equivalent to the volume of water in Lake Superior.
Mars can easily be seen from Earth with the naked eye, as can its reddish coloring. Its apparent magnitude reaches −2.94,which is surpassed only by Jupiter, Venus, the Moon, and the Sun. Optical ground-based telescopes are typically limited to resolving features about 300 kilometers (190 mi) across when Earth and Mars are closest because of Earth's atmosphere.


About the Scaife Viewer
The Scaife Viewer is a reading environment for pre-modern text collections in both their original languages and in translation. It is the first phase of work towards the next version of the Perseus Digital Library, Perseus 5.0.
Recent Changes
...


If you have come looking for a way to set up your local development environment and use Tide to audit your plugins and themes, that is not a good use case for the platform. A better option would be to install a few Composer packages and run the same code sniffers Tide does. The easiest way would be to add these two files to the root directory inside your plugin or theme.
Create a composer.json
file in the project root, and add this code.
{
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "*",
"phpcompatibility/phpcompatibility-wp": "*",
"wp-coding-standards/wpcs": "*"
},
"scripts": {
"phpcs": [
"./vendor/bin/phpcs ${1:.} --standard=.phpcs.ruleset.xml"
],
"phpcbf": [
"./vendor/bin/phpcbf ${1:.} --standard=.phpcs.ruleset.xml"
]
}
}
Install the Composer dependencies:
composer install
Create a .phpcs.ruleset.xml
file in the project root, add this code, and replace the {{NAME}}
and {{SLUG}}
with your plugin or theme's name and slug.
<?xml version="1.0"?>
<ruleset name="{{NAME}}">
<description>Custom ruleset for the {{NAME}} plugin.</description>
<!-- For help in understanding this file: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- For help in using PHPCS: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage -->
<!-- What to scan -->
<file>.</file>
<!-- Ignoring Files and Folders:
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-files-and-folders -->
<exclude-pattern>/vendor/*</exclude-pattern>
<!-- How to scan -->
<arg value="sp"/> <!-- Show sniff and progress -->
<arg name="colors"/> <!-- Show results with colors -->
<arg name="basepath" value="."/> <!-- Strip the file paths down to the relevant bit -->
<arg name="parallel" value="8"/> <!-- Enables parallel processing when available for faster results. -->
<arg name="extensions" value="php"/> <!-- Limit to PHP files -->
<!-- Rules: Check PHP version compatibility - see
https://github.com/PHPCompatibility/PHPCompatibilityWP -->
<rule ref="PHPCompatibilityWP"/>
<!-- For help in understanding this testVersion:
https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions -->
<config name="testVersion" value="5.2-"/>
<!-- Rules: WordPress Coding Standards - see
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
<rule ref="WordPress-Core"/>
<rule ref="WordPress-Docs"/>
<rule ref="WordPress-Extra"/>
<!-- For help in understanding these custom sniff properties:
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
<config name="minimum_supported_wp_version" value="4.4"/>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="{{SLUG}}"/>
<element value="default"/>
</property>
</properties>
</rule>
</ruleset>
Run the PHP Code Sniffer on every file:
composer phpcs
Run the PHP Code Sniffer on a single file:
composer phpcs filename.php
Run PHP Code Beautifier on every file:
composer phpcbf
Run PHP Code Beautifier on a single file:
composer phpcbf filename.php
If you get an error when running these commands see the Help page.


#include <assignment.h>
Definition at line 57 of file assignment.h.
◆ Status
| Enumerator |
|---|
| OPTIMAL | |
| INFEASIBLE | |
| POSSIBLE_OVERFLOW | |
Definition at line 88 of file assignment.h.
◆ SimpleLinearSumAssignment()
| operations_research::SimpleLinearSumAssignment::SimpleLinearSumAssignment |
( |
| ) |
|
◆ AddArcWithCost()
◆ NumNodes()
| NodeIndex operations_research::SimpleLinearSumAssignment::NumNodes |
( |
| ) |
const |
◆ NumArcs()
| ArcIndex operations_research::SimpleLinearSumAssignment::NumArcs |
( |
| ) |
const |
◆ LeftNode()
| NodeIndex operations_research::SimpleLinearSumAssignment::LeftNode |
( |
ArcIndex |
arc | ) |
const |
◆ RightNode()
| NodeIndex operations_research::SimpleLinearSumAssignment::RightNode |
( |
ArcIndex |
arc | ) |
const |
◆ Cost()
◆ Solve()
| Status operations_research::SimpleLinearSumAssignment::Solve |
( |
| ) |
|
◆ OptimalCost()
| CostValue operations_research::SimpleLinearSumAssignment::OptimalCost |
( |
| ) |
const |
|
inline |
◆ RightMate()
| NodeIndex operations_research::SimpleLinearSumAssignment::RightMate |
( |
NodeIndex |
left_node | ) |
const |
|
inline |
◆ AssignmentCost()
| CostValue operations_research::SimpleLinearSumAssignment::AssignmentCost |
( |
NodeIndex |
left_node | ) |
const |
|
inline |
The documentation for this class was generated from the following file:


--- layout: archive title: Zulip Chat Archive permalink: /stream/113489-new-members/topic/Set.20theory.html ---
Where can I search for lemmas that Lean already knows about set theory?
To be more precise, I need to know the following fact about set.sUnion :
that the union of a family of sets contains every set of the family. I was expecting to have something like set.sUnion.intro, working similarly to or.intro, but I do not know where to search for this.
(I guess I should not call this a Lemma, it should holds by definition of set.sUnion).
There are lots of ways.
1) Ask here. (Encouraged, for beginners. Don't feel bad about it.)
2) Use search in VScode. And Ctrl
-Shift
-P
, start typing with #your_guess_of_the_name
3) Use ordinary system tools, like git grep
.
4) Type your statement into Lean, and ask library_search
or suggest
to see if they can prove it. (These are two tactics.)
@Frédéric Le Roux For your specific lemma, I guess set.subset_sU
and autocomplete shows me the rest.
import data.set open set example (α : Type) (s : set (set α)) : ∀ t : set α, t ∈ s → t ⊆ sUnion s := begin library_search, end
Great, thanks!
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Feds release data on wages, debt for specific college majors
by COLLIN BINKLEYThe U.S. Education Department has released information for the first time that allows students to compare earnings and debt averages from specific college programs, rather than at the school as a whole.
The department’s updated College Scorecard website was launched Wednesday to help students evaluate their college choices. The site lets students search individual majors at a school and see how much graduates typically earned and owed a year after graduation.
Education Secretary Betsy DeVos says it provides “real information students need to make informed, personalized decisions about their education.”
The Obama administration published similar data from for-profit colleges and pledged to cut funding to ineffective programs. DeVos sidelined that approach. She promised instead to give students information from all types of schools so they could make decisions for themselves.
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


Git Repository
My first impressions of git was that it was very intimidating.I have had experience with command lines before, Both in school(UNIX AND LINUX) and on my own from using various distros. git homepage Once i figured out how to add repositories, It became easier to understand. Command line: pulling a repo The main issue with git is adding the remote origin. Because i had two accounts that are linked differently. Rembrandt van Rijn Commiting is fairly easy to do, You can upload it straight to the github repo without it exceeding over 100 files. Expressionism in modern art. Van Gogh’s art became astoundingly popular after his death, especially in the late 20th century, when his work sold for record-breaking sums at auctions around the world and was featured in blockbuster touring exhibitions. In part because of his extensive published letters, van Gogh has also been mythologized in the popular imagination as the quintessential tortured artist.


Authentication
- Quick and easy user sign up
- Confirm accounts via email
- Reset password via email or via Admin dashboard
- Social logins
- JWT refresh tokens
- JWT 'session' tokens - will not refresh after x hours
- Persistent JWT tokens for use with mobile apps - sign in once only
- JWT tokens are revoked on the server on sign out
- ACL - assign roles with different levels - admin, members, everyone, anonymous
- Reset password to revoke ALL tokens
- Use JWT with Socket.io
Security
- JSON Web Token - no cookies
- Strict JSON schema validation
- Intrusion Detection System - detect & prevent malicious activity
- Rate limit endpoints
- Too busy - keep serving when your app gets massively popular
Audit Logs
- Searchable logs with nvD3 charts
- Log particular routes/actions - 200 codes
- Log security - 400 codes
- Log server errors - 500 codes
- Log client errors - JSNlog
- Geographic, CPU, lag, memory data
- Common Log Format support
Structure
- Detailed route viewer
- Route tester - Minigun with jsonschema faker
- Global config and library
- Global error handler
- Consistent code


For this project, we produce seamlessly stitched mosaics by shooting overlapped photographs with an identical center of projection, computing projective transformations between those photographs, warping them toward whichever is selected as a base image, and finally blending all of the processed photographs into one big panorama. To begin, we shoot pictures that are related by a projective transformation (by taking pictures from the same point of view but with different view directions). We are also careful to ensure that consecutive photographs have some common content, because in order to recover the transform between two images we have to select corresponding points in the images' overlapping scenes.
In selecting corresponding points, we have two options: manually click on high-profile feature points within the overlap across each of the two images, or let the computer find all the features itself. The first option is a ginput call – we have to do all the thinking, so it's easy for the computer and hard for us. On the other hand, the second option is hard for the computer and easy for us. We obviously invented computers so we could enslave them and make them do all the difficult things in life, so everyone's preference here should be a no-brainer. Unfortunately, we still have to give it some orders. How should our feature points be selected? In this case, we'll use the Harris interest point detector to identify decent features (i.e. Harris points) in an image. A Harris point is a fancy name for a corner, a location in the image with a large spatial gradient in all directions, found via Harris's algorithm. Several reduced-size sets of Harris points can be seen below.
ginput
5000 / 235746 Harris points (randomly selected)
1000 / 238458 Harris points
1000 / 159983 Harris points
corner_peaks
peak_local_max
From this moment onward, we mostly use corner_peaks to compute Harris points.
corner_peaks output (17767 points)
500 ANMS-filtered
500 highest strength
500 lowest from all ~200k
corner_peaks output (3944 points)
After we obtain our feature points, we have to match them. Our plan of attack: extract feature descriptors for each point and then match those instead. Said descriptors characterize the immediate region around every feature point. Accordingly, every such descriptor will be represented for us as a normalized local patch of size 8 x 8 – downsampled, that is, from 40 x 40. We make our descriptors invariant under rotation in order to increase robustness. To reiterate, these are the steps we take to generate our feature descriptors:
for every ANMS point: grab the ~60 x ~60 grayscale window around the point compute the avg gradient at the point in the x- and y- directions rotate the window by the negative atan of y-gradient / x-gradient extract the central 40 x 40 window from the rotated patch blur it with a Gaussian filter downsize the patch so that it's 8 x 8 bias/gain-normalize the patch using I' = (I - μ) / σ
ANMS points (500 in total)
Descriptors upscaled to 80 x 80
If the ratio exceeds 0.66, a match is more likely to be incorrect than correct
This was the only thing in the project that worked on the first try. I was hyped.
im1 (30 matches)
im2 (30 matches)
It looks good, but we're not necessarily out of the tunnel yet. We need to be dead sure that there are no homography-ruining outliers in our set of feature matches. (By "dead sure," I actually mean "almost" dead sure because nothing in life is certain.) So we use RANSAC. RANSAC, or RANdom SAmple Consensus, is a technique for estimating the homography matrix (math for that below) while avoiding feature-space outliers. How does it do this? The steps are as follows (all of these actions are performed within a loop that runs for 5000 iterations):
In order to identify the transformation between any two of our images, we need to compute the homography matrix \(H\). We can relate a pair of corresponding points through the equation \(\textbf{p}' = H\textbf{p}\), where \(\textbf{p}\) is an \(\begin{bmatrix}x & y & 1\end{bmatrix}^T\) vector representing a point in the first image and \(\textbf{p}'\) is a \(\begin{bmatrix}wx' & wy' & w\end{bmatrix}^T\) representing a scaled point in the second image. \(H\), incidentally, is what we're solving for and exists as a 3 x 3 matrix with eight degrees of freedom.
Let's go into a little more detail on that front. We're warping an image, which means we're taking the colors that were already in the image and moving them to different places. However, in our case we actually want to make use of an inverse warp. An inverse warp asks, for every pixel location in the output shape, "which color from the input image should go here?" The answer to that is usually a combination of input colors, so we bilinearly interpolate across these in order to make sure we don't miss anything. Mathematically, of course, it's our homography that tells us the locations of the input colors to use. To derive the inverse warp, we begin again from our initial equation (but en masse): \(P' = HP\). This time, \(P\) is a 3 x \(n\) matrix containing all of the points from the input image (the one we're warping; the one whose colors we're moving around) in homogeneous coordinates. Likewise, \(P'\) is a 3 x \(n\) matrix containing scaled points from the image whose coordinate system we're warping to. \(H\), as before, is the homography matrix that converts \(P\)'s spatial domain into \(P'\)'s spatial domain.
Enough math. Let's take what we've done so far and produce something visual! As a test of projective warp correctness, we attempt to rectify a couple of images. Specifically, we'll try to set up our warps so that certain planar surfaces are frontal-parallel in the output image. In the examples below, we select four input points over the corners of some planar surface, and then use the rectified version of those points as the corresponding \(P'\) coordinates.
Sunset view from my apartment (11/11/16)
Rectified using sq. window as a basis
Assortment of rectangular objects
Rectified over Family Life
Here, we warp and blend a sequence of overlapping images together – creating, in expectation, a nicely stitched panorama. Given a set of photographs that don't span more than 180 degrees (faraway scenes work well, since we can then project everything onto a plane at infinity), we start by selecting a centrally positioned photograph to serve as the base panorama image. We then project and blend all other images one-by-one into this photograph's coordinate system, amassing a holistic panorama as we go. That's pretty much it! Since individual images are projected directly onto their correct coordinates in the overall panorama, we don't need to align anything after a warp. All we need to do is blend, which we handle through weighted averaging at every pixel. To facilitate this weighting, we maintain alpha values for each image's pixels that represent how far every pixel is from the unwarped image's center column, i.e. how important the pixel is to its source. We assign the alpha value for the center column to 1, and let this value fall off linearly as it approaches the sides (such that it is 0 at the edges). Then, after warping, we compute the output pixels specific to the individual image, the output pixels specific to the growing panorama image, and the output pixels at which there is overlap. For the non-overlap pixels, we use the unmodified RGB values from their source images. For the overlap pixels, we normalize the alpha values so that they sum to 1 and then linearly interpolate between the color values of each image (using the normalized alphas as weights). Finally, we set the entire alpha channel to 1 in the output panorama at each stage in order to get rid of any residual fading effects. Below we have some results. The photographs are from me biking up to Indian Rock and taking a bunch of pictures of the distance; they yielded some decent mosaics in my opinion (especially after cropping!). [Part B edit: The automatically stitched images have now been included above each of their manual counterparts.]
Cropped view from a rock, pt. 1 (auto)
View from a rock, pt. 1 (auto)
Cropped view from a rock, pt. 1 (manual)
View from a rock, pt. 1 (manual)
Left image
Center image
Right image
Cropped view from a rock, pt. 2 (auto)
View from a rock, pt. 2 (auto)
Cropped view from a rock, pt. 2 (manual)
View from a rock, pt. 2 (manual)
"The Circle", cropped (auto)
It's up north somewhere (auto)
"The Circle", cropped (manual)
Manual feature selection
For non-planar (read: wide) fields of view, we'll want to utilize a cylindrical projection. Although this distorts the edges of the image, it's a worthwhile tradeoff when we're looking for a panorama with an exceedingly large horizontal dimension. As an added requirement, however, we need our input images to be horizontally aligned from the get-go; we're taking the homography out of the mix here. This time, we compute the inverse warping as follows:
Input image
Cylindrically warped output
1
2
3
4
5
6
7
Using our cylindrical warping technique, we can now put together a panorama spanning 360 degrees of view. We do this by using the same stitching algorithm as that of the previous section, while also making sure to merge the final image and the initial image at the end (so as to create a "true" 360 experience). The input images and final panorama can be seen below. Alignment wasn't perfect, but in examining the source images I've come to the conclusion that a perfect translational x-alignment doesn't exist anyway. To deal with the misalignment we'd probably have to do something more sophisticated (or take better pictures).
8
9
As discussed in one of the previous sections, our feature descriptors are also invariant under rotation. This is nice, because even if we fail at photography and rotate the camera around a non-yaw axis, our automatically detected features can still be standardized and matched. You probably don't believe me, so I've prepared as proof a couple of demonstrations –
Kavi im1 feature detection (no rotation)
Kavi im2 feature detection (no rotation)
Kavi im1 feature detection (rotation)
Kavi im2 feature detection (rotation)
Indian Rock image 1 features
Indian Rock image 2 features
Rotationally invariant panorama stitching
Here we implement an algorithm that, given an unordered list of images (some of which might match up), is able to automatically discover pairwise panoramas and stitch them together. It does this by extracting feature descriptors for every image and then exhaustively searching for every image's nearest neighbor via the SSD matching technique we've come to know and love. (The image with the most feature matches is our best guess for each image's neighbor.) Since not every image is guaranteed to have a panorama partner, we consider a subject to be isolated when, again emulating Lowe, the ratio between the match count with the 1-NN and the match count with the 2-NN is less than some threshold... say 4. If the 2-NN count is 0, we're willing to pair the image with its 1-NN as long as the 1-NN count is greater than 4. We also are forced to assume isolation if an image has less than four feature matches with its 1-NN (or RANSAC later leaves it with less than three inliers overall). Four is the absolute minimum number of feature pairings required, since that's how many correspondences we need in order to define a homography. To test our discovery algorithm, we feed it the following five images in the following scrambled order and let it do its thing. We expect an output of two panoramas... and to our excitement, the algorithm delivers.
Output panorama #1 (raw)
Output panorama #2 (raw)
First of all, I learned that planar mappings don't really work for > 180° mosaics, as I spent an embarrassing amount of time trying to warp and merge two images that spanned an excessive view space. However, I'm glad I got to experience the power of homographies / projective transformations. It was very exciting to be able to modify the perspective of my images in a specific way, and to be able to stitch multiple photographs into one! I never realized that it was possible to achieve these effects with just a 3 x 3 matrix and some blending. I leave you with a rectified image of my lunch. (Because I definitely ate all of these pizzas.) Thanks for reading! :)
Lunchtime carnage
Rectified carnage


@* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import uk.gov.hmrc.epaye.html._ @(enrolmentNameOpt: Option[String] = None)(implicit userProfile: uk.gov.hmrc.epaye.connectors.UserProfile, authContext: uk.gov.hmrc.play.frontend.auth.AuthContext, request: Request[_], lang : Lang, messages: Messages) @main_template(title = Messages("bt.not.enrolled.heading"), bodyClasses = Some("business-tax")) { @enrolmentNameOpt.map { enrolmentName =>
@Messages("bt.not.enrolled.detail.1", enrolmentName)
}@Messages("bt.not.enrolled.detail.2")
}


Mobile Platform
Dashboards List
Publish
Widgets
Widget Name
Add
Dashboard
×
Dashboard Name
Dashboard Icon
Background Color
Delete Dashboard
×
Are you sure want to delete
dashboard
?


the
gæan
mind
©reation
the
gaian mind
photosynthetic
sloths of
amazonia
Great Mother
of the
Gods
greco-roman
.
paleolithic
(soon)
forests
as
sanctuaries
Instructions
for the
Kali Yuga
Kids Lib
Now!
archaic
technologies
of
ecstasy


Getting Started with jBPM 4.0 (Part IV)
As said in part III, we will revise our example, to create the task form, and then use the jbpm console to take or complete the task.
Firstly, because there was a minor issue related to this feature, which was reported here in the jBPM jira, we will use the 'form' attribute in the jpdl file.
Add the task form template
Here, we will create a freemarker template file, named review.ftl. the files content is as following:

Please review the request

<form action="${form.action}" method="POST" enctype="multipart/form-data">
<#list outcome.values as transition>
<input type="submit" name="outcome" value="${transition}">
</#list>
</form>

Add the form attribute in task node
As we said earlier, due to the JBPM-2423 issue in jBPM 4.0 GA, we need to update our jpdl to associate our task form template. the updated section is as following.
<task assignee="alex" g="277,235,92,52" name="review" form="review.ftl">
<transition g="-73,-25" name="approved" to="audit"/>
</task>
Update the build.xml, to include the .ftl file in .bar archive
The last step would be to update our build.xml, to include the ftl template file, and also include the png file for the diagram show usage in our jbpm console. The updated bar package built script is:
<target name="bar" depends="init">
<jar destfile="${basedir}/target/helloworld.bar">
<fileset dir="${basedir}/src/main/resources">
<include name="*.jpdl.xml" />
<include name="*.ftl" />
<include name="*.png" />
</fileset>
</jar>
</target>
That is it, now you can re-deploy it into the jBPM server, like we said in the part3.
Task Form in jBPM console
well, after we started the process instance, let's see the diagram and the task form in its console UI.
On the process instance tab, click the 'diagram' button in the instance details page, you would see page as following picture.
Go to the task list -> Personal tasks, you would see there is a task, the name is called "review", select the task and click the 'view' button, it would pop up the task form interface as following picture:
Once you click the 'approved' button, the task is completed, and the whole process goes to the 'audit' state as we've defined in the jpdl file.
So, that is all for the task form example. If you want to know more about the template, like syntax, you can refer to the freemarker webiste.
One thing interesting is that there is a console-server, which is the jbpm console talk to, the console server is responsible for exposing the jBPM service as a RESTful services. You can go to "http://localhost:8080/gwt-console-server/rs/server/resources" to see all available resources. we won't go detail in this entry, this is an interesting topic that we will cover in the future blog entry.
Summary
Until now, this 《Getting Started with jBPM 4.0》series is finished, you can download the jbpm-helloworld example as a tar ball from here. Its aim is to help you get started, if you want to know more about jBPM 4.0, the userguide and dev guide are very good documents, and you also shouldn't miss the jbpm user forum.


OLYMPICS
DATA
Visualizations
Medals Timeline
Gender & Body Composition
Medals VS GDP
Medals World View - Seasons
Medals World View - Sport
Analysis
Olympic Facts
Olympic Medal Predictions
Take a Deep dive into Data!
Year
Season
Nation
Medals
Gold
Silver
Bronze


See: Description
| Interface | Description |
|---|---|
| CellBuilder |
Something that can be built into a table cell, OR just something rendered within a box model
(like HTML) where the table-free cell is the box.
|
| Renderable |
Implementing Renderable means being suitable for use with a two-pass layout manager whose first pass says, "given
this width, what is your height?" and second pass says, "Given these dimensions, draw yourself as best you can."
|
| Class | Description |
|---|---|
| BorderStyle |
Holds the LineStyles for the top, right, bottom, and left borders of a PdfItem.
|
| BorderStyle.Builder |
Factory helper-class for constructing immutable BorderStyle instances.
|
| Cell |
A styled table cell or layout block with a pre-set horizontal width.
|
| Cell.Builder |
A mutable Builder for somewhat less mutable cells.
|
| CellStyle |
The style of a cell including: horizontal alignment, padding, background color, and border style.
|
| CellStyle.Builder |
A mutable Builder for immutable CellStyles.
|
| LineStyle |
Represents the color and width of a line.
|
| LogicalPage |
Maybe better called a "DocumentSection" this represents a group of Renderables that logically belong on the same
page, but may spill over multiple subsequent pages as necessary in order to fit.
|
| Padding |
Represents minimum spacing of the top, right, bottom, and left sides of PDF Page Items.
|
| PdfItem |
Represents items to be later drawn to the page of a PDF file.
|
| PdfLayoutMgr |
The main class in this package; it handles page and line breaks.
|
| ScaledJpeg |
Represents a Jpeg image and the document units it should be scaled to.
|
| ScaledPng |
Represents a PNG image and the document units it should be scaled to.
|
| TableBuilder |
Use this to create Tables.
|
| TablePart |
A set of styles to be the default for a table header or footer, or whatever other kind of group of table rows you
dream up.
|
| TableRowBuilder |
Unsynchronized mutable class which is not thread-safe.
|
| Text |
Represents styled text kind of like a #Text node in HTML.
|
| TextStyle |
Specifies font, font-size, color, and padding.
|
| XyDim |
Represents a 2D dimension in terms of X and Y where both X and Y must be non-negative.
|
| XyOffset |
Represents a 2D coordinate in terms of X and Y where negative y is down from the upper left-hand
corner.
|
| Enum | Description |
|---|---|
| CellStyle.Align |
Horizontal and vertical alignment options for cell contents
|
| LogicalPage.Orientation |
The layoutmanager package extends org.apache.PdfBox with tools for line-breaking, page-breaking, tables, and styles. It provides an abstraction that lets lines and shaded backgrounds cross physical pages (vertically) to produce a larger logical page. This allows text, table cells, and images flow naturally from one page to the next.
Unlike the PDF spec and PDFBox, all measurements are specified in positive document units and all positioning is specified from the top-left corner of the item being positioned. Like PDFBox, positive y-values are toward the top of the page, so you have to *decrement* y every time you move down a line.
Items are given a Z-index internally to determine which overwrites which when there is overlap. If two items overlap and have the same Z-index, the last one specified overwrites the first (they are simply rendered in order).
Classes representing page objects are designed to minimize mutability and side-effects, but PdfLayoutMgr and the underlying PDFContentStream it acts upon are mutable, have side effects (they write output), and are NOT thread-safe.
Start by looking at the unit test and the sample PDF it builds. Then PdfLayoutMgr is the class to start with to use the API yourself.
Copyright © 2017. All rights reserved.


| | |
- get_mean(state, weights=None)
- Get the mean statistics of the states given weights.
If weights is not set, assumes equal weight samples.
We assume the first dimension is state and second is
the samples
Parameters
----------
state : np.ndarray
The ensemble of states
weights: np.ndarray or none
The weights associated with the ensemble
set to None implies equal weight
Raises
------
- get_std(state, weights=None)
- Get the std statistics of the states given weights.
If weights is not set, assumes equal weight samples
We assume the first dimension is state and second is
the samples. Also we use an unbiased standard deviation
Parameters
----------
state : np.ndarray
The ensemble of states
weights: np.ndarray or none
The weights associated with the ensemble
set to None implies equal weight
Raises
------
|


RB tree indexed node allocator.
More...
#include <dictionary.hpp>
|
| virtual size_t | used_memory () const |
| | Get number of bytes used by nodes allocated using this allocator including size of a used index (if any). More...
|
| |
| virtual size_t | real_nodes () const |
| | Get number of real nodes. More...
|
| |
| virtual node * | get (uint64_t id) |
| | Get node with a given ID or a collapsed node containing the given codeword. More...
|
| |
|
| node_allocator () |
| | Create a new node allocator.
|
| |
| virtual size_t | used_nodes () const |
| | Get number of used virtual nodes. More...
|
| |
| virtual uint64_t | next_id () const |
| | Get ID that will be assigned to the next newly allocated node. More...
|
| |
| virtual node * | alloc (uint8_t sym, node *parent) |
| | Allocate a new node for a given transition parent – sym –> node. More...
|
| |
| virtual node * | alloc (uint8_t *phrase, uint32_t len, node *parent) |
| | Allocate a new collapsed node for transitions according to a given phrase and parent. More...
|
| |
| virtual node * | split (node *n, uint32_t at) |
| | Split a given collapsed node at a given index. More...
|
| |
| virtual void | append (node *n, uint8_t sym) |
| | Append symbol into a given collapsed node. More...
|
| |
| virtual void | append (node *n, uint8_t *phrase, uint32_t len) |
| | Append phrase to a given collapsed node. More...
|
| |
| virtual node ** | alloc_children (uint8_t count) |
| | Allocate array for storing children node pointers. More...
|
| |
| virtual void | free_children (node **children, uint8_t count) |
| | Free a given array for storing children node pointers. More...
|
| |
RB tree indexed node allocator.
| node * indexed_node_allocator::get |
( |
uint64_t |
id | ) |
|
|
virtual |
Get node with a given ID or a collapsed node containing the given codeword.
- Parameters
-
| void indexed_node_allocator::insert |
( |
node * |
n | ) |
|
|
protectedvirtual |
| virtual size_t alzw::indexed_node_allocator::real_nodes |
( |
| ) |
const |
|
inlinevirtual |
| void indexed_node_allocator::remove |
( |
node * |
n | ) |
|
|
protectedvirtual |
| virtual size_t alzw::indexed_node_allocator::used_memory |
( |
| ) |
const |
|
inlinevirtual |
Get number of bytes used by nodes allocated using this allocator including size of a used index (if any).
- Returns
- used memory
Reimplemented from alzw::node_allocator.
The documentation for this class was generated from the following files:


Include dependency graph for objects.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Compounds | |
| struct | ProtaException |
| Structure used for all Prota exceptions. More... | |
Defines | |
| #define | PROTO_THROW(name, err) throw ProtaException((name), (err)) |
| Handy macro to throw a Proto exception. | |
Typedefs | |
| typedef _VALUE * | Value |
| Fake struct for Value typechecking. | |
Functions | |
| bool | V_ISINT (Value v) |
| Is the Value an integer? | |
| bool | V_ISPTR (Value v) |
| Is the Value a reference to a heap object? | |
| bool | V_ISCHAR (Value v) |
| Is the Value a character? | |
| bool | IsBinary (Value obj) |
| Is the Value a reference to a Binary object? | |
| bool | IsArray (Value obj) |
| Is the Value a reference to an Array? | |
| bool | IsFrame (Value obj) |
| Is the Value a reference to a Frame? | |
| bool | IsSymbol (Value obj) |
| Is the Value a reference to a Symbol? | |
| bool | IsString (Value obj) |
| Is the Value a reference to a String? | |
| Value | INT_V (int i) |
| Converts an int to a Value. Be aware there are only 30 significant bits in an integer Value! | |
| Value | CHAR_V (short uc) |
| Converts a Unicode character to a Value. | |
| Value | BOOL_V (bool b) |
| Converts a bool to a Value (false becomes V_NIL, true becomes V_TRUE). | |
| Value | REAL_V (double d) |
| Converts a double to a Value. | |
| int | UNSAFE_V_INT (Value v) |
| Converts a Value to an integer with no type check. | |
| int | V_INT (Value v) |
| Converts a Value to an int. Throws if Value is not an integer. | |
| int | V_CHAR (Value v) |
| Converts a Value to a Unicode character. Throws if Value is not a character. | |
| bool | V_BOOL (Value v) |
| Converts a Value to a bool. Result is false if Value is V_NIL, otherwise true. | |
| double | V_REAL (Value v) |
| Converts a Value to a double. Throws is Value is not a number. | |
| bool | Subexception (const char *name1, const char *name2) |
| Is name1 a subexception of name2? | |
| void | InitProtoLib (void) |
| Call once at the beginning of time to initialize the object system. | |
| bool | V_EQ (Value a, Value b) |
| Are Values a and b equal? Tests values of immediates, reals and symbols, otherwise tests reference (pointer) equality. | |
| Value | NewBinary (Value cls, int size) |
| Allocates a new Binary object. | |
| Value | NewBinary (Value cls, void *pData, int size) |
| Allocates a new Binary object with the given data. | |
| Value | NewArray (Value cls, int nSlots) |
| Allocates a new Array object. | |
| Value | NewArray (int nSlots) |
Allocates a new Array object of class Array. | |
| Value | NewFrame (void) |
| Allocates a new Frame object. | |
| Value | NewMapWithTags (Value tagArray) |
| Allocates a new Frame map with the given tags. | |
| Value | NewFrameWithMap (Value map) |
| Allocates a new Frame with the given map. | |
| Value | GetSlot (Value array, int index) |
| Gets an array slot's value. | |
| void | SetSlot (Value array, int index, Value newValue) |
| Sets an array slot's value. | |
| Value | GetSlot (Value frame, Value tag) |
| Gets a frame slot's value. | |
| void | SetSlot (Value frame, Value tag, Value newValue) |
| Sets a frame slot's value. | |
| void | RemoveSlot (Value frame, Value tag) |
| Removes a frame slot. | |
| bool | HasSlot (Value frame, Value tag) |
| Tests existence of a frame slot. | |
| Value | GetPath (Value obj, Value path) |
| Gets a slot value determined by a path expression. | |
| void | SetPath (Value obj, Value path, Value newValue) |
| Sets the value of a slot determined by a path expression. | |
| bool | HasPath (Value obj, Value path) |
| Tests existence of a slot determined by a path expression. | |
| void * | GetData (Value binary) |
| Gets a pointer to the beginning of a binary object's data. | |
| Value | GetClassSlot (Value obj) |
| Gets the value of an object's class slot. | |
| void | SetClassSlot (Value obj, Value cls) |
| Sets the value of an object's class slot. | |
| void | AddArraySlot (Value array, Value newValue) |
| Extends an array by one slot. | |
| Value * | GetArraySlots (Value array) |
| Gets a pointer to an array's slots. | |
| int | GetArrayLength (Value array) |
| Gets the numbers of slots in an array. | |
| void | SetArrayLength (Value array, int nSlots) |
| Sets the number of slots in an array. | |
| int | GetBinaryLength (Value binary) |
| Gets the number of bytes in a Binary object. | |
| void | SetBinaryLength (Value binary, int size) |
| Sets the number of bytes in a Binary object. | |
| int | GetObjLength (Value obj) |
| Returns the length of any object, in bytes for binary objects, in slots for frames and arrays. | |
| Value | Clone (Value obj) |
| Clones an object (shallowly). | |
| Value | DeepClone (Value obj) |
| Clones an object (deeply). | |
| void | ReplaceObject (Value oldObj, Value newObj) |
| Causes all references to oldObj to refer to newObj instead. | |
| Value | Intern (const char *name) |
| Find the Symbol with the given name. | |
| Value | MakeSymbol (const char *name) |
Same as Intern -- some people like this name better. | |
| const char * | SymbolName (Value sym) |
| Gets the name of a symbol. | |
| Value | NewString (int size) |
| Makes a new String object. | |
| Value | NewString (const TCHAR *str) |
| Makes a new String object. | |
| TCHAR * | GetCString (Value str) |
| Gets the null-terminated C string from a String object. | |
| void | StrAppend (Value str1, Value str2) |
| Appends to a String object (destructive). | |
| Value | ReadStreamFile (const char *filename) |
| Reads a stream file and return the top-level object. | |
| void | PrintValue (Value v) |
| Prints a Value. | |
| void | SetMaxPrintDepth (int maxDepth) |
| Sets the max depth of printer object traversal. | |
| void | PrintValueLn (Value v) |
| Prints a Value followed by a newline. | |
Variables | |
| const Value | V_NIL = ((Value) ((( 0 ) << 4) | ( IMMED_SPECIAL ) | TAG_IMMED)) |
| NIL, nada, nothing. | |
| const Value | V_TRUE = ((Value) ((( 1 ) << 4) | ( IMMED_BOOLEAN ) | TAG_IMMED)) |
| TRUE. | |
| const char *const | g_exFr = "evt.ex.fr" |
| Base exception name. | |
| const char *const | g_exIntrp = "evt.ex.fr.intrp" |
| Interpreter errors. | |
| const char *const | g_exType = "evt.ex.fr.type" |
| Type mismatch errors. | |
| const char *const | g_exCompiler = "evt.ex.fr.compiler" |
| Compiler errors. |
|
|
Fake struct for Value typechecking.
This is just fakery so the compiler will do |
|
|
Is the Value a reference to a Binary object?
|
|
|
Is the Value a reference to an Array?
|
|
|
Is the Value a reference to a Frame?
|
|
|
Is the Value a reference to a Symbol?
|
|
|
Is the Value a reference to a String?
|
|
|
Converts a double to a Value.
|
|
|
Converts a Value to a double. Throws is Value is not a number.
|
|
|
Is name1 a subexception of name2?
|
|
|
Call once at the beginning of time to initialize the object system.
|
|
|
Are Values a and b equal? Tests values of immediates, reals and symbols, otherwise tests reference (pointer) equality.
|
|
|
Allocates a new Binary object.
|
|
|
Allocates a new Binary object with the given data.
|
|
|
Allocates a new Array object.
The slots will be initialized to
|
|
|
Allocates a new Array object of class
The class slot will be initialized to
|
|
|
Allocates a new Frame object.
|
|
|
Allocates a new Frame map with the given tags.
|
|
|
Allocates a new Frame with the given map.
|
|
|
Gets an array slot's value.
|
|
|
Sets an array slot's value.
|
|
|
Gets a frame slot's value.
|
|
|
Sets a frame slot's value.
|
|
|
Removes a frame slot.
|
|
|
Tests existence of a frame slot.
|
|
|
Gets a slot value determined by a path expression.
|
|
|
Sets the value of a slot determined by a path expression.
|
|
|
Tests existence of a slot determined by a path expression.
|
|
|
Gets a pointer to the beginning of a binary object's data.
|
|
|
Gets the value of an object's class slot.
|
|
|
Sets the value of an object's class slot.
|
|
|
Extends an array by one slot.
|
|
|
Gets a pointer to an array's slots.
|
|
|
Gets the numbers of slots in an array.
|
|
|
Sets the number of slots in an array.
|
|
|
Gets the number of bytes in a Binary object.
|
|
|
Sets the number of bytes in a Binary object.
|
|
|
Returns the length of any object, in bytes for binary objects, in slots for frames and arrays.
|
|
|
Clones an object (shallowly).
|
|
|
Clones an object (deeply).
|
|
|
Causes all references to oldObj to refer to newObj instead.
|
|
|
Find the Symbol with the given name.
|
|
|
Gets the name of a symbol.
|
|
|
Makes a new String object.
|
|
|
Makes a new String object.
|
|
|
Gets the null-terminated C string from a String object.
|
|
|
Appends to a String object (destructive).
|
|
|
Reads a stream file and return the top-level object.
|
|
|
Prints a Value.
|
|
|
Sets the max depth of printer object traversal.
|
|
|
Prints a Value followed by a newline.
|
|
|
NIL, nada, nothing.
|
|
|
TRUE.
|


{{> head}}
{{> scripts}} {{> navbar page="about"}}My name is Giovanni Silvestri and I’m a software developer. My passion for computer science begun in 1989 when I received an Amiga 500 for my 9th birthday. I won’t annoy you in telling all the history of computer science and the war that proclaimed winner Microsoft in the control of the Personal Computer. If you are interested in this battle I will suggest to take a look at the 1999 movie “ Pirates of Silicon Valley” from Martyn Burke.
I develop solutions in the Java language and especially enterprise applications for the web (J2EE). In presentation layer technologies I'm proficient in Javascript and in fast development MVC frameworks like Meteor, Vue.js and Angular.
My other bigger interest is finance and markets and since four years I develop Bitcoin applications: emerging technology in the field of digital payments. If you like to know more about Bitcoin and its related technologies I suggest you to take a look at the movie: “ The Rise and Rise of Bitcoin“. For every question, project or consultancy you would like to submit to me, or just to have an updated copy of my CV do not hesitate to contact me with the form contact or with one of the following methods:
Contact me and we can discuss your project to make your dream a reality in less than 24 hours!!


Address QML Type
The Address QML type represents a specific location as a street address. More...
| Import Statement: | import QtPositioning 5.2 |
| Since: | Qt 5.2 |
Properties
- address : QGeoAddress
- city : string
- country : string
- countryCode : string
- county : string
- district : string
- isTextGenerated : bool
- postalCode : string
- state : string
- street : string
- text : string
Detailed Description
An Address is used as a unit of data for queries such as (Reverse) Geocoding or Places searches -- many of these operations either accept an Address or return one.
Not all properties of an Address are necessarily available or relevant in all parts of the world and all locales. The district, state and county properties are particularly area-specific for many data sources, and often only one or two of these are available or useful.
The Address has a text property which holds a formatted string. It is the recommended way to display an address to the user and typically takes the format of an address as found on an envelope, but this is not always the case. The text may be automatically generated from constituent address properties such as street, city and and so on, but can also be explicitly assigned. See text for details.
Example Usage
The following code snippet shows the declaration of an Address object.
Address { id: address street: "53 Brandl St" city: "Eight Mile Plains" country: "Australia" countryCode: "AUS" }
This could then be used, for example, as the value of a geocoding query, to get an exact longitude and latitude for the address.
See also QGeoAddress.
Property Documentation
For details on how to use this property to interface between C++ and QML see "Interfaces between C++ and QML Code".
This property holds the country code of the address as a single formatted string.
This property holds the postal code of the address as a single formatted string.
This property holds the street of the address but may also contain things like a unit number, a building name, or anything else that might be used to distinguish one address from another.
This property holds the address as a single formatted string. It is the recommended string to use to display the address to the user. It typically takes the format of an address as found on an envelope, but this is not always necessarily the case.
The address text
is either automatically generated or explicitly assigned, this can be determined by checking isTextGenerated.
If an empty string is assigned to text
, then isTextGenerated will be set to true and text
will return a string which is locally formatted according to countryCode and based on the properties of the address. Modifying the address properties such as street, city and so on may cause the contents of text
to change.
If a non-empty string is assigned to text
, then isTextGenerated will be set to false and text
will always return the explicitly assigned string. Modifying address properties will not affect the text
property.


This Todo APP uses the same service for managing todo's on the dashboard but with extended features.
Well done! No more todo's.


Size: Red {{size}}
Quantity: {{brick.quantity}}
Price: {{brick.price}}
Coming soon
Operation on Cart
Size: Yellow {{size}}


Organization Made Simple
Do you spend too much time worrying about your kitchen inventory? Is the lack of organization stressing you out? Well look no further, I’ll Serve Soup 2 fits your needs. Our application allows easy tracking of what you have in the kitchen without any hassle


About Us: We are in the IT industry since 2019. We provide latest News related Games, Tech Trends, Technology, Smartphones Console & Pc enthusiasts, so you can stay updated and get to know what is going around the globe.
However, Tekspots provides independent , unbiased news and editorials. Furthermore news related to Games, Tech Trends, Technology, Smartphones Console and PC enthusiasts. Our news coverage is comprehensive. This includes build guides, software reviews, hardware reviews, our best section, consoles, smartphones and tech gadgets. Our goal is to provide the best news to our gaming community.
We provide daily blogs written by our best authors and news reporters .
Blogger, Web developer, Gamer and tech enthusiast. For the last 10 years Faizan Nabi has been working in IT doing wiriting various blogs on multiple international sites. Moreover he is also developing sites since 2018.
Email: fazy_afhf@yahoo.com


Starting Out
Setting up a solution
Make a new visual studio solution, i called mine "TileBasedGames"
Notice that this created a new solution called TileBasedGames as well as a new project called TileBasedGames. Go ahead and delete the project. Right click the project and select Remove. Click "OK" on the confirm dialog.
If you look at the "TileBasedGames" folder there are two things in there, a solution named "TileBasedGames" and a folder named "TileBasedGames". The folder contains the project we just deleted.
Before we do anything else, add a .gitignore file. Use the Visual Studio template.
Lets also add an Assets folder next to the solution. This is where we are going to keep all shared game assets. All in all your folder structre should look like this:
Setting up a project
Let's go trough setting up a project together. While you won't use this specific project, all subsequent tutorials will have the same setup. Ideally you want to have one solution with many projects inside it.
Let's add a new project called Skeleton. Right click on your solution and add a new project.
I'm going to go ahead and call mine Skeleton
Link in System.Drawing. Right click on references and select "Add Reference"
Type System.Drawing in the search box, check the appropriate package
Next we're going to link in two NuGet packages, OpenTK and (https://naudio.codeplex.com/). Right click on the project and select Manage NuGet Packages
In the window that pops up, type TopenTK in the search bar, select the appropriate package and hit install.
Repeat for NAudio
We set up an Assets folder when we created the soltuion. Let's set the projects working directory so we can actually use the Assets folder. Right click on the solution, select Properties
In the debug tab, browse for a new working directory
Select the TileBasedGames root directory. THIS IS NOT THE Assets DIRECTORY, RATHER THE Assets DIRECTORY'S PARENT.
We want to select the parent of the Assets directory. This way when you are ready to distribute your game, you just have to copy the Assets directory next to your exe file. Your properties should look like this:
That is our basic project setup minus any code. The Assets Directory Is Shared. All of the projects we build in this tutorial will use the same Assets directory!
Adding code
We're going to add the OpenTK Framework Managers to this project. I'll link to the code on the main repo, but i'll also include it in the tutorial, in case the repo goes down.
Right click on the project, select Add, then New Folder
Go ahead and name this folder Managers. Right click on the new Managers folder, select add, then new item
Call the new item GraphicsManager
Replace the contents of the new GraphicsManager.cs file with this. Make sure to use the latest code from the repo, as some of the code might have changed since you last saw it.
Repeat the above steps to add the TextureManager, InputManager and SoundManager. In case the main repo ever goes down i've included the source for all the managers in the tutorial, check the sub-sections of this section.
Let's add a new Game class, this is the class that we will be writing most of the example code in. Ideally you shouldn't have to touch any other classes. Add the game file to the solution (it's a top level file, next to Program.cs, not in the managers directory), and fill it with the following code:
using System;
using GameFramework;
using System.Collections.Generic;
namespace Skeleton {
class Game {
// Singleton
private static Game instance = null;
public static Game Instance {
get {
if (instance == null) {
instance = new Game();
}
return instance;
}
}
protected Game() {
}
public void Initialize() {
}
public void Update(float dt) {
}
public void Render() {
}
public void Shutdown() {
}
}
}
The class is a singleton, each function in here should be relativley straight forward. The last thing we have to do is fill in the main Program. Change the contents of Program.cs to
using System;
using OpenTK;
using OpenTK.Input;
using System.Drawing;
using GameFramework;
using System.Collections.Generic;
namespace Skeleton {
class Program {
public static OpenTK.GameWindow Window = null;
public static void Initialize(object sender, EventArgs e) {
GraphicsManager.Instance.Initialize(Window);
TextureManager.Instance.Initialize(Window);
InputManager.Instance.Initialize(Window);
SoundManager.Instance.Initialize(Window);
Game.Instance.Initialize();
}
public static void Update(object sender, FrameEventArgs e) {
float deltaTime = (float)e.Time;
InputManager.Instance.Update();
Game.Instance.Update(deltaTime);
}
public static void Render(object sender, FrameEventArgs e) {
GraphicsManager.Instance.ClearScreen(Color.CadetBlue);
Game.Instance.Render();
// Show framerate
int FPS = System.Convert.ToInt32(1.0 / e.Time);
GraphicsManager.Instance.DrawString("FPS: " + FPS, new PointF(5, 5), Color.Black);
GraphicsManager.Instance.DrawString("FPS: " + FPS, new PointF(4, 4), Color.White);
GraphicsManager.Instance.SwapBuffers();
}
public static void Shutdown(object sender, EventArgs e) {
Game.Instance.Shutdown();
SoundManager.Instance.Shutdown();
InputManager.Instance.Shutdown();
TextureManager.Instance.Shutdown();
GraphicsManager.Instance.Shutdown();
}
[STAThread]
public static void Main() {
// Create static (global) window instance
Window = new OpenTK.GameWindow();
// Hook up the initialize callback
Window.Load += new EventHandler<EventArgs>(Initialize);
// Hook up the update callback
Window.UpdateFrame += new EventHandler<FrameEventArgs>(Update);
// Hook up the render callback
Window.RenderFrame += new EventHandler<FrameEventArgs>(Render);
// Hook up the shutdown callback
Window.Unload += new EventHandler<EventArgs>(Shutdown);
// Set window title and size
Window.Title = "Game Name";
Window.ClientSize = new Size(800, 600);
// Run the game at 60 frames per second. This method will NOT return
// until the window is closed.
Window.Run(60.0f);
// If we made it down here the window was closed. Call the windows
// Dispose method to free any resources that the window might hold
Window.Dispose();
#if DEBUG
Console.WriteLine("\nFinished executing, press any key to exit...");
Console.ReadKey();
#endif
}
}
}
Program.cs just takes care of initializing and cleaning up our various managers. All of your actual game code will go into the Game class.
You should be good to go. Compile and run the game to make sure that the standard window pops up. You will likeley have to do the above steps for EVERY project you make. Don't Link to the managers, include them in each project.
 Before moving onto the next section check in with me. I want to look over your code, make sure that the project is properly organized before moving on.


| CompositeKeyLeafSerializer |
object CompositeKeyLeafSerializer : Serializer<Leaf>
For serialising composite keys |
| CompositeKeyNodeSerializer |
object CompositeKeyNodeSerializer : Serializer<Node> |
| DeserializeAsKotlinObjectDef |
interface DeserializeAsKotlinObjectDef
Marker interface for kotlin object definitions so that they are deserialized as the singleton instance. |
| Ed25519PrivateKeySerializer |
object Ed25519PrivateKeySerializer : Serializer<EdDSAPrivateKey>
For serialising an ed25519 private key |
| Ed25519PublicKeySerializer |
object Ed25519PublicKeySerializer : Serializer<EdDSAPublicKey>
For serialising an ed25519 public key |
| ImmutableClassSerializer |
class ImmutableClassSerializer<T : Any> : Serializer<T>
Serializes properties and deserializes by using the constructor. This assumes that all backed properties are set via the constructor and the class is immutable. |
| InputStreamSerializer |
object InputStreamSerializer : Serializer<InputStream> |
| KotlinObjectSerializer |
object KotlinObjectSerializer : Serializer<DeserializeAsKotlinObjectDef>
Serializer to deserialize kotlin object definitions marked with DeserializeAsKotlinObjectDef. |
| NoReferencesSerializer |
class NoReferencesSerializer<T> : Serializer<T> |
| OpaqueBytes |
open class OpaqueBytes
A simple class that wraps a byte array and makes the equals/hashCode/toString methods work as you actually expect. In an ideal JVM this would be a value type and be completely overhead free. Project Valhalla is adding such functionality to Java, but it won't arrive for a few years yet! |
| OrderedSerializer |
object OrderedSerializer : Serializer<HashMap<Any, Any>> |
| ReferencesAwareJavaSerializer |
object ReferencesAwareJavaSerializer : JavaSerializer
Improvement to the builtin JavaSerializer by honouring the Kryo.getReferences setting. |
| SerializationToken |
interface SerializationToken
This represents a token in the serialized stream for an instance of a type that implements SerializeAsToken. |
| SerializeAsToken |
interface SerializeAsToken
This interface should be implemented by classes that want to substitute a token representation of themselves if they are serialized because they have a lot of internal state that does not serialize (well). |
| SerializeAsTokenContext |
class SerializeAsTokenContext
A context for mapping SerializationTokens to/from SerializeAsTokens. |
| SerializeAsTokenSerializer |
class SerializeAsTokenSerializer<T : SerializeAsToken> : Serializer<T>
A Kryo serializer for SerializeAsToken implementations. |
| SerializedBytes |
class SerializedBytes<T : Any> : OpaqueBytes
A type safe wrapper around a byte array that contains a serialised object. You can call SerializedBytes.deserialize to get the original object back. |
| SerializedBytesSerializer |
object SerializedBytesSerializer : Serializer<SerializedBytes<Any>>
A serialiser that avoids writing the wrapper class to the byte stream, thus ensuring SerializedBytes is a pure type safety hack. |
| SingletonSerializationToken |
data class SingletonSerializationToken : SerializationToken
A class representing a SerializationToken for some object that is not serializable but can be looked up (when deserialized) via just the class name. |
| SingletonSerializeAsToken |
abstract class SingletonSerializeAsToken : SerializeAsToken
A base class for implementing large objects / components / services that need to serialize themselves to a string token to indicate which instance the token is a serialized form of. |
| WireTransactionSerializer |
object WireTransactionSerializer : Serializer<WireTransaction>
A serialisation engine that knows how to deserialise code inside a sandbox |
| MissingAttachmentsException |
class MissingAttachmentsException : Exception
Thrown during deserialisation to indicate that an attachment needed to construct the WireTransaction is not found |
| com.esotericsoftware.kryo.Kryo | |
| com.esotericsoftware.kryo.io.Input | |
| com.esotericsoftware.kryo.io.Output | |
| kotlin.ByteArray | |
| kotlin.String |
| ATTACHMENT_STORAGE |
val ATTACHMENT_STORAGE: String |
| THREAD_LOCAL_KRYO |
val THREAD_LOCAL_KRYO: ThreadLocal<Kryo>
Serialization utilities, using the Kryo framework with a custom serialiser for immutable data classes and a dead simple, totally non-extensible binary (sub)format. |
| createKryo |
fun createKryo(k: Kryo = Kryo()): Kryo |
| deserialize |
fun <T : Any> OpaqueBytes.deserialize(kryo: Kryo = THREAD_LOCAL_KRYO.get()): T fun SerializedBytes<WireTransaction>.deserialize(kryo: Kryo = THREAD_LOCAL_KRYO.get()): WireTransaction fun <T : Any> SerializedBytes<T>.deserialize(kryo: Kryo = THREAD_LOCAL_KRYO.get()): T |
| extendKryoHash |
fun extendKryoHash(kryo: Kryo): Kryo |
| serialize |
fun <T : Any> T.serialize(kryo: Kryo = THREAD_LOCAL_KRYO.get()): SerializedBytes<T>
Can be called on any object to convert it to a byte array (wrapped by SerializedBytes), regardless of whether the type is marked as serializable or was designed for it (so be careful!). |


Lorem ipsum dolor schmidt
03 FEB’17
Retro occupy organic, stumptown shabby chic pour-over roof party DIY normcore. Actually artisan organic occupy, Wes Anderson ugh whatever pour-over gastropub selvage. Chillwave craft beer tote bag stumptown quinoa hashtag. Dreamcatcher locavore iPhone
Read More


Compass
In this page
Requirements
Installing Compass
Installing Cplex
Cplex Versions
Download
Linux Install Walkthrough
Installing on other Operating Systems
Python (2.7+ recommended) IBM CPLEX Optimization Studio (12.9+ recommended) Numpy (1.12+ recommended)
Python (2.7+ recommended)
IBM CPLEX Optimization Studio (12.9+ recommended)
Numpy (1.12+ recommended)
For more details on installing Cplex and what version to use see this section on Installing Cplex.
Older Python or Cplex versions may work but have not been tested.
If Numpy is not installed, you can install it with
pip install numpy
This needs to be installed before the other requirements because a C extension needs the location of numpy headers to compile.
Then simplest way to install Compass is using pip to install from the github repository. This can be done with the following command in the terminal:
pip install git+https://github.com/yoseflab/Compass.git --upgrade
This command will also update Compass to the newest version. Alternatively, you can clone the Compass repository and run setup.py.
Now to test if everything is installed, simply run:
compass -h
You should see the help text print out if installation was succesful :) For more details on how to use Compass you can visit our tutorial.
Compass relies on CPLEX, an optimization engine developed by IBM and free for academic use. In particular Compass uses its Python API (distinct from Docplex).
CPLEX needs to be installed directly from IBM. We note that it may be simpler to download the installation files locally and SCP/File Transfer them over to the corresponding server.
The version of Cplex to install will depend on what version of Python you want to use Cplex with, as IBM has gradually phased out support for older Python versions with Cplex 12.10 dropping support for Python 2.x. As a non-exhaustive list of tested Cplex versions (followed by their part number):
Python 3.7 or 3.8: Cplex 20.10 (CJ8GXML) Python 3.6: Cplex 12.10 (CJ6BPML) Python 2.7: Cplex 12.9 (CJ4Z5ML)
Python 3.7 or 3.8: Cplex 20.10 (CJ8GXML)
Python 3.6: Cplex 12.10 (CJ6BPML)
Python 2.7: Cplex 12.9 (CJ4Z5ML)
To more directly find these versions of Cplex, you can use IBM’s software search page and enter the part numbers into the “Find by part number” search box.
First navigate to the main page for CPLEX here
Compass requires the full edition of CPLEX, which is free for academic use. Click the ‘Get student and faculty editions’ link.
Register an account or Log In to an existing account. Once logged in, scroll down to the ‘Software’ section and to a download page for “ILOG CPLEX Optimization Studio”.
 Find the one corresponding to your operating system, for example “IBM ILOG CPLEX Optimization Studio 12.9 for Linux x86-64 Multilingual (CNZM2ML)” and check it. Then click ‘Download Now’ at the bottom of the page. Then you probably will need to click the ‘install / re-install Download Director’ popup on the bottom and follow the instructions there.
Finally, you will be able to download cplex_studio129.linux-x86-64.bin (or the corresponding file for your version and OS) .
cplex_studio129.linux-x86-64.bin
Once the file has been transferred, on the Ubuntu instance, execute the installer by running the following commands:
First install Java (required by CPLEX) if you haven’t already done so.
sudo apt-get install default-jre
Then:
cd ~ chmod +x cplex_studio129.linux-x86-64.bin sudo ./cplex_studio129.linux-x86-64.bin
Follow the instructions in the installer, accepting the license agreement and choosing to install to the default path /opt/ibm/ILOG/CPLEX_Studio129.
/opt/ibm/ILOG/CPLEX_Studio129
Afterwards, if it has installed successfully, you can remove the installer file with .. code:: bash
rm ~/cplex_studio129.linux-x86-64.bin
Lastly, we need to install the Python module that comes with cplex. To do this, run these commands:
cd /opt/ibm/ILOG/CPLEX_Studio129/cplex/python/3.6/x86-64_linux sudo python3 setup.py install
If all is good, cplex will be installed! To test this simply open a python instance and run the following command
import cplex
If there are no errors, you’re good to go!
For installation on Windows or Mac the process will be similar. Navigate to [Cplex Install Directory]/cplex/python/[Python Version]/[OS] and run
python3 setup.py install
For more detailed instructions see IBM’s Knowledge Center and using the “Change version or product” to navigate to the version of Cplex you downloaded. Then see here for how to setup the Python API of Cplex. As before, if you can open a Python instance and run
Then you are good to go!


Table of Contents
The <%ig.title%> implementation guide includes the following pages that provide implementation guidance:
In addition, the implementation guide defines the following conformance resources:
<%ig.registry ValueSet,ConceptMap,StructureDefinition,Conformance%>
[%file newfooter%]


extends standard block head
To learn more about our little static site generator, check out: github.com/wamoyo/masonite.