Sets the geocoder to bias search results as if they were sent from the domain specified by the given
country code top-level domain (ccTLD). Geocoding
is only supported for those countries in which Google Maps itself supports
geocoding. Most ccTLD codes are identical to ISO 3166-1 codes, with some notable exceptions.
For example, Great Britain's ccTLD is "uk" ( Note that the default domain is the domain from which you initially load the Maps API. Country codes are case insensitive. (Since 2.82) |
getBaseCountryCode()
|
String |
Returns the current country code in use by the given geocoder. (If no country code is in effect, this method returns null .)
(Since 2.82) |
reset()
|
None |
Resets the geocoder. In particular this method calls the
GGeocodeCache.reset() method on the client-side cache, if one is
used by this geocoder.
(Since 2.55) |
This class is used to obtain driving directions results and display them on a map and/or a text panel.
| Constructor | Description |
|---|---|
GDirections(map?:GMap2,
panel?:Element)
|
Creates a new instance of a directions object to request and store
direction results. This directions object can then create directions
given a query using the GDirections.load() method.The constructor takes an optional map object (to display a polyline of the computed directions) and/or a panel DIV element (to display textual direction results. If passed a map argument, whenever a
new directions result is computed, the polyline and markers associated with the
result are automatically added as overlays on the map. Similarly,
when passed a panel argument, the textual directions
associated with the result are added to the indicated DIV, replacing any existing
content in the DIV.If either of these arguments is null, the associated elements are not retrieved unless explicitly requested in the GDirections.load()
method. (See below.)
(Since 2.81) |
| Method | Return Value | Description |
|---|---|---|
load(query:String,
queryOpts?:GDirectionsOptions)
|
None |
This method issues a new directions query. The query parameter is
a string containing any valid directions query, e.g.
"from: Seattle to: San Francisco" or
"from: Toronto to: Ottawa to: New York".
By default, if a map was specified during construction of the
GDirections object, the query will request a polyline result.
Similarly, if a text panel was specified, the query will request detailed
textual results. Otherwise, the result will contain only summary information about
routes found.In order to override this behavior (e.g. to request polyline information even when no map was attached to this object), callers can use the queryOpts optional parameter. See the documentation for
GDirectionsOptions for details.
When directions results are received, this object clears old results,
replacing them with new ones and updating the map and/or panel with new
results. Directions results consist of multiple routes (objects of type
If a previous (Since 2.81) |
loadFromWaypoints(waypoints:Array,
queryOpts?:GDirectionsOptions)
|
None |
Issues a new directions query using an array of waypoints as input
instead of a single query string. This array may contain a maximum
of 25 waypoint entries. Each entry in the array is a
string representing an input address or a lat,lng point. See
GDirections.load() for more details on the behavior
of this method.
(Since 2.81) |
clear()
|
None |
Clears any existing directions results, removes overlays from the
map and panel, and cancels any pending load() requests.
(Since 2.81) |
getStatus()
|
Object |
Returns the status of the directions request. The returned object
has the following form: { code: 200 request: "directions" } The status code can take any of the values defined in GGeoStatusCode .
(Since 2.81) |
getBounds()
|
GLatLngBounds |
This method is used to get the bounding box for the result of this
directions query. Returns a GLatLngBounds object or null if no
successful result is available.
(Since 2.81) |
getNumRoutes()
|
Number |
Returns the number of routes available in the result. For a
successful query, this should be the total number of input
waypoints minus 1. When no results are available (either because
no query was issued or because the previous query was unsuccessful),
this method returns 0.
(Since 2.81) |
getRoute(i:Number)
|
GRoute |
Return the GRoute object for the ith route in the response.
(Since 2.81) |
getNumGeocodes()
|
Number |
Returns the number of geocoded entries available in the result. For a
successful query, this should be equal to the total number of input
waypoints. When no results are available (either because
no query was issued or because the previous query was unsuccessful),
this method returns 0.
(Since 2.81) |
getGeocode(i:Number)
|
Object |
Return the geocoded result for the ith waypoint. The structure of this
object is identical to that of a single placemark in a response from
the GClientGeocoder object.
(Since 2.81) |
getCopyrightsHtml()
|
String |
Returns an HTML string containing the copyright information for this
result.
(Since 2.81) |
getSummaryHtml()
|
String |
Returns an HTML snippet containing a summary of the distance and
time for this entire directions request. Note that this summary is
the only information returned to a GDirections object
constructed without an associated map or DIV element.
(Since 2.81) |
getDistance()
|
Object |
Returns an object literal representing the total distance of the
directions request (across all routes). The object contains two
fields: a number called "meters" indicating the numeric value of the
distance (in meters), and a string called "html" containing a
localized string representation of the distance in the
units that are predominant in the starting country of this
set of directions.
(Since 2.81) |
getDuration()
|
Object |
Returns an object literal representing the total time of the
directions request (across all routes). The object contains two
fields: a number called "seconds" indicating the numeric value of
the time (in seconds), and a string called "html" containing a
localized string representation of the time.
(Since 2.81) |
getPolyline()
|
GPolyline |
Returns the GPolyline object associated with the entire directions
response. Note that there is a single polyline that represents all
the routes in the response. This object will be defined only after
the directions results have been loaded (i.e. the "load" event has
been triggered).
(Since 2.81) |
getMarker(i:Number)
|
GMarker |
Return the marker associated with the ith geocode. This method will
return a non-null value only after the directions results have been
loaded (i.e. the "load" event has been triggered).
(Since 2.81) |
| Event | Description |
|---|---|
load()
|
This event is triggered when the results of a directions query issued
via GDirections.load() are available. Note that the
load() method initiates a new query, which in turn
triggers a "load" event once the query has finished loading. The "load"
event is triggered before any overlay elements are added to the map/panel.
(Since 2.81) |
addoverlay()
|
This event is triggered after the polyline and/or textual directions
components are added to the map and/or DIV elements. Note that the
"addoverlay" event is not triggered if neither of these elements are
attached to a GDirections object. This event is fired after
the polyline and/or textual directions components are added to hte map
and/or DIV elements.
(Since 2.81) |
error()
|
This event is triggered if a directions request results in an error.
Callers can use GDirections.getStatus() to get more
information about the error. When an "error" event occurs, no "load"
or "addoverlay" events will be triggered.
(Since 2.81) |
This class represents optional arguments to the
GDirections.load()
and
GDirections.loadFromWaypoints()
methods. It has no
constructor, but is instantiated as an object literal.
| Property | Type | Description |
|---|---|---|
locale
|
String |
The locale to use for the directions result. For example, "en_US", "fr", "fr_CA", etc. |
travelMode
|
GTravelModes |
The mode of travel, such as driving (default) or walking. Note that
if you specify walking directions, you will need to specify a
<div> panel to hold a warning notice to users.(Since 2.129) |
avoidHighways
|
Boolean |
If true directions will attempt to exclude highways
when computing directions. Note that directions may still include
highways if there are no viable alternatives.(Since 2.124) |
getPolyline
|
Boolean |
By default, the GDirections.load*() methods
fetch polyline data only if a map is attached to the
GDirections object. This field can be used to override
this behavior and retrieve polyline data even when a map is not attached
to the Directions object. |
getSteps
|
Boolean |
By default, the GDirections.load*() methods
fetch steps data only if a panel is attached to the
GDirections object. This field can be used to override
this behavior and retrieve steps data even when a panel is not attached
to the Directions object. |
preserveViewport
|
Boolean |
By default, when a Directions object has a map, the map is
centered and zoomed to the bounding box of the directions result.
When this option is set to true , the viewport is left alone for this
request (unless it was never set in the first place). |
This function provides a convenient way to
asynchronously retrieve a resource identified by a URL. Notice that,
since the XmlHttpRequest object is used to execute the request, it
is subject to the same-origin restriction of cross-site scripting,
i.e. the URL must refer to the same server as the URL of the current
document that executes this code. Therefore, it is usually redundant
to use an absolute URL for the url
argument, and it is
better to use an absolute or relative path only.
It is the caller's responsibility to handle any exceptions that may be
thrown, such as security errors.
| Method | Return Value | Description |
|---|---|---|
GDownloadUrl(url:String,
onload:Function,
postBody?:String,
postContentType?:String)
|
None |
Retrieves the resource from the given URL and calls the
onload function with the text of the document as
first argument, and the HTTP response status code as the
second. If the request times out, the onload function may be
called instead with null as the first argument and -1 as the
second. This function defaults to sending an HTTP GET request.
To send an HTTP POST request instead, pass data within the
optional postBody argument. If the data being sent
is not of type "application/x-www-form-urlencoded," pass the
content type as a string in the postContentType
argument. This method is subject to cross-site scripting
restrictions. Note that this method uses the underlying
XmlHttpRequest implementation of the browser. |
This class refines the basic GGeocodeCache
class by
placing stricter conditions on cached replies. It only caches replies
which are very unlikely to change within a short period of time.
| Constructor | Description |
|---|---|
GFactualGeocodeCache()
|
Creates a new cache that stores only replies it considers factual.
(Since 2.55) |
| Method | Return Value | Description |
|---|---|---|
isCachable(reply:Object)
|
Boolean |
Overrides the default implementation of this method to perform
a more thorough check of the status code. Only a reply with
Status.code set to G_GEO_SUCCESS , or known
to be invalid, is considered cachable. Replies that timed out
or resulted in a generic server error are not cached.
(Since 2.55) |
There are no symbolic constants defined for this enumeration.
| Constant | Description |
|---|---|
0
|
Unknown location.
(Since 2.59) |
1
|
Country level accuracy.
(Since 2.59) |
2
|
Region (state, province, prefecture, etc.) level accuracy.
(Since 2.59) |
3
|
Sub-region (county, municipality, etc.) level accuracy.
(Since 2.59) |
4
|
Town (city, village) level accuracy.
(Since 2.59) |
5
|
Post code (zip code) level accuracy.
(Since 2.59) |
6
|
Street level accuracy.
(Since 2.59) |
7
|
Intersection level accuracy.
(Since 2.59) |
8
|
Address level accuracy.
(Since 2.59) |
9
|
Premise (building name, property name, shopping center, etc.) level accuracy.
(Since 2.105) |
Numeric equivalents for each symbolic constant are specified next to the equal sign.
| Constant | Description |
|---|---|
G_GEO_SUCCESS |
No errors occurred; the address was successfully parsed and its
geocode has been returned.
(Since 2.55) |
G_GEO_BAD_REQUEST |
A directions request could not be successfully parsed.
For example, the request may have been rejected if it
contained more than the maximum number of waypoints allowed.
(Since 2.81) |
G_GEO_SERVER_ERROR |
A geocoding, directions or maximum zoom level request could not be
successfully processed, yet the exact reason for the failure is not
known.
(Since 2.55) |
G_GEO_MISSING_QUERY |
The HTTP q parameter was either missing or had no value.
For geocoding requests, this means that an empty address was specified
as input. For directions requests, this means that no query was
specified in the input.
(Since 2.81) |
G_GEO_MISSING_ADDRESS |
Synonym for G_GEO_MISSING_QUERY.
(Since 2.55) |
G_GEO_UNKNOWN_ADDRESS |
No corresponding geographic location could be found for the
specified address. This may be due to the fact that the address
is relatively new, or it may be incorrect.
(Since 2.55) |
G_GEO_UNAVAILABLE_ADDRESS |
The geocode for the given address or the route for the given directions
query cannot be returned due to legal or contractual reasons.
(Since 2.55) |
G_GEO_UNKNOWN_DIRECTIONS |
The GDirections object could not compute directions between the points
mentioned in the query. This is usually because there is no route
available between the two points, or because we do not have data for
routing in that region.
(Since 2.81) |
G_GEO_BAD_KEY |
The given key is either invalid or does not match the domain
for which it was given.
(Since 2.55) |
G_GEO_TOO_MANY_QUERIES |
The given key has gone over the requests limit in the 24 hour period
or has submitted too many requests in too short a period of time.
If you're sending multiple requests in parallel or in a tight loop,
use a timer or pause in your code to make sure you don't send the
requests too quickly.
(Since 2.55) |
A GGeoXml
object add geographic content to the map
from an XML file (such as a KML file) that is hosted on a publicly accessible
web server. It implements the GOverlay
interface and thus is
added to the map using the GMap2.addOverlay()
method.
| Constructor | Description |
|---|---|
GGeoXml(urlOfXml:String)
|
Creates a GOverlay that represents that XML
file.
(Since 2.108) |
| Method | Return Value | Description |
|---|---|---|
getTileLayerOverlay()
|
GTileLayerOverlay |
GGeoXml objects may create a tile overlay for
optimization purposes in certain cases. This method returns this
tile layer overlay (if available). Note that the tile overlay
may be null if not needed, or if the
GGeoXml file has not yet finished loading.(Deprecated since 2.141) |
getDefaultCenter()
|
GLatLng |
Returns the center of the default viewport as a lat/lng. This
function should only be called after the file has been loaded.
(Since 2.84) |
getDefaultSpan()
|
GLatLng |
Returns the span of the default viewport as a lat/lng. This
function should only be called after the file has been loaded.
(Since 2.84) |
getDefaultBounds()
|
GLatLngBounds |
Returns the bounding box of the default viewport. This
function should only be called after the file has been loaded.
(Since 2.84) |
gotoDefaultViewport(map:GMap2)
|
None |
Sets the map's viewport to the default viewport of the
XML file.
(Since 2.84) |
hasLoaded()
|
Boolean |
Checks to see if the XML file has finished loading, in which
case it returns true . If the XML file has not
finished loading, this method returns false .
(Since 2.84) |
hide()
|
None |
Hides the child overlays created by the GGeoXml
object if the overlay is both currently visible and the
overlay's supportsHide() method returns true. Note
that this method will trigger the respective
visibilitychanged event for each child overlay that
fires that event (e.g. GMarker.visibilitychanged ,
GGroundOverlay.visibilitychanged , etc.). If no
overlays are currently visible that return
supportsHide() as true, this method has no effect.
(Since 2.87) |
isHidden()
|
Boolean |
Returns true if and only if the GGeoXml
object is currently hidden, as changed by the
GGeoXml.hide() method.(Since 2.87) |
loadedCorrectly()
|
Boolean |
Checks to see if the XML file has loaded correctly, in which case
it returns true . If the XML file has not loaded
correctly, this method returns false . If the XML file
has not finished loading, this method's return value is undefined.
(Deprecated since 2.146) |
show()
|
None |
Shows the child overlays created by the GGeoXml
object, if they are currently hidden. Note that this method will
trigger the respective visibilitychanged event for
each child overlay that fires that event
(e.g. GMarker.visibilitychanged ,
GGroundOverlay.visibilitychanged ).
(Since 2.87) |
supportsHide()
|
Boolean |
Always returns true .(Since 2.87) |
| Event | Description |
|---|---|
load()
|
This event is fired when either the GGeoXml 's XML file has
completely loaded and all associated overlays have been displayed on the map, or
if the XML file did not load correctly.(Since 2.108) |
This class maintains a map from addresses to known locations. While this class is fully functional, it is intended as a base class from which more sophisticated caches are derived.
| Constructor | Description |
|---|---|
GGeocodeCache()
|
Creates a new cache for storing a map from addresses to locations.
The constructor immediately calls the GGeocodeCache.reset
method.
(Since 2.55) |
| Method | Return Value | Description |
|---|---|---|
get(address:String)
|
Object |
Returns the reply which was stored under the given
address . If no reply was ever stored for the given
address, this method returns null .
(Since 2.55) |
isCachable(reply:Object)
|
Boolean |
Returns whether or not the given reply should be cached. By
default very rudimentary checks are performed on the
reply object. In particular, this class makes
sure that the object is not null and that it has
the name field . This method may be overridden by
extending classes to provide more precise conditions on the
reply object.
(Since 2.55) |
put(address:String,
reply:Object)
|
None |
Stores the given reply under the
given address . This method calls the
GGeocodeCache.isCachable method to verify that
the reply may be cached. If it gets a go-ahead, it
caches the reply under the address normalized with
the help of the GGeocodeCache.toCanoninical method.
(Since 2.55) |
reset()
|
None |
Purges all replies from the cache. After this method returns,
the cache is empty.
(Since 2.55) |
toCanonical(address:String)
|
String |
Returns what is considered a canonical version of the address.
It converts the address parameter to lower case,
replaces commas with spaces and replaces multiple spaces with
one space.
(Since 2.55) |
The GGoogleBar
provides local search capabilities
within Maps API applications, allowing users to search locations for local
listings. The GGoogleBar
has no constructor. It is
created by the map and accessed by the GMap2.enableGoogleBar()
method. Note: The GoogleBar is currently not compatible with the Google Earth
plugin, used by map type GMapType.G_SATELLITE_3D_MAP
, and will be
disabled while the Earth plugin is shown.
This class represents options passed within the
adsOptions
parameter to the GGoogleBarOptions
object. It has no constructor, but is instantiated as an object literal.
| Property | Type | Description |
|---|---|---|
client
|
String |
This property specifies the Client ID of your Google AdSense for Search account.
Specifying this parameter allows you to gain revenue from the ads displayed in GoogleBar
search results. (Since 2.149) |
channel
|
String |
This property specifies the channel number of your Google AdSense for
Search account, if you've previously set up such a channel. AdSense channels
allow you to track advertising campaigns and determine which sources provide
revenue. Note that channels are tied to client IDs, so you must also pass
a client parameter if you wish to specify a channel.(Since 2.149) |
adsafe
|
String |
This property specifies the ad "safety" level to use for advertising
results on your GGoogleBar . Ad Safety levels indicate
the level of adult content filtering applied to search results. Four values
are available. 'high' (default) indicates that no adult ads are served.
'medium' indicates that adult-themed ads may be served when the user
specifically requests them (for example, ads for alcohol), but ads
for pornographic content will not be served. 'low' indicates adult-themed
and pornographic ads may be served when the user specifically requests
them. 'off' indicates any ads may be served. Any other values are ignored.(Since 2.149) |
language
|
String |
This property specifies the language in which to serve advertising
results. Languages are specified in BCP 47 language codes (for example 'en'
for English or 'pt-BR' for Brazilian Portugese). (Since 2.149) |
These constants are passed in GGoogleBarOptions
.linkTarget,
and define the default target for links in result info windows.
| Constant | Description |
|---|---|
G_GOOGLEBAR_LINK_TARGET_BLANK
|
Corresponds to target = '_blank'. |
G_GOOGLEBAR_LINK_TARGET_PARENT
|
Corresponds to target = '_parent'. |
G_GOOGLEBAR_LINK_TARGET_SELF
|
Corresponds to target = '_self'. |
G_GOOGLEBAR_LINK_TARGET_TOP
|
Corresponds to target = '_top'. |
These constants restrict the type of results returned by a
local search with the GGoogleBar
. This search behavior is set
within the GGoogleBarOptions.listingTypes
property.
| Constant | Description |
|---|---|
G_GOOGLEBAR_TYPE_BLENDED_RESULTS
|
This constant indicates that searches from the map's
GGoogleBar should return all types of results
(KML, businesses, geocodes, etc).(Since 2.113) |
G_GOOGLEBAR_TYPE_KMLONLY_RESULTS
|
This constant indicates that searches from the map's
GGoogleBar should return only results from
indexed KML/KMZ/GeoRSS files.(Since 2.113) |
G_GOOGLEBAR_TYPE_LOCALONLY_RESULTS
|
This constant indicates that searches from the map's
GGoogleBar should return only business and
geocode results.(Since 2.113) |
This class represents options passed within the
googleBarOptions
parameter to the GMapOptions
object. It has no constructor, but is instantiated as an object literal.
Note that the GGoogleBar
object, like the
GInfoWindow
is not constructed, but is automatically attached
to the map object, and enabled through properties described here.
| Property | Type | Description |
|---|---|---|
showOnLoad
|
Boolean |
This property, when set to true , displays the
GoogleBar text search box (provided the control is enabled and the
map is loaded). By default, the text search box within the control is
hidden and only expanded upon clicking the control's magnifying
glass. Note: when setting the style property to "new",
the GoogleBar text search box is always shown and this property is
ignored.(Since 2.95) |
style
|
String |
This property indicates the style in use by the
GGoogleBar . This property is now deprecated as only
one style exists for the GGoogleBar .(Deprecated since 2.175) |
adsOptions
|
GGoogleBarAdsOptions |
This property indicates the parameters to use for the display of
advertising when using the GGoogleBar . Advertising is
enabled in the GoogleBar by default. Configure these options to
add information on how this advertising should be displayed and
to what AdSense accounts it should be linked (to gain revenue).(Since 2.149) |
linkTarget
|
GGoogleBarLinkTarget |
This property lets you specify the target for links embedded within the search
results of the GoogleBar . The default value,
G_GOOGLEBAR_LINK_TARGET_BLANK , specifies that links will open
within a new window.(Since 2.95) |
listingTypes
|
GGoogleBarListingTypes |
This property specifies the type(s) of search result listings
returned and displayed by the GoogleBar . The default is
G_GOOGLEBAR_TYPE_BLENDED_RESULTS , which specifies that both
KML and local (business listings and prominent features) results may be
returned.(Since 2.113) |
resultList
|
GGoogleBarResultList or Element |
This property lets you specify the style of the search result list for the
GoogleBar , which may be one of the following:
G_GOOGLEBAR_RESULT_LIST_INLINE (default) places the result list in a table
above the search box, G_GOOGLEBAR_RESULT_LIST_SUPPRESS
replaces the list with a set of next/previous buttons, and passing a block-level DOM
Element places the list within a container of your choice (typically
a <div> element).(Since 2.95) |
suppressInitialResultSelection
|
Boolean |
This property suppresses displaying the first result within its own info window
upon completion of a search in the GoogleBar (which is
the default behavior).(Since 2.95) |
suppressZoomToBounds
|
Boolean |
This property suppresses automatic panning and zooming to
the set of results upon completion of a search in the
GoogleBar . (This property suppresses the default
behavior.)(Since 2.95) |
onIdleCallback
|
Function |
This property specifies a callback function to be invoked when the
GoogleBar finishes searching and the search results are dismissed.(Since 2.95) |
onSearchCompleteCallback
|
Function |
This property specifies a callback function to be invoked when the
GoogleBar finishes searching and the search completes.
It is passed the
GlocalSearch object associated
with the search control. This callback function is called before
results are placed on the map or into the results list.(Since 2.95) |
onGenerateMarkerHtmlCallback
|
Function |
This property lets you specify a callback function to be invoked when the
info window for a search result marker is opened. The function should be passed a
GMarker , generated HTML string, and GlocalSearchResult
(in that order) and must return the modified HTML string to be displayed
in the info window.(Since 2.95) |
onMarkersSetCallback
|
Function |
This property lets you specify a callback function to be invoked when the
GGoogleBar completes creation of its markers and places them on the map.
This function must be passed an array of objects of the form
{result: GlocalSearch, marker: GMarker} .(Since 2.95) |
These constants are passed in GGoogleBarOptions.resultList
,
and define how the result list is displayed.
| Constant | Description |
|---|---|
G_GOOGLEBAR_RESULT_LIST_INLINE
|
This corresponds to the default style, where the result list is displayed in tabular form on the map. |
G_GOOGLEBAR_RESULT_LIST_SUPPRESS
|
This corresponds to the default style, where the result list is hidden and replaced with next/previous buttons. |
This class uniquely identifies a user contributed photo in Street View. It has no constructor, but is instantiated as an object literal. All properties are optional.
| Property | Type | Description |
|---|---|---|
repository
|
string |
The repository storing the photo. Currently, only the value
'panoramio' is supported.
(Since 2.182) |
id
|
string |
A string that uniquely identifies the photo given its repository.
For Panoramio, this is the string representation of the panoramio
'photo_id'. See the
panoramio API for information about how to obtain photo IDs
given a lat/long bounding box.
(Since 2.182) |
This class represents the structure of a camera point of view used by street view. It has no constructor, but is instantiated as an object literal. All properties are optional.
| Property | Type | Description |
|---|---|---|
yaw
|
Number |
The camera yaw in degrees relative to true north. True north is
0 degrees, east is 90 degrees, south is 180 degrees, west is 270 degrees.
(Since 2.104) |
pitch
|
Number |
The camera pitch in degrees, relative to the street view vehicle.
Ranges from 90 degrees (directly upwards) to -90 degrees
(directly downwards).
(Since 2.104) |
zoom
|
Number |
The zoom level. Fully zoomed-out is level 0, zooming in increases
the zoom level. (Since 2.104) |
Objects of this class are created by the GDirections object to store information about a single route in a directions result. This class does not have a public constructor. Clients should not directly create objects of this class.
| Method | Return Value | Description |
|---|---|---|
getNumSteps()
|
Number |
Returns the number of steps in this route.
(Since 2.81) |
getStep(i:Number)
|
GStep |
Return the GStep object for the ith step in this route.
(Since 2.81) |
getStartGeocode()
|
Object |
Return the geocode result for the starting point of this route. The
structure of this object is identical to that of a single placemark
in a response from the GClientGeocoder object.
(Since 2.83) |
getEndGeocode()
|
Object |
Return the geocode result for the ending point of this route. The
structure of this object is identical to that of a single placemark
in a response from the GClientGeocoder object.
(Since 2.83) |
getEndLatLng()
|
GLatLng |
Returns a GLatLng object for the last point along the polyline
for this route. Note that this point may be different from the lat,lng
in GRoute.getEndGeocode() because getEndLatLng() always
returns a point that is snapped to the road network. There is no
corresponding getStartLatLng() method because that is identical to
calling GRoute.getStep(0).getLatLng() .
(Since 2.81) |
getSummaryHtml()
|
String |
Returns an HTML snippet containing a summary of the distance and
time for this route.
(Since 2.81) |
getDistance()
|
Object |
Returns an object literal representing the total distance of this
route. See GDirections.getDistance() for the structure of this object.
(Since 2.81) |
getDuration()
|
Object |
Returns an object literal representing the total time of this
route. See GDirections.getDuration() for the structure of this object.
(Since 2.81) |
Objects of this class are created by the GDirections object to store information about a single step within a route in a directions result. This class does not have a public constructor. Clients should not directly create objects of this class.
| Method | Return Value | Description |
|---|---|---|
getLatLng()
|
GLatLng |
Returns a GLatLng object for the first point along the polyline
for this step.
(Since 2.81) |
getPolylineIndex()
|
Number |
Returns the index of the first point along the polyline for this step.
(Since 2.81) |
getDescriptionHtml()
|
String |
Return an HTML string containing the description of this step.
(Since 2.81) |
getDistance()
|
Object |
Returns an object literal representing the total distance of this
step. See GDirections.getDistance() for the structure of this object.
(Since 2.81) |
getDuration()
|
Object |
Returns an object literal representing the total time of this
step. See GDirections.getDuration() for the structure of this object.
(Since 2.81) |
A GStreetviewClient
object performs searches for Street View
data based on parameters that are passed to its methods.
| Constructor | Description |
|---|---|
GStreetviewClient()
|
Creates a new GStreetviewClient
(Since 2.104) |
| Method | Return Value | Description |
|---|---|---|
getNearestPanoramaLatLng(latlng:GLatLng,
callback:Function(GLatLng))
|
None |
Finds the GLatLng of the nearest panorama to a
given point and passes it to the provided callback. If there are
no nearby panoramas, or if a server error occurs, the provided
callback is passed null instead.
(Since 2.104) |
getNearestPanorama(latlng:GLatLng,
callback:Function(GStreetviewData))
|
None |
Retrieves the data for the nearest panorama to a given latlng and
passes it to the provided callback as a
GStreetviewData object.
(Since 2.104) |
getPanoramaById(panoId:string,
callback:Function(GStreetviewData))
|
None |
Retrieves the data for the given panorama id and passes it to
the provided callback as a
GStreetviewData object. Ids are unique
per panorama and stable for the lifetime of a session, but are
liable to change between sessions.
(Since 2.104) |
Numeric equivalents for each symbolic constant are specified next to the equal sign.
| Constant | Description |
|---|---|
SUCCESS |
Success (Since 2.104) |
SERVER_ERROR |
The server is not responding to queries. (Since 2.104) |
NO_NEARBY_PANO |
No panorama data was found. (Since 2.104) |
This class represents the data associated to a panorama. It has no constructor, but is instantiated as an object literal.
| Property | Type | Description |
|---|---|---|
location
|
GStreetviewLocation |
The location data. (Since 2.104) |
copyright
|
String |
A localized copyright attribution. (Since 2.104) |
links
|
GStreetviewLink[] |
Links to neighbouring panoramas, if any. (Since 2.104) |
code
|
GStreetviewClient.ReturnValues |
Status code. See GStreetviewClient.ReturnValues (Since 2.104) |
This class controls which major viewing modes that should be enabled. This class has no constructor but is instantiated as an object literal. All properties are optional.
| Property | Type | Description |
|---|---|---|
streetView
|
Boolean |
The streetView viewing mode shows panoramic
images taken from street level. This is the standard viewing
mode of GStreetviewPanorama .
(Since 2.182) |
userPhotos
|
Boolean |
The userPhotos viewing mode allows viewing of
user generated photos. When both this feature and
the streetView feature is enabled, photos will
automatically appear when available as thumbnails in the top
right corner of the Street View panorama. Photos may also be
displayed programmatically using
the GStreetviewPanorama.setUserPhoto() function.
(Since 2.182) |
This class represents a link from one
GStreetviewLocation
to a neighbouring
GStreetviewLocation
. It has no constructor, but is
instantiated as an object literal.
| Property | Type | Description |
|---|---|---|
yaw
|
Number |
The yaw from the current location to the neighbouring location. (Since 2.104) |
description
|
String |
A localized string describing the neighbouring location. (Since 2.104) |
panoId
|
String |
A unique identifier for the neighbouring panorama.
This is stable within a session but unstable across sessions. (Since 2.104) |
This class represents a street view location. It has no constructor, but is instantiated as an object literal.
| Property | Type | Description |
|---|---|---|
latlng
|
GLatLng |
The latlng of the panorama. (Since 2.104) |
pov
|
GPov |
The initial point of view. (Since 2.104) |
description
|
String |
A localized string describing the location. (Since 2.104) |
panoId
|
String |
A unique identifier for the panorama.
This is stable within a session but unstable across sessions. (Since 2.104) |
A GStreetviewOverlay
object is a tileset highlighting
locations where Street View data is available. This class implements
the GOverlay
interface and can be added to the map
using map.addOverlay
and removed using
map.removeOverlay
.
| Constructor | Description |
|---|---|
GStreetviewOverlay()
|
Creates a new GStreetviewOverlay which implements the
GOverlay interface.(Since 2.104) |
| Event | Description |
|---|---|
changed(hasStreetviewData:Boolean)
|
This event is fired when the state of Street View data changes
within the current viewport. It is fired when moving the map
from an area with Street View data to one without, and
vice-versa. It is also fired when the addition of a
GStreetviewOverlay to the map results in Street
View data appearing within the viewport.
The hasStreetviewData parameter will be
true if and only if the viewport contains Street
View data.(Since 2.120) |
A GStreetviewPanorama
object holds an instance of the
Flash® Street View Panorama viewer. Each object of this class
can hold a separate instance, showing a unique view. This object is
normally embedded within a container object such as a
DIV
and can be manipulated to change its view using the methods of this
class. Street View data is not available for all locations. Use the
GStreetviewClient
object or the GStreetviewOverlay
object to determine if Street View data is available for your location.
| Constructor | Description |
|---|---|
GStreetviewPanorama(container:Node,
opts?:GStreetviewPanoramaOptions)
|
Creates a new GStreetviewPanorama object with a
corresponding flash viewer in the provided container. The viewer will
not be shown until a location has been specified, either in the optional
GStreetviewPanoramaOptions opts object or by
calling setLocationAndPOV .
(Since 2.104) |
| Method | Return Value | Description |
|---|---|---|
remove()
|
None |
Removes the instance of the flash viewer currently associated with
this object from the DOM. This function must be called before removing
the HTML container element otherwise some browsers will fail to garbage
collect the flash viewer.
(Since 2.104) |
setContainer(container:Node)
|
None |
Sets the container element for the flash viewer, moving the viewer
from its old location if it is currently open.
(Since 2.104) |
checkResize()
|
None |
Notifies the flash viewer of a change of the size of its
container. Call this method after the size of the container DOM
object has changed, so that the viewer can adjust itself to fit the
new size.
(Since 2.104) |
hide()
|
None |
Hides the flash viewer. To remove the viewer, call .remove() instead.
(Since 2.104) |
show()
|
None |
Shows the flash viewer.
(Since 2.104) |
isHidden()
|
boolean |
Returns true if and only if the flash viewer associated
with this object is hidden.(Since 2.104) |
getLatLng()
|
GLatLng |
Returns the latitude and longitude of the panorama object.
(Since 2.189) |
getPanoId()
|
string |
Returns the ID of the panorama object.
(Since 2.189) |
getPOV()
|
GPov |
Returns the current point of view (POV) displayed in the flash
viewer.
(Since 2.104) |
setPOV(pov:GPov)
|
None |
Changes the current point of view (POV) displayed in the flash viewer
without changing the location.
(Since 2.104) |
panTo(pov:GPov,
opt_longRoute:Boolean)
|
None |
Changes the current point of view (POV) displayed in the flash viewer
without changing the location. Performs a smooth animation from the
current POV to the new POV. If opt_longRoute is set then the animation
will follow a long route around the sphere, otherwise the shortest
route.
(Since 2.104) |
setLocationAndPOV(latlng:GLatLng,
opt_pov:GPov)
|
None |
Sets the location and POV of the flash viewer. After calling
this function, the viewer will display the nearest location to
the latlng provided if one is available. If no data is available
for this location, then the flash player will remain unchanged
and emit an error code. See GStreetviewClient.ReturnValues
for the possible response codes.
(Since 2.104) |
setUserPhoto(photoSpec:GPhotoSpec)
|
None |
Shows a user-contributed photo in the flash viewer. After
calling this function, the viewer will display the photo
uniquely identified by photoSpec . If the photo
cannot be displayed, then the flash player will remain unchanged
and emit the error
code GStreetviewPanorama.ErrorValues.NO_PHOTO .
(Since 2.182) |
followLink(yaw:Number)
|
None |
Follows a link from the current panorama to a neighbouring
panorama. yaw specifies the direction of the neighbouring
panorama; if there are multiple neighbouring panoramas then the
nearest match will be taken.(Since 2.104) |
| Event | Description |
|---|---|
yawchanged(yaw:Number)
|
This event is fired when the yaw displayed in the flash viewer is
changed.
(Since 2.104) |
pitchchanged(pitch:Number)
|
This event is fired when the pitch displayed in the flash viewer is
changed.
(Since 2.104) |
zoomchanged(zoom:Number)
|
This event is fired when the zoom level of the flash viewer is
changed.
(Since 2.104) |
error(errorCode:GStreetviewPanorama.ErrorValues)
|
This event is fired when an error occurs. See
GStreetviewPanorama.ErrorValues for a list of error
types.(Since 2.104) |
initialized(location:GStreetviewLocation)
|
This event is fired when the panorama is initialized after
moving to a new location. The location is a GStreetviewLocation
object. Note: the initialized event is not sent when the
panorama is first rendered; this is a known issue and we plan to fix
this in a future release.
(Deprecated since 2.170) |
initialized(location:GStreetviewLocation)
|
This event is fired each time a panorama is initialized. The location
is a GStreetviewLocation object. Note that this event is
fired as soon as rendering starts, but that all image data may not
be loaded at this time.
(Since 2.170) |
Numeric equivalents for each symbolic constant are specified next to the equal sign.
| Constant | Description |
|---|---|
NO_NEARBY_PANO |
No panorama data was found. (Since 2.104) |
NO_PHOTO |
No user photo was found. (Since 2.182) |
FLASH_UNAVAILABLE |
The flash viewer was not available, typically because the user's
browser does not support flash. (Since 2.104) |
This class represents the options passed to the
GStreetviewPanorama
constructor. This class has no constructor
but is instantiated as an object literal. All properties are
optional.
| Property | Type | Description |
|---|---|---|
latlng
|
GLatLng |
The latlng at which to open the flash viewer.
(Since 2.104) |
pov
|
GPov |
The camera orientation with which to open the flash viewer.
(Since 2.104) |
enableFullScreen
|
Boolean |
By default, the panorama viewer features a full-screen
control in the upper right corner. To exclude the full-screen
control, set this flag to false.
(Since 2.175) |
features
|
GStreetviewFeatures |
By default, the panorama viewer will enable all major
viewing modes. This flag may be used to selectively enable or
disable certain modes.
(Since 2.182) |
userPhotosOptions
|
GStreetviewUserPhotosOptions |
This optional property is ignored unless the userPhotos
feature is enabled using the GStreetviewFeatures class.
(Since 2.182) |
This class represents the options available in
the userPhotos
viewing mode. This class has no
constructor but is instantiated as an object literal. All
properties are optional.
| Property | Type | Description |
|---|---|---|
photoRepositories
|
Array |
An optional array of strings. Each string specifies a photo
repository to enable. If absent, all photo repositories will be
enabled. Valid array values are: 'panoramio', 'picasa' and 'flickr'.
(Since 2.182) |
A GTrafficOverlay
object adds an
overlay to the map that displays road traffic information. It
implements the GOverlay
interface and thus is added to
the map using the GMap2.addOverlay()
method and removed
using the GMap2.removeOverlay()
method. The
GTrafficOverlay
will only display traffic information for
supported cities.
| Constructor | Description |
|---|---|
GTrafficOverlay(opts?:GTrafficOverlayOptions)
|
Creates a new GTrafficOverlay object that shows road traffic information.(Since 2.81) |
| Method | Return Value | Description |
|---|---|---|
hide()
|
None |
Hides the traffic overlay. (Since 2.81) |
show()
|
None |
Shows the traffic overlay. (Since 2.81) |
| Event | Description |
|---|---|
changed(hasTrafficInView:Boolean)
|
This event is fired when the state of traffic data changes within the current
viewport. This event may be fired either when moving the map between areas with
and without traffic data or when the addition of a GTrafficOverlay
to the map results in traffic data appearing within the current viewport.
The hasTrafficInView parameter will be true if the
viewport contains traffic data and false otherwise.
The event works regardless of whether the layer is hidden or shown.
(Since 2.85) |
This class represents optional arguments to the
GTrafficOverlay
constructor. It has no constructor, but is
instantiated as an object literal.
| Property | Type | Description |
|---|---|---|
incidents
|
Boolean |
When true , indicates that the
GTrafficOverlay should display traffic incidents
on the map, where applicable. By default, this value
is set to false .(Since 2.121) |
hide
|
Boolean |
When true , indicates that the map should not
initially display the GTrafficOverlay . To turn on
the overlay, call GTrafficOverlay.show() .
By default, this value is set to false .
(Since 2.121) |
| Constant | Description |
|---|---|
G_TRAVEL_MODE_WALKING
|
Walking (Since 2.129) |
G_TRAVEL_MODE_DRIVING
|
Driving (Since 2.129) |
This namespace provides static methods to handle XML documents and document fragments.
| Method | Return Value | Description |
|---|---|---|
GXml.parse(xmltext:String)
|
Node |
Parses the given string as XML text and returns a DOM
representation. If the browser doesn't support XML parsing
natively, this returns the DOM node of an empty DIV
element. |
GXml.value(xmlnode:Node)
|
String |
Returns the text value (i.e., only the plain text content) of the XML document fragment given in DOM representation. |
This namespace provides a factory method to create
XmlHttpRequest
instances in a browser independent
way.
| Method | Return Value | Description |
|---|---|---|
GXmlHttp.create()
|
GXmlHttp |
Factory to create a new instance of
XmlHttpRequest . |
This class provides methods to apply XSLT to XML in a browser-independent way.
| Method | Return Value | Description |
|---|---|---|
GXslt.create(xsltnode:Node)
|
GXslt |
Creates a GXslt instance from the XSLT
stylesheet given as DOM representation. |
GXslt.transformToHtml(xmlnode:Node,
htmlnode:Node)
|
Boolean |
Uses the XSLT stylesheet given in the constructor of this
GXslt instance to transform the XML document given
as DOM representation in xmlnode . Appends the
resulting HTML document fragment to the given
htmlnode . This only works if the browser natively
supports XSL transformations, in which case it will return
true . Otherwise, this function will do nothing and
return false . |


Solar Age and Solar Years Left
Enter Age:
Life Expectancy of your Demographic:
Submit Info
"Please enter a real age"
Your Solar Ages and Life Expectancies:
Earth:
Age:
, Years Left:
Mercury:
Age:
, Years Left:
Venus:
Age:
, Years Left:
Mars:
Age:
, Years Left:
Jupiter:
Age:
, Years Left:


| retinopathy {survival} | R Documentation |
A trial of laser coagulation as a treatment to delay diabetic retinopathy.
data("retinopathy")
A data frame with 394 observations on the following 9 variables.
id
numeric subject id
laser
type of laser used: xenon
argon
eye
which eye was treated: right
left
age
age at diagnosis of diabetes
type
type of diabetes: juvenile
adult
,
(diagnosis before age 20)
trt
0 = control eye, 1 = treated eye
futime
time to loss of vision or last follow-up
status
0 = censored, 1 = loss of vision in this eye
risk
a risk score for the eye. This high risk subset is defined as a score of 6 or greater in at least one eye.
The 197 patients in this dataset were a 50% random sample of the patients with "high-risk" diabetic retinopathy as defined by the Diabetic Retinopathy Study (DRS). Each patient had one eye randomized to laser treatment and the other eye received no treatment, and has two observations in the data set. For each eye, the event of interest was the time from initiation of treatment to the time when visual acuity dropped below 5/200 two visits in a row. Thus there is a built-in lag time of approximately 6 months (visits were every 3 months). Survival times in this dataset are the actual time to vision loss in months, minus the minimum possible time to event (6.5 months). Censoring was caused by death, dropout, or end of the study.
W. J. Huster, R. Brookmeyer and S. G. Self (1989). Modelling paired survival data with covariates, Biometrics 45:145-156.
A. L. Blair, D. R. Hadden, J. A. Weaver, D. B. Archer, P. B. Johnston and C. J. Maguire (1976). The 5-year prognosis for vision in diabetes, American Journal of Ophthalmology, 81:383-396.
coxph(Surv(futime, status) ~ type + trt + cluster(id), retinopathy)


Date of Last Update:<PHONE_NUMBER>50
| GRIB2 Id | FNMOC Id | GRIB1 Id | Full Name - Description | Units | FNMOC Status2 | WMO Status3 | |
|---|---|---|---|---|---|---|---|
| JMBL Id1 - Description | |||||||
| 0 | reserved0 | 000 | reserved - reserved | none | none | current | operational |
| none - none | |||||||
| 1 | surface | 001 | surface - ground or water surface (the atmosphere's lower boundary, land/sea surface) | none | none | current | operational |
| SFC - ground or water surface | |||||||
| 2 | cld_bs_lvl | 000 | cloud base level - cloud base level | none | none | listed | operational |
| CBL - cloud base level | |||||||
| 3 | cld_tp_lvl | 000 | cloud top level - level of cloud tops | none | none | listed | operational |
| CTL - level of cloud tops | |||||||
| 4 | isth_lvl_0C | 004 | isotherm level at 0 deg C - level of 0 deg C isotherm | none | none | current | operational |
| ODEG - level of 0 deg C isotherm | |||||||
| 5 | adbtc_cond_lft_sfc | 000 | adiabatic condensation lifted surface - level of adiabatic condensation lifted from the surface | none | none | listed | operational |
| ADCL - Level of adiabatic condensation lifted from the surface | |||||||
| 6 | max_wnd_lvl | 006 | maximum wind level - maximum wind level | none | none | current | operational |
| MWSL - maximum wind level | |||||||
| 7 | trpp_lvl | 007 | tropopause level - tropopause | none | none | current | operational |
| TRO - tropopause | |||||||
| 8 | atms_top | 008 | atmosphere top - top of atmosphere | none | none | current | operational |
| NTAT - nominal top of the atmosphere | |||||||
| 10 | sky_cvr | 200 | sky cover - the entire atmosphere considered as a single layer | none | none | current | operational |
| EATM - entire atmosphere (considered as a single layer) | |||||||
| 11 | cb_base | 000 | cumulonimbus (CB) base - The distance from the earth's surface to the bottom of a cumulonimbus cloud. | m | m | listed | operational |
| none - none | |||||||
| 12 | cb_top | 000 | cumulonimbus (CT) top - The distance from the earth's surface to the top of a cumulonimbus cloud. | m | m | listed | operational |
| none - none | |||||||
| 13-19 | reserved13 | 000 | reserved - reserved | none | none | current | operational |
| none - none | |||||||
| 20 | isth_lvl | 020 | isotherm level (constant temperature) - isothermal level | deg_K | deg_K | current | operational |
| TMPL - isothermal level | |||||||
| 21-99 | reserved21 | 000 | reserved - reserved | none | none | current | operational |
| none - none | |||||||
| 100 | isbr_lvl | 100 | isobaric level - isobaric surface (constant pressure) | hPa | hPa | current | operational |
| ISBL - isobaric level | |||||||
| 100 | isbr_lvl_pa | 219 | isobaric level in pascals - isobaric (constant pressure) surface in pascals | Pa | Pa | current | operational |
| none - isobaric level | |||||||
| 101 | msl | 102 | mean sea level - mean sea level | none | none | current | operational |
| MSL - mean sea level | |||||||
| 102 | ht_msl | 103 | height above mean sea level - height above mean sea level | m | m | current | operational |
| HTIO - none | |||||||
| 103 | ht_sfc | 105 | height surface - specific height level above ground (height above earth/sea surface) | m | m | current | operational |
| TGL - specific height level above ground | |||||||
| 104 | sgma_lvl | 107 | sigma level - sigma level | none | none | current | operational |
| SIGL - sigma level | |||||||
| 105 | hyb_lvl | 000 | hybrid level - hybrid level | none | none | listed | operational |
| HYBL - hybrid level | |||||||
| 107 | isnt_lvl | 113 | isentropic level - isentropic (theta) level (constant theta) | deg_K | deg_K | listed | operational |
| THEL - isentropic (theta) level | |||||||
| 108 | spec_pres_dif | 000 | specific pressure level - level at specified pressure difference from ground to level | Pa | Pa | listed | operational |
| SPDL - level at specified pressure difference from ground to level | |||||||
| 109 | ptntl_vort_sfc | 000 | potential vorticity surface - potential vorticity surface | Km2pkgs | Km2pkgs | listed | operational |
| PVL - potential vorticity (pv) surface | |||||||
| 110 | reserved110 | 000 | reserved - reserved | none | none | current | operational |
| none - none | |||||||
| 111 | etal | 000 | ETA Level - ETA level | none | none | listed | operational |
| ETAL - ETA level | |||||||
| 112 | reserved112 | 000 | reserved - reserved | none | none | current | operational |
| none - none | |||||||
| 113 | log_hyb_lvl | 000 | logarithmic hybrid level - none | none | none | current | operational |
| none - none | |||||||
| 114 | snw_lvl | 000 | snow level - none | none | none | current | operational |
| none - none | |||||||
| 115-116 | reserved115 | 000 | reserved - reserved | none | none | current | operational |
| none - none | |||||||
| 118 | hyb_ht_lvl | 000 | hybrid height level - no description available. | none | none | listed | operational |
| none - none | |||||||
| 119 | hyb_pres_lvl | 000 | hybrid pressure level - no description available. | none | none | listed | operational |
| none - none | |||||||
| 120 | isbr_lay | 101 | isobaric layer - layer between two isobaric levels | Pa | Pa | current | preoperational |
| ISBY - layer between two isobaric levels | |||||||
| 121-149 | reserved121 | 000 | reserved - reserved | none | none | current | validation |
| none - none | |||||||
| 150 | gen_vert_ht_coord | 000 | general vertical height coordinate - reserved | none | none | current | operational |
| none - none | |||||||
| 151-159 | reserved151 | 000 | reserved - reserved | none | none | current | operational |
| none - none | |||||||
| 160 | dpth_sea_lvl_m | 160 | depth sea level m - depth below sea level m | m | m | current | operational |
| DBSL - depth below sea level | |||||||
| 161 | dpth_blw_wtr_sfc | 000 | depth below water surface - depth below water surface | m | m | listed | operational |
| none - none | |||||||
| 162 | lk_rvr_botm | 000 | lake or river bottom - lake or river bottom | none | none | listed | operational |
| none - none | |||||||
| 163 | botm_sedi_lyr | 000 | bottom of sediment layer - bottom of sediment layer | none | none | listed | operational |
| none - none | |||||||
| 164 | botm_therm_act_sedi_lyr | 000 | bottom of thermally active sediment layer - bottom of thermally active sediment layer | none | none | listed | operational |
| none - none | |||||||
| 165 | botm_sedi_lyr_pen_therm_wav | 000 | bottom of sediment layer penetrated by thermal wave - bottom of sediment layer penetrated by thermal wave | none | none | listed | operational |
| none - none | |||||||
| 166 | mixg_lyr | 000 | mixing layer - mixing layer | none | none | listed | operational |
| none - none | |||||||
| 167-169 | reserved167 | 000 | reserved - reserved | none | none | current | operational |
| none - none | |||||||
| 170 | ion_d_reg_lvl | 000 | ionospheric d-region level - ionospheric d-region level | none | none | current | validation |
| none - none | |||||||
| 171 | ion_e_reg_lvl | 000 | ionospheric e-region level - ionospheric e-region level | none | none | current | validation |
| none - none | |||||||
| 172 | ion_f1_reg_lvl | 000 | ionospheric f1-region level - ionospheric f1-region level | none | none | current | validation |
| none - none | |||||||
| 173 | ion_f2_reg_lvl | 000 | ionospheric f2-region level - ionospheric f2-region level | none | none | current | validation |
| none - none | |||||||
| 174-191 | reserved174 | 000 | reserved - reserved for local use | none | none | current | operational |
| none - none | |||||||
| 192-194 | reservedlocal192 | 000 | reserved local - reserved for local use | none | none | current | operational |
| none - none | |||||||
| 198-200 | reservedlocal198 | 000 | reserved local - reserved for local use | none | none | current | operational |
| none - none | |||||||
| 202 | blw_snd_lay | 000 | below sound layer - below sound layer (100 ft immediately below). | ft | ft | listed | |
| none - none | |||||||
| 203-212 | reservedlocal203 | 000 | reserved local - reserved for local use | none | none | current | operational |
| none - none | |||||||
| 213 | grnd_lay | 112 | ground layer - The upper layer of the Earth's ground surface | m | m | current | |
| DBLY - layer between two depths below land surface | |||||||
| 214-231 | reservedlocal214 | 000 | reserved local - reserved for local use | none | none | current | operational |
| none - none | |||||||
| 236-240 | reservedlocal236 | 000 | reserved local - reserved for local use | none | none | current | operational |
| none - none | |||||||
| 241 | dpth_ix | 241 | depth index - depth index | none | none | current | |
| DTHX - none | |||||||
| 242-248 | reservedlocal242 | 000 | reserved local - reserved for local use | none | none | current | operational |
| none - none | |||||||
| 249 | wavelen_sfc | 199 | wavelength surface - A wavelength at the earth's surface. The wavelength, in nanometers, appears in the first level, the sfc layer is in the second level. | nnm | nnm | current | |
| none - none | |||||||
| 250 | flight_lvl | 000 | flight level below 18000 ft - altitude below 18,000 feet (was GRIB1 #250) | ft | ft | deprecated | |
| GPML - specified altitude above mean sea level | |||||||
| 250 | flight_lvl | 251 | flight level above 18000 ft - altitude above 18,000 feet | hftp100 | hftp100 | deprecated | |
| GPML - specified altitude above mean sea level | |||||||
| 250 | flight_lvl | 252 | flight layer below 18,000 ft - layer below 18,000 feet | hftp100 | hftp100 | deprecated | |
| GPML - specified altitude above mean sea level | |||||||
| 250 | flight_lvl | 253 | flight level layer above 18,000 ft - layer in atmosphere 18,000 feet and above. | hftp1000 | hftp1000 | deprecated | |
| GPML - specified altitude above mean sea level | |||||||
| 250 | flight_lvl | 250 | flight level above msl - an altitude above mean sea level. | hftp100 | hftp100 | current | |
| GPML - specified altitude above mean sea level | |||||||
| 251 | hi_cld | 232 | high cloud - high cloud layer | none | none | deprecated | |
| HCY - high cloud layer | |||||||
| 252 | mid_cld | 222 | middle cloud - middle cloud layer | none | none | deprecated | |
| MCY - middle cloud layer | |||||||
| 253 | low_cld | 212 | low cloud - low cloud layer | none | none | deprecated | |
| LCY - low cloud layer | |||||||
| 254 | reservedlocal254 | 000 | reserved local - reserved for local use | none | none | current | |
| none - none | |||||||
| 255 | missing | 000 | missing - missing | none | none | current | operational |
| none - none |
Date of Table Creation:<PHONE_NUMBER>26
Date of Last Update:<PHONE_NUMBER>50
Footnotes:
| value | definition |
|---|---|
| available | Entry was used in the past, is not in production now, and could be used again. |
| current | Entry is currently in production and available to customers. |
| deprecated | Entry is no longer to be used. May or may not be in production. |
| listed | Entry is listed in WMO documentation. Not in production with no plans to be produced. |
| obsolete | Entry is not to be used and is not in production, if it ever was. |
| pending | Entry is being prepared for production. |
| planned | Entry is being looked at for possible production. |
| value | definition |
|---|---|
| deprecated | Entry is no longer used. |
| experimental | Entry is not recommended for use outside of bi-lateral previously agreed tests. |
| operational | Entry is available for use. |
| validation | Entry is in the approval process. |
References:
| title: | Product Name Standard Document |
|---|---|
| version: | 2.2 |
| docId: | P-3146-2.2 |
| dtg: | May 2012 |
| organization: | Fleet Numerical Meteorology and Oceanography Center |
| infoUsed: | level type table |
|
|
|
| title: | GRIB 2 |
| version: | 12.0.0 |
| docId: | FM 92-XII |
| organization: | World Meteorological Organization |
| infoUsed: | GRIB2 Fixed Surface Types and Units, table 4.5 |
|
|


Change password
Almost there! Just update your password.
Type new password
Type new password again
Update password
arrow_right_alt
Sign out


Support for all kinds of machine-to-machine communications in Scheme, such as UDP/TCP/web sockets, distributed hash tables, and radio.
Under construction.
Work on the topic is done on the schemecomm
mailing list (archives, subscribe).
Source is in a git repository.


Sword Singers are swordsmen who increase the attack power of their allies on the battlefield.
Description of the Sword Singer
Change occupation to Sword Singer.
Return


Basic c3 sample.
Load c3 by angular.
Add some options controllable by the user.
Time based data and more AngularJS.


All Files (92.33% covered at 2.74 hits/line)
39 files in total.
339 relevant lines.
313 lines covered and
26 lines missed
- 1
module ApplicationCable
- 1
class Channel < ActionCable::Channel::Base
end
end
- 1
module ApplicationCable
- 1
class Connection < ActionCable::Connection::Base
end
end
- 1
class ApplicationController < ActionController::Base
- 1
protect_from_forgery with: :exception
- 1
helper_method :current_user
- 1
def current_user
- 276
if session[:user_id]
- 235
@current_user ||= User.find(session[:user_id])
end
end
- 1
def authorize_admin
- 1
if !current_user || current_user.admin != true
flash[:alert] = "You aren't authorized to visit that page."
redirect_back(fallback_location: root_path)
end
end
- 1
def authorize_user
- 3
if !current_user
flash[:alert] = "Please log in to access this page"
redirect_back(fallback_location: root_path)
end
end
end
- 1
class PagesController < ApplicationController
- 1
before_action :authorize_admin, only: [:admin]
- 1
def home
@records = Record.all
end
- 1
def admin
- 1
@record = Record.new
end
end
- 1
class RecordsController < ApplicationController
- 1
def index
- 8
@records = Record.all.order(:updated_at).reverse
end
- 1
def show
- 13
@record = Record.find(params[:id])
end
- 1
def create
- 1
@record = Record.new(record_params)
- 1
if @record.save
- 1
flash[:notice] = "Record successfully added!"
- 1
redirect_to record_path(@record)
else
flash[:alert] = "Something went wrong, please try again."
render :admin
end
end
- 1
def edit
- 1
@record = Record.find(params[:id])
end
- 1
def update
- 1
@record = Record.find(params[:id])
- 1
if @record.update(record_params)
- 1
flash[:notice] = "Record successfully updated!"
- 1
redirect_to record_path(@record)
else
flash[:alert] = "Something went wrong, please try again."
render :edit
end
end
- 1
def destroy
- 1
if Record.find(params[:id]).destroy
- 1
flash[:notice] = "Item successfully deleted!"
- 1
redirect_to records_path
end
end
- 1
private
- 1
def record_params
- 2
params.require(:record).permit(:artist, :title, :category, :cost, :description, :avatar)
end
end
- 1
class ReviewsController < ApplicationController
- 1
before_action :authorize_user, only: [:new]
- 1
def show
- 2
@review = Review.find(params[:id])
- 2
@product = @review.record
end
- 1
def new
- 3
@record = Record.find(params[:record_id])
- 3
@review = @record.reviews.new
end
- 1
def create
- 3
@record = Record.find(params[:record_id])
- 3
@review = @record.reviews.new(review_params)
- 3
if @review.save
- 3
flash[:notice] = "Review sucessfully created!"
- 3
redirect_to record_path(@record)
else
flash[:alert] = "Something went wrong, please try again."
redirect_to new_record_review_path(@record)
end
end
- 1
def edit
- 1
@review = Review.find(params[:id])
- 1
@record = @review.record
end
- 1
def update
- 1
@review = Review.find(params[:id])
- 1
if @review.update(review_params)
- 1
flash[:notice] = "Review successfully updated!"
- 1
redirect_to<EMAIL_ADDRESS>else
render :edit
end
end
- 1
def destroy
- 1
@record = Review.find(params[:id]).record
- 1
if Review.find(params[:id]).destroy
- 1
flash[:notice] = "Review successfully removed!"
- 1
redirect_to record_path(@record)
end
end
- 1
private
- 1
def review_params
- 4
params.require(:review).permit(:user_id, :content, :record_id)
end
end
- 1
class SessionsController < ApplicationController
- 1
def create
- 7
@user = User.authenticate(params[:email], params[:password])
- 7
if @user
- 7
flash[:notice] = "You've signed in."
- 7
session[:user_id] = @user.id
- 7
redirect_to records_path
else
flash[:alert] = "There was a problem signing in. Please try again."
redirect_to login_path
end
end
- 1
def destroy
session[:user_id] = nil
flash[:notice] = "You've signed out."
redirect_to records_path
end
end
- 1
class UsersController < ApplicationController
- 1
def show
end
- 1
def new
@user = User.new
end
- 1
def create
@user = User.new(user_params)
if @user.save
flash[:notice] = "You've successfully signed up!"
session[:user_id] = @user.id
redirect_to records_path
else
flash[:alert] = "There was a problem signing up."
redirect_to signup_path
end
end
- 1
private
- 1
def user_params
params.require(:user).permit(:username, :email, :password, :password_confirmation)
end
end
- 1
module ApplicationHelper
end
- 1
module PagesHelper
end
- 1
module RecordsHelper
end
- 1
module ReviewsHelper
end
- 1
module UsersHelper
end
- 1
class ApplicationJob < ActiveJob::Base
end
- 1
class ApplicationMailer < ActionMailer::Base
- 1
default from<EMAIL_ADDRESS>- 1
layout 'mailer'
end
- 1
class ApplicationRecord < ActiveRecord::Base
- 1
self.abstract_class = true
end
- 1
class Record < ApplicationRecord
- 1
has_many :reviews
- 1
has_attached_file :avatar, styles: { medium: "300x300>", thumb: "100x100>" }, default_url: "/missing.png"
- 1
validates_attachment_content_type :avatar, content_type: /\Aimage\/.*\z/
- 1
validates :artist, :title, :category, :cost, :presence => true
end
- 1
class Review < ApplicationRecord
- 1
belongs_to :user
- 1
belongs_to :record
- 1
belongs_to :user
- 1
validates :content, :record_id, :user_id, :presence => true
end
- 1
class User < ApplicationRecord
- 1
has_many :reviews
- 1
attr_accessor :password
- 1
validates_confirmation_of :password
- 1
validates :email, :username, :presence => true, :uniqueness => true
- 1
before_save :encrypt_password
- 1
def encrypt_password
- 2
self.password_salt = BCrypt::Engine.generate_salt
- 2
self.password_hash = BCrypt::Engine.hash_secret(password,password_salt)
end
- 1
def self.authenticate(email, password)
- 7
user = User.find_by "email = ?", email
- 7
if user && user.password_hash == BCrypt::Engine.hash_secret(password, user.password_salt)
- 7
user
else
nil
end
end
end
- 1
require_relative 'boot'
- 1
require "rails"
# Pick the frameworks you want:
- 1
require "active_model/railtie"
- 1
require "active_job/railtie"
- 1
require "active_record/railtie"
- 1
require "action_controller/railtie"
- 1
require "action_mailer/railtie"
- 1
require "action_view/railtie"
- 1
require "action_cable/engine"
- 1
require "sprockets/railtie"
# require "rails/test_unit/railtie"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
- 1
Bundler.require(*Rails.groups)
- 1
module RailsRecordStore
- 1
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
- 1
config.load_defaults 5.1
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Don't generate system test files.
- 1
config.generators.system_tests = nil
end
end
- 1
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
- 1
require 'bundler/setup' # Set up gems listed in the Gemfile.
# Load the Rails application.
- 1
require_relative 'application'
# Initialize the Rails application.
- 1
Rails.application.initialize!
- 1
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
- 1
config.cache_classes = true
# Do not eager load code on boot. This avoids loading your whole application
# just for the purpose of running a single test. If you are using a tool that
# preloads Rails for running tests, you may have to set it to true.
- 1
config.eager_load = true
# Configure public file server for tests with Cache-Control for performance.
- 1
config.public_file_server.enabled = true
- 1
config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
}
# Show full error reports and disable caching.
- 1
config.consider_all_requests_local = true
- 1
config.action_controller.perform_caching = false
# Raise exceptions instead of rendering exception templates.
- 1
config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment.
- 1
config.action_controller.allow_forgery_protection = false
- 1
config.action_mailer.perform_caching = false
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
- 1
config.action_mailer.delivery_method = :test
# Print deprecation notices to the stderr.
- 1
config.active_support.deprecation = :stderr
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
end
# Be sure to restart your server when you modify this file.
# ApplicationController.renderer.defaults.merge!(
# http_host: 'example.org',
# https: false
# )
# Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
- 1
Rails.application.config.assets.version = '1.0'
# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path
# Add Yarn node_modules folder to the asset load path.
- 1
Rails.application.config.assets.paths << Rails.root.join('node_modules')
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
# Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.
# Valid options are :json, :marshal, and :hybrid.
- 1
Rails.application.config.action_dispatch.cookies_serializer = :json
# Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
- 1
Rails.application.config.filter_parameters += [:password]
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end
# These inflection rules are supported but not enabled by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.acronym 'RESTful'
# end
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Be sure to restart your server when you modify this file.
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
- 1
ActiveSupport.on_load(:action_controller) do
- 2
wrap_parameters format: [:json]
end
# To enable root element in JSON for ActiveRecord objects.
# ActiveSupport.on_load(:active_record) do
# self.include_root_in_json = true
# end
- 1
Rails.application.routes.draw do
- 1
root to: 'pages#home'
- 1
resources :records do
- 1
resources :reviews
end
# user routes get '/signup' => 'users#new'
- 1
resources :users
- 1
get '/signup' => 'users#new'
- 1
post '/users' => 'users#create'
- 1
get '/login' => 'sessions#new'
- 1
post '/login' => 'sessions#create'
- 1
get '/logout' => 'sessions#destroy'
# admin routes
- 1
get '/admin' => 'pages#admin'
end
- 1
require 'faker'
- 1
album_art = [
"https://f4.bcbits.com/img/a3753541781_10.jpg",
"https://f4.bcbits.com/img/a0799780288_10.jpg",
"http://musique-plastique.com/img/pedro-front-cover.jpg",
"https://github.com/seanpierce/rails_record_store/blob/master/public/system/records/avatars/000/000/021/original/Lips-square.jpg?raw=true"
]
- 1
FactoryGirl.define do
- 1
factory :record do
- 1
artist Faker::Name.name
- 1
title Faker::Name.title
- 1
description Faker::Hipster.sentences.join(' ')
- 1
category "Vinyl"
- 1
cost Faker::Commerce.price
- 1
avatar File.join(album_art.sample)
end
- 1
factory :user do
- 1
username "seanpierce"
- 1
email<EMAIL_ADDRESS>- 1
password "1234567"
- 1
password_confirmation "1234567"
- 1
admin nil
end
- 1
factory :review do
- 1
user_id 1
- 1
record_id 1
- 1
content "Dang, what a great record"
end
end
- 1
require 'rails_helper'
- 1
describe 'the lifecycle of a record' do
- 1
record = FactoryGirl.create(:record)
- 1
admin = User.create!(
username: "seanpierce",
email<EMAIL_ADDRESS>password: "1234567",
password_confirmation: "1234567",
admin: true
)
- 1
it "logs in as admin" do
# log in block
- 1
visit login_path
- 1
find('input[id="email"]').set(admin.email)
- 1
find('input[id="password"]').set(admin.password)
- 1
find('input[id="log-in"]').click
# end login block
- 1
expect(page).to have_content "You've signed in."
end
- 1
it "creates a new record" do
# log in block
- 1
visit login_path
- 1
find('input[id="email"]').set(admin.email)
- 1
find('input[id="password"]').set(admin.password)
- 1
find('input[id="log-in"]').click
# end login block
- 1
visit admin_path
- 1
expect(page).to have_content "Add a record"
- 1
find('input[id="record_artist"]').set(record.artist)
- 1
find('input[id="record_title"]').set(record.title)
- 1
find('input[id="record_cost"]').set(record.cost)
- 1
find('input[id="record_category"]').set(record.category)
- 1
find('textarea[id="record_description"]').set(record.description)
- 1
click_on "Submit"
- 1
expect(page).to have_content "Record successfully added!"
end
- 1
it "views a record's page" do
- 1
visit record_path(record)
- 1
expect(page).to have_content record.artist
end
- 1
it "edits a record" do
# log in block
- 1
visit login_path
- 1
find('input[id="email"]').set(admin.email)
- 1
find('input[id="password"]').set(admin.password)
- 1
find('input[id="log-in"]').click
# end login block
- 1
visit record_path(record)
- 1
click_link "Edit Item"
- 1
find('input[id="record_title"]').set("Cool New Record Title")
- 1
click_on "Submit"
- 1
expect(page).to have_content "Record successfully updated!"
end
- 1
it "deletes a record" do
# log in block
- 1
visit login_path
- 1
find('input[id="email"]').set(admin.email)
- 1
find('input[id="password"]').set(admin.password)
- 1
find('input[id="log-in"]').click
# end login block
- 1
visit record_path(record)
- 1
click_link "Delete Item"
- 1
expect(page).to have_no_content record.artist
end
end
- 1
require 'rails_helper'
- 1
describe 'the lifecycle of a review' do
- 1
other_record = FactoryGirl.create(:record, artist: "Other Artist", title: "Other Record")
- 1
basic_user = User.create!(
username: "basic_user",
email<EMAIL_ADDRESS>password: "1234567",
password_confirmation: "1234567",
admin: false
)
- 1
it "adds a new review to a record" do
# log in block
- 1
visit login_path
- 1
find('input[id="email"]').set(basic_user.email)
- 1
find('input[id="password"]').set(basic_user.password)
- 1
find('input[id="log-in"]').click
# end login block
- 1
visit record_path(other_record)
- 1
click_link "Write a review"
- 1
fill_in "Content", with: "This is a really good record. Highly recommended!"
- 1
click_on "Submit"
- 1
expect(page).to have_content "Review sucessfully created!"
end
- 1
it "edits their previous review" do
# log in block
- 1
visit login_path
- 1
find('input[id="email"]').set(basic_user.email)
- 1
find('input[id="password"]').set(basic_user.password)
- 1
find('input[id="log-in"]').click
# end login block
- 1
visit record_path(other_record)
- 1
click_link "Write a review"
- 1
fill_in "Content", with: "This is a really good record. Highly recommended!"
- 1
click_on "Submit"
- 1
visit record_review_path(other_record, other_record.reviews.first)
- 1
click_on "Edit my review"
- 1
fill_in "Content", with: "On second listen, I think this record is awful!"
- 1
click_on "Submit"
- 1
expect(page).to have_content "Review successfully updated!"
end
- 1
it "deletes their review" do
# log in block
- 1
visit login_path
- 1
find('input[id="email"]').set(basic_user.email)
- 1
find('input[id="password"]').set(basic_user.password)
- 1
find('input[id="log-in"]').click
# end login block
- 1
visit record_path(other_record)
- 1
click_link "Write a review"
- 1
fill_in "Content", with: "This is a really good record. Highly recommended!"
- 1
click_on "Submit"
- 1
visit record_review_path(other_record, other_record.reviews.first)
- 1
click_on "Delete my review"
- 1
expect(page).to have_no_content "review for"
end
end
- 1
require 'rails_helper'
- 1
describe Record do
- 2
it { should have_many :reviews }
- 2
it { should validate_presence_of :artist }
- 2
it { should validate_presence_of :title }
- 2
it { should validate_presence_of :category }
- 2
it { should validate_presence_of :cost }
- 2
it { should have_attached_file :avatar }
end
- 1
require 'rails_helper'
- 1
describe Review do
- 2
it { should belong_to :record }
- 2
it { should belong_to :user }
- 2
it { should validate_presence_of :content }
end
- 1
require 'rails_helper'
- 1
describe User do
- 2
it { should have_many :reviews }
- 2
it { should validate_presence_of :username }
- 2
it { should validate_presence_of :email }
- 2
it { should validate_uniqueness_of :email }
- 2
it { should validate_confirmation_of :password }
end
# This file is copied to spec/ when you run 'rails generate rspec:install'
- 1
require 'spec_helper'
- 1
ENV['RAILS_ENV'] ||= 'test'
- 1
require File.expand_path('../../config/environment', __FILE__)
# Prevent database truncation if the environment is production
- 1
abort("The Rails environment is running in production mode!") if Rails.env.production?
- 1
require 'rspec/rails'
# Add additional requires below this line. Rails is not loaded until this point!
# Requires supporting ruby files with custom matchers and macros, etc, in
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
# run as spec files by default. This means that files in spec/support that end
# in _spec.rb will both be required and run as specs, causing the specs to be
# run twice. It is recommended that you do not name files matching this glob to
# end with _spec.rb. You can configure this pattern with the --pattern
# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
#
# The following line is provided for convenience purposes. It has the downside
# of increasing the boot-up time by auto-requiring all files in the support
# directory. Alternatively, in the individual `*_spec.rb` files, manually
# require only the support files necessary.
#
# Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
# Checks for pending migration and applies them before tests are run.
# If you are not using ActiveRecord, you can remove this line.
- 1
ActiveRecord::Migration.maintain_test_schema!
- 1
RSpec.configure do |config|
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
- 1
config.fixture_path = "#{::Rails.root}/spec/fixtures"
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
# instead of true.
- 1
config.use_transactional_fixtures = true
# RSpec Rails can automatically mix in different behaviours to your tests
# based on their file location, for example enabling you to call `get` and
# `post` in specs under `spec/controllers`.
#
# You can disable this behaviour by removing the line below, and instead
# explicitly tag your specs with their type, e.g.:
#
# RSpec.describe UsersController, :type => :controller do
# # ...
# end
#
# The different available types are documented in the features, such as in
# https://relishapp.com/rspec/rspec-rails/docs
- 1
config.infer_spec_type_from_file_location!
# Filter lines from Rails gems in backtraces.
- 1
config.filter_rails_from_backtrace!
# arbitrary gems may also be filtered via:
# config.filter_gems_from_backtrace("gem name")
# spec/support/factory_girl.rb
- 1
config.include FactoryGirl::Syntax::Methods
end
- 1
Shoulda::Matchers.configure do |config|
- 1
config.integrate do |with|
- 1
with.test_framework :rspec
- 1
with.library :rails
end
end
- 1
Record.destroy_all
- 1
User.destroy_all
- 1
Review.destroy_all


hint-text
Funding rules for this competition
- Maximum research participation
- Current research participation
The participation levels of this project are not within the required range
The research participation costs must be % or less of the total project costs.
Finances summary
Project cost breakdown
This is the level of cost detail that the assessors will see during the assessment process.
Return to application overview


Getting started¶
This very simple case-study is designed to get you up-and-running quickly with
statsmodels
. Starting from raw data, we will show the steps needed to
estimate a statistical model and to draw a diagnostic plot. We will only use
functions provided by statsmodels
or its pandas
and patsy
dependencies.
Loading modules and functions¶
After installing statsmodels and its dependencies, we load a few modules and functions:
In [1]: import statsmodels.api as sm
In [2]: import pandas
In [3]: from patsy import dmatrices
pandas builds on numpy
arrays to provide
rich data structures and data analysis tools. The pandas.DataFrame
function
provides labelled arrays of (potentially heterogenous) data, similar to the
R
“data.frame”. The pandas.read_csv
function can be used to convert a
comma-separated values file to a DataFrame
object.
patsy is a Python library for describing
statistical models and building Design Matrices using R
-like formulas.
Note
This example uses the API interface. See Import Paths and Structure for information on
the difference between importing the API interfaces (statsmodels.api
and
statsmodels.tsa.api
) and directly importing from the module that defines
the model.
Data¶
We download the Guerry dataset, a
collection of historical data used in support of Andre-Michel Guerry’s 1833
Essay on the Moral Statistics of France. The data set is hosted online in
comma-separated values format (CSV) by the Rdatasets repository.
We could download the file locally and then load it using read_csv
, but
pandas
takes care of all of this automatically for us:
In [4]: df = sm.datasets.get_rdataset("Guerry", "HistData").data
The Input/Output doc page shows how to import from various other formats.
We select the variables of interest and look at the bottom 5 rows:
In [5]: vars = ['Department', 'Lottery', 'Literacy', 'Wealth', 'Region']
In [6]: df = df[vars]
In [7]: df[-5:]
Out[7]:
Department Lottery Literacy Wealth Region
81 Vienne 40 25 68 W
82 Haute-Vienne 55 13 67 C
83 Vosges 14 62 82 E
84 Yonne 51 47 30 C
85 Corse 83 49 37 NaN
Notice that there is one missing observation in the Region column. We
eliminate it using a DataFrame
method provided by pandas
:
In [8]: df = df.dropna()
In [9]: df[-5:]
Out[9]:
Department Lottery Literacy Wealth Region
80 Vendee 68 28 56 W
81 Vienne 40 25 68 W
82 Haute-Vienne 55 13 67 C
83 Vosges 14 62 82 E
84 Yonne 51 47 30 C
Substantive motivation and model¶
We want to know whether literacy rates in the 86 French departments are associated with per capita wagers on the Royal Lottery in the 1820s. We need to control for the level of wealth in each department, and we also want to include a series of dummy variables on the right-hand side of our regression equation to control for unobserved heterogeneity due to regional effects. The model is estimated using ordinary least squares regression (OLS).
Design matrices (endog & exog)¶
To fit most of the models covered by statsmodels
, you will need to create
two design matrices. The first is a matrix of endogenous variable(s) (i.e.
dependent, response, regressand, etc.). The second is a matrix of exogenous
variable(s) (i.e. independent, predictor, regressor, etc.). The OLS coefficient
estimates are calculated as usual:
where \(y\) is an \(N \times 1\) column of data on lottery wagers per capita (Lottery). \(X\) is \(N \times 7\) with an intercept, the Literacy and Wealth variables, and 4 region binary variables.
The patsy
module provides a convenient function to prepare design matrices
using R
-like formulas. You can find more information here.
We use patsy
’s dmatrices
function to create design matrices:
In [10]: y, X = dmatrices('Lottery ~ Literacy + Wealth + Region', data=df, return_type='dataframe')
The resulting matrices/data frames look like this:
In [11]: y[:3]
Out[11]:
Lottery
0 41.0
1 38.0
2 66.0
In [12]: X[:3]
Out[12]:
Intercept Region[T.E] Region[T.N] ... Region[T.W] Literacy Wealth
0 1.0 1.0 0.0 ... 0.0 37.0 73.0
1 1.0 0.0 1.0 ... 0.0 51.0 22.0
2 1.0 0.0 0.0 ... 0.0 13.0 61.0
[3 rows x 7 columns]
Notice that dmatrices
has
split the categorical Region variable into a set of indicator variables.
added a constant to the exogenous regressors matrix.
returned
pandas
DataFrames instead of simple numpy arrays. This is useful because DataFrames allowstatsmodels
to carry-over meta-data (e.g. variable names) when reporting results.
The above behavior can of course be altered. See the patsy doc pages.
Model fit and summary¶
Fitting a model in statsmodels
typically involves 3 easy steps:
Use the model class to describe the model
Fit the model using a class method
Inspect the results using a summary method
For OLS, this is achieved by:
In [13]: mod = sm.OLS(y, X) # Describe model
In [14]: res = mod.fit() # Fit model
In [15]: print(res.summary()) # Summarize model
OLS Regression Results
==============================================================================
Dep. Variable: Lottery R-squared: 0.338
Model: OLS Adj. R-squared: 0.287
Method: Least Squares F-statistic: 6.636
Date: Tue, 02 Feb 2021 Prob (F-statistic): 1.07e-05
Time: 07:07:06 Log-Likelihood: -375.30
No. Observations: 85 AIC: 764.6
Df Residuals: 78 BIC: 781.7
Df Model: 6
Covariance Type: nonrobust
===============================================================================
coef std err t P>|t| [0.025 0.975]
-------------------------------------------------------------------------------
Intercept 38.6517 9.456 4.087 0.000 19.826 57.478
Region[T.E] -15.4278 9.727 -1.586 0.117 -34.793 3.938
Region[T.N] -10.0170 9.260 -1.082 0.283 -28.453 8.419
Region[T.S] -4.5483 7.279 -0.625 0.534 -19.039 9.943
Region[T.W] -10.0913 7.196 -1.402 0.165 -24.418 4.235
Literacy -0.1858 0.210 -0.886 0.378 -0.603 0.232
Wealth 0.4515 0.103 4.390 0.000 0.247 0.656
==============================================================================
Omnibus: 3.049 Durbin-Watson: 1.785
Prob(Omnibus): 0.218 Jarque-Bera (JB): 2.694
Skew: -0.340 Prob(JB): 0.260
Kurtosis: 2.454 Cond. No. 371.
==============================================================================
Notes:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.
The res
object has many useful attributes. For example, we can extract
parameter estimates and r-squared by typing:
In [16]: res.params
Out[16]:
Intercept 38.651655
Region[T.E] -15.427785
Region[T.N] -10.016961
Region[T.S] -4.548257
Region[T.W] -10.091276
Literacy -0.185819
Wealth 0.451475
dtype: float64
In [17]: res.rsquared
Out[17]: 0.337950869192882
Type dir(res)
for a full list of attributes.
For more information and examples, see the Regression doc page
Diagnostics and specification tests¶
statsmodels
allows you to conduct a range of useful regression diagnostics
and specification tests. For instance,
apply the Rainbow test for linearity (the null hypothesis is that the
relationship is properly modelled as linear):
In [18]: sm.stats.linear_rainbow(res)
Out[18]: (0.8472339976156913, 0.6997965543621643)
Admittedly, the output produced above is not very verbose, but we know from
reading the docstring
(also, print(sm.stats.linear_rainbow.__doc__)
) that the
first number is an F-statistic and that the second is the p-value.
statsmodels
also provides graphics functions. For example, we can draw a
plot of partial regression for a set of regressors by:
In [19]: sm.graphics.plot_partregress('Lottery', 'Wealth', ['Region', 'Literacy'],
....: data=df, obs_labels=False)
....:
Out[19]: <Figure size 640x480 with 1 Axes>
Documentation¶
Documentation can be accessed from an IPython session
using webdoc
.
Opens a browser and displays online documentation |
More¶
Congratulations! You’re ready to move on to other topics in the Table of Contents


{% extends 'pageWrapper.html' %} {% block head %}
Welcome to the Archipelago Multiworld Randomizer!
This is a randomizer for The Legend of Zelda: A Link to the Past.
It is also a multi-world, meaning Link's items may have been placed into other players' games. When a player picks up an item which does not belong to them, it is sent back to the player it belongs to.
On this website you are able to generate and host multiworld games, and item and location trackers are provided for games hosted here.
This project is the cumulative effort of many talented people. Together, they have spent countless hours creating a huge repository of source code which has turned our crazy idea into a reality.
{{ seeds }} games were created and {{ rooms }} were hosted in the last 7 days.


Performs one-sample t-test based on robustified statistics using median/MAD (TA) and Hodges-Lehmann/Shamos (TB). For more details, see Park and Wang (2018)<arXiv:1807.02215>. This work was partially supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (No. NRF-2017R1A2B4004169).
| Version: | <IP_ADDRESS> |
| Depends: | R (≥ 3.2.3) |
| Published: | 2018-07-10 |
| Author: | Chanseok Park [aut, cre], Min Wang [ctb] |
| Maintainer: | Chanseok Park <statpnu at gmail.com> |
| License: | GPL-2 | GPL-3 |
| URL: | https://github.com/statpnu/R-package |
| NeedsCompilation: | no |
| Citation: | rt.test citation info |
| CRAN checks: | rt.test results |
| Reference manual: | rt.test.pdf |
| Package source: | rt.test_<IP_ADDRESS>.tar.gz |
| Windows binaries: | r-devel: rt.test_<IP_ADDRESS>.zip, r-release: rt.test_<IP_ADDRESS>.zip, r-oldrel: rt.test_<IP_ADDRESS>.zip |
| OS X binaries: | r-release: rt.test_<IP_ADDRESS>.tgz, r-oldrel: rt.test_<IP_ADDRESS>.tgz |
Please use the canonical form https://CRAN.R-project.org/package=rt.test to link to this page.


## React Quick Start Guide We are going to be looking at the quick start guide for both Windows and Mac ### Basic Dependencies 1. Node.js 2. Git Desktop or terminal 3. IDE like Visual Code Studio Click [Here for Mac](#2) Click [Here for Windows](#5) ---


Source
(defmethod rucksack-slot-index ((rucksack standard-rucksack) class slot
&key (errorp nil) (include-superclasses nil))
(unless (symbolp class)
(setq class (class-name class)))
(unless (symbolp slot)
(setq slot (slot-definition-name slot)))
(let ((slot-index-tables (slot-index-tables rucksack)))
(flet ((find-index (class)
(let ((slot-index-table (btree-search slot-index-tables class
:errorp nil)))
(and slot-index-table
(btree-search slot-index-table slot :errorp nil)))))
(or (find-index class)
(and include-superclasses
(loop for superclass in (class-precedence-list (find-class class))
thereis (find-index (class-name superclass))))
(and errorp
(simple-rucksack-error
"Can't find slot index for slot ~S of class ~S in ~S."
slot
class
rucksack))))))
Source Context


Guidance
Materials for administering the Modified Large Print (MLP) and Unified English Braille (UEB) versions of the 2016 key stage 1 English reading test
Ref: ISBN 978-1-78644-043-3 , STA/16/7462/BRp PDF , 991KB , 9 pages
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
Ref: ISBN 978-1-78644-044-0 , STA/16/7463/BRp PDF , 59.1KB , 4 pages
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
Ref: ISBN 978-1-78644-045-7 , STA/16/7464/BRp PDF , 445KB , 7 pages
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
Ref: ISBN 978-1-78644-236-9 , STA/16/7477/e PDF , 226KB , 4 pages
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
Ref: ISBN 978-1-78644-037-2 , STA/16/7456/MLp PDF , 1000KB , 30 pages
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
Ref: ISBN 978-1-78644-038-9 , STA/16/7457/MLp PDF , 955KB , 16 pages
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
Ref: ISBN 978-1-78644-038-9 , STA/16/7457/MLp PDF , 118KB , 14 pages
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
PDF , 163KB , 2 pages
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
Key stage 1 English reading tests were administered in schools in May 2016. Modified test materials and Mark Scheme Amendments were also provided.
Please refer to the copyright ownership report for details of how schools, educational establishments and third parties can use these materials.
Published: 17 January 2017


(TODO: I should fetch current tweets)
Tweets: {{$anchor.user}}
[ Filter:
(TODO: this should act as search box)
|
<< All
]
Loading...
[
{{tweet.user.nickname || tweet.user.name || tweet.user.screen_name }}
]: {{tweet.text}} (TODO: I want urls as links)
{{tweet.created_at}}
{{tweet.user.notes}}
tweets=(TODO: display me!!!)


McLaren reveals track-focused 620R
High-performance machine is limited to just 350 units
McLaren has announced a road-legal version of its GT4 race car – the 620R.
Limited to just 350 units – all of which will be hand-assembled at the firm’s factory in Woking – the 620R shares much of its componentry with McLaren’s track car.
Powered by a 3.8-litre twin-turbocharged V8 engine with 610bhp and 620Nm of torque, the 620R takes the title as the most powerful car in McLaren’s Sports Series.
It’ll crack 0 to 60mph in just 2.7seconds and hit a top speed of 200mph, sending its power to the rear wheels via a seven-speed DCT gearbox. Thanks to features such an adjustable carbon fibre rear wing, the 620R can generate up to 185kg of downforce.
The 620R also benefits from the race car version’s adjustable coilover dampers, with 32 individual settings available per corner. Its cornering performance is bolstered further thanks to stiffer anti-roll bars, carbon-ceramic brakes and ultra-sticky Pirelli P Zero Trofeo R semi-slick tyres.
Inside, the air conditioning has been removed, while the carpets and glove box have been removed in the quest for lightness. That said, the audio system and navigation – removed as standard – can be put back in at no extra cost.
Both driver and passenger sit in lightweight carbon fibre bucket seats with six-point harnesses, while the shift paddles, steering wheel spokes and centre console have all been crafted from the ultra-light material.
As mentioned, the 620R is limited to just 350 units, with each one commanding a £250,000 price tag. European and American buyers get a McLaren track day, featuring expert tuition, included as part of the car’s price, too. Production is set to commence in January.


|
libsir 2.2.2
Standard Incident Reporter
|
Compile-time configuration of libsir.
The following are applied at compile-time when executing make
:
The Makefile takes care of the rest; you may also feel free to edit the Makefile to suit your needs, avoiding this step entirely.
Available preprocessor macros:
| Macro (default) | State | Compiler settings | Description |
|---|---|---|---|
SIR_DEBUG (0) | 0 | -O3 -DNDEBUG | Full optimization is applied, and no debugging symbols are included. |
1 | -g3 -00 -DDEBUG | No optimizations are applied, and full debugging symbols are included. | |
SIR_SELFLOG (0) | 0 | N/A | NOOP |
1 | -DSIR_SELFLOG | Diagnostic information is sent to stderr to report certain events that may aid in debugging. Includes the function name, source file, and line where the event took place. If SIR_DEBUG and SIR_SELFLOG are enabled, each error handled internally will be logged in real time as it is captured. | |
SIR_ASSERT_ENABLED (0) | 0 | N/A | assert will never be called. If SIR_SELFLOG is enabled, where asserts normally would take place, a _sir_selflog call is made, producing output to stderr such as 'somefunc (file.c:123): !!! would be asserting (NULL != ptr) '. |
1 | -DSIR_ASSERT_ENABLED | assert will be used. Note that assert has no effect if NDEBUG is defined, so in order for this to be useful, you will also need SIR_DEBUG=1 (or manually change -DNDEBUG to -DDEBUG in the Makefile). | |
SIR_NO_SYSTEM_LOGGERS (0) | 0 | N/A | If the current platform has a system logger facility (currently all platforms do by default except Windows), you can utilize it as a destination in libsir. |
1 | -DSIR_NO_SYSTEM_LOGGERS | Even if the current platform has a system logger facility, the functionality will be disabled (and most of it compiled out). | |
SIR_NO_PLUGINS (0) | 0 | N/A | The plugin system is available for use. Call sir_loadplugin to load a plugin, and sir_unloadplugin to unload one. |
1 | -DSIR_NO_PLUGINS | The plugin system's functionality will be disabled (and most of it compiled out). |
README.md
under Help
once the solution is loaded.All of the fine-grained compile-time constants, such as (but not limited to):
can be found in config.h, and may be modified to fit your specific needs.
%d
are printf
-style. The man page or documentation for printf
can be used as a guide.