Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C liability, trademark and document use rules apply.
This specification defines a mechanism for an HTML document to discover and subsequently communicate with HTTP-based services advertised via common discovery protocols within the current network.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
This version of the specification is an update to the previously published 24 September 2013 Working Draft version of the same document.
A full change log is available for this specification and a full HTML diff is also available. Significant changes from the previously published working draft include updates to the privacy and security considerations of this API, adding CORS support and the preliminary CORS check procedure, improvements to garbage collection and other minor technical clarifications.
This document was published by the Device APIs Working Group as a Working Draft. This document is intended to become a W3C Recommendation. If you wish to make comments regarding this document, please send them to<EMAIL_ADDRESS>(subscribe, archives). All comments are welcome.
Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
This section is non-normative.
This specification defines the NavigatorNetworkService
interface to enable Web pages to connect and communicate with Local-networked Services provided over
HTTP. This enables access to services and content provided by
home network devices, including the discovery and playback of content available to those devices, both from
services such as traditional broadcast media and internet based services as well as local services. Initial
design goals and requirements provided by the W3C Web & TV interest group are documented in [hnreq].
Using this API consists of requesting a well-known service type, known by developers and advertised by Local-networked Devices. User authorization, where the user connects the web page to discovered services, is expected before the web page is able to interact with any Local-networked Services.
A web page creates a request to obtain connectivity to services running in the network by specifying a well-known discovery service type that it wishes to interact with.
The user agent, having captured all advertised services on the network from the service discovery mechanisms included in this recommendation, attempts to match the requested service type to a discovered service according to the processing described herein. Only Local-networked Services that pass a preliminary CORS check should be made available to web pages by a user agent. A user agent may provide a way for users to white-list non-CORS enabled Local-networked Services but implementation of such a feature is left to the discretion of the implementer.
If a service connectivity request is successful then the Web page is provided with a promise-based success callback with the all necessary information to communicate with the authorized Local-networked Service. If the request fails then the Web page will receive a promise-based error callback containing an error string describing the cause of Local-networked Service connectivity failure.
Once connected to a Local-networked Service the Web page can send requests and receive responses to the Local-networked Service via the messaging format and appropriate channel inferred from the service type authorized via the provided API. The Web page, once connected, can also receive service-pushed events, in the messaging format supported by the Local-networked Device, if such event subscription functionality is provided by the connected Local-networked Service.
Services available within the local network can connect and disconnect at different times during the execution
of a web page. The user agent can inform a web page when the state of networked services matching any of the
requested valid service types change. Web pages can use this information to enable in-page experiences for
communicating the state of networked services with the ability to change the particular service or set of
services the page is connected to (by re-invoking the getNetworkServices()
method defined herein).
Example of requesting a DNS-SD advertised service:
function showServices( services ) { // Show a list of all the services provided to the web page for(var i = 0, l = services.length; i < l; i++) console.log( services[i].name ); } navigator.getNetworkServices('zeroconf:_boxee-jsonrpc._tcp').then(showServices);
Example of requesting a UPnP advertised service, also handling error conditions:
function showServices( services ) { // Show a list of all the services provided to the web page for(var i = 0, l = services.length; i < l; i++) console.log( services[i].name ); } function error( e ) { console.log( "Error occurred: " + e.name ); } navigator.getNetworkServices('upnp:urn:schemas-upnp-org:service:ContentDirectory:1').then(showServices, error);
Example of requesting either a DNS-SD or UPnP advertised service:
function showServices( services ) { // Show a list of all the services provided to the web page (+ service type) for(var i = 0, l = services.length; i < l; i++) console.log( services[i].name + '(' + services[i].type + ')' ); } navigator.getNetworkServices([ 'zeroconf:_boxee-jsonrpc._tcp', 'upnp:urn:schemas-upnp-org:service:ContentDirectory:1' ]).then(showServices);
For more detailed examples, including examples of communicating with obtained networked services, see the Examples section.
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key words MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL in this specification are to be interpreted as described in [RFC2119].
Requirements phrased in the imperative as part of algorithms (such as "strip any leading space characters" or "return false and abort these steps") are to be interpreted with the meaning of the key word ("must", "should", "may", etc) used in introducing the algorithm.
Some conformance requirements are phrased as requirements on attributes, methods or objects. Such requirements are to be interpreted as requirements on user agents.
Conformance requirements phrased as algorithms or specific steps MAY be implemented in any manner, so long as the end result is equivalent. (In particular, the algorithms defined in this specification are intended to be easy to follow, and not intended to be performant.)
The only conformance class defined by this specification is a user agent.
User agents MAY impose implementation-specific limits on otherwise unconstrained inputs, e.g. to prevent denial of service attacks, to guard against running out of memory, or to work around platform-specific limitations.
When support for a feature is disabled (e.g. as an emergency measure to mitigate a security problem, or to aid in development, or for performance reasons), user agents MUST act as if they had no support for the feature whatsoever, and as if the feature was not mentioned in this specification. For example, if a particular feature is accessed via an attribute in a Web IDL interface, the attribute itself would be omitted from the objects that implement that interface - leaving the attribute on the object but making it return null or throw an exception is insufficient.
The construction "a Foo
object", where Foo
is actually an interface, is sometimes
used instead of the more accurate "an object implementing the interface Foo
".
The term DOM is used to refer to the API set made
available to scripts in Web applications, and does not necessarily imply the existence of an actual
Document
object or of any other Node
objects as defined in the DOM Core
specifications. [DOM4]
An IDL attribute is said to be getting when its value is being retrieved (e.g. by author script), and is said to be setting when a new value is assigned to it.
A valid service type is any of the following:
upnp:
or zeroconf:
followed by one or more characters
in the ranges U+0021, U+0023 to U+0027, U+002A to U+002B, U+002D to U+002E, U+0030 to U+0039, U+0041 to U+005A,
U+005E to U+007E.
dial:
followed by an integer version.
A valid service type provided in the type
attribute of the getNetworkServices()
method will be matched against the
services currently contained in the list of available service records according to the algorithms defined in this
specification.
A user-agent generated callback url is a Local-network accessible URL endpoint that a user agent generates and maintains for receiving HTTP NOTIFY requests from UPnP Event sources. It is only required when the user agent implements UPnP Service Discovery as defined in this specification.
In this specification we use the following terms to describe the processes required for Local-networked Services management:
NetworkService
object, that is currently being shared with a web
page via a NetworkServices
object registered in the list of active service managers.
A network services whitelist is a list of zero or more valid service type tokens that, when matched to a service type discovered in the local network, enables that service to be shared with a web page even if that Local-networked Service does not itself allow Cross-Origin Resource Sharing [CORS]. A user agent MUST simulate CORS support for all service interaction in this case. Implementation of this feature is at implementer's discretion. When a user agent does not implement a network services whitelist then it is to treat this as always being an empty list.
The API defined in this specification can be used to find and connect to devices and services within a user's current network. This discloses information related to a user's network: devices available on their network and the publicly-accessible services ("networked services") currently running and available on those devices. The distribution of this information could potentially compromise the user's privacy. A conforming implementation of this specification MUST provide a mechanism that protects the user's privacy. This mechanism MUST ensure that no networked service information is retrievable without the user's express permission.
A user agent SHOULD only allow web pages to connect with Local-networked Services that have passed a preliminary CORS check indicating they support Cross-Origin Resource Sharing [CORS]. In this way, a user agent SHOULD NOT allow web pages to access other arbitrary networked services on the current local network.
A user agent MAY provide a way for users to enable access to non-CORS enabled Local-networked Services from web pages (i.e. operate a network services whitelist). Implementation of such a network services whitelist, if any, is left to an implementer's discretion. Such a whitelist may be configurable by each user at runtime or may be managed by the implementation itself on behalf of its users. In the case that a user agent provides a network services whitelist, it MUST act as if all URLs for the Local-networked Service corresponding to any previously whitelisted service type had Cross-Origin Resource Sharing [CORS] enabled indefinitely.
A user agent MUST NOT provide networked service information to web sites without the express permission of the user. A user agent MUST acquire permission through a user interface, unless they have prearranged trust relationships with users, as described below. The user interface MUST include the document base URL. Those permissions that are acquired through the user interface and that are preserved beyond the current browsing session (i.e. beyond the time when the browsing context is navigated to another URL) MUST be revocable and a user agent MUST respect revoked permissions.
Obtaining the user's express permission to access one API method does not imply the user has granted permission for the same web site to access any other methods that may be provided by this API, or to access the same method with a different set of arguments, as part of the same permission context. If a user has expressed permission for an implementation to, e.g. find a set of existing networked services, the implementation MUST seek the user's express permission if and when any subsequent functions are called on this API.
A user agent MAY have prearranged trust relationships that do not require such user interfaces. For example, while a web browser will present a user interface when a web site performs a networked service lookup, a different runtime may have a prearranged, delegated security relationship with the user and, as such, a suitable alternative security and privacy mechanism with which to authorise the retrieval of networked service information.
This section is non-normative.
Further to the requirements listed in the previous section, implementers of the Network Service Discovery API are also advised to consider the following aspects that can negatively affect the privacy of their users: in certain cases, users can inadvertently grant permission to the user agent to disclose networked services to Web sites. In other cases, the content hosted at a certain URL changes in such a way that previously granted networked service permissions no longer apply as far as the user is concerned. Or the users might simply change their minds.
Predicting or preventing these situations is inherently difficult. Mitigation and in-depth defensive measures are an implementation responsibility and not prescribed by this specification. However, in designing these measures, implementers are advised to enable user awareness of networked service sharing, and to provide easy access to interfaces that enable revocation of permissions that web applications have for accessing networked services via this API.
This section includes references and terminology related to Promise objects that at the time of publication were still under development. Promise-related concepts included in this section are temporarily drafted elsewhere and can be found here.
[Supplemental, NoInterfaceObject] interface NavigatorNetworkService { Promise getNetworkServices( in any type ); }; Navigator implements NavigatorNetworkService;
navigator
.
getNetworkServices
( type )
Immediately returns a new Promise object and then the user is prompted to select discovered network services that have advertised support for the requested service type(s).
The type argument contains one or more valid service type tokens that the web page would like to interact with.
If the user accepts, the promise object is resolved, with a NetworkServices
object as its argument.
If the user declines, or an error occurs, the promise object is rejected.
When the getNetworkServices(type)
method is called,
the user agent MUST run the following steps:
Promise
object.
DOMError
object whose name
attribute has the string
value "UnknownTypePrefixError" (UNKNOWN_TYPE_PREFIX_ERR
) and whose
message
attribute has a helpful implementation-dependent message that explains this
error, abort any remaining steps and return.
type
attribute equals the requested control type then let
matched service equal the value of available service. Otherwise, abort the remaining
sub-steps and continue above at the next available service.
url
attribute as the control endpoint URL argument
and the
entry script's origin as the request origin argument.
pass
and matched service's
type
attribute is also not present in the network services whitelist then abort the remaining sub-steps and
continue above at the next available service.
NetworkService
object, mapping the parameters of matched
service to this new object where possible.
DOMError
object whose name
attribute has the string
value "PermissionDeniedError" (PERMISSION_DENIED_ERR
) and whose
message
attribute has a helpful implementation-dependent message that explains this
error, abort any remaining steps and return.
NetworkServices
object without prior permission given by the
user.
If services found is not an empty array then the user agent MAY choose to prompt the user in a user-agent-specific manner for permission to
provide the entry script's origin with a NetworkServices
object representing the user-authorized subset of services found.
Alternatively, the user agent MAY wish to skip this user opt-in step and choose to fulfill Network Service Promise immediately based on a previously-established user preference, for security reasons, or due to platform limitations. In such an implementation, if Network Service Promise is to be fulfilled as a result of a previously-established user preference then the user agent MUST continue at the next step of this algorithm.
If permission has been granted by the user to access one or more networked services then the user agent SHOULD include an "ongoing local-network communication" indicator.
If permission has been denied by the user, user agent or platform, then the user agent MUST reject Network Service
Promise by running the resolver reject
algorithm against the Network Service
Promise's
Resolver, passing in a newly constructed DOMError
object whose name
attribute has the
string value "PermissionDeniedError" (PERMISSION_DENIED_ERR
) and whose
message
attribute has a helpful implementation-dependent message that explains this
error, abort any remaining steps and return.
If the user never responds or no previously-established user preference has been met, this algorithm stalls on this step.
NetworkService
objects for which the user granted
permission above - known as the current objects user-authorized
services.
type
parameter begins with the DOMString "upnp:
"
and the service's eventsUrl
parameter is not empty then setup a UPnP Events Subscription for service.
NetworkServices
object.
servicesAvailable
attribute to the number of
items currently found in the list of available service records whose type
property matches
any of the tokens requested in requested control types.
length
attribute to the number of items in services.
The task source for these tasks is the user interaction task source.
The preliminary CORS check algorithm determines whether a
Local-networked Service supports Cross-Origin Resource Sharing [CORS] as part of a call to the getNetworkServices()
method, prior to that service
being proposed for sharing to users and prior to active sharing with web pages. This algorithm takes two
arguments, control endpoint URL and request origin, and consists of running the
following steps:
OPTIONS
, the request URL to control endpoint URL, the source origin to request origin, setting the omit credentials flag to true
and including an Access-Control-Request-Method
header with a value of
GET
.
200
then abort any remaining steps and return fail
.
This returned result will always be either pass
or fail
.
There is no implied persistence to networked service sharing provided to a web page. It MUST NOT be possible to access a networked service previously granted to a web page without user authorization in all of the following cases:
getNetworkServices()
method at any point in its
execution.
name
Returns the current error's error name. At the current time, this will be "PermissionDeniedError" or
"UnknownTypePrefixError", for which the corresponding error constants PERMISSION_DENIED_ERR
and UNKNOWN_TYPE_PREFIX_ERR
are defined.
The name
attribute of a DOMError
object returned from this API MUST return the name for the error, which will be one of the following:
PERMISSION_DENIED_ERR
(DOMString
value "PermissionDeniedError")
UNKNOWN_TYPE_PREFIX_ERR
(DOMString value "UnknownTypePrefixError")
The NetworkServices
interface represents a collection of zero or
more indexed properties that are each a user-authorized NetworkService
object.
A NetworkServices
object is the
promise result from a call to getNetworkServices()
.
[NoInterfaceObject] interface NetworkServices { readonly attribute unsigned long length; getter NetworkService (unsigned long index); NetworkService? getServiceById(DOMString id); readonly attribute unsigned long servicesAvailable; // event handler attributes attribute EventHandler onservicefound; attribute EventHandler onservicelost; }; NetworkServices implements EventTarget;
length
Returns the current number of indexed properties in the current object's collection.
servicesAvailable
Returns the current number of items matching one of the app-requested valid service type tokens in the list of available service records.
The length
attribute MUST return the number of NetworkService
objects represented by the collection.
The servicesAvailable
attribute
MUST return the number of services in the list of available service records whose type
attribute matches any
of the valid service type tokens that were initially used to create the current NetworkServices
object.
services
[ index ]
Returns the specified NetworkService
object.
services
. getServiceById
( id )
Returns the NetworkService
object with the given identifier,
or null if no service has that identifier.
A NetworkServices
object represents the current collection of
zero or more NetworkService
objects - its indexed properties. The indexed properties of a NetworkServices
object are immutable meaning that indexed properties cannot be added and indexed properties cannot be removed for the lifetime of a NetworkServices
object.
The supported property indices of NetworkServices
objects at any instant are the numbers from zero to
the number of the NetworkService
objects in the collection
minus one.
Each service in a NetworkServices
object thus has an index; the
first has the index 0, and each subsequent service is numbered one higher than the previous one.
To determine the value of an indexed property for a given index index in a
NetworkServices
object the user agent MUST return the NetworkService
object that
represents the indexth item in the collection.
The getServiceById(id)
method MUST return the first NetworkService
object in the collection whose id
attribute is equal to
the value of the id argument provided. When no NetworkService
objects match the given argument, the method MUST return null.
The following are the event handlers (and their corresponding event handler event types) that MUST be supported, as IDL attributes, by all objects implementing the NetworkServices
interface:
| Event handler | Event handler event type |
|---|---|
onservicefound
|
servicefound
|
onservicelost
|
servicelost
|
The NetworkService
interface is used to provide a set of connection
information for an HTTP service endpoint and if available,
service events, running on a networked device.
[NoInterfaceObject] interface NetworkService { readonly attribute DOMString id; readonly attribute DOMString name; readonly attribute DOMString type; readonly attribute DOMString url; readonly attribute DOMString config; readonly attribute boolean online; // event handler attributes attribute EventHandler onavailable; attribute EventHandler onunavailable; attribute EventHandler onnotify; }; NetworkService implements EventTarget;
id
A unique identifier for the given user-selected service instance.
name
The name of the user-selected service.
type
The valid service type token value of the user-selected service.
url
The control URL endpoint (including any required port information) of the user-selected control service.
config
The configuration information associated with the service depending on the requested service type.
The id
attribute is a unique identifier for the service.
The same service provided at different times or on different objects MUST have the same id
value.
The name
attribute represents a human-readable title for
the service.
The type
attribute reflects the value of the valid service type of the service.
The url
attribute is an absolute URL pointing to the root HTTP endpoint for the service. Web pages can subsequently use this
value for implicit cross-document messaging via various existing mechanisms (e.g. Web Sockets, Server-Sent
Events, Web Messaging, XMLHttpRequest).
The config
attribute provides the raw configuration
information extracted from the given network service.
online
Returns true
if the service is reporting that it is accessible on the local network or
false
if the service is no longer accessible (temporarily or permanently) on the local
network.
The online
attribute indicates whether the service is
either online, and therefore accessible on the local network, in which case this attribute will
return true
or, offline, and therefore not accessible on the local network, either
temporarily or permanently, in which case this attribute will return false
. This attribute
MUST default to true
.
The following are the event handlers (and their corresponding event handler event types) that MUST be supported, as IDL attributes, by all objects implementing the NetworkService
interface:
| Event handler | Event handler event type |
|---|---|
onnotify
|
notify
|
onavailable
|
available
|
onunavailable
|
unavailable
|
A user agent conforming to this specification MAY implement SSDP [UPNP-DEVICEARCH11], Zeroconf [DNS-SD] + [MDNS] and/or DIAL [DIAL] service discovery mechanisms - the requirements detailed in this section of the specification - to enable Web pages to request and connect with HTTP services running on networked devices, discovered via any of these mechanisms, through this API. When a user agent implements any of these service discovery mechanisms, then it MUST conform to the corresponding algorithms provided in this section of the specification.
This section presents how the results of these service discovery mechanisms will be matched to requested service types, how the
user agent stores available and active services and how their properties are applied to any resulting
NetworkService
objects.
It is expected that user agents will perform these service discovery mechanisms asynchronously and periodically update the list of available service records as required. The timing of any service discovery mechanisms is an implementation detail left to the discretion of the implementer (e.g. by continuously monitoring the network as a background process or on invocation of this API from a Web page).
The list of available service records is a single dynamic internal lookup table within user agents that is used to track all the services that have been discovered and are available in the current network at the current time. At any point during the running of any of the service discovery mechanisms then existing entries within this table can be updated, entries can be added and entries can be removed as the status of networked services changes according to the rules defined in this specification.
The list of active service managers is an internal list
within user agents that is used to track all NetworkServices
objects currently being shared with any web pages at the current time within the user agent. Each NetworkServices
object in the list of active service managers represents a collection of zero or more NetworkService
objects - known as its indexed properties. NetworkService
objects are attached as the indexed properties of a NetworkServices
object as part of the getNetworkServices()
algorithm.
The rule for adding an available service is the process of adding a new service or updating an existing service that is generally available on the user's current network in the list of available service records. This rule takes one argument, network service record, and consists of running the following steps:
id
property does not equal network
service record's id
property then abort any remaining sub-steps and continue at the next
available existing service record.
id
property equals the active
service's id
attribute and active service's online
attribute
is currently set to false
then set active service's online
attribute to true
and then queue a task to dispatch a newly created event with the name available
that uses the Event
interface, which does not bubble, is not cancellable,
and has no default action, at the current active service object.
false
.
type
property does not equal requested
control type then abort any remaining sub-steps and continue at the next available requested
control type.
true
, abort any
remaining sub-steps and continue.
true
then
increment service manager's servicesAvailable
attribute by 1
and
then queue a task to dispatch a newly created event with the name servicefound
that uses the Event
interface, which does not bubble, is not cancellable, and
has no default action, at the current service manager object.
The rule for removing an available service is the general process of removing an existing service from the list of available service records that has left the user's current network or has otherwise expired. This rule takes one argument, service identifier, and consists of running the following steps:
id
property does not match service
identifier then skip any remaining sub-steps for the current existing service record and
continue at the next available existing service record.
false
.
false
.
id
property equals the active
service's id
attribute and active service's online
attribute is currently set to
true
then set active service's
online
attribute to false
and then queue a task to dispatch a newly created event with the name unavailable
that uses the Event
interface, which does not bubble, is not
cancellable, and has no default action, at the current active service.
type
property does not equal
requested control type then abort any remaining sub-steps and continue at the next
available requested control type.
true
and the
'service type in use' flag to true
, abort any remaining sub-steps and
continue.
true
then
decrement service manager's servicesAvailable
attribute by 1
and then queue a task to dispatch a newly created event with the name servicelost
that uses the Event
interface, which does not bubble, is not cancellable,
and has no default action, at the current service manager object.
false
and the existing service
record's type
property begins with the DOMString "upnp:
" and existing
service record's eventsURL
property is set then run the rule to terminate an existing UPnP Events Subscription, if one is currently active
(as a result of having previously called setup a UPnP Events Subscription against the current existing service
record).
User agents SHOULD expire a service record from the list of available service records when its expiryTimestamp
attribute
exceeds the current UTC timestamp. When this condition is met the user agent SHOULD run the rule for removing an available service, passing in the expired service record's
id
attribute as the only argument.
For each DNS response received from a user-agent-initiated Multicast
DNS Browse for PTR records
with the name _services._dns-sd._udp
on the resolved recommended automatic browsing domain
[MDNS], the user agent MUST run the following steps:
id
, name
, type
, url
, config
,
expiryTimestamp
.
id
property to the value of the full
PTR Service Instance Name [MDNS].
name
property to the value of the PTR Service Instance Name's Instance component [MDNS].
type
property to the concatenation of the string
zeroconf:
followed be the value of the PTR Service
Instance Name's Service component [MDNS].
url
property to the resolvable Service URL
obtained from performing an DNS-SD Lookup [DNS-SD] of the current service from the PTR record provided [MDNS].
config
property to the string value of the
contents of the first DNS-SD TXT record associated with the service mDNS response as defined in [DNS-SD].
expiryTimestamp
property to the value of the
current date, in UTC timestamp format, plus a value of 120
seconds.
A user agent that implements UPnP service discovery MUST issue a search request for UPnP root devices against the user's current local network according to the full normative text and timing provided in 'Section 1.3.2: Search request with M-SEARCH' detailed in [UPNP-DEVICEARCH11].
The user agent MUST issue all search requests for UPnP root devices with a HTTP request line equal to M-SEARCH * HTTP/1.1
, with a HOST header equal to the reserved multicast
address and port of <IP_ADDRESS>:1900
and a MAN header equal to
ssdp:discover
. The user agent must also send an ST header with this HTTP request equal to the String value of ssdp:all
or
upnp:rootdevice
or a single valid service type token beginning with the String value upnp:
. If a
single valid service type token beginning with the String value upnp:
is to
be used, the user agent MUST strip the leading String upnp:
before using this value in this
HTTP request. The user-agent MUST also send an MX header equal to a maximum UPnP advertisement response wait time
value between 1
and 5
seconds with this HTTP request.
The user agent MUST listen for any incoming responses to any search request for UPnP root devices.
For each HTTP Response following an initial search request for UPnP root devices sent on a standard UPnP address and port the user agent MUST run the following steps:
max-age=
) as the device expiry argument.
The user agent MUST listen for incoming requests on the standard UPnP address and port on all current local network
interface addresses with the port 1900
.
For each HTTP Request received on a standard UPnP address and port the user agent MUST run the following steps:
ssdp:alive
and the HTTP Request does not contain
at least one CACHE-CONTROL entry, at least one USN entry, at least one
NT entry, at least one NTS entry and at least one LOCATION entry, then
the user agent MUST discard this request, abort any remaining steps and return.
ssdp:alive
then the user agent
MUST run the rule for obtaining a UPnP Device Description File passing in the first occurrence of
LOCATION from ssdp device as the device descriptor URL argument and
the first occurrence of USN from ssdp device as the device identifier
argument and the first occurrence of CACHE-CONTROL from ssdp device (minus the
leading string of max-age=
) as the device expiry.ssdp:byebye
then the
user agent MUST run the rule for removing all services from a registered UPnP Device passing in the first
occurrence of USN from ssdp device as the device identifier argument.
The rule for obtaining a UPnP Device Description File is the process of obtaining the contents of a standard UPnP Device Description [UPNP-DEVICEARCH11] from a URL-based resource. This rule takes three arguments - device descriptor URL, device identifier and device expiry - and when called the user agent MUST run the following steps:
The rule for processing a UPnP Device Description File is the process of parsing the contents of a standard UPnP Device Description [UPNP-DEVICEARCH11] and registering the UPnP services contained therein within the list of available service records.
The rule for processing a UPnP Device Description File takes three arguments - device descriptor file, device identifier and device expiry - and when called the user agent MUST run the following steps:
<serviceList>
element as it is defined in 'Section 2.3: Device Description' in [UPNP-DEVICEARCH11].
<service>
element - known as an advertised service - in
advertised services run the following steps:
id
, deviceId
, name
, type
, url
,
eventsUrl
, config
, expiryTimestamp
.
id
property to the concatenated string value of
the first occurrence of the <UDN>
element in the device descriptor file
with the advertised service's <serviceId>
sub-element.
deviceId
property to the value of device
identifier.
name
property to the string value of the first
occurrence of the advertised service's <serviceId>
sub-element.
type
property to the concatenation of the string
upnp:
followed by the string value of the first occurrence of the advertised
service's <serviceType>
sub-element.
url
property to the string value of the first
occurrence of the advertised service's <controlURL>
sub-element.
config
property to the string value of the
contents of the first occurrence of the <device>
element in the device descriptor
file.
<eventSubURL>
sub-element is not empty, then
set network service record's eventsUrl
property to the string value of the first
occurrence of the advertised service's <eventSubURL>
sub-element.
Otherwise, do not set network service record's eventsUrl
property.
expiryTimestamp
property to the value of the
current date, in UTC timestamp format, plus the value of device expiry.
<deviceList>
element then for each
<device>
element within <deviceList>
- herein known as an embedded
device descriptor file - the user agent MUST run the rule for processing a UPnP Device Description File, passing in the current embedded
device descriptor file as the device descriptor file argument, along with the current
device identifier and device expiry arguments.
The rule for removing all services from a registered UPnP Device is the process of removing all services associated with a device from the list of available service records that has left the user's current network or has otherwise timed out or expired. This rule takes one argument, device identifier, and consists of running the following steps:
deviceId
property does not match device
identifier then skip any remaining sub-steps for the current existing service record and
continue at the next available existing service record.
id
property as the only argument.
When the user agent is to setup a UPnP Events Subscription, it is to run the following steps with the current network service record object as defined in 'Section 4.1.2: SUBSCRIBE with NT and CALLBACK' in [UPNP-DEVICEARCH11]:
eventsUrl
property is empty then the user agent MUST abort these steps.
upnp:event
, a TIMEOUT header with a user-agent defined timeout
value (in the form Second-XX
where XX
is the user-agent defined timeout value in
seconds) and a CALLBACK header with a string value of callback URL towards the
network service record's eventsUrl
property.
Second-
), if it exists.
Second-XX
where XX
is the user-agent
defined timeout value in seconds) towards the network service record's
eventsUrl
property.
Second-
), if it exists. If the current date is greater than or equal to timeout
date then the user agent SHOULD continue from the step labeled refresh subscription above.
For all non 200 OK responses the user agent SHOULD continue from the step labeled refresh subscription above.
Event
interface with the name notify
, which does not bubble, is not cancellable, and has no
default action.
data
attribute of notification event have the DOMString value of
content clone.
NetworkService
object.
A user agent can terminate an existing UPnP Events Subscription
at any time for a network service record by sending an HTTP UNSUBSCRIBE request - as defined in 'Section 4.1.4: Cancelling a
subscription with UNSUBSCRIBE' in [UPNP-DEVICEARCH11] - with a HOST header set to that active
service's eventsUrl
property and a SID header set to the callback ID
obtained when the initial setup a UPnP Events Subscription action occurred.
A user agent that implements DIAL service discovery MUST issue a search request for DIAL-enabled devices against the user's current local network according to the full normative text and timing provided in 'Section 1.3.2: Search request with M-SEARCH' detailed in [UPNP-DEVICEARCH11].
Let dial version be the version number specified in the valid service type token. Let dial search target be the concatentation
of the urn:dial-multiscreen-org:service:dial:
string constant with the dial
version (currently, dial version can only be 1
)
The user agent MUST issue all search requests for DIAL-enabled
devices with a HTTP request line equal to
M-SEARCH * HTTP/1.1
, with a HOST header
equal to the reserved multicast address and port of <IP_ADDRESS>:1900
, a MAN header equal
to ssdp:discover
, an ST header equal to dial search target and a user-agent
defined MX header equal to a maximum
DIAL advertisement response wait time value
between 1
and 5
seconds.
The user agent MUST listen for any incoming responses to a search request for DIAL-enabled devices.
For each HTTP Response following an initial search request for DIAL-enabled devices sent on a standard UPnP address and port the user agent MUST run the following steps:
max-age=
) as the device expiry argument.
The rule for obtaining a DIAL Device Description File is the process of obtaining the contents of a standard UPnP Device Description [UPNP-DEVICEARCH11] from a URL-based resource. This rule takes three arguments - device descriptor URL, device identifier and device expiry - and when called the user agent MUST run the following steps:
Application-URL
response header field obtained according to the rules defined in 'Section 5.4: Device Description Response'
in [DIAL]
id
, deviceId
, name
, type
, url
,
expiryTimestamp
.
id
property to the first occurrence of the
<UDN>
element in the descriptor file prefixed with the dial:
string constant
deviceId
property to the value of device
identifier.
name
property to the string value of the first
occurrence of the <friendlyName>
element in the descriptor file.
type
property to dial search target.
url
property to the string value of the
application url.
expiryTimestamp
property to the value of the
current date, in UTC timestamp format, plus the value of device expiry.
When the user agent detects that the user has dropped from a connected network then, for
each existing service record in the list of available service records discovered via that network connection, the
user agent MUST run the general rule for removing an available service passing in each existing service
record's id
property as the only argument for each call.
When the user agent detects that the user has connected to a new network or reconnected to an existing network, then it SHOULD restart its discovery mechanisms as defined in the Service Discovery section of this specification, maintaining the existing list of active service managers currently in use.
The following events are dispatched on the NetworkServices
and/or
NetworkService
objects:
| Event name | Interface | Dispatched when... |
|---|---|---|
servicefound
|
Event
|
When a new service that matches one of the requested type tokens is found in the current network. |
servicelost
|
Event
|
When an existing service that matches one of the requested type tokens gracefully leaves or expires from the current network. |
available
|
Event
|
When a current service renews its service registration within the current network. |
unavailable
|
Event
|
When a current service gracefully leaves or otherwise expires from the current network. |
notify
|
Event
|
When a valid UPnP Events Subscription Message is received on a user-agent generated callback url for a current service. This event never fires for Zeroconf-based services. |
There is an implied strong reference from any IDL attribute in this API that returns a pre-existing object to that object.
For example, if a NetworkServices
object has one or more indexed properties attached to it then there is a strong reference from that
NetworkServices
object toward each of its indexed properties.
If a user agent is to make disappear a NetworkServices
object (this happens when a Document
object goes away), the user agent MUST remove this object from the list of active service managers.
This section covers what the requirements are for this API, as well as illustrates some use cases.
This section is non-normative.
This sample code exposes a button. When clicked, this button is disabled and the user is prompted to offer a network service. The user may also select multiple network services. When the user has authorized a network service to be connected to the web page then the web page issues a simple command to get a list of all the albums stored on the connected media player service.
The button is re-enabled only when the connected network service disconnects for whatever reason (the service becomes unavailable on the network, the user disconnects from their current network or the user revokes access to the service from the current web page). At this point the user can re-click the button to select a new network service to connect to the web page and the above steps are repeated.
The provided service type identifier and service interaction used in this example is based on the well-defined service type and messaging format supported by the XBMC Media Server.
<input type="button" value="Start" onclick="start()" id="startBtn"/> <div id="debugconsole"></div> <script> var startBtn = document.getElementById('startBtn'), debug = document.getElementById('debugconsole'); function start() { if(navigator.getNetworkServices) { navigator.getNetworkServices('zeroconf:_xbmc-jsonrpc._tcp').then(gotXBMCService).catch(error); startBtn.disabled = true; } else { debug.innerHTML += "<br>Service Discovery not supported!"; } } function gotXBMCService(services) { // Listen for service disconnect messages services[0].addEventListener('unavailable', function ( e ) { debug.innerHTML += "<br>" + services[0].name + " disconnected."; startBtn.disabled = false; }, false); // Send a service message to get albums list (and process the service response) var svcXhr = new XMLHttpRequest(); svcXhr.open("POST", services[0].url + "/getAlbums"); // services[0].url and its sub-resources are // available for cross-site XHR use. svcXhr.setRequestHeader('Content-Type', 'application/json-rpc'); svcXhr.addEventListener('readystatechange', function ( response ) { if( response.readyState != 4 || response.status != 200 ) return; debug.innerHTML += "<br>" + services[0].name + " response received: "; debug.textContent += JSON.parse(response.responseText); }, false); var svcMsg = [ { "jsonrpc": "2.0", "method": "AudioLibrary.GetAlbums", "params": { "genreid": -1, "artistid": -1, "start": -1, "end": -1 }, "id": "1" } ]; svcXhr.send(JSON.stringify(svcMsg)); debug.innerHTML += "<br>" + services[0].name + " request sent: "; debug.textContent += JSON.stringify(svcMsg); } function error( err ) { debug.innerHTML += "<br>An error occurred obtaining a local network service."; startBtn.disabled = false; } </script>
This sample exposes a drop-down list containing a number of common Home-based audio devices. When the user
selects an audio device from the list provided, they are prompted to authorize a network service based on the
service type requested. The user may also select multiple network services matching the selected service
type. In this example, the user selects their make as being Sony and their model as being
Bravia S1000 from which the Web page can derive a service type
(urn:schemas-upnp-org:service:RenderingControl:1).
Once the user has authorized the device, the web page sends a simple mute command according to the messaging
format supported by the device.
<select name="make" id="make"> <option selected="selected" disabled="disabled">Select make</option> <option>Sony</option> <option>Philips</option> <option>Alba</option> </select> <select name="model" id="model"></select> <div id="debugconsole"></div> <script> var debug = document.getElementById('debugconsole'); var models = { "Sony": [ {"name": "Bravia TV S1000", "type": "upnp", "service": "urn:schemas-upnp-org:service:RenderingControl:1" }, {"name": "Bravia TV S2000", "type": "zeroconf", "service": "_mediarenderer._http._tcp" }, {"name": "HiFi WD10", "type": "upnp", "service": "urn:schemas-upnp-org:service:RenderingControl:1" } ], "Philips": [ /* ... */ ], "Alba": [ /* ... */ ] }; var makeEl = document.getElementById("make"), modelEl = document.getElementById("model"); makeEl.addEventListener('change', function() { modelEl.innerHTML = ""; // reset var defaultOption = document.createElement("option"); defaultOption.textContent = "Select model"; defaultOption.setAttribute("disabled", "disabled"); defaultOption.setAttribute("selected", "selected"); modelEl.appendChild(defaultOption); for(var i = 0, l = models[makeEl.value].length; i < l; i++) { var option = document.createElement("option"); option.textContent = models[makeEl.value][i]["name"]; option.setAttribute("value", models[makeEl.value][i]["type"] + ":" + models[makeEl.value][i]["service"]); modelEl.appendChild(option); } }, false); modelEl.addEventListener('change', function() { if(navigator.getNetworkServices && modelEl.value == "upnp:urn:schemas-upnp-org:service:RenderingControl:1") { var servicesPromise = navigator.getNetworkServices(modelEl.value).then(successCallback, errorCallback); } else if (modelEl.value == "zeroconf:_mediarenderer._http._tcp") { debug.innerHTML += "<br>Service type is not implemented by this application."; } else { debug.innerHTML += "<br>Service Discovery is not supported!"; } }, false); </script> <script> function successCallback( services ) { // Listen for service push notification messages services[0].addEventListener('notify', function ( msg ) { debug.innerHTML += "<br>" + services[0].name + " event received: "; debug.textContent += msg.data; }, false); // Send a control signal to mute the service audio var svcXhr = new XMLHttpRequest(); svcXhr.open("POST", services[0].url); // services[0].url and its sub-resources are // available for cross-site XHR use. svcXhr.setRequestHeader('SOAPAction', 'urn:schemas-upnp-org:service:RenderingControl:1#SetMute'); svcXhr.setRequestHeader('Content-Type', 'text/xml; charset="utf-8";'); svcXhr.onreadystatechange = function ( response ) { if( response.readyState != 4 || response.status != 200 ) return; debug.innerHTML += "<br>" + services[0].name + " response received: "; debug.textContent += response.responseXML; } // Service messaging to mute the provided service var svcMsg = '<?xml version="1.0" encoding="utf-8"?>' + '<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" ' + 'xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">' + '<s:Body>' + '<u:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">' + '<InstanceID>0</InstanceID>' + '<Channel>Master</Channel>' + '<DesiredMute>true</DesiredMute>' + '</u:SetMute>' + '</s:Body>' + '</s:Envelope>'; svcXhr.send(svcMsg); debug.innerHTML += "<br>" + services[0].name + " request sent: "; debug.textContent += svcMsg; } function errorCallback( error ) { debug.innerHTML += "<br>An error occurred: " + error.name; } </script>
Thanks are expressed by the editor to the following individuals for their feedback on this specification to
date (in alphabetical order):
Adam Barth, Gar Bergstedt, Robin Berjon, Lars-Erik Bolstad, Marcos Caceres, Cathy Chan, Daniel Danciu,
Jean-Claude Dufourd, Youenn Fablot, Mark Foltz, Dominique Hazael-Massieux, Frederick Hirsch, Tatsuya Igarashi,
Hari G Kumar, Bob Lund, Giuseppe Pascale, Marcin Simonides, Clarke Stevens, Christian Söderström, Mark Vickers.
Thanks are also expressed by the editor to the following organizations and groups for their support in
producing this specification to date (in alphabetical order):
CableLabs, Google Inc., Opera Software ASA, Nokia Corp., Télécom ParisTech, W3C Device APIs Working Group, W3C Web and TV Interest Group.
This section will be removed before final publication. The last edit is displayed first.


I hosted, planned, and organized the 2018 Yale OpenHand Workshop (part of NEMS), where labs from 8 regional universities built and took home their very own fully functional Model O Hands, 2018
A device to measure the 'bounce' of percussion mallets, using an absolute encoder and an Arduino UNO, in collaboration with Kramer Milan, 2017
Cast Pewter Axolotl Pin
WG Bircher
A decorative pin, designed in Photoshop, modeled and 3D printed, imprinted into Delft Clay to form a mold, cast in solid pewter, and hand painted, 2017
A 3D printed underactuated gripper to increase accessibility of out-of-reach items for wheelchair bound individuals, designed as part of Capstone Mechanical Design at UNL, 2014
A sensor suite to measure track deflection and flag weak sections for maintenance, from a moving train, supervised by Shane Farritor at UNL in collaboration with MRail, 2013
I designed and built a first prototype of a powered lower limb orthotic device to assist in stair climbing during my summer internship at Honeybee Robotics in New York City, 2013
An oven designed to vaporize fragile biomolecules inside a vacuum chamber, while preserving molecular structure. Machined on lathe from aluminum stock with embedded resistive heaters for the Ultrafast Dynamics Lab at UNL, 2011
Watch Renderings
WG Bircher
Rendering O clock watches to build my SolidWorks skills, 2011
Mousetrap Car
Trevor Jaixen, WG Bircher
A two-wheeled mousetrap car with records for wheels took 1st place for longest distance traveled in a Omaha Public School District wide competition, 2010


[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation table of contents](TOC.md) # The HTML By default, HTML5 Boilerplate provides two `html` pages: * [`index.html`](#indexhtml) - a default HTML skeleton that should form the basis of all pages on your website * `404.html` - a placeholder 404 error page ## `index.html` ### The `no-js` Class The `no-js` class is provided in order to allow you to more easily and explicitly add custom styles based on whether JavaScript is disabled (`.no-js`) or enabled (`.js`). Using this technique also helps [avoid the FOUC](https://www.paulirish.com/2009/avoiding-the-fouc-v3/). ## Language Attribute Please consider specifying the language of your content by adding a [value](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) to the `lang` attribute in the `<html>` as in this example: ```html <html class="no-js" lang="en"> ``` ### The order of the `<title>` and `<meta>` tags The charset declaration (`<meta charset="utf-8">`) must be included completely within the [first 1024 bytes of the document](https://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset) and should be specified as early as possible (before any content that could be controlled by an attacker, such as a `<title>` element) in order to avoid a potential [encoding-related security issue](https://code.google.com/archive/p/doctype-mirror/wikis/ArticleUtf7.wiki) in Internet Explorer ## Meta Description The `description` meta tag provides a short description of the page. In some situations this description is used as a part of the snippet shown in the search results. ```html <meta name="description" content="This is a description"> ``` Google's [Create good meta descriptions](https://support.google.com/webmasters/answer/35624?hl=en#meta-descriptions) documentation has useful tips on creating an effective description. ## Mobile Viewport There are a few different options that you can use with the [`viewport` meta tag](https://docs.google.com/present/view?id=dkx3qtm_22dxsrgcf4 "Viewport and Media Queries - The Complete Idiot's Guide"). You can find out more in [the MDN Web Docs](https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag). HTML5 Boilerplate comes with a simple setup that strikes a good balance for general use cases. ```html <meta name="viewport" content="width=device-width, initial-scale=1"> ``` If you want to take advantage of edge-to-edge displays of iPhone X/XS/XR you can do so with additional viewport parameters. [Check the WebKit blog](https://webkit.org/blog/7929/designing-websites-for-iphone-x/) for details. ## Web App Manifest HTML5 Boilerplate includes a simple web app manifest file. The web app manifest is a simple JSON file that allows you to control how your app appears on a device's home screen, what it looks like when it launches in that context and what happens when it is launched. This allows for much greater control over the UI of a saved site or web app on a mobile device. It's linked to from the HTML as follows: ```html <link rel="manifest" href="site.webmanifest"> ``` Our [site.webmanifest](https://github.com/h5bp/html5-boilerplate/blob/master/src/site.webmanifest) contains a very skeletal "app" definition, just to show the basic usage. You should fill this file out with [more information about your site or application](https://developer.mozilla.org/en-US/docs/Web/Manifest) ## Favicons and Touch Icon The shortcut icons should be put in the root directory of your site. `favicon.ico` is automatically picked up by browsers if it's placed in the root. HTML5 Boilerplate comes with a default set of icons (include favicon and one Apple Touch Icon) that you can use as a baseline to create your own. Please refer to the more detailed description in the [Extend section](extend.md) of these docs. ## The Content Area The central part of the boilerplate template is pretty much empty. This is intentional, in order to make the boilerplate suitable for both web page and web app development. ### Browser Upgrade Prompt The main content area of the boilerplate includes a prompt to install an up to date browser for users of IE 9 and lower. If you intended to support IE, then you should edit or remove the snippet of code. ## Modernizr HTML5 Boilerplate uses a custom build of Modernizr. [Modernizr](https://modernizr.com/) is a JavaScript library which adds classes to the `html` element based on the results of feature test and which ensures that all browsers can make use of HTML5 elements (as it includes the HTML5 Shiv). This allows you to target parts of your CSS and JavaScript based on the features supported by a browser. Starting with version 3 Modernizr can be customized using the [modernizr-config.json](https://github.com/h5bp/html5-boilerplate/blob/master/modernizr-config.json) and the [Modernizr command line utility](https://www.npmjs.com/package/modernizr-cli). ## What About Polyfills? If you need to include [polyfills](https://remysharp.com/2010/10/08/what-is-a-polyfill) in your project, you must make sure those load before any other JavaScript. If you're using a polyfill CDN service, like [cdn.polyfill.io](https://cdn.polyfill.io/), just put it before the other scripts in the bottom of the page: ```html <script src="js/vendor/modernizr-3.8.0.min.js"></script> <script src="https://cdn.polyfill.io/v3/polyfill.min.js"></script> <script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <script>window.jQuery || document.write('<script src="js/vendor/jquery-3.4.1.min.js"><\/script>')</script> <script src="js/plugins.js"></script> <script src="js/main.js"></script> </body> ``` If you like to just include the polyfills yourself, you could include them in `js/plugins.js`. When you have a bunch of polyfills to load in, you could also create a `polyfills.js` file in the `js/vendor` directory or include the files individually and combine them using a build tool. Always ensure that the polyfills are all loaded before any other JavaScript. There are some misconceptions about Modernizr and polyfills. It's important to understand that Modernizr just handles feature checking, not polyfilling itself. The only thing Modernizr does regarding polyfills is that the team maintains [a huge list of cross Browser polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills). ### jQuery CDN for jQuery The jQuery CDN version of the jQuery JavaScript library is referenced towards the bottom of the page. A local fallback of jQuery is included for rare instances when the CDN version might not be available, and to facilitate offline development. The jQuery CDN version was chosen over other potential candidates ([like Google's Hosted Libraries](https://developers.google.com/speed/libraries/)) because it's fast ([comparable or faster than Google by some measures](https://www.cdnperf.com/#jsdelivr,cdnjs,google,yandex,microsoft,jquery,bootstrapcdn/https/90)) and, (unlike Google's CDN) is available to China's hundreds of millions of internet users. For many years we [chose](https://github.com/h5bp/html5-boilerplate/issues/1191) the Google Hosted version over the jQuery CDN because it was available over HTTPS (the jQuery CDN was not,) and it offered a better chance of hitting the cache lottery owing to the popularity of the Google CDN. The first issue is no longer valid and the second is far outweighed by being able to serve jQuery to users in China. While the jQuery CDN is a strong default solution your site or application may require a different configuration. Testing your site with services like [WebPageTest](https://www.webpagetest.org/) and browser tools like [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) will help you examine the real world performance of your site and can show where you can optimize your specific site or application. ### Google Universal Analytics Tracking Code Finally, an optimized version of the Google Universal Analytics tracking code is included. We use `analytics.js` rather than the newer `gtag.js` as [it's faster and supports tasks and plugins](https://github.com/philipwalton/analyticsjs-boilerplate/issues/19#issuecomment-333714370) The beacon transport mechanism is used to send all hits [which saves HTTP requests and improves performance](https://philipwalton.com/articles/the-google-analytics-setup-i-use-on-every-site-i-build/#loading-analytics.js). Google recommends that this script be placed at the top of the page. Factors to consider: if you place this script at the top of the page, you’ll be able to count users who don’t fully load the page, and you’ll incur the max number of simultaneous connections of the browser. Further information: - [Introduction to Analytics.js](https://developers.google.com/analytics/devguides/collection/analyticsjs/) - [Google Analytics Demos & Tools](https://ga-dev-tools.appspot.com/) **N.B.** The Google Analytics snippet is included by default mainly because Google Analytics is [currently one of the most popular tracking solutions](https://trends.builtwith.com/analytics/Google-Analytics) out there. However, its usage isn't set in stone, and you SHOULD consider exploring the [alternatives](https://en.wikipedia.org/wiki/List_of_web_analytics_software) and use whatever suits your needs best.


| BANK NAME | AMOUNT | VENDOR | EXECUTIVE | LOAN TYPE | PRODUCT | STATUS | COMMENTS | BANK ADDED BY | STATUS EDITED BY | EDIT STATUS |
|---|---|---|---|---|---|---|---|---|---|---|
| {{pro.bankname}} | {{pro.amount}} | {{pro.bankvendor}} | {{pro.executivename}} | {{pro.loantype}} | {{pro.product}} | {{pro.sstatus}} | {{pro.comment}} | {{pro.bcreatedbyname}} | {{pro.createdbyname}} |


Enter the verification code generated by the authenticator app on your phone.
You selected a multisignature wallet. Please note that the transaction will only appear on your card's Activity when the payment is fully signed.


Fantasia 2000 Rating (out of five): ***1/2 Starring Mickey Mouse, Donald Duck, Daisy Duck, James Earl Jones, Quincy Jones, Angela Lansbury, Steve Martin, Bette Midler and Leopold Stokowski Directed by Don Hahn, Pixote Hunt, Hendel Butoy, Eric Goldberg, James Algar, Francis Glebas and Gaetan and Paul Brizzi Written by Hahn, Irene Mecchi and David Reynolds Rated G (suitable for all ages) Theatrical aspect ratio of 1.33:1 Released in 1999 Running 75 minutes
In 1940, Walt Disney and company released what would come to be known as one of the definitive movie musicals; a spectacular, awe-inspiring blend of classical music set in time to striking animated visuals. Their masterwork, aptly titled Fantasia, was originally slated to be a work in progress, containing something new each time it was presented to the viewing public.
While this idea didn't exactly pan-out (in fact, Fantasia bombed upon initial release), Disney has made the wise decision to put together another assortment of animation to ring in the new millennium, this time taking advantage of modern technology and presenting Fantasia 2000 on IMAX screens across the nation.
Now, anyone who has ever seen an IMAX movie before is well aware of what they are in store for. With the screen over seven stories high, seeing something like Fantasia 2000 ala IMAX isn't so much a movie-going experience as it is an event.
And thankfully, Disney has chosen some material worthy of such technology. While the seven new animated segments vary in quality (ranging from mediocre to masterpiece status), the overall effect of the film is quite intoxicating. In fact, Fantasia 2000 features a piece of animation set to George Girshwin's "Rhapsody in Blue" that is so brilliantly structured and delightfully magical that all I could do was sit in my seat with a child-like grin on my face for the duration of its running time.
However, a couple of the sequences are so tired and contrived that it's a wonder how they made it into the film in the first place (especially the grueling "Pines of Rome" flying-whale piece).
In addition to the seven new shorts, Disney has also decided to include a popular piece from the original Fantasia titled "The Sorcerer's Apprentice", in which Mickey Mouse goes head-to-head with an army of mischievous brooms. While the notion to include this, one of the finest works of animation the world has ever seen, was undoubtedly a stroke of genius, it would be an understatement to say the Mickey suffers in the IMAX format. With grain spots the size of my fist filling the screen, it's difficult (and sometimes impossible) to make out the fine details the artists spent so much time putting into "The Sorcerer's Apprentice".
Thus, Fantasia 2000 doesn't quite live up to the liveliness and inventiveness of the original. Still, the majority of the segments work very well, particularly the "Rhapsody in Blue" sequence. It will go down as one of the finest works the Disney studio has ever developed, and even alone would warrant an enthusiastic recommendation.
Copyright 2000 Jason Wallis
*Find all of Jason's reviews at http://www.geocities.com/Hollywood/Boulevard/7475
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


You can communicate with other applications by subscribing to and publishing on our Inter Application Bus.
Subscribe to the hello:of:sub topic. Hello OpenFin will publish to it every 5 seconds.
Publish to the hello:of:notification topic and see Hello OpenFin react to the message.
Or, send arbitrary messages over the bus.
You can publish to the Inter Application Bus.


Society of Hispanic Professional Engineers
SHPE @ UCR
Toggle navigation
Home
Our Mission
Mission Info
Pillar
Members
Calendar
Opportunities
Scholarships, Conferences, and Internships
Committees
Our Foundations
Constitution
History
Contact
FAQ


Layer
Locations
Narok
Kenya
Masai Mara
Regions
Protected areas
Counties
Country
Water basins
Layer
Apply


Enter logfile settings
Filename:
Log Pattern Preset:
Log Pattern (logback):
Time Skew in Seconds:
Frequency Per Minute (> 0):


SHDL | Decoder | CompMux | Register
Binary decoder 2-4 has two single bit input signals a0, a1 and four outputs. Each input binary combination sets one output, while the other are 0. Schematic presents decoder circuit made with the logic gates.
Signals with the same mode and data type can be declared in the same cell in the model ports and signals table. The logic circuit schematic is described with assignment statements and Boolean operators: bindec1
y3 = a0 and a1
y2 = not a0 and a1
y1 = a0 and not a1
y0 = not a0 and not a1
The same decoder can be described in a high-level model. This time the input is declared as 2-bit unsigned vector, whith the possible values "00","01","10" or "11" in binary or 0,1,2 and 3 in decimal notation. The output y0 is 1 at the input value 0, y1 is 1 at the input 1, y2 is 1 at the input 2 and y3 at 3:
Conditional if statements are used to test input values and set outputs:
if a=0 then y0=1; y1=0; y2=0; y3=0 end
if a=1 then y0=0; y1=1; y2=0; y3=0 end
if a=2 then y0=0; y1=0; y2=1; y3=0 end
if a=3 then y0=0; y1=0; y2=0; y3=1 end
Parsing the presented code creates a latch warning: the latch is synthesized to hold output values, if the conditions do not cover all the combinations. One solution is to define default output values before conditional statements. In this case, only one assignment is required in each if statement: bindec2
y0=0; y1=0; y2=0; y3=0;
if a=0 then y0=1 end
if a=1 then y1=1 end
if a=2 then y2=1 end
if a=3 then y3=1 end
A sequence of conditions is better described with an if-elsif statement. In this case, the last condition (a=3) can be replaced with an else statement:
y0=0; y1=0; y2=0; y3=0;
if a=0 then y0=1
elsif a=1 then y1=1
elsif a=2 then y2=1
else y3=1 end
The VHDL code generator will translate this if-elsif-else to a case statement, because the conditions are testing the values of a single vector signal. Also the output can be declared as vector and an assignment of the default output values is not required any more: bindec2a
if a=0 then y="0001"
elsif a=1 then y="0010"
elsif a=2 then y="0100"
else y="1000"
Combinational logic can be described with a truth table. The circuit model is then based on the table (vector array) declaration and a logic describing reading the array. The table is implemented as read-only memory (ROM) or look-up table (LUT) in FPGA.
The array data is described in SHDL with internal signals specified by number and type of elements. For example, data type: 4u8 describes an array or four 8-bit vectors. The ROM table elements shoud be initialized at the declaration.
Description of a binary decoder using table: bindec3
entity bindec3
a: in u2;
y: out u4;
table: 4u4 = "0001","0010","0100","1000";
begin
y = table(a)
end
Some circuits can be best described with mathematical expressions. Binary decoder output can be computed by shifting a constant "0001" for a specified number of bits to the left. The input vector presents the corresponding number: bindec4
entity bindec4
a: in u2;
y: out u4;
c: u4 = "0001";
begin
y = c sll a
end
A priority encoder output index of the input which is set to one. If more than one of the inputs are set, the encoder selects the input with the highest index. Input signals with higher index have priority over the inputs with lower indices.
The output value 0 could mean two conditions: input with the index 0 is set, or no inputs are set. The encoder can have additional output (v, valid) which is set only if at least one of the inputs are set.
The input priority is set by the order of HDL if statements. An example of 4-input priority encoder: priority
if d(3)=1 then y=3; v=1
elsif d(2)=1 then y=2; v=1
elsif d(1)=1 then y=1; v=1
elsif d(0)=1 then y=0; v=1
else y=0; v=0
end


Refle
Login
E-mail
Email is invalid
Password
Password is required
Forgot Password?
Login
Don't have an account?
Create One


This scenario shows how to enumerate cameras in the system. Choose a camera from the list to start previewing from that camera. You can add additional effect using the dropdown provided.


--- title: "Making a Covid-19 map in R using Shiny and Leaflet" description: "There have been a number of interactive Covid-19 maps released since the beginning of the pandemic. Johns Hopkins University was among the first of many institutions to create an interactive visualization illustrating the transmission dynamics of the coronavirus. In this tutorial, we will go combine a number of packages in R to create a similar interactive transmission map." author: Trent date: "2020-05-23" output: html_document runtime: shiny slug: making-a-covid19-map-in-R-using-shiny-and-leaflet categories: - code - R tags: - "rstats" - tutorial - R ---
There have been a number of interactive Covid-19 maps released since the beginning of the pandemic. Johns Hopkins University was among the first of many institutions to create an interactive visualization illustrating the transmission dynamics of the coronavirus. In this tutorial, we will go combine a number of packages in R to create a similar interactive transmission map.
No previous coding experience is necessary to follow along with this tutorial. However, you will need to install R and R Studio, which is a code editor for R to be able to run the code on your machine.
We will make use of a number of basic functions available in Shiny and Leaflet to create our map. Shiny is an R package that can create and launch web apps straight from the R Studio environment. Leaflet is an open-source JavaScript library used to create interactive maps. It is perhaps the most widely used and recognized package for mapping geospatial data.
The dataset for this tutorial comes from the World Health Organization. To keep things simple, the dataset only includes the number of cases over the course of the first 30 days of the pandemic. This dataset includes latitude and longitude information for each country with at least one positive case in the first thirty days of the pandemic.
The first step is to install and load the libraries we need to create the map. We will use tidyverse
to load and reshape the .csv dataset from wide to long format, leaflet
and shiny
to create and animate our map, and RColorBrewer
to specify the color gradient we want to use on the map.
# install and load necessary libraries
# install.packages(c(tidyverse", "shiny", "leaflet", "RColorBrewer"))
library(tidyverse)
library(shiny)
library(leaflet)
library(RColorBrewer)
# load dataset
ncov <- read_csv("coronavirus_data.csv")
# turn to data.frame and reshape
ncov_d <- as.data.frame(ncov)
ncov_l <- reshape(ncov_d,
direction = "long",
varying = list(names(ncov_d)[6:35]),
v.names = "value",
idvar = c("country", "slat", "slon", "elat", "elon"),
timevar = "day")
# color palette
reds <- colorNumeric("Reds", domain = NULL)
Next, we need to specify the user interface properties (e.g., time slider and looping animation).
# specify shiny user interface and time slider
ui <- bootstrapPage(tags$style(type = "text/css", "html, body, .leaflet {width:100%; height:100%}"),
leafletOutput("map", width = "100%", height = "100%"),
# position and properties of the time slider
absolutePanel(top = 10, left = 300, draggable = TRUE,
# slider title, step increments, and ticks
sliderInput("integer", "Days since first reported case as of January 21, 2020:",ticks = FALSE, min = min(ncov_l$day), max = max(ncov_l$day), value = 1:30, step = 1,
animate = animationOptions(interval = 1000, loop = TRUE))))
We will then need to specify the properties for the back end, including the background map and the reactive layer. For a complete explanation of how ui
and server
interact to create the map, refer to the shiny web documentation.
# shiny server input/output
server <- function(input, output, session) {
filteredData <- reactive({
ncov_l %>%
filter(day >= input$integer[1] & day <= input$integer[2])
})
output$map <- renderLeaflet({
reds <- colorNumeric("Reds", domain = NULL)
leaflet(ncov_l) %>%
addProviderTiles(providers$CartoDB.DarkMatterNoLabels) %>%
# set boundaries for map
fitBounds(lng1 = min(ncov_l$elon),
lat1 = min(ncov_l$elat),
lng2 = max(ncov_l$elon),
lat2 = max(ncov_l$elat)) %>%
# add legend for the map
addLegend("bottomleft", pal = reds, values = ~value,
title = "Confirmed Cases <br> (data: WHO.int)",
opacity = 0.5,
bins = 4)
})
observe({
leafletProxy("map", data = filteredData()) %>%
clearMarkers() %>%
addCircleMarkers(lng = ~elon,
lat = ~elat,
radius = ~log(value) * 3.5,
weight = 1,
opacity = 10,
color = ~ifelse(value > 0, reds(value), NA),
popup = ~paste0(country, ", ", value, " cases"))
})
}
The last step is to run the app.
shinyApp(ui, server, options = list(height = 550))
The app is live! To see the day-to-day increase in transmissions, we can align the two slider markers and play the app. The app will loop once it reaches the day 30. The code above will work with any dataset that has latitude and longitude information and a time-varying frequency variable. And that’s it!


Hello, . Sorry! your brains too small to code :(!!
Here is your Language match: C#!
Here is your Language match: React!
Here is your Language match: Ruby!
Here is your Language match: Ruby on Rails!
Coding Languages
click buttons below for more information!
C# is a hybrid of C and C++, it is a Microsoft programming language developed to compete with Sun's Java language. C# is an object-oriented programming language used with XML-based Web services on the .NET platform and designed for improving productivity in the development of Web applications.
React takes the description and displays the result. In particular, render returns a React element, which is a lightweight description of what to render. Most React developers use a special syntax called “JSX” which makes these structures easier to write.
Ruby. Ruby is an open source, interpreted, object-oriented programming language created by Yukihiro Matsumoto, who chose the gemstone's name to suggest "a jewel of a language." Ruby is designed to be simple, complete, extensible, and portable. ... Ruby is considered similar to Smalltalk and Perl.
Ruby is a favorite language of developers building interactive web applications. If an app involves users creating accounts, entering information, and interacting with dynamic content, there's a good chance it is built with Ruby. Ruby became popular because the Rails framework, which is written with Ruby, simplified many of the common tasks associated with building web applications.


Classes
The following classes are available globally.
-
Main network request class (wrapper of Alamofire request)
See moreDeclaration
Swift
open class PR2Networking
-
Undocumented
See moreDeclaration
Swift
open class BaseViewController: UIViewController
-
AnyCoordinator is a type-erased Coordinator. Because Coordinator has associatedtypes, sooner or later you may need to type erase. For instance, if you want to store Coordinators in an array, or when you want to keep one in a property such as let currentCoordinator: AnyCoordinator.
The benefit is that you can then store this Coordinator protocol inside arrays, properties etc. Just like a protocol without an associatedtype.
You can wrap a Coordinator inside an AnyCoordinator, then you can store it inside a property or dictionary, array etc.
Example usage:
var currentCoordinator: AnyCoordinator<MyDependencies, UINavigationController = AnyCoordinator(EnrollmentCoordinator())
As long as the two associated types match (Dependencies and NavigationContainer), then your coordinator fits inside an AnyCoordinator
See moreDeclaration
Swift
public final class AnyCoordinator<Dependencies, NavigationContainer: UIViewController>: Coordinator
-
Concurrent Operation base class
This class performs all of the necessary KVN of
isFinished
andisExecuting
for a concurrentNSOperation
subclass. So, to developer a concurrent NSOperation subclass, you instead subclass this class which:must override
main()
with the tasks that initiate the asynchronous task;must call
completeOperation()
function when the asynchronous task is done;optionally, periodically check
self.cancelled
status, performing any clean-up necessary and then ensuring thatcompleteOperation()
is called; or overridecancel
method, callingsuper.cancel()
and then cleaning-up and ensuringcompleteOperation()
is called.
Declaration
Swift
open class ConcurrentOperation: Operation
-
Undocumented
See moreDeclaration
Swift
open class BaseTableViewCell: UITableViewCell
-
Undocumented
See moreDeclaration
Swift
open class PR2ModelList<T>
-
Undocumented
See moreDeclaration
Swift
open class PR2NetworkTask: ConcurrentOperation


Please find below list of places where you can find Food as Charity in Australia. Search using 4-digits Post Code within 5KM radius, ex: 2000.


The first hardcore visual drug I have done was 5-MeO-AMT. Me and 6 of my friends ingested this new chemical at 6-7 pm. We had picked it up at 5 pm an hour earlier and thatís when I popped my first dose inside the kids house. After an hour I wasnít feeling a thing so I thought it would be cool to take another. So when all my friends were on 1 I was a brave kid and ingested one more not knowing the power each cube held.
The new experimental drug was harsh and took 6 hours to start tripping hard on. Since this was the first drug Iíve done higher then weed I had no idea what to except. The night was a blast and we traveled all over town till we came to a common area where we chilled out till 11:30 when three of my friends left to go home. Myself and two other people, Phil and Stephan stuck around because I didnít want to go home this early and neither did they. So when they left I wasnít paying attention as I was more concerned about my hands and how awesome they were. They had a green spark connect each finger giving me my first super power.
As I drank some pop I started throwing a glow in the dark Frisbee with Stephan when Phil came running up the stairs telling us in a scared voice the security guard had come. (We had snuck into this cool common area and didnít even live in the apartments near it. So we would be arrested if he caught us and I had a whole bag of 5-MeO-AMT on me. So we ran into the back turned off the stereo, the TV and put everything back as best we could. Then I shoved the glow in the dark Frisbee into a cabinet and when I came up to look for my friends they were gone.
Then I heard footsteps coming up the stairs I was sacred they got away and left with out me so I can to the balcony and jumped 15 feet down and sprinted to a 3 foot wall that I jumped. When this was all going on the jump seemed like 3 feet and I didnít feel any pain in my legs while the wall seemed 15 feet tall and I was surprised I got over. After I jumped the wall I saw a car speed away and another one follow it. It was my other three friends who were supposed to leave early but they smoked 1st. I ran into the parking lot scared enough to wet my pants cause it was 10 mile walk to my house. I freaked out cause I thought it was a cop who followed my three friends. And there parents knew I was with them so I would have been busted.
When I came back to reality for a sec I saw Phils car was still parked and no security car in sight I went back to the common main door and knocked I scared the shit right out of my them because they thought I left since I was no longer in the upstairs common area. They told me it was some guy weightlifting. So they told me to follow them to a fridge where they had like 75 pops. We carried them to Phils car and sped off. He dropped me off at midnight so I walked dot my family room and started watching the best TV of my life.
Everything was perfect as I started to really trip and see great visuals. I wigged out at about 4 am when I saw a flying head in my family room, which followed me around when my eyes were open or closed. He had three white eyes that spun around as he chuckled at everything I did. I ran into my bathroom and huddled into a corner covering my head. The headless man tortured my soul and drove into my mind and his grasp wouldnít let me go. I was about to give in because the pain was hurting to much when a beam of light shined through my bathroom window. When the beam hit the man he ran off into the depths of my house afraid of the light. When I heard a bird chirp seconds later I regained control of my mind and stood up.
I went back to my family room and glanced a the clock. It was 6:30 am, I had been huddled in my bathroom for two hours, and for anyone who has wigged out this was no 15 min experience. I had never been more scared because I thought of him as a demon from hell who was after my soul. I had no idea it had been two hours but when he started to morph in front of me I tried calling my friends to comfort me. All I got were answering machines, I left a message about what I saw on my friends phone that I didnít even knew I left until the next day.
Anyway when light hit my house and I stood in my family room I tried lying down going to bed but unfortunately I was still tripping and my mind was to awake and riled from the demon. I live close to a park about 400m so I decided to go for a walk and maybe I could clear my mind. On the way I heard people screaming at me to get my attention, I would spin around and squinted my eyes and saw no one there. I kept walking and drifted into the middle of a normally busy road the park was on. I would hear car honks and people yell for me to get off the road. I would run to the grass with a panic look only to see nothing behind me.
I knew that I wasnít goanna be able to handle the road so when I got the park I grabbed an old magazine someone had left and walked to a hill to read. When I was on the hill I heard boots behind me and a very raspy man asked me what I was doing at the park this early and if I was on drugs. I kept reading and said I wasnít breaking curfew and itís rude to assume that all kids up early are on drugs. When he didnít respond I spun my head only to see a couple walking there dog on the other side of the hill. I shook my head and walked to the playground and stared up into the sky. By now it was about 7-7:30 and all the old couples had gathered to the paths to walk around.
I laid down on a slide and stared into the clouds, they soon began to morph into objects and whispered to me what I was doing wrong with my life. I stared for an hour as the clouds told me how to fix my life they slowly drifted away and I screamed I still needed help. Stars from the walking couples only caught me. I jumped off the slide and walked home. When I got back to my family room it was 9am and I could still see small visuals. I lied down on my coach and felt my eyes close at 9:30.
The entire trip lasted 16:30 hours about making it an experience I will always remember. Much more happened that night before I wigged out. My friends and me had a great time and were to happy to describe in words although known of us tripped while hanging out together we all have our own story. Since that night anytime it gets dark weíll still see shadows play tricks on our mind. And to date itsí been about 3 months. One of the coolest visuals was watching a painting melt off my wall onto the floor several times as it would go back to normal when I turned away and looked again.
When the chemicals finished I cant say it was spiritual or helpful but just my mind answering questions I already knew the answers to since every visual I saw was thanks to the drug. In the end I hated everything about it but as days passed I grew gradually more attracted to it remembering the good times with my friends and it was worth tripping for 16 hours. I highly recommend always being with at least one other person on a visual drug. Stay with at least one of your friends through the whole trip.
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.


Modules | |
| Internal Register Definitions | |
Functions | |
| static uint16_t | mmio_read16 (const void *p) |
| 16-bit read from I/O register | |
| static void | mmio_write16 (void *p, uint16_t val) |
| 16-bit write to I/O register | |
| void | mmio_ccp_write8 (void *addr, uint8_t value) |
| Write to a CCP-protected 8-bit register. |
These accessors are used to access memory-mapped I/O registers on the chip as well as external devices hooked up through the external bus interface. Accessing such registers usually have side-effects, so these accessors ensure that the registers are accessed exactly as many times as specified.
Traditionally, such registers are accessed through pointers declared as "volatile", but using dedicated accessors has a number of advantages:
| void mmio_ccp_write8 | ( | void * | addr, | |
| uint8_t | value | |||
| ) |
Write to a CCP-protected 8-bit register.
| addr | Address of the I/O register | |
| value | Value to be written |
| static uint16_t mmio_read16 | ( | const void * | p | ) | [inline, static] |
16-bit read from I/O register
Reads LSB from address p and MSB from address p+1, in this order.
| p | Address of LSB I/O register to read from |
| static void mmio_write16 | ( | void * | p, | |
| uint16_t | val | |||
| ) | [inline, static] |
16-bit write to I/O register
Writes LSB to address p and MSB to address p+1, in this order.
| p | Address of LSB I/O register to write to | |
| val | 16-bit value to write to registers |


{% extends "small_base.html" %} {% block message %}
Sorry, something goes wrong in our server : (
We'll fix it soon


Introducing PastaBin
PastaBin aims to be an encrypted, modern and fully-featured Pastebin replacement.It has been designed with the following things in mind: Encryption, Simplicity and Elegancy.
Free software
PastaBin is free software. That's free as in freedom, as well as in price. This means PastaBin is yours — to use, modify, and share — because PastaBin is developed by and for the users.How does it works?
When you send a paste, PastaBin encrypts it using the password you have given. Then it store the paste id and encrypted text of your paste. Their is no password stored in database. When you try to decrypt a paste, PastaBin will check if it's able to decrypt it and return you the decrypted text or an error message it wasn't able to decrypt with the specified password.
We could have called this process encryption-over-the-fly, but it would sound too amazing.
Technologies behind PastaBin
We didn't want to make another PasteBin PHP clone, so we decided to write it in D. The reason for choosing D to code this webapp is that it's a nice programming language, running pretty fast, handling MongoDB very well, permiting us to do rapid prototypes and because that's a cool language!
Of course, we don't only use D but also ; MongoDB for encrypted data storage, Vibe.D as a webserver and OpenSSL for doing encryption things!


dilation=dilation,
activation=None,
activate=False)
self.relu = nn.ReLU(inplace=True)
def forward(self, x, identity=None):
if identity is None:
identity = x
super(DLABottleneck, self).__init__()
mid_channels = out_channels // expansion
self.conv1 = conv1x1_block(
in_channels=in_channels,
out_channels=mid_channels)
self.conv2 = conv3x3_block(
in_channels=mid_channels,
out_channels=mid_channels,
stride=stride)


Greenspun.js compiles not-quite-JavaScript into standard JS. Its purpose is to allow experimentation with various language features in the JavaScript runtime, many of which are inspired by Common Lisp. The name comes from "Greenspun's 10th Rule of Programming", which states:
Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.
Wrap the code in an immediately-invoked function expression.
;(function() {
Find all <script>
tags on the page that have the type text/greenspun-js
.
If a tag has the src
attribute, load its contents using loadResource
.
var scripts = document.querySelectorAll('script[type="text/greenspun-js"]');
for (var i = 0; i < scripts.length; i++) {
if (scripts[i].hasAttribute('src'))
loadResource(scripts[i].src, transform.bind(scripts[i]));
}
loadResource
loads a script from the given url and calls
fncOfContentOrNull
with the contents of the script, or null if the request
fails. This implementation comes from the Traceur
Compiler.
function loadResource(url, fncOfContentOrNull) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.addEventListener('load', function(e) {
if (xhr.status == 200 || xhr.status == 0)
fncOfContentOrNull(xhr.responseText);
});
var onFailure = function() {
fncOfContentOrNull(null);
};
xhr.addEventListener('error', onFailure, false);
xhr.addEventListener('abort', onFailure, false);
xhr.send();
}
transform
compiles script source to standard JavaScript, and inserts
a new script tag on the page to be executed.
function transform(source) {
First, parse the script into an abstract syntax tree.
var ast = esprima.parse(source);
Then, walk the AST looking for function declarations and function expression nodes. Transform those nodes to implement dynamic scoping.
_.walk.postorder(ast, function(node) {
if (!node) return;
if (node.type === 'FunctionDeclaration' ||
node.type === 'FunctionExpression') {
implementDynamicScope(node);
}
});
Finally, append a new script tag to the document head with the transpiled code.
var scriptEl = document.createElement("script");
scriptEl.type = "text/javascript";
scriptEl.text = escodegen.generate(ast);
document.querySelector("head").appendChild(scriptEl);
}
Implements dynamic scoping for a given syntax tree node by wrapping the function body in a try/finally statement.  All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.


Why did you do something like that? The police have always been government employees and have never been your friend. The best thing that can be said about them is they are a necessary evil.
 Omdividual cops are ol, of you know them.  If i were to ever witness a cop being killed, im not sure i would do or say anything to help catch the person who did it.
@RePubMomMom You can't put all cops in that same basket of traitors. There is good cops and bad cops. The good cops are the constitutionalists/ American patriots, and we know the others are onwards sell outs/ commies.
 They are not acting like they are on our side at all. They need to take a stand or I will not back them
@MrsNationalist Yes, you are right. Ive seen it too. The problem police seem to be in large metro areas where they are more politically placed pawns than real cops.
We have a label problem. I've been a Republican my whole life, so it's hard to say "Republicans are bad" even though we obviously have some TRAITORS who have done reprehensible things (Romney)...The police label is the same...not all cops...most in my experience...are these quasi-military arms of leftist politicians that we see doing terrible things. Strange how it is getting hard to tell the good guys from the bad guys.
 Don’t condemn one cops actions or a single agency’s actions for all . Some cities they are just like in Mexico... easily bought and paid for.
I think DC police are BLM. I think they have recruited them for months into the department - only logical explanation I have as to why they would turn so quickly on patriots.
Call them and let them know how you feel... i did... does nothing but shuts down there phone line's and lets them know we are watching 1-202-727-9099 dc police station call them patriots ... demand to know why they are treating American patriots like this.....
Call them and let them know how you feel... i did... does nothing but shuts down there phone line's and lets them know we are watching 1-202-727-9099 dc police station call them patriots ... demand to know why they are treating American patriots like this.....
Call them and let them know how you feel... i did... does nothing but shuts down there phone line's and lets them know we are watching 1-202-727-9099 dc police station call them patriots ... demand to know why they are treating American patriots like this.....
@Onlock365 Would be interesting if a bunch of people called 911 from inside DC and reported crimes to detract their attention. Or imagine if an unoccupied building was in fire and then required a lot of police/fire department attention. So many ways to wage assume tribal warfare.
Sorry, why are we supporting the police? Can someone kindly explain this to me? There’s way too many anomalies! Let’s not forget they’re all union boys.
Here in Texas, I have family that are police and are on our side. Don’t blame the police. They have our back, atleast in the Conservative States. DC is a different story.
Call them and let them know how you feel... i did... does nothing but shuts down there phone line's and lets them know we are watching 1-202-727-9099 dc police station call them patriots ... demand to know why they are treating American patriots like this.....
I don’t understand these policemen. I just don’t. One side HATES you and you protect them. The other side supports you and you pepper spray them? Make it make sense, you can’t.
Disgusting
Lmao.
This just in, the police don’t care who you are 🤷♂
It’s Police like this not need to be defunded!
I will NOT back the blue because they clearly do not back us. They’re more likely to side with BLM thugs at this point
WTH?? DC police are you with BLM???
What is going on in this world?

Got to get those badge numbers they may be fake cops sponsored by the corrupt mayor
Video tape everything from multiple cameras. Show who really is against American!
Infuriating
😳
Really questioning the blue now
I would not want to be a member of DC police. It will end badly for many of them, they should hope to make it home to their families.
Sorry, why are we supporting the police? Can someone kindly explain this to me? There’s way too many anomalies! Let’s not forget they’re all union boys.
I don’t understand these policemen. I just don’t. One side HATES you and you protect them. The other side supports you and you pepper spray them? Make it make sense, you can’t.
So much for backing the blue...
🤦🏼♀🤦🏼♀🤦🏼♀ wtf are they doing


Welcome!
This is Luke's tool for UVa's spring 2016 section of ANTH 5401.
Please make an account.
Continue »


Here at Wealthy People Private Island Land Resort and Spa there are many activies to enjoy. Here are just a few:
There is a boat that runs regularly to take you to our other, smaller private island exclusively used for shuffleboard. The hours for shuffleboard are 9am-9pm daily,
Here you see Shuffle Island!


@layout("/common/_container.html",{bg:"bg-white",js:["/assets/modular/operation/account/account_withdraw_update.js"]}){


developer Survey Form
Thank you for taking the time to help us improve the platform
Name
Email
Age
Level
Select your level
Junior
Mid-Senior
Senior
Sex
Male
Female
Skills
HTML
CSS
JS
GIT
Suggestions
Submit