|
libevent
|
Go to the source code of this file.
Macros | |
| #define | EVHTTP_CON_LINGERING_CLOSE 0x0020 |
| #define | EVHTTP_CON_PUBLIC_FLAGS_END 0x100000 |
| #define | EVHTTP_CON_READ_ON_WRITE_ERROR 0x0010 |
| #define | EVHTTP_CON_REUSE_CONNECTED_ADDR 0x0008 |
| #define | EVHTTP_SERVER_LINGERING_CLOSE 0x0001 |
| #define | EVHTTP_URI_NONCONFORMANT 0x01 |
| Tolerate URIs that do not conform to RFC3986. More... | |
| #define | HTTP_BADMETHOD 405 |
| method not allowed for this uri | |
| #define | HTTP_BADREQUEST 400 |
| invalid http request was made | |
| #define | HTTP_ENTITYTOOLARGE 413 |
| #define | HTTP_EXPECTATIONFAILED 417 |
| we can't handle this expectation | |
| #define | HTTP_INTERNAL 500 |
| internal error | |
| #define | HTTP_MOVEPERM 301 |
| the uri moved permanently | |
| #define | HTTP_MOVETEMP 302 |
| the uri moved temporarily | |
| #define | HTTP_NOCONTENT 204 |
| request does not have content | |
| #define | HTTP_NOTFOUND 404 |
| could not find content for uri | |
| #define | HTTP_NOTIMPLEMENTED 501 |
| not implemented | |
| #define | HTTP_NOTMODIFIED 304 |
| page was not modified from last | |
| #define | HTTP_OK 200 |
| request completed ok | |
| #define | HTTP_SERVUNAVAIL 503 |
| the server is not available | |
Typedefs | |
| typedef void | evhttp_bound_socket_foreach_fn(struct evhttp_bound_socket *, void *) |
Enumerations | |
| enum | evhttp_cmd_type { EVHTTP_REQ_GET = 1 << 0, EVHTTP_REQ_POST = 1 << 1, EVHTTP_REQ_HEAD = 1 << 2, EVHTTP_REQ_PUT = 1 << 3, EVHTTP_REQ_DELETE = 1 << 4, EVHTTP_REQ_OPTIONS = 1 << 5, EVHTTP_REQ_TRACE = 1 << 6, EVHTTP_REQ_CONNECT = 1 << 7, EVHTTP_REQ_PATCH = 1 << 8 } |
| The different request types supported by evhttp. More... | |
| enum | evhttp_request_error { EVREQ_HTTP_TIMEOUT, EVREQ_HTTP_EOF, EVREQ_HTTP_INVALID_HEADER, EVREQ_HTTP_BUFFER_ERROR, EVREQ_HTTP_REQUEST_CANCEL, EVREQ_HTTP_DATA_TOO_LONG } |
| The different error types supported by evhttp. More... | |
| enum | evhttp_request_kind { EVHTTP_REQUEST, EVHTTP_RESPONSE } |
| a request object can represent either a request or a reply | |
Functions | |
| EVENT2_EXPORT_SYMBOL int | evhttp_accept_socket (struct evhttp *http, evutil_socket_t fd) |
| Makes an HTTP server accept connections on the specified socket. More... | |
| EVENT2_EXPORT_SYMBOL struct evhttp_bound_socket * | evhttp_accept_socket_with_handle (struct evhttp *http, evutil_socket_t fd) |
| Like evhttp_accept_socket(), but returns a handle for referencing the socket. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_add_header (struct evkeyvalq *headers, const char *key, const char *value) |
| Adds a header to a list of existing headers. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_add_server_alias (struct evhttp *http, const char *alias) |
| Add a server alias to an http object. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_add_virtual_host (struct evhttp *http, const char *pattern, struct evhttp *vhost) |
| Adds a virtual host to the http server. More... | |
| EVENT2_EXPORT_SYMBOL struct evhttp_bound_socket * | evhttp_bind_listener (struct evhttp *http, struct evconnlistener *listener) |
| The most low-level evhttp_bind/accept method: takes an evconnlistener, and returns an evhttp_bound_socket. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_bind_socket (struct evhttp *http, const char *address, ev_uint16_t port) |
| Binds an HTTP server on the specified address and port. More... | |
| EVENT2_EXPORT_SYMBOL struct evhttp_bound_socket * | evhttp_bind_socket_with_handle (struct evhttp *http, const char *address, ev_uint16_t port) |
| Like evhttp_bind_socket(), but returns a handle for referencing the socket. More... | |
| EVENT2_EXPORT_SYMBOL evutil_socket_t | evhttp_bound_socket_get_fd (struct evhttp_bound_socket *bound_socket) |
| Get the raw file descriptor referenced by an evhttp_bound_socket. More... | |
| EVENT2_EXPORT_SYMBOL struct evconnlistener * | evhttp_bound_socket_get_listener (struct evhttp_bound_socket *bound) |
| Return the listener used to implement a bound socket. | |
| EVENT2_EXPORT_SYMBOL void | evhttp_cancel_request (struct evhttp_request *req) |
| Cancels a pending HTTP request. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_clear_headers (struct evkeyvalq *headers) |
| Removes all headers from the header list. More... | |
| EVENT2_EXPORT_SYMBOL struct evhttp_connection * | evhttp_connection_base_bufferevent_new (struct event_base *base, struct evdns_base *dnsbase, struct bufferevent *bev, const char *address, ev_uint16_t port) |
| Create and return a connection object that can be used to for making HTTP requests. More... | |
| EVENT2_EXPORT_SYMBOL struct evhttp_connection * | evhttp_connection_base_new (struct event_base *base, struct evdns_base *dnsbase, const char *address, ev_uint16_t port) |
| Create and return a connection object that can be used to for making HTTP requests. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_connection_free (struct evhttp_connection *evcon) |
| Frees an http connection. | |
| EVENT2_EXPORT_SYMBOL void | evhttp_connection_free_on_completion (struct evhttp_connection *evcon) |
| Disowns a given connection object. More... | |
| EVENT2_EXPORT_SYMBOL const struct sockaddr * | evhttp_connection_get_addr (struct evhttp_connection *evcon) |
| Get the remote address associated with this connection. More... | |
| EVENT2_EXPORT_SYMBOL struct event_base * | evhttp_connection_get_base (struct evhttp_connection *req) |
| Returns the underlying event_base for this connection. | |
| EVENT2_EXPORT_SYMBOL struct bufferevent * | evhttp_connection_get_bufferevent (struct evhttp_connection *evcon) |
| Return the bufferevent that an evhttp_connection is using. | |
| EVENT2_EXPORT_SYMBOL void | evhttp_connection_get_peer (struct evhttp_connection *evcon, char **address, ev_uint16_t *port) |
| Get the remote address and port associated with this connection. | |
| EVENT2_EXPORT_SYMBOL struct evhttp * | evhttp_connection_get_server (struct evhttp_connection *evcon) |
| Return the HTTP server associated with this connection, or NULL. | |
| EVENT2_EXPORT_SYMBOL void | evhttp_connection_set_closecb (struct evhttp_connection *evcon, void(*)(struct evhttp_connection *, void *), void *) |
| Set a callback for connection close. | |
| EVENT2_EXPORT_SYMBOL void | evhttp_connection_set_family (struct evhttp_connection *evcon, int family) |
| Set family hint for DNS requests. | |
| EVENT2_EXPORT_SYMBOL int | evhttp_connection_set_flags (struct evhttp_connection *evcon, int flags) |
| Set connection flags. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_connection_set_initial_retry_tv (struct evhttp_connection *evcon, const struct timeval *tv) |
| Sets the delay before retrying requests on this connection. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_connection_set_local_address (struct evhttp_connection *evcon, const char *address) |
| sets the ip address from which http connections are made | |
| EVENT2_EXPORT_SYMBOL void | evhttp_connection_set_local_port (struct evhttp_connection *evcon, ev_uint16_t port) |
| sets the local port from which http connections are made | |
| EVENT2_EXPORT_SYMBOL void | evhttp_connection_set_max_body_size (struct evhttp_connection *evcon, ev_ssize_t new_max_body_size) |
| EVENT2_EXPORT_SYMBOL void | evhttp_connection_set_max_headers_size (struct evhttp_connection *evcon, ev_ssize_t new_max_headers_size) |
| EVENT2_EXPORT_SYMBOL void | evhttp_connection_set_retries (struct evhttp_connection *evcon, int retry_max) |
| Sets the retry limit for this connection - -1 repeats indefinitely. | |
| EVENT2_EXPORT_SYMBOL void | evhttp_connection_set_timeout (struct evhttp_connection *evcon, int timeout_in_secs) |
| Sets the timeout in seconds for events related to this connection. | |
| EVENT2_EXPORT_SYMBOL void | evhttp_connection_set_timeout_tv (struct evhttp_connection *evcon, const struct timeval *tv) |
| Sets the timeout for events related to this connection. More... | |
| EVENT2_EXPORT_SYMBOL char * | evhttp_decode_uri (const char *uri) |
| Helper function to sort of decode a URI-encoded string. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_del_accept_socket (struct evhttp *http, struct evhttp_bound_socket *bound_socket) |
| Makes an HTTP server stop accepting connections on the specified socket. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_del_cb (struct evhttp *, const char *) |
| Removes the callback for a specified URI. | |
| EVENT2_EXPORT_SYMBOL char * | evhttp_encode_uri (const char *str) |
| Helper function to encode a string for inclusion in a URI. More... | |
| const EVENT2_EXPORT_SYMBOL char * | evhttp_find_header (const struct evkeyvalq *headers, const char *key) |
| Finds the value belonging to a header. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_foreach_bound_socket (struct evhttp *http, evhttp_bound_socket_foreach_fn *function, void *argument) |
| Applies the function specified in the first argument to all evhttp_bound_sockets associated with "http". More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_free (struct evhttp *http) |
| Free the previously created HTTP server. More... | |
| EVENT2_EXPORT_SYMBOL char * | evhttp_htmlescape (const char *html) |
| Escape HTML character entities in a string. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_make_request (struct evhttp_connection *evcon, struct evhttp_request *req, enum evhttp_cmd_type type, const char *uri) |
| Make an HTTP request over the specified connection. More... | |
| EVENT2_EXPORT_SYMBOL struct evhttp * | evhttp_new (struct event_base *base) |
| Create a new HTTP server. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_parse_query (const char *uri, struct evkeyvalq *headers) |
| Helper function to parse out arguments in a query. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_parse_query_str (const char *uri, struct evkeyvalq *headers) |
| Helper function to parse out arguments from the query portion of an HTTP URI. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_remove_header (struct evkeyvalq *headers, const char *key) |
| Removes a header from a list of existing headers. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_remove_server_alias (struct evhttp *http, const char *alias) |
| Remove a server alias from an http object. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_remove_virtual_host (struct evhttp *http, struct evhttp *vhost) |
| Removes a virtual host from the http server. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_request_free (struct evhttp_request *req) |
| Frees the request object and removes associated events. | |
| EVENT2_EXPORT_SYMBOL enum evhttp_cmd_type | evhttp_request_get_command (const struct evhttp_request *req) |
| Returns the request command. | |
| EVENT2_EXPORT_SYMBOL struct evhttp_connection * | evhttp_request_get_connection (struct evhttp_request *req) |
| Returns the connection object associated with the request or NULL. More... | |
| EVENT2_EXPORT_SYMBOL const struct evhttp_uri * | evhttp_request_get_evhttp_uri (const struct evhttp_request *req) |
| Returns the request URI (parsed) | |
| const EVENT2_EXPORT_SYMBOL char * | evhttp_request_get_host (struct evhttp_request *req) |
| Returns the host associated with the request. More... | |
| EVENT2_EXPORT_SYMBOL struct evbuffer * | evhttp_request_get_input_buffer (struct evhttp_request *req) |
| Returns the input buffer. | |
| EVENT2_EXPORT_SYMBOL struct evkeyvalq * | evhttp_request_get_input_headers (struct evhttp_request *req) |
| Returns the input headers. | |
| EVENT2_EXPORT_SYMBOL struct evbuffer * | evhttp_request_get_output_buffer (struct evhttp_request *req) |
| Returns the output buffer. | |
| EVENT2_EXPORT_SYMBOL struct evkeyvalq * | evhttp_request_get_output_headers (struct evhttp_request *req) |
| Returns the output headers. | |
| EVENT2_EXPORT_SYMBOL int | evhttp_request_get_response_code (const struct evhttp_request *req) |
| const EVENT2_EXPORT_SYMBOL char * | evhttp_request_get_response_code_line (const struct evhttp_request *req) |
| const EVENT2_EXPORT_SYMBOL char * | evhttp_request_get_uri (const struct evhttp_request *req) |
| Returns the request URI. | |
| EVENT2_EXPORT_SYMBOL int | evhttp_request_is_owned (struct evhttp_request *req) |
| Returns 1 if the request is owned by the user. | |
| EVENT2_EXPORT_SYMBOL struct evhttp_request * | evhttp_request_new (void(*cb)(struct evhttp_request *, void *), void *arg) |
| Creates a new request object that needs to be filled in with the request parameters. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_request_own (struct evhttp_request *req) |
| Takes ownership of the request object. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_request_set_chunked_cb (struct evhttp_request *, void(*cb)(struct evhttp_request *, void *)) |
| Enable delivery of chunks to requestor. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_request_set_error_cb (struct evhttp_request *, void(*)(enum evhttp_request_error, void *)) |
| Set a callback for errors. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_request_set_header_cb (struct evhttp_request *, int(*cb)(struct evhttp_request *, void *)) |
| Register callback for additional parsing of request headers. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_request_set_on_complete_cb (struct evhttp_request *req, void(*cb)(struct evhttp_request *, void *), void *cb_arg) |
| Set a callback to be called on request completion of evhttp_send_* function. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_send_error (struct evhttp_request *req, int error, const char *reason) |
| Send an HTML error message to the client. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_send_reply (struct evhttp_request *req, int code, const char *reason, struct evbuffer *databuf) |
| Send an HTML reply to the client. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_send_reply_chunk (struct evhttp_request *req, struct evbuffer *databuf) |
| Send another data chunk as part of an ongoing chunked reply. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_send_reply_chunk_with_cb (struct evhttp_request *, struct evbuffer *, void(*cb)(struct evhttp_connection *, void *), void *arg) |
| Send another data chunk as part of an ongoing chunked reply. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_send_reply_end (struct evhttp_request *req) |
| Complete a chunked reply, freeing the request as appropriate. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_send_reply_start (struct evhttp_request *req, int code, const char *reason) |
| Initiate a reply that uses Transfer-Encoding chunked. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_set_allowed_methods (struct evhttp *http, ev_uint16_t methods) |
| Sets the what HTTP methods are supported in requests accepted by this server, and passed to user callbacks. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_set_bevcb (struct evhttp *http, struct bufferevent *(*cb)(struct event_base *, void *), void *arg) |
| Set a callback used to create new bufferevents for connections to a given evhttp object. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_set_cb (struct evhttp *http, const char *path, void(*cb)(struct evhttp_request *, void *), void *cb_arg) |
| Set a callback for a specified URI. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_set_default_content_type (struct evhttp *http, const char *content_type) |
| Set the value to use for the Content-Type header when none was provided. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_set_flags (struct evhttp *http, int flags) |
| Set connection flags for HTTP server. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_set_gencb (struct evhttp *http, void(*cb)(struct evhttp_request *, void *), void *arg) |
| Set a callback for all requests that are not caught by specific callbacks. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_set_max_body_size (struct evhttp *http, ev_ssize_t max_body_size) |
| XXX Document. | |
| EVENT2_EXPORT_SYMBOL void | evhttp_set_max_headers_size (struct evhttp *http, ev_ssize_t max_headers_size) |
| XXX Document. | |
| EVENT2_EXPORT_SYMBOL void | evhttp_set_timeout (struct evhttp *http, int timeout_in_secs) |
| Set the timeout for an HTTP request. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_set_timeout_tv (struct evhttp *http, const struct timeval *tv) |
| Set the timeout for an HTTP request. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_uri_free (struct evhttp_uri *uri) |
| Free all memory allocated for a parsed uri. More... | |
| const EVENT2_EXPORT_SYMBOL char * | evhttp_uri_get_fragment (const struct evhttp_uri *uri) |
| Return the fragment part of an evhttp_uri (excluding the leading "#"), or NULL if it has no fragment set. | |
| const EVENT2_EXPORT_SYMBOL char * | evhttp_uri_get_host (const struct evhttp_uri *uri) |
| Return the host part of an evhttp_uri, or NULL if it has no host set. More... | |
| const EVENT2_EXPORT_SYMBOL char * | evhttp_uri_get_path (const struct evhttp_uri *uri) |
| Return the path part of an evhttp_uri, or NULL if it has no path set. | |
| EVENT2_EXPORT_SYMBOL int | evhttp_uri_get_port (const struct evhttp_uri *uri) |
| Return the port part of an evhttp_uri, or -1 if there is no port set. | |
| const EVENT2_EXPORT_SYMBOL char * | evhttp_uri_get_query (const struct evhttp_uri *uri) |
| Return the query part of an evhttp_uri (excluding the leading "?"), or NULL if it has no query set. | |
| const EVENT2_EXPORT_SYMBOL char * | evhttp_uri_get_scheme (const struct evhttp_uri *uri) |
| Return the scheme of an evhttp_uri, or NULL if there is no scheme has been set and the evhttp_uri contains a Relative-Ref. | |
| const EVENT2_EXPORT_SYMBOL char * | evhttp_uri_get_userinfo (const struct evhttp_uri *uri) |
| Return the userinfo part of an evhttp_uri, or NULL if it has no userinfo set. | |
| EVENT2_EXPORT_SYMBOL char * | evhttp_uri_join (struct evhttp_uri *uri, char *buf, size_t limit) |
| Join together the uri parts from parsed data to form a URI-Reference. More... | |
| EVENT2_EXPORT_SYMBOL struct evhttp_uri * | evhttp_uri_new (void) |
| Return a new empty evhttp_uri with no fields set. | |
| EVENT2_EXPORT_SYMBOL struct evhttp_uri * | evhttp_uri_parse (const char *source_uri) |
| Alias for evhttp_uri_parse_with_flags(source_uri, 0) | |
| EVENT2_EXPORT_SYMBOL struct evhttp_uri * | evhttp_uri_parse_with_flags (const char *source_uri, unsigned flags) |
| Helper function to parse a URI-Reference as specified by RFC3986. More... | |
| EVENT2_EXPORT_SYMBOL void | evhttp_uri_set_flags (struct evhttp_uri *uri, unsigned flags) |
| Changes the flags set on a given URI. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_uri_set_fragment (struct evhttp_uri *uri, const char *fragment) |
| Set the fragment of an evhttp_uri, or clear the fragment if fragment==NULL. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_uri_set_host (struct evhttp_uri *uri, const char *host) |
| Set the host of an evhttp_uri, or clear the host if host==NULL. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_uri_set_path (struct evhttp_uri *uri, const char *path) |
| Set the path of an evhttp_uri, or clear the path if path==NULL. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_uri_set_port (struct evhttp_uri *uri, int port) |
| Set the port of an evhttp_uri, or clear the port if port==-1. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_uri_set_query (struct evhttp_uri *uri, const char *query) |
| Set the query of an evhttp_uri, or clear the query if query==NULL. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_uri_set_scheme (struct evhttp_uri *uri, const char *scheme) |
| Set the scheme of an evhttp_uri, or clear the scheme if scheme==NULL. More... | |
| EVENT2_EXPORT_SYMBOL int | evhttp_uri_set_userinfo (struct evhttp_uri *uri, const char *userinfo) |
| Set the userinfo of an evhttp_uri, or clear the userinfo if userinfo==NULL. More... | |
| EVENT2_EXPORT_SYMBOL char * | evhttp_uridecode (const char *uri, int decode_plus, size_t *size_out) |
| Helper function to decode a URI-escaped string or HTTP parameter. More... | |
| EVENT2_EXPORT_SYMBOL char * | evhttp_uriencode (const char *str, ev_ssize_t size, int space_to_plus) |
| As evhttp_encode_uri, but if 'size' is nonnegative, treat the string as being 'size' bytes long. More... | |
Basic support for HTTP serving.
As Libevent is a library for dealing with event notification and most interesting applications are networked today, I have often found the need to write HTTP code. The following prototypes and definitions provide an application with a minimal interface for making HTTP requests and for creating a very simple HTTP server.
| #define EVHTTP_URI_NONCONFORMANT 0x01 |
Tolerate URIs that do not conform to RFC3986.
Unfortunately, some HTTP clients generate URIs that, according to RFC3986, are not conformant URIs. If you need to support these URIs, you can do so by passing this flag to evhttp_uri_parse_with_flags.
Currently, these changes are:
| enum evhttp_cmd_type |
The different request types supported by evhttp.
These are as specified in RFC2616, except for PATCH which is specified by RFC5789.
By default, only some of these methods are accepted and passed to user callbacks; use evhttp_set_allowed_methods() to change which methods are allowed.
| enum evhttp_request_error |
The different error types supported by evhttp.
| Enumerator | |
|---|---|
| EVREQ_HTTP_TIMEOUT | Timeout reached, also.
|
| EVREQ_HTTP_EOF | EOF reached. |
| EVREQ_HTTP_INVALID_HEADER | Error while reading header, or invalid header. |
| EVREQ_HTTP_BUFFER_ERROR | Error encountered while reading or writing. |
| EVREQ_HTTP_REQUEST_CANCEL | The evhttp_cancel_request() called on this request. |
| EVREQ_HTTP_DATA_TOO_LONG | Body is greater then evhttp_connection_set_max_body_size() |
| EVENT2_EXPORT_SYMBOL int evhttp_accept_socket | ( | struct evhttp * | http, |
| evutil_socket_t | fd | ||
| ) |
Makes an HTTP server accept connections on the specified socket.
This may be useful to create a socket and then fork multiple instances of an http server, or when a socket has been communicated via file descriptor passing in situations where an http servers does not have permissions to bind to a low-numbered port.
Can be called multiple times to have the http server listen to multiple different sockets.
| http | a pointer to an evhttp object |
| fd | a socket fd that is ready for accepting connections |
| EVENT2_EXPORT_SYMBOL struct evhttp_bound_socket* evhttp_accept_socket_with_handle | ( | struct evhttp * | http, |
| evutil_socket_t | fd | ||
| ) |
Like evhttp_accept_socket(), but returns a handle for referencing the socket.
The returned pointer is not valid after http is freed.
| http | a pointer to an evhttp object |
| fd | a socket fd that is ready for accepting connections |
| EVENT2_EXPORT_SYMBOL int evhttp_add_header | ( | struct evkeyvalq * | headers, |
| const char * | key, | ||
| const char * | value | ||
| ) |
Adds a header to a list of existing headers.
| headers | the evkeyvalq object to which to add a header |
| key | the name of the header |
| value | the value belonging to the header |
| EVENT2_EXPORT_SYMBOL int evhttp_add_server_alias | ( | struct evhttp * | http, |
| const char * | alias | ||
| ) |
Add a server alias to an http object.
The http object can be a virtual host or the main server.
| http | the evhttp object |
| alias | the alias to add |
| EVENT2_EXPORT_SYMBOL int evhttp_add_virtual_host | ( | struct evhttp * | http, |
| const char * | pattern, | ||
| struct evhttp * | vhost | ||
| ) |
Adds a virtual host to the http server.
A virtual host is a newly initialized evhttp object that has request callbacks set on it via evhttp_set_cb() or evhttp_set_gencb(). It most not have any listing sockets associated with it.
If the virtual host has not been removed by the time that evhttp_free() is called on the main http server, it will be automatically freed, too.
It is possible to have hierarchical vhosts. For example: A vhost with the pattern *.example.com may have other vhosts with patterns foo.example.com and bar.example.com associated with it.
| http | the evhttp object to which to add a virtual host |
| pattern | the glob pattern against which the hostname is matched. The match is case insensitive and follows otherwise regular shell matching. |
| vhost | the virtual host to add the regular http server. |
| EVENT2_EXPORT_SYMBOL struct evhttp_bound_socket* evhttp_bind_listener | ( | struct evhttp * | http, |
| struct evconnlistener * | listener | ||
| ) |
The most low-level evhttp_bind/accept method: takes an evconnlistener, and returns an evhttp_bound_socket.
The listener will be freed when the bound socket is freed.
| EVENT2_EXPORT_SYMBOL int evhttp_bind_socket | ( | struct evhttp * | http, |
| const char * | address, | ||
| ev_uint16_t | port | ||
| ) |
Binds an HTTP server on the specified address and port.
Can be called multiple times to bind the same http server to multiple different ports.
| http | a pointer to an evhttp object |
| address | a string containing the IP address to listen(2) on |
| port | the port number to listen on |
| EVENT2_EXPORT_SYMBOL struct evhttp_bound_socket* evhttp_bind_socket_with_handle | ( | struct evhttp * | http, |
| const char * | address, | ||
| ev_uint16_t | port | ||
| ) |
Like evhttp_bind_socket(), but returns a handle for referencing the socket.
The returned pointer is not valid after http is freed.
| http | a pointer to an evhttp object |
| address | a string containing the IP address to listen(2) on |
| port | the port number to listen on |
| EVENT2_EXPORT_SYMBOL evutil_socket_t evhttp_bound_socket_get_fd | ( | struct evhttp_bound_socket * | bound_socket | ) |
Get the raw file descriptor referenced by an evhttp_bound_socket.
| bound_socket | a handle returned by evhttp_{bind,accept}_socket_with_handle |
| EVENT2_EXPORT_SYMBOL void evhttp_cancel_request | ( | struct evhttp_request * | req | ) |
Cancels a pending HTTP request.
Cancels an ongoing HTTP request. The callback associated with this request is not executed and the request object is freed. If the request is currently being processed, e.g. it is ongoing, the corresponding evhttp_connection object is going to get reset.
A request cannot be canceled if its callback has executed already. A request may be canceled reentrantly from its chunked callback.
| req | the evhttp_request to cancel; req becomes invalid after this call. |
| EVENT2_EXPORT_SYMBOL void evhttp_clear_headers | ( | struct evkeyvalq * | headers | ) |
Removes all headers from the header list.
| headers | the evkeyvalq object from which to remove all headers |
| EVENT2_EXPORT_SYMBOL struct evhttp_connection* evhttp_connection_base_bufferevent_new | ( | struct event_base * | base, |
| struct evdns_base * | dnsbase, | ||
| struct bufferevent * | bev, | ||
| const char * | address, | ||
| ev_uint16_t | port | ||
| ) |
Create and return a connection object that can be used to for making HTTP requests.
The connection object tries to resolve address and establish the connection when it is given an http request object.
| base | the event_base to use for handling the connection |
| dnsbase | the dns_base to use for resolving host names; if not specified host name resolution will block. |
| bev | a bufferevent to use for connecting to the server; if NULL, a socket-based bufferevent will be created. This buffrevent will be freed when the connection closes. It must have no fd set on it. |
| address | the address to which to connect |
| port | the port to connect to |
| EVENT2_EXPORT_SYMBOL struct evhttp_connection* evhttp_connection_base_new | ( | struct event_base * | base, |
| struct evdns_base * | dnsbase, | ||
| const char * | address, | ||
| ev_uint16_t | port | ||
| ) |
Create and return a connection object that can be used to for making HTTP requests.
The connection object tries to resolve address and establish the connection when it is given an http request object.
| base | the event_base to use for handling the connection |
| dnsbase | the dns_base to use for resolving host names; if not specified host name resolution will block. |
| address | the address to which to connect |
| port | the port to connect to |
| EVENT2_EXPORT_SYMBOL void evhttp_connection_free_on_completion | ( | struct evhttp_connection * | evcon | ) |
Disowns a given connection object.
Can be used to tell libevent to free the connection object after the last request has completed or failed.
| EVENT2_EXPORT_SYMBOL const struct sockaddr* evhttp_connection_get_addr | ( | struct evhttp_connection * | evcon | ) |
Get the remote address associated with this connection.
extracted from getpeername() OR from nameserver.
| EVENT2_EXPORT_SYMBOL int evhttp_connection_set_flags | ( | struct evhttp_connection * | evcon, |
| int | flags | ||
| ) |
Set connection flags.
| EVENT2_EXPORT_SYMBOL void evhttp_connection_set_initial_retry_tv | ( | struct evhttp_connection * | evcon, |
| const struct timeval * | tv | ||
| ) |
Sets the delay before retrying requests on this connection.
This is only used if evhttp_connection_set_retries is used to make the number of retries at least one. Each retry after the first is twice as long as the one before it.
| EVENT2_EXPORT_SYMBOL void evhttp_connection_set_timeout_tv | ( | struct evhttp_connection * | evcon, |
| const struct timeval * | tv | ||
| ) |
Sets the timeout for events related to this connection.
Takes a struct timeval.
| EVENT2_EXPORT_SYMBOL char* evhttp_decode_uri | ( | const char * | uri | ) |
Helper function to sort of decode a URI-encoded string.
Unlike evhttp_uridecode, it decodes all plus characters that appear after the first question mark character, but no plusses that occur before. This is not a good way to decode URIs in whole or in part.
The returned string must be freed by the caller
| uri | an encoded URI |
| EVENT2_EXPORT_SYMBOL void evhttp_del_accept_socket | ( | struct evhttp * | http, |
| struct evhttp_bound_socket * | bound_socket | ||
| ) |
Makes an HTTP server stop accepting connections on the specified socket.
This may be useful when a socket has been sent via file descriptor passing and is no longer needed by the current process.
If you created this bound socket with evhttp_bind_socket_with_handle or evhttp_accept_socket_with_handle, this function closes the fd you provided. If you created this bound socket with evhttp_bind_listener, this function frees the listener you provided.
bound_socket is an invalid pointer after this call returns.
| http | a pointer to an evhttp object |
| bound_socket | a handle returned by evhttp_{bind,accept}_socket_with_handle |
| EVENT2_EXPORT_SYMBOL char* evhttp_encode_uri | ( | const char * | str | ) |
Helper function to encode a string for inclusion in a URI.
All characters are replaced by their hex-escaped (%22) equivalents, except for characters explicitly unreserved by RFC3986 – that is, ASCII alphanumeric characters, hyphen, dot, underscore, and tilde.
The returned string must be freed by the caller.
| str | an unencoded string |
| const EVENT2_EXPORT_SYMBOL char* evhttp_find_header | ( | const struct evkeyvalq * | headers, |
| const char * | key | ||
| ) |
Finds the value belonging to a header.
| headers | the evkeyvalq object in which to find the header |
| key | the name of the header to find |
| EVENT2_EXPORT_SYMBOL void evhttp_foreach_bound_socket | ( | struct evhttp * | http, |
| evhttp_bound_socket_foreach_fn * | function, | ||
| void * | argument | ||
| ) |
Applies the function specified in the first argument to all evhttp_bound_sockets associated with "http".
The user must not attempt to free or remove any connections, sockets or listeners in the callback "function".
| http | pointer to an evhttp object |
| function | function to apply to every bound socket |
| argument | pointer value passed to function for every socket iterated |
| EVENT2_EXPORT_SYMBOL void evhttp_free | ( | struct evhttp * | http | ) |
Free the previously created HTTP server.
Works only if no requests are currently being served.
| http | the evhttp server object to be freed |
| EVENT2_EXPORT_SYMBOL char* evhttp_htmlescape | ( | const char * | html | ) |
Escape HTML character entities in a string.
Replaces <, >, ", ' and & with <, >, ", ' and & correspondingly.
The returned string needs to be freed by the caller.
| html | an unescaped HTML string |
| EVENT2_EXPORT_SYMBOL int evhttp_make_request | ( | struct evhttp_connection * | evcon, |
| struct evhttp_request * | req, | ||
| enum evhttp_cmd_type | type, | ||
| const char * | uri | ||
| ) |
Make an HTTP request over the specified connection.
The connection gets ownership of the request. On failure, the request object is no longer valid as it has been freed.
| evcon | the evhttp_connection object over which to send the request |
| req | the previously created and configured request object |
| type | the request type EVHTTP_REQ_GET, EVHTTP_REQ_POST, etc. |
| uri | the URI associated with the request |
| EVENT2_EXPORT_SYMBOL struct evhttp* evhttp_new | ( | struct event_base * | base | ) |
Create a new HTTP server.
| base | (optional) the event base to receive the HTTP events |
| EVENT2_EXPORT_SYMBOL int evhttp_parse_query | ( | const char * | uri, |
| struct evkeyvalq * | headers | ||
| ) |
Helper function to parse out arguments in a query.
Parsing a URI like
http://foo.com/?q=test&s=some+thing
will result in two entries in the key value queue.
The first entry is: key="q", value="test" The second entry is: key="s", value="some thing"
| uri | the request URI |
| headers | the head of the evkeyval queue |
| EVENT2_EXPORT_SYMBOL int evhttp_parse_query_str | ( | const char * | uri, |
| struct evkeyvalq * | headers | ||
| ) |
Helper function to parse out arguments from the query portion of an HTTP URI.
Parsing a query string like
q=test&s=some+thing
will result in two entries in the key value queue.
The first entry is: key="q", value="test" The second entry is: key="s", value="some thing"
| query_parse | the query portion of the URI |
| headers | the head of the evkeyval queue |
| EVENT2_EXPORT_SYMBOL int evhttp_remove_header | ( | struct evkeyvalq * | headers, |
| const char * | key | ||
| ) |
Removes a header from a list of existing headers.
| headers | the evkeyvalq object from which to remove a header |
| key | the name of the header to remove |
| EVENT2_EXPORT_SYMBOL int evhttp_remove_server_alias | ( | struct evhttp * | http, |
| const char * | alias | ||
| ) |
Remove a server alias from an http object.
| http | the evhttp object |
| alias | the alias to remove |
| EVENT2_EXPORT_SYMBOL int evhttp_remove_virtual_host | ( | struct evhttp * | http, |
| struct evhttp * | vhost | ||
| ) |
Removes a virtual host from the http server.
| http | the evhttp object from which to remove the virtual host |
| vhost | the virtual host to remove from the regular http server. |
| EVENT2_EXPORT_SYMBOL struct evhttp_connection* evhttp_request_get_connection | ( | struct evhttp_request * | req | ) |
Returns the connection object associated with the request or NULL.
The user needs to either free the request explicitly or call evhttp_send_reply_end().
| const EVENT2_EXPORT_SYMBOL char* evhttp_request_get_host | ( | struct evhttp_request * | req | ) |
Returns the host associated with the request.
If a client sends an absolute URI, the host part of that is preferred. Otherwise, the input headers are searched for a Host: header. NULL is returned if no absolute URI or Host: header is provided.
| EVENT2_EXPORT_SYMBOL struct evhttp_request* evhttp_request_new | ( | void(*)(struct evhttp_request *, void *) | cb, |
| void * | arg | ||
| ) |
Creates a new request object that needs to be filled in with the request parameters.
The callback is executed when the request completed or an error occurred.
| EVENT2_EXPORT_SYMBOL void evhttp_request_own | ( | struct evhttp_request * | req | ) |
Takes ownership of the request object.
Can be used in a request callback to keep onto the request until evhttp_request_free() is explicitly called by the user.
| EVENT2_EXPORT_SYMBOL void evhttp_request_set_chunked_cb | ( | struct evhttp_request * | , |
| void(*)(struct evhttp_request *, void *) | cb | ||
| ) |
Enable delivery of chunks to requestor.
| cb | will be called after every read of data with the same argument as the completion callback. Will never be called on an empty response. May drain the input buffer; it will be drained automatically on return. |
| EVENT2_EXPORT_SYMBOL void evhttp_request_set_error_cb | ( | struct evhttp_request * | , |
| void(*)(enum evhttp_request_error, void *) | |||
| ) |
Set a callback for errors.
On error, both the error callback and the regular callback will be called, error callback is called before the regular callback.
| EVENT2_EXPORT_SYMBOL void evhttp_request_set_header_cb | ( | struct evhttp_request * | , |
| int(*)(struct evhttp_request *, void *) | cb | ||
| ) |
Register callback for additional parsing of request headers.
| cb | will be called after receiving and parsing the full header. It allows analyzing the header and possibly closing the connection by returning a value < 0. |
| EVENT2_EXPORT_SYMBOL void evhttp_request_set_on_complete_cb | ( | struct evhttp_request * | req, |
| void(*)(struct evhttp_request *, void *) | cb, | ||
| void * | cb_arg | ||
| ) |
Set a callback to be called on request completion of evhttp_send_* function.
The callback function will be called on the completion of the request after the output data has been written and before the evhttp_request object is destroyed. This can be useful for tracking resources associated with a request (ex: timing metrics).
| req | a request object |
| cb | callback function that will be called on request completion |
| cb_arg | an additional context argument for the callback |
| EVENT2_EXPORT_SYMBOL void evhttp_send_error | ( | struct evhttp_request * | req, |
| int | error, | ||
| const char * | reason | ||
| ) |
Send an HTML error message to the client.
| req | a request object |
| error | the HTTP error code |
| reason | a brief explanation of the error. If this is NULL, we'll just use the standard meaning of the error code. |
| EVENT2_EXPORT_SYMBOL void evhttp_send_reply | ( | struct evhttp_request * | req, |
| int | code, | ||
| const char * | reason, | ||
| struct evbuffer * | databuf | ||
| ) |
Send an HTML reply to the client.
The body of the reply consists of the data in databuf. After calling evhttp_send_reply() databuf will be empty, but the buffer is still owned by the caller and needs to be deallocated by the caller if necessary.
| req | a request object |
| code | the HTTP response code to send |
| reason | a brief message to send with the response code |
| databuf | the body of the response |
| EVENT2_EXPORT_SYMBOL void evhttp_send_reply_chunk | ( | struct evhttp_request * | req, |
| struct evbuffer * | databuf | ||
| ) |
Send another data chunk as part of an ongoing chunked reply.
The reply chunk consists of the data in databuf. After calling evhttp_send_reply_chunk() databuf will be empty, but the buffer is still owned by the caller and needs to be deallocated by the caller if necessary.
| req | a request object |
| databuf | the data chunk to send as part of the reply. |
| EVENT2_EXPORT_SYMBOL void evhttp_send_reply_chunk_with_cb | ( | struct evhttp_request * | , |
| struct evbuffer * | , | ||
| void(*)(struct evhttp_connection *, void *) | cb, | ||
| void * | arg | ||
| ) |
Send another data chunk as part of an ongoing chunked reply.
The reply chunk consists of the data in databuf. After calling evhttp_send_reply_chunk() databuf will be empty, but the buffer is still owned by the caller and needs to be deallocated by the caller if necessary.
| req | a request object |
| databuf | the data chunk to send as part of the reply. |
| cb | callback funcion |
| call | back's argument. |
| EVENT2_EXPORT_SYMBOL void evhttp_send_reply_end | ( | struct evhttp_request * | req | ) |
Complete a chunked reply, freeing the request as appropriate.
| req | a request object |
| EVENT2_EXPORT_SYMBOL void evhttp_send_reply_start | ( | struct evhttp_request * | req, |
| int | code, | ||
| const char * | reason | ||
| ) |
Initiate a reply that uses Transfer-Encoding chunked.
This allows the caller to stream the reply back to the client and is useful when either not all of the reply data is immediately available or when sending very large replies.
The caller needs to supply data chunks with evhttp_send_reply_chunk() and complete the reply by calling evhttp_send_reply_end().
| req | a request object |
| code | the HTTP response code to send |
| reason | a brief message to send with the response code |
| EVENT2_EXPORT_SYMBOL void evhttp_set_allowed_methods | ( | struct evhttp * | http, |
| ev_uint16_t | methods | ||
| ) |
Sets the what HTTP methods are supported in requests accepted by this server, and passed to user callbacks.
If not supported they will generate a "405 Method not allowed" response.
By default this includes the following methods: GET, POST, HEAD, PUT, DELETE
| http | the http server on which to set the methods |
| methods | bit mask constructed from evhttp_cmd_type values |
| EVENT2_EXPORT_SYMBOL void evhttp_set_bevcb | ( | struct evhttp * | http, |
| struct bufferevent *(*)(struct event_base *, void *) | cb, | ||
| void * | arg | ||
| ) |
Set a callback used to create new bufferevents for connections to a given evhttp object.
You can use this to override the default bufferevent type – for example, to make this evhttp object use SSL bufferevents rather than unencrypted ones.
New bufferevents must be allocated with no fd set on them.
| http | the evhttp server object for which to set the callback |
| cb | the callback to invoke for incoming connections |
| arg | an context argument for the callback |
| EVENT2_EXPORT_SYMBOL int evhttp_set_cb | ( | struct evhttp * | http, |
| const char * | path, | ||
| void(*)(struct evhttp_request *, void *) | cb, | ||
| void * | cb_arg | ||
| ) |
Set a callback for a specified URI.
| http | the http sever on which to set the callback |
| path | the path for which to invoke the callback |
| cb | the callback function that gets invoked on requesting path |
| cb_arg | an additional context argument for the callback |
| EVENT2_EXPORT_SYMBOL void evhttp_set_default_content_type | ( | struct evhttp * | http, |
| const char * | content_type | ||
| ) |
Set the value to use for the Content-Type header when none was provided.
If the content type string is NULL, the Content-Type header will not be automatically added.
| http | the http server on which to set the default content type |
| content_type | the value for the Content-Type header |
| EVENT2_EXPORT_SYMBOL int evhttp_set_flags | ( | struct evhttp * | http, |
| int | flags | ||
| ) |
Set connection flags for HTTP server.
| EVENT2_EXPORT_SYMBOL void evhttp_set_gencb | ( | struct evhttp * | http, |
| void(*)(struct evhttp_request *, void *) | cb, | ||
| void * | arg | ||
| ) |
Set a callback for all requests that are not caught by specific callbacks.
Invokes the specified callback for all requests that do not match any of the previously specified request paths. This is catchall for requests not specifically configured with evhttp_set_cb().
| http | the evhttp server object for which to set the callback |
| cb | the callback to invoke for any unmatched requests |
| arg | an context argument for the callback |
| EVENT2_EXPORT_SYMBOL void evhttp_set_timeout | ( | struct evhttp * | http, |
| int | timeout_in_secs | ||
| ) |
Set the timeout for an HTTP request.
| http | an evhttp object |
| timeout_in_secs | the timeout, in seconds |
| EVENT2_EXPORT_SYMBOL void evhttp_set_timeout_tv | ( | struct evhttp * | http, |
| const struct timeval * | tv | ||
| ) |
Set the timeout for an HTTP request.
| http | an evhttp object |
| tv | the timeout, or NULL |
| EVENT2_EXPORT_SYMBOL void evhttp_uri_free | ( | struct evhttp_uri * | uri | ) |
Free all memory allocated for a parsed uri.
Only use this for URIs generated by evhttp_uri_parse.
| uri | container with parsed data |
| const EVENT2_EXPORT_SYMBOL char* evhttp_uri_get_host | ( | const struct evhttp_uri * | uri | ) |
Return the host part of an evhttp_uri, or NULL if it has no host set.
The host may either be a regular hostname (conforming to the RFC 3986 "regname" production), or an IPv4 address, or the empty string, or a bracketed IPv6 address, or a bracketed 'IP-Future' address.
Note that having a NULL host means that the URI has no authority section, but having an empty-string host means that the URI has an authority section with no host part. For example<EMAIL_ADDRESS>has a host of NULL, but "file:///etc/motd" has a host of "".
| EVENT2_EXPORT_SYMBOL char* evhttp_uri_join | ( | struct evhttp_uri * | uri, |
| char * | buf, | ||
| size_t | limit | ||
| ) |
Join together the uri parts from parsed data to form a URI-Reference.
Note that no escaping of reserved characters is done on the members of the evhttp_uri, so the generated string might not be a valid URI unless the members of evhttp_uri are themselves valid.
| uri | container with parsed data |
| buf | destination buffer |
| limit | destination buffer size |
| EVENT2_EXPORT_SYMBOL struct evhttp_uri* evhttp_uri_parse_with_flags | ( | const char * | source_uri, |
| unsigned | flags | ||
| ) |
Helper function to parse a URI-Reference as specified by RFC3986.
This function matches the URI-Reference production from RFC3986, which includes both URIs like
scheme://[[userinfo]@]foo.com[:port]]/[path][?query][#fragment]
and relative-refs like
[path][?query][#fragment]
Any optional elements portions not present in the original URI are left set to NULL in the resulting evhttp_uri. If no port is specified, the port is set to -1.
Note that no decoding is performed on percent-escaped characters in the string; if you want to parse them, use evhttp_uridecode or evhttp_parse_query_str as appropriate.
Note also that most URI schemes will have additional constraints that this function does not know about, and cannot check. For example, mailto://www.example.com/cgi-bin/fortune.pl is not a reasonable mailto url, http://www.example.com:99999/ is not a reasonable HTTP URL, and<EMAIL_ADDRESS>is not a reasonable FTP URL. Nevertheless, all of these URLs conform to RFC3986, and this function accepts all of them as valid.
| source_uri | the request URI |
| flags | Zero or more EVHTTP_URI_* flags to affect the behavior of the parser. |
| EVENT2_EXPORT_SYMBOL void evhttp_uri_set_flags | ( | struct evhttp_uri * | uri, |
| unsigned | flags | ||
| ) |
Changes the flags set on a given URI.
See EVHTTP_URI_* for a list of flags.
| EVENT2_EXPORT_SYMBOL int evhttp_uri_set_fragment | ( | struct evhttp_uri * | uri, |
| const char * | fragment | ||
| ) |
Set the fragment of an evhttp_uri, or clear the fragment if fragment==NULL.
The fragment should not include a leading "#". Returns 0 on success, -1 if fragment is not well-formed.
| EVENT2_EXPORT_SYMBOL int evhttp_uri_set_host | ( | struct evhttp_uri * | uri, |
| const char * | host | ||
| ) |
Set the host of an evhttp_uri, or clear the host if host==NULL.
Returns 0 on success, -1 if host is not well-formed.
| EVENT2_EXPORT_SYMBOL int evhttp_uri_set_path | ( | struct evhttp_uri * | uri, |
| const char * | path | ||
| ) |
Set the path of an evhttp_uri, or clear the path if path==NULL.
Returns 0 on success, -1 if path is not well-formed.
| EVENT2_EXPORT_SYMBOL int evhttp_uri_set_port | ( | struct evhttp_uri * | uri, |
| int | port | ||
| ) |
Set the port of an evhttp_uri, or clear the port if port==-1.
Returns 0 on success, -1 if port is not well-formed.
| EVENT2_EXPORT_SYMBOL int evhttp_uri_set_query | ( | struct evhttp_uri * | uri, |
| const char * | query | ||
| ) |
Set the query of an evhttp_uri, or clear the query if query==NULL.
The query should not include a leading "?". Returns 0 on success, -1 if query is not well-formed.
| EVENT2_EXPORT_SYMBOL int evhttp_uri_set_scheme | ( | struct evhttp_uri * | uri, |
| const char * | scheme | ||
| ) |
Set the scheme of an evhttp_uri, or clear the scheme if scheme==NULL.
Returns 0 on success, -1 if scheme is not well-formed.
| EVENT2_EXPORT_SYMBOL int evhttp_uri_set_userinfo | ( | struct evhttp_uri * | uri, |
| const char * | userinfo | ||
| ) |
Set the userinfo of an evhttp_uri, or clear the userinfo if userinfo==NULL.
Returns 0 on success, -1 if userinfo is not well-formed.
| EVENT2_EXPORT_SYMBOL char* evhttp_uridecode | ( | const char * | uri, |
| int | decode_plus, | ||
| size_t * | size_out | ||
| ) |
Helper function to decode a URI-escaped string or HTTP parameter.
If 'decode_plus' is 1, then we decode the string as an HTTP parameter value, and convert all plus ('+') characters to spaces. If 'decode_plus' is 0, we leave all plus characters unchanged.
The returned string must be freed by the caller.
| uri | a URI-encode encoded URI |
| decode_plus | determines whether we convert '+' to space. |
| size_out | if size_out is not NULL, *size_out is set to the size of the returned string |
| EVENT2_EXPORT_SYMBOL char* evhttp_uriencode | ( | const char * | str, |
| ev_ssize_t | size, | ||
| int | space_to_plus | ||
| ) |
As evhttp_encode_uri, but if 'size' is nonnegative, treat the string as being 'size' bytes long.
This allows you to encode strings that may contain 0-valued bytes.
The returned string must be freed by the caller.
| str | an unencoded string |
| size | the length of the string to encode, or -1 if the string is NUL-terminated |
| space_to_plus | if true, space characters in 'str' are encoded as +, not %20. |


To update what's available to order today, please check/un-check the items below and click UPDATE
You have made changes to what's available above. Please click UPDATE below to save changes when done


Points Transfer
Get gift cards with points. You can transfer your points for gift cards from a wide variety of major retailers as following.
Eligibility and transfer exchange rates vary depending on your points.
Once you signed on, you can see your Points on the top-right of the site.
Amazon.com Gift cards
Price:$300.00
$25 Walmart Gift Cards
Price:$300.00
Blowfish birthday Gift Cards
Price:$300.00
$100 eBay Gift Card-One card,so
many options.Fast email deli
Price:$300.00


When we provide services, we want to make them easy, useful and reliable.
Where delivered on the internet, this sometimes involves placing small amounts of information on your device, for example, computer or mobile phone.
These include small files known as cookies. They cannot be used to identify you personally.
These pieces of information are used to improve services for you by:
To learn more about cookies and how to manage them, visit AboutCookies.org. Or please read on to find out more about how and where we use cookies. There are two types of cookie you may encounter when using this website:
Home Office websites use cookies in several places. Cookies are set by our web servers to ensure that your session is maintained for the duration of your visit (until you close your web browser).
We've listed each of them below with more details about why we use them and how long they will last. We will endeavour to let you know before we store a cookie on your computer.
| Table containing the cookies which we set | ||
|---|---|---|
| Name | Typical content | Expires |
| OFLogon | 40 character session-specific security token set when a user logs on. Avoids users having to repeatedly supply logon details for every form | When user closes browser |
| OFAjaxMode | Fixed value of FALSE if present. Remembers user's choice of whether to optimise output for screen readers. | 11 years |
| OFSessionHash | 40 character security token set to identify the session. | When user closes browser |
| OFServerID | Integer number. Records which server is controlling the users' session when running in a load balanced configuration | When user closes browser |
| Screenreadmode | False/true. Set by the spell check facility to remember the users choice of screen-reader friendly user interface. | When user closes browser |
| Methodchosen | False/true. Set to true by the spell check facility if the user has chosen to correct a spelling. | When user closes browser |
When we use a supplier they may also set cookies.
We use a third party web analytics supplier to help us accurately estimate the number of visitors to our websites and volumes of usage. This may set cookies.


Shopping R Us
Shopping Cart
Continue shopping
Product name
Product description
25.00
x
Product name
Product description
25.00
x
Added items?
Update cart
Customer Details
Deliver To
IMImobile PLC
TownsvilleCountyshire
CH4 9EP
Bill To
Name
Number


class Solution: def furthestBuilding(self, heights: List[int], bricks: int, ladders: int) -> int: def judge(heights, bricks, ladders, x): need = [] for i in range(x): if heights[i+1]>heights[i]: need.append(heights[i+1]-heights[i]) need.sort() if ladders>=len(need): return True s = sum(need[:len(need)-ladders]) return bricks>=s l, r = 0, len(heights)-1 while l<=r: m = (l+r)//2 if judge(heights, bricks, ladders, m): l = m+1 else: r = m-1 return r


📚 Documentation - 🚀 Getting Started - 💻 API Reference - 💬 Feedback
Documentation
- Library docs - a complete reference and examples.
- Sample App - a sample application integrated with Auth0.
- Examples - code samples for common auth0-js authentication scenario's.
- Docs site - explore our docs site and learn more about Auth0.
Getting started
Installation
From CDN:
<!-- Latest patch release -->
<script src="https://cdn.auth0.com/js/auth0/9.22.1/auth0.min.js"></script>
From npm:
npm install auth0-js
After installing the auth0-js
module using npm, you'll need to bundle it up along with all of its dependencies, or import it using:
import auth0 from 'auth0-js';
Configure the SDK
auth0.WebAuth
Provides support for all the authentication flows.
var auth0 = new auth0.WebAuth({
domain: '{YOUR_AUTH0_DOMAIN}',
clientID: '{YOUR_AUTH0_CLIENT_ID}'
});
auth0.Authentication
Provides an API client for the Auth0 Authentication API.
var auth0 = new auth0.Authentication({
domain: '{YOUR_AUTH0_DOMAIN}',
clientID: '{YOUR_AUTH0_CLIENT_ID}'
});
auth0.Management
Provides an API Client for the Auth0 Management API (only methods meant to be used from the client with the user token). You should use an access_token
with the https://YOUR_DOMAIN.auth0.com/api/v2/
audience to make this work. For more information, read the user management section of the Auth0.js documentation.
var auth0 = new auth0.Management({
domain: '{YOUR_AUTH0_DOMAIN}',
token: '{ACCESS_TOKEN_FROM_THE_USER}'
});
API reference
auth0.webAuth
- constructor
- authorize(options)
- changePassword(options)
- checkSession(options, callback)
- login(options, callback)
- logout(options)
- parseHash(options, callback)
- passwordlessLogin(options, callback)
- passwordlessStart(options, callback)
- passwordlessVerify(options, callback)
- renderCaptcha(element, options, callback)
- renewAuth(options, callback)
- signup(options, callback)
- signupAndAuthorize(options, callback)
- validateAuthenticationResponse(options, parsedHash, callback)
auth0.Authentication
- buildAuthorizeUrl(options)
- buildLogoutUrl(options)
- delegation(options, callback)
- getChallenge(callback)
- getSSOData(withActiveDirectories, callback)
- login(options, callback)
- loginWithDefaultDirectory(options, callback)
- loginWithResourceOwner(options, callback)
- userInfo(token, callback)
auth0.Management
- getUser(userId, callback)
- linkUser(userId, secondaryUserId, callback)
- patchUserAttributes(userId, user, callback)
- patchUserMetadata(userId, userMetadata, callback)
Feedback
Contributing
We appreciate feedback and contribution to this repo! Before you get started, please see the following:
Raise an issue
To provide feedback or report a bug, please raise an issue on our issue tracker.
Vulnerability Reporting
Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout Why Auth0?
This project is licensed under the MIT license. See the LICENSE file for more info.


Heaps
Finish the beginner section first!!!
Sieve of Eratosthenes
Paris is the capital of France.
Modular Arithmetic
Tokyo is the capital of Japan.
Graphs I
Tokyo is the capital of Japan.
Graphs II
Tokyo is the capital of Japan.
Graphs III
Tokyo is the capital of Japan.
Disjoint Set Union
Tokyo is the capital of Japan.
Trees I
Tokyo is the capital of Japan.
Trees II
Tokyo is the capital of Japan.
Dynamic Programming I
Tokyo is the capital of Japan.
Dynamic Programming II
Tokyo is the capital of Japan.


Toggle Class
Toggle Class
Click the button to add class 'red' to this paragraph.
Slide Toggle
Slide Toggle
Click the button to slidetoggle a hidden image.
Append
Append
Click the button to append a new paragraph.
Toggle Left
Toggle Left
Click the button to slide this paragraph to the left.
Fade Toggle
Fade Toggle
Click the button to fade toggle this paragraph.


&$556;
Town of Goddard
The Town of Gludio
The Town of Giran
The Town of Dion
Heine
Town of Schuttgart
Town of Aden
Town of Oren
Wild Beast Pastures
Valley of Saints
Forest of the Dead
Swamp of Screams
Monastery of Silence
Stakato Nest
Primeval Isle Wharf


Import Working Hours from Excel files
Some of the data you want to import seems to have been imported before. Do you wish to overwrite the old data with the new data or simply add the new data to the new data to the database?
Replace the old data
Don't replace, add new data on top
Select an Import File Format
aproda Report #4
Select Files to Upload


This documentation relates to Opera's now deprecated .oex Extension API framework for Opera versions <= 12.15 and also provided by our OEX2NEX shim library.
For the latest Opera Extensions API documentation for Opera versions > 12.15 please consult the latest Opera Extensions API documentation online.
The readonly focused
attribute exposes the focused state of the browser window. On getting, the focused attribute returns true
if the browser window is focused, otherwise it returns false
.
When specified as an item in a BrowserWindowProperties
object, the focused
property indicates the desired focus state of a browser window. The value true
indicates that the window should be focused, and false
indicates that the focus state should not change.
When creating or updating a browser window, if this property is not specified, the default behaviour is the same as specifying false
.
Note: The focused
property is only a hint. Certain conditions and platform conventions might cause a window to be focused or not regardless of the specified value.
readonly boolean focused
boolean focused
The following example creates a button in the browser toolbar. When the button is clicked, a new, empty browser window is created and is then give focus.
//
// The background process (e.g. index.html)
//
// Specify the properties of the button before creating it.
var UIItemProperties = {
disabled: false,
title: "Window creation test",
icon: "images/icon_18.png",
onclick: function() {
// Open a new browser window
var win = opera.extension.windows.create();
// Update the window to give it focus
win.update({focused: true});
}
};
// Create the button and add it to the toolbar.
var button = opera.contexts.toolbar.createItem( UIItemProperties );
opera.contexts.toolbar.addItem(button);


I have been taking 10 mg of celexa daily for about six months; before that I was taking 20 mg for 1 year. The day before this experience I did not take my celexa, so given the half-life I probably had about 5 mg in my system at the time I took the MDMA.
I got up, had some coffee and a muffin, and walked over to my friend C's house. A nice long walk on a sunny day. Around 10:30 A.M. we each took 1 tablet of MDMA. Within about 20 minutes I felt the first alert, stirrings of energy and a feeling of light-headedness. By 12 p.m. I felt extremely good and was rocking back and forth, moving to the music that was playing, smiling. As usual when on MDMA, music sounded *fantastic*. I felt very extroverted at this point, talked a lot and took a great interest in what people around me were doing and saying. As usual with MDMA, my sense of touch was greatly enhanced and everything felt wonderful. Waves of bliss and joy radiated through me. For some time I was looking through PLANTS OF THE GODS with C's 4-year old daughter, and it felt great to share in the innocence and openness of a child as we looked at and discussed the beautiful plants and artwork in the book.
At noon C. and I each took another 1/2 tablet of MDMA, not quite feeling the effects as much as we wanted. An hour and a half later, at 1:30 I started to feel noticably hungry and managed to slowly eat a banana, which helped a bit and also reduced the annoying jaw tremors and clenching. I continued to feel the floaty euphoria of the MDMA.
At 2:30 we each ingested 14 mg. of 5-Meo-DIPT, and it seemed that within about 5 minutes I started to feel a change, though part of that could have been due to the 1/2 tablet of MDMA I'd taken an hour and a half ago. More energy, euphoria.
After that the trip started to change. I felt more introspective, more of an inward focus rather than the outer focus of the MDMA. My visual field became quite distorted over the next couple of hours and reminded me a lot of acid, except maybe a bit more intense. The visual aspect was probably the most fascinating part, with everything flowing and warping in a weird, impressionistic way. Communication became more difficult and I felt less able and less inclined to interact with those around me. Also, my thought processes became more confused - it was more difficult to 'put things together' in a way that made sense. However, I didn't feel like I was getting a lot of psychological insight or that I could do any inner work in this state.
More troubling was how my emotional state changed during this period. I became increasingly detached from the experience and felt very flat emotionally. I wondered if I was having a bad trip but decided that terms like 'good' or 'bad' were beside the point. I was just having an experience, wasn't really into it and that point, and was enduring rather than experiencing it.
Over the next 4 or 5 hours I manged to eat a little bit here and there, and that seemed to help to some extent. Eating was difficult though. Towards the end of the evening I went for a walk with C. and found that interesting - the fresh air felt great, and moving around helped me to feel better.
This is the second time I've tried 5-Meo-DIPT, and I think that I'd like to try it again once or twice, but I don't feel altogether satisfied with it and don't feel like I can get a lot of inner work done in that state. It does seem to have a strong erotic/sensual component, and at lower doses would probably greatly enhance sex. If I were to try 5-Meo-DIPT again I would probably do it by itself, and not combine it with MDMA.
I'm not sure if the negative aspects of the latter half of the trip were due to my brain being too depleted of neurotransmitters, or because of low blood sugar - I've had problems in past trips involving other substances (LSD, mushrooms) in which hunger and consequent emotional detachment seeming to go together.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Sometimes, a person just needs to feel like they’re spending intimate, personal time with another human being.
That’s what makes free webcam girl sites different from pornography. They add that personal touch that makes the viewer truly feel connected to them.
For a person who is struggling to connect with members of the opposite sex in real life, this can be a great way to get that fix of intimacy.
live cam girl sites aren’t the only way to get close to someone intimately online. Whenever you want something different from free webcam girl sites, there are tons of free chat rooms and online forums to explore where you can stay anonymous and chat with people who share the same interests.
If your insecurity doesn’t necessarily stem from a lack of interaction, but more a lack of feeling attractive, there are other options that will help you online. Sometimes the best way to put your insecurities to rest can simply be to get an honest opinion. There are multiple support groups online where you can share a picture of yourself with other members and they will give honest feedback on your appearance.


Contents
% lab2.m % Please place lab2.m in your working directory % Provide the print-out from running this function % using 'publish lab2' % % T. Holton 10 Sept 08 test_lab2;
Convolution, Part I
Convolution #1
x = sequence([1 2 6 -3 5], 1); h = sequence([4 -1 5 3 2], -3); test_lab2(x, h); % Convolution #2 test_lab2(h, x); % Convolution #3 h = sequence(1, 0); test_lab2(x, h); % Convolution #4 test_lab2(h, x); % Convolution #5 x = sequence(cos(2 * pi * (1:50000) / 16), -5); % nice, big sequence h = sequence(ones(1, 10), 10); test_lab2(x, h); % Convolution #6 test_lab2(h, x); % Convolution #7 x = sequence(1, 2); h = sequence(1, -1); test_lab2(x, h); % Convolution #8 test_lab2(h, x);
Problem #1 Your data are correct Your offset is correct Your elapsed time is 30.437 usecs which is 3.05 times Holton's elapsed time (9.995 usecs) and 3.89 times Matlab's elapsed time (7.831 usecs) Problem #2 Your data are correct Your offset is correct Your elapsed time is 21.691 usecs which is 3.1 times Holton's elapsed time (7.007 usecs) and 8.39 times Matlab's elapsed time (2.584 usecs) Problem #3 Your data are correct Your offset is correct Your elapsed time is 45.585 usecs which is 0.527 times Holton's elapsed time (86.475 usecs) and 0.459 times Matlab's elapsed time (99.265 usecs) Problem #4 Your data are correct Your offset is correct Your elapsed time is 24.63 usecs which is 0.875 times Holton's elapsed time (28.143 usecs) and 3.66 times Matlab's elapsed time (6.722 usecs) Problem #5 Your data are correct Your offset is correct Your elapsed time is 1854.75 usecs which is 1.4 times Holton's elapsed time (1327.47 usecs) and 18.6 times Matlab's elapsed time (99.553 usecs) Problem #6 Your data are correct Your offset is correct Your elapsed time is 2039.65 usecs which is 1.46 times Holton's elapsed time (1395.56 usecs) and 22.8 times Matlab's elapsed time (89.622 usecs) Problem #7 Your data are correct Your offset is correct Your elapsed time is 21.07 usecs which is 3.28 times Holton's elapsed time (6.425 usecs) and 3.79 times Matlab's elapsed time (5.562 usecs) Problem #8 Your data are correct Your offset is correct Your elapsed time is 13.614 usecs which is 3.84 times Holton's elapsed time (3.547 usecs) and 7.16 times Matlab's elapsed time (1.901 usecs)
Real-time Convolution
Real-time convolution #1
x = [1 4 2 6 5]; h = [4 -1 3 -5 2]; test_lab2a; test_lab2a(x, h); % Real-time convolution convolution #2 test_lab2a(h, x); % Real-time convolution #3 x = cos(2 * pi * (1:50000) / 16); % nice, big sequence h = ones(1, 10); test_lab2a(x, h);
Real-time convolution #1 Your data are correct Real-time convolution #2 Your data are correct Real-time convolution #3 Your data are correct
Deconvolution
Deconvolution #1
h = sequence([1 3 2], 2);
y = sequence([1 6 15 20 15 7 2], -1);
test_lab2b;
test_lab2b(y, h);
% Deconvolution #1
y = sequence([-1 -2 0 0 0 0 1 2], 2);
test_lab2b(y, h);
Deconvolution problem #1 Your data are correct Your offset is correct Deconvolution problem #2 Your data are correct Your offset is correct
Code
disp('---------------------------------------------------') disp(' Code') disp('---------------------------------------------------') type sequence type conv_rt
--------------------------------------------------- Code --------------------------------------------------- classdef sequence properties data offset end methods function s = sequence(data, offset) % SEQUENCE Sequence object % S = SEQUENCE(DATA, OFFSET) creates sequence S % using DATA and OFFSET % % Kevin Baltazar Reyes 13 Feb 2019 s.data = data; s.offset = offset; end function display(s) var = inputname(1); if (isempty(var)) disp('ans ='); else disp([var '=']); end switch length(s.data) case 0 disp(' data: []') case 1 disp([' data: ', num2str(s.data)]) otherwise disp([' data: [' num2str(s.data) ']']) end disp([' offset: ' num2str(s.offset)]) end function y = flip(x) % FLIP Flip a Matlab sequence structure, x, so y = x[-n] tempData = x.data(end:-1:1); %start with the end of the sequence then count down 1 each time tempOffest = -(x.offset+length(x.data) - 1); y = sequence(tempData,tempOffest); end function y = shift(x, n0) % SHIFT Shift a Matlab sequence structure, x, by integer amount n0 so that y[n] = x[n - n0] sameDataX=x.data; %data sequence remains the same, we are only shifting the offset newOffset=(x.offset+n0); %new offset = previous offset + value you are shifting y=sequence(sameDataX,newOffset); end function x = trim(x) %takes zeros off from each side of sequence while x.data(end)==0 x.data(end)=[]; end while x.data(1)==0 x.data(1)=[]; x.offset=x.offset+1; end end function z = plus(x, y) % PLUS Add x and y. Either x and y will both be sequence structures, or one of them may be a number. if isa(x,'sequence') == 0 %checks if x is a constant z=sequence(y.data+x,y.offset); %if x is a constant, add constant x to every data pt in y sequence, leave offest untouched z=trim(z); return; end if isa(y,'sequence') == 0 %same as above but instead z=sequence(x.data+y,x.offset); z=trim(z); return; end lx=length(x.data); %length of data in sequence x ly=length(y.data); %length of data in sequence y ody=y.offset-x.offset; %difference between sequence offsets IF Y HAS GREATER OFFSET THAN X odx=x.offset-y.offset; %%difference between sequence offsets IF X HAS GREATER OFFSET THAN Y x.data=[zeros(1,odx) x.data zeros(1,ody-(lx-ly))]; %add zeros to the beginning & end of sequence x as a "filler". You cannot perform operations between x & y if there is no data at a given index. The zeros are put in to fill these empty spots. y.data=[zeros(1,ody) y.data zeros(1,odx-(ly-lx))]; off=min(x.offset,y.offset); %minimum offset between x & y z=sequence(x.data+y.data,off); %create sequence z as a result of adding sequence x & y together z=trim(z); end function z = minus(x, y) % MINUS Subtract x and y. Either x and y will both be sequence structures, or one of them may be a number. if isa(x,'sequence')==0 z=sequence(x-y.data,y.offset); z=trim(z); return; end if isa(y,'sequence')==0 z=sequence(x.data-y,x.offset); z=trim(z); return; end Lx=length(x.data); Ly=length(y.data); ody=y.offset-x.offset; odx=x.offset-y.offset; x.data=[zeros(1,odx) x.data zeros(1,ody-(Lx-Ly))]; y.data=[zeros(1,ody) y.data zeros(1,odx-(Ly-Lx))]; off=min(x.offset,y.offset); z=sequence(x.data-y.data,off); z=trim(z); end function z = times(x, y) % TIMES Multiply x and y (i.e. .*) Either x and y will both be sequence structures, or one of them may be a number. if isa(x,'sequence')==0 z=sequence(y.data*x,y.offset); return; end if isa(y,'sequence')==0 z=sequence(x.data*y,x.offset); return; end Lx=length(x.data); Ly=length(y.data); ody=y.offset-x.offset; odx=x.offset-y.offset; x.data=[zeros(1,odx) x.data zeros(1,ody-(Lx-Ly))]; y.data=[zeros(1,ody) y.data zeros(1,odx-(Ly-Lx))]; off=min(x.offset,y.offset); z=sequence(x.data.*y.data,off); z=trim(z); end function stem(x) % STEM Display a Matlab sequence, x, using a stem plot. stem( x.offset : length(x.data )+x.offset-1,x.data); end function y = conv(x,h) %CONV two finite-length Matlab sequence objects, x and h % returning sequence object y if (length(x.data) > length(h.data)) %if sequence h is shorter, convolve sequence h with matrix X (y=h*X) X = zeros(length(h.data), ((length(h.data)+length(x.data))-1)); %define X's dimensions and stuff with zeros: i=1; %X row length = sequence h data length j=1; %Y column length = length(h.data)+length(x.data)-1 P = [x.data zeros(1,length(h.data)-1)]; %sequence x duplicated in P. length(x.data) + length of zeros stuffed after MUST EQUAL length of sequence y for flip&shift method for n = 1:(length(h.data)) %outer loop for row increment for m = 1:((length(h.data)+length(x.data))-1) %inner loop for column increment X(i,j)=P(j); %value stored in P's current index goes to corresponding X index j=j+1; %index points to next column (next value of data in P) end P = circshift(P,[0,1]); %circular shift-right on vector P. Value of 0 inputted one time to open data slot (leftmost slot) i=i+1; %index points to next row (P[k-n]) j=1; %start from P's first data point (leftmost column) end y = sequence((h.data*X),(x.offset+h.offset)); %now that the matrix dimensions are correct, we can multiply them together else %convolve x with matrix H (y=x*H) H = zeros(length(x.data), ((length(h.data)+length(x.data))-1)); i=1; j=1; P = [h.data zeros(1,length(x.data)-1)]; for n=1:(length(x.data)) for m = 1:((length(x.data)+length(h.data))-1) H(i,j)=P(j); j=j+1; end P = circshift(P,[0,1]); i=i+1; j=1; end y=sequence((x.data*H),(x.offset+h.offset)); end end function x = deconv(y,h) % x = y*H^(-1) % DECONV Convolve finite-length Matlab sequence object, y, % given impulse response object, h % returning sequence object, x. Lx = length(y.data)-length(h.data)+1; %length of sequence x h_hat = zeros(Lx,Lx); %define Lx by Lx matrix F = [h.data zeros(1, Lx-length(h.data))]; %sequence h duplicated in F. Add zeros after h.data so the length of F == Lx %traverse vector F through Lx by Lx matrix h_hat. Shift right, cut %off data shifted out at the end of the vector for i=1:Lx h_hat(i,:) = [zeros(1,i-1) F(1:Lx-i+1)]; %shift right by 1 each row by adding one zero per row in front, and cutting 1 data per row at end end x = sequence(y.data(1:Lx)*inv(h_hat), y.offset-h.offset); %only need to sample enough y.data to equal length(x.data). (length(y.data) MUST equal row & column length for h_hat end end end function y = conv_rt(x,h) % Convolve two finite-length arrays, x and h returning array, y h_hat = h(end:-1:1); x_hat = [zeros(1,length(h)-1) x zeros(1,length(h)-1)]; y = zeros(1,length(x)+length(h)-1); for i=1:length(x)+length(h)-1 y(i) = sum(h_hat.*x_hat(i:i+length(h)-1)); end end


Pagination - provide pagination links for your site or app with the multi-page pagination component, or the simpler pager alternative.
Pager - quick previous and next links for simple pagination implementations with light markup and styles. It's great for simple sites like blogs or magazines.
On small screens bootstrap4 pagination can be cropped
Limit the maximum visible buttons


Better luck next time soldier
Kills
During combat you were able to collect:
Scrap
Wire
Chips
Quantum Chips


Live visuals for Strom Festival at Berliner Philharmoniker
2020
Live A/V with Lintang Radittya at Goethe-Institut Indonesien
2018
Live A/V with Grand River
2019-2020
Live visuals for 47 at Ade - Amsterdam Dance Event
2018
Visuals for Tale Of Us and Afterlife
2015
Live A/V with Crono
2012-13


{% extends "admin/delete_confirmation.html" %} {% block content %}
Are you sure you want to delete the {{ object_name }} ? All of the following related items will be deleted:


Use this document as a way to quickly start any new project. All you get is this text and a mostly barebones HTML document.✉


| 023:068 Khan | : |
Have they not pondered over the Word (of Allah, i.e. what is sent down to the Prophet SAW), or has there come to them what had not come to their fathers of old? |
| 023:068 Maulana | : |
Do they not then ponder the Word? Or has there come to them that which did not come to their fathers of old? |
| 023:068 Pickthal | : |
Have they not pondered the Word, or hath that come unto them which came not unto their fathers of old? |
| 023:068 Rashad | : |
Why do they not reflect upon this scripture? Do they not realize that they have received something never attained by their ancestors? |
| 023:068 Sarwar | : |
Was it that you did not give any thought to it (the Quran)? Was it different from what was revealed to your fathers?. |
| 023:068 Shakir | : |
Is it then that they do not ponder over what is said, or is it that there has come to them that which did not come to their fathers of old? |
| 023:068 Sherali | : |
Have they not, then, pondered over the divine Word, or has there come to them that which did not come to their fathers of old? |
| 023:068 Yusufali | : |
Do they not ponder over the Word (of Allah), or has anything (new) come to them that did not come to their fathers of old? |
Concepts/Themes Covered: أركان الإسلام > التوحيد > الكافرون > صفات الكفار Pillars of Islam> Islamic> The Disbelievers> The Characteristics of the Disbelievers أركان الإسلام > (محمد (صلى الله عليه وسلم > بعثته Pillars of Islam> The Blessed Muhammad(PBUH)> His Mission(PBUH)
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


We train athletes – professional, collegiate, youth, and anybody that wants to train like an athlete.
When we speak of training we are talking about speed, strength, power, and sports therapy
ML Strength are Australia's newest brand in health and fitness, with gyms opening throughout the Brisbane metropolitan area. ML Strength believes fitness comes first and keeping fit and improving your health is not just a fad - it's a way of life. Whether your goal is weight loss, body building, nutrition or diet improvements, having more energy, or just looking and feeling better - we're here for you!
We have created gyms that we would love to train in and share that passion and enthusiasm with our valued members. Our gyms have an old school feel with a new school attitude! We are aimed at a health conscience adult who wants to move BEYOND the usual local gym.
Read MoreExpert trainers
Bachelor Degrees
OPEN 24/7
Staffed All the Time
$10 Casual Visit Rate
No Obligation, No Pressure
Unlike other so called 24:7 gyms, we are staffed all the time. If you need a late night workout, a protein bar or shake, supplements or a cool t-shirt, we are open for you. Our class times change constantly so check out on the web site for the timetable at each of our clubs.
Check ScheduleML Strength can offer cutting edge exercise options, including group fitness classes and one-on-one personal training sessions for weight loss, circuit training, boxing and karate.
Learn MoreWe are a Brisbane based company with clubs at Ashgrove, Brisbane City, Chermside, Graceville and Westlake.
Welcome! We are proud to share that our customers are highly satisfied with their experiences here and we have built a loyal customer base. We strive to provide the best possible service, equipment, and programs to help our customers achieve their fitness goals. In this section, we will share some of the reasons why our customers keep coming back and continue to recommend us to their friends and family.
I've been to a lot of fitness centers over the years, but this one is by far the best. The trainers are all so knowledgeable and really take the time to understand your goals and create a personalized workout plan that works for you. The equipment is state-of-the-art and there's always plenty of space to work out. I highly recommend this fitness center to anyone looking to take their fitness to the next level!
I was a bit nervous to join a fitness center, but this one made me feel so welcome from the very first day. The trainers are all so supportive and encouraging, and the workouts are fun and challenging. I love how there are always new classes and challenges to try, and I've met some amazing people through this community.


2021-04-03
People love convenience in every shape it comes. Some may say they want choice, but many are comfortable with the illusion of choice.
When there are too many choices an aggregator can come along to offer a one-stop shop. Everyone loves it at first. But success breeds competition, which increases customer acquisition costs, and commoditizes the originating value proposition. The aggregator realizes most of the margin lies further up (and down) the value chain and is faced with a difficult decision. Do you vertically integrate? Do you double down on being a platform? Do you spin out a new business? Do you do all of them?
This post will focus on vertical integration [1]. It results in a playbook that is easy to describe but extremely difficult to execute.
Let's call it the Studio Effect.
The Studio Effect is when an aggregator expands its position on the value chain by first owning the distribution channel followed by creating in-house products to shift brand affiliation. Best of all, it applies to multiple industries.
Media: Netflix built a destination for all your favorite content. Took over distribution with the shift to streaming. Analyzed what made content binge-worthy. And built an in-house studio to produce original content.
Retail: Amazon built the "Everything Store", online. Refined their logistics and supply chain to replace third-party fulfillment providers. Understood the top selling items, their underlying economics, and the manufacturing that backed them. And created a line of low-cost generics — Amazon Basics [2].
Food will be next.
Marketplaces have been aggregating restaurant supply for years. They know the popular items, missing cuisines, and branding that make them appealing.
So what’s different now?
Ghost kitchens and virtual brands have unlocked a new distribution model for food [3]. Marketplaces have built out their logistics to own fulfillment. But in order to expand their presence on the value chain, they need to take it one step further.
The real change happens when the fulfillment brand is a stronger signal than the supplier brand.
Most people couldn't name which studio produced their favorite show. But they know they watched it on Netflix. Most people don't care what brand their HDMI cable is. But they know Amazon Basics (powered by Amazon Prime) will be the cheapest option, arrive on time, and have a painless return policy if anything is wrong. Eventually people won't know the name of the restaurant they ordered lunch from, but they will know it was from DoorDash — or whoever executes this playbook the best [4].
The amount of work required to get the unit economics for this type of business to work is enormous. But if you can make it work and exploit a change in distribution, there is a powerful playbook waiting for you.
This is the Studio Effect. And it’s coming for your industry next.
Thank you to Kevin Kwok, Matthew Achariam, and Mike Karnjanaprakorn for reviewing drafts and making this much stronger.
NOTES
[1] I considered writing about all the options, or how to think about which path to take as the CEO of a company, but wanted to keep the post short and focused. If there is enough interest I will write a follow-up. There are some really interesting examples to unpack (e.g. Shopify, Spotify, Thumbtack, Uber, Yelp).
[2] Amazon has actually run this playbook with multiple business units. Working Backwards has examples of how they did this with the Kindle (moving down chain to own the device), Amazon Video (moving up chain to own production like Netflix), and Fire TV (moving down chain to own the device).
[3] Streaming gave media an alternative to theaters and scheduled programming. Dropshipping gave retailers an alternative to warehousing and storefronts. Ghost kitchens are giving restaurants an alternative to fixed branding and storefronts.
[4] This may sound like a bleak future. The unfortunate reality is that our desire for convenience will make it true. However, I believe this will ignite an equal and opposing surge in a new generation of independent restaurant brands who work directly with their customers. The top players already have this with native loyalty programs (e.g. McDonald's, Dunkin, Starbucks), but I anticipate it happening for smaller brands empowered by platforms that give them the say tools as the big players (e.g. Shopify "arming the rebels"). If you are working on this for other industries, I'd love to talk!


fun toString(): String
Return A string representation of the grid, with the origin in bottom left corner. A '#' indicates an empty cell, 'o' the lake and otherwise the Player's id.


1.1.0
The EventManager deals with events, create them, call them. This class is mostly for being inherited from.
(boolean
= true
)
if true (default), the events emitting is enabled, if false, they won't be fired.
This way, the events are not emitted
This way, the events are properly emitted
Define an event, with a name associated with a function
(string | null)
:
the eventId (useful to remove it) or null if the event couldnt be added
This is borrowed from https://gist.github.com/jed/982883 because the uuid most popular package is using a node dep
(any)


public interface AbstractJavaScriptEngine
JavaScriptEngine
.| Modifier and Type | Method and Description |
|---|---|
void |
addPostponedAction(PostponedAction action)
Adds an action that should be executed first when the script currently being executed has finished.
|
Object |
execute(HtmlPage page,
String sourceCode,
String sourceName,
int startLine)
Executes the specified JavaScript code in the context of a given page.
|
JavaScriptConfiguration |
getJavaScriptConfiguration()
Gets the associated configuration.
|
long |
getJavaScriptTimeout()
Returns the number of milliseconds that a script is allowed to execute before being terminated.
|
void |
initialize(WebWindow webWindow)
Performs initialization for the given webWindow.
|
boolean |
isScriptRunning()
Indicates if JavaScript is running in current thread.
|
void |
processPostponedActions()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Process postponed actions, if any. |
void |
registerWindowAndMaybeStartEventLoop(WebWindow webWindow)
Register WebWindow with the JavaScriptExecutor.
|
void |
setJavaScriptTimeout(long timeout)
Sets the number of milliseconds that a script is allowed to execute before being terminated.
|
void |
shutdown()
Shutdown the JavaScriptEngine.
|
JavaScriptConfiguration getJavaScriptConfiguration()
void addPostponedAction(PostponedAction action)
action
- the actionvoid processPostponedActions()
Object execute(HtmlPage page, String sourceCode, String sourceName, int startLine)
page
- the page that the code will execute withinsourceCode
- the JavaScript code to executesourceName
- the name that will be displayed on error conditionsstartLine
- the line at which the script source startsvoid registerWindowAndMaybeStartEventLoop(WebWindow webWindow)
webWindow
- the WebWindow to be registered.void initialize(WebWindow webWindow)
webWindow
- the web window to initialize forvoid setJavaScriptTimeout(long timeout)
timeout
- the timeout value, in millisecondslong getJavaScriptTimeout()
void shutdown()
boolean isScriptRunning()
true
if JavaScript is runningCopyright © 2002–2017 Gargoyle Software Inc.. All rights reserved.


Forgive ${invoice.id}
This will close the invoice with any owed amount forgiven.
ID
Invoice number
Total
Date
${invoice.id}
${invoice.number}
${invoice.totalFormatted}
${invoice.createdFormatted}
Forgive invoice


In the last Desymfony conference I was speaking with Luis Cordova and he introduced me “Stack” (I must admit Stack was in my to-study-list but only marked as favorite). The idea behind Stack is really cool. (In fact every project where Igor Wiedler appears is brilliant, even the chicken one :)).
Nowadays almost every modern framework/applications implements HttpKernelInterface (Symfony, Laravel, Drupal, Silex, Yolo and even the framework that I’m working in ;)) and we can build complex applications mixing different components and decorate our applications with an elegant syntax.
The first thing than come to my mind after studying Stack is to join different Silex applications in a similar way than Symfony (the full stack framework) uses bundles. And the best part of this idea is that it’s pretty straightforward. Let me show you one example:
Imagine that we’re working with one application with a blog and one API. In this case our blog and our API are Silex applications (but they can be one Symfony application and one Silex application for example).
That’s our API application:
use Silex\Application;
$app = new Application();
$app->get('/', function () {
return "Hello from API";
});
$app->run();
And here our blog application:
use Silex\Application;
$app = new Application();
$app->get('/', function () {
return "Hello from Blog";
});
$app->run();
We can organize our application using mounted controllers or even using RouteCollections but today we’re going to use Stack and it’s cool url-map.
First we are going to create our base application. To do this we’re going to implement the simplest Kernel in the world, that’s answers with “Hello” to every request:
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class MyKernel implements HttpKernelInterface
{
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
return new Response("Hello");
}
}
Stack needs HttpKernelInterface and Silex\Application implements this interface, so we can change our Silex applications to return the instance instead to run the application:
// app/api.php
use Silex\Application;
$app = new Application();
$app->get('/', function () {
return "Hello from API";
});
return $app;
// app/blog.php
use Silex\Application;
$app = new Application();
$app->get('/', function () {
return "Hello from API";
});
return $app;
And now we will attach those two Silex applications to our Kernel:
use Symfony\Component\HttpFoundation\Request;
$app = (new Stack\Builder())
->push('Stack\UrlMap', [
"/blog" => include __DIR__ . '/app/blog.php',
"/api" => include __DIR__ . '/app/api.php'
])->resolve(new MyKernel());
$request = Request::createFromGlobals();
$response = $app->handle($request);
$response->send();
$app->terminate($request, $response);
And that’s all. I don’t know what you think but with Stack one big window just opened in my mind. Cool, isn’t it?
You can see this working example in my github


Javascript RSA - Login Test
This test is an example to perform user login using javascript RSA.
- The user type in E-mail as username and a password.
- The client-side javascript hashes the password using SHA-1.
- The client-side javascript attach a timestamp to the end of the hash.
- The client-side javascript encrypt the whole thing with the RSA public key.
- The browser submits the encrypted data.
For testing purpose, the credential to login is any E-mail with the password "test".


| pause |
10000 |
|
| click |
css=div.guest-checkout div.step-2 div.btn-set a.btn-next-step |
|
| pause |
2000 |
|
| verifyText |
id=advice-required-entry-billing:firstname |
This is a required field. |
| verifyText |
id=advice-required-entry-billing:lastname |
This is a required field. |
| verifyText |
id=advice-required-entry-billing:email |
This is a required field. |
| verifyText |
id=advice-required-entry-billing:street1 |
This is a required field. |
| verifyText |
id=advice-required-entry-billing:street2 |
This is a required field. |
| verifyText |
id=advice-required-entry-billing:postcode |
This is a required field. |
| verifyText |
id=advice-required-entry-billing:city |
This is a required field. |
| verifyText |
id=advice-required-entry-billing:country_id |
This is a required field. |
| verifyText |
id=advice-required-entry-billing:telephone |
This is a required field. |


Car Price Prediction
What is the Present Market Price of Car ?
How many Kilometers Drived?
How much owners previously had the car (0 or 1 or 3) ?
How old is the Car ?
What is the Fuel Type ?
--Choose Option--
Petrol
Diesel
CNG
Are you A Dealer or Individual ?
--Choose Option--
Dealer
Individual
What is the Transmission Type ?
--Choose Option--
Mannual
Automatic
Predict
{{ prediction_text }}
©2021 Sumit Mohod


You Form has been filled successfully . Now you can get every update of covid-19 on your mobile phone,To confirm click on Sign in Menu ..
Whenever you need us, Just get sign in .


Android Developer
I have over an year of experience in Android app development, experienced in material design, REST, JSON and more.
Graphics Designer
I'm creative and dedicated to my work, if it's brand logo or a poster or brochure, I can handle them with ease.
Web Designer
I'm specialised in creating responsive website design to create your online presence.
Web Developer
I have fluency in ideas, can visualize and create an imprint of designer thoughts on World Wide Web.
I'm Abhijit Das from Bangalore
A freelance Android application and web developer as well as a graphics designer by passion.
I'm passionate about coding, cross platform application development and software engineering. I find the field of Artificial Intelligence, Cloud Computing and Data Science as well as Big Data exhilarating, thus want to pursue career in these fields.
I strive to be an enterprenuer, with only one goal in mind, which is to make one of the rights, "Right to Information" truely valid.
Tools and apps I use everyday:
This is what I love to listen
While developing TinkerSale, I have worked with Abhijit across the entire design & development life cycle of both Android and Web Applications. It won't be an exaggeration to say that Abhijit sets a gold standard when it comes to design aesthetics and understanding of what makes a wow UX. He brings in the unique combination of great design thinking along with a solid understanding of technology that helps in creating a elegantly designed and equally robust platform. I shall strongly recommend Abhijit's work to any of his prospective clients. All the best Abhijit - you are in for greater things!
-Jyotirmoy Bhattacharjee
Co Founder at Curious Cat Technologies
Abhijit Das is a very hard working and a smart Individual. We approached him for a web development project, he was very kind and understood our requirements very proficiently. He developed our startup website in less than a week, very professional worker and a humble person. Would recommend him in future for any Web development project.
-Mayank sewlia
CEO, Founder at Quasor Rocketry LLP
I have had the pleasure of knowing Abhijit Das a.k.a silverFoxA for the past 2 years working in the same branch. Deadline oriented person. Independent and focused strategist. Innovative perfectionist always ready to put all his energy and stamina to get the job done. Has an in-depth understanding of modern IT technologies. Has a lot of deep technical background."


@import data._
@import helper._
@import paroleParom1Report.hiddenInputs._
@import play.Environment
@import data.viewModel.PageStatus
@import org.webjars.play.WebJarsUtil
@import fragment.popup
@import com.typesafe.config.Config
@(reportForm: Form[ParoleParom1ReportData], encrypter: String => String)(implicit pageStatuses: Map[Int, PageStatus], webJarsUtil: WebJarsUtil, environment: Environment, configuration: Config)
@implicitField = @{ FieldConstructor(govukElements.f) }
@opdGuidance = {
Use the OPD consultation or formulation to inform the assessment and the relevant sections of the report, for example, interventions, RMP and sentence plan. Do not copy a formulation into the report.
}
@popup(reportForm, encrypter, "OPD pathway", 6) {
!
Warning All prisoners must be screened against the OPD pathway criteria. If this has not been completed at the point of parole you must do it before submitting your PAROM1 and use it to inform your report
@inputText(
reportForm("opdScreenedDate"),
'_label -> "Date of OPD screening",
'required -> "true",
'_date -> "true",
'_form_hint -> "For example, 31 3 1980",
'_day -> reportForm("opdScreenedDate_day").getValue.orElse(""),
'_month -> reportForm("opdScreenedDate_month").getValue.orElse(""),
'_year -> reportForm("opdScreenedDate_year").getValue.orElse(""))
Has the prisoner been screened into the OPD pathway (OPD criteria met)?
@inputRadioGroup(
reportForm("consideredForOPDPathwayServices"),
options(
"yes" -> "Yes",
"no" -> "No"
),
'_hint -> opdGuidance,
'_hintLabel -> "OPD guidance",
Symbol("data-aria-controls") -> "opd-pathway-details",
Symbol("_inline") -> "true"
)
}


Michigan Fans Won’t Be Happy With This Graphic From Ohio State
by Andrew McCartyIn just a few days, the Ohio State Buckeyes will host the Penn State Nittany Lions in a massive game for the Big Ten.
All eyes will be on Saturday afternoon’s game as the pregame shows for FOX, ESPN and the Big Ten Network will all be in Columbus for the game.
Before the game kicks off, Ohio State released a graphic showing the number of people expected to tune into those respective shows. The Buckeyes expect more than 3.5 million people to be watching the pre-game action.
In the graphic, Ohio State made sure former Michigan star and ESPN College GameDay analyst Desmond Howard was nowhere to be seen.
Howard can be seen sporting Brutus the Buckeye’s head.
Check it out.
Lee Corso is usually the one wearing headgear on College GameDay, but there’s clearly no room for Michigan Men on the Ohio State graphic.
As for the game at hand, Ohio State enters as a heavy favorite. The Buckeyes have been one of the most dominant programs in the country this season. However, Penn State plays Ohio State about as tough as any team in the country.
Can Penn State pull off the upset on Saturday?
We’ll find out soon.


BRIDGE is integrated with the UCSF Electronic Health Record (APeX) which is an Epic system. Clinicians can either click on a link from the patient encounter screen or from the patient chart in APeX to launch the BRIDGE dashboard.
Interactive
BRIDGE currently has multiple ways to visualize data, called widgets. The BRIDGE platform is built to easily expand the library of widgets.
Real-time
BRIDGE is integrated with multiple data sources and is easily able to expand to additional clinically relevant data sources.
Actionable
BRIDGE displays actionable visualizations to support clinical decision making.
Configurable
BRIDGE is a configurable platform built to easily create clinic specific dashboards. Clinicians can mix and match between existing data sources and widgets.
Innovative
BRIDGE is built to bring research, algorithms and innovation to the point of care.