|
libevent
|
Go to the source code of this file.
Data Structures | |
| struct | bufferevent |
| An opaque type for handling buffered IO. More... | |
Macros | |
| #define | EV_RATE_LIMIT_MAX EV_SSIZE_MAX |
| Maximum configurable rate- or burst-limit. | |
Bufferevent event codes | |
These flags are passed as arguments to a bufferevent's event callback. | |
| #define | BEV_EVENT_CONNECTED 0x80 |
| connect operation finished. | |
| #define | BEV_EVENT_EOF 0x10 |
| eof file reached | |
| #define | BEV_EVENT_ERROR 0x20 |
| unrecoverable error encountered | |
| #define | BEV_EVENT_READING 0x01 |
| error encountered while reading | |
| #define | BEV_EVENT_TIMEOUT 0x40 |
| user-specified timeout reached | |
| #define | BEV_EVENT_WRITING 0x02 |
| error encountered while writing | |
Typedefs | |
| typedef void(* | bufferevent_data_cb) (struct bufferevent *bev, void *ctx) |
| A read or write callback for a bufferevent. More... | |
| typedef void(* | bufferevent_event_cb) (struct bufferevent *bev, short what, void *ctx) |
| An event/error callback for a bufferevent. More... | |
Enumerations | |
| enum | bufferevent_flush_mode { BEV_NORMAL = 0, BEV_FLUSH = 1, BEV_FINISHED = 2 } |
| Flags that can be passed into filters to let them know how to deal with the incoming data. More... | |
| enum | bufferevent_options { BEV_OPT_CLOSE_ON_FREE = (1<<0), BEV_OPT_THREADSAFE = (1<<1), BEV_OPT_DEFER_CALLBACKS = (1<<2), BEV_OPT_UNLOCK_CALLBACKS = (1<<3) } |
| Options that can be specified when creating a bufferevent. More... | |
| enum | bufferevent_trigger_options { BEV_TRIG_IGNORE_WATERMARKS = (1<<16), BEV_TRIG_DEFER_CALLBACKS = BEV_OPT_DEFER_CALLBACKS } |
| Flags for bufferevent_trigger(_event) that modify when and how to trigger the callback. More... | |
Functions | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_add_to_rate_limit_group (struct bufferevent *bev, struct bufferevent_rate_limit_group *g) |
| Add 'bev' to the list of bufferevents whose aggregate reading and writing is restricted by 'g'. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_base_set (struct event_base *base, struct bufferevent *bufev) |
| Assign a bufferevent to a specific event_base. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_decref (struct bufferevent *bufev) |
| Public interface to manually decrement the reference count of a bufferevent. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_disable (struct bufferevent *bufev, short event) |
| Disable a bufferevent. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_enable (struct bufferevent *bufev, short event) |
| Enable a bufferevent. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_flush (struct bufferevent *bufev, short iotype, enum bufferevent_flush_mode mode) |
| Triggers the bufferevent to produce more data if possible. More... | |
| EVENT2_EXPORT_SYMBOL void | bufferevent_free (struct bufferevent *bufev) |
| Deallocate the storage associated with a bufferevent structure. More... | |
| EVENT2_EXPORT_SYMBOL struct event_base * | bufferevent_get_base (struct bufferevent *bev) |
| Return the event_base used by a bufferevent. | |
| EVENT2_EXPORT_SYMBOL short | bufferevent_get_enabled (struct bufferevent *bufev) |
| Return the events that are enabled on a given bufferevent. More... | |
| EVENT2_EXPORT_SYMBOL struct evbuffer * | bufferevent_get_input (struct bufferevent *bufev) |
| Returns the input buffer. More... | |
| EVENT2_EXPORT_SYMBOL ev_ssize_t | bufferevent_get_max_single_read (struct bufferevent *bev) |
| Get the current size limit for single read operation. | |
| EVENT2_EXPORT_SYMBOL ev_ssize_t | bufferevent_get_max_single_write (struct bufferevent *bev) |
| Get the current size limit for single write operation. | |
| EVENT2_EXPORT_SYMBOL struct evbuffer * | bufferevent_get_output (struct bufferevent *bufev) |
| Returns the output buffer. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_get_priority (const struct bufferevent *bufev) |
| Return the priority of a bufferevent. More... | |
| EVENT2_EXPORT_SYMBOL struct bufferevent * | bufferevent_get_underlying (struct bufferevent *bufev) |
| Returns the underlying bufferevent associated with a bufferevent (if the bufferevent is a wrapper), or NULL if there is no underlying bufferevent. | |
| EVENT2_EXPORT_SYMBOL void | bufferevent_getcb (struct bufferevent *bufev, bufferevent_data_cb *readcb_ptr, bufferevent_data_cb *writecb_ptr, bufferevent_event_cb *eventcb_ptr, void **cbarg_ptr) |
| Retrieves the callbacks for a bufferevent. More... | |
| EVENT2_EXPORT_SYMBOL evutil_socket_t | bufferevent_getfd (struct bufferevent *bufev) |
| Returns the file descriptor associated with a bufferevent, or -1 if no file descriptor is associated with the bufferevent. | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_getwatermark (struct bufferevent *bufev, short events, size_t *lowmark, size_t *highmark) |
| Retrieves the watermarks for read or write events. More... | |
| EVENT2_EXPORT_SYMBOL void | bufferevent_incref (struct bufferevent *bufev) |
| Public interface to manually increase the reference count of a bufferevent this is useful in situations where a user may reference the bufferevent somewhere else (unknown to libevent) More... | |
| EVENT2_EXPORT_SYMBOL void | bufferevent_lock (struct bufferevent *bufev) |
| Acquire the lock on a bufferevent. More... | |
| EVENT2_EXPORT_SYMBOL struct bufferevent * | bufferevent_pair_get_partner (struct bufferevent *bev) |
| Given one bufferevent returned by bufferevent_pair_new(), returns the other one if it still exists. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_pair_new (struct event_base *base, int options, struct bufferevent *pair[2]) |
| Allocate a pair of linked bufferevents. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_priority_set (struct bufferevent *bufev, int pri) |
| Assign a priority to a bufferevent. More... | |
| EVENT2_EXPORT_SYMBOL void | bufferevent_rate_limit_group_free (struct bufferevent_rate_limit_group *) |
| Free a rate-limiting group. More... | |
| EVENT2_EXPORT_SYMBOL struct bufferevent_rate_limit_group * | bufferevent_rate_limit_group_new (struct event_base *base, const struct ev_token_bucket_cfg *cfg) |
| Create a new rate-limit group for bufferevents. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_rate_limit_group_set_cfg (struct bufferevent_rate_limit_group *, const struct ev_token_bucket_cfg *) |
| Change the rate-limiting settings for a given rate-limiting group. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_rate_limit_group_set_min_share (struct bufferevent_rate_limit_group *, size_t) |
| Change the smallest quantum we're willing to allocate to any single bufferevent in a group for reading or writing at a time. More... | |
| EVENT2_EXPORT_SYMBOL size_t | bufferevent_read (struct bufferevent *bufev, void *data, size_t size) |
| Read data from a bufferevent buffer. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_read_buffer (struct bufferevent *bufev, struct evbuffer *buf) |
| Read data from a bufferevent buffer into an evbuffer. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_remove_from_rate_limit_group (struct bufferevent *bev) |
| Remove 'bev' from its current rate-limit group (if any). | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_set_max_single_read (struct bufferevent *bev, size_t size) |
| Set the size limit for single read operation. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_set_max_single_write (struct bufferevent *bev, size_t size) |
| Set the size limit for single write operation. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_set_rate_limit (struct bufferevent *bev, struct ev_token_bucket_cfg *cfg) |
| Set the rate-limit of a the bufferevent 'bev' to the one specified in 'cfg'. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_set_timeouts (struct bufferevent *bufev, const struct timeval *timeout_read, const struct timeval *timeout_write) |
| Set the read and write timeout for a bufferevent. More... | |
| EVENT2_EXPORT_SYMBOL void | bufferevent_setcb (struct bufferevent *bufev, bufferevent_data_cb readcb, bufferevent_data_cb writecb, bufferevent_event_cb eventcb, void *cbarg) |
| Changes the callbacks for a bufferevent. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_setfd (struct bufferevent *bufev, evutil_socket_t fd) |
| Changes the file descriptor on which the bufferevent operates. More... | |
| EVENT2_EXPORT_SYMBOL void | bufferevent_setwatermark (struct bufferevent *bufev, short events, size_t lowmark, size_t highmark) |
| Sets the watermarks for read and write events. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_socket_connect (struct bufferevent *, const struct sockaddr *, int) |
| Launch a connect() attempt with a socket-based bufferevent. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_socket_connect_hostname (struct bufferevent *, struct evdns_base *, int, const char *, int) |
| Resolve the hostname 'hostname' and connect to it as with bufferevent_socket_connect(). More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_socket_get_dns_error (struct bufferevent *bev) |
| Return the error code for the last failed DNS lookup attempt made by bufferevent_socket_connect_hostname(). More... | |
| EVENT2_EXPORT_SYMBOL struct bufferevent * | bufferevent_socket_new (struct event_base *base, evutil_socket_t fd, int options) |
| Create a new socket bufferevent over an existing socket. More... | |
| EVENT2_EXPORT_SYMBOL void | bufferevent_trigger (struct bufferevent *bufev, short iotype, int options) |
| Triggers bufferevent data callbacks. More... | |
| EVENT2_EXPORT_SYMBOL void | bufferevent_trigger_event (struct bufferevent *bufev, short what, int options) |
| Triggers the bufferevent event callback. More... | |
| EVENT2_EXPORT_SYMBOL void | bufferevent_unlock (struct bufferevent *bufev) |
| Release the lock on a bufferevent. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_write (struct bufferevent *bufev, const void *data, size_t size) |
| Write data to a bufferevent buffer. More... | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_write_buffer (struct bufferevent *bufev, struct evbuffer *buf) |
| Write data from an evbuffer to a bufferevent buffer. More... | |
| EVENT2_EXPORT_SYMBOL void | ev_token_bucket_cfg_free (struct ev_token_bucket_cfg *cfg) |
| Free all storage held in 'cfg'. More... | |
| EVENT2_EXPORT_SYMBOL struct ev_token_bucket_cfg * | ev_token_bucket_cfg_new (size_t read_rate, size_t read_burst, size_t write_rate, size_t write_burst, const struct timeval *tick_len) |
| Initialize and return a new object to configure the rate-limiting behavior of bufferevents. More... | |
Rate limit inspection | |
Return the current read or write bucket size for a bufferevent. If it is not configured with a per-bufferevent ratelimit, return EV_SSIZE_MAX. This function does not inspect the group limit, if any. Note that it can return a negative value if the bufferevent has been made to read or write more than its limit. | |
| EVENT2_EXPORT_SYMBOL ev_ssize_t | bufferevent_get_max_to_read (struct bufferevent *bev) |
| EVENT2_EXPORT_SYMBOL ev_ssize_t | bufferevent_get_max_to_write (struct bufferevent *bev) |
| EVENT2_EXPORT_SYMBOL ev_ssize_t | bufferevent_get_read_limit (struct bufferevent *bev) |
| EVENT2_EXPORT_SYMBOL const struct ev_token_bucket_cfg * | bufferevent_get_token_bucket_cfg (const struct bufferevent *bev) |
| EVENT2_EXPORT_SYMBOL ev_ssize_t | bufferevent_get_write_limit (struct bufferevent *bev) |
Group Rate limit inspection | |
Return the read or write bucket size for a bufferevent rate limit group. Note that it can return a negative value if bufferevents in the group have been made to read or write more than their limits. | |
| EVENT2_EXPORT_SYMBOL ev_ssize_t | bufferevent_rate_limit_group_get_read_limit (struct bufferevent_rate_limit_group *) |
| EVENT2_EXPORT_SYMBOL ev_ssize_t | bufferevent_rate_limit_group_get_write_limit (struct bufferevent_rate_limit_group *) |
Rate limit manipulation | |
Subtract a number of bytes from a bufferevent's read or write bucket. The decrement value can be negative, if you want to manually refill the bucket. If the change puts the bucket above or below zero, the bufferevent will resume or suspend reading writing as appropriate. These functions make no change in the buckets for the bufferevent's group, if any. Returns 0 on success, -1 on internal error. | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_decrement_read_limit (struct bufferevent *bev, ev_ssize_t decr) |
| EVENT2_EXPORT_SYMBOL int | bufferevent_decrement_write_limit (struct bufferevent *bev, ev_ssize_t decr) |
Group rate limit manipulation | |
Subtract a number of bytes from a bufferevent rate-limiting group's read or write bucket. The decrement value can be negative, if you want to manually refill the bucket. If the change puts the bucket above or below zero, the bufferevents in the group will resume or suspend reading writing as appropriate. Returns 0 on success, -1 on internal error. | |
| EVENT2_EXPORT_SYMBOL int | bufferevent_rate_limit_group_decrement_read (struct bufferevent_rate_limit_group *, ev_ssize_t) |
| EVENT2_EXPORT_SYMBOL int | bufferevent_rate_limit_group_decrement_write (struct bufferevent_rate_limit_group *, ev_ssize_t) |
| EVENT2_EXPORT_SYMBOL void | bufferevent_rate_limit_group_get_totals (struct bufferevent_rate_limit_group *grp, ev_uint64_t *total_read_out, ev_uint64_t *total_written_out) |
| Inspect the total bytes read/written on a group. More... | |
| EVENT2_EXPORT_SYMBOL void | bufferevent_rate_limit_group_reset_totals (struct bufferevent_rate_limit_group *grp) |
| Reset the total bytes read/written on a group. More... | |
Filtering support | |
| typedef enum bufferevent_filter_result(* | bufferevent_filter_cb) (struct evbuffer *src, struct evbuffer *dst, ev_ssize_t dst_limit, enum bufferevent_flush_mode mode, void *ctx) |
| A callback function to implement a filter for a bufferevent. More... | |
| EVENT2_EXPORT_SYMBOL struct bufferevent * | bufferevent_filter_new (struct bufferevent *underlying, bufferevent_filter_cb input_filter, bufferevent_filter_cb output_filter, int options, void(*free_context)(void *), void *ctx) |
| Allocate a new filtering bufferevent on top of an existing bufferevent. More... | |
| enum | bufferevent_filter_result { BEV_OK = 0, BEV_NEED_MORE = 1, BEV_ERROR = 2 } |
| Values that filters can return. More... | |
Functions for buffering data for network sending or receiving. Bufferevents are higher level than evbuffers: each has an underlying evbuffer for reading and one for writing, and callbacks that are invoked under certain circumstances.
A bufferevent provides input and output buffers that get filled and drained automatically. The user of a bufferevent no longer deals directly with the I/O, but instead is reading from input and writing to output buffers.
Once initialized, the bufferevent structure can be used repeatedly with bufferevent_enable() and bufferevent_disable().
When reading is enabled, the bufferevent will try to read from the file descriptor onto its input buffer, and call the read callback. When writing is enabled, the bufferevent will try to write data onto its file descriptor when the output buffer has enough data, and call the write callback when the output buffer is sufficiently drained.
Bufferevents come in several flavors, including:
A bufferevent that reads and writes data onto a network socket. Created with bufferevent_socket_new().
A pair of bufferevents that send and receive data to one another without touching the network. Created with bufferevent_pair_new().
A bufferevent that transforms data, and sends or receives it over another underlying bufferevent. Created with bufferevent_filter_new().
| typedef void(* bufferevent_data_cb) (struct bufferevent *bev, void *ctx) |
A read or write callback for a bufferevent.
The read callback is triggered when new data arrives in the input buffer and the amount of readable data exceed the low watermark which is 0 by default.
The write callback is triggered if the write buffer has been exhausted or fell below its low watermark.
| bev | the bufferevent that triggered the callback |
| ctx | the user-specified context for this bufferevent |
| typedef void(* bufferevent_event_cb) (struct bufferevent *bev, short what, void *ctx) |
An event/error callback for a bufferevent.
The event callback is triggered if either an EOF condition or another unrecoverable error was encountered.
For bufferevents with deferred callbacks, this is a bitwise OR of all errors that have happened on the bufferevent since the last callback invocation.
| bev | the bufferevent for which the error condition was reached |
| what | a conjunction of flags: BEV_EVENT_READING or BEV_EVENT_WRITING to indicate if the error was encountered on the read or write path, and one of the following flags: BEV_EVENT_EOF, BEV_EVENT_ERROR, BEV_EVENT_TIMEOUT, BEV_EVENT_CONNECTED. |
| ctx | the user-specified context for this bufferevent |
| typedef enum bufferevent_filter_result(* bufferevent_filter_cb) (struct evbuffer *src, struct evbuffer *dst, ev_ssize_t dst_limit, enum bufferevent_flush_mode mode, void *ctx) |
A callback function to implement a filter for a bufferevent.
| src | An evbuffer to drain data from. |
| dst | An evbuffer to add data to. |
| limit | A suggested upper bound of bytes to write to dst. The filter may ignore this value, but doing so means that it will overflow the high-water mark associated with dst. -1 means "no limit". |
| mode | Whether we should write data as may be convenient (BEV_NORMAL), or flush as much data as we can (BEV_FLUSH), or flush as much as we can, possibly including an end-of-stream marker (BEV_FINISH). |
| ctx | A user-supplied pointer. |
| enum bufferevent_options |
Options that can be specified when creating a bufferevent.
| EVENT2_EXPORT_SYMBOL int bufferevent_add_to_rate_limit_group | ( | struct bufferevent * | bev, |
| struct bufferevent_rate_limit_group * | g | ||
| ) |
Add 'bev' to the list of bufferevents whose aggregate reading and writing is restricted by 'g'.
If 'g' is NULL, remove 'bev' from its current group.
A bufferevent may belong to no more than one rate-limit group at a time. If 'bev' is already a member of a group, it will be removed from its old group before being added to 'g'.
Return 0 on success and -1 on failure.
| EVENT2_EXPORT_SYMBOL int bufferevent_base_set | ( | struct event_base * | base, |
| struct bufferevent * | bufev | ||
| ) |
Assign a bufferevent to a specific event_base.
NOTE that only socket bufferevents support this function.
| base | an event_base returned by event_init() |
| bufev | a bufferevent struct returned by bufferevent_new() or bufferevent_socket_new() |
| EVENT2_EXPORT_SYMBOL int bufferevent_decref | ( | struct bufferevent * | bufev | ) |
Public interface to manually decrement the reference count of a bufferevent.
Warning: make sure you know what you're doing. This is mainly used in conjunction with bufferevent_incref(). This will free up all data associated with a bufferevent if the reference count hits 0.
| bufev | the bufferevent to decrement the refcount on |
| EVENT2_EXPORT_SYMBOL int bufferevent_disable | ( | struct bufferevent * | bufev, |
| short | event | ||
| ) |
Disable a bufferevent.
| bufev | the bufferevent to be disabled |
| event | any combination of EV_READ | EV_WRITE. |
| EVENT2_EXPORT_SYMBOL int bufferevent_enable | ( | struct bufferevent * | bufev, |
| short | event | ||
| ) |
Enable a bufferevent.
| bufev | the bufferevent to be enabled |
| event | any combination of EV_READ | EV_WRITE. |
| EVENT2_EXPORT_SYMBOL struct bufferevent* bufferevent_filter_new | ( | struct bufferevent * | underlying, |
| bufferevent_filter_cb | input_filter, | ||
| bufferevent_filter_cb | output_filter, | ||
| int | options, | ||
| void(*)(void *) | free_context, | ||
| void * | ctx | ||
| ) |
Allocate a new filtering bufferevent on top of an existing bufferevent.
| underlying | the underlying bufferevent. |
| input_filter | The filter to apply to data we read from the underlying bufferevent |
| output_filter | The filer to apply to data we write to the underlying bufferevent |
| options | A bitfield of bufferevent options. |
| free_context | A function to use to free the filter context when this bufferevent is freed. |
| ctx | A context pointer to pass to the filter functions. |
| EVENT2_EXPORT_SYMBOL int bufferevent_flush | ( | struct bufferevent * | bufev, |
| short | iotype, | ||
| enum bufferevent_flush_mode | mode | ||
| ) |
Triggers the bufferevent to produce more data if possible.
| bufev | the bufferevent object |
| iotype | either EV_READ or EV_WRITE or both. |
| mode | either BEV_NORMAL or BEV_FLUSH or BEV_FINISHED |
| EVENT2_EXPORT_SYMBOL void bufferevent_free | ( | struct bufferevent * | bufev | ) |
Deallocate the storage associated with a bufferevent structure.
If there is pending data to write on the bufferevent, it probably won't be flushed before the bufferevent is freed.
| bufev | the bufferevent structure to be freed. |
| EVENT2_EXPORT_SYMBOL short bufferevent_get_enabled | ( | struct bufferevent * | bufev | ) |
Return the events that are enabled on a given bufferevent.
| bufev | the bufferevent to inspect |
| EVENT2_EXPORT_SYMBOL struct evbuffer* bufferevent_get_input | ( | struct bufferevent * | bufev | ) |
Returns the input buffer.
The user MUST NOT set the callback on this buffer.
| bufev | the bufferevent from which to get the evbuffer |
| EVENT2_EXPORT_SYMBOL struct evbuffer* bufferevent_get_output | ( | struct bufferevent * | bufev | ) |
Returns the output buffer.
The user MUST NOT set the callback on this buffer.
When filters are being used, the filters need to be manually triggered if the output buffer was manipulated.
| bufev | the bufferevent from which to get the evbuffer |
| EVENT2_EXPORT_SYMBOL int bufferevent_get_priority | ( | const struct bufferevent * | bufev | ) |
Return the priority of a bufferevent.
Only supported for socket bufferevents
| EVENT2_EXPORT_SYMBOL void bufferevent_getcb | ( | struct bufferevent * | bufev, |
| bufferevent_data_cb * | readcb_ptr, | ||
| bufferevent_data_cb * | writecb_ptr, | ||
| bufferevent_event_cb * | eventcb_ptr, | ||
| void ** | cbarg_ptr | ||
| ) |
Retrieves the callbacks for a bufferevent.
| bufev | the bufferevent to examine. |
| readcb_ptr | if readcb_ptr is nonnull, *readcb_ptr is set to the current read callback for the bufferevent. |
| writecb_ptr | if writecb_ptr is nonnull, *writecb_ptr is set to the current write callback for the bufferevent. |
| eventcb_ptr | if eventcb_ptr is nonnull, *eventcb_ptr is set to the current event callback for the bufferevent. |
| cbarg_ptr | if cbarg_ptr is nonnull, *cbarg_ptr is set to the current callback argument for the bufferevent. |
| EVENT2_EXPORT_SYMBOL int bufferevent_getwatermark | ( | struct bufferevent * | bufev, |
| short | events, | ||
| size_t * | lowmark, | ||
| size_t * | highmark | ||
| ) |
Retrieves the watermarks for read or write events.
Returns non-zero if events contains not only EV_READ or EV_WRITE. Returns zero if events equal EV_READ or EV_WRITE
| bufev | the bufferevent to be examined |
| events | EV_READ or EV_WRITE |
| lowmark | receives the lower watermark if not NULL |
| highmark | receives the high watermark if not NULL |
| EVENT2_EXPORT_SYMBOL void bufferevent_incref | ( | struct bufferevent * | bufev | ) |
Public interface to manually increase the reference count of a bufferevent this is useful in situations where a user may reference the bufferevent somewhere else (unknown to libevent)
| bufev | the bufferevent to increase the refcount on |
| EVENT2_EXPORT_SYMBOL void bufferevent_lock | ( | struct bufferevent * | bufev | ) |
Acquire the lock on a bufferevent.
Has no effect if locking was not enabled with BEV_OPT_THREADSAFE.
| EVENT2_EXPORT_SYMBOL struct bufferevent* bufferevent_pair_get_partner | ( | struct bufferevent * | bev | ) |
Given one bufferevent returned by bufferevent_pair_new(), returns the other one if it still exists.
Otherwise returns NULL.
| EVENT2_EXPORT_SYMBOL int bufferevent_pair_new | ( | struct event_base * | base, |
| int | options, | ||
| struct bufferevent * | pair[2] | ||
| ) |
Allocate a pair of linked bufferevents.
The bufferevents behave as would two bufferevent_sock instances connected to opposite ends of a socketpair(), except that no internal socketpair is allocated.
| base | The event base to associate with the socketpair. |
| options | A set of options for this bufferevent |
| pair | A pointer to an array to hold the two new bufferevent objects. |
| EVENT2_EXPORT_SYMBOL int bufferevent_priority_set | ( | struct bufferevent * | bufev, |
| int | pri | ||
| ) |
Assign a priority to a bufferevent.
Only supported for socket bufferevents.
| bufev | a bufferevent struct |
| pri | the priority to be assigned |
| EVENT2_EXPORT_SYMBOL void bufferevent_rate_limit_group_free | ( | struct bufferevent_rate_limit_group * | ) |
Free a rate-limiting group.
The group must have no members when this function is called.
| EVENT2_EXPORT_SYMBOL void bufferevent_rate_limit_group_get_totals | ( | struct bufferevent_rate_limit_group * | grp, |
| ev_uint64_t * | total_read_out, | ||
| ev_uint64_t * | total_written_out | ||
| ) |
Inspect the total bytes read/written on a group.
Set the variable pointed to by total_read_out to the total number of bytes ever read on grp, and the variable pointed to by total_written_out to the total number of bytes ever written on grp.
| EVENT2_EXPORT_SYMBOL struct bufferevent_rate_limit_group* bufferevent_rate_limit_group_new | ( | struct event_base * | base, |
| const struct ev_token_bucket_cfg * | cfg | ||
| ) |
Create a new rate-limit group for bufferevents.
A rate-limit group constrains the maximum number of bytes sent and received, in toto, by all of its bufferevents.
| base | An event_base to run any necessary timeouts for the group. Note that all bufferevents in the group do not necessarily need to share this event_base. |
| cfg | The rate-limit for this group. |
Note that all rate-limits hare are currently best-effort: future versions of Libevent may implement them more tightly.
Note also that only some bufferevent types currently respect rate-limiting. They are: socket-based bufferevents (normal and IOCP-based), and SSL-based bufferevents.
| EVENT2_EXPORT_SYMBOL void bufferevent_rate_limit_group_reset_totals | ( | struct bufferevent_rate_limit_group * | grp | ) |
Reset the total bytes read/written on a group.
Reset the number of bytes read or written on grp as given by bufferevent_rate_limit_group_reset_totals().
| EVENT2_EXPORT_SYMBOL int bufferevent_rate_limit_group_set_cfg | ( | struct bufferevent_rate_limit_group * | , |
| const struct ev_token_bucket_cfg * | |||
| ) |
Change the rate-limiting settings for a given rate-limiting group.
Return 0 on success, -1 on failure.
| EVENT2_EXPORT_SYMBOL int bufferevent_rate_limit_group_set_min_share | ( | struct bufferevent_rate_limit_group * | , |
| size_t | |||
| ) |
Change the smallest quantum we're willing to allocate to any single bufferevent in a group for reading or writing at a time.
The rationale is that, because of TCP/IP protocol overheads and kernel behavior, if a rate-limiting group is so tight on bandwidth that you're only willing to send 1 byte per tick per bufferevent, you might instead want to batch up the reads and writes so that you send N bytes per 1/N of the bufferevents (chosen at random) each tick, so you still wind up send 1 byte per tick per bufferevent on average, but you don't send so many tiny packets.
The default min-share is currently 64 bytes.
Returns 0 on success, -1 on failure.
| EVENT2_EXPORT_SYMBOL size_t bufferevent_read | ( | struct bufferevent * | bufev, |
| void * | data, | ||
| size_t | size | ||
| ) |
Read data from a bufferevent buffer.
The bufferevent_read() function is used to read data from the input buffer.
| bufev | the bufferevent to be read from |
| data | pointer to a buffer that will store the data |
| size | the size of the data buffer, in bytes |
| EVENT2_EXPORT_SYMBOL int bufferevent_read_buffer | ( | struct bufferevent * | bufev, |
| struct evbuffer * | buf | ||
| ) |
Read data from a bufferevent buffer into an evbuffer.
This avoids memory copies.
| bufev | the bufferevent to be read from |
| buf | the evbuffer to which to add data |
| EVENT2_EXPORT_SYMBOL int bufferevent_set_max_single_read | ( | struct bufferevent * | bev, |
| size_t | size | ||
| ) |
Set the size limit for single read operation.
Set to 0 for a reasonable default.
Return 0 on success and -1 on failure.
| EVENT2_EXPORT_SYMBOL int bufferevent_set_max_single_write | ( | struct bufferevent * | bev, |
| size_t | size | ||
| ) |
Set the size limit for single write operation.
Set to 0 for a reasonable default.
Return 0 on success and -1 on failure.
| EVENT2_EXPORT_SYMBOL int bufferevent_set_rate_limit | ( | struct bufferevent * | bev, |
| struct ev_token_bucket_cfg * | cfg | ||
| ) |
Set the rate-limit of a the bufferevent 'bev' to the one specified in 'cfg'.
If 'cfg' is NULL, disable any per-bufferevent rate-limiting on 'bev'.
Note that only some bufferevent types currently respect rate-limiting. They are: socket-based bufferevents (normal and IOCP-based), and SSL-based bufferevents.
Return 0 on success, -1 on failure.
| EVENT2_EXPORT_SYMBOL int bufferevent_set_timeouts | ( | struct bufferevent * | bufev, |
| const struct timeval * | timeout_read, | ||
| const struct timeval * | timeout_write | ||
| ) |
Set the read and write timeout for a bufferevent.
A bufferevent's timeout will fire the first time that the indicated amount of time has elapsed since a successful read or write operation, during which the bufferevent was trying to read or write.
(In other words, if reading or writing is disabled, or if the bufferevent's read or write operation has been suspended because there's no data to write, or not enough bandwidth, or so on, the timeout isn't active. The timeout only becomes active when we we're willing to actually read or write.)
Calling bufferevent_enable or setting a timeout for a bufferevent whose timeout is already pending resets its timeout.
If the timeout elapses, the corresponding operation (EV_READ or EV_WRITE) becomes disabled until you re-enable it again. The bufferevent's event callback is called with the BEV_EVENT_TIMEOUT|BEV_EVENT_READING or BEV_EVENT_TIMEOUT|BEV_EVENT_WRITING.
| bufev | the bufferevent to be modified |
| timeout_read | the read timeout, or NULL |
| timeout_write | the write timeout, or NULL |
| EVENT2_EXPORT_SYMBOL void bufferevent_setcb | ( | struct bufferevent * | bufev, |
| bufferevent_data_cb | readcb, | ||
| bufferevent_data_cb | writecb, | ||
| bufferevent_event_cb | eventcb, | ||
| void * | cbarg | ||
| ) |
Changes the callbacks for a bufferevent.
| bufev | the bufferevent object for which to change callbacks |
| readcb | callback to invoke when there is data to be read, or NULL if no callback is desired |
| writecb | callback to invoke when the file descriptor is ready for writing, or NULL if no callback is desired |
| eventcb | callback to invoke when there is an event on the file descriptor |
| cbarg | an argument that will be supplied to each of the callbacks (readcb, writecb, and errorcb) |
| EVENT2_EXPORT_SYMBOL int bufferevent_setfd | ( | struct bufferevent * | bufev, |
| evutil_socket_t | fd | ||
| ) |
Changes the file descriptor on which the bufferevent operates.
Not supported for all bufferevent types.
| bufev | the bufferevent object for which to change the file descriptor |
| fd | the file descriptor to operate on |
| EVENT2_EXPORT_SYMBOL void bufferevent_setwatermark | ( | struct bufferevent * | bufev, |
| short | events, | ||
| size_t | lowmark, | ||
| size_t | highmark | ||
| ) |
Sets the watermarks for read and write events.
On input, a bufferevent does not invoke the user read callback unless there is at least low watermark data in the buffer. If the read buffer is beyond the high watermark, the bufferevent stops reading from the network. But be aware that bufferevent input/read buffer can overrun high watermark limit (typical example is openssl bufferevent), so you should not relay in this.
On output, the user write callback is invoked whenever the buffered data falls below the low watermark. Filters that write to this bufev will try not to write more bytes to this buffer than the high watermark would allow, except when flushing.
| bufev | the bufferevent to be modified |
| events | EV_READ, EV_WRITE or both |
| lowmark | the lower watermark to set |
| highmark | the high watermark to set |
| EVENT2_EXPORT_SYMBOL int bufferevent_socket_connect | ( | struct bufferevent * | , |
| const struct sockaddr * | , | ||
| int | |||
| ) |
Launch a connect() attempt with a socket-based bufferevent.
When the connect succeeds, the eventcb will be invoked with BEV_EVENT_CONNECTED set.
If the bufferevent does not already have a socket set, we allocate a new socket here and make it nonblocking before we begin.
If no address is provided, we assume that the socket is already connecting, and configure the bufferevent so that a BEV_EVENT_CONNECTED event will be yielded when it is done connecting.
| bufev | an existing bufferevent allocated with bufferevent_socket_new(). |
| addr | the address we should connect to |
| socklen | The length of the address |
| EVENT2_EXPORT_SYMBOL int bufferevent_socket_connect_hostname | ( | struct bufferevent * | , |
| struct evdns_base * | , | ||
| int | , | ||
| const char * | , | ||
| int | |||
| ) |
Resolve the hostname 'hostname' and connect to it as with bufferevent_socket_connect().
| bufev | An existing bufferevent allocated with bufferevent_socket_new() |
| evdns_base | Optionally, an evdns_base to use for resolving hostnames asynchronously. May be set to NULL for a blocking resolve. |
| family | A preferred address family to resolve addresses to, or AF_UNSPEC for no preference. Only AF_INET, AF_INET6, and AF_UNSPEC are supported. |
| hostname | The hostname to resolve; see below for notes on recognized formats |
| port | The port to connect to on the resolved address. |
Recognized hostname formats are:
www.example.com (hostname) <IP_ADDRESS> (ipv4address) ::1 (ipv6address) [::1] ([ipv6address])
Performance note: If you do not provide an evdns_base, this function may block while it waits for a DNS response. This is probably not what you want.
| EVENT2_EXPORT_SYMBOL int bufferevent_socket_get_dns_error | ( | struct bufferevent * | bev | ) |
Return the error code for the last failed DNS lookup attempt made by bufferevent_socket_connect_hostname().
| bev | The bufferevent object. |
| EVENT2_EXPORT_SYMBOL struct bufferevent* bufferevent_socket_new | ( | struct event_base * | base, |
| evutil_socket_t | fd, | ||
| int | options | ||
| ) |
Create a new socket bufferevent over an existing socket.
| base | the event base to associate with the new bufferevent. |
| fd | the file descriptor from which data is read and written to. This file descriptor is not allowed to be a pipe(2). It is safe to set the fd to -1, so long as you later set it with bufferevent_setfd or bufferevent_socket_connect(). |
| options | Zero or more BEV_OPT_* flags |
| EVENT2_EXPORT_SYMBOL void bufferevent_trigger | ( | struct bufferevent * | bufev, |
| short | iotype, | ||
| int | options | ||
| ) |
Triggers bufferevent data callbacks.
The function will honor watermarks unless options contain BEV_TRIG_IGNORE_WATERMARKS. If the options contain BEV_OPT_DEFER_CALLBACKS, the callbacks are deferred.
| bufev | the bufferevent object |
| iotype | either EV_READ or EV_WRITE or both. |
| options |
| EVENT2_EXPORT_SYMBOL void bufferevent_trigger_event | ( | struct bufferevent * | bufev, |
| short | what, | ||
| int | options | ||
| ) |
Triggers the bufferevent event callback.
If the options contain BEV_OPT_DEFER_CALLBACKS, the callbacks are deferred.
| bufev | the bufferevent object |
| what | the flags to pass onto the event callback |
| options |
| EVENT2_EXPORT_SYMBOL void bufferevent_unlock | ( | struct bufferevent * | bufev | ) |
Release the lock on a bufferevent.
Has no effect if locking was not enabled with BEV_OPT_THREADSAFE.
| EVENT2_EXPORT_SYMBOL int bufferevent_write | ( | struct bufferevent * | bufev, |
| const void * | data, | ||
| size_t | size | ||
| ) |
Write data to a bufferevent buffer.
The bufferevent_write() function can be used to write data to the file descriptor. The data is appended to the output buffer and written to the descriptor automatically as it becomes available for writing.
| bufev | the bufferevent to be written to |
| data | a pointer to the data to be written |
| size | the length of the data, in bytes |
| EVENT2_EXPORT_SYMBOL int bufferevent_write_buffer | ( | struct bufferevent * | bufev, |
| struct evbuffer * | buf | ||
| ) |
Write data from an evbuffer to a bufferevent buffer.
The evbuffer is being drained as a result.
| bufev | the bufferevent to be written to |
| buf | the evbuffer to be written |
| EVENT2_EXPORT_SYMBOL void ev_token_bucket_cfg_free | ( | struct ev_token_bucket_cfg * | cfg | ) |
Free all storage held in 'cfg'.
Note: 'cfg' is not currently reference-counted; it is not safe to free it until no bufferevent is using it.
| EVENT2_EXPORT_SYMBOL struct ev_token_bucket_cfg* ev_token_bucket_cfg_new | ( | size_t | read_rate, |
| size_t | read_burst, | ||
| size_t | write_rate, | ||
| size_t | write_burst, | ||
| const struct timeval * | tick_len | ||
| ) |
Initialize and return a new object to configure the rate-limiting behavior of bufferevents.
| read_rate | The maximum number of bytes to read per tick on average. |
| read_burst | The maximum number of bytes to read in any single tick. |
| write_rate | The maximum number of bytes to write per tick on average. |
| write_burst | The maximum number of bytes to write in any single tick. |
| tick_len | The length of a single tick. Defaults to one second. Any fractions of a millisecond are ignored. |
Note that all rate-limits hare are currently best-effort: future versions of Libevent may implement them more tightly.


the gallery of horns
Filter by Keyword
Page 1
Page 2
All
sort by
sort by name
by horns
{{title}}
{{description}}
{{horns}}


This page is an example of the yql-trimpath-page utility from the inputEx library. Read the comments in the source to view the "text/yql" and "text/trimpath" script tags.
Footer


Before Change
with open(path, "r") as file:
for line in file:
try:
raw_dict = json.loads(line)
labels = raw_dict.pop("labels")
metadata = dict()
// labels is a comma-seprated list of key, value pairs
for pair in labels.split(","):
After Change
// Chop "|" at the beginning and end of labels and split labels by "|,|"
fields = sample.pop("labels")[1:-1].split("|,|")
// Turn the fields into [[key, value], ...]
key_values = [field.split(":", 1) for field in fields]
sample["metadata"] = {k: v for k, v in key_values}
// We can"t use a SampleCollector because SampleCollector.AddSamples depends on
// having a benchmark and a benchmark_spec.
publishers = SampleCollector._PublishersFromFlags()


Skip to navigation
Skip to content
Skip to footer
Open dialog sign in
Homepage
Article Title
Another Article Title
Sign In
Sign in stuff.
Close
Ok
Map
Map stuff.
Close
Ok
Search
Search stuff.
Close
Ok
Menu
all the menu options.
Link 1
Link 2
Link 3
Link 4
Link 5
Ok


Create an account as either someone who is looking to learn more about coding or as a mentor who is willing to help someone else learn more about the world of coding.
Whether you are a mentor or mentee the site will help you find someone else to work with. We'll provide recomendations and then you can message people as you see fit.
By working together we can provide support to people who may have never had the chance to learn about coding the way having a specific mentor allows them too.


Symbol Index for "Timepoint Association"
Symbol Index for diagram
"Timepoint Association"
classifier (Association)
from (Association)
Temporal Link Type (Class)
Timepoint (Class)
Timepoint Association (Class)
to (Association)


Success
Your changes were successfully saved. Click here to continue.
Error
Please select a file to upload. Click here to continue.
File size exceeded. Limit is 10MB. Click here to continue.
The Portfolio was not deleted. Click here to continue.
Your profile cannot be deleted. Please contact user support. Click here to continue.
Your changes were not saved. Click here to continue.


Incident Type
Animal Rescue
Emergency
Title
Type
Completed
Finished
Going on
Incident Time
Save
post me
field3
field4
Incident Time2


A reference to a symbol that has been established as a symbol macro can be used as a place. In this case, setf expands the reference and then analyzes the resulting form.


--- layout: page title: Rebirth - Free Comic permalink: /comic/rebirth/ description: Welcome to Rebirth. The meat is to die for... --- {% include light-switch.html %}


Custom switch widget for accepting Privacy Policy in Flutter Apps
Posted on August 30, 2019 in Flutter
Target Audience: Beginner
Recipe: Implementing Custom Switch Widget to accept privacy policy from Settings screen.
Focus Widget: Switch Widget
Goal: In our demo app, we'll implement a custom stateless widget HyperlinkedLabelSwitch
. It'll contain two main visual parts:
-
Label 'Privacy Policy' aligned to start. Clicking / tapping on this label will open url in a
WebView
. I'll be using a Google Doc for sample privacy policy accessible via a hyperlink. -
Toggle switch aligned to the end of the screen. On switch means privacy policies are accepted. This accepted status is updated as 'Privacy Policy (Accepted)' in left label. Toggling this switch to "off" update text label back to 'Privacy Policy'.
Screenshot of Privacy policy loaded in WebView:
Screenshot of updated text label after accepting privacy policy:
Checkout the companion video tutorial:
Implementing Custom Switch Widget : HyperlinkedLabelSwitch
We'll be creating custom switch widget with clickable text label and switch. Screenshot of custom widget in 'off' mode (Privacy privacy is not accepted):
Screenshot of custom widget in 'on' mode (Privacy privacy accepted):
Step #1. Create a class HyperlinkedLabelSwitch
extending StatelessWidget
. This widget has following members:
label
: Text displaying 'Privacy Policy'hyperlink
: Web link (url) to privacy policy document.selected
: Boolean value to determine whether policy is accepted or not.onChange
: Function to be assigned toSwitch
widget'sonChanged:
property.padding
: This is the padding around the custom widget. Ability to pass this value (rather hard coding) from parent make custom widget reusable.
class HyperlinkedLabelSwitch extends StatelessWidget {
final String label;
final String hyperlink;
final bool selected;
final Function onChange;
final EdgeInsets padding;
}
Now, let's build the custom widget that contains a clickable label and toggle switch. We need a padding around this widget for visual appeal. We'll use the padding passed from parent as padding
parameter.
I'm using Row
widget to put label and toggle switch next to each other. Clickable label stays at the start of the screen, so it'll be the first child, and Switch
widget is placed as second children to the Row
widget. Since label consist of text, and it gets updated when user accepts the privacy policy, so we need it keep this widget flexible. We need to allow it to expand to claim the available space. That's why we'll use Expand
widget to claim empty area.
@override
Widget build(BuildContext context) {
return Padding(
padding: padding,
child: Row(
children: <Widget>[
Expanded(),
Switch()
],
),
);
}
I'll make use of RichText
widget to create clickable text label. TextSpan
widget is great choice for rendering more than just plain text. It's recognizer
property can be used for responding to gestures more appropriately. In this case, I'll use TapGestureRecognizer
as recognizer. TapGestureRecognizer
helps to disambiguate gestures from other potential gestures. Clicking / tapping on link will open up the url in a WebView. In this example, it's a Google Doc with sample privacy policy text in it. Let's put all it together as code below:
Expanded(
child: RichText(
text: TextSpan(
text: label,
style: TextStyle(
color: Colors.redAccent,
decoration: TextDecoration.underline,
fontSize: 20.0),
//TapGestureRecognizer helps to disambiguate gestures from other potential gestures
recognizer: TapGestureRecognizer()
..onTap = () {
//open hyperlink in webview
Navigator.pushNamed(context, WEBVIEW,
arguments:
WebViewArguments(title: label, url: hyperlink));
})),
),
Next comes the Switch
widget. It's fairly simple. Widget's value
, onChanged
attributes are assigned values from parent widget. selected
boolean is assigned to value
, and onChange()
is assigned to onChanged
attribute like below:
Switch(
value: selected,
onChanged: (bool v) {
onChange(v);
},
)
That's all to it. We're ready to move on to using this widget from another widget or page. Settings page is one example where this widget can be used in to create clickable label along with switch settings.
Using Custom Switch Widget
I've created a sample page SwitchListTile1
to demonstrate integrating our brand new custom widget HyperlinkedLabelSwitch
. SwitchListTile1
page is a StatefulWidget
. We chose it to be StatefulWidget because we want to update the value of toggle switch to reflect privacy policy acceptance status.
As usual, we need a State
for StatefulWidget
, say _SwitchListTileState
like below:
class SwitchListTile1 extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _SwitchListTileState();
}
}
class _SwitchListTileState extends State<SwitchListTile1> {
}
_SwitchListTileState
has two parameters:
1. accepted
: A boolean flag to keep track of state of privacy policy acceptance status.
2. privacyLabel
: Text message shown to user. It's 'Privacy Policy' by default. It changes to 'Privacy Policy (Accepted)', when accepted
is true
.
The body
of this sample page is simple, and consists of one Column
widget. This Column
has only one child HyperlinkedLabelSwitch
widget.
HyperlinkedLabelSwitch
is initialized with default values for privacyLabel
and accepted
. The value of hyperlink
remains constant and hence hard wired, since we don't accept the location of privacy policy to be changed frequently. setState(){}
is called whenever value of switch changes. privacyLabel
's value is updated to include (Accepted)
when accepted
is true
.
body: Column(
children: <Widget>[
HyperlinkedLabelSwitch(
padding:
const EdgeInsets.symmetric(horizontal: 20.0, vertical: 50.0),
label: privacyLabel,
hyperlink:
'https://docs.google.com/document/d/1TAqTE7MBzuIagISHHzjGxSHoY1z884LXR3iGIojz1sA/edit?usp=sharing',
selected: accepted,
onChange: (bool v) {
setState(() {
accepted = v;
if (accepted) {
privacyLabel = 'Privacy Policy (Accepted)';
} else {
privacyLabel = 'Privacy Policy';
}
});
},
)
],
)
and, we are done !
Next section has complete example code for easy reference.
Complete example code
This section has full example code for your reference. There are few dependencies like webview.dart
, router.dart
. They are meant to be included for app navigation purposes and showing privacy policy documents in a web view. Please refer to Github repo for access to full code.
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_widgets/menus/webview.dart';
import 'package:flutter_widgets/router.dart';
class SwitchListTile1 extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _SwitchListTileState();
}
}
class _SwitchListTileState extends State<SwitchListTile1> {
bool accepted = false;
String privacyLabel = 'Privacy Policy';
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("SwitchListTile: Clickable label"),
),
body: Column(
children: <Widget>[
HyperlinkedLabelSwitch(
padding:
const EdgeInsets.symmetric(horizontal: 20.0, vertical: 50.0),
label: privacyLabel,
hyperlink:
'https://docs.google.com/document/d/1TAqTE7MBzuIagISHHzjGxSHoY1z884LXR3iGIojz1sA/edit?usp=sharing',
selected: accepted,
onChange: (bool v) {
setState(() {
accepted = v;
if (accepted) {
privacyLabel = 'Privacy Policy (Accepted)';
} else {
privacyLabel = 'Privacy Policy';
}
});
},
)
],
),
);
}
}
class HyperlinkedLabelSwitch extends StatelessWidget {
final String label;
final String hyperlink;
final bool selected;
final Function onChange;
final EdgeInsets padding;
const HyperlinkedLabelSwitch(
{Key key,
this.label,
this.selected,
this.onChange,
this.padding,
this.hyperlink});
@override
Widget build(BuildContext context) {
return Padding(
padding: padding,
child: Row(
children: <Widget>[
//1. First widget in row is for label
//Expanded widget claims the empty area
Expanded(
child: RichText(
text: TextSpan(
text: label,
style: TextStyle(
color: Colors.redAccent,
decoration: TextDecoration.underline,
fontSize: 20.0),
//TapGestureRecognizer helps to disambiguate gestures from other potential gestures
recognizer: TapGestureRecognizer()
..onTap = () {
//open hyperlink in webview
Navigator.pushNamed(context, WEBVIEW,
arguments:
WebViewArguments(title: label, url: hyperlink));
})),
),
//2. Next comes the switch to save the user's selection
Switch(
value: selected,
onChanged: (bool v) {
onChange(v);
},
)
],
),
);
}
}
Source code repo: Recipe source code is available here
References:
Happy cooking with Flutter :)
Liked the article ? Couldn't find a topic of your interest ? Please leave comments or email me about topics you would like me to write ! BTW I love cupcakes and coffee both :)
Follow me at twitter


Presentation
My projects
My Internet presence
Raul Figueiredo de Oliveira
web developer
Here are some of the projects I have developed:
Tribute page
Survey page
Product-landing page
Technical documentation page
Including this very portfolio!
My Internet presence:
GitHub
freeCodeCamp
Stack Overflow


Due to network issues in China (you understand)，there are intermittent connection failures when accessing to rubygems.org and the files hosted on Amazon S3。That's why using gem install rack
or bundle install
might take forever with no response. (Try gem install rails -V
to see the entire process.
RubyGems Mirror - Taobao
Why have this mirror?
How do I use it?
$ gem sources --remove https://rubygems.org/
$ gem sources -a https://ruby.taobao.org/
$ gem sources -l
*** CURRENT SOURCES ***
https://ruby.taobao.org
# Ensure it only has ruby.taobao.org
$ gem install rails
If you use a Gemfile
You can use bundle'sgem source mirror command.$ bundle config mirror.https://rubygems.org https://ruby.taobao.org
source 'https://rubygems.org/'
source 'https://ruby.taobao.org/'
gem 'rails', '4.1.0'
...
Ruby Source Code Mirror
This is a mirror of cache.ruby-lang.org that can be used to speed up Ruby installations for people in China.
Modify RVM to use this site as the download source to improve download speeds.
For Mac
$ sed -i .bak -E 's!https?://cache.ruby-lang.org/pub/ruby!https://ruby.taobao.org/mirrors/ruby!' $rvm_path/config/db
For Linux
$ sed -i -E 's!https?://cache.ruby-lang.org/pub/ruby!https://ruby.taobao.org/mirrors/ruby!' $rvm_path/config/db
Common questions
-
Q: Why can't my newly published gem be published using Taobao's mirror?
A: Since synchronization is only executed periodically, new gems might not be synchronized yet. You will need to wait a while before trying again.
-
Q: I've alread switched my sources to Taobao, but
bundle install
orgem install xxx
are stuck for a long time. Why?A: This is possibly an issue with your network, or the source for the gem is not correct. You can try
gem install xxx -V
and create a post on Ruby China with the details asking for support. -
Q: When using
gem install xxx
why do I encounter this error: "Error fetching data: Errno::ETIMEDOUT: Operation timed out - connect(2)"?A: Network issues caused requests to Taobao's server to reset the connection. When encountering this issue, please try to access the mirror from another computer to see if the issue is with Taobao's mirror, or with your environment. If after switching environments, you still encounter the issue, please create a post on Ruby China.


14 June 1996
Disease Outbreak Reported
In collaboration with the Ministry of Health and Sanitation and the Lassa Fever Research project, the WHO support team with a specialist from CDC has assessed the extent and severity of the outbreak after making field trips to Kailahun and Kenema Districts during 26 and 27 May.
WHO has provided drugs and supplies for hospitalized patients through the District Medical Officer in Kenema and specialized nursing support from CDC, Atlanta has been given.
Over 40 health personnel from the two districts affected attended a workshop organized by the team which reviewed:- basic epidemiological concepts, the need for surveillance and the epidemiology and control of Lassa Fever. A demonstration of barrier nursing techniqueswas also given.
The conclusion of the WHO support mission is that a major epidemic of Lassa Fever has occurred in Kailahun and Kenema Districts and is continuing as unusually large numbers of severely ill patients are still being admitted to hospital, with a large number of deaths still occurring.
A total of 167 cases and 60 deaths have been recorded during the period January to 28 May 1996.


This is a starter project with Spring Boot, Thymeleaf, MySQL, RESTful API, Bootstrap, AngularJS and AngularJS Material.
Learn more


As with DataTables, examples play an important part of learning how to use Editor and then progressing on to some really quite advanced implementations. The examples provided show different options available in Editor and can be combined to create an editable table that exactly meets your requirements.
Please refer to the DataTables documentation for full information about its API properties and methods.
Additionally, there are a wide range of extensions and plug-ins which extend the capabilities of DataTables.
DataTables designed and created by SpryMedia Ltd © 2007-2016
DataTables is licensed under the MIT license.


Filtering on the tree will ensure that if a node is visible, then all its ancestors are also visible. This is being taken care of by the treeModel 'filterNodes' function.
The function receives the node and returns true if the node should be hidden, false otherwise.
The function filters all nodes whose displayField ('name' by default) contains the given string. The comparison is done case insensitive.
Note the second field - true by default. This flag makes sure all nodes are visible after searching (i.e. expand all relevant ancestors).
You can traverse the tree and do your own magic, and call hide()
, show()
, or setIsHidden(value)
on all nodes as you wish.
You can bind to the tree state and supply a dictionary of hidden node IDs. See 2-way binding to state for more information.


Fullwidth List of Split 2
Left content in here
Uix Kit provides you with a comprehensive set of marketing tools to engage with your audience, get found across search and social, and grow your following.


Looking for your next job in IT? We understand how confusing it can be. In fact, we know that looking for a job is pretty much a full time job itself.
Let us help.
Are You an Employer/ Job Provider ?
Find skilled and tested candidates fast, Reduce risk with quality-assured processes, Increase productivity without increasing your headcount.


Leonardo Machado
4
Brazil
329k
Followers
803k
Likes
13k
Photos
Challenge by
Frontend Mentor
. Coded by
Leonardo Machado
.


Designed a recommender system to assist customers in upgrading their personal computer (PC) hardware components by optimizing value and performance. Built a data pipeline to extract the performance benchmarks and prices of different hardware components to train machine learning models. Implemented a random forest regression model to predict the component performance and deployed the web app using streamlit on AWS.
[Github][Website]
Spoken digit recognition using the Mel-frequency cepstral coefficients (MFCCs) and convolution neural networks (CNN). The model can recognize 0-9 spoken digits from .wav audio files by passing their MFCCs as an image input. My model achieves an accuracy of 94% on the test audio files.
[Github]
Given a set of RGB images (32x32 pixels) with one (and only one) of the following objects: aves, flights, bucks, felines (labels 0, 1, 2 and 3, respectively). The goal is to train a Neural Network model to recognize which of the objects is present in an image. Also, Understand the efficiency, performance, and perform model selection using cross-validation.
[Github]
Unsupervised learning algorithms attempt to learn some structure of the data using unlabeled samples like images. Here we will use K-Means to achieve optimal compression for efficient reconstruction of images.
[Github]
Train decision trees with different maximum depths, nearest neighbors with different number of neighbors, and linear models with different regularization parameters to predict the air quality.
[Github]
Analysis on the effect of non-linear delay model (exhibited by Feed-forward PUF) on performance parameters of PUFs i.e. Reliability and Uniqueness under different operating voltage conditions.
[Paper][Link]
Implemented a G-Share branch predictor using N3ASIC, a nanofabric using combination of crosspoint nanowire FETs integrated using metal interconnects.
The usage of N3ASIC reduces area and the improves performance of the predictor when compared to the conventional CMOS.
[Paper]
A novel intellectual-property (IP) identication using System-on-a-Chip (SOC) watermarking scheme.
The principle is embedding dierent Advanced Encryption Standard (AES) encoders in to a System-on-a-Chip (SOC) based watermarking scheme at behavior design level.
[Journal paper][Link]


npm packaging
Overview
Note, this is intended for sharing library code with non-Bazel consumers.
If all users of your library code use Bazel, they should just add your library
to the deps
of one of their targets.
create_package
create_package(ctx, deps_sources, nested_packages)
Creates an action that produces the npm package.
It copies srcs and deps into the artifact and produces the .pack and .publish scripts.
Returns: The tree artifact which is the publishable directory.
Attributes
ctx |
the skylark rule context |
deps_sources |
Files which have been specified as dependencies. Usually ".js" or ".d.ts" generated files. |
nested_packages |
list of TreeArtifact outputs from other actions which are to be nested inside this package |
npm_package
npm_package(name, deps, srcs, packages, replace_with_version, replacements, vendor_external)
The npm_package rule creates a directory containing a publishable npm artifact.
load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package")
npm_package(
name = "my_package",
srcs = ["package.json"],
deps = [":my_typescript_lib"],
replacements = {"//internal/": "//"},
)
You can use a pair of // BEGIN-INTERNAL ... // END-INTERNAL
comments to mark regions of files that should be elided during publishing.
For example:
function doThing() {
// BEGIN-INTERNAL
// This is a secret internal-only comment
doInternalOnlyThing();
// END-INTERNAL
}
Usage:
npm_package
yields three labels. Build the package directory using the default label:
$ bazel build :my_package
Target //:my_package up-to-date:
bazel-out/fastbuild/bin/my_package
$ ls -R bazel-out/fastbuild/bin/my_package
Dry-run of publishing to npm, calling npm pack
(it builds the package first if needed):
$ bazel run :my_package.pack
INFO: Running command line: bazel-out/fastbuild/bin/my_package.pack
my-package-name-1.2.3.tgz
$ tar -tzf my-package-name-1.2.3.tgz
Actually publish the package with npm publish
(also builds first):
# Check login credentials
$ bazel run @nodejs//:npm who
# Publishes the package
$ bazel run :my_package.publish
You can pass arguments to npm by escaping them from Bazel using a double-hyphen bazel run my_package.publish -- --tag=next
Attributes
name |
A unique name for this rule. |
deps |
Other targets which produce files that should be included in the package, such as |
srcs |
Files inside this directory which are simply copied into the package. |
packages |
Other npm_package rules whose content is copied into this package. |
replace_with_version |
If set this value is replaced with the version stamp data. See the section on stamping in the README. |
replacements |
Key-value pairs which are replaced in all the files while building the package. |
vendor_external |
External workspaces whose contents should be vendored into this workspace. Avoids 'external/foo' path segments in the resulting package. Note: only targets in the workspace root can include files from an external workspace. Targets in nested packages only pick up files from within that package. |


28 arrested after annual anti-junta demo in Greece
The protest, one of the largest, was heavily influenced by opposition to the four-month administration of Kyriakos Mitsotakis, elected in July on a pledge to strengthen law and order
Greek police said they have arrested 28 people for violence that followed a large demonstration in Athens to mark the anniversary of a 1973 anti-junta uprising.
"In some cases, groups of persons attempted to carry out unlawful action and attacked police forces," the police said in a statement late on Sunday.
Most of the incidents occurred in the bohemian Athens district of Exarchia, where police forces were also accused of unprovoked aggression.
A woman said she was struck on the head while standing in the street, and a journalist said he was also hit after filming one of the attacks.
Separately, several youths were arrested after Molotov firebombs and stones were found on a roof, in an apparent plan to ambush riot police passing below.
Over 30,000 Greeks demonstrated in Athens and other major cities under a heavy police presence Sunday to mark the anniversary of a 1973 anti-junta uprising, the first since the election of the new conservative government.
The protest, one of the largest, was heavily influenced by opposition to the four-month administration of Kyriakos Mitsotakis, elected in July on a pledge to strengthen law and order.
The anti-junta demonstration is a treasured anniversary for many Greeks.
At least 24 people were killed in the 1973 crackdown, an event generally considered to have broken the junta's grip on power and helped the restoration of democracy.
The annual event traditionally ends in front of the American embassy, which was ringed with police vans Sunday, as the fervently anti-Communist dictators enjoyed backing from Washington at the time.
On Wednesday, in a move seen as directed against the demonstration, the government secured parliamentary approval of a law applying harsher penalties for public violence.
Throwing a Molotov cocktail -- a fairly frequent occurrence at demonstrations in Greece -- is now punishable by up to 10 years in prison, up from five years previously.


The below stacks are reorganized into a smaller number of stacks as the viewport gets smaller. The example also shows how you can add more elements to the stack.
{% capture example_code %}Code
{% highlight html %} {{ example_code }} {% endhighlight %}


Rob Horton
<EMAIL_ADDRESS>123 456 7890
October 11, 1992
Cainta Rizal
Male
Married
Filipino
989-217-222-000
9892-2178-2122-0000


Step 2. Upload Your Data
Input a csv file, where the last column is the target, other columns are features
Upload Data
Choose file
Ignore First Line
Is target categorical?
Save your data by specifying a unique identifier?


| Optic Flow Control of Mico-Aerial Vehicle |
Sept 2012 - Feb 2013 |
I completed the work for my master's project in Radhika Napal's Self-Organizing Systems Research Group
at Harvard University. I worked on vision-based control of a 30 gram
autonomous micro-aerial vehicle (MAV). We used specialized vision sensors to estimate the optic flow around the
helicopter. This information is then used to control the aircraft and ultimately for
more complex tasks such as egomotion estimation, mapping, and coordination.
We investigated strategies for indoor navigation with fully on-board computation.
In order to test various sensor configurations
and control strategies, I created a 3-dimensional simulation of the MAV and
sensor ring using the Webots robotics simulator, along with a custom physics plugin.
|
micro-aerial vehicle with custom sensor ring
|
|
Dr. Karthik Dantu, Dr. Richard Moore, Dr. Radhika Nagpal (faculty), Dr. Dario Floreano (faculty) |


Before Change
" ndim=%d" % len(embedding_shape))
if global_step is None:
global_step = 0
save_path = os.path.join(self.get_logdir(), str(global_step).zfill(5))
try:
os.makedirs(save_path)
except OSError:
After Change
raise ValueError("expected equal first dim size of embedding and images,"
" while received %d and %d for each" % (embedding_shape[0],
img_labels_shape[0]))
if self._verbose:
logging.info("saving embedding images to %s", save_path)
_make_sprite_image(images, save_path)
if self._verbose:
logging.info("saving embedding data to %s", save_path)
_save_embedding_tsv(embedding, save_path)


Before Change
// Convolution via sparse row sum. Converts [|E| x M_out] feature matrix to
// [n x M_out] feature matrix.
size = torch.Size([adj.size(0), adj.size(1), output.size(1)])
adj = torch.sparse.FloatTensor(indices, output, size)
output = sum(adj, dim=1)
// TODO: root node and weight mean
// root_weight = weight[torch.arange(kernel_size[-1])]
After Change
// Weighten root node features by multiplying with the meaned weights at the
// origin.
index = torch.arange(0, kernel_size[-1]).long()
root_weight = weight[index].mean(0)
output += torch.mm(features, root_weight)
if bias is not None:
output += bias


drtmle
Nonparametric estimators of the average treatment effect with doubly-robust confidence intervals and hypothesis tests
Author: David Benkeser
drtmle
is an R package that computes marginal means of an outcome under fixed levels of a treatment. The package computes targeted minimum loss-based (TMLE) estimators that are doubly robust, not only with respect to consistency, but also with respect to asymptotic normality, as discussed in Benkeser, et al (2017). This property facilitates construction of doubly-robust confidence intervals and hypothesis tests.
The package additionally includes methods for computing valid confidence intervals for an inverse probability of treatment weighted (IPTW) estimator of the average treatment effect when the propensity score is estimated via super learning, as discussed in van der Laan (2014).
Install the current stable release from CRAN via
A developmental release may be installed from GitHub via devtools
with:
Suppose the data consist of a vector of baseline covariates (W
), a multi-level treatment assignment (A
), and a continuous or binary-valued outcome (Y
). The function drtmle
may be used to estimate \(E[E(Y \mid A = a_0, W)]\) for user-selected values of \(a_0\) (via option a_0
). The resulting targeted minimum loss-based estimates are doubly robust with respect to both consistency and asymptotic normality. The function computes doubly robust covariance estimates that can be used to construct doubly robust confidence intervals for marginal means and contrasts between means. A simple example on simulated data is shown below. We refer users to the vignette for more information and further examples.
# load packages
library(drtmle)
#> drtmle: TMLE with doubly robust inference
#> Version: 1.0.2
library(SuperLearner)
#> Loading required package: nnls
#> Super Learner
#> Version: 2.0-23-9000
#> Package created on 2017-11-07
# simulate simple data structure
set.seed(1234)
n <- 200
W <- data.frame(W1 = runif(n,-2,2), W2 = rbinom(n,1,0.5))
A <- rbinom(n, 1, plogis(-2 + W$W1 - 2*W$W2))
Y <- rbinom(n, 1, plogis(-2 + W$W1 - 2*W$W2 + A))
# estimate the covariate-adjusted marginal mean for A = 1 and A = 0
# here, we do not properly estimate the propensity score
fit1 <- drtmle(W = W, A = A, Y = Y, # input data
a_0 = c(0, 1), # return estimates for A = 0 and A = 1
SL_Q = "SL.npreg", # use kernel regression for E(Y | A = a, W)
glm_g = "W1 + W2", # use misspecified main terms glm for E(A | W)
SL_Qr = "SL.npreg", # use kernel regression to guard against
# misspecification of outcome regression
SL_gr = "SL.npreg" # use kernel regression to guard against
# misspecification of propensity score
)
# print the output
fit1
#> $est
#>
#> 0 0.1403428
#> 1 0.2158854
#>
#> $cov
#> 0 1
#> 0 0.0008075554 0.0002582092
#> 1 0.0002582092 0.0014881480
# get confidence intervals for marginal means
ci_fit1 <- ci(fit1)
# print the output
ci_fit1
#> $drtmle
#> est cil ciu
#> 0 0.140 0.085 0.196
#> 1 0.216 0.140 0.291
# get confidence intervals for ate
ci_ate1 <- ci(fit1,contrast = c(-1, 1))
# print the output
ci_ate1
#> $drtmle
#> est cil ciu
#> E[Y(1)]-E[Y(0)] 0.076 -0.007 0.158
The package additionally includes a function for computing valid confidence intervals about an inverse probability of treatment weight (IPTW) estimator when super learning is used to estimate the propensity score.
# fit iptw
fit2 <- adaptive_iptw(Y = Y, A = A, W = W, a_0 = c(0, 1),
SL_g = c("SL.glm", "SL.mean", "SL.step.interaction"),
SL_Qr = "SL.npreg")
#> Loading required package: nloptr
#> Warning in method$computeCoef(Z = Z, Y = Y, libraryNames = libraryNames, :
#> Algorithm 3 is duplicated. Setting weight to 0.
# print the output
fit2
#> $est
#>
#> 0 0.1377524
#> 1 0.1943633
#>
#> $cov
#> 0 1
#> 0 0.0007623723 0.0002181465
#> 1 0.0002181465 0.0106635990
# compute a confidence interval for margin means
ci_fit2 <- ci(fit2)
# print the output
ci_fit2
#> $iptw_tmle
#> est cil ciu
#> 0 0.138 0.084 0.192
#> 1 0.194 -0.008 0.397
# compute a confidence interval for the ate
ci_ate2 <- ci(fit2, contrast = c(-1, 1))
# print the output
ci_ate2
#> $iptw_tmle
#> est cil ciu
#> E[Y(1)]-E[Y(0)] 0.057 -0.149 0.262
If you encounter any bugs or have any specific feature requests, please file an issue.
After using the drtmle
R package, please cite the following:
@Manual{drtmlepackage,
title = {drtmle: Doubly-Robust Nonparametric Estimation and Inference},
author = {David Benkeser},
note = {R package version 1.0.0},
doi = {10.5281/zenodo.844836},
}
@article{benkeser2017improved,
year = {2017},
author = {Benkeser, David C and Carone, Marco and van der Laan, Mark J
and Gilbert, Peter B},
title = {Doubly-robust nonparametric inference on the average
treatment effect},
journal = {Biometrika},
volume = {104}, number = {4},
pages = {863–880},
doi = {10.1093/biomet/asx053}
}
© 2016-2017 David C. Benkeser
The contents of this repository are distributed under the MIT license. See below for details:
The MIT License (MIT)
Copyright (c) 2016-2017 David C. Benkeser
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


ABOUT US
When you work with us, you are part of a tema of committed collaborators. All aspects of our software development process are integrated, interactive and agile.
Our approach unifies design, development and profuct management to create exceptional products.
We start each project by understanding your business goals, the user's need and the product requirements.
Then we help translate them into effective and elegant solutions.
Delani Studio
2021


Hal Cruttenden (born 1969-09-09[ref]) has appeared in 14 episodes between 2013-2017. Hal Cruttenden on IMDB. Hal Cruttenden on Wikipedia. Hal Cruttenden on Chortle.


A One Page FAQ
I've heard that JavaScript is the long-lost fountain of youth. Is this true?
Why, yes it is! Studies prove that learning JavaScript freshens the mind and extends life span by several hundred years. (Note: some scientists disagree with these claims.)
Can JavaScript really solve all of my problems?
Why, yes it can! It's the most versatile programming language ever created and is trained to provide financial management advice, life-saving CPR, and even to take care of household pets.
Is there nothing JavaScript can’t do?
Why, no there isn’t! It’s even able to write its own public relations-oriented Frequently Asked Questions pages. Now that’s one smart programming language!


Privacy Policy
This privacy policy has been compiled to better serve those who are concerned with how their 'Personally identifiable information' (PII) is being used online. PII, as used in US privacy law and information security, is information that can be used on its own or with other information to identify, contact, or locate a single person, or to identify an individual in context. Please read our privacy policy carefully to get a clear understanding of how we collect, use, protect or otherwise handle your Personally Identifiable Information in accordance with our website.
What personal information do we collect from the people that visit our blog, website or app?
When ordering or registering on our site, as appropriate, you may be asked to enter your name, email address, phone number or other details to help you with your experience.
When do we collect information?

How do we use your information?
We may use the information we collect from you when you register, make a purchase, sign up for our newsletter, respond to a survey or marketing communication, surf the website, or use certain other site features in the following ways:
- To personalize user's experience and to allow us to deliver the type of content and product offerings in which you are most interested.
- To improve our website in order to better serve you.
- To allow us to better service you in responding to your customer service requests.
- To quickly process your transactions.
- To send periodic emails regarding your order or other products and services.
How do we protect visitor information?
Our website is scanned on a regular basis for security holes and known vulnerabilities in order to make your visit to our site as safe as possible.
We use regular Malware Scanning.
Your personal information is contained behind secured networks and is only accessible by a limited number of persons who have special access rights to such systems, and are required to keep the information confidential. In addition, all sensitive/credit information you supply is encrypted via Secure Socket Layer (SSL) technology.
We implement a variety of security measures when a user places an order enters, submits, or accesses their information to maintain the safety of your personal information.
All transactions are processed through a gateway provider and are not stored or processed on our servers.
Do we use 'cookies'?
Yes. Cookies are small files that a site or its service provider transfers to your computer's hard drive through your Web browser (if you allow) that enables the site's or service provider's systems to recognize your browser and capture and remember certain information. For instance, we use cookies to help us remember and process the items in your shopping cart. They are also used to help us understand your preferences based on previous or current site activity, which enables us to provide you with improved services. We also use cookies to help us compile aggregate data about site traffic and site interaction so that we can offer better site experiences and tools in the future.
We use cookies to:
- Help remember and process the items in the shopping cart.
- Understand and save user's preferences for future visits.
You can choose to have your computer warn you each time a cookie is being sent, or you can choose to turn off all cookies. You do this through your browser (like Internet Explorer) settings. Each browser is a little different, so look at your browser's Help menu to learn the correct way to modify your cookies.
If you disable cookies off, some features will be disabled It won't affect the users experience that make your site experience more efficient and some of our services will not function properly.
However, you can still place orders.
Third Party Disclosure
We do not sell, trade, or otherwise transfer to outside parties your personally identifiable information unless we provide you with advance notice. This does not include website hosting partners and other parties who assist us in operating our website, conducting our business, or servicing you, so long as those parties agree to keep this information confidential. We may also release your information when we believe release is appropriate to comply with the law, enforce our site policies, or protect ours or others' rights, property, or safety.
However, non-personally identifiable visitor information may be provided to other parties for marketing, advertising, or other uses.
Third party links
We do not include or offer third party products or services on our website.
Google's advertising requirements can be summed up by Google's Advertising Principles. They are put in place to provide a positive experience for users. More info
We have not enabled Google AdSense on our site but we may do so in the future.
California Online Privacy Protection Act
CalOPPA is the first state law in the nation to require commercial websites and online services to post a privacy policy. The law's reach stretches well beyond California to require a person or company in the United States (and conceivably the world) that operates websites collecting personally identifiable information from California consumers to post a conspicuous privacy policy on its website stating exactly the information being collected and those individuals with whom it is being shared, and to comply with this policy. - See more at: http://consumercal.org/california-online-privacy-protection-act-caloppa/#sthash.0FdRbT51.dpuf
According to CalOPPA we agree to the following:
Users can visit our site anonymously Once this privacy policy is created, we will add a link to it on our home page, or as a minimum on the first significant page after entering our website. Our Privacy Policy link includes the word 'Privacy', and can be easily be found on the page specified above.
Users will be notified of any privacy policy changes:
- On our Privacy Policy Page/li>
Users are able to change their personal information:
- By emailing us/li>
How does our site handle do not track signals?
We honor do not track signals and do not track, plant cookies, or use advertising when a Do Not Track (DNT) browser mechanism is in place.
Does our site allow third party behavioral tracking?
It's also important to note that we do not allow third party behavioral tracking
COPPA (Children Online Privacy Protection Act)
When it comes to the collection of personal information from children under 13, the Children's Online Privacy Protection Act (COPPA) puts parents in control. The Federal Trade Commission, the nation's consumer protection agency, enforces the COPPA Rule, which spells out what operators of websites and online services must do to protect children's privacy and safety online.
We do not specifically market to children under 13.
Fair Information Practices
The Fair Information Practices Principles form the backbone of privacy law in the United States and the concepts they include have played a significant role in the development of data protection laws around the globe. Understanding the Fair Information Practice Principles and how they should be implemented is critical to comply with the various privacy laws that protect personal information.
In order to be in line with Fair Information Practices we will take the following responsive action, should a data breach occur:
We will notify the users via email
- Within 1 business day
We also agree to the individual redress principle, which requires that individuals have a right to pursue legally enforceable rights against data collectors and processors who fail to adhere to the law. This principle requires not only that individuals have enforceable rights against data users, but also that individuals have recourse to courts or a government agency to investigate and/or prosecute non-compliance by data processors.
CAN SPAM Act
The CAN-SPAM Act is a law that sets the rules for commercial email, establishes requirements for commercial messages, gives recipients the right to have emails stopped from being sent to them, and spells out tough penalties for violations.
We collect your email address in order to:
To be in accordance with CANSPAM we agree to the following:
If at any time you would like to unsubscribe from receiving future emails, you can email us at and we will promptly remove you from ALL correspondence.
Contacting Us
If there are any questions regarding this privacy policy you may contact us using the information below.
Last Edited on 2015-12-08


--- layout: post status: publish published: true title: "雨，清远" author: Leask author_login: leask author_email<EMAIL_ADDRESS>author_url: https://leaskh.com wordpress_id: 557 wordpress_url: http://leaskh.wordpress.com/2006/05/22/%e9%9b%a8%ef%bc%8c%e6%b8%85%e8%bf%9c date: '2006-05-22 14:36:25 +0800' date_gmt: '2006-05-22 14:36:25 +0800' categories: - Life tags: [] comments: [] ---


Transparency data
Teachers' pension scheme payments made on behalf of the Department for Education (DfE) in the 2016 to 2017 financial year.
View online Download CSV 4.65KB
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
View online Download CSV 4.46KB
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
View online Download CSV 5.09KB
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
Teachers’ pension scheme payments are routine daily cash transfers to Capita to fund the payments they make to pensioners and others on behalf of DfE.
We aim to publish the data for the previous month by the last working day of the current month.
The previous year’s technical note explains what data we’ve included and why.
Published: 17 May 2016
Updated: 24 February 2017
From: Department for Education
Part of: Teachers’ pension scheme


By the time we meet on Tuesday, April 18 be sure that this model is running on your laptop (in InsightMaker) because we will be exploring the model more fully in class together, and use this PVA to do some management-relevant scenario testing.
Our goal is to better understand the future of the grizzly bear population in Yellowstone park, and the processes that may regulate this population!
Let’s walk through the basic steps in building and running a PVA model:
Based on the literature that we have read, we determine that there are four main stages in the grizzly bear life history: cub, yearling, subadult and adult! The adult stage is the only one that is reproductive!
Therefore, our conceptual life history diagram looks something like this!
You can clone the base grizzly bear model here. This model has not yet been parameterized!
Let’s use this table to parameterize the population vital rates in our model!
This table actually has two alternative parameterizations, one representing the period from 1983 to 2001, and the other representing the period from 2002-2011.
Remember that we are not paying any attention to males!
The table is from this scientific report (alternative link)
What about population size? For any simulation we always need to initialize abundance!
From Schwartz et al 2006 we know that:
Let’s use the initial (1983) abundances (all female!) to initialize our model:
Cubs: 5
Yearlings: 5
Subadults: 5
Adults: 5
Take a moment to parameterize the model!
We are ignoring spatial structure for this PVA!
Okay, let’s run the model!
Again, you can clone the base grizzly bear model here if you haven’t already.
REALITY CHECK:
Q: Given that the population of adult females is known to have increased to around 30 individuals by the year 2002, is this model realistic??
Q: NOW do you think this is biologically realistic? Why or why not?
In 2002 the population was more like 30 females- so let’s use the following parameterization!
Cubs: 30
Yearlings: 30
Subadults: 30
Adults: 30
Q: What do you notice about this model? Is it still growing? What about the overall rate of growth of the population?
Q: Which vital rates changed the most from 1983 to 2002?
Q: Can you think of any reason for this change?
We know that when the adult (female) population size was around 5, yearling survival was around 82%
We also know that when the adult (female) population size was around 30, yearling survival dropped to around 54%
Can you calculate a linear relationship between population size and yearling survival? When abundance increased by 25, yearling survival decreased by a little more than 25% (28% to be exact).
SLOPE: For each additional individual in the adult population, yearling survival decreased by 1.12.
INTERCEPT: When there were 5 adults, yearling survival was 81.7%. If there were 0 individuals in the adult population, yearling survival would be \(81.7 + 1.12\cdot 5\), which is 87.6%.
To convert back to a fraction, we divide this linear model by 100!
So the linear formula for computing yearling survival as a function of adult female abundance should be:
\(Surv_{yearling} = \frac{\left ( 87.6 - 1.12*N_{female} \right )}{100}\)
Let’s implement this density-dependent process in Insightmaker!
Run the model! What do you notice?
Q: What is the carrying capacity of this population? NOTE: you may need to run the model for longer than 100 years! NOTE: this is an emergent property of our new model!
Q: Do you notice an oscillatory pattern in abundance over time? NOTE: this is also an emergent property of our new model!
Q: Why is this type of model called density-dependent?
NOTE: if necessary, you can clone a density-dependent version of the grizzly model here
Answer the following questions:
Run the grizzly bear PVA with and without the density-dependence process. In each case, what is the extinction risk after 100 years? In each case (with and without density-dependence), what is the approximate 95% confidence interval for the total population abundance after 100 years? Under which scenario is the conservation outlook best for grizzly bears in Yellowstone park?
For the density-independent model, what is the extinction risk if you changed yearling survival to its lower confidence limit in the above table (from 2002-2011)? Does the parameter uncertainty in the above table make a difference for the conservation outlook for this population?? NOTE: remember to change yearling survival back to 0.539 for the density-independent model!
In each case (with and without density-dependence), what is the extinction risk if you changed the initial abundance in each stage to 2? Given that a viable population is defined as a risk of extinction of < 10% over 100 years, can you identify a minimum viable population for this population?
HELPFUL HINTS:
\(\frac{extinctions}{replicates}\)
Where extinctions is the total number of replicates where the abundance declined to zero, and replicates is the total number of independent simulation replicates you ran. Similarly, you can assess the probability of failing to meet an important conervation criterion (e.g., population remaining above MVP) as the fraction of replicates that failed to meet the specified criterion.


| 1 | /* | |
| 2 | * Licensed to the Apache Software Foundation (ASF) under one | |
| 3 | * or more contributor license agreements. See the NOTICE file | |
| 4 | * distributed with this work for additional information | |
| 5 | * regarding copyright ownership. The ASF licenses this file | |
| 6 | * to you under the Apache License, Version 2.0 (the | |
| 7 | * "License"); you may not use this file except in compliance | |
| 8 | * with the License. You may obtain a copy of the License at | |
| 9 | * | |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 11 | * | |
| 12 | * Unless required by applicable law or agreed to in writing, | |
| 13 | * software distributed under the License is distributed on an | |
| 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| 15 | * KIND, either express or implied. See the License for the | |
| 16 | * specific language governing permissions and limitations | |
| 17 | * under the License. | |
| 18 | */ | |
| 19 | package org.apache.empire.db.exceptions; | |
| 20 | ||
| 21 | import org.apache.empire.commons.ErrorType; | |
| 22 | import org.apache.empire.commons.StringUtils; | |
| 23 | import org.apache.empire.db.DBDatabase; | |
| 24 | import org.apache.empire.exceptions.EmpireException; | |
| 25 | ||
| 26 | public class DatabaseNotOpenException extends EmpireException | |
| 27 | { | |
| 28 | /** | |
| 29 | * Comment for serialVersionUID | |
| 30 | */ | |
| 31 | private static final long serialVersionUID = 1L; | |
| 32 | | |
| 33 | public static final ErrorType errorType = new ErrorType("error.db.databaseNotOpen", "the database {0} has not been opened."); | |
| 34 | | |
| 35 | public DatabaseNotOpenException(DBDatabase db) | |
| 36 | { | |
| 37 |
2
1. <init> : negated conditional → NO_COVERAGE 2. <init> : negated conditional → NO_COVERAGE |
super(errorType, new String[] { (db!=null && StringUtils.isNotEmpty(db.getSchema())) ? db.getSchema() : "{NO_SCHEMA}" }); |
| 38 | } | |
| 39 | } | |
Mutations | ||
| 37 |
1.1 2.2 |


Every year we aim to have an unbelievable time, and this year we'd love it for you to join us. Conference passes only cost $99, one of the best values you'll find.
Purchase your Style Conference pass by using the form to the right.multiple passes may be purchased within the same order, so feel free to bring a friend or two along.Onces your order is finished we'll follow up and provide a receipt for your purchase. See you soon!


Something went wrong launching the stream :(. Please ensure that you have Livestreamer and a supported media player installed.
Check Livestreamer's docs for a more indepth guide.


About the Devs
I grew up in a family of automotive enthusiasts and engineers. Routine car maintenance was a fundamental part of the driving experience from the start for me. I learned to change a car’s oil, rotate tires, perform basic repairs and more before I sat behind the wheel. The car was framed as more than a simple device for going from point A to point B, but instead a complex feat of engineering.
My parents had the know-how to do nearly all routine maintenance themselves and wide variety of repairs, but the one weak point in this system was the tracking method for maintenance. After trying a number of different apps and services and being unable to find something customizable, cross-platform, and intuitive to use, we settled on a spreadsheet as our family’s method of tracking routine car maintenance. Hosting the spreadsheet online made it theoretically possible to access the sheet on my phone, but it was a pain. The spreadsheet was easy to modify to support everyone’s car in the family and our preferred maintenance intervals, but it did a poor job of giving alerts about maintenance being due. There were no notifications and you had to scroll through a lot of rows and columns of data before seeing the next due item when opening the spreadsheet.
In 2019 I wanted to create a better solution and I started learning to program mobile apps. After a lot of learning and failed attempts this led to auToDo. The initial product was launched in February of 2020 and is in continued development today. auToDo is being developed to solve the problems I faced with routine car maintenance and hopefully solves these problems for you as well.
Right after auToDo launched its beta in February 2020, I received an email from David. He had a lot of experience in mobile app development and was interested in joining me in creating auToDo. He also had a great vision for auToDo’s future and quickly became an essential part of its development. His strategic vision for auToDo and technical knowledge are a crucial component of its success.
- Jonathan Bayless – Cofounder
- David Pham-Van – Cofounder


--- layout: cds/home title: 'Home' lang: en ref: home description: "People expect government services to be simple and easy to use. The Canadian Digital Service (CDS) is bringing together the skills and expertise needed to help government design and build better services." trans_url: '/' ---
We are focused on delivery: helping government design and build better services.
We are agile and iterate based on user feedback. We learn by doing.
Learn more about how we workWe are a building a team with diverse skills and backgrounds, and we’re recruiting! Learn more about our team: about the designers, developers, UX researchers, policy hackers, data specialists, and communicators who make up CDS.
Informed by similar initiatives in the U.S. (the U.S. Digital Service/18F) and the United Kingdom (the Government Digital Service), the Government will adopt new ways of serving Canadians. Better use of digital technologies could improve the ways in which businesses can access government services, speed up immigration processing times through better-integrated information, or make it easier for Canadians to access benefits or tax information online.
Over the past year, we met with people from coast to coast to coast, including from start-ups, civic tech organizations, academia, and municipal and provincial governments. We welcome your feedback as we continue our digital journey here in Canada.
Read the Engagement Report


-
Easy to modify
Twone is made with you in mind. Every piece of code is commented making it easy for you to quickly modify the theme.
-
High quality
We don't want to make themes just for fun, we want them to be special. Quality before quantity.
-
Support 24/7
We will always be here for you when you need it the most. If you have any questions just get in touch with us.
-
Every feature you need
Ok.. it doesn't have every feature but it has the most used features you need in a landing page.
-
Beautifully made
It you are going to make something, make it pretty. Twone was built with this principle in mind.
-
Constant updates
If we detect anything that needs to be fixed or if you have suggestions for our themes, we will make it happen.
Check the prices of our playground.
| Basic |
$0/mo Sign-up |
1 Gb Disk Space | 0 Subdomains | 5 MySQL Databases | Unlimited Users |
|---|---|---|---|---|---|
| Personal |
$9,99/mo Sign-up |
10 Gb Disk Space | 1 Subdomains | 15 MySQL Databases | Unlimited Users |
| Team |
$19,99/mo Sign-up |
100 Gb Disk Space | 10 Subdomains | 50 MySQL Databases | Unlimited Users |
| Premium |
$39,99/mo Sign-up |
500 Gb Disk Space | 30 Subdomains | 70 MySQL Databases | Unlimited Users |
| Gold |
$59,99/mo Sign-up |
1000 Gb Disk Space | 50 Subdomains | 150 MySQL Databases | Unlimited Users |
Love at first sight. Made for your needs.
Twone is made with you in mind. Every piece of code is commented making it easy for you to quickly modify the theme. We don't want to make themes just for fun, we want them to be special. Quality before quantity.
The awesome key features of Twone landing page.
Twone is made with you in mind. Every piece of code is commented making it easy for you to quickly modify the theme. We don't want to make themes just for fun, we want them to be special. Quality before quantity.
Buy twone theme now!Know the team behind the magic.
-
She likes to drink a beer with her close friends, walk and have fun. She has a dog called Java!
-
She likes to drink a beer with her close friends, walk and have fun. She has a dog called Java!
-
She likes to drink a beer with her close friends, walk and have fun. She has a dog called Java!
-
She likes to drink a beer with her close friends, walk and have fun. She has a dog called Java!
-
She likes to drink a beer with her close friends, walk and have fun. She has a dog called Java!
-
She likes to drink a beer with her close friends, walk and have fun. She has a dog called Java!
-
She likes to drink a beer with her close friends, walk and have fun. She has a dog called Java!
We are available to you at any time.
Twone
Cool talent Street
Lisbon, 6000
Portugal
123.456.7890


Simple Serverless ETLs in AWS
02:15 PM - 03:10 PM on July 17, 2016, Room CR4Ryan Tuck
- Audience level:
- intermediate
Description
A brief introduction to leveraging AWS services to design simple and powerful python-based ETLs without ever SSHing onto a server. Learn about running code in response to events with Lambda, and configuring a cron, notifications, metrics collection, and database both in-browser and with boto3, AWS's python SDK.
Abstract
The rise of cloud computing platforms such as AWS has enabled developers to build awesome tools and rich applications with little-to-no DevOps experience. This opens up new possibilities for data engineers, data scientists, and developers at large to focus more on writing code and less on managing servers. This talk will give a simple overview of how to configure python-based ETLs around AWS Lambda using boto3, and highlight the benefits of going serverless.
The end result of this talk will be a simple ETL that retrieves records from an API and inserts them into a database. We'll set the job to repeat at a given interval, enable email notifications, view metrics like invocation and error counts, and expose an API endpoint for running the job on-demand. We'll show how to do this all in the browser via the AWS console as well as configuring deployment using AWS's python SDK, boto3.
As a data engineer who learned to love tools like ansible and nginx after being inadvertently thrown into the world of DevOps, I've come to appreciate how simple (and affordable) infrastructure becomes upon leveraging AWS's services. I believe cloud computing services will continue to lower the barrier to entry for developers who want to leverage the power of the cloud without requiring a traditional DevOps skillset, and provide a proof of concept that it can be done.


@require(reason) @extends("shared/layout.html") @def content():
@{_('Click the link in the email we sent to you. You may want to check your spam folder, just in case ;)')}
@if reason == 'registration':@{_('After you click the link, you will be able to log in and start using %(site)s!', site=config.site.name)}
@end @if reason == 'email_change':@{_('The new email address on your account will take effect after you open the link.')}
@end