|
libcoap
4.2.0
|
Generic resource handling. More...
#include <assert.h>
#include "uthash.h"
#include "async.h"
#include "str.h"
#include "pdu.h"
#include "net.h"
#include "subscribe.h"
Go to the source code of this file.
Data Structures | |
| struct | coap_attr_t |
| struct | coap_resource_t |
Macros | |
| #define | COAP_RESOURCE_CHECK_TIME 2 |
| The interval in seconds to check if resources have changed. More... | |
| #define | COAP_ATTR_FLAGS_RELEASE_NAME 0x1 |
| #define | COAP_ATTR_FLAGS_RELEASE_VALUE 0x2 |
| #define | COAP_RESOURCE_FLAGS_RELEASE_URI 0x1 |
| The URI passed to coap_resource_init() is free'd by coap_delete_resource(). More... | |
| #define | COAP_RESOURCE_FLAGS_NOTIFY_NON 0x0 |
| Notifications will be sent non-confirmable by default. More... | |
| #define | COAP_RESOURCE_FLAGS_NOTIFY_CON 0x2 |
| Notifications will be sent confirmable by default. More... | |
| #define | COAP_PRINT_STATUS_MASK 0xF0000000u |
| #define | COAP_PRINT_OUTPUT_LENGTH(v) ((v) & ~COAP_PRINT_STATUS_MASK) |
| #define | COAP_PRINT_STATUS_ERROR 0x80000000u |
| #define | COAP_PRINT_STATUS_TRUNC 0x40000000u |
| #define | RESOURCES_ADD(r, obj) HASH_ADD(hh, (r), uri_path->s[0], (obj)->uri_path->length, (obj)) |
| #define | RESOURCES_DELETE(r, obj) HASH_DELETE(hh, (r), (obj)) |
| #define | RESOURCES_ITER(r, tmp) |
| #define | RESOURCES_FIND(r, k, res) |
Typedefs | |
| typedef void(* | coap_method_handler_t) (coap_context_t *, struct coap_resource_t *, coap_session_t *, coap_pdu_t *, coap_binary_t *, coap_string_t *, coap_pdu_t *) |
| Definition of message handler function (. More... | |
| typedef struct coap_attr_t | coap_attr_t |
| typedef struct coap_resource_t | coap_resource_t |
| typedef unsigned int | coap_print_status_t |
| Status word to encode the result of conditional print or copy operations such as coap_print_link(). More... | |
Functions | |
| coap_resource_t * | coap_resource_init (coap_str_const_t *uri_path, int flags) |
Creates a new resource object and initializes the link field to the string uri_path . More... | |
| coap_resource_t * | coap_resource_unknown_init (coap_method_handler_t put_handler) |
| Creates a new resource object for the unknown resource handler with support for PUT. More... | |
| COAP_STATIC_INLINE void | coap_resource_set_mode (coap_resource_t *resource, int mode) |
Sets the notification message type of resource resource to given mode . More... | |
| COAP_STATIC_INLINE void | coap_resource_set_userdata (coap_resource_t *r, void *data) |
| Sets the user_data. More... | |
| COAP_STATIC_INLINE void * | coap_resource_get_userdata (coap_resource_t *r) |
| Gets the user_data. More... | |
| void | coap_add_resource (coap_context_t *context, coap_resource_t *resource) |
Registers the given resource for context . More... | |
| int | coap_delete_resource (coap_context_t *context, coap_resource_t *resource) |
Deletes a resource identified by resource . More... | |
| void | coap_delete_all_resources (coap_context_t *context) |
Deletes all resources from given context and frees their storage. More... | |
| coap_attr_t * | coap_add_attr (coap_resource_t *resource, coap_str_const_t *name, coap_str_const_t *value, int flags) |
Registers a new attribute with the given resource . More... | |
| coap_attr_t * | coap_find_attr (coap_resource_t *resource, coap_str_const_t *name) |
Returns resource's coap_attr_t object with given name if found, NULL otherwise. More... | |
| void | coap_delete_attr (coap_attr_t *attr) |
| Deletes an attribute. More... | |
| coap_print_status_t | coap_print_link (const coap_resource_t *resource, unsigned char *buf, size_t *len, size_t *offset) |
| Writes a description of this resource in link-format to given text buffer. More... | |
| void | coap_register_handler (coap_resource_t *resource, unsigned char method, coap_method_handler_t handler) |
Registers the specified handler as message handler for the request type method . More... | |
| coap_resource_t * | coap_get_resource_from_uri_path (coap_context_t *context, coap_str_const_t *uri_path) |
Returns the resource identified by the unique string uri_path . More... | |
| coap_subscription_t * | coap_add_observer (coap_resource_t *resource, coap_session_t *session, const coap_binary_t *token, coap_string_t *query, int has_block2, coap_block_t block2) |
Adds the specified peer as observer for resource . More... | |
| coap_subscription_t * | coap_find_observer (coap_resource_t *resource, coap_session_t *session, const coap_binary_t *token) |
Returns a subscription object for given peer . More... | |
| void | coap_touch_observer (coap_context_t *context, coap_session_t *session, const coap_binary_t *token) |
| Marks an observer as alive. More... | |
| int | coap_delete_observer (coap_resource_t *resource, coap_session_t *session, const coap_binary_t *token) |
Removes any subscription for observer from resource and releases the allocated storage. More... | |
| void | coap_delete_observers (coap_context_t *context, coap_session_t *session) |
Removes any subscription for session and releases the allocated storage. More... | |
| void | coap_check_notify (coap_context_t *context) |
| Checks for all known resources, if they are dirty and notifies subscribed observers. More... | |
| coap_print_status_t | coap_print_wellknown (coap_context_t *, unsigned char *, size_t *, size_t, coap_opt_t *) |
Prints the names of all known resources to buf . More... | |
| void | coap_handle_failed_notify (coap_context_t *, coap_session_t *, const coap_binary_t *) |
| COAP_STATIC_INLINE void | coap_resource_set_get_observable (coap_resource_t *resource, int mode) |
Set whether a resource is observable. More... | |
| int | coap_resource_notify_observers (coap_resource_t *resource, const coap_string_t *query) |
Initiate the sending of an Observe packet for all observers of resource , optionally matching query if not NULL. More... | |
| COAP_STATIC_INLINE coap_str_const_t * | coap_resource_get_uri_path (coap_resource_t *resource) |
Get the UriPath from a resource . More... | |
| COAP_DEPRECATED int | coap_resource_set_dirty (coap_resource_t *r, const coap_string_t *query) |
Generic resource handling.
Definition in file resource.h.
| #define COAP_ATTR_FLAGS_RELEASE_NAME 0x1 |
Definition at line 44 of file resource.h.
| #define COAP_ATTR_FLAGS_RELEASE_VALUE 0x2 |
Definition at line 45 of file resource.h.
| #define COAP_PRINT_OUTPUT_LENGTH | ( | v | ) | ((v) & ~COAP_PRINT_STATUS_MASK) |
Definition at line 314 of file resource.h.
| #define COAP_PRINT_STATUS_ERROR 0x80000000u |
Definition at line 315 of file resource.h.
| #define COAP_PRINT_STATUS_MASK 0xF0000000u |
Definition at line 313 of file resource.h.
| #define COAP_PRINT_STATUS_TRUNC 0x40000000u |
Definition at line 316 of file resource.h.
| #define COAP_RESOURCE_CHECK_TIME 2 |
The interval in seconds to check if resources have changed.
Definition at line 22 of file resource.h.
| #define COAP_RESOURCE_FLAGS_NOTIFY_CON 0x2 |
Notifications will be sent confirmable by default.
RFC 7641 Section 4.5 https://tools.ietf.org/html/rfc7641#section-4.5
Definition at line 67 of file resource.h.
| #define COAP_RESOURCE_FLAGS_NOTIFY_NON 0x0 |
Notifications will be sent non-confirmable by default.
RFC 7641 Section 4.5 https://tools.ietf.org/html/rfc7641#section-4.5
Definition at line 61 of file resource.h.
| #define COAP_RESOURCE_FLAGS_RELEASE_URI 0x1 |
The URI passed to coap_resource_init() is free'd by coap_delete_resource().
Definition at line 55 of file resource.h.
| #define RESOURCES_ADD | ( | r, | |
| obj | |||
| ) | HASH_ADD(hh, (r), uri_path->s[0], (obj)->uri_path->length, (obj)) |
Definition at line 449 of file resource.h.
| #define RESOURCES_DELETE | ( | r, | |
| obj | |||
| ) | HASH_DELETE(hh, (r), (obj)) |
Definition at line 452 of file resource.h.
| #define RESOURCES_FIND | ( | r, | |
| k, | |||
| res | |||
| ) |
Definition at line 459 of file resource.h.
| #define RESOURCES_ITER | ( | r, | |
| tmp | |||
| ) |
Definition at line 455 of file resource.h.
| typedef struct coap_attr_t coap_attr_t |
| typedef void(* coap_method_handler_t) (coap_context_t *, struct coap_resource_t *, coap_session_t *, coap_pdu_t *, coap_binary_t *, coap_string_t *, coap_pdu_t *) |
Definition of message handler function (.
Definition at line 36 of file resource.h.
| typedef unsigned int coap_print_status_t |
Status word to encode the result of conditional print or copy operations such as coap_print_link().
The lower 28 bits of coap_print_status_t are used to encode the number of characters that has actually been printed, bits 28 to 31 encode the status. When COAP_PRINT_STATUS_ERROR is set, an error occurred during output. In this case, the other bits are undefined. COAP_PRINT_STATUS_TRUNC indicates that the output is truncated, i.e. the printing would have exceeded the current buffer.
Definition at line 311 of file resource.h.
| typedef struct coap_resource_t coap_resource_t |
| coap_attr_t* coap_add_attr | ( | coap_resource_t * | resource, |
| coap_str_const_t * | name, | ||
| coap_str_const_t * | value, | ||
| int | flags | ||
| ) |
Registers a new attribute with the given resource
.
As the attribute's coap_str_const_ fields will point to name
and value
the caller must ensure that these pointers are valid during the attribute's lifetime.
If the name
and/or value
string is going to be freed off at attribute removal time by the setting of COAP_ATTR_FLAGS_RELEASE_NAME or COAP_ATTR_FLAGS_RELEASE_VALUE in flags
, then either the 's' variable of coap_str_const_t has to point to constant text, or point to data within the allocated coap_str_const_t parameter.
| resource | The resource to register the attribute with. |
| name | The attribute's name as a string. |
| value | The attribute's value as a string or NULL if none. |
| flags | Flags for memory management (in particular release of memory). Possible values: COAP_ATTR_FLAGS_RELEASE_NAME If this flag is set, the name passed to coap_add_attr_release() is free'd when the attribute is deleted COAP_ATTR_FLAGS_RELEASE_VALUE If this flag is set, the value passed to coap_add_attr_release() is free'd when the attribute is deleted |
NULL
on error. Definition at line 352 of file resource.c.
| coap_subscription_t* coap_add_observer | ( | coap_resource_t * | resource, |
| coap_session_t * | session, | ||
| const coap_binary_t * | token, | ||
| coap_string_t * | query, | ||
| int | has_block2, | ||
| coap_block_t | block2 | ||
| ) |
Adds the specified peer as observer for resource
.
The subscription is identified by the given token
. This function returns the registered subscription information if the observer
has been added, or NULL
on error.
| resource | The observed resource. |
| session | The observer's session |
| token | The token that identifies this subscription. |
| query | The query string, if any. subscription will take ownership of the string. |
| has_block2 | If Option Block2 defined. |
| block2 | Contents of Block2 if Block 2 defined. |
NULL
on error. Definition at line 623 of file resource.c.
| void coap_add_resource | ( | coap_context_t * | context, |
| coap_resource_t * | resource | ||
| ) |
Registers the given resource
for context
.
The resource must have been created by coap_resource_init() or coap_resource_unknown_init(), the storage allocated for the resource will be released by coap_delete_resource().
| context | The context to use. |
| resource | The resource to store. |
Definition at line 452 of file resource.c.
| void coap_check_notify | ( | coap_context_t * | context | ) |
Checks for all known resources, if they are dirty and notifies subscribed observers.
Definition at line 869 of file resource.c.
| void coap_delete_all_resources | ( | coap_context_t * | context | ) |
Deletes all resources from given context
and frees their storage.
| context | The CoAP context with the resources to be deleted. |
Definition at line 494 of file resource.c.
| void coap_delete_attr | ( | coap_attr_t * | attr | ) |
Deletes an attribute.
Note: This is for internal use only, as it is not deleted from its chain.
| attr | Pointer to a previously created attribute. |
Definition at line 406 of file resource.c.
| int coap_delete_observer | ( | coap_resource_t * | resource, |
| coap_session_t * | session, | ||
| const coap_binary_t * | token | ||
| ) |
Removes any subscription for observer
from resource
and releases the allocated storage.
The result is 1
if an observation relationship with observer
and token
existed, 0
otherwise.
| resource | The observed resource. |
| session | The observer's session. |
| token | The token that identifies this subscription or NULL for any token. |
1
if the observer has been deleted, 0
otherwise. Definition at line 703 of file resource.c.
| void coap_delete_observers | ( | coap_context_t * | context, |
| coap_session_t * | session | ||
| ) |
Removes any subscription for session
and releases the allocated storage.
| context | The CoAP context to use. |
| session | The observer's session. |
Definition at line 729 of file resource.c.
| int coap_delete_resource | ( | coap_context_t * | context, |
| coap_resource_t * | resource | ||
| ) |
Deletes a resource identified by resource
.
The storage allocated for that resource is freed, and removed from the context.
| context | The context where the resources are stored. |
| resource | The resource to delete. |
1
if the resource was found (and destroyed), 0
otherwise. Definition at line 474 of file resource.c.
| coap_attr_t* coap_find_attr | ( | coap_resource_t * | resource, |
| coap_str_const_t * | name | ||
| ) |
Returns resource's
coap_attr_t object with given name
if found, NULL
otherwise.
| resource | The resource to search for attribute name . |
| name | Name of the requested attribute as a string. |
name
or NULL
if none was found. Definition at line 389 of file resource.c.
| coap_subscription_t* coap_find_observer | ( | coap_resource_t * | resource, |
| coap_session_t * | session, | ||
| const coap_binary_t * | token | ||
| ) |
Returns a subscription object for given peer
.
| resource | The observed resource. |
| session | The observer's session |
| token | The token that identifies this subscription or NULL for any token. |
NULL
otherwise. Definition at line 587 of file resource.c.
| coap_resource_t* coap_get_resource_from_uri_path | ( | coap_context_t * | context, |
| coap_str_const_t * | uri_path | ||
| ) |
Returns the resource identified by the unique string uri_path
.
If no resource was found, this function returns NULL
.
| context | The context to look for this resource. |
| uri_path | The unique string uri of the resource. |
NULL
if not found. Definition at line 515 of file resource.c.
| void coap_handle_failed_notify | ( | coap_context_t * | , |
| coap_session_t * | , | ||
| const coap_binary_t * | |||
| ) |
Definition at line 930 of file resource.c.
| coap_print_status_t coap_print_link | ( | const coap_resource_t * | resource, |
| unsigned char * | buf, | ||
| size_t * | len, | ||
| size_t * | offset | ||
| ) |
Writes a description of this resource in link-format to given text buffer.
len
must be initialized to the maximum length of buf
and will be set to the number of characters actually written if successful. This function returns 1
on success or 0
on error.
| resource | The resource to describe. |
| buf | The output buffer to write the description to. |
| len | Must be initialized to the length of buf and will be set to the length of the printed link description. |
| offset | The offset within the resource description where to start writing into buf . This is useful for dealing with the Block2 option. offset is updated during output as it is consumed. |
buffer
. The flag COAP_PRINT_STATUS_TRUNC indicates that the output has been truncated. Definition at line 524 of file resource.c.
| coap_print_status_t coap_print_wellknown | ( | coap_context_t * | context, |
| unsigned char * | buf, | ||
| size_t * | buflen, | ||
| size_t | offset, | ||
| coap_opt_t * | query_filter | ||
| ) |
Prints the names of all known resources to buf
.
This function sets buflen
to the number of bytes actually written and returns 1
on succes. On error, the value in buflen
is undefined and the return value will be 0
.
| context | The context with the resource map. |
| buf | The buffer to write the result. |
| buflen | Must be initialized to the maximum length of buf and will be set to the length of the well-known response on return. |
| offset | The offset in bytes where the output shall start and is shifted accordingly with the characters that have been processed. This parameter is used to support the block option. |
| query_filter | A filter query according to Link Format |
buf
. COAP_PRINT_STATUS_TRUNC is set when the output has been truncated. Definition at line 169 of file resource.c.
| void coap_register_handler | ( | coap_resource_t * | resource, |
| unsigned char | method, | ||
| coap_method_handler_t | handler | ||
| ) |
Registers the specified handler
as message handler for the request type method
.
| resource | The resource for which the handler shall be registered. |
| method | The CoAP request method to handle. |
| handler | The handler to register with resource . |
Definition at line 577 of file resource.c.
| COAP_STATIC_INLINE coap_str_const_t* coap_resource_get_uri_path | ( | coap_resource_t * | resource | ) |
Get the UriPath from a resource
.
| resource | The CoAP resource to check. |
NULL
otherwise. Definition at line 511 of file resource.h.
| COAP_STATIC_INLINE void* coap_resource_get_userdata | ( | coap_resource_t * | r | ) |
Gets the user_data.
The user_data is exclusively used by the library-user and can be used as context in the handler functions.
| r | Resource to retrieve the user_darta from |
Definition at line 213 of file resource.h.
| coap_resource_t* coap_resource_init | ( | coap_str_const_t * | uri_path, |
| int | flags | ||
| ) |
Creates a new resource object and initializes the link field to the string uri_path
.
This function returns the new coap_resource_t object.
If the string is going to be freed off by coap_delete_resource() when COAP_RESOURCE_FLAGS_RELEASE_URI is set in flags
, then either the 's' variable of coap_str_const_t has to point to constant text, or point to data within the allocated coap_str_const_t parameter.
| uri_path | The string URI path of the new resource. |
| flags | Flags for memory management (in particular release of memory). Possible values: COAP_RESOURCE_FLAGS_RELEASE_URI If this flag is set, the URI passed to coap_resource_init() is free'd by coap_delete_resource() COAP_RESOURCE_FLAGS_NOTIFY_CON If this flag is set, coap-observe notifications will be sent confirmable by default. COAP_RESOURCE_FLAGS_NOTIFY_NON (default) If this flag is set, coap-observe notifications will be sent non-confirmable by default. If flags is set to 0 then the COAP_RESOURCE_FLAGS_NOTIFY_NON is considered. |
NULL
on error. Definition at line 300 of file resource.c.
| int coap_resource_notify_observers | ( | coap_resource_t * | resource, |
| const coap_string_t * | query | ||
| ) |
Initiate the sending of an Observe packet for all observers of resource
, optionally matching query
if not NULL.
| resource | The CoAP resource to use. |
| query | The Query to match against or NULL |
1
if the Observe has been triggered, 0
otherwise. Definition at line 837 of file resource.c.
| COAP_DEPRECATED int coap_resource_set_dirty | ( | coap_resource_t * | r, |
| const coap_string_t * | query | ||
| ) |
Definition at line 832 of file resource.c.
| COAP_STATIC_INLINE void coap_resource_set_get_observable | ( | coap_resource_t * | resource, |
| int | mode | ||
| ) |
Set whether a resource
is observable.
If the resource is observable and the client has set the COAP_OPTION_OBSERVE in a request packet, then whenever the state of the resource changes (a call to coap_resource_trigger_observe()), an Observer response will get sent.
| resource | The CoAP resource to use. |
| mode | 1 if Observable is to be set, 0 otherwise. |
Definition at line 486 of file resource.h.
| COAP_STATIC_INLINE void coap_resource_set_mode | ( | coap_resource_t * | resource, |
| int | mode | ||
| ) |
Sets the notification message type of resource resource
to given mode
.
| resource | The resource to update. |
| mode | Must be one of COAP_RESOURCE_FLAGS_NOTIFY_NON or COAP_RESOURCE_FLAGS_NOTIFY_CON . |
Definition at line 185 of file resource.h.
| COAP_STATIC_INLINE void coap_resource_set_userdata | ( | coap_resource_t * | r, |
| void * | data | ||
| ) |
Sets the user_data.
The user_data is exclusively used by the library-user and can be used as context in the handler functions.
| r | Resource to attach the data to |
| data | Data to attach to the user_data field. This pointer is only used for storage, the data remains under user control |
Definition at line 200 of file resource.h.
| coap_resource_t* coap_resource_unknown_init | ( | coap_method_handler_t | put_handler | ) |
Creates a new resource object for the unknown resource handler with support for PUT.
In the same way that additional handlers can be added to the resource created by coap_resource_init() by using coap_register_handler(), POST, GET, DELETE etc. handlers can be added to this resource. It is the responsibility of the application to manage the unknown resources by either creating new resources with coap_resource_init() (which should have a DELETE handler specified for the resource removal) or by maintaining an active resource list.
Note: There can only be one unknown resource handler per context - attaching a new one overrides the previous definition.
Note: It is not possible to observe the unknown resource with a GET request
This function returns the new coap_resource_t object.
| put_handler | The PUT handler to register with resource for unknown Uri-Path. |
NULL
on error. Definition at line 334 of file resource.c.
| void coap_touch_observer | ( | coap_context_t * | context, |
| coap_session_t * | session, | ||
| const coap_binary_t * | token | ||
| ) |
Marks an observer as alive.
| context | The CoAP context to use. |
| session | The observer's session |
| token | The corresponding token that has been used for the subscription. |
Definition at line 690 of file resource.c.


Exploring Deque in Swift Collections
Deque (should be pronounced as “deck”) is a collection implementing double-ended queues. Deques are similar to arrays, but they have efficient insertions and removal of elements at the beginning and at the end.
The indexing semantics are integer indices that are the same as arrays. Now let’s see a sample implementation of deque.
The above code implements a deque of colors with the strings yellow and orange.
Deque operations
Now let’s see some operations or methods unique to deques.
1. prepend - Adding an element at the beginning of the deque.
2. append - Adding an element to the end of the deque.
3. popFirst - Removal of an element from the beginning of the deque.
4. popLast - Removal of an element from the beginning of the deque.
Other operations
Addition to deque specific methods, there are some common methods like insert, sort, etc.,
Key highlights of a deque
- Deque implements value semantics.
- Deque conforms to RangeReplaceableCollection, MutableCollection, and RandomAccessCollection.
- Deque stores its elements in a circular buffer. So that insertions and deletions at the beginning and end are efficient.
The Gotchas
Every data structure has its pros and cons. Likewise, there are some gotchas of deque which we have to know.
- The storage in a deque is discontiguous, whereas, in an array, it is contiguous. Because of this behavior, insertions in the front in a deque are faster, and in arrays, random-access lookups are faster. So it is not recommended to replace all arrays with deques in the code. We need to know when to use arrays and when to use deques.
Closing thoughts
Deque is an excellent addition to Swift. Likewise, Ordered Set and Ordered Dictionary are also included in Swift collections. I will be writing more about them in the upcoming articles. I hope you like this article. Do let me know your thoughts about the deque data structure in the comments below.
References
[1] https://swift.org/blog/swift-collections/ [2] https://github.com/apple/swift-collections/blob/main/Documentation/Deque.md
About the author
- Rizwan Ahmed - iOS Engineer. Twitter - https://twitter.com/rizwanasifahmed
More articles
- Different methods to remove the last item from an array in Swift
- Closure based actions in UIButton
- Replacing UIImagePickerController with PHPickerViewController
- Embracing Localization in Image Assets
- An effective way to clear entire Userdefaults in Swift
- Simulating remote push notifications in a simulator
Like our articles? Support us!


Foods
Nutritional Assessment
View Detail
or
Create New
#
Menu
Times
Quantity
Unit
Advice
#
Select
Select
Add


Swiss Firm Zurich Airport Outbids DIAL, Adani To Develop Jewar Airport
by PTIBookmark
The Zurich Airport International AG was on Friday selected as the concessionaire for developing the Jewar airport, billed to be the biggest airport in India upon completion, officials said.
The Switzerland-headquartered company made the highest per passenger bid for the airport, outbidding competitors like Delhi International Airport Ltd., Adani Enterprises Ltd., and Anchorage Infrastructure Investments Holdings Ltd., the officials said.
Jewar Airport or the Noida International Greenfield Airport will come up in 5,000 hectare area when fully constructed and is estimated to cost Rs 29,560 crore, Nodal Officer for the Project, Shailendra Bhatia said.
"Zurich Airport International AG has made the highest bid for developing the Jewar airport and has been selected as the concessionaire for the airport," Bhatia said.
A global tender was floated to hire a developer for the proposed airport on May 30 by the NIAL, an agency floated by the Uttar Pradesh government for managing the mega project in Gautam Buddh Nagar district.
The airport, the third in the national capital region after Delhi's Indira Gandhi International airport and Ghaziabad's Hindon airport, is touted to have six to eight runways, the most in India, when fully built, according to officials.
The first phase of the airport would be spread over 1,334 hectare and cost Rs 4,588 crore as it is expected to be completed by 2023, the officials said.


Print/Export Reports to file
After accessing an existing report (consult
View Reports help
item for instruction on how to access reports), reports can be printed or exported to file.
Print a report
- On the top of the report, click on Printable version; a print-ready version of the report will be presented.
- Clicking on Send to printer will print the report immediately.
Export a report to file
- On the bottom of the report, click on Export ->; three additional buttons will replace the clicked on.
- Clicking on:
- Export XLS will export the report to a Microsoft Excel file.
- Export CSV will export the report to a Comma Separated Values file.
- Export PDF will export the report to a Portable Document Format file.


{% extends "2016-base.html" %} {% block body %}
Markdown files can be rendered as html:
RNA-Seq data analysis:
PSU BOX with all content:


Home
Home
About Me
Projects
Blog
Contact
Welcome to my page
I am an aspiring web developer, energy engineer, and soccer enthusiast
Thanks for visiting.


LDIF
Section: File Formats (5)Updated: 2010/06/30
Index Return to Main Contents
NAME
ldif - LDAP Data Interchange FormatDESCRIPTION
The LDAP Data Interchange Format (LDIF) is used to represent LDAP entries and change records in text form. LDAP tools, such as ldapadd(1) and ldapsearch(1), read and write LDIF entry records. ldapmodify(1) reads LDIF change records.This manual page provides a basic description of LDIF. A formal specification of LDIF is published in RFC 2849.
ENTRY RECORDS
LDIF entry records are used to represent directory entries. The basic form of an entry record is:
dn: <distinguished name> <attrdesc>: <attrvalue> <attrdesc>: <attrvalue> <attrdesc>:: <base64-encoded-value> <attrdesc>:< <URL> ...
The value may be specified as UTF-8 text or as base64 encoded data, or a URI may be provided to the location of the attribute value.
A line may be continued by starting the next line with a single space or tab, e.g.,
dn: cn=Barbara J Jensen,dc=exam ple,dc=com
Lines beginning with a sharp sign ('#') are ignored.
Multiple attribute values are specified on separate lines, e.g.,
cn: Barbara J Jensen cn: Babs Jensen
If an value contains a non-printing character, or begins with a space or a colon ':', the <attrtype> is followed by a double colon and the value is encoded in base 64 notation. e.g., the value " begins with a space" would be encoded like this:
cn:: IGJlZ2lucyB3aXRoIGEgc3BhY2U=
If the attribute value is located in a file, the <attrtype> is followed by a ':<' and a file: URI. e.g., the value contained in the file /tmp/value would be listed like this:
cn:< file:///tmp/valueOther URI schemes (ftp,http) may be supported as well.
Multiple entries within the same LDIF file are separated by blank lines.
ENTRY RECORD EXAMPLE
Here is an example of an LDIF file containing three entries.
dn: cn=Barbara J Jensen,dc=example,dc=com cn: Barbara J Jensen cn: Babs Jensen objectclass: person description:< file:///tmp/babs sn: Jensen dn: cn=Bjorn J Jensen,dc=example,dc=com cn: Bjorn J Jensen cn: Bjorn Jensen objectclass: person sn: Jensen dn: cn=Jennifer J Jensen,dc=example,dc=com cn: Jennifer J Jensen cn: Jennifer Jensen objectclass: person sn: Jensen jpegPhoto:: /9j/4AAQSkZJRgABAAAAAQABAAD/2wBDABALD A4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQ ERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVG ...
Note that the description in Barbara Jensen's entry is read from file:///tmp/babs and the jpegPhoto in Jennifer Jensen's entry is encoded using base 64.
CHANGE RECORDS
LDIF change records are used to represent directory change requests. Each change record starts with line indicating the distinguished name of the entry being changed:
dn: <distinguishedname>
changetype: <[modify|add|delete|modrdn]>
Finally, the change information itself is given, the format of which depends on what kind of change was specified above. For a changetype of modify, the format is one or more of the following:
add: <attributetype> <attrdesc>: <value1> <attrdesc>: <value2> ... -
Or, for a replace modification:
replace: <attributetype> <attrdesc>: <value1> <attrdesc>: <value2> ... -
If no attributetype lines are given to replace, the entire attribute is to be deleted (if present).
Or, for a delete modification:
delete: <attributetype> <attrdesc>: <value1> <attrdesc>: <value2> ... -
If no attributetype lines are given to delete, the entire attribute is to be deleted.
For a changetype of add, the format is:
<attrdesc1>: <value1> <attrdesc1>: <value2> ... <attrdescN>: <value1> <attrdescN>: <value2>
For a changetype of modrdn or moddn, the format is:
newrdn: <newrdn> deleteoldrdn: 0 | 1 newsuperior: <DN>
where a value of 1 for deleteoldrdn means to delete the values forming the old rdn from the entry, and a value of 0 means to leave the values as non-distinguished attributes in the entry. The newsuperior line is optional and, if present, specifies the new superior to move the entry to.
For a changetype of delete, no additional information is needed in the record.
Note that attribute values may be presented using base64 or in files as described for entry records. Lines in change records may be continued in the manner described for entry records as well.
CHANGE RECORD EXAMPLE
The following sample LDIF file contains a change record of each type of change.
dn: cn=Babs Jensen,dc=example,dc=com changetype: add objectclass: person objectclass: extensibleObject cn: babs cn: babs jensen sn: jensen dn: cn=Babs Jensen,dc=example,dc=com changetype: modify add: givenName givenName: Barbara givenName: babs - replace: description description: the fabulous babs - delete: sn sn: jensen - dn: cn=Babs Jensen,dc=example,dc=com changetype: modrdn newrdn: cn=Barbara J Jensen deleteoldrdn: 0 newsuperior: ou=People,dc=example,dc=com dn: cn=Barbara J Jensen,ou=People,dc=example,dc=com changetype: delete
INCLUDE STATEMENT
The LDIF parser has been extended to support an include statement for referencing other LDIF files. The include statement must be separated from other records by a blank line. The referenced file is specified using a file: URI and all of its contents are incorporated as if they were part of the original LDIF file. As above, other URI schemes may be supported. For example:
dn: dc=example,dc=com objectclass: domain dc: example include: file:///tmp/example.com.ldif dn: dc=example,dc=org objectclass: domain dc: exampleThis feature is not part of the LDIF specification in RFC 2849 but is expected to appear in a future revision of this spec. It is supported by the ldapadd(1), ldapmodify(1), and slapadd(8) commands.
SEE ALSO
ldap(3), ldapsearch(1), ldapadd(1), ldapmodify(1), slapadd(8), slapcat(8), slapd-ldif(5)."LDAP Data Interchange Format," Good, G., RFC 2849.
ACKNOWLEDGEMENTS
OpenLDAP Software is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. OpenLDAP Software is derived from University of Michigan LDAP 3.3 Release.
Index
- NAME
- DESCRIPTION
- ENTRY RECORDS
- ENTRY RECORD EXAMPLE
- CHANGE RECORDS
- CHANGE RECORD EXAMPLE
- INCLUDE STATEMENT
- SEE ALSO
- ACKNOWLEDGEMENTS
This document was created by man2html, using the manual pages.
Time: 05:34:00 GMT, December 24, 2015


{% extends 'layout.html' %} {% block pageTitle %} Your application could not be completed {% endblock %} {% block content %}
We cannot currently confirm if you are eligible to get help to buy food and milk.
You should be eligible if your family’s take-home pay is £408 or less per month.
To confirm this, you need to send us a copy of your last benefits award notice. The copy can either be a scan, photocopy or photo of the original document.
Send the copy with your reference number to us either by:
We'll check the copy of your benefits award notice and reference number. We'll then contact you to confirm if you're eligible or not.
If you're eligible, we'll:
What did you think of this service? (opens in a new window) (takes 30 seconds).


Queen’s granddaughter Zara Tindall appointed Cheltenham Racecourse director
LONDON, Nov 14 — Olympic medallist Zara Tindall, the eldest granddaughter of Britain’s Queen Elizabeth, has become the first member of the royal family to be appointed to the Cheltenham Racecourse committee, the Jockey Club announced today.
Tindall, 38, a silver medallist in team eventing at the 2012 London Olympics, was appointed to the non-executive role of director and will help the chairman and executive in operating the racecourse.
She is set to begin her new role on January 1, 2020.
“I’m passionate about horse racing, particularly on the jumps side and the absolute pinnacle of that is Cheltenham,” Tindall said in a statement on The Jockey Club website.
“Racing is simply the most exciting sport and it’s open to all. It’s an honour... to get involved in a more formal capacity and I look forward to doing my bit to support the executive team in the years to come.”
Tindall, who won a gold medal in the 2006 eventing world championships in Aachen, Germany, will also help to promote Britain’s equestrian team ahead of the 2020 Tokyo Olympics. — Reuters


The GStreamer Bad Plug-ins package contains a set of plug-ins that aren't up to par compared to the rest. They might be close to being good quality, but they're missing something - be it a good code review, some documentation, a set of tests, a real live maintainer, or some actual wide use.
This package is known to build and work properly using an LFS-10.1 platform.
Download (HTTP): https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.18.4.tar.xz
Download MD5 sum: 8a73b497613a9f778e880b8a9eb9c1a3
Download size: 5.4 MB
Estimated disk space required: 146 MB (with tests)
Estimated build time: 1.0 SBU (Using parallelism=4; with tests)
libdvdread-6.1.2, libdvdnav-6.1.1, and SoundTouch-2.2
BlueZ-5.59, cURL-7.77.0, FAAC-1_30, FAAD2-2_10_0, fdk-aac-2.0.2, GTK+-3.24.29 (for examples), Little CMS-2.12, libass-0.15.1, libexif-0.6.22 (for one test), libgudev-236, libmpeg2-0.5.1, librsvg-2.50.7, libsndfile-1.0.31, libssh2-1.9.0, libusb-1.0.24, libwebp-1.2.0, libxkbcommon-1.3.0, neon-0.31.2, Nettle-3.7.3 or libgcrypt-1.9.3 (for SSL support in hls plugin, if both are not installed OpenSSL will be used instead), opencv-4.5.2 (with additional modules), OpenJPEG-2.4.0, Opus-1.3.1, SBC-1.5, SDL-1.2.15, Valgrind-3.17.0, Wayland-1.19.0 (GTK+-3.24.29 must have been compiled with wayland support), x265-3.4, Xorg Libraries (for one test), aom, bs2b, Chromaprint, dssim, Flite, FluidSynth, Game Music Emu, GSM, hotdoc, LADSPA, libavtp, libdc1394-2, libdca, libde265, libkate, libmfx, libmms, libmodplug, libnice, libofa, libopenmpt, libopenni, libsrtp, lilv, LRDF, ltc-tools, microdns, MJPEG Tools, OpenAL, OpenEXR, OpenH264, Orc, rtmpdump, spandsp, srt, svthevcenc, VO AAC, VO AMRWB, Vulkan, WildMidi, WPE-WebKit, WPEBackend-fdo, ZBAR, ZVBI, and zxing
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/gst10-plugins-bad
If you do not have an Objective-C compiler installed, the build system for this package will emit a warning about a failed sanity check. This is harmless, and it is safe to continue.
If you need a plugin for a given dependency, that dependency needs to be installed before this package.
Install GStreamer Bad Plug-ins by running the following commands:
mkdir build && cd build && meson --prefix=/usr \ --buildtype=release \ -Dpackage-origin=https://www.linuxfromscratch.org/blfs/view/svn/ \ -Dpackage-name="GStreamer 1.18.4 BLFS" && ninja
To test the results, issue: ninja test. Several tests need a terminal emulator in a graphical session.
Now, as the root
user:
ninja install
--buildtype=release
:
Specify a buildtype suitable for stable releases of the package, as
the default may produce unoptimized binaries.
Last updated on Fri Jun 4 19:26:37 2021 +


public class NamedCharacter
extends java.lang.Object
| Constructor and Description |
|---|
NamedCharacter(java.lang.String charName)
Simple constructor.
|
NamedCharacter(java.lang.String charName,
java.lang.String unicodeSequence)
Main constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getName()
Returns the character name (as defined by the Adobe glyph list).
|
char |
getSingleUnicodeValue()
Returns the single Unicode value associated with this named character.
|
java.lang.String |
getUnicodeSequence()
Returns the Unicode sequence associated with this character.
|
int |
hashCode() |
boolean |
hasSingleUnicodeValue()
Indicates whether a single Unicode value is associated with this character.
|
java.lang.String |
toString() |
public NamedCharacter(java.lang.String charName, java.lang.String unicodeSequence)
charName
- the character nameunicodeSequence
- the Unicode sequence associated with this characterpublic NamedCharacter(java.lang.String charName)
charName
- the character namepublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String getName()
public java.lang.String getUnicodeSequence()
public boolean hasSingleUnicodeValue()
public char getSingleUnicodeValue() throws java.lang.IllegalStateException
hasSingleUnicodeValue()
before you call this method because an
IllegalStateException is thrown is a Unicode sequence with more than one character is
associated with this character.java.lang.IllegalStateException
- if a Unicode sequence with more than one value is associated
with the named characterpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright 1999-2020 The Apache Software Foundation. All Rights Reserved.


My Settings
Account
Account
Main settings
These are your main account settings.
These account settings are for
.
Username
You cannot change your Username.
Password
Change Password
Change password
×


TreeView / Events
Event log:
- {{ev.name}}{{ev.info}}
This sample presents most of events that are fired from TreeView directive. Depending on action, a specific event is fired, which you can handle by simple creating an event handler. Here is list of events that are supported:
- afterCollapse - Occurs after an item is collapsed
- afterEdit - occurs after editing process ends
- afterExpand - Occurs after an item is expanded
- afterSelect - Occurs after an item is selected
- beforeCollapse - Occurs before an item is collapsed
- beforeEdit - occurs before editing process starts
- beforeExpand - Occurs before an item is expanded
- beforeSelect - Occurs before an item is selected
- dragEnter - Occurs when item is dragged into TreeView space
- dragLeave - Occurs when dragged item leaves TreeView space
- dragOver - Occurs when item is dragged over TreeView space
- dragDrop - Occurs when drag-drop operation is completed
- gotFocus - Occurs when item receives the input focus
- keyDown - Occurs when key is pressed down for the first time
- keyPress - Occurs when key is pressed
- keyUp - Occurs when key is released
- itemCheckedChanging - Occurs before checked property value is changed
- itemCheckedChanged - Occurs after checked property value is changed
- itemCheckstateChanging - Occurs before checkState property value is changed
- itemCheckstateChanged - Occurs after checkState property value is changed
- itemClick - Occurs when item is clicked
- itemDblclick - Occurs when item is double-clicked
- itemHover - Occurs when the mouse cursor hovers over an item space
- itemRightclick - Occurs when item is clicked using right mouse button
- lostFocus - Occurs when item loses the input focus
- scrollposChanged - Occurs when position of scrollbar has changed
- selectionChanged - Occurs when selection changes
Depending on some conditions, when handling some of above events you can prevent the default action to proceed, by canceling the operation.
In this sample event log will not register add/remove events, because this kind of operation is not demonstrated here.


VALUED PARTNERS
We begin our process by testing the applicant sales competency by well-defined and proven sales assessments. The purpose of the assessment is to test applicant sales subject matter expertise, technical dynamics, and problem-solving skill required in sales."
We ensure every applicant we on-board can express their ideas effectively. For which every applicant goes through various Soft Skill assessments. These help us determine applicant personality traits and work ethics."
After the written assessment, each candidate is personally interviewed by The DriveSales™ subject matter expert for their functional domain. Our experts screen talents for specific live exercises, pro-active & design thinking, and subject matter expertise."
Upon the assessment and documentation, we request the applicant to submit a relevant recommendation letter from their industry leaders, we subsequently cross-check their professional records and work experience."
Upon the assessment and interview, every applicant is given an internal assignment to ensure the delivery of the magical experience to the team they work with. It’s a brief two-week process where the applicant is checked for work ethics and domain expertise."
What is better than the sales talent making the pitch to you on why they should be hired and work for you. Every applicant who passes our 5-step process is being asked you record a pitch video not more than 90 seconds stating their sales experience and functional domain knowledge."


applysym.html
| Author | Thomas Wolf |
| Title | APPLYSYM |
| Short description | The package APPLYSYM takes as input a differential equation (DE) or a system of DEs and its point symmetries, for example computed by the program LIEPDE. It computes symmetry and similarity variables through solving single first order partial DEs (PDEs) with the procedure QUASILINPDE. This procedure formulates an equivalent characteristic non-linear system of ordinary DEs (ODEs) which is investigated by the program CRACK. Although the program CRACK is primarily made for dealing with overdetermined DE-systems, it nevertheless has good chances of solving the not overdetermined characteristic ODE-systems because CRACK has a number of different integration techniques built in and because Lie-symmetries often have a simple form which results in relatively simple characteristic ODE-systems. The program QUASILINPDE can be used independently without connection to symmetries for solving quasi-linear first order PDEs as demonstrated in applysym.tst. |
| Platform | REDUCE, version 3.6 or 3.7 |
| System requirements | The memory requirements depend crucially on the application. The non-trivial computations in the test file applysym.tst have been run in a 4MB session under LINUX. |
| Installation | In a running REDUCE session either do in "applysym.red"$ or, in order to speed up computation, either compile it with on comp$ before the above command, or, generate a fast-loading compiled file once with faslout "applysym"$ in "applysym.red"$ faslend$ and load that file whenever you want to run APPLYSYM with load applysym$ In a similar way proceed with the files crack.red, liepde.red. The above commands assume all files to be in the current directory. |
| More information/updates | There are available a
manual, a
test file
and a
log file.
A web demo for APPLYSYM may be available later. The latest version is available from ftp://ftp.maths.qmw.ac.uk/pub/tw/applysym/. |
| Contact | e-mail: Thomas Wolf |


This file probabilistically generates strings from a JSGF grammar. It takes advantage of weights assigned to alternatives (separated by pipes) by choosing to expand higher weighted alternatives with greater probability. For sets of alternatives without weights, each alternative is equally likely to be expanded. For optional groups, the elements in the group have a 50% chance of being expanded.
It requires two arguments: the path to the JSGF Grammar file, and the number of strings to generate. You can run this on the included grammar Ideas.gram:
python ProbabilisticGenerator.py Ideas.gram 20
This will generate 20 sentences based on the public rule(s) in Ideas.gram, using the weights if they are provided.
Combines sets of strings by taking the cross product of the sets and concatenating the elements in the resulting tuples
| Parameters: | listOfSets – 2-D list of strings |
|---|---|
| Returns: | a list of strings |
Chooses either a random disjunct (for alternatives without weights) or a disjunct based on defined weights.
Finds the rule expansion for a nonterminal and returns its expansion.
Processes the optional element 50% of the time, skips it the other 50% of the time
Combines adjacent elements in a sequence.
Chooses an element of a list based on its weight
| Parameters: | listOfTuples – a list of (element, weight) tuples, where the element can be a JSGF expression object, string, or list, and the weight is a float |
|---|---|
| Returns: | the first element of a chosen tuple |


Reflection allows you to interrogate Active Record classes and objects about their associations and aggregations. This information can, for example, be used in a form builder that took an Active Record object and created input fields for all of the attributes depending on their type and displayed the associations to other objects.
You can find the interface for the AggregateReflection and AssociationReflection classes in the abstract MacroReflection class.
- create_reflection
- reflect_on_aggregation
- reflect_on_all_aggregations
- reflect_on_all_associations
- reflect_on_association
- reflections
[ show source ]
# File vendor/rails/activerecord/lib/active_record/reflection.rb, line 13 13: def create_reflection(macro, name, options, active_record) 14: case macro 15: when :has_many, :belongs_to, :has_one, :has_and_belongs_to_many 16: reflection = AssociationReflection.new(macro, name, options, active_record) 17: when :composed_of 18: reflection = AggregateReflection.new(macro, name, options, active_record) 19: end 20: write_inheritable_hash :reflections, name => reflection 21: reflection 22: end
Returns the AggregateReflection object for the named aggregation (use the symbol). Example:
Account.reflect_on_aggregation(:balance) # returns the balance AggregateReflection
[ show source ]
# File vendor/rails/activerecord/lib/active_record/reflection.rb, line 35 35: def reflect_on_aggregation(aggregation) 36: reflections[aggregation].is_a?(AggregateReflection) ? reflections[aggregation] : nil 37: end
Returns an array of AggregateReflection objects for all the aggregations in the class.
[ show source ]
# File vendor/rails/activerecord/lib/active_record/reflection.rb, line 29 29: def reflect_on_all_aggregations 30: reflections.values.select { |reflection| reflection.is_a?(AggregateReflection) } 31: end
Returns an array of AssociationReflection objects for all the aggregations in the class. If you only want to reflect on a certain association type, pass in the symbol (:has_many, :has_one, :belongs_to) for that as the first parameter. Example: Account.reflect_on_all_associations # returns an array of all associations Account.reflect_on_all_associations(:has_many) # returns an array of all has_many associations
[ show source ]
# File vendor/rails/activerecord/lib/active_record/reflection.rb, line 43 43: def reflect_on_all_associations(macro = nil) 44: association_reflections = reflections.values.select { |reflection| reflection.is_a?(AssociationReflection) } 45: macro ? association_reflections.select { |reflection| reflection.macro == macro } : association_reflections 46: end
Returns the AssociationReflection object for the named aggregation (use the symbol). Example:
Account.reflect_on_association(:owner) # returns the owner AssociationReflection Invoice.reflect_on_association(:line_items).macro # returns :has_many
[ show source ]
# File vendor/rails/activerecord/lib/active_record/reflection.rb, line 51 51: def reflect_on_association(association) 52: reflections[association].is_a?(AssociationReflection) ? reflections[association] : nil 53: end
[ show source ]
# File vendor/rails/activerecord/lib/active_record/reflection.rb, line 24 24: def reflections 25: read_inheritable_attribute(:reflections) or write_inheritable_attribute(:reflections, {}) 26: end


Master Euline:
My skills are not advanced enough to teach you. Look around the village some more and you'll find a suitable master.
May the protection of Eva be with you!


adding <accordion handle="myaccordion"></accordion>
will make your element publically available to register the following callback listeners as myaccordion
myaccordion:expand
myaccordion:expand:animation
myaccordion:collapse
myaccordion:collapse:animation


Matthew Bar and John Foo, April 1991, Drofnats College, Nowhere, Technical Report ABC-DE-12-345, Implementation Notes on foobar(1)
Reference author name; one name per invocation, Book title, Date, Issuer/publisher name, Journal name, Issue number, Optional information, Page number, Corporate or foreign author, Report name, Title of article, Volume
Printed author, April 1991, Drofnats College, Nowhere, Technical Report ABC-DE-12-345


Error
You do not have permission to access this page. Your session has expired or you are not logged in.
Back to homepage.


ModelBinders
In the last chapter about OutputFormatters
I wrote about sending data out to the clients in different formats. In this post we are going to do it the other way. This post is about data you get into your Web API from outside. What if you get data in a special format or what if you get data you need to validate in a special way. ModelBinders
will help you to handle this.
About ModelBinders
ModelBinders are responsible to bind the incoming data to specific action method parameters. It binds the data sent with the request to the parameters. The default binders are able to bind data that are sent via the QueryString or sent within the request body. Within the body the data can be sent in URL format or JSON.
The model binding tries to find the values in the request by the parameter names. The form values, the route data and the query string values are stored as a key-value pair collection and the binding tries to find the parameter name in the keys of the collection.
Preparation of the test project
In this chapter I’d like to send CSV data to a Web API method. I will reuse the CSV data we created in the last post:
Id,FirstName,LastName,Age,EmailAddress,Address,City,Phone
48,Samantha,White,18,Angel.Morgan@shaw.ca,"8202 77th Street ",Mascouche,(682) 381-4092
1,Eric,Wright,2,Briana.Ross@gmx.com,"8104 Scott Avenue ",Canutillo,(253) 366-5637
55,Amber,Watson,46,Sarah.Foster@gmx.com,"9206 Lewis Avenue ",Coleman,(632) 375-4415
99,Alexander,King,59,Ross.Timms@live.com,"3089 Paerdegat 7th Street ",Monte Alto,(366) 319-4154
69,Autumn,Hayes,25,Mark.Diaz@shaw.ca,"3263 Avenue O ",Montreal West (Montréal-Ouest),(283) 438-7801
94,Destiny,James,47,Kylie.Walker@telus.net,"1057 14th Street ",Montreal,(570) 574-3208
59,Christina,Bennett,87,Madeline.Adams@att.com,"5672 19th Lane ",Corrigan,(467) 304-0309
71,Isaac,Hayes,33,Trevor.Robinson@hotmail.com,"9707 Langham Street ",Huntington,(635) 317-0231
23,Jason,Morgan,77,Jennifer.Powell@rogers.ca,"4413 Debevoise Avenue ",Pinole,(265) 467-1984
43,Jenna,Brandzin,92,Natalie.Reed@gmail.com,"4691 Sea Breeze Avenue ",Cushing-Douglass,(502) 427-9135
79,Madison,Verstraete,69,Abigail.Wright@hotmail.com,"2066 104th Street ",Moose Lake,(448) 423-7550
80,Lorrie,Long,89,Melissa.Bennett@microsoft.com,"3048 Allen Avenue ",Munday,(576) 707-6183
79,Alejandro,Daeninck,51,Matthew.Phillips@att.com,"9997 41st Street ",North Bay,(455) 297-2648
14,Makayla,Clark,44,Joshua.Jackson@rogers.ca,"4518 Folsom Place ",Cortland,(772) 692-0732
12,Isaac,Sanchez,37,Paige.MacKenzie@live.com,"2094 Mc Kenny Street ",Brockville,(563) 735-0233
68,Jesus,Brandzin,34,Molly.Clark@telus.net,"3532 Durland Place ",Comfort,(627) 319-9704
59,Logan,Howard,59,Jorge.Brandzin@rogers.ca,"3458 Wythe Avenue ",Enderby,(226) 520-9653
48,Nathaniel,Richardson,58,Amanda.Pitt@gmail.com,"6926 Sunnyside Court ",Los Altos Hills,(513) 338-4602
34,Tiffany,Miller,18,Claire.Alexander@att.com,"1985 Devon Avenue ",Sansom Park,(357) 274-3606
So let’s start by creating a new project using the .NET CLI:
dotnet new webapi -n ModelBinderSample -o ModelBinderSample
This creates a new Web API project.
In this new project I created a new controller with a small action inside:
namespace ModelBinderSample.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class PersonsController : ControllerBase
{
public ActionResult<object> Post(IEnumerable<Person> persons)
{
return new
{
ItemsRead = persons.Count(),
Persons = persons
};
}
}
}
This looks basically like any other action. It accepts a list of persons and returns an anonymous object that contains the number of persons as well as the list of persons. This action is pretty useless, but helps us to debug the ModelBinder using Postman.
We also need the Person class:
public class Person
{
public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public int Age { get; set; }
public string EmailAddress { get; set; }
public string Address { get; set; }
public string City { get; set; }
public string Phone { get; set; }
}
This actually will work fine, if we would send JSON based data to that action.
As a last preparation step, we need to add the CsvHelper NuGet package to easier parse the CSV data. I also love to use the .NET CLI here:
dotnet package add CsvHelper
Creating a CsvModelBinder
To create the ModelBinder
add a new class called CsvModelBinder
, which implements the IModelBinder
. The next snippet shows a generic binder that should work with any list of models:
public class CsvModelBinder : IModelBinder
{
public Task BindModelAsync(ModelBindingContext bindingContext)
{
if (bindingContext == null)
{
throw new ArgumentNullException(nameof(bindingContext));
}
// Specify a default argument name if none is set by ModelBinderAttribute
var modelName = bindingContext.ModelName;
if (String.IsNullOrEmpty(modelName))
{
modelName = "model";
}
// Try to fetch the value of the argument by name
var valueProviderResult = bindingContext.ValueProvider.GetValue(modelName);
if (valueProviderResult == ValueProviderResult.None)
{
return Task.CompletedTask;
}
bindingContext.ModelState.SetModelValue(modelName, valueProviderResult);
var value = valueProviderResult.FirstValue;
// Check if the argument value is null or empty
if (String.IsNullOrEmpty(value))
{
return Task.CompletedTask;
}
var stringReader = new StringReader(value);
var reader = new CsvReader(stringReader);
var modelElementType = bindingContext.ModelMetadata.ElementType;
var model = reader.GetRecords(modelElementType).ToList();
bindingContext.Result = ModelBindingResult.Success(model);
return Task.CompletedTask;
}
}
In the method BindModelAsync
we get the ModelBindingContext
with all the information in it we need to get the data and to deserialize it.
First the context
get’s checked against null. After that we set a default argument name to the model, if none is specified. If this is done we are able to fetch the value by the name we previously set.
If there’s no value, we shouldn’t throw an exception in this case. The reason is that maybe the next configured ModelBinder
is responsible. If we throw an exception the execution of the current request is canceled and the next configured ModelBinder
doesn’t have the chance to get executed.
With a StringReader
we read the value into the CsvReader
and deserialize it to the list of models. We get the type for the deserialization out of the ModelMetadata
property. This contains all the relevant information about the current model.
Using the ModelBinder
The Binder isn’t used automatically, because it isn’t registered in the dependency injection container and not configured to use within the MVC framework.
The easiest way use this model binder is to use the ModelBinderAttribute on the argument of the action where the model should be bound:
[HttpPost]
public ActionResult<object> Post(
[ModelBinder(binderType: typeof(CsvModelBinder))]
IEnumerable<Person> persons)
{
return new
{
ItemsRead = persons.Count(),
Persons = persons
};
}
Here the type of our CsvModelBinder
is set as binderType
to that attribute.
Steve Gordon wrote about a second option in his blog post: Custom ModelBinding in ASP.NET MVC Core. He uses a ModelBinderProvider
to add the ModelBinder
to the list of existing ones.
I personally prefer the explicit declaration, because the most custom ModelBinders
will be pretty specific to an action or to a specific type and there’s no hidden magic in the background.
Testing the ModelBinder
To test it, we need to create a new Request in Postman. I set the request type to POST and put the URL https://localhost:5001/api/persons in the address bar. Now I need to add the CSV data in the body of the request. Because it is a URL formatted body, I needed to put the data as persons
variable into the body:
persons=Id,FirstName,LastName,Age,EmailAddress,Address,City,Phone
48,Samantha,White,18,Angel.Morgan@shaw.ca,"8202 77th Street ",Mascouche,(682) 381-4092
1,Eric,Wright,2,Briana.Ross@gmx.com,"8104 Scott Avenue ",Canutillo,(253) 366-5637
55,Amber,Watson,46,Sarah.Foster@gmx.com,"9206 Lewis Avenue ",Coleman,(632) 375-4415
After pressing send, I got the result as shown below:
Now the clients are able to send CSV based data to the server.
Conclusion
This is a good way to transform the input in a way the action really needs. You could also use the ModelBinders to do some custom validation against the database or whatever you need to do before the model get’s passed to the action.
To learn more about ModelBinders, you need to have a look into the pretty detailed documentation:
While playing around with the ModelBinderProvider
Steve describes in his blog, I stumbled upon InputFormatters
. Would this actually be the right way to transform CSV input into objects? I definitely need to learn some more details about the InputFormatters
and will use this as 12th topic of this series.
In the next chapter, I will show you what you can do with ActionFilters.
Sessions
This is series of articles on Building Conf planner app with Asp.net Core:
- 1 - Logging
- 2 - Configuration
- 3 - Dependency Injection
- 4 - Https
- 5 - Hostedservices
- 6 - Middlewares
- 7 - Outputformatter
- 8 - Modelbinders
- 9 - Actionfilters
- 10 - Taghelpers
- 11 - Webhostbuilder
- 12 - Hosting


Elia Rodriguez (Co-Director):<PHONE_NUMBER>
Javier Rodriguez (Co-Director):<PHONE_NUMBER>
Alma Caballero (Manager):<PHONE_NUMBER>
Gabriel Caballero (Supervisor):<PHONE_NUMBER>
George Guajardo (Supervisor):<PHONE_NUMBER>
Lucas Cross (Supervisor):<PHONE_NUMBER>


Beowulf
by Francis Barton Gummere
Chapter 6
Additional Information
- Year Published: 1910
- Language: English
- Country of Origin: England
- Source: Gummere, F.B. (1910) Beowulf New York: P.F. Collier and Son
-
Readability:
- Flesch–Kincaid Level: 11.2
- Word Count: 736
- Genre: Epic
- Keywords: british literature
- ✎ Cite This
Downloads
HROTHGAR answered, helmet of Scyldings:—
"I knew him of yore in his youthful days;
his aged father was Ecgtheow named,
to whom, at home, gave Hrethel the Geat
his only daughter. Their offspring bold
fares hither to seek the steadfast friend.
And seamen, too, have said me this, —
who carried my gifts to the Geatish court,
thither for thanks, — he has thirty men's
heft of grasp in the gripe of his hand,
the bold-in-battle. Blessed God
out of his mercy this man hath sent
to Danes of the West, as I ween indeed,
against horror of Grendel. I hope to give
the good youth gold for his gallant thought.
Be thou in haste, and bid them hither,
clan of kinsmen, to come before me;
and add this word, — they are welcome guests
to folk of the Danes."
Ye may wend your way in war-attire,
and under helmets Hrothgar greet;
but let here the battle-shields bide your parley,
and wooden war-shafts wait its end."
Uprose the mighty one, ringed with his men,
brave band of thanes: some bode without,
battle-gear guarding, as bade the chief.
Then hied that troop where the herald led them,
under Heorot's roof: [the hero strode,]
hardy 'neath helm, till the hearth he neared.
Beowulf spake, — his breastplate gleamed,
war-net woven by wit of the smith:—
"Thou Hrothgar, hail! Hygelac's I,
kinsman and follower. Fame a plenty
have I gained in youth! These Grendel-deeds
I heard in my home-land heralded clear.
Seafarers say how stands this hall,
of buildings best, for your band of thanes
empty and idle, when evening sun
in the harbor of heaven is hidden away.
So my vassals advised me well, —
brave and wise, the best of men, —
O sovran Hrothgar, to seek thee here,
for my nerve and my might they knew full well.
Themselves had seen me from slaughter come
blood-flecked from foes, where five I bound,
and that wild brood worsted. I' the waves I slew
nicors [footnote 1] by night, in need and peril
avenging the Weders, [footnote 2] whose woe they sought, —
crushing the grim ones. Grendel now,
monster cruel, be mine to quell
in single battle! So, from thee,
thou sovran of the Shining-Danes,
Scyldings'-bulwark, a boon I seek, —
and, Friend-of-the-folk, refuse it not,
O Warriors'-shield, now I've wandered far, —
that I alone with my liegemen here,
this hardy band, may Heorot purge!
More I hear, that the monster dire,
in his wanton mood, of weapons recks not;
hence shall I scorn — so Hygelac stay,
king of my kindred, kind to me! —
brand or buckler to bear in the fight,
gold-colored targe: but with gripe alone
must I front the fiend and fight for life,
foe against foe. Then faith be his
in the doom of the Lord whom death shall take.
Fain, I ween, if the fight he win,
in this hall of gold my Geatish band
will he fearless eat, — as oft before, —
my noblest thanes. Nor need'st thou then
to hide my head; [footnote 3] for his shall I be,
dyed in gore, if death must take me;
and my blood-covered body he'll bear as prey,
ruthless devour it, the roamer-lonely,
with my life-blood redden his lair in the fen:
no further for me need'st food prepare!
To Hygelac send, if Hild [footnote 4] should take me,
best of war-weeds, warding my breast,
armor excellent, heirloom of Hrethel
and work of Wayland. [footnote 5] Fares Wyrd [footnote 6] as she must."
Footnotes
1. The nicor, says Bugge, is a hippopotamus; a walrus, says ten Brink. But that water-goblin who covers the space from Old Nick of jest to the Neckan and Nix of poetry and tale, is all one needs, and Nicor is a good name for him.
2. His own people, the Geats.
3. That is, cover it as with a face-cloth. "There will be no need of funeral rites."
4. Personification of Battle.
5. The Germanic Vulcan.
6. This mighty power, whom the Christian poet can still revere, has here the general force of "Destiny."


Insert your off-canvas content for the left drawer here
Insert your off-canvas content for the right drawer here
Insert your off-canvas content for the top drawer here
Insert your main content here


This is a normal link without any CSS
This is used to remove the underline below the link
This is used to provide a border to a link on hover


--- title: About Me icon: fa-user order: 3 ---
This is the homepage of Yimin, Zhao. He received his B.S. from School of Mathematics and Statistics, Wuhan University in 2019. And now, he is a research assistant in Professor Yong Wang's lab, AMSS. His research interest focus on the modeling of scRNA-seq data which is of high-sparsity.


The Aphro League
Home
(current)
Members
Aphro Mercury
Bug Elite Four
Team
Volcarona
Galvantula
Armaldo
Araquanid
Scizor
Mega Pinsir
Ace
Volcarona


San Francisco
Home
Tours
Pricing
Locations
About us
San Francisco
Learn about our awesome tourist attractions.
Learn more


The Binance Crypto Future Margin Rate dataset provides MarginInterestRate objects with the following attributes:


Here are a few projects I've worked on recently...
Web application for hospitals to manage their blood bank and users who need blood. Made with PHP and MySQL.
View ProjectSocial App made with django. You can post your thoughts and ideas anonymously and also create groups and post there.
View ProjectEasy Friendy Management, register your roommates, and it will simply show who's turn it is to carry out a task job.
View ProjectArchitect Organisation Website. It is a static website but with a great user interface and you can check it out.
View Project


Sign Up
Register to continue
By signing up you accept the
Term Of service and Privacy Policy
Sing Up
Already have an account?
Sign In


Home
Employee Managment
(current)
Admin Console
Reporting
Disabled
Add New Employee
First Name:
Last Name:
Email:
Hire Date:
Department:
Salary:
Create


| Modifier and Type | Method and Description |
|---|---|
static String |
CheckSumUtils.getCacheBustedUrl(String url,
ResourceReaderHandler rsReader,
JawrConfig jawrConfig)
Return the cache busted url associated to the url passed in parameter,
if the resource is not found, null will b returned.
|
| Modifier and Type | Method and Description |
|---|---|
static URL |
ClassLoaderResourceUtils.getResourceURL(String resourcePath,
Object source)
Attempts to find the URL of a resource from the classpath, either usinf
the caller's class loader or the current thread's context classloader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
ResourceBundlesHandlerImpl.streamBundleTo(String bundlePath,
OutputStream out) |
void |
ResourceBundlesHandler.streamBundleTo(String bundlePath,
OutputStream out)
Writes the bytes of a bundle to the specified OutputStream.
|
void |
CachedResourceBundlesHandler.streamBundleTo(String bundlePath,
OutputStream out) |
void |
ResourceBundlesHandlerImpl.writeBundleTo(String bundlePath,
Writer writer) |
void |
ResourceBundlesHandler.writeBundleTo(String bundlePath,
Writer writer)
Writes data using the supplied writer, representing a unified bundle of resources.
|
void |
CachedResourceBundlesHandler.writeBundleTo(String bundlePath,
Writer writer) |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
ServletContextResourceBundleHandler.getResourceBundleAsStream(String bundleName) |
InputStream |
ResourceBundleHandler.getResourceBundleAsStream(String bundleName)
Retrieves the input stream of a resource bundle.
|
ReadableByteChannel |
ResourceBundleHandler.getResourceBundleChannel(String bundleName)
Retrieves ReadableByteChannel on a resource bundle.
|
ReadableByteChannel |
AbstractResourceBundleHandler.getResourceBundleChannel(String bundleName) |
ReadableByteChannel |
AbstractResourceBundleHandler.getResourceBundleChannel(String bundleName,
boolean gzipBundle)
Returns the readable byte channel from the bundle name
|
Reader |
ResourceBundleHandler.getResourceBundleReader(String bundleName)
Retrieves a reader for a bundle from the store.
|
Reader |
AbstractResourceBundleHandler.getResourceBundleReader(String bundleName) |
InputStream |
AbstractResourceBundleHandler.getTemporaryResourceAsStream(String resourceName) |
| Modifier and Type | Method and Description |
|---|---|
Reader |
ServletContextResourceReaderHandler.getResource(String resourceName) |
Reader |
ResourceReaderHandler.getResource(String resourceName)
Retrieves a single resource.
|
Reader |
ServletContextResourceReaderHandler.getResource(String resourceName,
boolean processingBundle) |
Reader |
ResourceReaderHandler.getResource(String resourceName,
boolean processingBundle)
Retrieves a single resource.
|
Reader |
ServletContextResourceReaderHandler.getResource(String resourceName,
boolean processingBundle,
List<Class<?>> excludedReader) |
Reader |
ResourceReaderHandler.getResource(String resourceName,
boolean processingBundle,
List<Class<?>> excludedReader)
Retrieves a single resource.
|
InputStream |
ServletContextResourceReaderHandler.getResourceAsStream(String resourceName) |
InputStream |
ResourceReaderHandler.getResourceAsStream(String resourceName)
Retrieves the input stream of a resource defined in the web application.
|
InputStream |
ServletContextResourceReaderHandler.getResourceAsStream(String resourceName,
boolean processingBundle) |
InputStream |
ResourceReaderHandler.getResourceAsStream(String resourceName,
boolean processingBundle)
Retrieves the input stream of a resource defined in the web application.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
JawrRequestHandler.writeContent(String requestedPath,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Writes the content to the ouput stream
|
Copyright © 2014. All rights reserved.


Highest Number: {{ appState.attackData.varieties.highCount }}
Most Frequent: {{ appState.attackData.varieties.highvariety }}
Highest Frequency: {{ appState.attackData.types.highCount }}
Most Frequent: {{ appState.attackData.types.hightype }}
Highest Frequency: {{ appState.attackData.vectors.highCount }}
Most Frequent: {{ appState.attackData.vectors.highvector }}
Highest Frequency: {{ appState.attackData.assets.highCount }}
Most Frequent: {{ appState.attackData.assets.highasset }}
| Variety | # |
|---|---|
| {{ data }} | {{ appState.attackData.varieties.count[$index] }} |
| Types | # |
|---|---|
| {{ data }} | {{ appState.attackData.types.count[$index] }} |
| Vectors | # |
|---|---|
| {{ data }} | {{ appState.attackData.vectors.count[$index] }} |
| Assets | # |
|---|---|
| {{ data }} | {{ appState.attackData.assets.count[$index] }} |


Include Sails
Hello, I am a paragraph. I am a thing that you may read, if you are literate. If you're not, I still look kind of cool and you can just look at the pictures and make things up.
//gfjdlasjDKASJDLK
//FJDKADJKSLAFJDKLF
alert('COOL, MAN.');
Try AngularSails
Hello, I am a paragraph. I am a thing that you may read, if you are literate. If you're not, I still look kind of cool and you can just look at the pictures and make things up.
//gfjdlasjDKASJDLK
//FJDKADJKSLAFJDKLF
alert('COOL, MAN.');
Modify Data
Hello, I am a paragraph. I am a thing that you may read, if you are literate. If you're not, I still look kind of cool and you can just look at the pictures and make things up.
//gfjdlasjDKASJDLK
//FJDKADJKSLAFJDKLF
alert('COOL, MAN.');
Easily Authenticate Users
Hello, I am a paragraph. I am a thing that you may read, if you are literate. If you're not, I still look kind of cool and you can just look at the pictures and make things up.


Loading…
Home
Connect to REST backend
Settings
About
Backend
Initialization
Available Services
Login
Service 2
Service 3
Login
Username :
Password :
Settings View
About
Usage
About
Generic Mobile Device
Network
Line
Songs
Videos


Author: James
Ingredients
- 1 (1 pound) loaf stale French bread, cut into 1 inch cubes
- 1 cup milk
- 2 tbsp. butter
- 1 onion, finely chopped
- 1 tbsp. chopped fresh parsley
- 2 eggs
- 1/2 tsp. salt
- 1 pinch ground black pepper
- 1/2 cup dry bread crumbs (optional)
Directions
- Place the bread cubes into a large bowl. Heat the milk until it
starts to bubble at the edges, then pour it over the bread cubes.
Stir briefly to coat the bread. Let soak for 15 minutes.
- Meanwhile, melt the butter in a skillet over medium heat. Add the onions;
cook and stir until tender. Stir in the parsley, and remove from the heat.
Mix into the bowl with the bread along with the eggs, salt and pepper.
Use your hands, squeezing the dough through your fingers until it is smooth
and sticky.
- Bring a large pot of lightly salted water to a boil. The water should
be at least 3 or 4 inches deep. When the water is boiling, make a test
dumpling about the size of a small orange or tangerine, by patting and
cupping between wet hands. Gently drop into the boiling water. If it
falls apart, the dough is too wet. In this case, stir some bread crumbs
into the rest of the dumpling batter.
- Form the remaining dough into large dumplings, and carefully drop into the
boiling water. Simmer for 20 minutes, then remove to a serving plate with a
large slotted spoon. They should come out soft, spongy and delicious!
Fun Facts
These are delicious, but humans are not the only ones who love bread!
Many birds including the magpie are very committed to getting access
to a crumbly snack. You'll find them sitting on many different branches.
Download this recipe here!


Wolves tie midfield star Moutinho to new deal
by BeSoccerWolves, sitting fifth in the Premier League, have announced key midfielder Joao Moutinho has signed a new two-and-a-half-year contract.
Joao Moutinho has signed a new Wolves contract that commits the Portugal international to the club through to 2022.
Moutinho joined Wolves from Monaco in July 2018 for a reported £5million and the 33-year-old has become a key player for Nuno Espirito Santo's side.
He was voted Wolves fans' player of the season in May and has maintained his form by recording seven assists in all competitions this term.
Midfielder Moutinho scored a superb free-kick in a win at Bournemouth on Saturday that lifted Nuno's men to fifth in the Premier League.
Featured links
- The latest football transfers news and rumours
- Luis Enrique returns to Spain national team
- Mourinho replaces Pochettino at Tottenham
- Wales, golf, Madrid... in that order
"It was a very easy decision because I feel very good here," Moutinho told Wolves' official club website. "It's a big club that wants to do something good and I want to do my best to help".
"We did a great job last season and this season we'll try to do better. That's what we’re going to do and I'm going to try 100 per cent to help the club to improve".
"I feel very good. We won today, a very important win, and I signed a new contract. I'm very happy to help the team today and I hope to help the new for the new two, three years."


GitHub API
Enter a GitHub username and get all of that user's public repositories
Enter a GitHub Username
Submit


It is reported that cryptocurrency mining malware has been breach from thousands of website to Google play store applications.
Coinhive, a site that offers a friendly programming interface to enable any website turning their visitor’s computer into mining machine for the website owner. A couple of multi-million downloaded applications from Google play store is taking advantage of user phone for illegal mining activities too, but no name of the applications was revealed.
For preventive measures:
- Install this Chrome extension to block all Coinhive malware.
- Apply good internet surfing habit, pay caution visiting potentially malicious websites.
- Don’t simply download untrustable applications even from Google Play store.
- Lastly, monitor the abnormal behavior of your devices like unusual high CPU usage or a drastic drop in the phone’s battery. They might be infected if high computing power was consistently being consumed without reasons.
有报道指出不单是网站有可能让你的电脑为陌生人挖矿，手机也成为了新目标。
Coinhive 提供了友善的编码界面让网站拥有者可以很容易的在自家网站装上，到访者的电脑就会被感染从而为之挖矿而不自知。Google play store 上也有数个拥有百万下载量的 App 会感染手机为远方的黑客挖矿，App 名字则被保密。
自保的方针有：
- 在电脑装上这个 Chrome 插件可以有效抵挡 Coinhive 攻击。
- 养成良好的上网习惯，拒绝访问来历不明的网站。
- 别随意下载应用软件，即使是来自Google Play store 这种官方渠道。
- 最后，密切观察设备的不正常状态。要是电脑的 CPU 使用帧率长时间处于高度使用状态，或是手机电池无故急剧下跌，那你很可能中奖了。
This page is synchronized from the post: ‘Don’’t mine for the hackers’


| MATLAB 文件帮助: cv.EM/trainEM | 查看 cv.EM/trainEM 的代码 | Index |
trainEM Estimate the Gaussian mixture parameters from a samples set
[logLikelihoods, labels, probs] = model.trainEM(samples)
double
type it will be converted to the inner matrix of such type
for the further computing.nsamples-by-1
size and double
type.labels_i = argmax_{k}(p_{i,k}), i=1..N
(indices of the
most probable mixture component for each sample). It has
nsamples-by-1
size and single
type.nsamples-by-ClustersNumber
size and
double
type.This variation starts with Expectation step. Initial values of the model parameters will be estimated by the k-means algorithm.
Unlike many of the ML models, EM is an unsupervised learning
algorithm and it does not take responses
(class labels or
function values) as input. Instead, it computes the Maximum
Likelihood Estimate of the Gaussian mixture parameters from an
input sample set, stores all the parameters inside the
structure: p_{i,k}
in probs
, a_k
in means
, S_k
in
covs[k]
, PI_k
in weights
, and optionally computes the
output "class label" for each sample:
labels_i = argmax_{k}(p_{i,k}), i=1..N
(indices of the most
probable mixture component for each sample).
The trained model can be used further for prediction, just like any other classifier. The trained model is similar to the cv.NormalBayesClassifier.
| Access | public |
| Sealed | false |
| Static | false |


Info
Welcome to the generated API reference. Get Postman Collection
general
Get the key performance stats for the dashboard.
Example request:
curl -X GET -G "http://localhost/horizon/api/stats"
const url = new URL("http://localhost/horizon/api/stats");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"jobsPerMinute": 0,
"processes": 5,
"queueWithMaxRuntime": null,
"queueWithMaxThroughput": null,
"recentlyFailed": 0,
"recentJobs": 0,
"status": "running",
"wait": {
"redis:default": 0
}
}
HTTP Request
GET horizon/api/stats
Get the current queue workload for the application.
Example request:
curl -X GET -G "http://localhost/horizon/api/workload"
const url = new URL("http://localhost/horizon/api/workload");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
[
{
"name": "default",
"length": 0,
"wait": 0,
"processes": 5
}
]
HTTP Request
GET horizon/api/workload
Get all of the master supervisors and their underlying supervisors.
Example request:
curl -X GET -G "http://localhost/horizon/api/masters"
const url = new URL("http://localhost/horizon/api/masters");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"59fa382bc7a9-hFsz": {
"name": "59fa382bc7a9-hFsz",
"pid": "9",
"status": "running",
"supervisors": [
{
"name": "59fa382bc7a9-hFsz:supervisor-1",
"master": "59fa382bc7a9-hFsz",
"pid": "16",
"status": "running",
"processes": {
"redis:default": 5
},
"options": {
"balance": "simple",
"connection": "redis",
"queue": "default",
"delay": "0",
"force": false,
"maxProcesses": "5",
"minProcesses": "1",
"maxTries": "3",
"memory": "128",
"name": "59fa382bc7a9-hFsz:supervisor-1",
"sleep": "3",
"timeout": "60"
}
}
]
}
}
HTTP Request
GET horizon/api/masters
Get all of the monitored tags and their job counts.
Example request:
curl -X GET -G "http://localhost/horizon/api/monitoring"
const url = new URL("http://localhost/horizon/api/monitoring");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
[]
HTTP Request
GET horizon/api/monitoring
Start monitoring the given tag.
Example request:
curl -X POST "http://localhost/horizon/api/monitoring"
const url = new URL("http://localhost/horizon/api/monitoring");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST horizon/api/monitoring
Paginate the jobs for a given tag.
Example request:
curl -X GET -G "http://localhost/horizon/api/monitoring/{tag}"
const url = new URL("http://localhost/horizon/api/monitoring/{tag}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"jobs": [],
"total": 0
}
HTTP Request
GET horizon/api/monitoring/{tag}
Stop monitoring the given tag.
Example request:
curl -X DELETE "http://localhost/horizon/api/monitoring/{tag}"
const url = new URL("http://localhost/horizon/api/monitoring/{tag}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE horizon/api/monitoring/{tag}
Get all of the measured jobs.
Example request:
curl -X GET -G "http://localhost/horizon/api/metrics/jobs"
const url = new URL("http://localhost/horizon/api/metrics/jobs");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
[]
HTTP Request
GET horizon/api/metrics/jobs
Get metrics for a given job.
Example request:
curl -X GET -G "http://localhost/horizon/api/metrics/jobs/{id}"
const url = new URL("http://localhost/horizon/api/metrics/jobs/{id}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
[]
HTTP Request
GET horizon/api/metrics/jobs/{id}
Get all of the measured queues.
Example request:
curl -X GET -G "http://localhost/horizon/api/metrics/queues"
const url = new URL("http://localhost/horizon/api/metrics/queues");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
[]
HTTP Request
GET horizon/api/metrics/queues
Get metrics for a given queue.
Example request:
curl -X GET -G "http://localhost/horizon/api/metrics/queues/{id}"
const url = new URL("http://localhost/horizon/api/metrics/queues/{id}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
[]
HTTP Request
GET horizon/api/metrics/queues/{id}
Get all of the recent jobs.
Example request:
curl -X GET -G "http://localhost/horizon/api/jobs/recent"
const url = new URL("http://localhost/horizon/api/jobs/recent");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"jobs": [],
"total": 0
}
HTTP Request
GET horizon/api/jobs/recent
Get all of the failed jobs.
Example request:
curl -X GET -G "http://localhost/horizon/api/jobs/failed"
const url = new URL("http://localhost/horizon/api/jobs/failed");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"jobs": [],
"total": 0
}
HTTP Request
GET horizon/api/jobs/failed
Get a failed job instance.
Example request:
curl -X GET -G "http://localhost/horizon/api/jobs/failed/{id}"
const url = new URL("http://localhost/horizon/api/jobs/failed/{id}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
[]
HTTP Request
GET horizon/api/jobs/failed/{id}
Retry a failed job.
Example request:
curl -X POST "http://localhost/horizon/api/jobs/retry/{id}"
const url = new URL("http://localhost/horizon/api/jobs/retry/{id}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST horizon/api/jobs/retry/{id}
Single page application catch-all route.
Example request:
curl -X GET -G "http://localhost/horizon/{view?}"
const url = new URL("http://localhost/horizon/{view?}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET horizon/{view?}
api/upload
Example request:
curl -X POST "http://localhost/api/upload"
const url = new URL("http://localhost/api/upload");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/upload
api/images/{id}
Example request:
curl -X GET -G "http://localhost/api/images/{id}"
const url = new URL("http://localhost/api/images/{id}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET api/images/{id}


This is a list of all the people currently registered:
{% for name in name_data %}
{% for family in name_family %}
{% for age in name_age %}
{% for birthday in name_birthday %}
{% for email in name_email %}
{{registered}}
{{family}}
Age: {{age}},
Born on the: {{birthday}}
Email: {{email}}


Here's Another Look At The New Moto Razr With A Foldable Display
If you've been eager to see more of the new Moto Razr with its folding screen panel, some new leaked images allow you to do just that.
A new set of documents from the FCC seem to have revealed images of the upcoming device.
They look exactly like the phone in previous leaks that have popped up before now. However these new images show off a little more of the phone. And from various angles. Giving some better perspective on the phone's size and dimensions.
Advertisement
The new Moto Razr looks deceptively thin
Images will never be the same as seeing a device in real life. Holding it in your hands and getting to run your fingers over the material that it's made with.
Seeing images just isn't enough to tell how thin a device may be. All that aside the new Moto Razr looks deceptively thin judging by the images from the FCC.
A couple of the photos show the phone from both sides with the screen completely unfolded. While others show the phone in a fully folded state from the front and the back.
Advertisement
Motorola definitely kept true to the original Razr design, save for a few modern tweaks. The most prominent being the display panel that folds in half. Instead of folding like the Galaxy Fold though, it folds lengthwise. Giving it a sort of square shape when closed.
The new Moto Razr is being shown off at an event today
There is still no actual launch date for Motorola's re-imagining of the Razr phone. It is however being showed off at an event today.
This is a private event rather than a public one. As invites to the event were only sent out to certain members of the press, and Motorola has made no attempts to advertise any sort of live stream.
Advertisement
Streams are usually fairly common for these kinds of events. So it would be unusual for a company to have a product launch event and not broadcast it. Unless it was meant to be private so media could get a first-hand look at what's coming.
For the rest of the people interested in the device, the leaked FCC images will have to do. For now. Since no announcement has been officially made by Motorola yet, there's no word on specs.
One image from the leaked set though does appear to show that Motorola used a Qualcomm Snapdragon 710 processor inside the device.
Advertisement


{{ template "base.html" . }} {{ define "title" }}Bulk Tor Exit Exporter{{ end }} {{ define "favicon" }}favicon.ico{{ end }} {{ define "head" }}{{ end }} {{ define "css" }} .form { display: inline; margin-right: 0.4em; } .exli { margin-top: 4em; } {{ end }} {{ define "body" }}
If you are a service provider and you wish to build a list of possible Tor nodes that might contact one of your servers, enter that single server address below. Giving you the whole list means you can query the list privately, rather than telling us your users' IP addresses. This list allows you to have a nearly real time authoritative source for Tor exits that allow contacting your server on port 80. We don't log the IP address that queries for a given list. If you'd like, you're free to run your own copy of this program. It's Free Software and can be downloaded from the git repository.
Get the current list of exit addresses outputted by TorDNSEL. Past data can be obtained from the CollecTor service.
{{ end }} {{ define "foot" }}{{ end }}


| model.matrix.coxph {survival} | R Documentation |
Reconstruct the model matrix for a cox model.
## S3 method for class 'coxph' model.matrix(object, data=NULL, contrast.arg = object$contrasts, ...)
object |
the result of a |
data |
optional, a data frame from which to obtain the data |
contrast.arg |
optional, a contrasts object describing how factors should be coded |
... |
other possible argument to |
When there is a data
argument this function differs from most
of the other model.matrix
methods in that the response variable
for the original formula is not required to be in the data.
If the data frame contains a terms
attribute then it is
assumed to be the result of a call to model.frame
, otherwise
a call to model.frame
is applied with the data as an argument.
The model matrix for the fit
Terry Therneau
fit1 <- coxph(Surv(time, status) ~ age + factor(ph.ecog), data=lung) xfit <- model.matrix(fit1) fit2 <- coxph(Surv(time, status) ~ age + factor(ph.ecog), data=lung, x=TRUE) all.equal(model.matrix(fit1), fit2$x)


SW Destiny 'Kitchen' Dice
Generate Dice
About
I made this for people playing SW Destiny who either don't own all the dice they want to play with yet, or people who can't be bothered to bring all their plastic everywhere. Keep in mind that unlike FFG's native dice app, this web-app is not tournament legal. It's intended for casual kitchen table play only.
This open-source project was made by
@ossianboren
using an API from
swdestinydb.com
. The project hosts no copyrighted content.
Instructions
Make a list of all dice you want to use in the field above, using their "set id" (Finn is nr 045 in the first set (Awakenings) for example, so his id is 1045). Make one entry per die (Elite Finn is 1045,1045). Then click the generate dice button. You can bookmark that page to save your dicepools for later.
You can leave the dice field empty to see a demo deck. I recommend using this app with a smartphone in landscape mode.
On the deck page, you have four actions. Press "DECK" to bring up your available dice and press the name of a card to add or remove dice from the game. Press "DECK" again to hide your available dice. You can sort the dice by dragging them around.  Once you select one or more dice you can use the other actions. "ROLL" Will simply roll them. "EXHAUST" will gray them out to indicate that they're not in play. "FOCUS" let's you turn over a die to any side. Note that focus can only be used with one die at a time.
ps. check out my other project,
SWDestiny Kitchen Proxys
!


Our website redesign project has moved solidly into the Design and Build phase this summer, and we’ve been stretching to find new ways to get on-going feedback. In this post, we’ll explain one low-tech method we used for soliciting feedback from library staff by incorporating everyone’s favorite summer treat: ice cream.
Why
As part of the website redesign process, our web designer Patricia Villanueva created a number of possible header and footer designs to use on the new website. These designs were based in large part on earlier user testing research that we had done (including the projects we’ve talked about on this blog). The WebRAT team reviewed the whole set of designs and narrowed the field down from 20 headers to a set of 6 possibilities, and from 15 to 5 footers.
To get feedback on those designs, we decided to turn to the rest of the library staff. We know that we still have to do testing with external users (and are making plans to do so!), but library staff are important users of the website, too. Additionally, soliciting feedback from staff gave us a way to talk about the redesign with library staff and give them a chance to get involved.
Around the time that we were planning this, the library was holding a summer ice cream social event for all library staff. We were given permission to set up a small feedback area in the space where the ice cream social was held. This let us not only reach a wide range of library staff, but do so in a casual, low-stakes environment.
How
Since the ice cream social was already planned and advertised, we didn’t have to worry about recruiting participants. To keep things simple, we used paper printouts of the proposed designs. We printed out copies of various mockups (6 headers and 5 footers) and taped them to whiteboards. To provide a realistic impression of what the headers and footers would look like as part of a website, we included some greyed-out content along with the header/footer mockup. After trying a few variations, we settled on some plain text that was blurred and considerably lightened in color, which kept the focus clearly on the headers and footers.
After discussion of various methods of voting, we decided to give each person four stickers: two for headers, and two for footers. They could then use those stickers however they wanted - give both stickers to one header, or give one sticker each to two headers. We also provided index cards for people to write comments on specific designs, although few people took advantage of this option. However, since we had at least one member of the redesign team on hand for the entire activity, we were able to get informal verbal feedback and listen in on conversations about the designs as people participated.
In introducing the activity, we tried to emphasize that we were primarily interested in feedback on the designs themselves, not on the colors or labels of categories. We also emphasized that this was only a preliminary test of mockup designs; the final designs may (and probably will) look very different.
Results
With nearly everyone at the ice cream social involved, we were able to gather a great deal of information on the preferences of library staff and faculty. The voting helped us continue to narrow the potential options, down to 3 designs each for headers and footers. That gives us a good number to continue exploring and doing more user testing with. Since each proposed design included a variety of different elements, we may continue exploring some elements even from the designs that did not receive many votes. While preparing the designs, we had some predictions about which designs would be the most popular, and for the most part, those were born out by the voting. Though we had some of our predictions confirmed, the feedback helped verify that we are on track.
The activity also achieved its secondary purpose in keeping staff informed about the redesign. Those who participated seemed to appreciate the chance to see the design work as it was going on, including the range of designs under consideration, and we were pleased that everyone seemed generally positive about the direction we are headed.
What’s Next
The UX Team is currently thinking about how to do a version of this activity with students and other library users. We want to provide a quick, simple way for students to indicate what designs they like, while also providing some more focused feedback.
While the stickers were effective and fun, making for an approachable testing activity, they didn’t provide much information about why one design was preferred over another. We also worried about bias towards visibly popular options - if one design already has more stickers, is someone more likely to vote for it? To help counter some of these problems, we are exploring other ways of framing the activity, such as setting up an A/B comparison activity on iPads set up in public areas of the library.
Keep an eye out for these testing activities and other ways to provide feedback on the new site!


#include <cache_manager.h>
Data Fields | |
| char * | filename |
| file name | |
| char * | tid |
| taregt identifier | |
| int | csn |
| codestream number | |
| char ** | cid |
| dynamic array of channel identifiers | |
| int | numOfcid |
| number of cids | |
| metadatalist_param_t * | metadatalist |
| metadata-bin list | |
| ihdrbox_param_t * | ihdrbox |
| ihdrbox | |
| cache_param * | next |
| pointer to the next cache |
|
|
dynamic array of channel identifiers
|
|
|
codestream number
|
|
|
file name
|
|
|
ihdrbox
|
|
|
metadata-bin list
|
|
|
pointer to the next cache
|
|
|
number of cids
|
|
|
taregt identifier
|