| Network Working Group | A. Hope-Bailie |
| Internet-Draft | Ripple |
| Intended status: Standards Track | November 03, 2017 |
| Expires: May 7, 2018 |
HTTP-Payments
draft-hope-bailie-http-payments-01
HTTP-Payments describes a mechanism for passing a standardized payment request in the headers of an HTTP 402 response and the expected behaviour of HTTP clients that receive such a response.
This specification is an early experiment in bringing the work of the W3C Web Payments working group to the HTTP protocol. It is maintained at https://github.com/adrianhopebailie/http-payments.
The work is inspired by work in the Interledger community on [HTTP-ILP]
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on May 7, 2018.
Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
The W3C Web Payments working group has defined a Web Platform API that is being widely deployed to browsers for requesting a payment. The PaymentRequest API, defines an interface for a website to pass a payment request to the user agent via this API.
The user agent will then, through interaction with the user, complete or reject the requested payment.
HTTP-Payments describes a manner in which an HTTP server can request payment from a client in the same manner as a website would from a user agent using the W3C APIs.
The critical portion of the payment request is the set of, one or more, supported payment methods and associated payment-method-specific data. HTTP-Payments defines a mechaism by which these are expressed in the response headers of an HTTP request for which the server requires a payment.
In the website and user-agent scenario, when handling the payment request, the user-agent will prompt the user to pick one of the supported payment methods and will then handle the payment in a manner that is appropriate for that payment method. In an HTTP-Payment, the HTTP client will perform this function, likely with no user interaction.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119][].
A payment method is a way that the payee can be paid. Examples include, via credit card, bank wire transfer, or Bitcoin.
A payment method is identified by a payment method identifier as specified in the Payment Method Identifiers specification. This is either a standardized short-string, identified in a registry maintained by the W3C Web Payments WG, or a URL.
The most common case will be for the URL form to be used. In cases where there is no authority responsible for the payment method that can host the payment method URL, the WG will consider adding a new identifier for the payment method to the registry.
Payment methods define the data that the payer and payee need to exchange, to complete a payment, and the process by which this occurs.
The HTTP Status Code, 402 (Payment Required) is currently defined in [RFC7231] as "reserved for future use". Using HTTP-Payment a service MAY respond to any request with the 402 response code and use the "Pay" header to specify the payment request details.
The body of the "Pay" header is defined as follows:
Pay = 1#( payment-method-identifier RWS payment-amount RWS payment-address [ RWS payment-method-data ] ) payment-method-identifier = token payment-amount = 1*DIGIT payment-address = token payment-method-data -token ;token is defined in [RFC7231](#RFC7231)
The Pay field-value consists of a comma-separated list of payment requests for payment using different payment methods accepted by the sender.
The fields in the header are:
An HTTP client that makes a paid-HTTP request, after paying for the request to be processed, MAY attach a "Pay-Token" header with a token referencing the payment.
This mechanism can be employed by services wishing to accept payments without binding these to an HTTP session.
Pay-Token = token
Ann HTTP Service that accepts payments may respond to any request with a "Pay-Balance" header. This contains an integer indicating the current balance of paid credit the client has with the HTTP service.
Pay-Balance = 1*DIGIT
Upon receipt of a 402 response, an HTTP client MUST look for any "Pay" headers and parse these. The client can discard all headers for which it is not equipped to make a payment (i.e. filter on payment-method-identifier)
The client MUST then select the header that is preferred for processing based upon external interactions (such as with a human user) or pre-configured rules. The client MUST attempt to make a payment using the payment method identified in the header, for the amount specified, and to the destination address specified.
The payment-method specific data SHOULD be sufficient for the system processing the payment to reconcile the payment with the original HTTP request.
The client SHOULD receive a token in return for completeing the payment. If the payment method used does return a token to the payer, it MUST pass this token in subsequent HTTP requests.
The token MUST be passed in the "Pay-Token" header, BASE64URL encoded as described in [RFC4648], Section 5.
The HTTP service MUST process the "Pay-Token" header and use this to reconcile this HTTP request with the payment received prior.
Client requests access to a paid resource:
POST /upload HTTP/1.1 Host: myservice.example
Server responds with payment request (and optionally indicates that the client has a zero balance):
HTTP/1.1 402 Payment Required Pay: http://interledger.org 10 us.nexus.ankita.~recv.filepay SkTcFTZCBKgP6A6QOUVcwWCCg Pay-Balance: 0
Client makes the payment through an appropriate payment side-channel and then attempts the request again:
POST /upload HTTP/1.1 Host: myservice.example Pay-Token: 7y0SfeN7lCuq0GFF5UsMYZofIjJ7LrvPvsePVWSv450
Server responds:
HTTP/1.1 200 Success Pay-Balance: 0
| [RFC4648] | Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006. |
| [RFC7231] | Fielding, R. and J. Reschke, "Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content", RFC 7231, DOI 10.17487/RFC7231, June 2014. |
| [W3C.CR-payment-method-id-20170914] | Bateman, A., Koch, Z., McElmurry, R. and M. Caceres, "Payment Method Identifiers", World Wide Web Consortium CR CR-payment-method-id-20170914, September 2017. |
| [W3C.CR-payment-request-20170921] | Bateman, A., Koch, Z., McElmurry, R., Denicola, D. and M. Caceres, "Payment Request API", World Wide Web Consortium CR CR-payment-request-20170921, September 2017. |
| [HTTP-ILP] | Interledger Community Group, "HTTP-ILP", October 2017. |
Payment information MUST not be exchanged on a connection that is not secured end-to-end. Servers that receive any HTTP payment header over an insecure connection should reject the request. Clients that receive any HTTP Payment headers over an insecure connection MUST ignore the headers.
HTTP header fields are registered within the "Message Headers" registry maintained at http://www.iana.org/assignments/message-headers/.
This document defines the following new HTTP header fields.
| Header Field Name | Protocol | Status | Reference |
|---|---|---|---|
| Pay | http | ? | This Document |
| Pay-Token | http | ? | This Document |
| Pay-Balance | http | ? | This Document |
The change controller is: "IETF<EMAIL_ADDRESS>- Internet Engineering Task Force".
The W3C maintains a registry of standardized short-string payment method identifiers as part of the Payment Method Identifier specification. If standardized short-string identifiers are to be used for HTTP-Payments this may be better served as an IANA registry.


Note: This documentation is preliminary and subject to change.
Web Control scripts are used to customize the WorldWide Telescope web client. This document describes the setup, development process, API set and samples to aid developers in building their own applications. The customization scripts are written in JScript and embedded in an html file, and along with custom data files, can be used to do one or more of the following tasks:
Note that currently the SDK only applies to the Sky view of WorldWide Telescope, and not the Earth, Planet, Panorama or SolarSystem views.
The Silverlight implementation of the Worldwide Telescope has been deprecated.
Please see this conversion tutorial to help you convert any Silverlight code to the new HTML5 implementation.
To ensure that the WorldWide Telescope web control works on your system, run the WWT Web Client Simple sample.
Data tools are included with the WorldWide Telescope May 2009 ADK. Once installed these tools are available in the Programs menu under Microsoft Research.
This section explains the basic elements of a WorldWide Telescope web client application.
Setting up a web page to host the WorldWide Telescope web control is simple. There are four key things that need to happen.
Link to the WorldWide Telescope script in the document head:

Declare a variable for the web control, and add a function to initialize the control and call the ready event function:
var wwt;
function initialize() {
wwt = wwtlib.WWTControl.initControl("WWTCanvas");
wwtControl.add_ready(wwtReady;)
}
Add a ready event function. This is where you can place your own custom initialization code. Note that a call to wwtControl.loadImageCollection
is already there. This call loads the default complete image collection when the control loads.
function wwtReady() {
wwtControl.loadImageCollection("//worldwidetelescope.org/COMPLETE/wwtcomplete.wtml");
// Put your custom initialization code here.
}
Set up the body of the HTML document to call initialize()
on load, and add a div to contain the control. The WorldWide Telescope object uses the HTML5 Canvas element to display the control. Note that div tag should be sized at a minimum of 750px x 750px to accommodate the web client. This will prevent the view from being cropped.

Now that you have the basics, take a look at other run-able samples in the Web Control Samples section. Start out with the WWT Web Client Simple sample, which takes our basic example a step further and adds a simple user interface to the mix.
The WWTControl object is the principal object, the other objects are created on initialization of the object, or can be created by the methods provided by this object.
Note that the Example Code listed for each property or method is not code that will run on its own, just an example of how to use the property or method within a script. Run-able samples are listed and linked to in the Web Control Samples section.
Object | Description |
| Annotation | Used to describe the annotation for a Circle, Poly or PolyLine object. |
| Circle | Used to render a circle on the screen. |
| Poly | Used to render a polygon on the screen. |
| PolyLine | Used to render a polyline on the screen. |
| Settings | Used to specify a range of settings for a View object. |
| WWTControl | Used to manage the canvas view of WorldWide Telescope images. |
The Annotation Object is inherited by the Circle object, the Poly object, and the PolyLine object, and is used to describe the annotation for these objects. An Annotation object is not used independently of these other objects, so this object should not be instantiated on its own.
Property | Description |
| ID | Contains a string for use by the web client. |
| Label | Contains descriptive text for the annotation. |
| Opacity | Specifies the opacity to be applied to the complete annotation. |
| ShowHoverLabel | Specifies whether to render the label if the mouse is hovering over the annotation. |
| Center | Specifies the center of the annotation. |
| Tag | Contains a string for use by the web client. |
The ID property contains a string for use by the web client.
Annotation.set_id([string])
[string] Annotation.get_id()
This string can be used to hold information (perhaps a URL or link to related information, reference string or number, credits, date, times, and so on) that is of use to the web client. The ID string is returned with a AnnotationClicked event.
// Draw a circle at the center of the constellation Sagittarius
circle.set_center(286.485, -27.5231666666667);
circle.set_id("Center of the Constellation Sagittarius");
The Label property contains descriptive text for the annotation.
Annotation.set_label([string])
[string] Annotation.get_label()
The label text will be rendered if the ShowHoverLabel property is set to true.
// Draw a circle at the center of the constellation Sagittarius
circle.set_center(286.485, -27.5231666666667);
circle.set_id("Center of the Constellation Sagittarius");
circle.set_label("RA: 286.485, Dec: -27.5231666666667");
The Opacity property specifies the opacity to be applied to the complete annotation.
Annotation.set_opacity([double])
[double] Annotation.get_opacity()
The default opacity setting is 1.0, which means that no transparency blending will be applied to the complete annotation. A value of 0.5, for example, will result in a 50% transparency blending being applied. Note that the color values for individual lines and fill color (which can include an alpha transparency value) are applied to the specific lines and shapes before the opacity value here is applied to the entire annotation.
// Set a solid fill color
circle.set_fillColor("red");
circle.set_fill(true);
// Apply a 50% transparency to the entire annotation
circle.set_opacity(0.5);
The ShowHoverLabel property specifies whether to render the label if the mouse is hovering over the annotation.
Annotation.set_showHoverLabel([Bool])
[Bool] Annotation.get_showHoverLabel()
The default setting is false.
// Draw a circle at the center of the constellation Sagittarius
circle.set_center(286.485, -27.5231666666667);
circle.set_id("Center of the Constellation Sagittarius");
circle.set_label("RA: 286.485, Dec: -27.5231666666667");
circle.set_showHoverLabel(true);
The Center property contains a Vector3d object for use by the web client.
Annotation.set_center([Vector3d])
[Vector3d] Annotation.get_center()
This Vector3d object is used to hold the center position of the annotation object used by the web client.
var vector3d = new wwtlib.Vector3d(x, y, z);
circle.set_center(vector3d);
The Tag property contains a string for use by the web client.
Annotation.set_tag([string])
[string] Annotation.get_tag()
This string can be used to hold information that is of use to the web client. The string is not used internally by WorldWide Telescope.
circle.set_tag("001");
The Circle object is used to render a circle on the screen. It is created by the CreateCircle method.
The Circle object inherits the properties of the Annotation object.
|
The image shows a purple circle with a 2 pixel line, a green polygon and a light blue polyline. Note that the order in which the elements are drawn is significant in how they appear, if there is any overlap or transparency. |
Property | Description |
| Fill | Specifies whether the circle should be filled or not. |
| FillColor | Specifies the fill color as an ARGB value. |
| LineColor | Specifies the line color as an ARGB value. |
| LineWidth | Specifies the line width in pixels. |
| Radius | Specifies the circle radius. |
| SkyRelative | Specifies whether the circle size is absolute or relative. |
Method | Description |
| SetCenter | Specifies the center coordinates of the circle. |
The Fill property specifies whether the circle should be filled or not.
Circle.set_fill([Bool])
[Bool] Circle.get_fill();
The default is false.
// Fill a circle with a transparent red
circle.set_fill(true);
circle.set_fillColor("0x55AA0000");
The FillColor property specifies the fill color as an ARGB value.
Circle.set_fillColor([string])
[string] Circle.get_fillColor()
The default fill color is white. The four bytes of the unsigned integer are the alpha, red, green and blue values respectively.
// Fill a circle with opaque green
circle.set_fill(true);
circle.set_fillColor("green");
The LineColor property specifies the line color as an ARGB value.
Circle.set_lineColor([string])
[string] Circle.get_lineColor()
The default line color is white. The four bytes of the unsigned integer are the alpha, red, green and blue values respectively.
// Draw a circle in opaque dark gray
circle.set_lineColor("0xFF555555");
The LineWidth property specifies the line width in pixels.
Circle.set_lineWidth([double])
[double] Circle.get_lineWidth()
The default line width is 1 pixel.
// Double the default line width
circle.set_lineWidth(2);
The Radius property specifies the circle radius.
Circle.set_radius([double])
[double] Circle.get_radius()
If the SkyRelative property is true, then the radius units are degrees of arc, if not then the units are pixels. The default radius is 10.
// Draw a fixed circle with a radius of 25 pixels
circle.set_skyRelative(false);
circle.set_radius(25);
The SkyRelative property specifies whether the circle size is absolute or relative.
Circle.set_skyRelative([Bool])
[Bool] Circle.get_skyRelative()
The default is false. If this property is true, then the radius of the circle is in degrees of arc, and the circle will resize with zooming. If it is false, then the circle radius is in pixels, and the circle will not change size as the view is zoomed.
// Draw a SkyRelative circle with a radius of 0.2 degrees of arc
circle.set_skyRelative(true);
circle.set_radius(0.2);
The SetCenter method specifies the center coordinates of the circle.
Circle.setCenter(
ra [Double],
dec [Double]
)
This method does not return a value.
The default value for right ascension and declination is zero.
// Draw a circle at the center of the constellation Sagittarius
circle.setCenter(286.485, -27.5231666666667);
The Poly object is used to render a polygon on the screen. The polygon can be filled with color, or unfilled, but is always a closed shape -- the last point entered for the polygon is connected to the first. It is created by the CreatePolygon method.
The Poly object inherits the properties of the Annotation object.
Property | Description |
| Fill | Specifies whether the polygon is filled or not. |
| FillColor | Specifies the fill color as an ARGB value. |
| LineColor | Specifies the line color as an ARGB value. |
| LineWidth | Specifies the line width in pixels. |
Method | Description |
| AddPoint | Adds a point to a polygon. |
The Fill property specifies whether the polygon is filled or not.
Poly.set_fill([Bool])
[Bool] Poly.get_fill()
The default fill setting is false.
// Fill a polygon with a slightly transparent blue
poly.set_fill(true);
poly.set_fillColor("0xBB0000AA");
The FillColor property specifies the fill color as an ARGB value.
Poly.set_fillColor([uint])
[uint] Poly.get_fillColor()
The default fill color is white. The four bytes of the unsigned integer are the alpha, red, green and blue values respectively.
// Set a solid red fill color
poly.set_fill(true);
poly.set_fillColor("red");
The LineColor property specifies the line color as an ARGB value.
Poly.set_lineColor([uint])
[uint] Poly.get_lineColor()
The default color is white. The four bytes of the unsigned integer are the alpha, red, green and blue values respectively.
// Set a solid black line color
poly.set_lineColor("0xFF000000");
The LineWidth property specifies the line width in pixels.
Poly.set_lineWidth([double])
[double] Poly.get_lineWidth()
The default line width is 1 pixel.
// Double the line width
poly.set_lineWidth(2 * poly.get_lineWidth());
The AddPoint method adds a point to a polygon.
Poly.addPoint(
x [Double],
y [Double]
)
This method does not return a value.
There is no theoretical limit to the number of points that can be added to a Poly object, however the number of points does affect performance -- so complex geometry should be simplified.
// The following function will add any number of points [ra, dec] to a polygon.
function expandPolygon(poly, newPoints){
for(var i in newPoints){
poly.addPoint(newPoints[i][0], newPoints[i][1]);
}
}
var poly1 = wwtView.createPolygon(true);
var points = [[20,-20], [20,-21], [21,-21], [21,-20]];
expandPolygon(poly1, points);
The PolyLine object is used to render a polyline on the screen. A polyline cannot be filled, and is not a closed shape -- the last point is not connected back to the first. It is created by the CreatePolyLine method.
The PolyLine object inherits the properties of the Annotation object.
Property | Description |
| LineColor | Specifies the line color as an ARGB value. |
| LineWidth | Specifies the line width in pixels. |
Method | Description |
| AddPoint | Adds a point to the polyline. |
The LineColor property specifies the line color as an ARGB value.
PolyLine.set_lineColor([uint])
[uint] PolyLine.get_lineColor()
The default color is white. The four bytes of the unsigned integer are the alpha, red, green and blue values respectively.
// Set a solid blue color
poly.set_fillColor("blue");
The LineWidth property specifies the line width in pixels.
PolyLine.set_lineWidth([double])
[double] PolyLine.get_lineWidth()
The default line width is 1 pixel.
poly.set_lineWidth(3);
The AddPoint method adds a point to a polyline.
PolyLine.addPoint(
x [Double],
y [Double]
)
This method does not return a value.
There is no theoretical limit to the number of points that can be added to a PolyLine object, however the number of points does affect performance -- so complex geometry should be simplified.
// The following function will add any number of points [ra, dec] to a polyline.
function expandPolyLine(polyline, newPoints){
for (var i in newPoints){
polyline.addPoint(newPoints[i][0], newPoints[i][1]);
}
}
var polyline1 = wwtView.createPolyLine();
var points = [[20,-20], [21,-21]];
expandPolyLine(polyline1, points);
The Settings object is used to specify a range of settings for a WWTControl object. The Settings object is created as part of the initialization of a WWTControl object.
The Settings object is referenced from the Settings property of the WWTControl object.
Property | Description |
| ConstellationBoundryColor | Specifies the constellation boundary color as an ARGB value. |
| ConstellationFigureColor | Specifies the constellation figure color as an ARGB value. |
| ConstellationSelectionColor | Specifies the constellation selection color as an ARGB value. |
| EclipticColor | Specifies the ecliptic color as an ARGB value. |
| GridColor | Specifies the grid color as an ARGB value. |
| LocalHorizonMode | Specifies that the view should be from a local lat/long/alt position (for example, a city, or landmark). |
| LocationAltitude | Specifies the view location altitude in meters. |
| LocationLat | Specifies the view location latitude. |
| LocationLng | Specifies the view location longitude. |
| ShowClouds | Specifies whether to show the Earth's cloud layer. |
| ShowConstellationBoundries | Specifies whether to show constellation boundaries. |
| ShowConstellationFigures | Specifies whether to show constellation figures. |
| ShowConstellationSelection | Specifies whether to show only the selected constellation. |
| ShowCrosshairs | Specifies whether to show cross-hairs. |
| ShowEcliptic | Specifies whether to show the path of the Sun. |
| ShowElevationModel | Specifies whether to show the elevation model. |
| ShowFieldOfView | Specifies whether to show the field of view box. |
| ShowGrid | Specifies whether to show the equatorial grid. |
| ShowHorizon | Specifies whether to show the horizon. |
| ShowHorizonPanorama | Specifies whether to show the panorama horizon. |
| ShowMoonsAsPointSource | Specifies whether to show the moon as a point source. |
| ShowSolarSystem | Specifies whether to show the 3-D solar system view. |
| ShowUTCTime | Specifies whether to show the time as a UTC value. |
| SolarSystemCosmos | Specifies whether to show the solar system cosmos. |
| SolarSystemLighting | Specifies whether to show the lighting effect of the Sun on the solar system. |
| SolarSystemMilkyWay | Specifies whether to show the Milky Way when showing the solar system. |
| SolarSystemMultiRes | Specifies whether to show the multi-resolution textures for the planets. |
| SolarSystemOrbitColor | Specifies the solar system orbit color as an ARGB value. |
| SolarSystemOrbits | Specifies whether to show the solar system orbits. |
| SolarSystemOverlays | Specifies whether to show the solar system overlays. |
| SolarSystemScale | Specifies how to scale the size of the Sun and the planets. |
| SolarSystemStars | Specifies whether to render stars when showing the solar system. |
| UserID | Specifies the user ID as a Guid. |
The ConstellationBoundryColor property specifies the constellation boundary color as an ARGB value.
wwtControl.settings.set_constellationBoundryColor([uint])
[uint] wwtControl.settings.get_constellationBoundryColor()
The default boundary color is blue.
// set the constellation boundary color to green
wwtControl.settings.set_constellationBoundryColor("green");
The ConstellationFigureColor property specifies the constellation figure color as an ARGB value.
wwtControl.settings.set_constellationFigureColor([uint])
[uint] wwtControl.settings.get_constellationFigureColor()
The default figure color is red.
// set the constellation figures color to blue
wwtControl.settings.set_constellationFigureColor("blue");
The ConstellationSelectionColor property specifies the constellation selection color as an ARGB value.
wwtControl.settings.set_constellationSelectionColor([uint])
[uint] wwtControl.settings.get_constellationSelectionColor()
The default selection color is yellow.
// set the constellation selection color to red
wwtControl.settings.set_constellationSelectionColor("red");
Note: This feature is not implemented.
The EclipticColor property specifies the ecliptic color as an ARGB value.
wwtControl.settings.set_eclipticColor([uint])
[uint] wwtControl.settings.get_eclipticColor()
The default ecliptic color is green.
// set the ecliptic color to transparent green
wwtControl.settings.set_eclipticColor("0xAA00FF00");
Note: This feature is not implemented.
The GridColor property specifies the grid color as an ARGB value.
wwtControl.settings.set_gridColor([uint])
[uint]wwtControl.settings.get_gridColor()
The default equatorial grid color is gray.
// set the grid color to green
wwtControl.settings.set_gridColor("green");
The LocalHorizonMode property specifies that the view should be from a local lat/long/alt position (for example, a city, or landmark).
wwtControl.settings.set_localHorizonMode([Bool])
[Bool]wwtControl.settings.get_localHorizonMode()
This setting is equivalent to the View > View from this location checkbox, and must follow all calls to set the lat/long/alt position. To toggle the local horizon, use the ShowHorizon Property.
wwtControl.settings.set_locationLat(37.455);
wwtControl.settings.set_locationLng(-122.262);
wwtControl.settings.set_locationAltitude(72);
wwtControl.settings.set_localHorizonMode(true);
|
The view from New York of the Andromeda Constellation. Note the horizon and compass directions. |
|
The view of Andromeda from the default viewing position, without any local horizon. |
The LocationAltitude property specifies the view location altitude in meters.
wwtControl.settings.set_locationAltitude([double])
[double]wwtControl.settings.get_locationAltitude()
None.
// Set the view from London, UK
wwtControl.settings.set_locationLat(51.31);
wwtControl.settings.set_locationLng(-0.06);
wwtControl.settings.set_locationAltitude(21);
wwtControl.settings.set_localHorizonMode(true);
The LocationLat property specifies the view location latitude.
wwtControl.settings.set_locationLat([double])
[double] wwtControl.settings.get_locationLat()
The default location latitude is 47.633.
// Set the view from Sydney, Australia
wwtControl.settings.set_locationLat(-33.52);
wwtControl.settings.set_locationLng(151.125);
wwtControl.settings.set_locationAltitude(34);
wwtControl.settings.set_localHorizonMode(true);
The LocationLng property specifies the view location longitude.
wwtControl.settings.set_locationLng([double])
[double] wwtControl.settings.get_locationLng()
The default location longitude is 122.133333.
// Set the view from San Francisco, USA
wwtControl.settings.set_locationLat(37.455);
wwtControl.settings.set_locationLng(-122.262);
wwtControl.settings.set_locationAltitude(72);
wwtControl.settings.set_localHorizonMode(true);
Note: This feature is not implemented.
The ShowClouds property specifies whether to show the Earth's cloud layer.
wwtControl.settings.set_showClouds([Bool])
[Bool] wwtControl.settings.get_showClouds()
This setting is equivalent to the Settings > Show Earth Cloud Layer checkbox. The viewer has to be a sufficient distance away from the surface of the Earth for the cloud cover to appear.
wwtControl.settings.set_showClouds(true);
| The Earth without its cloud layer. | |
| The Earth with its cloud layer. |
The ShowConstellationBoundries property specifies whether to show constellation boundaries.
wwtControl.settings.set_showConstellationBoundries([Bool])
[Bool]wwtControl.settings.get_showConstellationBoundries()
This setting is equivalent to the View > Boundaries checkbox.
wwtControl.settings.set_showConstellationBoundries(true);
|
The constellation boundaries are shown in blue, except for the selected constellation, with its boundary in yellow. |
The ShowConstellationFigures property specifies whether to show constellation figures.
wwtControl.settings.set_showConstellationFigures([Bool])
[Bool] wwtControl.settings.get_showConstellationFigures()
This setting is equivalent to the View > Figures checkbox.
wwtControl.settings.set_showConstellationFigures(true);
|
The constellation figures. |
The ShowConstellationSelection property specifies whether to show only the selected constellation.
wwtControl.settings.set_showConstellationSelection([Bool])
[Bool] wwtControl.settings.get_showConstellationSelection()
This setting is equivalent to the View > Focused Only checkbox.
wwtControl.settings.set_showConstellationSelection(true);
|
The selected constellation. |
The ShowCrosshairs property specifies whether to show cross-hairs.
wwtControl.settings.set_showCrosshairs([Bool])
[Bool] wwtControl.settings.set_showCrosshairs()
This setting is equivalent to the View > Reticle/Crosshairs checkbox.
wwtControl.settings.set_showCrosshairs(true);
| The crosshairs, or reticle, shown with Mars in view. |
The ShowEcliptic property specifies whether to show the ecliptic grid.
wwtControl.settings.set_showEcliptic([Bool])
[Bool] wwtControl.settings.get_showEcliptic()
This setting is equivalent to the Grids > Ecliptic Grid checkbox in the layer manager.
wwtControl.settings.set_showEcliptic(true);
Note: This feature is not implemented.
The ShowElevationModel property specifies whether to show the elevation model.
wwtControl.settings.set_showElevation([Bool])
[Bool] wwtControl.settings.get_showElevation()
This setting is equivalent to the Settings > Show Elevation Model checkbox.
wwtControl.settings.set_showElevationModel(true);
| The Himalayan mountains, shown without elevation data. | |
| The Himalayan mountains, with elevation data. |
Note: This feature is not implemented.
The ShowFieldOfView property specifies whether to show the field of view box.
wwtControl.settings.set_showFieldOfView([Bool])
[Bool] wwtControl.settings.get_showFieldOfView()
This setting is equivalent to the View > Field of View Indicator checkbox. The field of view box may not be visible in a view until the field of view is changed.
wwtControl.settings.set_showFieldOfView(true);
|
Gamma Pegasi shown with the Field of View Indicator box. |
The ShowGrid property specifies whether to show the equatorial grid.
wwtcontrol.settings.set_showGrid([Bool])
[Bool] wwtcontrol.settings.get_showGrid()
This setting is equivalent to the View > Equatorial Grid check box.
wwtControl.settings.set_showGrid(true);
|
The Equatorial grid shown, looking North, with the Hydrogen Alpha Full Sky Map as the data source. |
Note: This feature is not implemented.
The ShowHorizon property specifies whether to show the horizon.
wwtControl.settings.set_showHorizon([Bool])
[Bool] wwtControl.settings.get_showHorizon()
None.
wwtControl.settings.set_showHorizon(true);
Note: This feature is not implemented.
The ShowHorizonPanorama property specifies whether to show the horizon in panoramas.
wwtControl.settings.set_showHorizonPanorama([Bool])
[Bool] wwtControl.settings.get_showHorizonPanorama()
None.
wwtControl.settings.set_showHorizonPanorama(true);
Note: This feature is not implemented.
The ShowMoonsAsPointSource property specifies whether to show the moon as a point source.
wwtControl.settings.set_showMoonsAsPointSource([Bool])
[Bool] wwtControl.settings.get_showMoonsAsPointSource()
None.
wwtControl.settings.set_showMoonsAsPointSource(true);
Note: This feature is not implemented.
The ShowSolarSystem property specifies whether to show the 3-D solar system view.
wwtControl.settings.set_showSolarSystem([Bool])
[Bool] wwtControl.settings.get_showSolarSystem()
This setting can also be changed from within Tours, enabling a tour to switch from a view of a distant object to a 3-D view of one of the objects in the Solar System.
wwtControl.settings.set_showSolarSystem(true);
Note: This feature is not implemented.
The ShowUTCTime property specifies whether to show the time as a UTC value.
wwtControl.settings.set_showUTCTime([Bool])
[Bool] wwtControl.settings.get_showUTCTime()
If this value is true, the time shown will be Universal Coordinated Time (or Greenwich Mean Time), and if it is false the time displayed will be local time.
wwtControl.settings.set_showUTCTime(true);
Note: This feature is not implemented.
The SolarSystemCosmos property specifies whether to show the solar system cosmos.
wwtControl.settings.set_solarSystemCosmos([Bool])
[Bool] wwtControl.settings.get_solarSystemCosmos()
None.
wwtControl.settings.set_solarSystemCosmos(true);
Note: This feature is not implemented.
The SolarSystemLighting property specifies whether to show the lighting effect of the Sun on the solar system.
wwtControl.settings.set_solarSystemLighting([Bool])
[Bool] wwtControl.settings.get_solarSystemLighting()
This setting is equivalent to the View > Lighting checkbox.
wwtControl.settings.set_solarSystemLighting(true);
| The lighting of the Sun on Saturn. |
Note: This feature is not implemented.
The SolarSystemMilkyWay property specifies whether to show the Milky Way when showing the solar system.
wwtControl.settings.set_solarSystemMilkyWay([Bool])
[Bool] wwtControl.settings.get_solarSystemMilkyWay()
This setting is equivalent to the View > Milky Way checkbox.
wwtControl.settings.set_solarSystemMilkyWay(true);
| The Milky Way appears to the left of Saturn. |
Note: This feature is not implemented.
The SolarSystemMultiRes property specifies whether to show the multi-resolution textures for the planets.
wwtControl.settings.set_solarSystemMultiRes([Bool])
[Bool] wwtControl.settings.get_solarSystemMultiRes()
Multi-resolution textures are very detailed images of a planet surface. If these are not enabled then it does not make sense to zoom close to the surface. If they are enabled then individual buildings, for example, can be located.
This setting is equivalent to the Settings > Multi-Res Solar System Bodies checkbox.
wwtControl.settings.set_solarSystemMultiRes(true);
| The Caribbean in standard textures. | |
| The Caribbean with multi-resolution textures. |
Note: This feature is not implemented.
The SolarSystemOrbitColor property specifies the solar system orbit colors as an ARGB value.
wwtControl.settings.set_solarSystemOrbitColor([uint])
[uint] wwtControl.settings.get_solarSystemOrbitColor()
The default orbit color is dark gray.
// set the solar system orbit color to red
wwtControl.settings.set_solarSystemOrbitColor("red");
Note: This feature is not implemented.
The SolarSystemOrbits property specifies whether to show the orbits when showing the solar system.
wwtControl.settings.set_solarSystemOrbits([Bool])
[Bool] wwtControl.settings.get_solarSystemOrbits()
This setting is equivalent to the View > Orbits checkbox.
wwtControl.settings.set_solarSystemOrbits(true);
| The orbits of all the solar system planets are shown in the SolarSystemOrbitColor. |
Note: This feature is not implemented.
The SolarSystemOverlays property specifies whether to show the solar system overlays.
wwtControl.settings.set_solarSystemOverlays([Bool])
[Bool] wwtControl.settings.get_solarSystemOverlays()
None.
wwtControl.settings.set_solarSystemOverlays(true);
Note: This feature is not implemented.
The SolarSystemScale property specifies how to scale the size of the Sun and the planets.
wwtControl.settings.set_solarSystemScale([int])
[int] wwtControl.settings.get_solarSystemScale()
If this value is set to 1, then the Sun and planets will appear actual size in the Solar System view. To increase the scale, this value can be set to a number between 1 and 100. This setting is equivalent to the Planet Size slider.
wwtControl.settings.set_solarSystemScale(50);
| The Sun shown actual size. | |
| The Sun with maximum scaling. |
Note: This feature is not implemented.
The SolarSystemStars property specifies whether to render stars when showing the solar system.
wwtControl.settings.set_solarSystemStars([Bool])
[Bool] wwtControl.settings.get_solarSystemStars()
This setting is equivalent to the View > Show Stars checkbox.
wwtControl.settings.set_solarSystemStars(true);
| Saturn and the stars. |
Note: This feature is not implemented.
The UserID property is used to retrieve the user ID as a Guid.
wwtControl.settings.set_userID([Guid])
[Guid] wwtControl.settings.get_userID()
The Guid is in registry format, without the accompanying "{}" braces. When a user runs the client, a unique Guid is generated for them. The Guid is not persistent and will be different each time the same user runs the client. It can be used to identify a particular user during one session.
// Assume an input tag has been set up in the html code
// Display the user ID in the "user" text box
document.getElementById("user").value = wwtControl.settings.get_userID();
The WWTControl object is used to manage the current view of WorldWide Telescope images. It is the principal object in the object model, and handles the creation of the other objects.
The WWTControl object does not inherit any classes that have exposed properties or methods.
Property | Description |
| Fov | Contains the field of view in degrees. |
| Settings | Reference to the Settings object for the WWTControl. Note this object is created when the WWTControl object is created, so there is no specific call to create a Settings object. |
| SmoothAnimation | Specifies whether to pan smoothly or quickly to the new location. |
Method | Description |
| AddAnnotation | Adds an Annotation object to the view. |
| ClearAnnotations | Removes all annotations from the view. |
| CreateCircle | Creates a Circle object, and returns a reference to the created object. |
| CreatePolygon | Creates a Poly object (a polygon), and returns a reference to the created object. |
| CreatePolyLine | Creates a PolyLine object, and returns a reference to the created object. |
| GetDec | Retrieves the declination for the view. |
| GetRA | Retrieves the right ascension for the view. |
| GotoRaDecZoom | Used to go to a new viewing position. |
| HideUI | Specifies whether to hide the UI for the view. |
| LoadImageCollection |
Used to load a WTML collection file, containing links to foreground and background images. |
| LoadTour | Used to load and start a tour. |
| LoadVOTable | Used to load a VO (Virtual Observatory) table. |
| PlayTour | Used to restart a tour from the beginning. |
| RemoveAnnotation | Removes the specified annotation from the view. |
| SetBackgroundImageByName | Loads an image to use as the view background. |
| SetForegroundImageByName | Loads an image to use as the view foreground. |
| SetForegroundOpacity | Specifies the opacity of the entire foreground image, which can be useful when visually comparing the foreground and background images. |
| StopTour | Used to stop and exit a tour. |
Event | Description |
| AnnotationClicked | Fired when an Annotation object is clicked on. Note the spelling error! |
| wwtArrived | Fired when a change to the view from a drag, zoom, or goto comes to a halt. |
| wwtClick | Fired when the left mouse button is clicked. |
| wwtReady | Fired when the web client is initialized. |
Note: This feature is not implemented.
The Fov property contains the field of view in degrees.
[double] wwtControl.get_fov()
This property is read-only. The maximum field of view is 60 degrees, the minimum is close to zero, at 0.00022910934437488727 degrees. Field of view can be considered to be the inverse of the zoom factor -- the smaller the field of view the greater the zoom factor.
// Function to increase the field of view (zoom out)
function FovInc() {
var newFov = 1.1 * wwtControl.get_fov();
if(newFov <= 60) {
wwtControl.gotoRaDecZoom(wwtControl.getRA(), wwtControl.getDec(), newFov, false);
}
}
// Function to decrease the field of view (zoom in)
function FovDec() {
var newFov = wwtControl.get_fov() / 1.1;
if(wwtControl.get_fov() >= 0.00022910934437488727) {
wwtControl.gotoRaDecZoom(wwtControl.getRA(), wwtControl.getDec(), newFov, false);
}
}
The Settings property references the Settings object for the WWTControl.
wwtControl.settings [Settings]
This property is read-only, though individual settings can have their values set (refer to the Settings object).
// show cross hairs and display a semi-transparent grid
wwtControl.settings.set_showCrosshairs(true);
wwtControl.settings.set_gridColor("0x88880000"); // Transparent red
wwtControl.settings.set_showGrid(true);
Note: This feature is not implemented.
The SmoothAnimation property specifies whether to pan smoothly or quickly to the new location.
wwtControl.set_smoothAnimation([Bool])
[Bool] wwtControl.get_smoothAnimation()
If this property is set to true the panning will be smoother but slower than if the property is false. This property is equivalent to the Settings/Smooth Panning checkbox in the UI, and the purpose of setting it to false is to improve CPU performance.
wwtControl.set_smoothAnimation(true);
The AddAnnotation method adds an Annotation object to the view.
wwtControl.addAnnotation(
annotation [Annotation]
)
This method does not return a value.
An Annotation Object is inherited by the Circle object, the Poly object, and the PolyLine object, so adding an annotation will add one of these graphics to the view, in addition to providing the annotation text.
Typically one or more annotations are added to a view when a user clicks on a custom UI element such as a checkbox, and then those annotations are removed when the user deselects that UI element.
// Global settings
var bShowCircle = false;
var bShowPolygon = false;
// Function to toggle the display of annotations
function toggleSetting(text) {
switch (text) {
case 'ShowCircle':
bShowCircle = !bShowCircle;
if(bShowCircle) {
wwtView.AddAnnotation(circle1);
} else {
wwtView.RemoveAnnotation(circle1);
}
break;
case 'ShowPolygon':
bShowPolygon = !bShowPolygon;
if(bShowPolygon) {
wwtView.AddAnnotation(polygon1);
} else {
wwtView.RemoveAnnotation(polygon1);
}
break;
}
}
The ClearAnnotations method removes all annotations from the view.
wwtControl.clearAnnotations()
This method takes no parameters.
This method does not return a value.
None.
wwtControl.clearAnnotations();
The CreateCircle method creates a Circle object, and returns a reference to the created object.
wwtControl.createCircle(
fill [Bool]
)
This method returns a reference to a Circle object.
In addition to creating the circle an Annotation object (which is inherited by the Circle object) will be created to provide supporting text.
// Assume that a WWTControl object has been created, and named wwtControl
// The following function will add a circle to the view object, and
// return a reference to the created object.
function createWWTCircle(fill, lineColor, fillColor, lineWidth, opacity, radius, skyRelative, ra, dec)
{
var circle = wwtControl.createCircle(fill);
circle.set_lineColor(lineColor);
circle.set_fillColor(fillColor);
circle.set_lineWidth(lineWidth);
circle.set_opacity(opacity);
circle.set_radius(radius);
circle.set_skyRelative(skyRelative);
circle.setCenter(ra, dec);
return circle;
}
|
In this image, circle objects filled with a transparent color have been used to identify point sources of light. |
The CreatePolygon method creates a Poly object (a polygon), and returns a reference to the created object.
wwtControl.CreatePolygon(
fill [Bool]
)
This method returns a reference to the created Poly object.
In addition to creating the polygon an Annotation object (which is inherited by the poly object) will be created to provide supporting text.
// Assume that a WWTControl object has been created, and named wwtControl
// The following function will add a polygon to the view object, and
// return a reference to the created polygon.
function createWWTPolygon(fill, lineColor, fillColor, lineWidth, opacity, points) {
var poly = wwtControl.createPolygon(fill);
poly.set_lineColor(lineColor);
poly.set_fillColor(fillColor);
poly.set_lineWidth(lineWidth);
poly.set_opacity(opacity);
for(var i in points) {
poly.addPoint(polyPoints[i][0], polyPoints[i][1]);
}
return poly;
}
// Define a 2-D array of [ra,dec] points, and then create the polygon
var myPoints = [[25, -35], [15, -25], [25, -30], [30, -25]];
myPolygon = createWWTPolygon(true, "0x880000ff", "0x8800ff00", 2, 1.0, myPoints);
|
This image shows the use of Polygon objects to identify a hierarchy of areas. If these areas are annotated, then increasingly detailed descriptions of the stellar sources can be given. |
The CreatePolyLine method creates a PolyLine object, and returns a reference to the created object.
wwtControl.createPolyLine(
fill [Bool]
)
This method returns a reference to a PolyLine object.
In addition to creating the polyline, an Annotation object (which is inherited by the polyline object) will be created to provide supporting text.
The rendering of a polyline will simply take each point in the list and draw a line to the next. In order to have a more complex polyline, for example with forks with two or more lines coming from a single point, then there are two main options, either create several polyline objects sharing a single point, or backtrack over points after reaching the end of one fork, and then continuing to add points along the second fork, and so on.
// Assume that a WWTControl object has been created, named wwtControl
// The following function will add a polyline to the view object, and
// return a reference to the created object.
function createWWTPolyLine(lineColor, lineWidth, opacity, points) {
var polyLine = wwtControl.createPolyLine();
polyLine.set_lineColor(lineColor);
polyLine.set_lineWidth(lineWidth);
polyLine.set_opacity(opacity);
for(var i in points) {
polyline.addPoint(points[i][0], points[i][1]);
}
return polyLine;
}
//
// Then to use this function create a two-dimensional array of [ra,dec] points
//
var points = [[20, -29], [22, -22], [16, -11], [12, -10], [15,-25]];
//
// ....and call the function appropriately
//
var myPolyline = createWWTPolyLine("0x8800FFFF", 2, 1.0, points);
|
This image shows some common variations of Polyline objects. |
The GetDec method retrieves the declination for the view.
wwtControl.getDec()
This method takes no parameters.
This method returns a double containing the declination in decimal degrees.
The declination of an object is how many degrees it is north or south of the celestial equator. It is used in conjunction with right ascension, which is measured eastward from a prime meridian on the sky. The prime meridian passes through the position of the Sun at the time of the vernal equinox, so its position changes slowly over the years, due to the precession of the equinoxes. The position of the celestial poles also changes with precession, so to locate an object from its right ascension and declination, you must also know the date for which those coordinates are valid; that date is called the epoch of the coordinates. WorldWide Telescope requires the epoch to be J2000.
// Save off the current view...
var savedRA = wwtControl.getRA();
var savedDec = wwtControl.getDec();
var savedFov = wwtControl.get_fov();
// Goto a new view...
wwtControl.gotoRaDecZoom(newRA, newDec, newFov, false);
// If the user selects a custom control to go back to the previous view...
wwtControl.gotoRaDecZoom(savedRA, savedDec, savedFov, false);
The GetRA method retrieves the right ascension for the view.
wwtControl.getRA()
This method takes no parameters.
This method returns a double containing the right ascension in decimal degrees.
Refer to the remarks for GetDec.
// Assume that a WWTControl object has been created, named wwtControl
// Function to zoom in....
function FovDec() {
var newFov = wwtControl.get_fov() / 1.1;
if(wwtControl.get_fov() >= 0.00022910934437488727) {
wwtControl.gotoRaDecZoom(wwtControl.getRA(), wwtControl.getDec(), newFov, false);
}
}
The GotoRaDecZoom method is used to go to a new viewing position.
wwtControl.gotoRaDecZoom(
ra [Double],
dec [Double],
fov [Double],
instant [Bool]
)
This method does not return a value.
This method is one of the most used of the API set, controlling the changing of the views.
// The following code shows how to convert from hours, minutes and seconds
// to a right ascension and degrees, minutes and seconds to a declination.
function HMS(h, m, s) {
h = h + (m/60) + (s/3600);
var d = h * 15; // Convert from hours to degrees (360/24 = 15)
return d;
}
function DMS(d, m, s) {
if(d < 0) {
m = -m;
s = -s;
}
d = d + (m/60) + (s/3600);
return d;
}
wwtControl.gotoRaDecZoom(HMS(06, 25, 30), DMS(45, 00, 00), 30, false);
Note: This feature is not implemented.
The HideUI method specifies whether to hide the UI for the view.
wwtControl.hideUI(
hide [Bool]
)
This method does not return a value.
If the UI is hidden, the main menu, thumbnails, collections, tours and so on will not be visible, giving an uninterrupted view. This can be helpful when control of the view is being handled by a custom client UI.
var bShowUI = true;
function toggleSetting(text) {
switch (text) {
case 'ShowUI':
bShowUI = !bShowUI;
wwtControl.hideUI(!bShowUI);
break;
....
}
}
// The toggleSetting function should be used along with the following html input control
<input id="UI" type="checkbox" checked="checked" onclick="toggleSetting('ShowUI');"\>
The LoadImageCollection method is used to load a WTML
collection file,
containing links to foreground and background images.
wwtControl.loadImageCollection(
url [String]
)
This method does not return a value.
For a description of the content of image collection files, refer to the WorldWide Telescope Data Files Reference document.
After the collection is loaded, the images can be referenced by their string name using the SetBackgroundImageByName and SetForegroundImageByName methods.
// If the data file is in the same folder as the JScript Web Control.
wwtControl.loadImageCollection("imageFile.wtml");
// If the data file requires a full path
wwtControl.loadImageCollection("[path]//imageFile.wtml");
The LoadTour method is used to load and start a tour.
wwtControl.loadTour(
url [String]
)
This method does not return a value.
Tours are a sequence of tour stops. Each tour stop describes a viewing position, with accompanying audio (music or speech), and graphics (text, shapes or images). The amount of time a tour should spend at each stop is specified, along with how the transition should be made (instant or slewing) to the next stop. Obviously when the last tour stop has been visited, the tour is completed. On completion the end tour dialog will appear.
Tours can be stand-alone, or part of collections. For more information on tours refer to the WorldWide Telescope User Guide, and also to the WorldWide Telescope Data Files Reference document.
wwtControl.loadTour("//worldwidetelescope.org/docs/wtml/tourone.wtt");
Note: This feature is not implemented.
The LoadVOTable method is used to load a VO (Virtual Observatory) table.
wwtControl.loadVOTable(
url [String],
useCurrentView [Bool]
)
This method does not return a value.
The VO data will appear as a spreadsheet in its own window. For details on the VO standard for storing data, refer to us-vo.org.
wwtControl.loadVOTable("path.xml", true);
The PlayTour method is used to restart a tour from the beginning.
wwtControl.playTour()
This method takes no parameters.
This method does not return a value.
Refer to the remarks for the LoadTour method.
function restartTour(){
wwtControl.playTour();
}
The RemoveAnnotation method removes the specified annotation from the view.
wwtControl.removeAnnotation(
annotation [Annotation]
)
This method does not return a value.
None.
// Global settings
var bShowCircle = false;
var bShowPolygon = false;
// Function to toggle the display of annotations
function toggleSetting(text) {
switch (text) {
case 'ShowCircle':
bShowCircle = !bShowCircle;
if(bShowCircle) {
wwtControl.addAnnotation(circle1);
} else {
wwtControl.removeAnnotation(circle1);
}
break;
case 'ShowPolygon':
bShowPolygon = !bShowPolygon;
if(bShowPolygon) {
wwtControl.addAnnotation(polygon1);
} else {
wwtControl.removeAnnotation(polygon1);
}
break;
}
}
The SetBackgroundImageByName method loads an image to use as the view background.
wwtControl.setBackgroundImageByName(
name [String]
)
This method does not return a value.
The string used as the name parameter for this method should be present as a
Place name in the .WTML
file loaded by the
LoadImageCollection method. Typically background images come from Survey data, such as
visible light, x-ray, infrared, ultraviolet, gamma, and
so on. In the UI of WorldWide Telescope, the background image is selected with
the Imagery entry, and if there is a foreground image, the
Image Crossfade slider will appear.
A background image need not cover the whole sky, and can in fact be a simple study of one object in space. In this case the rest of the sky will be dark and empty, except for the solar system which is not considered foreground or background.
wwtControl.loadImageCollection("MyImageCollection.wtml");
wwtControl.setBackgroundImageByName("The Big Picture");
wwtControl.gotoRaDecZoom(45.5, 122.0, 2, false);
The SetForegroundImageByName method loads an image to use as the view foreground.
wwtControl.setForegroundImageByName(
name [String]
)
This method does not return a value.
The string used as the name parameter for this method should be present as a
Place name in the .WTML
file loaded by the
LoadImageCollection method.
There can be only one foreground image and only one
background image rendered at any one time. The typical use is to render
studies as foreground images on top of a survey as a background image.
If the opacity of the foreground image is solid, the background image will not be visible underneath. However if the SetForegroundOpacity method is used to add some transparency, then both foreground and background images will be visible, and can be compared. Typical use of these two layers is to load a visual survey as either foreground or background, and then to compare it with an x-ray, heat or image of another non-visible wavelength, enabling a visual comparison between the two.
In the UI of WorldWide Telescope the Explore > Open > Collection menu selection is typically used to load foreground images. If the WTML collection file explicitly defines a study as a background, or a survey as foreground, then this menu selection can be used to reverse the normal process. However, by default, studies loaded this way are treated as foreground, surveys as background.
To load a survey as a foreground image, or a study as a background image, use Folder entries with the following structures. Note all the extra information needed in the Place entry for a study image.
|
<?xml version="1.0"?> <Folder> <Folder Name="Background Studies" Group="View" Searchable="True" Type="Sky"> <Place Name="Study One" DataSetType="Sky" RA="0" Dec="0" Constellation="0" Classification="0" Magnitude="0" Distance="0" ZoomLevel="0" Rotation="0" Angle="0" Opacity="100" AngularSize="1"> <Target>Undefined</Target> <BackgroundImageSet>  </BackgroundImageSet> </Place> </Folder>  <Folder Name="Foreground Surveys" Group="Explorer"> <Place Name="Survey One"> <ForegroundImageSet>  </ForegroundImageSet> </Place> </Folder> </Folder> |
The Sun and solar system planets and moons are not considered either foreground or background, and will be present in any sky view.
Note that the images used for both foreground and background are tiled image pyramids. Refer to the tools documentation WorldWide Telescope Data Tools Guide for details on how to create these image pyramids, and to the WorldWide Telescope Data Files Reference for details on the data file formats.
wwtControl.loadImageCollection("Serpens.wtml");
wwtControl.setForegroundImageByName("The Serpens Dark Cloud");
wwtControl.gotoRaDecZoom(277.274985, 0.545000, 1, false);
The "Serpens.wtml" file contains the following:
|
Note: This feature is not implemented.
The SetForegroundOpacity method specifies the opacity of the foreground image, which can be useful when visually comparing the foreground and background images.
This method is not currently implemented.
wwtControl.setForegroundOpacity(
opacity [Double]
)
This method does not return a value.
This setting enables some see-through in the foreground image, to enable a comparison with the background image. Note that if the foreground image is a .png file, then some transparency information is usually held within the file. The SetForegroundImageByName method sets the foreground opacity to 1.0 each time a new image is loaded.
wwtControl.setForegroundOpacity(0.8);
The StopTour method is used to stop and exit a tour.
wwtControl.stopTour()
This method takes no parameters.
This method does not return a value.
After a tour has been stopped with this call, it cannot be restarted from the position it was stopped at. PlayTour (which restarts a tour) will not work after a tour has been stopped. Also refer to the remarks for LoadTour.
function loadTour(tourURL) {
wwtControl.loadTour(tourURL);
}
function stopTour() {
wwtControl.stopTour();
}
The AnnotationClicked event is fired when an Annotation object is clicked.
function annotationClicked(obj, eventArgs){}
The obj parameter is the wwt object that originated the click event and the eventArgs object contains the click event arguments accessed by the methods get_id(), get_RA(), and get_dec().
function annotationClicked(obj, eventArgs) {
alert("Annotation ID:" + eventArgs.get_id().toString());
}
The wwtArrived event is fired when a change to the view from a drag, zoom, or gotoRaDecZoom comes to a halt.
function arrived(){}
When the view is to change following a drag, zoom, or gotoRaDecZoom, normally there will be an animated slew across space until the new view comes to rest. It is on the completion of the slew that this event is fired.
Currently this event is not being sent if the instant parameter of the gotoRaDecZoom method is set to True.
// Register the event to your arrived function
wwtControl.add_arrived(myArrivedEvent);
// create a function that will handle the arrived event
function myArrivedEvent(obj, eventArgs) {
// Show that we have arrived by drawing a red circle at the new ra, dec
// Create the circle.
var circle = wwtControl.createCircle(true);
circle.set_fillColor("red");
circle.set_opacity(3);
circle.set_radius(1.0);
circle.set_skyRelative(15);
circle.setCenter(eventArgs.get_RA(), eventArgs.get_dec());
wwtControl.addAnnotation(circle);
}
The wwtClick event is fired when the left mouse button is clicked.
function click(obj, eventArgs){}
This event is not fired for all mouse clicks, only those when the view is stationary and the mouse click is not part of a zoom or drag procedure. In other words, it is evident that the user is clicking on an object. The RA and Dec provided in the eventArgs object are the location of the click, which will not usually be the same as the RA and Dec for the current view. The obj parameter is the wwt object that originated the click event and the eventArgs object contains the click event arguments accessed by the methods get_ra() and get_dec().
// Register the event to your clicked function
wwtControl.add_click(clicked);
function clicked(obj, eventArgs) {
alert("Clicked on: " + eventArgs.get_RA().toString() + ", " + eventArgs.get_dec().toString());
}
The wwtClick event is fired when the web client is initialized.
function ready(){}
This event is fired only once, and should be responded to by all clients. Use it to initialize internal variables appropriately, in particular the reference to the View object, shown in the example code.
var wwt;
// Register the event to your wwtReady function
function initialize() {
wwt = wwtlib.WWTControl.initControl();
wwtControl.add_ready(wwtReady);
}
// here is where you can put custom code that runs when the
// WWTControl is ready
function wwtReady() {
wwtControl.settings.set_showCrosshairs(true);
wwtControl.settings.set_showConstellationFigures(false);
}
The following table lists the samples that can be used as a starting point for WorldWide Telescope web client development.
Click on the Sample Name to view the source. Note that paths may need to be changed for the samples to work, these paths are highlighted by comments in the sample code.
Sample Name | Description | Link |
Sky samples | ||
| WWT Web Client Simple |
Performs the basic steps of opening up a client, and provides a few UI controls to select one of two constellations, and change a few settings.
| Run |
| WWT Web Client Poly |
Adds the creation of two circle, one polygon and one polyline annotation objects to the simple client.
| Run |
| WWT Web Client Arrived |
Shows the use of the Arrived event, drawing a red circle on the new view when the event is received.
| Run |
| WWT Web Client Click Event |
Shows the use of the Click event, drawing a circle or an alert box giving the location of the click.
| Run |
| WWT Web Client Fov |
Shows the current Field of View, with buttons to zoom in and out.
| Run |
| WWT Web Client Local View |
Shows the view from a number of cities around the world.
| Run |
| WWT Web Client Images |
Loads a sample image collection, enabling the selection of one of three foreground images.
| Run |
| WWT Web Client Tours |
Loads and runs one of two simple tours of the Solar System.
| Run |
Earth samples | ||
| WWT Web Client Earth City Search |
Change the view to the Earth, then locate cities and lat/long locations.
| Run |
Planet samples | ||
| WWT Web Client Mars Explorer |
Change the view to Planets and the Imagery to Mars, then scroll through a range of surface features from the
Valles Marineris canyon to the Happy Face crater.
| Run |
The following table lists some demonstration programs that have been created using the SDK.
Demo Name | Description | Link |
| WWT Web Client Hi-Def Planet Explorer |
Provides a range of options for exploring the surfaces of our Moon and Mars. Thousands of surface features, including craters, mountains, valleys, seas, plains, ridges and depressions,
are available to step through, sort, search and view.
Make sure to select the correct planet or moon in the Look At and Imagery drop down lists, after starting the program. | Run |
| WWT Web Client Distant Planet Explorer |
Provides a range of options for exploring the surfaces of Mercury, Venus, and the four main moons of Jupiter: IO, Ganymede, Europa and Callisto. Hundreds of surface features,
are available to step through, sort, search and view.
Make sure to select the correct planet or moon in the Look At and Imagery drop down lists, after starting the program. | Run |
| WWT Web Client Messier Catalog |
All 110 objects in this famous catalog can be viewed, displayed as a slide show, sorted and searched.
| Run |


[gecode-users] segfault with floating-point vars
Peter Nightingale
pwn1 at st-andrews.ac.uk
Thu May 16 00:32:01 CEST 2013
Hi,
I get a segfault with the attached file, through mzn-gecode (with
minizinc 1.6 and gecode 4.0.0 compiled from source, on Ubuntu 13.04 64-bit)
I see you have fixed a segfault for Stefano Gualandi, perhaps this file
will also work now?
Don't worry if this is not an easy fix. The problem is not that
important, and organizing CP takes higher priority!
Peter
-------------- next part --------------
var float: F;
var float: R;
var float: N;
var float: I;
var float: L;
var float: k;
constraint F=(R*R*N*N*I*I*k)/(2.0*L);
constraint F=20.0;
solve satisfy;
output [
"F : ", show(F), "\n",
"R : ", show(R), "\n",
"N : ", show(N), "\n",
"I : ", show(I), "\n",
"L : ", show(L), "\n",
"k : ", show(k), "\n"
];
%-----------------------------------------------------------------------------%
%-----------------------------------------------------------------------------%
More information about the users
mailing list


These are issues found with elements in models, such missing mappings to the FHIR resource type elements, or models for which a Profile could not be found.
No issues detected!
| Issue type | Path | Description |
|---|---|---|
| {{iss.type}} | {{iss.ed.path}} | {{iss.display}} |
These are issues found specifically with the coded elements in models, such as binding issues for ValueSets or Valuesets not found on the Terminology server
No issues detected!
| Issue type | Path | Description |
|---|---|---|
| {{iss.type}} | {{iss.ed.path}} | {{iss.display}} |
These are issues found with the 'definitional' conformance resource - most commonly extensions
No issues detected!
| Issue type | Path | Description |
|---|---|---|
| {{iss.type}} | {{iss.ed.path}} | {{iss.display}} |
|
{{item.canUrl}}
|
{{item.state}} | {{item.note}} |


{% set manager = rivalry.owner %}
{% include 'includes/managerlockup.html' %}
VS
{% set manager = rivalry.opponent %}
{% include 'includes/managerlockup.html' %}
View Matchups »
Upsets In Favor
{{ rivalry.upsets_in_favor }}
Upsets Against
{{ rivalry.upsets_against }}
{{ rivalry.wins }}
–
{{ rivalry.losses }}
{{ (rivalry.wins/(rivalry.wins+rivalry.losses))|round(3) }}


Meditations to Make This New Year the Best
Meditate in the New Year
Meditations to Make This New Year the Best
Zenpra > Letting go > Meditations to Make This New Year the Best
Zenpra 29th December 2014 0 Comments
Letting go, Meditation, New Year, Tips
The New Year brings us the opportunity to start fresh and embark on new experiences in life. It is also a time to reflect on our past year. Meditation is a great way to let go of any experience that we feel is not aiding us in our journey. It will help us clear out any unwanted emotions and feelings that are burdening us. This will give you the opportunity to start fresh and be open to new experiences that the New Year has to offer.
We all keep grudges and emotions pent up inside of us. Today I will show you some techniques that you can help you remove unwanted grudges so you focus on the present. It is common for us to hold grudges and keep our emotions bottled up when someone hurts us. We view the world in what negative things people have done against us. We do not want to carry any of this negativity into the New Year.
Become more present – When we do not let go of the past we tend to live in the present. Our minds are pulling us back into the past and we cannot enjoy what is right here in the present moment. By practicing ways to let go of unwanted emotions and thoughts you will be able to create space so that you can focus on the here and now. Each time you feel yourself being pulled back by a negative thought try to witness that and regain your focus on the present moment.
Meditation for letting go.
- Sit comfortably and start to relax your body. Let your thoughts run free and unhindered
- If you come across a thought that you would like to let go and not affect you anymore hold onto it and keep it in your mind.
- View this though as an object in your mind and start to find where did this thought stem from. Try and find its source and root.
- Explore and unravel all of the emotions and thoughts that are generated when you are trying to find the source
- Next if you have found the source or even if you haven’t put all the thoughts into an imaginary box in your mind
- With all your force breathe out deeply and imagine the box with all the negative thoughts escaping your body. Continue doing this until you feel that you have let go all of these thoughts.
- Relax your body and feel how you feel lighter as though a big weight has lifted off your shoulders.
Helps you identify new opportunities– A major advantage of being able to easily let go of hindering thoughts and emotions is that it will help you be more open to find new opportunities in life. You will be fully aware and optimistic about the things that are presently happening. When we are bogged down by thoughts from the past we are less inclined to see the tremendous potential around us. This hinders are ability to act rapidly and we then will miss our opportunity. If you want to be more successful in life you need to be able to quickly identify opportunities and act on them as fast as possible.
Renew lost relationships– Letting go helps us forgive the past and forgive the person who hurt us in the first place. Once we let go we come to an understanding on why we felt this way and how the person created this in our life. Once you are in control of your emotions and how they affect you it gives you the power to forgive the person and start a new relationship with them. Sometimes what they did was a misunderstanding other times it was legitimate whatever the case it is important to always keep contacts that you find beneficial in life.
So enjoy your New Year’s celebration and start the year with a fresh and outlook on life.


Three arrested in Vietnam, Ireland over UK truck deaths
Irish man faces manslaughter charges, while 2 in Vietnam suspected to be involved in death of 39 people.
Police in Vietnam and Ireland have made three new arrests in the sprawling investigation into the deaths of 39 people found in a refrigerated truck container in southeast England last week.
Two people suspected of organising a people-smuggling operation in Vietnam were arrested in Ha Tinh province following reports from 10 families there of missing relatives, VTV television reported on Friday.
Colonel Nguyen Tien Nam, deputy chief of Ha Tinh provincial police in central Vietnam, was quoted as saying the suspects were directly involved in the case in which people paid smugglers to be taken to the United Kingdom and are now feared to be among the bodies found in the container.
More:
-
UK truck deaths shine spotlight on human trafficking
-
Belgian police find Syrians, Sudanese alive in refrigerated lorry
-
How Vietnam is still a hotbed of people traffickers
Police said the suspects have been organising people smuggling in the area for several years.
The pair were accused of "organising and brokering for other people to go abroad and stay abroad illegally", according to a Ha Tinh police statement.
In Ireland, a 23-year-old man was arrested in connection with the October 23 discovery in an industrial park in Essex, east of London.
Essex police in Britain, who issued the European Arrest Warrant on which he was arrested, started extradition proceedings to bring Eamon Harrison, of Mayobridge in Northern Ireland, to the UK to face charges of manslaughter.
A spokesman for the Dublin High Court said Harrison appeared in court on Friday. He was ordered to be held until a hearing on November 11.
Vietnamese victims
The bodies of the victims were found in a refrigerated trailer on October 23 in Essex after the container arrived from Zeebrugge in Belgium.
British police said on Friday they now believe all 39 people were from Vietnam.
"At this time, we believe the victims are Vietnamese nationals, and we are in contact with the Vietnamese government," Essex police Assistant Chief Constable Tim Smith said in a statement.
"We are in direct contact with a number of families in Vietnam and the UK, and we believe we have identified families for some of the victims," he added.
Police initially said the victims were from China, but the focus shifted to Vietnam when families there reported that they had not heard from loved ones who were in transit at the time.
DNA samples have been taken from relatives in central Vietnam to help with the complex process of confirming the victims, but so far none of the dead have been officially identified.
The 25-year-old driver of the truck, Maurice Robinson from Northern Ireland, has been charged with 39 counts of manslaughter.
British police on Friday asked two other suspects, brothers Ronan and Christopher Hughes, to turn themselves in.


Methods are called on the jmpress object like such:
$(selector).jmpress( 'methodName', param1, param2, paramN );
Move to the first step matching the given selector.
Same as select( selector )
Select the next step in flow
Select the previous step in flow
Select the first step in DOM
Select the last step in DOM
Initializes jmpress with the default config (like impress.js).
Initializes jmpress with a custom config object.
Deinits jmpress, returning to it's original state. If already deinited it does nothing. This is useful for enabling a print mode.
Returns the settings object which you can modify.
Adds or modify a template. If it's already defined then the old template is extended with the new properties.
Applies the template to all selected steps.
Applies the template directly by template data object.
Applies template data to an array of selected items.
Returns the active step as jQuery object.
fire a event
returns the canvas element as jQuery object
sets styles on the canvas element and returns it
Applies css with the correct browser prefix.
reapplies styles on step, should be called after modifying stepData
Return or modify the default settings used in jmpress.js.
Register a new callback.
Returns the engine.
Returns the dataset of an element.


Estudiantes marks roaring return to stadium with flaming lion
Argentinian football club Estudiantes de La Plata inaugurated their redeveloped Jorge Luis Hirschi Stadium in the most eye-catching fashion on Friday.
The Buenos Aires club arranged for a hologram of a flaming lion to prowl the roof of the venue for their Argentina Superliga game against Club Atletico Talleres.
Estudiantes last played at the stadium in August 2005, before it was closed due to safety concerns.


A Maven Archetype
that makes it super easy for a Java developer to get started with
Funcatron.
To use the archetype:
mvn archetype:generate \
-DarchetypeGroupId=funcatron \
-DarchetypeArtifactId=starter \
-DarchetypeVersion=0.2.1 \
-DgroupId=my.stellar \
-DartifactId=thang \
-DarchetypeRepository=https://clojars.org/repo
To run the Funcatron dev server:
docker run -ti --rm -e TRON_1=--devmode -p 3000:3000 -p 54657:54657 funcatron/tron:v0.2.1
To run your project code:
mvn compile exec:java
Then point your browser to http://localhost:3000/api/sample
Please see CONTRIBUTING for details on
how to make a contribution.
Funcatron is licensed under an Apache 2 license.
Support is available from the project's founder,
.


Compiled Sequential Importance Sampling¶
Compiled sequential importance sampling [1], or inference compilation, is a technique to amortize the computational cost of inference by learning a proposal distribution for importance sampling.
The proposal distribution is learned to minimise the KL divergence between the model and the guide, \(\rm{KL}\!\left( p({\bf z} | {\bf x}) \lVert q_{\phi, x}({\bf z}) \right)\). This differs from variational inference, which would minimise \(\rm{KL}\!\left( q_{\phi, x}({\bf z}) \lVert p({\bf z} | {\bf x}) \right)\). Using this loss encourages the approximate proposal distribution to be broader than the true posterior (mass covering), whereas variational inference typically learns a narrower approximation (mode seeking). Guides for importance sampling are usually desired to have heavier tails than the model (see this stackexchange question). Therefore, the inference compilation loss is usually more suited to compiling a guide for importance sampling.
Another benefit of CSIS is that, unlike many types of variational inference, it has no requirement that the model is differentiable. This allows it to be used for inference on arbitrarily complex programs (e.g. a Captcha renderer [1]).
This example shows CSIS being used to speed up inference on a simple problem with a known analytic solution.
[1]:
import torch
import torch.nn as nn
import torch.functional as F
import pyro
import pyro.distributions as dist
import pyro.infer
import pyro.optim
import os
smoke_test = ('CI' in os.environ)
n_steps = 2 if smoke_test else 2000
Specify the model:¶
The model is specified in the same way as any Pyro model, except that a keyword argument, observations
, must be used to input a dictionary with each observation as a key. Since inference compilation involves learning to perform inference for any observed values, it is not important what the values in the dictionary are. 0
is used here.
[2]:
def model(prior_mean, observations={"x1": 0, "x2": 0}):
x = pyro.sample("z", dist.Normal(prior_mean, torch.tensor(5**0.5)))
y1 = pyro.sample("x1", dist.Normal(x, torch.tensor(2**0.5)), obs=observations["x1"])
y2 = pyro.sample("x2", dist.Normal(x, torch.tensor(2**0.5)), obs=observations["x2"])
return x
And the guide:¶
The guide will be trained (a.k.a. compiled) to use the observed values to make proposal distributions for each unconditioned sample
statement. In the paper [1], a neural network architecture is automatically generated for any model. However, for the implementation in Pyro the user must specify a task-specific guide program structure. As with any Pyro guide function, this should have the same call signature as the model. It must also encounter the same unobserved sample
statements as the
model. So that the guide program can be trained to make good proposal distributions, the distributions at sample
statements should depend on the values in observations
. In this example, a feed-forward neural network is used to map the observations to a proposal distribution for the latent variable.
pyro.module
is called when the guide function is run so that the guide parameters can be found by the optimiser during training.
[3]:
class Guide(nn.Module):
def __init__(self):
super().__init__()
self.neural_net = nn.Sequential(
nn.Linear(2, 10),
nn.ReLU(),
nn.Linear(10, 20),
nn.ReLU(),
nn.Linear(20, 10),
nn.ReLU(),
nn.Linear(10, 5),
nn.ReLU(),
nn.Linear(5, 2))
def forward(self, prior_mean, observations={"x1": 0, "x2": 0}):
pyro.module("guide", self)
x1 = observations["x1"]
x2 = observations["x2"]
v = torch.cat((x1.view(1, 1), x2.view(1, 1)), 1)
v = self.neural_net(v)
mean = v[0, 0]
std = v[0, 1].exp()
pyro.sample("z", dist.Normal(mean, std))
guide = Guide()
Now create a CSIS
instance:¶
The object is initialised with the model; the guide; a PyTorch optimiser for training the guide; and the number of importance-weighted samples to draw when performing inference. The guide will be optimised for a particular value of the model/guide argument, prior_mean
, so we use the value set here throughout training and inference.
[4]:
optimiser = pyro.optim.Adam({'lr': 1e-3})
csis = pyro.infer.CSIS(model, guide, optimiser, num_inference_samples=50)
prior_mean = torch.tensor(1.)
Now we ‘compile’ the instance to perform inference on this model:¶
The arguments given to csis.step
are passed to the model and guide when they are run to evaluate the loss.
[5]:
for step in range(n_steps):
csis.step(prior_mean)
And now perform inference by importance sampling:¶
The compiled guide program should now be able to propose a distribution for z
that approximates the posterior, \(p(z | x_1, x_2)\), for any \(x_1, x_2\). The same prior_mean
is entered again, as well as the observed values inside observations
.
[6]:
posterior = csis.run(prior_mean,
observations={"x1": torch.tensor(8.),
"x2": torch.tensor(9.)})
marginal = pyro.infer.EmpiricalMarginal(posterior, "z")
We now plot the results and compare with importance sampling:¶
We observe \(x_1 = 8\) and \(x_2 = 9\). Inference is performed by taking 50 samples using CSIS, and 50 using importance sampling from the prior. We then plot the resulting approximations to the posterior distributions, along with the analytic posterior.
[7]:
import numpy as np
import scipy.stats
import matplotlib.pyplot as plt
with torch.no_grad():
# Draw samples from empirical marginal for plotting
csis_samples = torch.stack([marginal() for _ in range(1000)])
# Calculate empirical marginal with importance sampling
is_posterior = pyro.infer.Importance(model, num_samples=50).run(
prior_mean, observations={"x1": torch.tensor(8.),
"x2": torch.tensor(9.)})
is_marginal = pyro.infer.EmpiricalMarginal(is_posterior, "z")
is_samples = torch.stack([is_marginal() for _ in range(1000)])
# Calculate true prior and posterior over z
true_posterior_z = torch.arange(-10, 10, 0.05)
true_posterior_p = dist.Normal(7.25, (5/6)**0.5).log_prob(true_posterior_z).exp()
prior_z = true_posterior_z
prior_p = dist.Normal(1., 5**0.5).log_prob(true_posterior_z).exp()
plt.rcParams['figure.figsize'] = [30, 15]
plt.rcParams.update({'font.size': 30})
fig, ax = plt.subplots()
plt.plot(prior_z, prior_p, 'k--', label='Prior')
plt.plot(true_posterior_z, true_posterior_p, color='k', label='Analytic Posterior')
plt.hist(csis_samples.numpy(), range=(-10, 10), bins=100, color='r', density=1,
label="Inference Compilation")
plt.hist(is_samples.numpy(), range=(-10, 10), bins=100, color='b', density=1,
label="Importance Sampling")
plt.xlim(-8, 10)
plt.ylim(0, 5)
plt.xlabel("z")
plt.ylabel("Estimated Posterior Probability Density")
plt.legend()
plt.show()
Using \(x_1 = 8\) and \(x_2 = 9\) gives a posterior far from the prior, and so using the prior as a guide for importance sampling is inefficient, giving a very small effective sample size. By first learning a suitable guide function, CSIS has a proposal distribution much more closely matched to the true posterior. This allows samples to be drawn with far better coverage of the true posterior, and greater effective sample size, as shown in the graph above.
For other examples of inference compilation, see [1] or https://github.com/probprog/anglican-infcomp-examples.
References¶
[1] Inference compilation and universal probabilistic programming
, Tuan Anh Le, Atilim Gunes Baydin, and Frank Wood


GEEKYMAYUR
Themes
Default
Cerulean
Cosmo
Cyborg
Darkly
Flatly
Journal
Litera
Lumen
Lux
Materia
Minty
Pulse
Sandstone
Simplex
Sketchy
Slate
Solar
Spacelab
Superhero
United
Yeti
Help
Blog
United
Open in JSFiddle
bootstrap.min.css
bootstrap.css
_variables.scss
_bootswatch.scss
Bootstrap Full Component
In this Page we have added some bootstrap
component theme and all collections of component.


Using https://api.publicapis.org back-end
Selection: {{selection}}
Selection: {{selection2}}
With custom item template
{{item.label}}
{{item.entry.Category}}
Selection: {{selection2}}
With max length
Selection: {{selection2}}
Label-up
Focus
Selection: {{selection2}}


Message
No character encoding was specified
Explanation
The XML document doesn't declare a character encoding. According to the standard it will be treated as UTF-8, but this may not be correct.
Solution
If the document uses something other than UTF-8, you must add an explicit declaration as the very first line of the document:
<?xml version="1.0" encoding="encoding-name"?>
where encoding-name is windows-1252, iso-8859-1, or whichever encoding the document is written with. If this is a perfectly valid UTF-8 document, adding the declaration avoids ambiguity.
If you are not sure what encoding your tooling uses, following the instructions in the Survivial Guide to i18n
Not clear? Disagree?
You might be able to find help in one of these fine resources.


This is the EQCSS REPL.
Begin editing this code and watch the changes happen live in the preview pane…


Shopping List
Map
Add Item
Add
Categories
Choose your store
{% for store in stores %}
{{ store }}
{% endfor %}
Materialize Select
The below item(s) were not found.


I am a freelance Software Engineer with experience in design and web development for small businesses. My degree in Computer Engineering makes me adept at both Computer Science as well as Electrical Engineering. I am fueled by my passion for technology and using it to solve problems. I consider myself a ‘forever student,’ eager to both build on my academic foundations of Computer Engineering and stay in tune with the latest technology through continued coursework and professional development. My hunger for knowledge and determination to turn my skills into actions has led me to become a freelance Software Engineer and create my own web development business. Meanwhile, improving productivity by ensuring a healthy work-life balance and focusing on health and fitness which I live out through my interests in jiu-jitsu, Muay Thai, meditation, and yoga.
I am currently working as a freelance Software Engineer and am always looking for a challenge. Reach out to<EMAIL_ADDRESS>Freelance web development business I co-created that specialized in making websites for local businesses. Worked with customers to create a product they wanted and helped educate them about the process. Provided swift and affordable deployment. Rented servers to be able to host the websites. The main software engineering methodologies used were a combination of pair and extreme programming
Use Drupal to manage official San Francisco State University websites, Student Outreach Services (SOS), Guardian Scholars Program (GSP) and the Educational Opportunity Program (EOP). Followed the ‘Coded Memoranda AA-2013-03’ guidelines to ensure all aspects of the website are accessible
Promoted from Technical Specialist to Technical Expert in less than a year by exceeding all technical expectations and working with the team to be able to adapt and make new strategies to handle any issues that came up.
Apple Certified iOS Technician (ACiT) certification is for technicians who work at or want to work at Apple-authorized service facilities. This certification verifies that you understand operational safety and have the skills to repair and troubleshoot iOS devices.
Passionate and knowledgable about the whole software production and maintance process.
Full-stack developer with experience in enterprise environments. Clients include San Francisco State offices. (Student Outreach Services, Educational Opportunity Program, and Guardian Scholars Program.
Certified in Apple Hardware repair as well as troubleshooting. Experience with servers and data networking.
Knowledge of full software development lifecycle including best practices of Sofware Engineering teamwork and Software Engineering processes such as Agile/SCRUM and User-Centered Design for providing a good user experience
An advocate of personal health, whether it be mental or physical health. Passionate about meditation as well as nutrition and exercising.
Native Spanish and English speaker as well as novice in French.


Hello, Code School!
- How to code...
- Complete all the JS classes
- Complete all the Python classes
- Complete all the SQL classess
- Understanding Frameworks
- Learn JQuery
- Learn Node.js
- Learn React
- Understanding deeper computer networking items
- How to make phone apps
- Being able to talk code with my family


Car
Truck
Apple
Banana
Turtle
Africa
United States of America
Information about our products
Car
Truck
Apple
Banana
Turtle
Africa
United States of America
Information about our products
Car
Truck
Apple
Banana
Turtle
Africa
United States of America
Information about our products
Car
Truck
Apple
Banana
Turtle
Africa
United States of America
Information about our products
Car
Truck
Apple
Banana
Turtle
Africa
United States of America
Information about our products
Select a value
Car
Truck
Apple
Banana
Turtle
Africa
United States of America
Information about our products


Welcome to our online learning community!
Sign Up Today!
Steps:
Select the Course of your choose.
Make an online payment.
Register and login!
Start your online course.
Course List
Mathematics
English Language
Principles of Business
Office Procedures
Level
CXC
Common Entrance
Sign Up


{{vm.wf_instrument_inspection.instrument.manufacturedDate | date:'fullDate' }}
{{vm.wf_instrument_inspection.instrument.purchasedDate | date:'fullDate' }}


§268-2 "Hawaii State Ferries" name authorized. The department of transportation may operate its ferry system under the name "Hawaii State Ferries". [L 1963, c 186, §2; Supp, §114-2; HRS §268-2]


“Audio is the new trend now” – BBNaija Nina Ivy
by Damilola IsmailBBNaija reality star, Nina Ivy has thrown a jab at other celebrities revealing that “Audio” is the new trend.
Nina Ivy is indirectly throwing these jabs at some celebrities, many suspect are Mercy and Tacha but we are unable to point out which of them she feels has joined the new “Audio” trend.
“Audio” is slang now used to describe fake or lies, any deceitful act aimed at chasing clouts.
She wrote on her social media page;
Audio is the new trend now …..😋😋
https://twitter.com/ninaivy_/status/1197438076164956161
Here are some reactions to the post from some of her followers;
They are so desperate 😂 – @AssistantEbukaa
Audio Moët abi 😂😂😂😂? I love you Nina 😩😩 – @lovefortacha
😂😂 Nina did not mention any bodies name o,but trust sub owners to gather here in 1,2,3 🚶♀🚶♀ – @wumsylopez
Why are you doing this to messy now. Thought you two are friends.  I think the problem is with tacha stans because I don’t know why they will catch a sub meant for your owerri sister – @Nonsoikechukwu1
Abeg park well u be old cargo….u just want to trend….upon all the sugar daddies wey u dey follow upandan, none don marry u up till now….maybe u should go let Regina Daniels teach u work 😂 – @charityjoshua1
Follow us on Facebook – @Lailasnews; Twitter – @LailaIjeoma for updates


// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
import "./Timer.sol";
/**
* @title Base class that provides time overrides, but only if being run in test mode.
*/
abstract contract Testable {
// If the contract is being run in production, then `timerAddress` will be the 0x0 address.
// Note: this variable should be set on construction and never modified.
address public timerAddress;
/**
* @notice Constructs the Testable contract. Called by child contracts.
* @param _timerAddress Contract that stores the current time in a testing environment.
* Must be set to 0x0 for production environments that use live time.
*/
constructor(address _timerAddress) {
timerAddress = _timerAddress;
}
/**
* @notice Reverts if not running in test mode.
*/
modifier onlyIfTest {
require(timerAddress != address(0x0));
_;
}
/**
* @notice Sets the current time.
* @dev Will revert if not running in test mode.
* @param time timestamp to set current Testable time to.
*/
function setCurrentTime(uint256 time) external onlyIfTest {
Timer(timerAddress).setCurrentTime(time);
}
/**
* @notice Gets the current time. Will return the last time set in `setCurrentTime` if running in test mode.
* Otherwise, it will return the block timestamp.
* @return uint for the current Testable timestamp.
*/
function getCurrentTime() public view returns (uint256) {
Eif (timerAddress != address(0x0)) {
return Timer(timerAddress).getCurrentTime();
} else {
return block.timestamp; // solhint-disable-line not-rely-on-time
}
}
} |


The World Wide Fund for Nature (WWF) is an international organization working on issues regarding the conservation, research and restoration of the environment, formerly named the World Wildlife Fund. WWF was founded in 1961.
The Panda has become the symbol of WWF. The well-known panda logo of WWF originated from a panda named Chi Chi that was transferred from the Beijing Zoo to the London Zoo in the same year of the establishment of WWF.
The Panda has become the symbol of WWF. The well-known panda logo of WWF originated from a panda named Chi Chi that was transferred from the Beijing Zoo to the London Zoo in the same year of the establishment of WWF.


About
Lucia Darrow is a Senior Operations Research Analyst with CANA Advisors, where she applies advanced analytics to commercial and government projects. Her specialties include mathematical representation, distillation of complex problems, and understanding user interaction requirements. Her research interests include implementation of analytics solutions and systems resilience.
Lucia is passionate about building community in analytics. She is a Junior Analyst Ambassador with the Military Operations Research Society, a co-organizer of RLadies Vancouver and the Co-Chair of the Vancouver Datajam.
Experience
2017 - present, Senior Operations Research Analyst, CANA Advisors
2016-2017, Graduate Research Assistant, Oregon State University, School of Mechanical, Industrial, and Manufacturing Engineering
2016, Data Analysis Intern, G5 Digital Marketing
2015-2016, Graduate Research Assistant, Oregon State University, School of Mechanical, Industrial, and Manufacturing Engineering
Education
2017, MS Industrial Engineering, Oregon State University
2015, BS Mathematics, Dickinson College
Community
2019 - present, Co-Chair, Vancouver Datajam
2018 - present, Co-Organizer, RLadies Vancouver


We already with us!
{% for i in data %}
email
{{i.email}}
name
{{i.name}}
address
{{i.address}}
name
{{i.name}}
phone
{{i.phone}}
ccn
{{i.ccn}}
{% endfor %}


indic_transliteration.deduplication¶
Some useful functions for converting and disambiguating between common alternative orthographies (ways of writing) the same text.
-
indic_transliteration.deduplication.
get_approx_deduplicating_key
(text, encoding_scheme='devanagari')[source]¶ Given some devanAgarI sanskrit text, this function produces a “key” so that
1] The key should be the same for different observed orthographical forms of the same text. For example:
- "dharmma" vs "dharma" - "rAmaM gacChati" vs "rAma~N gacChati" vs "rAma~N gacChati" - "kurvan eva" vs "kurvanneva"
2] The key should be different for different for different texts.
- “stamba” vs “stambha”
This function attempts to succeed at [1] and [2] almostall the time. Longer the text, probability of failing at [2] decreases, while probability of failing at [1] increases (albeit very slightly).
Sources of orthographically divergent forms:
- Phonetically sensible grammar rules
- Neglect of sandhi while writing
- Punctuation, spaces, avagraha-s.
- Regional-language-influenced mistakes (La instead of la.)
Some example applications of this function:
- Create a database of quotes or words with minimal duplication.
- Search a database of quotes or words while being robust to optional forms.
Also see equivalent function in the scala indic-transliteration package.


4; 12022 H.E.
Good morning! It’s been a while since I posted anything in the random section. I talked briefly in the past about my music tastes and what kind of music I listen to. I must confess, 12021 has been quite rough in some spots, which affected my taste and playlists in somewhat of a major way. What’s the better way to recap it than using the new handy-dandy Spotify wrapped that sums up everything you did on the platform for the entire year. Let’s jump in!
Let’s start with some bare stats. According to the wrap, in total, I spent 11,183 minutes (≈186 hours) listening, which is more than 60% of other listeners in United States. Pretty cool stat, I feel this is the right number. I also spent an absurd amount of time looping songs on youtube, but that’s not tracked.
Going next to my top song! It’s NIGHT RUNNING by Shin Sakiura and AAAMYYY. They say it looped 79 times, which seems to be a rather low number, but that’s okay. It has a kick. I watched BNA with my sister and absolutely loved it. So the ending song became my go-to programming jam. I’ll have spotify embeds sprinkled around this page.
Besides the very top one, what other songs have I had on repeat that crawled themselves to my top songs list?
Coming in second, Vitality by Mittsies. Loved Helltaker and the main soundtrack would just blast in my apartment for an entire week non-stop, even when I wasn’t home. There is just something about sharply-dressed demon girls and a top-down 2D puzzle game with amazing character design. The game is actually free! It was so good, I bought the pancake recipe to support vanripper for the game he made.
Moving in and out is always a bit of a stressful and lonely experience. I remember I had to move into a new apartment and I was just by myself after spending some quality time with my family. Loving Evangelion and everything associated with it, I would play Misato theme by Shiro Sagisu. It made me feel less lonely and more upbeat, instantly cozying up the atmosphere. I was at home.
Well, what can I say about playing Fly Me To the Moon, the Evangelion version? I actually prefer it to Frank Sinatra’s version, simply because, like man, anime music just hits different. This one has such a calming and a warm hug kind of a feeling. It’s something that’s just history now.
Last but not least. What A Life by Scarlet Pleasure. If you haven’t seen Another Round with Mads Mikkelsen, well, highly highly recommend it. I’ve always had a beef with American movies in how over-the-top they go or simply tend to trivialize many topics. Comedies feel tragic and tragedies feel comedic. It shouldn’t feel like that. Largely, European cinematography has more subtlety to their soul and it feels. Carefully treading the themes of alcoholism and being alive. The song is an absolute banger and I rarely say that about anything.
Other honorable mentions that go right after the top 5 are: Sorairo Days by Shoko Nagawa (Gurren Lagann), Komm, süsser Tod (Evangelion), ambiguous (Kill la Kill), Ready To (BNA), Fly Away by TeddyLoid (Panty & Stocking with Garterbelt), and more! You can see the whole top playlist below
Let’s do a vibe check on my music taste. What kind of an aura do I have? It’s dramatic and considerate. Well said, I like the colors
What about genres? The stats say I listened to 32 different genres this year and my top genres are
Anime
Classical piano
Cool jazz
Bossa nova
Icelandic indie
nice
In addition, I listened to 404 (insert a NOT FOUND
jape here) different artists. Due to my sheer obsession with Neon Genesis Evangelion
, my top artist was Shiro Sagisu. I’m in his top 3% of listeners this year ¯\_(ツ)_/¯
Finally, here is a quick breakdown of my spotify wrapped
Thanks for reading! See you next time ◼