Lua Lanes - multithreading in Lua |
Copyright © 2007-23 Asko Kauppi, Benoit Germain. All rights reserved.
Lua Lanes is published under the same MIT license as Lua 5.1, 5.2, 5.3 and 5.4.
This document was revised on 17-Aug-23, and applies to version 3.16.2.
Lua Lanes is a Lua extension library providing the possibility to run multiple Lua states in parallel. It is intended to be used for optimizing performance on multicore CPU's and to study ways to make Lua programs naturally parallel to begin with.
Lanes is included into your software by the regular require "lanes" method. No C side programming is needed; all APIs are Lua side, and most existing extension modules should work seamlessly together with the multiple lanes.
Starting with version 3.1.6, Lanes should build and run identically with either Lua 5.1 or Lua 5.2. Version 3.10.0 supports Lua 5.3.
See comparison of Lua Lanes with other Lua multithreading solutions.
Lua Lanes supports the following operating systems:
The underlying threading code can be compiled either towards Win32 API or Pthreads. Unfortunately, thread prioritization under Pthreads is a JOKE, requiring OS specific tweaks and guessing undocumented behaviour. Other features should be portable to any modern platform.
Lua Lanes is built simply by make on the supported platforms (make-vc for Visual C++). See README for system specific details and limitations.
To install Lanes, all you need are the lanes.lua and lanes/core.so|dll files to be reachable by Lua (see LUA_PATH, LUA_CPATH). Or use Lua Rocks package management.
> luarocks search lanes ... output listing Lua Lanes is there ... > luarocks install lanes ... output ...
When Lanes is embedded, it is possible to statically initialize with
extern void LANES_API luaopen_lanes_embedded( lua_State* L, lua_CFunction _luaopen_lanes); |
luaopen_lanes_embedded leaves the module table on the stack. lanes.configure() must still be called in order to use Lanes.
If _luaopen_lanes is NULL, a default loader will simply attempt the equivalent of luaL_dofile( L, "lanes.lua").
To embed Lanes, compile source files in you application. In any Lua state were you want to use Lanes, initialize it as follows:
#include "lanes.h" int load_lanes_lua( lua_State* L) { // retrieve lanes.lua from wherever it is stored and return the result of its execution // trivial example 1: luaL_dofile( L, "lanes.lua"); // trivial example 2: luaL_dostring( L, bin2c_lanes_lua); } void embed_lanes( lua_State* L) { // we need base libraries for Lanes for work luaL_openlibs( L); ... // will attempt luaL_dofile( L, "lanes.lua"); luaopen_lanes_embedded( L, NULL); lua_pop( L, 1); // another example with a custom loader luaopen_lanes_embedded( L, load_lanes_lua); lua_pop( L, 1); // a little test to make sure things work as expected luaL_dostring( L, "local lanes = require 'lanes'.configure{with_timers = false}; local l = lanes.linda()"); } |
The following sample shows how to initialize the Lanes module.
local lanes = require "lanes".configure() |
Starting with version 3.0-beta, requiring the module follows Lua 5.2 rules: the module is not available under the global name "lanes", but has to be accessed through require's return value.
After lanes is required, it is necessary to call lanes.configure(), which is the only function exposed by the module at this point. Calling configure() will perform one-time initializations and make the rest of the API available.
At the same time, configure() itself will be replaced by another function that raises an error if called again with differing arguments, if any.
Also, once Lanes is initialized, require() is replaced by another one that wraps it inside a mutex, both in the main state and in all created lanes. This prevents multiple thread-unsafe module initializations from several lanes to occur simultaneously. It remains to be seen whether this is actually useful or not: If a module is already threadsafe, protecting its initialization isn't useful. And if it is not, any parallel operation may crash without Lanes being able to do anything about it.
IMPORTANT NOTE: Starting with version 3.7.0, only the first occurence of require "lanes" must be followed by a call to .configure(). From this point, a simple require "lanes" will do wherever you need to require lanes again.
lanes.configure( [opt_tbl]) |
lanes.configure accepts an optional options table as sole argument.
| name | value | definition | |
|---|---|---|---|
.nb_keepers
|
integer >= 1 | Controls the number of keeper states used internally by lindas to transfer data between lanes. (see below). Default is 1. | |
.with_timers
|
nil/false/true | If equal to false or nil, Lanes doesn't start the timer service, and the associated API will be absent from the interface (see below). Default is true. | |
.verbose_errors
|
nil/false/true | (Since v3.6.3) If equal to true, Lanes will collect more information when transfering stuff across Lua states to help identify errors (with a cost). Default is false. | |
.protect_allocator
|
nil/false/true | REPLACED BY allocator="protected" AS OF VERSION v3.13.0. (Since v3.5.2) If equal to true, Lanes wraps all calls to the state's allocator function inside a mutex. Since v3.6.3, when left unset, Lanes attempts to autodetect this value for LuaJIT (the guess might be wrong if "ffi" isn't loaded though). Default is true when Lanes detects it is run by LuaJIT, else nil. | |
.allocator
|
nil/"protected"/function |
(Since v3.13.0) If nil, Lua states are created with lua_newstate() and reuse the allocator from the master state. If "protected", The default allocator obtained from lua_getallocf() in the master state is wrapped inside a critical section and used in all newly created states. If a function, this function is called prior to creating the state. It should return a full userdata containing the following structure:
|
|
.internal_allocator
|
"libc"/"allocator" |
(Since v3.16.1) Controls which allocator is used for Lanest internal allocations (for keeper and deep userdata management). If "libc", Lanes uses realloc and free. If "allocator", Lanes uses whatever was obtained from the "allocator" setting. This option is mostly useful for embedders that want control all memory allocations, but have issues when Lanes tries to use the Lua State allocator for internal purposes (especially with LuaJIT). |
|
.demote_full_userdata
|
nil/false/true | (Since v3.7.5) If equal to false or nil, Lanes raises an error when attempting to transfer a non-deep full userdata, else it will be demoted to a light userdata in the destination. Default is false (set to true to get the legacy behaviour). | |
.track_lanes
|
nil/false/anything | Any non-nil|false value instructs Lanes keeps track of all lanes, so that lanes.threads() can list them. If false, lanes.threads() will raise an error when called. Default is false. | |
.on_state_create
|
function/nil |
If provided, will be called in every created Lua state right after initializing the base libraries.
Keeper states will call it as well, but only if it is a C function (keeper states are not able to execute any user Lua code). Typical usage is twofold:
(Since version 3.7.6) If on_state_create() is a Lua function, it will be transfered normally before the call. If it is a C function, a C closure will be reconstructed in the created state from the C pointer. Lanes will raise an error if the function has upvalues. |
|
.shutdown_timeout
|
number >= 0 | (Since v3.3.0) Sets the duration in seconds Lanes will wait for graceful termination of running lanes at application shutdown. Irrelevant for builds using pthreads. Default is 0.25. |
(Since v3.5.0) Once Lanes is configured, one should register with Lanes the modules exporting functions that will be transferred either during lane generation or through lindas.
Use lanes.require() for this purpose. This will call the original require(), then add the result to the lookup databases.
(Since version 3.11) It is also possible to register a given module with lanes.register(). This function will raise an error if the registered module is not a function or table.
local m = lanes.require "modname" lanes.register( "modname", module) |
The following sample shows preparing a function for parallel calling, and calling it with varying arguments. Each of the two results is calculated in a separate OS thread, parallel to the calling one. Reading the results joins the threads, waiting for any results not already there.
local lanes = require "lanes".configure() f = lanes.gen( function( n) return 2 * n end) a = f( 1) b = f( 2) print( a[1], b[1] ) -- 2 4 |
func = lanes.gen( [libs_str | opt_tbl [, ...],] lane_func) lane_h = func( ...) |
The function returned by lanes.gen() is a "generator" for launching any number of lanes. They will share code, options, initial globals, but the particular arguments may vary. Only calling the generator function actually launches a lane, and provides a handle for controlling it.
Alternatively, lane_func may be a string, in which case it will be compiled in the lane. This was to be able to launch lanes with older versions of LuaJIT, which didn't not support lua_dump, used internally to transfer functions to the lane.
Lanes automatically copies upvalues over to the new lanes, so you need not wrap all the required elements into one 'wrapper' function. If lane_func uses some local values, or local functions, they will be there also in the new lanes.
libs_str
defines the standard libraries made available to the new Lua state:
| (nothing) | no standard libraries (default) | ||
| "base" or "" | root level names, print, assert, unpack etc. | ||
| "coroutine" | coroutine.* namespace (part of base in Lua 5.1 and 5.2) | ||
| "debug" | debug.* namespace | ||
| "io" | io.* namespace | ||
| "math" | math.* namespace | ||
| "os" | os.* namespace | ||
| "package" | package.* namespace and require | ||
| "string" | string.* namespace | ||
| "table" | table.* namespace | ||
| "*" | All standard libraries (including those specific to LuaJIT and not listed above), as well as lanes.core. This must be used alone. |
Initializing the standard libs takes a bit of time at each lane invocation. This is the main reason why "no libraries" is the default.
opt_tbl
is a collection of named options to control the way lanes are run:
| name | value | definition |
|---|---|---|
.globals
|
table |
Sets the globals table for the launched threads. This can be used for giving them constants. The key/value pairs of table are transfered in the lane globals after the libraries have been loaded and the modules required.
The global values of different lanes are in no manner connected; modifying one will only affect the particular lane. |
.required
|
table |
Lists modules that have to be required in order to be able to transfer functions they exposed. Starting with Lanes 3.0-beta, non-Lua functions are no longer copied by recreating a C closure from a C pointer, but are searched in lookup tables.
These tables are built from the modules listed here. required must be a list of strings, each one being the name of a module to be required. Each module is required with require() before the lanes function is invoked.
So, from the required module's point of view, requiring it manually from inside the lane body or having it required this way doesn't change anything. From the lane body's point of view, the only difference is that a module not creating a global won't be accessible.
Therefore, a lane body will also have to require a module manually, but this won't do anything more (see Lua's require documentation).
ATTEMPTING TO TRANSFER A FUNCTION REGISTERED BY A MODULE NOT LISTED HERE WILL RAISE AN ERROR. |
.gc_cb
|
function | (Since version 3.8.2) Callback that gets invoked when the lane is garbage collected. The function receives two arguments (the lane name and a string, either "closed" or "selfdestruct"). |
.priority
|
integer |
The priority of lanes generated in the range -3..+3 (default is 0).
These values are a mapping over the actual priority range of the underlying implementation.
Implementation and dependability of priorities varies by platform. Especially Linux kernel 2.6 is not supporting priorities in user mode. A lane can also change its own thread priority dynamically with lanes.set_thread_priority(). |
.package
|
table |
Introduced at version 3.0.
Specifying it when libs_str doesn't cause the package library to be loaded will generate an error.
If not specified, the created lane will receive the current values of package. Only path, cpath, preload and loaders (Lua 5.1)/searchers (Lua 5.2) are transfered. |
Each lane also gets a global function set_debug_threadname() that it can use anytime to do as the name says. Supported debuggers are Microsoft Visual Studio (for the C side) and Decoda (for the Lua side).
Starting with version 3.8.1, the lane has a new method lane:get_debug_threadname() that gives access to that name from the caller side (returns "<unnamed>" if unset, "<closed>" if the internal Lua state is closed).
If a lane body pulls a C function imported by a module required before Lanes itself (thus not through a hooked require), the lane generator creation will raise an error. The function name it shows is a path where it was found by scanning _G. As a utility, the name guessing functionality is exposed as such:
"type", "name" = lanes.nameof( o) |
Starting with version 3.8.3, lanes.nameof() searches the registry as well.
The lane handles are allowed to be 'let loose'; in other words you may execute a lane simply by:
lanes.gen( function( params) ... end ) ( ...) |
lanes.set_thread_priority( prio) |
Besides setting a default priority in the generator settings, each thread can change its own priority at will. This is also true for the main Lua state.
The priority must be in the range [-3,+3].
lanes.set_thread_affinity( affinity) |
Each thread can change its own affinity at will. This is also true for the main Lua state.
str = lane_h.status |
The current execution state of a lane can be read via its status member, providing one of these values: (2)
| "pending" | Not started yet. Shouldn't stay very long in that state. | ||
| "running" | running, not suspended on a Linda call. | ||
| "waiting" | waiting at a Linda :receive() or :send() | ||
| "done" | finished executing (results are ready) | ||
| "error" | met an error (reading results will propagate it) | ||
| "cancelled" | received cancellation and finished itself. | ||
| "killed" | was forcefully killed by lane_h:cancel() (since v3.3.0) |
This is similar to coroutine.status, which has: "running" / "suspended" / "normal" / "dead". Not using the exact same names is intentional.
{{name = "name", status = "status", ...}|nil = lanes.threads() |
Only available if lane tracking feature is compiled (see HAVE_LANE_TRACKING in lanes.c) and track_lanes is set.
Returns an array table where each entry is a table containing a lane's name and status. Returns nil if no lane is running.
set_error_reporting( "basic"|"extended") |
Sets the error reporting mode. "basic" is selected by default.
A lane can be waited upon by simply reading its results. This can be done in two ways.
[val]= lane_h[1] |
Makes sure lane has finished, and gives its first (maybe only) return value. Other return values will be available in other lane_h indices.
If the lane ended in an error, it is propagated to master state at this place.
[...]|[nil,err,stack_tbl]= lane_h:join( [timeout_secs] ) |
Waits until the lane finishes, or timeout seconds have passed. Returns nil, "timeout" on timeout (since v3.13), nil,err,stack_tbl if the lane hit an error, nil, "killed" if forcefully killed (starting with v3.3.0), or the return values of the lane. Unlike in reading the results in table fashion, errors are not propagated.
stack_tbl is a table describing where the error was thrown.
In "extended" mode, stack_tbl is an array of tables containing info gathered with lua_getinfo() ("source","currentline","name","namewhat","what").
In "basic mode", stack_tbl is an array of "<filename>:<line>" strings. Use table.concat() to format it to your liking (or just ignore it).
If you use :join, make sure your lane main function returns a non-nil value so you can tell timeout and error cases apart from succesful return (using the .status property may be risky, since it might change between a timed out join and the moment you read it).
require "lanes".configure() f = lanes.gen( function() error "!!!" end) a = f( 1) --print( a[1]) -- propagates error v, err = a:join() -- no propagation if v == nil then error( "'a' faced error"..tostring(err)) -- manual propagation end |
If you want to wait for multiple lanes to finish (any of a set of lanes), use a Linda object. Give each lane a specific id, and send that id over a Linda once that thread is done (as the last thing you do).
require "lanes".configure() local sync_linda = lanes.linda() f = lanes.gen( function() dostuff() sync_linda:send( "done", true) end) a = f() b = f() c = f() sync_linda:receive( nil, sync_linda.batched, "done", 3) -- wait for 3 lanes to write something in "done" slot of sync_linda |
bool[,reason] = lane_h:cancel( "soft" [, timeout] [, wake_bool]) bool[,reason] = lane_h:cancel( "hard" [, timeout] [, force [, forcekill_timeout]]) bool[,reason] = lane_h:cancel( [mode, hookcount] [, timeout] [, force [, forcekill_timeout]]) |
cancel() sends a cancellation request to the lane.
First argument is a mode can be one of "hard", "soft", "count", "line", "call", "ret".
If mode is not specified, it defaults to "hard".
If mode is "soft", cancellation will only cause cancel_test() to return true, so that the lane can cleanup manually.
If wake_bool is true, the lane is also signalled so that execution returns from any pending linda operation. Linda operations detecting the cancellation request return lanes.cancel_error.
If mode is "hard", waits for the request to be processed, or a timeout to occur. Linda operations detecting the cancellation request will raise a special cancellation error (meaning they won't return in that case).
timeout defaults to 0 if not specified.
Other values of mode will asynchronously install the corresponding hook, then behave as "hard".
If force_kill_bool is true, forcekill_timeout can be set to tell how long lanes will wait for the OS thread to terminate before raising an error. Windows threads always terminate immediately, but it might not always be the case with some pthread implementations.
Returns true, lane_h.status if lane was already done (in "done", "error" or "cancelled" status), or the cancellation was fruitful within timeout_secs timeout period.
Returns false, "timeout" otherwise.
If the lane is still running after the timeout expired and force_kill is true, the OS thread running the lane is forcefully killed. This means no GC, probable OS resource leaks (thread stack, locks, DLL notifications), and should generally be the last resort.
Cancellation is tested before going to sleep in receive() or send() calls and after executing cancelstep Lua statements. Starting with version 3.0-beta, a pending receive()or send() call is awakened.
This means the execution of the lane will resume although the operation has not completed, to give the lane a chance to detect cancellation (even in the case the code waits on a linda with infinite timeout).
The code should be able to handle this situation appropriately if required (in other words, it should gracefully handle the fact that it didn't receive the expected values).
It is also possible to manually test for cancel requests with cancel_test().
set_finalizer( finalizer_func) void = finalizer_func( [err, stack_tbl]) |
The error call is used for throwing exceptions in Lua. What Lua does not offer, however, is scoped finalizers that would get called when a certain block of instructions gets exited, whether through peaceful return or abrupt error.
Since 2.0.3, Lanes registers a function set_finalizer in the lane's Lua state for doing this. Any functions given to it will be called in the lane Lua state, just prior to closing it. It is possible to set more than one finalizer. They are not called in any particular order.
An error in a finalizer itself overrides the state of the regular chunk (in practise, it would be highly preferable not to have errors in finalizers). If one finalizer errors, the others may not get called. If a finalizer error occurs after an error in the lane body, then this new error replaces the previous one (including the full stack trace).
local lane_body = function() set_finalizer( function( err, stk) if err and type( err) ~= "userdata" then -- no special error: true error print( " error: "..tostring(err)) elseif type( err) == "userdata" then -- lane cancellation is performed by throwing a special userdata as error print( "after cancel") else -- no error: we just got finalized print( "finalized") end end) end |
Communications between lanes is completely detached from the lane handles themselves. By itself, a lane can only provide return values once it's finished, or throw an error. Needs to communicate during runtime are handled by Linda objects, which are deep userdata instances. They can be provided to a lane as startup parameters, upvalues or in some other Linda's message.
Access to a Linda object means a lane can read or write to any of its data slots. Multiple lanes can be accessing the same Linda in parallel. No application level locking is required; each Linda operation is atomic.
require "lanes".configure() local linda = lanes.linda() local function loop( max) for i = 1, max do print( "sending: " .. i) linda:send( "x", i) -- linda as upvalue end end a = lanes.gen( "", loop)( 10000) while true do local key, val = linda:receive( 3.0, "x") -- timeout in seconds if val == nil then print( "timed out") break end print( tostring( linda) .. " received: " .. val) end |
Characteristics of the Lanes implementation of Lindas are:
h = lanes.linda( [opt_name, [opt_group]]) [true|lanes.cancel_error] = h:send( [timeout_secs,] [h.null,] key, ...) [key, val]|[lanes.cancel_error] = h:receive( [timeout_secs,] key [, ...]) [key, val [, ...]]|[lanes.cancel_error] = h:receive( timeout, h.batched, key, n_uint_min[, n_uint_max]) [true|lanes.cancel_error] = h:limit( key, n_uint) |
The send() and receive() methods use Linda keys as FIFO stacks (first in, first out). Timeouts are given in seconds (millisecond accuracy). If using numbers as the first Linda key, one must explicitly give nil as the timeout parameter to avoid ambiguities.
By default, stack sizes are unlimited but limits can be enforced using the limit() method. This can be useful to balance execution speeds in a producer/consumer scenario. Any negative value removes the limit.
A limit of 0 is allowed to block everything.
(Since version 3.7.7) if the key was full but the limit change added some room, limit() returns true and the linda is signalled so that send()-blocked threads are awakened.
Note that any number of lanes can be reading or writing a Linda. There can be many producers, and many consumers. It's up to you.
Hard cancellation will cause pending linda operations to abort execution of the lane through a cancellation error. This means that you have to install a finalizer in your lane if you want to run some code in that situation.
send() returns true if the sending succeeded, and false if the queue limit was met, and the queue did not empty enough during the given timeout.
(Since version 3.7.8) send() returns lanes.cancel_error if interrupted by a soft cancel request.
If no data is provided after the key, send() raises an error. Since version 3.9.3, if provided with linda.null before the actual key and there is no data to send, send() sends a single nil.
Also, if linda.null is sent as data in a linda, it will be read as a nil.
Equally, receive() returns a key and the value extracted from it, or nothing for timeout. Note that nils can be sent and received; the key value will tell it apart from a timeout.
Version 3.4.0 introduces an API change in the returned values: receive() returns the key followed by the value(s), in that order, and not the other way around.
(Since version 3.7.8) receive() returns lanes.cancel_error if interrupted by a soft cancel request.
Multiple values can be sent to a given key at once, atomically (the send will fail unless all the values fit within the queue limit). This can be useful for multiple producer scenarios, if the protocols used are giving data in streams of multiple units. Atomicity avoids the producers from garbling each others messages, which could happen if the units were sent individually.
When receiving from multiple slots, the keys are checked in order, which can be used for making priority queues.
bool|lanes.cancel_error = linda_h:set( key [, val [, ...]]) [[val [, ...]]|lanes.cancel_error] = linda_h:get( key [, count = 1]) |
The table access methods are for accessing a slot without queuing or consuming. They can be used for making shared tables of storage among the lanes.
Writing to a slot never blocks because it ignores the limit. It overwrites existing value and clears any possible queued entries.
Reading doesn't block either because get() returns whatever is available (which can be nothing), up to the specified count.
Table access and send()/receive() can be used together; reading a slot essentially peeks the next outcoming value of a queue.
set() signals the linda for write if a value is stored. If nothing special happens, set() returns nothing.
Since version 3.7.7, if the key was full but the new data count of the key after set() is below its limit, set() returns true and the linda is also signaled for read so that send()-blocked threads are awakened.
Since version 3.8.0, set() can write several values at the specified key, writing nil values is now possible, and clearing the contents at the specified key is done by not providing any value.
Also, get() can read several values at once. If the key contains no data, get() returns no value. This can be used to separate the case when reading stored nil values.
Since version 3.8.4, trying to send or receive data through a cancelled linda does nothing and returns lanes.cancel_error.
[val] = linda_h:count( [key[,...]]) |
Returns some information about the contents of the linda.
If no key is specified, and the linda is empty, returns nothing.
If no key is specified, and the linda is not empty, returns a table of key/count pairs that counts the number of items in each of the exiting keys of the linda. This count can be 0 if the key has been used but is empty.
If a single key is specified, returns the number of pending items, or nothing if the key is unknown.
If more than one key is specified, return a table of key/count pairs for the known keys.
[table] = linda_h:dump() |
Returns a table describing the full contents of a linda, or nil if the linda wasn't used yet.
void = linda_h:cancel("read"|"write"|"both"|"none") |
(Starting with version 3.8.4) Signals the linda so that lanes waiting for read, write, or both, wake up.
All linda operations (including get() and set()) will return lanes.cancel_error as when the calling lane is soft-cancelled as long as the linda is marked as cancelled.
"none" reset the linda's cancel status, but doesn't signal it.
If not void, the lane's cancel status overrides the linda's cancel status.
A linda is a gateway to read and write data inside some hidden Lua states, called keeper states. Lindas are hashed to a fixed number of keeper states, which are a locking entity.
The data sent through a linda is stored inside the associated keeper state in a Lua table where each linda slot is the key to another table containing a FIFO for that slot.
Each keeper state is associated with an OS mutex, to prevent concurrent access to the keeper state. The linda itself uses two signals to be made aware of operations occuring on it.
Whenever Lua code reads from or writes to a linda, the mutex is acquired. If linda limits don't block the operation, it is fulfilled, then the mutex is released.
If the linda has to block, the mutex is released and the OS thread sleeps, waiting for a linda operation to be signalled. When an operation occurs on the same linda, possibly fufilling the condition, or a timeout expires, the thread wakes up.
If the thread is woken but the condition is not yet fulfilled, it goes back to sleep, until the timeout expires.
When a lane is cancelled, the signal it is waiting on (if any) is signalled. In that case, the linda operation will return lanes.cancel_error.
A single Linda object provides an infinite number of slots, so why would you want to use several?
There are some important reasons:
Actually, you can. Make separate lanes to wait each, and then multiplex those events to a common Linda, but... :).
void = lanes.timer( linda_h, key, date_tbl|first_secs [,period_secs]) |
Timers are implemented as a lane. They can be disabled by setting "with_timers" to nil or false to lanes.configure().
Timers can be run once, or in a reoccurring fashion (period_secs > 0). The first occurrence can be given either as a date or as a relative delay in seconds. The date table is like what os.date("*t") returns, in the local time zone.
Once a timer expires, the key is set with the current time (in seconds, same offset as os.time() but with millisecond accuracy). The key can be waited upon using the regular Linda :receive() method.
A timer can be stopped simply with first_secs=0|nil and no period.
local lanes = require "lanes" lanes.configure() local linda = lanes.linda() -- First timer once a second, not synchronized to wall clock -- lanes.timer( linda, "sec", 1, 1) -- Timer to a future event (next even minute); wall clock synchronized -- local t = os.date( "*t", os.time() + 60) -- now + 1min t.sec = 0 lanes.timer( linda, "min", t, 60) -- reoccur every minute (sharp) while true do local key, v = linda:receive( "sec", "min") print( "Timer "..key..": "..v) end |
NOTE: Timer keys are set, not queued, so missing a beat is possible especially if the timer cycle is extremely small. The key value can be used to know the actual time passed.
| Having the API as lanes.timer() is intentional. Another alternative would be linda_h:timer() but timers are not traditionally seen to be part of Lindas. Also, it would mean any lane getting a Linda handle would be able to modify timers on it. A third choice could be abstracting the timers out of Linda realm altogether (timer_h= lanes.timer( date|first_secs, period_secs )) but that would mean separate waiting functions for timers, and lindas. Even if a linda object and key was returned, that key couldn't be waited upon simultaneously with one's general linda events. The current system gives maximum capabilities with minimum API, and any smoothenings can easily be crafted in Lua at the application level. |
{[{linda, slot, when, period}[,...]]} = lanes.timers() |
The full list of active timers can be obtained. Obviously, this is a snapshot, and non-repeating timers might no longer exist by the time the results are inspected.
void = lanes.sleep( [seconds|false]) |
(Since version 3.9.7) A very simple way of sleeping when nothing else is available. Is implemented by attempting to read some data in an unused channel of the internal linda used for timers (this linda exists even when timers aren't enabled). Default duration is null, which should only cause a thread context switch.
Lanes does not generally require locks or critical sections to be used, at all. If necessary, a limited queue can be used to emulate them. lanes.lua offers some sugar to make it easy:
lock_func|lanes.cancel_error = lanes.genlock( linda_h, key [,N_uint=1]) bool|lanes.cancel_error = lock_func( M_uint [, "try"] ) -- acquire .. bool|lanes.cancel_error = lock_func( -M_uint) -- release |
The generated function acquires M tokens from the N available, or releases them if the value is negative. The acquiring call will suspend the lane, if necessary. Use M=N=1 for a critical section lock (only one lane allowed to enter).
When passsing "try" as second argument when acquiring, then lock_func operates on the linda with a timeout of 0 to emulate a TryLock() operation. If locking fails, lock_func returns false. "try" is ignored when releasing (as it it not expected to ever have to wait unless the acquisition/release pairs are not properly matched).
Upon successful lock/unlock, lock_func returns true (always the case when block-waiting for completion).
Note: The generated locks are not recursive (A single lane locking several times will consume tokens at each call, and can therefore deadlock itself). That would need another kind of generator, which is currently not implemented.
Similar sugar exists for atomic counters:
atomic_func|lanes.cancel_error = lanes.genatomic( linda_h, key [,initial_num=0.0]) new_num|lanes.cancel_error = atomic_func( [diff_num=+1.0]) |
Each time called, the generated function will change linda[key] atomically, without other lanes being able to interfere. The new value is returned. You can use either diff 0.0 or get to just read the current value.
Note that the generated functions can be passed on to other lanes.
Data passed between lanes (either as starting parameters, return values, upvalues or via Lindas) must conform to the following:
Originally, a C function was copied from one Lua state to another as follows:
// expects a C function on top of the source Lua stack copy_func( lua_State *dest, lua_State* source) { // extract C function pointer from source lua_CFunction func = lua_tocfunction( source, -1); // transfer upvalues int nup = transfer_upvalues( dest, source); // dest Lua stack contains a copy of all upvalues lua_pushcfunction( dest, func, nup); } |
This has the main drawback of not being LuaJIT-compatible, because some functions registered by LuaJIT are not regular C functions, but specially optimized implementations. As a result, lua_tocfunction() returns NULL for them.
Therefore, Lanes no longer transfers functions that way. Instead, functions are transfered as follows (more or less):
// expects a C function on top of the source Lua stack copy_func( lua_State *dest, lua_State* source) { // fetch function 'name' from source lookup database char const* funcname = lookup_func_name( source, -1); // lookup a function bound to this name in the destination state, and push it on the stack push_resolved_func( dest, funcname); } |
The devil lies in the details: what does "function lookup" mean?
Since functions are first class values, they don't have a name. All we know for sure is that when a C module registers some functions, they are accessible to the script that required the module through some exposed variables.
For example, loading the string base library creates a table accessible when indexing the global environment with key "string". Indexing this table with "match", "gsub", etc. will give us a function.
When a lane generator creates a lane and performs initializations described by the list of base libraries and the list of required modules, it recursively scans the table created by the initialisation of the module, looking for all values that are C functions.
Each time a function is encountered, the sequence of keys that reached that function is contatenated in a (hopefully) unique name. The [name, function] and [function, name] pairs are both stored in a lookup table in all involved Lua states (main Lua state and lanes states).
Then when a function is transfered from one state to another, all we have to do is retrieve the name associated to a function in the source Lua state, then with that name retrieve the equivalent function that already exists in the destination state.
Note that there is no need to transfer upvalues, as they are already bound to the function registered in the destination state. (And in any event, it is not possible to create a closure from a C function pushed on the stack, it can only be created with a lua_CFunction pointer).
There are several issues here:
string2 = string |
Most Lua extension modules should work unaltered with Lanes. If the module simply ties C side features to Lua, everything is fine without alterations. The luaopen_...() entry point will be called separately for each lane, where the module is require'd from.
If it, however, also does one-time C side initializations, these should be covered into a one-time-only construct such as below.
int luaopen_module( lua_State *L ) { static char been_here; /* 0 by ANSI C */ // Calls to 'require' serialized by Lanes; this is safe. if (!been_here) { been_here= 1; ... one time initializations ... } ... binding to Lua ... } |
Starting with version 3.13.0, a new way of passing full userdata across lanes uses a new __lanesclone metamethod. When a deep userdata is cloned, Lanes calls __lanesclone once, in the context of the source lane. The call receives the clone and original as light userdata, plus the actual userdata size, as in clone:__lanesclone(original,size), and should perform the actual cloning. A typical implementation would look like (BEWARE, THIS CHANGED WITH VERSION 3.16.0):
static int clonable_lanesclone( lua_State* L) { switch( lua_gettop( L)) { case 3: { struct s_MyClonableUserdata* self = lua_touserdata( L, 1); struct s_MyClonableUserdata* from = lua_touserdata( L, 2); size_t len = lua_tointeger( L, 3); assert( len == sizeof(struct s_MyClonableUserdata)); *self = *from; } return 0; default: (void) luaL_error( L, "Lanes called clonable_lanesclone with unexpected parameters"); } return 0; } |
NOTE: In the event the source userdata has uservalues, it is not necessary to create them for the clone, Lanes will handle their cloning.
Of course, more complex objects may require smarter cloning behavior than a simple memcpy. Also, the module initialisation code should make each metatable accessible from the module table itself as in:
int luaopen_deep_test(lua_State* L) { luaL_newlib( L, deep_module); // preregister the metatables for the types we can instanciate so that Lanes can know about them if( luaL_newmetatable( L, "clonable")) { luaL_setfuncs( L, clonable_mt, 0); lua_pushvalue(L, -1); lua_setfield(L, -2, "__index"); } lua_setfield(L, -2, "__clonableMT"); // actual name is not important if( luaL_newmetatable( L, "deep")) { luaL_setfuncs( L, deep_mt, 0); lua_pushvalue(L, -1); lua_setfield(L, -2, "__index"); } lua_setfield(L, -2, "__deepMT"); // actual name is not important return 1; } |
Then a new clonable userdata instance can just do like any non-Lanes aware userdata, as long as its metatable contains the aforementionned __lanesclone method.
int luaD_new_clonable( lua_State* L) { lua_newuserdata( L, sizeof( struct s_MyClonableUserdata)); luaL_setmetatable( L, "clonable"); return 1; } |
The mechanism Lanes uses for sharing Linda handles between separate Lua states can be used for custom userdata as well. Here's what to do.
void* idfunc( lua_State* L, DeepOp op_); |
Deep userdata management will take care of tying to __gc methods, and doing reference counting to see how many proxies are still there for accessing the data. Once there are none, the data will be freed through a call to the idfunc you provided.
Deep userdata in transit inside keeper states (sent in a linda but not yet consumed) don't call idfunc(eDO_delete) and aren't considered by reference counting. The rationale is the following:
If some non-keeper state holds a deep userdata for some deep object, then even if the keeper collects its own deep userdata, it shouldn't be cleaned up since the refcount is not 0.
OTOH, if a keeper state holds the last deep userdata for some deep object, then no lane can do actual work with it. Deep userdata's idfunc() is never called from a keeper state.
Therefore, Lanes can just call idfunc(eDO_delete) when the last non-keeper-held deep userdata is collected, as long as it doesn't do the same in a keeper state after that, since any remaining deep userdata in keeper states now hold stale pointers.
NOTE: The lifespan of deep userdata may exceed that of the Lua state that created it. The allocation of the data storage should not be tied to the Lua state used. In other words, use malloc()/free() or similar memory handling mechanism.
Lane handles are not implemented as deep userdata, and cannot thus be copied across lanes. This is intentional; problems would occur at least when multiple lanes were to wait upon one to get ready. Also, it is a matter of design simplicity.
The same benefits can be achieved by having a single worker lane spawn all the sublanes, and keep track of them. Communications to and from this lane can be handled via a Linda.
In multithreaded scenarios, giving multiple parameters to print() or file:write() may cause them to be overlapped in the output, something like this:
A: print( 1, 2, 3, 4 ) B: print( 'a', 'b', 'c', 'd' ) 1 a b 2 3 c d 4 |
Lanes is about making multithreading easy, and natural in the Lua state of mind. Expect performance not to be an issue, if your program is logically built. Here are some things one should consider, if best performance is vital:
Cancellation of lanes uses the Lua error mechanism with a special lightuserdata error sentinel. If you use pcall in code that needs to be cancellable from the outside, the special error might not get through to Lanes, thus preventing the Lane from being cleanly cancelled. You should throw any lightuserdata error further.
This system can actually be used by application to detect cancel, do your own cancellation duties, and pass on the error so Lanes will get it. If it does not get a clean cancellation from a lane in due time, it may forcefully kill the lane.
The sentinel is exposed as lanes.cancel_error, if you wish to use its actual value.
See CHANGES.
For feedback, questions and suggestions:


I am passionate about improving the healthcare ecosystem for everyone involved. I pursue projects that contribute to the common good, working with other people who really care about what they do. I am a software developer, a designer, and a proactive patient, ready to work for change.
User-centered Design, Research, User Testing, Wireframing and Prototyping from Paper to Sketch and Invision
Test Driven Development, From Java, HTML/CSS, and Javascript to Angular JS and React.js
Healthcare industry experience inside and out, both as a professional and as a patient advocate
Strategy or Development, let's talk about how to address your objectives and see if we would be a good team to get the job done with you.


CNY Hackathon
Toggle navigation
Home
Scoreboard
Services
Login
TEAM
1
TEAM
2
TEAM
3
TEAM
4
TEAM
5
TEAM
6
TEAM
7
TEAM
8
TEAM
9
TEAM
10
TEAM
11
TEAM
12
WEB
DNS
FTP


{% extends 'booru/base.html' %} {% block css %} {% load static %} {% endblock %} {% block scripts %} {% endblock %} {% block body %} {% load crispy_forms_tags %}
Every time the from tag is added, the to tag will also be added automatically.
This request will be reviewed by the staff.


Happy birthday sweet Coraline! Two years old, how did that happen so fast? You brighten every day with your smile, laughter, and curiosity.
3/30/2010, 2:55:25 PM
Favs: 0
Retweets: 0
link--- layout: tweet ---
Happy birthday sweet Coraline! Two years old, how did that happen so fast? You brighten every day with your smile, laughter, and curiosity.
3/30/2010, 2:55:25 PM
Favs: 0
Retweets: 0
link


Thu Nov 8, 2007
Peter Legge, CEO of Canada Wide (the behemoth that publishes just about every magazine in Western Canada), recently wrote a little book on how to jump-start your career.
He advises us to model ourselves after Leonardo da Vinci, who believed that seven key elements allowed him to become one of the most incredible innovators of our time. Here they are:
Curiosita: An insatiably curious approach to life and an unrelenting quest for continuous learning.
Dimostrazione: A commitment to test knowledge through experience.
Sensazione: The continual refinement of the sense, especially sight, as the means to enliven experience.
Sfumato (literally, “Going up in smoke”): A willingness to embrace ambiguity, paradox and uncertainty.
Arte/Scienza: The development of the balance between science and art, logic and imagination. Whole-brain thinking.
Corporalita: The cultivation of grace, ambidexterity, fitness, and poise.
Connessione: A recognition of and an appreciation for the interconnectedness of all things and phenomena. Systems thinking.


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Observable beroux.mountnfall.GameLogic
Manage the game rules. Know the current player's color, whitch move is authorized, ...
| Constructor Summary | |
GameLogic()
|
| Method Summary | |
java.lang.Object |
clone()
Clone the game state. |
boolean |
doMove(Move move)
Execute a move. |
boolean |
equals(java.lang.Object o)
|
boolean |
execute(GameCommand command)
Execute a command. |
java.util.List |
getAllPossibleMoves()
Find possible moves of the current player. |
Board |
getBoard()
|
int |
getCurrentPlayerColour()
Return the.getColour() of the active player. |
int |
getWinner()
|
boolean |
isGameOver()
|
boolean |
isMoveValid(Move move)
Check if the move is valid. |
| Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GameLogic()
| Method Detail |
public boolean execute(GameCommand command)
command
- A command to execute.
public int getCurrentPlayerColour()
public int getWinner()
public boolean isGameOver()
public Board getBoard()
public boolean doMove(Move move)
move
- Move to execute.
public boolean isMoveValid(Move move)
public java.lang.Object clone()
public boolean equals(java.lang.Object o)
public java.util.List getAllPossibleMoves()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


- SQL databases are primarily called as Relational Databases (RDBMS); whereas NoSQL database are primarily called as non-relational or distributed database.
- SQL databases are table based databases whereas NoSQL databases are document based, key-value pairs, graph databases or wide-column stores. This means that SQL databases represent data in form of tables which consists of n number of rows of data whereas NoSQL databases are the collection of key-value pair, documents, graph databases or wide-column stores which do not have standard schema definitions which it needs to adhered to.
- SQL databases have predefined schema whereas NoSQL databases have dynamic schema for unstructured data.
- SQL databases are vertically scalable whereas the NoSQL databases are horizontally scalable. SQL databases are scaled by increasing the horse-power of the hardware. NoSQL databases are scaled by increasing the databases servers in the pool of resources to reduce the load.
- SQL databases uses SQL ( structured query language ) for defining and manipulating the data, which is very powerful. In NoSQL database, queries are focused on collection of documents. Sometimes it is also called as UnQL (Unstructured Query Language). The syntax of using UnQL varies from database to database.
- SQL database examples: MySql, Oracle, Sqlite, Postgres and MS-SQL. NoSQL database examples: MongoDB, BigTable, Redis, RavenDb, Cassandra, Hbase, Neo4j and CouchDb
- For complex queries: SQL databases are good fit for the complex query intensive environment whereas NoSQL databases are not good fit for complex queries. On a high-level, NoSQL don’t have standard interfaces to perform complex queries, and the queries themselves in NoSQL are not as powerful as SQL query language.
- For the type of data to be stored: SQL databases are not best fit for hierarchical data storage. But, NoSQL database fits better for the hierarchical data storage as it follows the key-value pair way of storing data similar to JSON data. NoSQL database are highly preferred for large data set (i.e for big data). Hbase is an example for this purpose.
- For scalability: In most typical situations, SQL databases are vertically scalable. You can manage increasing load by increasing the CPU, RAM, SSD, etc, on a single server. On the other hand, NoSQL databases are horizontally scalable. You can just add few more servers easily in your NoSQL database infrastructure to handle the large traffic.
- For high transactional based application: SQL databases are best fit for heavy duty transactional type applications, as it is more stable and promises the atomicity as well as integrity of the data. While you can use NoSQL for transactions purpose, it is still not comparable and sable enough in high load and for complex transactional applications.
- For support: Excellent support are available for all SQL database from their vendors. There are also lot of independent consultations who can help you with SQL database for a very large scale deployments. For some NoSQL database you still have to rely on community support, and only limited outside experts are available for you to setup and deploy your large scale NoSQL deployments.
- For properties: SQL databases emphasizes on ACID properties ( Atomicity, Consistency, Isolation and Durability) whereas the NoSQL database follows the Brewers CAP theorem (Consistency, Availability and Partition tolerance)
- For DB types: On a high-level, we can classify SQL databases as either open-source or close-sourced from commercial vendors. NoSQL databases can be classified on the basis of way of storing data as graph databases, key-value store databases, document store databases, column store database and XML databases.
I don't know SQL or NoSQL enough to say which one I perefer. I think each one have their own benefits and are used in different situations. Personally I like more structure which SQL offers but being dynamic is also very important which is benefit of NoSQL.


How about a game of Lucky Hit?
by Heather AlexandraHow about a game of Lucky Hit? Chris and I streamed the (actually real game) Shenmue 3 on our Twitch channel. Come and check it out!
How about a game of Lucky Hit? Chris and I streamed the (actually real game) Shenmue 3 on our Twitch channel. Come and check it out!


WITNESS LIST Criminal Jurisprudence Committee April 13, 1999-2:00P HB 92 Registering, but not testifying: For: DeChant, Thomas C. (Greater San Antonio Crime Prevention) Garcia, Lucille (Self) Hamilton, Ray (Cellulen on Patrol NW Neighborhood Association) Ramirez, Edward (Self) Wall, Marjorie (Texas State Teachers Association) HB 779 For: Mejia, Berta A. (City of Houston) HB 780 For: Mejia, Berta A. (City of Houston) HB 1010 For: Kachar, Karen (Self) HB 1108 For: Bradley, John (Self) McDougal, Michael A. (Montogomery County District Attorney) Registering, but not testifying: For: Harris, Bill (Texas District and County Attorney Association) Jackson, Robert L. (Dallas Police Department) Jones, Claude (Texas Police Chiefs Association) Against: Woodford, Suzy (Self) HB 1167 For: Oeller, Carol (Harris County Pretrial Services Agency) HB 1169 For: Streater, Joy (Chair Legislative Committee County and District Clerk Assn.) HB 1372 Registering, but not testifying: For: Streater, Joy (County and District Clerk's Assistant) HB 1516 For: Stricklin, Don (Harris County District Attorney's Office) On: Keller, Sharon (Self) Kepple, Rob (Texas District and County Attorney's Association) McCormick, Michael J. (Self) Registering, but not testifying: On: Hampton, Keith S. (Texas Criminal Defense Lawyers Association) HB 1690 For: Blankenship, Richard P. (Texas Against Gambling) Letson, Sonya (Self and Potter County Attorney's Office) Murray, Alan (Dave and Buster's, Inc. / Texas Family Amusement Assn.) Ware, Weston W. (Self and Texas Baptist Christian Life Commission) Wood, Philip R. (Texas Family Amusement Association Premier Amusements, Inc.) Against: Diamond, Tom (Yslata del Sur Pueblo) Fenoglio, Stephen (Amusement and Music Operators of Texas) Munoz, Governor Vince (Self and Ysleta del Sur Pueblo) Overstreet, Morris L. (Self and Texas Amusement Association) Templeton, Kevin (Amusement and Music Operators Association of Texas) Warden, F.E. Gene (Self and VFW Department of Texas) Young, Robert A. (Self and Amusement and Music Operators of Texas, State President) On: Caskey, Chief Marshall (Texas Department of Public Safety Criminal Law Enforcement) Howington, Dan (Self) Registering, but not testifying: For: Garey, Glen (Texas Restaurant Association) Graves, Richard W. (Self and Texas Who Care - Texas Against Gambling) Scott, Rider (Texas Family Ammusement Association) Against: Alvidrez, Albert (Self and Pueblo of Ysleta del Sur) Barberjo, Ernest J. (Self) Bassett, Larry S. (Self) Becker, Billy (Self) Burton, Ken (Self) Coyle, Stephannie L. (Self) Crenshaw, Kenneth (Self) Cromer, Carol Ann (Self) Donovan, John P. (Self) Franco, Ruben (Self) Franz, J.R. (Self) Griffin, David R. (Self) Grigorian, Vazric (Self) Head, Jim (Self) Lancaster, James (Self) Miller, Karen (Self) Ray, Jerry (Self) Smith, Denis (Self) Thompson, Charles E. (Self) Truan Jr., Carlos A. (Amusement of Music Operators of Texas) Wall, George E. (Self) HB 2116 For: Betts, Charles (Downtown Austin Alliance) Buck, Lucy (Self and Texas Downtown Association) Douglas, David M. (Self and City Attorney's Office - City of Austin) Higginbotham, TJ (Self and San Marcos Downtown Association, San Marcos Main Street Program) Jackson, Charles P. (Self and Houston Downtown Management District) Knee, Stanley L. (Austin Police Department) Martinez, Mack (Travis County Attorney's Office) Registering, but not testifying: For: Shorter, Stacey (City of Austin) HB 2187 For: Falcon, Maria S. (The Family Violence Prevention Service) Switzer, Tony (Texas Council on Family Violence) Registering, but not testifying: On: Trinidad, Victoria (Texas Department of Criminal Justice) HB 2227 For: Harris, Bill (Self and Texas District and County Attorney's Association) HB 2231 For: Arrington, Sam (Self and United Transportation Union) Lane, Randy (Union Pacific Railraod Company) Pounds, Robert (Burlington Northern Santa Fe Railway Police) Registering, but not testifying: For: Barton, Bil (Texas Railroad Association) Calhoun, Frank W. (Burlington Northern Santa Fe Railway Company) Cheathan, Donald T. (Self and Longhorn Railway Company) English Jr., C.M. (Self) Kearns, Dennis (Burlington Northern Santa Fe Railway) Olson, Ron M. (Union Pacific Railraod Company) Yarnell, William (Kansas City Southern Railroad) HB 2879 For: Harrington, James C. (Self and Texas Civil Rights Project) Martinez, Clarissa (National Council of La Raza) Registering, but not testifying: For: Galloway, Carolyn (Texas Eagle Forum)


{% extends 'core/base.html' %} {% block title %}500{% endblock %} {% block yield %}
It's not your fault, it's ours, we're looking into it!


IM - Europe Population Movement Response
Information Management resources for the response
Some of the dashboards or maps are behind a password. If you need access please contact<EMAIL_ADDRESS>Interactive Dashboards
Indicator Maps and Global Deployments
OSM Basemaps


General Information
- Breed Purpose
- Ornamental
- Comb
- V-Shaped
- Broodiness
- Seldom
- Climate Tolerance
- All Climates
- Egg Productivity
- Medium
- Egg Size
- Large
- Egg Color
- White
- Breed Temperament
- Friendly,Flighty,Bears confinement well,Shy
- Breed Colors/Varieties
- In the US: Cream and GoldOutside of US: Self-Black, White, Blue-Laced, Cuckoo, Golden Black Half-Moon Spangled, Silver Black Half-Moon Spangled, Yellow White Half-Moon Spangled, Golden Blue Half-Moon Spangled, and Lavender.
- Breed Size
- Large Fowl
The Brabanter breed originated in the historic region of Brabant in the Netherlands. It is a very old breed, the oldest known image of one is in a painting of 1676 by the Dutch artist Melchior d'Hondecoeter. The breed quickly gained popularity, but became nearly extinct around the early 1900's, but were recreated from different German breeds.
Black and Cuckoo Brabanters were shown at the first German poultry exhibition in Saxony, in 1854. A bantam variety of Brabanter was created in around 1934, by cross-breeding the standard-sized Brabanter with bearded bantams of the Polish breed.
This breed is closely related to Owl Beards and has been crossed with them for the breeds survival in the past. While they are Ornamental they are also bred for their production of white eggs, which they lay fairly regularly. Their eggs can be white white or slightly tinted.
The American Poultry Association has not yet recognized Cream and Gold Brabanters as a Standard Breed of Fowl.
Brabanter eggs
Brabanter chick
Brabanter juvenile
Brabanter hen
Brabanter rooster
For more information on this breed and their owners' and breeders' experiences with them, see our breed discussion here: https://www.backyardchickens.com/threads/chicken-breed-focus-brabanter.1100952/


State of emergency declared in NSW due to growing bushfire risk
by Nadine MortonA STATE of emergency has been declared in NSW ahead of catastrophic bushfire danger risk on Tuesday.
Five people have lost their lives during the bushfire danger period so far this year and on Monday the NSW Premier Gladys Berejiklian said the government would take critical steps to protect people from bushfires.
Worsening bushfire conditions are expected during the coming week, with a total fire ban in place for NSW on Monday and Tuesday.
During a State of Emergency declaration, the first since October 2013, powers will be transferred from the NSW Government to the NSW Rural Fire Service Commissioner.
Read also: NSW village endures 'apocalyptic' fire
These powers include the ability to:
- Direct any government agency to conduct or refrain from conducting its functions;
- Control and coordinate the allocation of government resources;
- Evacuate people from property within the declared area;
- Close roads and thoroughfares to traffic;
- Pull down or shore up infrastructure at risk of collapse;
- Order the shutdown of essential utilities in the declared area including electricity, gas, oil and water; and
- Enter or take possession of property in the course of the emergency response.
Story continues after video.
"Our state has already been hit by some of the most devastating bushfires we have ever seen, with three lives lost and more than 150 structures destroyed," Ms Berejiklian said.
"With catastrophic weather conditions predicted for this week, particularly Tuesday with hot weather and strong winds, I have decided to take the Commissioner's advice and make this declaration.
"It will ensure our state is best placed to respond to the predicted fire conditions."
Read also: Climate link to bushfires riles deputy PM
NSW RFS Commissioner Shane Fitzsimmons said the risk from bushfire this was was "very real" and new fires could ignite from ones that had been brought under control.
"It'll only take one ember from that burnt area to go into an unburned area and then we're off and running," he said.
During the past week, bushfires in NSW have been spotting 12 kilometres ahead of the main fire front and igniting new fires, Commissioner Fitzsimmons said.
"Fires are starting extremely quickly," he said. "There is a profound risk across a broad geographical area.
"We will not stop in our endeavours to do the very best we can."
Minister for Police and Emergency Services David Elliott said the state of emergency was an appropriate decision and sends a strong message that the directions of the NSW RFS to the public during this period should be swiftly followed.
Read also: Climate change talk inappropriate: premier
"Today's announcement shows the NSW Government will always put the safety of the people in this State ahead of anything else. Our bush firefighters will be empowered during this period to ensure their directions are followed and community safety can be enhanced."
The declaration is valid for a period of seven days from today.


Start Locally
Select your preferences and run the install command. Please ensure that you are on the latest pip and numpy packages. Anaconda is our recommended package manager. You can also install previous versions of PyTorch. Note that LibTorch is only available for C++.
Installing on macOS
PyTorch can be installed and used on macOS. Depending on your system and compute requirements, your experience with PyTorch on a Mac may vary in terms of processing time. It is recommended, but not required, that your Mac have an NVIDIA GPU in order to harness the full power of PyTorch’s CUDA support.
Currently, CUDA support on macOS is only available by building PyTorch from source
Prerequisites
macOS Version
PyTorch is supported on macOS 10.10 (Yosemite) or above.
Python
By default, macOS is installed with Python 2.7. PyTorch can be installed with Python 2.7, but it is recommended that you use Python 3.6 or greater, which can be installed either through the Anaconda package manager (see below), Homebrew, or the Python website.
Package Manager
To install the PyTorch binaries, you will need to use one of two supported package managers: Anaconda or pip. Anaconda is the recommended package manager as it will provide you all of the PyTorch dependencies in one, sandboxed install, including Python.
Anaconda
To install Anaconda, you can download graphical installer or use the command-line installer. If you use the command-line installer, you can right-click on the installer link, select Copy Link Address
, and then use the following commands:
# The version of Anaconda may be different depending on when you are installing`
curl -O https://repo.anaconda.com/archive/Anaconda3-5.2.0-MacOSX-x86_64.sh
sh Anaconda3-5.2.0-MacOSX-x86_64.sh
# and follow the prompts. The defaults are generally good.`
pip
Python 3
If you installed Python via Homebrew or the Python website, pip
was installed with it. If you installed Python 3.x, then you will be using the command pip3
.
Tip: If you want to use just the command
pip
, instead ofpip3
, you can symlinkpip
to thepip3
binary.
Python 2
If you are using the default installed Python 2.7, you will need to install pip
via easy_install
sudo easy_install pip
Installation
Anaconda
To install PyTorch via Anaconda, use the following conda command:
conda install pytorch torchvision -c pytorch
pip
To install PyTorch via pip, use one of the following two commands, depending on your Python version:
# Python 3.x
pip3 install torch torchvision
# Python 2.x`
pip install torch torchvision
Verification
To ensure that PyTorch was installed correctly, we can verify the installation by running sample PyTorch code. Here we will construct a randomly initialized tensor.
from __future__ import print_function
import torch
x = torch.rand(5, 3)
print(x)
The output should be something similar to:
tensor([[0.3380, 0.3845, 0.3217],
[0.8337, 0.9050, 0.2650],
[0.2979, 0.7141, 0.9069],
[0.1449, 0.1132, 0.1375],
[0.4675, 0.3947, 0.1426]])
Additionally, to check if your GPU driver and CUDA is enabled and accessible by PyTorch, run the following commands to return whether or not the CUDA driver is enabled:
import torch
torch.cuda.is_available()
Building from source
For the majority of PyTorch users, installing from a pre-built binary via a package manager will provide the best experience. However, there are times when you may want to install the bleeding edge PyTorch code, whether for testing or actual development on the PyTorch core. To install the latest PyTorch code, you will need to build PyTorch from source.
You will also need to build from source if you want CUDA support.
Prerequisites
- Install Anaconda
- Install CUDA, if your machine has a CUDA-enabled GPU.
- Install optional dependencies:
export CMAKE_PREFIX_PATH=[anaconda root directory]
conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typing
Build
git clone --recursive https://github.com/pytorch/pytorch
cd pytorch
MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install
You can verify the installation as described above.
Installing on Linux
PyTorch can be installed and used on various Linux distributions. Depending on your system and compute requirements, your experience with PyTorch on Linux may vary in terms of processing time. It is recommended, but not required, that your Linux system has an NVIDIA GPU in order to harness the full power of PyTorch’s CUDA support..
Prerequisites
Supported Linux Distributions
PyTorch is supported on Linux distributions that use glibc >= v2.17, which include the following:
- Arch Linux, minimum version 2012-07-15
- CentOS, minimum version 7.3-1611
- Debian, minimum version 8.0
- Fedora, minimum version 24
- Mint, minimum version 14
- OpenSUSE, minimum version 42.1
- PCLinuxOS, minimum version 2014.7
- Slackware, minimum version 14.2
- Ubuntu, minimum version 13.04
The install instructions here will generally apply to all supported Linux distributions. An example difference is that your distribution may support
yum
instead ofapt
. The specific examples shown were run on an Ubuntu 18.04 machine.
Python
Python 3.6 or greater is generally installed by default on any of our supported Linux distributions, which meets our recommendation.
Tip: By default, you will have to use the command
python3
to run Python. If you want to use just the commandpython
, instead ofpython3
, you can symlinkpython
to thepython3
binary.
However, if you want to install another version, there are multiple ways:
- APT
- Python website
If you decide to use APT, you can run the following command to install it:
sudo apt install python
PyTorch can be installed with Python 2.7, but it is recommended that you use Python 3.6 or greater, which can be installed via any of the mechanisms above .
If you use Anaconda to install PyTorch, it will install a sandboxed version of Python that will be used for running PyTorch applications.
Package Manager
To install the PyTorch binaries, you will need to use one of two supported package managers: Anaconda or pip. Anaconda is the recommended package manager as it will provide you all of the PyTorch dependencies in one, sandboxed install, including Python.
Anaconda
To install Anaconda, you will use the command-line installer. Right-click on the 64-bit installer link, select Copy Link Location
, and then use the following commands:
# The version of Anaconda may be different depending on when you are installing`
curl -O https://repo.anaconda.com/archive/Anaconda3-5.2.0-Linux-x86_64.sh
sh Anaconda3-5.2.0-Linux-x86_64.sh
# and follow the prompts. The defaults are generally good.`
You may have to open a new terminal or re-source your
~/.bashrc
to get access to theconda
command.
pip
Python 3
While Python 3.x is installed by default on Linux, pip
is not installed by default.
sudo apt install python3-pip
Tip: If you want to use just the command
pip
, instead ofpip3
, you can symlinkpip
to thepip3
binary.
Python 2
If you are using Python 2.7, you will need to use this command
sudo apt install python-pip
Installation
Anaconda
No CUDA
To install PyTorch via Anaconda, and do not have a CUDA-capable system or do not require CUDA, use the following conda
command.
conda install pytorch-cpu torchvision-cpu -c pytorch
CUDA 9.0
To install PyTorch via Anaconda, and you are using CUDA 9.0, use the following conda
command:
conda install pytorch torchvision -c pytorch
CUDA 8.x
conda install pytorch torchvision cuda80 -c pytorch
CUDA 9.2
conda install pytorch torchvision cuda92 -c pytorch
pip
No CUDA
To install PyTorch via pip, and do not have a CUDA-capable system or do not require CUDA, use the following command, depending on your Python version:
# Python 2.7
pip install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp27-cp27mu-linux_x86_64.whl
pip install torchvision
# if the above command does not work, then you have python 2.7 UCS2, use this command
pip install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp27-cp27m-linux_x86_64.whl
# Python 3.5
pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp35-cp35m-linux_x86_64.whl
pip3 install torchvision
# Python 3.6
pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-linux_x86_64.whl
pip3 install torchvision
# Python 3.7
pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.1.post2-cp37-cp37m-linux_x86_64.whl
pip3 install torchvision
CUDA 9.0
To install PyTorch via pip, and you are using CUDA 9.0 or do not require CUDA, use the following command, depending on your Python version:
# Python 3.x
pip3 install torch torchvision
# Python 2.7`
pip install torch torchvision
CUDA 8.x
# Python 2.7
pip install http://download.pytorch.org/whl/cu80/torch-0.4.1-cp27-cp27mu-linux_x86_64.whl
pip install torchvision
# if the above command does not work, then you have python 2.7 UCS2, use this command
pip install http://download.pytorch.org/whl/cu80/torch-0.4.1-cp27-cp27m-linux_x86_64.whl
# Python 3.5
pip3 install http://download.pytorch.org/whl/cu80/torch-0.4.1-cp35-cp35m-linux_x86_64.whl
pip3 install torchvision
# Python 3.6
pip3 install http://download.pytorch.org/whl/cu80/torch-0.4.1-cp36-cp36m-linux_x86_64.whl
pip3 install torchvision
# Python 3.7
pip3 install http://download.pytorch.org/whl/cu80/torch-0.4.1.post2-cp37-cp37m-linux_x86_64.whl
pip3 install torchvision
CUDA 9.2
# Python 2.7
pip install http://download.pytorch.org/whl/cu92/torch-0.4.1-cp27-cp27mu-linux_x86_64.whl
pip install torchvision
# if the above command does not work, then you have python 2.7 UCS2, use this command
pip install http://download.pytorch.org/whl/cu80/torch-0.4.1-cp27-cp27m-linux_x86_64.whl
# Python 3.5
pip3 install http://download.pytorch.org/whl/cu92/torch-0.4.1-cp35-cp35m-linux_x86_64.whl
pip3 install torchvision
# Python 3.6
pip3 install http://download.pytorch.org/whl/cu92/torch-0.4.1-cp36-cp36m-linux_x86_64.whl
pip3 install torchvision
# Python 3.7
pip3 install http://download.pytorch.org/whl/cu92/torch-0.4.1.post2-cp37-cp37m-linux_x86_64.whl
pip3 install torchvision
Verification
To ensure that PyTorch was installed correctly, we can verify the installation by running sample PyTorch code. Here we will construct a randomly initialized tensor.
from __future__ import print_function
import torch
x = torch.rand(5, 3)
print(x)
The output should be something similar to:
tensor([[0.3380, 0.3845, 0.3217],
[0.8337, 0.9050, 0.2650],
[0.2979, 0.7141, 0.9069],
[0.1449, 0.1132, 0.1375],
[0.4675, 0.3947, 0.1426]])
Additionally, to check if your GPU driver and CUDA is enabled and accessible by PyTorch, run the following commands to return whether or not the CUDA driver is enabled:
import torch
torch.cuda.is_available()
Building from source
For the majority of PyTorch users, installing from a pre-built binary via a package manager will provide the best experience. However, there are times when you may want to install the bleeding edge PyTorch code, whether for testing or actual development on the PyTorch core. To install the latest PyTorch code, you will need to build PyTorch from source.
You will also need to build from source if you want CUDA support.
Prerequisites
- Install Anaconda[#anaconda]
- Install CUDA, if your machine has a CUDA-enabled GPU.
- Install optional dependencies:
export CMAKE_PREFIX_PATH="$(dirname $(which conda))/../" # [anaconda root directory]
# Install basic dependencies
conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typing
conda install -c mingfeima mkldnn
# Add LAPACK support for the GPU
conda install -c pytorch magma-cuda80 # or magma-cuda90 if CUDA 9
Build
git clone --recursive https://github.com/pytorch/pytorch
cd pytorch
python setup.py install
You can verify the installation as described above.
Installing on Windows
PyTorch can be installed and used on various Windows distributions. Depending on your system and compute requirements, your experience with PyTorch on Windows may vary in terms of processing time. It is recommended, but not required, that your Windows system has an NVIDIA GPU in order to harness the full power of PyTorch’s CUDA support.
Prerequisites
Supported Windows Distributions
PyTorch is supported on the following Windows distributions:
- Windows 7 and greater; Windows 10 or greater recommended.
- Windows Server 2008 r2 and greater
The install instructions here will generally apply to all supported Windows distributions. The specific examples shown will be run on a Windows 10 Enterprise machine
Python
Currently, PyTorch on Windows only supports Python 3.x; Python 2.x is not supported.
As it is not installed by default on Windows, there are multiple ways to install Python:
If you use Anaconda to install PyTorch, it will install a sandboxed version of Python that will be used for running PyTorch applications.
If you decide to use Chocolatey, and haven’t installed Chocolatey yet, ensure that you are running your command prompt as an administrator.
For a Chocolatey-based install, run the following command in an administrative command prompt:
choco install python
Package Manager
To install the PyTorch binaries, you will need to use at least one of two supported package managers: Anaconda and pip. Anaconda is the recommended package manager as it will provide you all of the PyTorch dependencies in one, sandboxed install, including Python and pip.
Anaconda
To install Anaconda, you will use the 64-bit graphical installer for PyTorch 3.x. Click on the installer link and select Run
. Anaconda will download and the installer prompt will be presented to you. The default options are generally sane.
pip
If you installed Python by any of the recommended ways above[LINK], [pip](https://pypi.org/project/pip/)
will have already been installed for you.
Installation
Anaconda
To install PyTorch with Anaconda, you will need to open an Anaconda prompt via Start | Anaconda3 | Anaconda Prompt
.
No CUDA
To install PyTorch via Anaconda, and do not have a CUDA-capable[LINK] system or do not require CUDA, use the following conda
command.
conda install pytorch-cpu -c pytorch
pip3 install torchvision
CUDA 9.0
To install PyTorch via Anaconda, and you are using CUDA 9.0, use the following conda
command:
conda install pytorch -c pytorch
pip3 install torchvision
CUDA 8.x
conda install pytorch cuda80 -c pytorch
pip3 install torchvision
CUDA 9.2
conda install pytorch cuda92 -c pytorch
pip3 install torchvision
pip
No CUDA
To install PyTorch via pip, and do not have a CUDA-capable system or do not require CUDA, use the following command, depending on your Python version:
# Python 2.7
pip install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp27-cp27mu-linux_x86_64.whl
pip install torchvision
# if the above command does not work, then you have python 2.7 UCS2, use this command
pip install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp27-cp27m-linux_x86_64.whl
# Python 3.5
pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp35-cp35m-win_amd64.whl
pip3 install torchvision
# Python 3.6
pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-win_amd64.whl
pip3 install torchvision
# Python 3.7
pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp37-cp37m-win_amd64.whl
pip3 install torchvision
CUDA 9.0
To install PyTorch via pip, and you are using CUDA 9.0, use the following command, depending on your Python version:
# Python 3.5
pip3 install http://download.pytorch.org/whl/cu90/torch-0.4.1-cp35-cp35m-win_amd64.whl
pip3 install torchvision
# Python 3.6
pip3 install http://download.pytorch.org/whl/cu90/torch-0.4.1-cp36-cp36m-win_amd64.whl
pip3 install torchvision
# Python 3.7
pip3 install http://download.pytorch.org/whl/cu90/torch-0.4.1-cp37-cp37m-win_amd64.whl
pip3 install torchvision
`# Python 3.x`
`pip3 install torch torchvision`
`# Python 2.7`
`pip install torch torchvision `
CUDA 8.x
# Python 3.5
pip3 install http://download.pytorch.org/whl/cu80/torch-0.4.1-cp35-cp35m-win_amd64.whl
pip3 install torchvision
# Python 3.6
pip3 install http://download.pytorch.org/whl/cu80/torch-0.4.1-cp36-cp36m-win_amd64.whl
pip3 install torchvision
# Python 3.7
pip3 install http://download.pytorch.org/whl/cu80/torch-0.4.1-cp37-cp37m-win_amd64.whl
pip3 install torchvision
CUDA 9.2
# Python 3.5
pip3 install http://download.pytorch.org/whl/cu92/torch-0.4.1-cp35-cp35m-win_amd64.whl
pip3 install torchvision
# Python 3.6
pip3 install http://download.pytorch.org/whl/cu92/torch-0.4.1-cp36-cp36m-win_amd64.whl
pip3 install torchvision
# Python 3.7
pip3 install http://download.pytorch.org/whl/cu92/torch-0.4.1-cp37-cp37m-win_amd64.whl
pip3 install torchvision
Verification
To ensure that PyTorch was installed correctly, we can verify the installation by running sample PyTorch code. Here we will construct a randomly initialized tensor.
From the command line, type:
python
then enter the following code:
from __future__ import print_function
import torch
x = torch.rand(5, 3)
print(x)
The output should be something similar to:
tensor([[0.3380, 0.3845, 0.3217],
[0.8337, 0.9050, 0.2650],
[0.2979, 0.7141, 0.9069],
[0.1449, 0.1132, 0.1375],
[0.4675, 0.3947, 0.1426]])
Additionally, to check if your GPU driver and CUDA is enabled and accessible by PyTorch, run the following commands to return whether or not the CUDA driver is enabled:
import torch
torch.cuda.is_available()
Building from source
For the majority of PyTorch users, installing from a pre-built binary via a package manager will provide the best experience. However, there are times when you may want to install the bleeding edge PyTorch code, whether for testing or actual development on the PyTorch core. To install the latest PyTorch code, you will need to build PyTorch from source.
Prerequisites
- Install Anaconda
- Install CUDA, if your machine has a CUDA-enabled GPU.
- If you want to build on Windows, Visual Studio 2017 14.11 toolset and NVTX are also needed. Especially, for CUDA 8 build on Windows, there will be an additional requirement for VS 2015 Update 3 and a patch for it. The details of the patch can be found out here.
- Install optional dependencies:
conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typing
Build
git clone --recursive https://github.com/pytorch/pytorch
cd pytorchset "VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build"
set CMAKE_GENERATOR=Visual Studio 15 2017 Win64
set DISTUTILS_USE_SDK=1
REM The following two lines are needed for Python 2.7, but the support for it is very experimental.
set MSSdk=1
set FORCE_PY27_BUILD=1
REM As for CUDA 8, VS2015 Update 3 is also required to build PyTorch. Use the following two lines.
set "PREBUILD_COMMAND=%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat"
set PREBUILD_COMMAND_ARGS=x64
call "%VS150COMNTOOLS%\vcvarsall.bat" x64 -vcvars_ver=14.11
python setup.py install
You can verify the installation as described above.


Hurry Up!!! Get 50% discount on elctronics and other gadgets on this Diwali only on Shopclues.com
SALE SALE SALE..... Get special offers on top brands on Myntra
Now get fresh vegetables on FOODZO
Go check out The BIG BILLON SALE IS NOW ON!!!


Quantum vortices
Consider, if you will, a bucket of water. We can also do this with a closed bottle of water, to prevent from getting wet, but let’s assume we have a bucket. We drop a spoon/stick/paddle in there, and begin to draw a circle, stirring the water. If the item is removed, the water continues to rotate, gradually slowing down before coming to a halt. Let us now assume that the water is spinning quickly, such that a hole develops in the centre. We call this a vortex. As it rotates faster and faster, the vortex increases in size, until we rotate so fast that the water flies out over the edge of the bucket. Hopefully, you have a towel on hand.
Now, let us assume that we have a really small bucket, namely a quantum bucket. This quantum bucket, like the normal bucket, holds atoms, but very few of them in comparison. These atoms are also very cold, and form what is known as a [Bose-Einstein condensate](). Now, imagine we have a really small spoon/stick/paddle, and we once again begin to stir. What do we assume will happen?
Nothing may happen. Otherwise, something strange may happen. Both nothing, and something strange are equally interesting. What causes these two separate, yet related, cases is a (not unique) property of Bose-Einstein condensates known as superfluidity.
Let us go back to stirring our condensate. If we stir slowly enough, the condensate will remain stationary. That is to say, it will be as if we were not stirring at all. To allow it rotate, the stirring rate must be above a specific value. This is because, in a superfluid, the circulation occurs in discrete units only. That is to say, it is quantised.
Unlike a classical fluid, such as water, a condensate cannot accept a continuous range of values with which it rotates. Also, unlike a classical fluid, a superfluid in rotation will continue to rotate without slowing, provided the quantum bucket holds it in place. Beyond the critical value for rotation in a condensate a vortex will be visible. This vortex will not grow or shrink with changes around the critical value, as though a vortex in water might. However, since it does not grow, what happens with faster rotation?
Since the rotation is quantised, we could assume that beyond another specific value, the vortex might just become wider, with a circulation of 2 units, instead of just 1. This, however, is not the case (in most cases encountered). Instead of a winding 2 vortex, we obtain 2 winding 1 vortices.


Data:
https://github.com/eky/custom-element-qr-code-image
Size:
Color light:
Color dark:
Cover:
Cover size:
Error correction level:
L
M
Q
H


Welcome to the webpage of movies
This page has a list for movies
Select the types of movie of your interest.
Type
Action
Romantic
Sci-fic
Type your movie of interest
Ticket rates
10 dollars
20 dollars
Submit


This is a div containing a list of movies:
Jurassic Park
Aristocats
Oliver and Company
Homeward Bound
Balto
Anastasia
Rent
Aladdin
Clueless
Home Alone
Toggle


| file_access {fs} | R Documentation |
file_exists(path)
is a shortcut for file_access(x, "exists")
;
dir_exists(path)
and link_exists(path)
are similar but also check that
the path is a directory or link, respectively.
file_access(path, mode = "exists") file_exists(path) dir_exists(path) link_exists(path)
path |
A character vector of one or more paths. |
mode |
A character vector containing one or more of 'exists', 'read', 'write', 'execute'. |
Cross-compatibility warning: There is no executable bit on
Windows. Checking a file for mode 'execute' on Windows, e.g.
file_access(x, "execute")
will always return TRUE
.
A logical vector, with names corresponding to the input path
.
file_access("/") file_access("/", "read") file_access("/", "write") file_exists("WOMBATS")


|
UMI3D Unity SDK
2.5.b.221125
A UMI3D sdk implementation using Unity
|
DTO for hand poses More...
Public Attributes | |
| string | Name |
| Hand pose name More... | |
| bool | IsActive |
| Is the hand pose active? More... | |
| bool | isRelativeToNode |
| Does the pose occurs at a precise place relative to the node? More... | |
| bool | HoverPose |
| Is the hand pose triggered on hover? More... | |
| SerializableVector3 | RightHandPosition |
| Relative position of the right hand pose reference point to the object. More... | |
| SerializableVector3 | RightHandEulerRotation |
| Relative rotation of the right hand pose reference point to the object. More... | |
| SerializableVector3 | LeftHandPosition |
| Relative position of the left hand pose reference point to the object. More... | |
| SerializableVector3 | LeftHandEulerRotation |
| Relative rotation of the left hand pose reference point to the object. More... | |
| Dictionary< uint, SerializableVector3 > | PhalanxRotations = new Dictionary<uint, SerializableVector3>() |
| Relative rotations of the phalanxes for the hand pose. More... | |
| Public Attributes inherited from umi3d.common.AbstractEntityDto | |
| ulong | id = 0 |
| Id of the entity. More... | |
Additional Inherited Members | |
| Public Member Functions inherited from umi3d.common.UMI3DDto | |
| byte[] | ToBson (TypeNameHandling typeNameHandling=TypeNameHandling.All) |
| Should be used to serialize this object to BSON. More... | |
| string | ToJson (TypeNameHandling typeNameHandling=TypeNameHandling.All) |
| Should be used to serialize this object to JSON. More... | |
| Static Public Member Functions inherited from umi3d.common.UMI3DDto | |
| static byte[] | ToBson (UMI3DDto dto, TypeNameHandling typeNameHandling=TypeNameHandling.All) |
| Should be used to serialize UMI3D Data Transfer Object to BSON. More... | |
| static string | ToJson (UMI3DDto dto, TypeNameHandling typeNameHandling=TypeNameHandling.All) |
| Should be used to serialize UMI3D Data Transfer Object to JSON. More... | |
| static UMI3DDto | FromBson (byte[] bson, TypeNameHandling typeNameHandling=TypeNameHandling.All) |
| Should be used to deserialize a UMI3D Data Transfer Object from BSON. More... | |
| static T | FromBson< T > (byte[] bson, TypeNameHandling typeNameHandling=TypeNameHandling.All) |
| Should be used to deserialize a DTO of type T from BSON. More... | |
| static UMI3DDto | FromJson (string json) |
| Should be used to deserialize a UMI3D Data Transfer Object from JSON. More... | |
| static T | FromJson< T > (string json, TypeNameHandling typeNameHandling=TypeNameHandling.All, System.Collections.Generic.IList< JsonConverter > converters=null) |
| Should be used to deserialize a DTO of type T from JSON. More... | |
DTO for hand poses
Hand poses are predefined poses that are associated with specific interactions and constraint the hand of the avatar's skeleton. For example, grabbing a cup of tea will force the skeleton to place correctly its fingers if such a hand pose is designed.
| bool umi3d.common.userCapture.UMI3DHandPoseDto.HoverPose |
Is the hand pose triggered on hover?
| bool umi3d.common.userCapture.UMI3DHandPoseDto.IsActive |
Is the hand pose active?
| bool umi3d.common.userCapture.UMI3DHandPoseDto.isRelativeToNode |
Does the pose occurs at a precise place relative to the node?
| SerializableVector3 umi3d.common.userCapture.UMI3DHandPoseDto.LeftHandEulerRotation |
Relative rotation of the left hand pose reference point to the object.
Rotation is expressed using Euler's coordinates.
| SerializableVector3 umi3d.common.userCapture.UMI3DHandPoseDto.LeftHandPosition |
Relative position of the left hand pose reference point to the object.
| string umi3d.common.userCapture.UMI3DHandPoseDto.Name |
Hand pose name
| Dictionary<uint, SerializableVector3> umi3d.common.userCapture.UMI3DHandPoseDto.PhalanxRotations = new Dictionary<uint, SerializableVector3>() |
Relative rotations of the phalanxes for the hand pose.
| SerializableVector3 umi3d.common.userCapture.UMI3DHandPoseDto.RightHandEulerRotation |
Relative rotation of the right hand pose reference point to the object.
Rotation is expressed using Euler's coordinates.
| SerializableVector3 umi3d.common.userCapture.UMI3DHandPoseDto.RightHandPosition |
Relative position of the right hand pose reference point to the object.


Toggle navigation
RetroArcade
Home
About
Contact
Retro
Arcade
Astroids
THRUST
LEFT
RIGHT
FIRE
Arrow Keys:
move ship
Space Bar:
shoot


 An email has been sent to the administrators. You will be notified when your project has been added to
the overview.
{% endblock %}


Index of /
| Biz Kimiz
| Writeup
| Red Team
| Blue Team
[ 2019-11-15 ]
[HTB] Networked Writeup
[ 2019-11-15 ]
[HTB] Safe Writeup
[ 2019-11-15 ]
[HTB] Bitlab Writeup
[ 2019-11-16 ]
[HTB] Postman Writeup


|
Games Task Scheduler (GTS)
A multi-processor scheduling framework for games engines
|
Macros | |
| #define | GTS_MEMORY_ORDER_RELAXED #error "Replace with custom definition" |
| #define | GTS_MEMORY_ORDER_CONSUME #error "Replace with custom definition" |
| #define | GTS_MEMORY_ORDER_ACQUIRE #error "Replace with custom definition" |
| #define | GTS_MEMORY_ORDER_RELEASE #error "Replace with custom definition" |
| #define | GTS_MEMORY_ORDER_ACQ_REL #error "Replace with custom definition" |
| #define | GTS_MEMORY_ORDER_SEQ_CST #error "Replace with custom definition" |
| #define | GTS_ATOMIC_TYPE #error "Replace with custom definition" |
| An atomic type to be used as GTS_ATOMIC_TYPE<T> | |
| #define | GTS_ATOMIC_LOAD(a, memoryOrder) #error "Replace with custom definition" |
| Atomically loads the contents of a with the specified memory order. More... | |
| #define | GTS_ATOMIC_STORE(a, value, memoryOrder) #error "Replace with custom definition" |
| #define | GTS_ATOMIC_FETCH_ADD(a, inc, memoryOrder) #error "Replace with custom definition" |
| Atomically adds addend to a with the specified memory order. More... | |
| #define | GTS_ATOMIC_FETCH_AND(a, rhs, memoryOrder) #error "Replace with custom definition" |
| Atomically ANDs rhs to a with the specified memory order. More... | |
| #define | GTS_ATOMIC_FETCH_OR(a, rhs, memoryOrder) #error "Replace with custom definition" |
| #define | GTS_ATOMIC_EXCHANGE(a, value, memoryOrder) #error "Replace with custom definition" |
| #define | GTS_ATOMIC_COMPARE_EXCHANGE_WEAK(a, expected, value, xchgMemoryOrder, loadMemoryOrder) #error "Replace with custom definition" |
| Atomically compares a with expected and stores value in a if a==expected with xchgMemoryOrder, otheriwse stores value in expected with loadMemoryOrder. Weak implies the compare may spuriously fail. More... | |
| #define | GTS_ATOMIC_COMPARE_EXCHANGE_STRONG(a, expected, value, xchgMemoryOrder, loadMemoryOrder) #error "Replace with custom definition" |
User defined wrappers for the atomics API.
| #define GTS_ATOMIC_COMPARE_EXCHANGE_WEAK | ( | a, | |
| expected, | |||
| value, | |||
| xchgMemoryOrder, | |||
| loadMemoryOrder | |||
| ) | #error "Replace with custom definition" |
Atomically compares a with expected and stores value in a if a==expected with xchgMemoryOrder, otheriwse stores value in expected with loadMemoryOrder. Weak implies the compare may spuriously fail.
Atomically compares a with expected and stores value in a if a==expected with xchgMemoryOrder, otheriwse stores value in expected with loadMemoryOrder.
| #define GTS_ATOMIC_FETCH_ADD | ( | a, | |
| inc, | |||
| memoryOrder | |||
| ) | #error "Replace with custom definition" |
Atomically adds addend to a with the specified memory order.
| #define GTS_ATOMIC_FETCH_AND | ( | a, | |
| rhs, | |||
| memoryOrder | |||
| ) | #error "Replace with custom definition" |
Atomically ANDs rhs to a with the specified memory order.
Atomically exchanges rhs and a with the specified memory order.
Atomically ORs rhs and a with the specified memory order.
| #define GTS_ATOMIC_LOAD | ( | a, | |
| memoryOrder | |||
| ) | #error "Replace with custom definition" |
Atomically loads the contents of a with the specified memory order.
Atomically stores value into a with the specified memory order.


Powerful mobile-first front-end framework - Superawesome is fully responsive, HTML5 & CSS3 valid code, retina ready and much more. Latest technologies, always up-to-date and compatible with latest desktop and mobile browsers down to IE8. Global CSS settings, fundamental HTML elements styled and enhanced with extensible classes and an advanced grid system.
Fully responsive down to small phone screen. Superawesome responds to the device that accesses it and delivers the appropriate output - for it uses responsive design.
Retina Ready - Ultra sharp graphics. Makes it easy to serve high-resolution images, Syndicate looks beautiful on retina displays.
Support via forum - we have forum for our buyers where you can report issues and find answers. If you have some pre-sale questions you can always contact us via form on our ThemeForest profile.
Don't worry we've got you covered! Grab a cup of coffee and let us jump in. We also do small customization for free via our support forum. It's free and always will be.
If you are familiar with CSS, you already know the style attribute. In order to create an animation you would need several, at least two, of them. Yes, it's that easy... On scroll you can do with element anything you want.
Tons of Components - Add any, fast and easy. Dozens of reusable components built to provide dropdowns, navigation, alerts, popovers and much more.
Well Documented - we have explained how to edit every element for your needs. All packed in one nice document that comes with download. To help you when customizing Syndicate, HTML and CSS files are commented. No Bugs, Superawesome is tested on different devices, browsers and operating systems. If you find one, the beer is on us.
I don't care that they stole my idea... I care that they don't have any of their own.
Nikola Tesla, Serbian inventor
There are no secrets to success. It is the result of preparation, hard work, and learning from failure.
Colin Powell, American statesman
If there is anything that a man can do well, I say let him do it. Give him a chance.
Abraham Lincoln, President of the United States


Voting Informed Homepage About Us Visit our about page. See Step 1. Step 1 See Step 2. Step 2 See Step 3. Step 3


Toggle navigation
BestHaskell
Toggle Dropdown
total
last 1 week
new packages
active packages
Licenses
Maintainers
Categories
API
best haskell is dead. because /packages/downloads hackage api requires auth.


This demonstrates the usage of the d.velop IdentityProvider (IdP)
User Id
{{.UserId}}
User Name
{{.UserName}}


@()(implicit request: RequestHeader) @import common.commercial.HostedPage @import conf.Static @main(HostedPage) { } {
Advertiser content
Who better to dream up the cars of tomorrow than the people who'll be buying them? Students at Central St Martins are working with Renault to design the interior for cars that will drive themselves. Watch this short video to find out more about the project, and visit this page again soon to catch up on the students' progress.


Thanks for visiting! This is a page to simply show any of my work that I feel is worth sharing, hoping to inspire. All photos are available for high quality printing and home-delivery or high quality download by just clicking... and following the instructions. Any income will go towards gear which will improve my chances to inspire. You can also help by sharing our website. All support is highly appreciated! Nicklas Tolonen
"Creativity is contagious, pass it on" – Albert Einstein