id int32 0 58k | repo stringlengths 5 67 | path stringlengths 4 116 | func_name stringlengths 0 58 | original_string stringlengths 52 373k | language stringclasses 1
value | code stringlengths 52 373k | code_tokens list | docstring stringlengths 4 11.8k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 86 226 |
|---|---|---|---|---|---|---|---|---|---|---|---|
10,600 | NASAWorldWind/WebWorldWind | examples/WktExporter.js | onExportWkt | function onExportWkt() {
// This is the actual export action.
var exportedWkt = WorldWind.WktExporter.exportRenderables(shapesLayer.renderables);
document.getElementById("wktTxtArea").value = exportedWkt;
} | javascript | function onExportWkt() {
// This is the actual export action.
var exportedWkt = WorldWind.WktExporter.exportRenderables(shapesLayer.renderables);
document.getElementById("wktTxtArea").value = exportedWkt;
} | [
"function",
"onExportWkt",
"(",
")",
"{",
"// This is the actual export action.",
"var",
"exportedWkt",
"=",
"WorldWind",
".",
"WktExporter",
".",
"exportRenderables",
"(",
"shapesLayer",
".",
"renderables",
")",
";",
"document",
".",
"getElementById",
"(",
"\"wktTxtA... | Export the surface shapes on click | [
"Export",
"the",
"surface",
"shapes",
"on",
"click"
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/examples/WktExporter.js#L115-L121 |
10,601 | NASAWorldWind/WebWorldWind | src/util/LevelSet.js | function (sector, levelZeroDelta, numLevels, tileWidth, tileHeight) {
if (!sector) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "LevelSet", "constructor", "missingSector"));
}
if (!levelZeroDelta) {
throw new A... | javascript | function (sector, levelZeroDelta, numLevels, tileWidth, tileHeight) {
if (!sector) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "LevelSet", "constructor", "missingSector"));
}
if (!levelZeroDelta) {
throw new A... | [
"function",
"(",
"sector",
",",
"levelZeroDelta",
",",
"numLevels",
",",
"tileWidth",
",",
"tileHeight",
")",
"{",
"if",
"(",
"!",
"sector",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",... | Constructs a level set.
@alias Level
@constructor
@classdesc Represents a multi-resolution, hierarchical collection of tiles. Applications typically do not
interact with this class.
@param {Sector} sector The sector spanned by this level set.
@param {Location} levelZeroDelta The geographic size of tiles in the lowest r... | [
"Constructs",
"a",
"level",
"set",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/util/LevelSet.js#L49-L127 | |
10,602 | NASAWorldWind/WebWorldWind | src/util/Logger.js | function (level, message) {
if (message && level > 0 && level <= loggingLevel) {
if (level === Logger.LEVEL_SEVERE) {
console.error(message);
} else if (level === Logger.LEVEL_WARNING) {
console.warn(message);
} else if ... | javascript | function (level, message) {
if (message && level > 0 && level <= loggingLevel) {
if (level === Logger.LEVEL_SEVERE) {
console.error(message);
} else if (level === Logger.LEVEL_WARNING) {
console.warn(message);
} else if ... | [
"function",
"(",
"level",
",",
"message",
")",
"{",
"if",
"(",
"message",
"&&",
"level",
">",
"0",
"&&",
"level",
"<=",
"loggingLevel",
")",
"{",
"if",
"(",
"level",
"===",
"Logger",
".",
"LEVEL_SEVERE",
")",
"{",
"console",
".",
"error",
"(",
"messa... | Logs a specified message at a specified level.
@param {Number} level The logging level of the message. If the current logging level allows this message to be
logged it is written to the console.
@param {String} message The message to log. Nothing is logged if the message is null or undefined. | [
"Logs",
"a",
"specified",
"message",
"at",
"a",
"specified",
"level",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/util/Logger.js#L69-L81 | |
10,603 | NASAWorldWind/WebWorldWind | src/util/ByteBuffer.js | function(array) {
if (!array) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "ByteBuffer", "constructor", "missingArray"));
}
/**
* The raw data of the array buffer.
* @type {ArrayBuffer}
*... | javascript | function(array) {
if (!array) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "ByteBuffer", "constructor", "missingArray"));
}
/**
* The raw data of the array buffer.
* @type {ArrayBuffer}
*... | [
"function",
"(",
"array",
")",
"{",
"if",
"(",
"!",
"array",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"ByteBuffer\"",
",",
"\"constructor\"",
",",
"\"missingArray\"",
")",
")",
... | Constructs a wrapper around an array buffer that enables byte-level access to its data.
This wrapper strives to minimize secondary allocations when subarrays are accessed.
The one exception is when double precision floating point data is access that is not properly aligned.
@alias ByteBuffer
@classdesc A structured wra... | [
"Constructs",
"a",
"wrapper",
"around",
"an",
"array",
"buffer",
"that",
"enables",
"byte",
"-",
"level",
"access",
"to",
"its",
"data",
".",
"This",
"wrapper",
"strives",
"to",
"minimize",
"secondary",
"allocations",
"when",
"subarrays",
"are",
"accessed",
".... | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/util/ByteBuffer.js#L36-L70 | |
10,604 | NASAWorldWind/WebWorldWind | src/layer/heatmap/HeatMapTile.js | function(data, options) {
this._data = data;
this._sector = options.sector;
this._canvas = this.createCanvas(options.width, options.height);
this._width = options.width;
this._height = options.height;
this._intensityGradient = options.intensityGradient;
this._... | javascript | function(data, options) {
this._data = data;
this._sector = options.sector;
this._canvas = this.createCanvas(options.width, options.height);
this._width = options.width;
this._height = options.height;
this._intensityGradient = options.intensityGradient;
this._... | [
"function",
"(",
"data",
",",
"options",
")",
"{",
"this",
".",
"_data",
"=",
"data",
";",
"this",
".",
"_sector",
"=",
"options",
".",
"sector",
";",
"this",
".",
"_canvas",
"=",
"this",
".",
"createCanvas",
"(",
"options",
".",
"width",
",",
"optio... | Constructs a HeatMapTile.
Returns one tile for the HeatMap information. It is basically an interface specifying the public methods
properties and default configuration. The logic itself is handled in the subclasses.
@alias HeatMapTile
@constructor
@classdesc Tile for the HeatMap layer visualising data on a canvas usi... | [
"Constructs",
"a",
"HeatMapTile",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/layer/heatmap/HeatMapTile.js#L40-L54 | |
10,605 | NASAWorldWind/WebWorldWind | src/formats/geotiff/GeoTiffMetadata.js | function () {
// Documented in defineProperties below.
this._bitsPerSample = null;
// Documented in defineProperties below.
this._colorMap = null;
// Documented in defineProperties below.
this._compression = null;
// Documented in d... | javascript | function () {
// Documented in defineProperties below.
this._bitsPerSample = null;
// Documented in defineProperties below.
this._colorMap = null;
// Documented in defineProperties below.
this._compression = null;
// Documented in d... | [
"function",
"(",
")",
"{",
"// Documented in defineProperties below.",
"this",
".",
"_bitsPerSample",
"=",
"null",
";",
"// Documented in defineProperties below.",
"this",
".",
"_colorMap",
"=",
"null",
";",
"// Documented in defineProperties below.",
"this",
".",
"_compres... | Provides GeoTIFF metadata.
@alias GeoTiffMetadata
@constructor
@classdesc Contains all of the TIFF and GeoTIFF metadata for a geotiff file. | [
"Provides",
"GeoTIFF",
"metadata",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/formats/geotiff/GeoTiffMetadata.js#L31-L167 | |
10,606 | NASAWorldWind/WebWorldWind | src/render/Texture.js | function (gl, image, wrapMode) {
if (!gl) {
throw new ArgumentError(Logger.logMessage(Logger.LEVEL_SEVERE, "Texture", "constructor",
"missingGlContext"));
}
if (!image) {
throw new ArgumentError(Logger.logMessage(Logger.LEVEL_SEVE... | javascript | function (gl, image, wrapMode) {
if (!gl) {
throw new ArgumentError(Logger.logMessage(Logger.LEVEL_SEVERE, "Texture", "constructor",
"missingGlContext"));
}
if (!image) {
throw new ArgumentError(Logger.logMessage(Logger.LEVEL_SEVE... | [
"function",
"(",
"gl",
",",
"image",
",",
"wrapMode",
")",
"{",
"if",
"(",
"!",
"gl",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"Texture\"",
",",
"\"constructor\"",
",",
"\"mis... | Constructs a texture for a specified image.
@alias Texture
@constructor
@classdesc Represents a WebGL texture. Applications typically do not interact with this class.
@param {WebGLRenderingContext} gl The current WebGL rendering context.
@param {Image} image The texture's image.
@param {GLenum} wrapMode Optional. Speci... | [
"Constructs",
"a",
"texture",
"for",
"a",
"specified",
"image",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/render/Texture.js#L40-L102 | |
10,607 | NASAWorldWind/WebWorldWind | src/shapes/ShapeAttributes.js | function (attributes) {
// All these are documented with their property accessors below.
this._drawInterior = attributes ? attributes._drawInterior : true;
this._drawOutline = attributes ? attributes._drawOutline : true;
this._enableLighting = attributes ? attributes._en... | javascript | function (attributes) {
// All these are documented with their property accessors below.
this._drawInterior = attributes ? attributes._drawInterior : true;
this._drawOutline = attributes ? attributes._drawOutline : true;
this._enableLighting = attributes ? attributes._en... | [
"function",
"(",
"attributes",
")",
"{",
"// All these are documented with their property accessors below.",
"this",
".",
"_drawInterior",
"=",
"attributes",
"?",
"attributes",
".",
"_drawInterior",
":",
"true",
";",
"this",
".",
"_drawOutline",
"=",
"attributes",
"?",
... | Constructs a shape attributes bundle, optionally specifying a prototype set of attributes. Not all shapes
use all the properties in the bundle. See the documentation of a specific shape to determine the properties
it does use.
@alias ShapeAttributes
@constructor
@classdesc Holds attributes applied to WorldWind shapes.
... | [
"Constructs",
"a",
"shape",
"attributes",
"bundle",
"optionally",
"specifying",
"a",
"prototype",
"set",
"of",
"attributes",
".",
"Not",
"all",
"shapes",
"use",
"all",
"the",
"properties",
"in",
"the",
"bundle",
".",
"See",
"the",
"documentation",
"of",
"a",
... | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/shapes/ShapeAttributes.js#L39-L63 | |
10,608 | NASAWorldWind/WebWorldWind | src/shapes/SurfacePolyline.js | function (locations, attributes) {
if (!locations) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "SurfacePolyline", "constructor",
"The specified locations array is null or undefined."));
}
SurfaceShape.... | javascript | function (locations, attributes) {
if (!locations) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "SurfacePolyline", "constructor",
"The specified locations array is null or undefined."));
}
SurfaceShape.... | [
"function",
"(",
"locations",
",",
"attributes",
")",
"{",
"if",
"(",
"!",
"locations",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"SurfacePolyline\"",
",",
"\"constructor\"",
",",
... | Constructs a surface polyline.
@alias SurfacePolyline
@constructor
@augments SurfaceShape
@classdesc Represents a polyline draped over the terrain surface.
<p>
SurfacePolyline uses the following attributes from its associated shape attributes bundle:
<ul>
<li>Draw outline</li>
<li>Outline color</li>
<li>Outline width</... | [
"Constructs",
"a",
"surface",
"polyline",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/shapes/SurfacePolyline.js#L52-L71 | |
10,609 | NASAWorldWind/WebWorldWind | src/util/BasicTimeSequence.js | function (dates) {
if (!dates && dates.length < 2) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "BasicTimeSequence", "constructor", "missingDates"));
}
/**
* This sequence's list of Dates.
* @type {D... | javascript | function (dates) {
if (!dates && dates.length < 2) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "BasicTimeSequence", "constructor", "missingDates"));
}
/**
* This sequence's list of Dates.
* @type {D... | [
"function",
"(",
"dates",
")",
"{",
"if",
"(",
"!",
"dates",
"&&",
"dates",
".",
"length",
"<",
"2",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"BasicTimeSequence\"",
",",
"\"co... | Constructs a time sequence from an array of Dates.
@alias BasicTimeSequence
@constructor
@classdesc Represents a time sequence described as an array of Date objects as required by WMS.
This class provides iteration over the sequence in steps
specified by the period. If the start and end dates are different, iteration w... | [
"Constructs",
"a",
"time",
"sequence",
"from",
"an",
"array",
"of",
"Dates",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/util/BasicTimeSequence.js#L40-L66 | |
10,610 | NASAWorldWind/WebWorldWind | src/shaders/GpuShader.js | function (gl, shaderType, shaderSource) {
if (!(shaderType === gl.VERTEX_SHADER
|| shaderType === gl.FRAGMENT_SHADER)) {
throw new ArgumentError(Logger.logMessage(Logger.LEVEL_SEVERE, "GpuShader", "constructor",
"The specified shader type is unrecognized."... | javascript | function (gl, shaderType, shaderSource) {
if (!(shaderType === gl.VERTEX_SHADER
|| shaderType === gl.FRAGMENT_SHADER)) {
throw new ArgumentError(Logger.logMessage(Logger.LEVEL_SEVERE, "GpuShader", "constructor",
"The specified shader type is unrecognized."... | [
"function",
"(",
"gl",
",",
"shaderType",
",",
"shaderSource",
")",
"{",
"if",
"(",
"!",
"(",
"shaderType",
"===",
"gl",
".",
"VERTEX_SHADER",
"||",
"shaderType",
"===",
"gl",
".",
"FRAGMENT_SHADER",
")",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"... | Constructs a GPU shader of a specified type with specified GLSL source code.
@alias GpuShader
@constructor
@classdesc
Represents an OpenGL shading language (GLSL) shader and provides methods for compiling and disposing
of them.
@param {WebGLRenderingContext} gl The current WebGL context.
@param {Number} shaderType Th... | [
"Constructs",
"a",
"GPU",
"shader",
"of",
"a",
"specified",
"type",
"with",
"specified",
"GLSL",
"source",
"code",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/shaders/GpuShader.js#L44-L73 | |
10,611 | NASAWorldWind/WebWorldWind | src/shapes/SurfaceCircle.js | function (center, radius, attributes) {
if (!center) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "SurfaceCircle", "constructor", "missingLocation"));
}
if (radius < 0) {
throw new ArgumentError(
... | javascript | function (center, radius, attributes) {
if (!center) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "SurfaceCircle", "constructor", "missingLocation"));
}
if (radius < 0) {
throw new ArgumentError(
... | [
"function",
"(",
"center",
",",
"radius",
",",
"attributes",
")",
"{",
"if",
"(",
"!",
"center",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"SurfaceCircle\"",
",",
"\"constructor\""... | Constructs a surface circle with a specified center and radius and an optional attributes bundle.
@alias SurfaceCircle
@constructor
@augments SurfaceShape
@classdesc Represents a circle draped over the terrain surface.
<p>
SurfaceCircle uses the following attributes from its associated shape attributes bundle:
<ul>
<li... | [
"Constructs",
"a",
"surface",
"circle",
"with",
"a",
"specified",
"center",
"and",
"radius",
"and",
"an",
"optional",
"attributes",
"bundle",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/shapes/SurfaceCircle.js#L57-L74 | |
10,612 | NASAWorldWind/WebWorldWind | apps/util/ServersPanel.js | function (worldWindow, layersPanel, timeSeriesPlayer) {
var thisServersPanel = this;
this.wwd = worldWindow;
this.layersPanel = layersPanel;
this.timeSeriesPlayer = timeSeriesPlayer;
this.idCounter = 1;
this.legends = {};
$("#addServerBox").find("button").on("... | javascript | function (worldWindow, layersPanel, timeSeriesPlayer) {
var thisServersPanel = this;
this.wwd = worldWindow;
this.layersPanel = layersPanel;
this.timeSeriesPlayer = timeSeriesPlayer;
this.idCounter = 1;
this.legends = {};
$("#addServerBox").find("button").on("... | [
"function",
"(",
"worldWindow",
",",
"layersPanel",
",",
"timeSeriesPlayer",
")",
"{",
"var",
"thisServersPanel",
"=",
"this",
";",
"this",
".",
"wwd",
"=",
"worldWindow",
";",
"this",
".",
"layersPanel",
"=",
"layersPanel",
";",
"this",
".",
"timeSeriesPlayer... | Constructs a servers panel.
@alias ServersPanel
@constructor
@classdesc Provides a list of collapsible panels that indicate the layers associated with a WMS or other
image server. Currently only WMS is supported. The user can select a server's layers and they will be added to
the WorldWindow's layer list.
@param {World... | [
"Constructs",
"a",
"servers",
"panel",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/apps/util/ServersPanel.js#L33-L51 | |
10,613 | NASAWorldWind/WebWorldWind | src/layer/CoordinatesDisplayLayer.js | function (worldWindow) {
if (!worldWindow) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "CoordinatesDisplayLayer", "constructor", "missingWorldWindow"));
}
Layer.call(this, "Coordinates");
/**
* The W... | javascript | function (worldWindow) {
if (!worldWindow) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "CoordinatesDisplayLayer", "constructor", "missingWorldWindow"));
}
Layer.call(this, "Coordinates");
/**
* The W... | [
"function",
"(",
"worldWindow",
")",
"{",
"if",
"(",
"!",
"worldWindow",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"CoordinatesDisplayLayer\"",
",",
"\"constructor\"",
",",
"\"missingW... | Constructs a layer that displays the current map coordinates.
@alias CoordinatesDisplayLayer
@constructor
@augments Layer
@classDesc Displays the current map coordinates. A coordinates display layer cannot be shared among World
Windows. Each WorldWindow if it is to have a coordinates display layer must have its own. Se... | [
"Constructs",
"a",
"layer",
"that",
"displays",
"the",
"current",
"map",
"coordinates",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/layer/CoordinatesDisplayLayer.js#L59-L139 | |
10,614 | NASAWorldWind/WebWorldWind | src/geom/Plane.js | function (x, y, z, distance) {
/**
* The normal vector to the plane.
* @type {Vec3}
*/
this.normal = new Vec3(x, y, z);
/**
* The plane's distance from the origin.
* @type {Number}
*/
this.dist... | javascript | function (x, y, z, distance) {
/**
* The normal vector to the plane.
* @type {Vec3}
*/
this.normal = new Vec3(x, y, z);
/**
* The plane's distance from the origin.
* @type {Number}
*/
this.dist... | [
"function",
"(",
"x",
",",
"y",
",",
"z",
",",
"distance",
")",
"{",
"/**\n * The normal vector to the plane.\n * @type {Vec3}\n */",
"this",
".",
"normal",
"=",
"new",
"Vec3",
"(",
"x",
",",
"y",
",",
"z",
")",
";",
"/**\n ... | Constructs a plane.
This constructor does not normalize the components. It assumes that a unit normal vector is provided.
@alias Plane
@constructor
@classdesc Represents a plane in Cartesian coordinates.
The plane's X, Y and Z components indicate the plane's normal vector. The distance component
indicates the plane's d... | [
"Constructs",
"a",
"plane",
".",
"This",
"constructor",
"does",
"not",
"normalize",
"the",
"components",
".",
"It",
"assumes",
"that",
"a",
"unit",
"normal",
"vector",
"is",
"provided",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/geom/Plane.js#L46-L58 | |
10,615 | NASAWorldWind/WebWorldWind | src/globe/EarthElevationModel.js | function () {
ElevationModel.call(this);
this.addCoverage(new GebcoElevationCoverage());
this.addCoverage(new AsterV2ElevationCoverage());
this.addCoverage(new UsgsNedElevationCoverage());
this.addCoverage(new UsgsNedHiElevationCoverage());
} | javascript | function () {
ElevationModel.call(this);
this.addCoverage(new GebcoElevationCoverage());
this.addCoverage(new AsterV2ElevationCoverage());
this.addCoverage(new UsgsNedElevationCoverage());
this.addCoverage(new UsgsNedHiElevationCoverage());
} | [
"function",
"(",
")",
"{",
"ElevationModel",
".",
"call",
"(",
"this",
")",
";",
"this",
".",
"addCoverage",
"(",
"new",
"GebcoElevationCoverage",
"(",
")",
")",
";",
"this",
".",
"addCoverage",
"(",
"new",
"AsterV2ElevationCoverage",
"(",
")",
")",
";",
... | Constructs an EarthElevationModel consisting of three elevation coverages GEBCO, Aster V2, and USGS NED.
@alias EarthElevationModel
@constructor | [
"Constructs",
"an",
"EarthElevationModel",
"consisting",
"of",
"three",
"elevation",
"coverages",
"GEBCO",
"Aster",
"V2",
"and",
"USGS",
"NED",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/globe/EarthElevationModel.js#L39-L46 | |
10,616 | NASAWorldWind/WebWorldWind | src/ogc/wcs/WcsCoverageDescriptions.js | function (xmlDom) {
if (!xmlDom) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "WcsCoverageDescriptions", "constructor", "missingDom"));
}
/**
* The original unmodified XML document. Referenced for use in advanced ... | javascript | function (xmlDom) {
if (!xmlDom) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "WcsCoverageDescriptions", "constructor", "missingDom"));
}
/**
* The original unmodified XML document. Referenced for use in advanced ... | [
"function",
"(",
"xmlDom",
")",
"{",
"if",
"(",
"!",
"xmlDom",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"WcsCoverageDescriptions\"",
",",
"\"constructor\"",
",",
"\"missingDom\"",
"... | Constructs a simple javascript object representation of an OGC WCS Describe Coverage XML response.
@alias WcsCoverageDescriptions
@constructor
@classdesc Represents the common properties of a WCS CoverageDescription document. Common properties are
parsed and mapped to a plain javascript object model. Most fields can be... | [
"Constructs",
"a",
"simple",
"javascript",
"object",
"representation",
"of",
"an",
"OGC",
"WCS",
"Describe",
"Coverage",
"XML",
"response",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/ogc/wcs/WcsCoverageDescriptions.js#L50-L63 | |
10,617 | NASAWorldWind/WebWorldWind | src/shapes/ScreenImage.js | function (screenOffset, imageSource) {
if (!screenOffset) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "ScreenImage", "constructor", "missingOffset"));
}
if (!imageSource) {
throw new ArgumentError(
... | javascript | function (screenOffset, imageSource) {
if (!screenOffset) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "ScreenImage", "constructor", "missingOffset"));
}
if (!imageSource) {
throw new ArgumentError(
... | [
"function",
"(",
"screenOffset",
",",
"imageSource",
")",
"{",
"if",
"(",
"!",
"screenOffset",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"ScreenImage\"",
",",
"\"constructor\"",
",",... | Constructs a screen image.
@alias ScreenImage
@constructor
@augments Renderable
@classdesc Displays an image at a specified screen location in the WorldWindow.
The image location is specified by an offset, which causes the image to maintain its relative position
when the window size changes.
@param {Offset} screenOffse... | [
"Constructs",
"a",
"screen",
"image",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/shapes/ScreenImage.js#L62-L158 | |
10,618 | NASAWorldWind/WebWorldWind | src/shapes/SurfaceShape.js | function () {
// If we don't have a state key for the shape attributes, consider this state key to be invalid.
if (!this._attributesStateKey) {
// Update the state key for the appropriate attributes for future
if (this._highlighted)... | javascript | function () {
// If we don't have a state key for the shape attributes, consider this state key to be invalid.
if (!this._attributesStateKey) {
// Update the state key for the appropriate attributes for future
if (this._highlighted)... | [
"function",
"(",
")",
"{",
"// If we don't have a state key for the shape attributes, consider this state key to be invalid.",
"if",
"(",
"!",
"this",
".",
"_attributesStateKey",
")",
"{",
"// Update the state key for the appropriate attributes for future",
"if",
"(",
"this",
".",
... | A hash key of the total visible external state of the surface shape.
@memberof SurfaceShape.prototype
@type {String} | [
"A",
"hash",
"key",
"of",
"the",
"total",
"visible",
"external",
"state",
"of",
"the",
"surface",
"shape",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/shapes/SurfaceShape.js#L190-L235 | |
10,619 | NASAWorldWind/WebWorldWind | src/util/WcsTileUrlBuilder.js | function (serviceAddress, coverageName, wcsVersion) {
if (!serviceAddress || (serviceAddress.length === 0)) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "WcsTileUrlBuilder", "constructor",
"The WCS service address is missing.")... | javascript | function (serviceAddress, coverageName, wcsVersion) {
if (!serviceAddress || (serviceAddress.length === 0)) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "WcsTileUrlBuilder", "constructor",
"The WCS service address is missing.")... | [
"function",
"(",
"serviceAddress",
",",
"coverageName",
",",
"wcsVersion",
")",
"{",
"if",
"(",
"!",
"serviceAddress",
"||",
"(",
"serviceAddress",
".",
"length",
"===",
"0",
")",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
... | Constructs a WCS tile URL builder.
@alias WcsTileUrlBuilder
@constructor
@classdesc Provides a factory to create URLs for WCS Get Coverage requests.
@param {String} serviceAddress The address of the WCS server.
@param {String} coverageName The name of the coverage to retrieve.
@param {String} wcsVersion The version of ... | [
"Constructs",
"a",
"WCS",
"tile",
"URL",
"builder",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/util/WcsTileUrlBuilder.js#L40-L78 | |
10,620 | NASAWorldWind/WebWorldWind | src/shapes/Annotation.js | function (position, attributes) {
if (!position) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "Annotation", "constructor", "missingPosition"));
}
Renderable.call(this);
/**
* This annotation's geogra... | javascript | function (position, attributes) {
if (!position) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "Annotation", "constructor", "missingPosition"));
}
Renderable.call(this);
/**
* This annotation's geogra... | [
"function",
"(",
"position",
",",
"attributes",
")",
"{",
"if",
"(",
"!",
"position",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"Annotation\"",
",",
"\"constructor\"",
",",
"\"miss... | Constructs an annotation.
@alias Annotation
@constructor
@augments Renderable
@classdesc Represents an Annotation shape. An annotation displays a callout, a text and a leader pointing
the annotation's geographic position to the ground.
@param {Position} position The annotations's geographic position.
@param {Annotation... | [
"Constructs",
"an",
"annotation",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/shapes/Annotation.js#L62-L126 | |
10,621 | NASAWorldWind/WebWorldWind | src/shapes/SurfaceRectangle.js | function (center, width, height, heading, attributes) {
if (!center) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "SurfaceRectangle", "constructor", "missingLocation"));
}
if (width < 0 || height < 0) {
throw n... | javascript | function (center, width, height, heading, attributes) {
if (!center) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "SurfaceRectangle", "constructor", "missingLocation"));
}
if (width < 0 || height < 0) {
throw n... | [
"function",
"(",
"center",
",",
"width",
",",
"height",
",",
"heading",
",",
"attributes",
")",
"{",
"if",
"(",
"!",
"center",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"Surfac... | Constructs a surface rectangle with a specified center and size and an optional attributes bundle.
@alias SurfaceRectangle
@constructor
@augments SurfaceShape
@classdesc Represents a rectangle draped over the terrain surface.
<p>
SurfaceRectangle uses the following attributes from its associated shape attributes bundle... | [
"Constructs",
"a",
"surface",
"rectangle",
"with",
"a",
"specified",
"center",
"and",
"size",
"and",
"an",
"optional",
"attributes",
"bundle",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/shapes/SurfaceRectangle.js#L64-L82 | |
10,622 | NASAWorldWind/WebWorldWind | src/geom/Matrix3.js | function (m11, m12, m13,
m21, m22, m23,
m31, m32, m33) {
this[0] = m11;
this[1] = m12;
this[2] = m13;
this[3] = m21;
this[4] = m22;
this[5] = m23;
this[6] = m31;
... | javascript | function (m11, m12, m13,
m21, m22, m23,
m31, m32, m33) {
this[0] = m11;
this[1] = m12;
this[2] = m13;
this[3] = m21;
this[4] = m22;
this[5] = m23;
this[6] = m31;
... | [
"function",
"(",
"m11",
",",
"m12",
",",
"m13",
",",
"m21",
",",
"m22",
",",
"m23",
",",
"m31",
",",
"m32",
",",
"m33",
")",
"{",
"this",
"[",
"0",
"]",
"=",
"m11",
";",
"this",
"[",
"1",
"]",
"=",
"m12",
";",
"this",
"[",
"2",
"]",
"=",
... | Constructs a 3 x 3 matrix.
@alias Matrix3
@constructor
@classdesc Represents a 3 x 3 double precision matrix stored in a Float64Array in row-major order.
@param {Number} m11 matrix element at row 1, column 1.
@param {Number} m12 matrix element at row 1, column 2.
@param {Number} m13 matrix element at row 1, column 3.
... | [
"Constructs",
"a",
"3",
"x",
"3",
"matrix",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/geom/Matrix3.js#L44-L56 | |
10,623 | NASAWorldWind/WebWorldWind | src/error/UnsupportedOperationError.js | function (message) {
AbstractError.call(this, "UnsupportedOperationError", message);
var stack;
try {
//noinspection ExceptionCaughtLocallyJS
throw new Error();
} catch (e) {
stack = e.stack;
}
this.... | javascript | function (message) {
AbstractError.call(this, "UnsupportedOperationError", message);
var stack;
try {
//noinspection ExceptionCaughtLocallyJS
throw new Error();
} catch (e) {
stack = e.stack;
}
this.... | [
"function",
"(",
"message",
")",
"{",
"AbstractError",
".",
"call",
"(",
"this",
",",
"\"UnsupportedOperationError\"",
",",
"message",
")",
";",
"var",
"stack",
";",
"try",
"{",
"//noinspection ExceptionCaughtLocallyJS",
"throw",
"new",
"Error",
"(",
")",
";",
... | Constructs an unsupported-operation error with a specified message.
@alias UnsupportedOperationError
@constructor
@classdesc Represents an error associated with an operation that is not available or should not be invoked.
Typically raised when an abstract function of an abstract base class is called because a subclass ... | [
"Constructs",
"an",
"unsupported",
"-",
"operation",
"error",
"with",
"a",
"specified",
"message",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/error/UnsupportedOperationError.js#L34-L45 | |
10,624 | NASAWorldWind/WebWorldWind | src/globe/TerrainTile.js | function (sector, level, row, column) {
Tile.call(this, sector, level, row, column); // args are checked in the superclass' constructor
/**
* The transformation matrix that maps tile local coordinates to model coordinates.
* @type {Matrix}
*/
t... | javascript | function (sector, level, row, column) {
Tile.call(this, sector, level, row, column); // args are checked in the superclass' constructor
/**
* The transformation matrix that maps tile local coordinates to model coordinates.
* @type {Matrix}
*/
t... | [
"function",
"(",
"sector",
",",
"level",
",",
"row",
",",
"column",
")",
"{",
"Tile",
".",
"call",
"(",
"this",
",",
"sector",
",",
"level",
",",
"row",
",",
"column",
")",
";",
"// args are checked in the superclass' constructor",
"/**\n * The trans... | Constructs a terrain tile.
@alias TerrainTile
@constructor
@augments Tile
@classdesc Represents a portion of a globe's terrain. Applications typically do not interact directly with
this class.
@param {Sector} sector The sector this tile covers.
@param {Level} level The level this tile is associated with.
@param {Number... | [
"Constructs",
"a",
"terrain",
"tile",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/globe/TerrainTile.js#L46-L90 | |
10,625 | NASAWorldWind/WebWorldWind | src/layer/RestTiledImageLayer.js | function (serverAddress, pathToData, displayName, configuration) {
var cachePath = WWUtil.urlPath(serverAddress + "/" + pathToData);
TiledImageLayer.call(this,
(configuration && configuration.sector) || Sector.FULL_SPHERE,
(configuration && configuration.levelZer... | javascript | function (serverAddress, pathToData, displayName, configuration) {
var cachePath = WWUtil.urlPath(serverAddress + "/" + pathToData);
TiledImageLayer.call(this,
(configuration && configuration.sector) || Sector.FULL_SPHERE,
(configuration && configuration.levelZer... | [
"function",
"(",
"serverAddress",
",",
"pathToData",
",",
"displayName",
",",
"configuration",
")",
"{",
"var",
"cachePath",
"=",
"WWUtil",
".",
"urlPath",
"(",
"serverAddress",
"+",
"\"/\"",
"+",
"pathToData",
")",
";",
"TiledImageLayer",
".",
"call",
"(",
... | Constructs a tiled image layer that uses a REST interface to retrieve its imagery.
@alias RestTiledImageLayer
@constructor
@augments TiledImageLayer
@classdesc Displays a layer whose imagery is retrieved using a REST interface.
See [LevelRowColumnUrlBuilder]{@link LevelRowColumnUrlBuilder} for a description of the REST... | [
"Constructs",
"a",
"tiled",
"image",
"layer",
"that",
"uses",
"a",
"REST",
"interface",
"to",
"retrieve",
"its",
"imagery",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/layer/RestTiledImageLayer.js#L61-L76 | |
10,626 | NASAWorldWind/WebWorldWind | src/ogc/wcs/WcsCoverage.js | function (coverageId, webCoverageService) {
if (!coverageId) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "WcsCoverage", "constructor", "missingId"));
}
if (!webCoverageService) {
throw new ArgumentError(
... | javascript | function (coverageId, webCoverageService) {
if (!coverageId) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "WcsCoverage", "constructor", "missingId"));
}
if (!webCoverageService) {
throw new ArgumentError(
... | [
"function",
"(",
"coverageId",
",",
"webCoverageService",
")",
"{",
"if",
"(",
"!",
"coverageId",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"WcsCoverage\"",
",",
"\"constructor\"",
"... | A simple object representation of a Web Coverage Service coverage. Provides utility methods and properties
for use in common WCS Coverage operations.
@param {String} coverageId the name or id of the coverage
@param {WebCoverageService} webCoverageService the WebCoverageService providing the coverage
@constructor | [
"A",
"simple",
"object",
"representation",
"of",
"a",
"Web",
"Coverage",
"Service",
"coverage",
".",
"Provides",
"utility",
"methods",
"and",
"properties",
"for",
"use",
"in",
"common",
"WCS",
"Coverage",
"operations",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/ogc/wcs/WcsCoverage.js#L37-L77 | |
10,627 | NASAWorldWind/WebWorldWind | src/layer/BMNGRestLayer.js | function (serverAddress, pathToData, displayName, initialTime) {
Layer.call(this, displayName || "Blue Marble time series");
/**
* A value indicating the month to display. The nearest month to the specified time is displayed.
* @type {Date}
* @default Janu... | javascript | function (serverAddress, pathToData, displayName, initialTime) {
Layer.call(this, displayName || "Blue Marble time series");
/**
* A value indicating the month to display. The nearest month to the specified time is displayed.
* @type {Date}
* @default Janu... | [
"function",
"(",
"serverAddress",
",",
"pathToData",
",",
"displayName",
",",
"initialTime",
")",
"{",
"Layer",
".",
"call",
"(",
"this",
",",
"displayName",
"||",
"\"Blue Marble time series\"",
")",
";",
"/**\n * A value indicating the month to display. The n... | Constructs a Blue Marble layer.
@alias BMNGRestLayer
@constructor
@augments Layer
@classdesc Represents the 12 month collection of Blue Marble Next Generation imagery for the year 2004.
By default the month of January is displayed, but this can be changed by setting this class' time
property to indicate the month to di... | [
"Constructs",
"a",
"Blue",
"Marble",
"layer",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/layer/BMNGRestLayer.js#L53-L92 | |
10,628 | NASAWorldWind/WebWorldWind | examples/ParseUrlArguments.js | function () {
var result = {};
var queryString = window.location.href.split("?");
if (queryString && queryString.length > 1) {
var args = queryString[1].split("&");
for (var a = 0; a < args.length; a++) {
var arg = args[a].split("... | javascript | function () {
var result = {};
var queryString = window.location.href.split("?");
if (queryString && queryString.length > 1) {
var args = queryString[1].split("&");
for (var a = 0; a < args.length; a++) {
var arg = args[a].split("... | [
"function",
"(",
")",
"{",
"var",
"result",
"=",
"{",
"}",
";",
"var",
"queryString",
"=",
"window",
".",
"location",
".",
"href",
".",
"split",
"(",
"\"?\"",
")",
";",
"if",
"(",
"queryString",
"&&",
"queryString",
".",
"length",
">",
"1",
")",
"{... | Function to obtain arguments from query string. | [
"Function",
"to",
"obtain",
"arguments",
"from",
"query",
"string",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/examples/ParseUrlArguments.js#L54-L77 | |
10,629 | NASAWorldWind/WebWorldWind | src/render/TextRenderer.js | function (drawContext) {
if (!drawContext) {
throw new ArgumentError(Logger.logMessage(Logger.LEVEL_SEVERE, "TextRenderer", "constructor",
"missingDc"));
}
// Internal use only. Intentionally not documented.
this.canvas2D = document.cr... | javascript | function (drawContext) {
if (!drawContext) {
throw new ArgumentError(Logger.logMessage(Logger.LEVEL_SEVERE, "TextRenderer", "constructor",
"missingDc"));
}
// Internal use only. Intentionally not documented.
this.canvas2D = document.cr... | [
"function",
"(",
"drawContext",
")",
"{",
"if",
"(",
"!",
"drawContext",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"TextRenderer\"",
",",
"\"constructor\"",
",",
"\"missingDc\"",
")"... | Constructs a TextRenderer instance.
@alias TextRenderer
@constructor
@classdesc Provides methods useful for displaying text. An instance of this class is attached to the
WorldWindow {@link DrawContext} and is not intended to be used independently of that. Applications typically do
not create instances of this class.
@p... | [
"Constructs",
"a",
"TextRenderer",
"instance",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/render/TextRenderer.js#L51-L99 | |
10,630 | NASAWorldWind/WebWorldWind | apps/util/GoToBox.js | function (worldWindow) {
var thisGoToBox = this;
this.wwd = worldWindow;
$("#searchBox").find("button").on("click", function (e) {
thisGoToBox.onSearchButton(e);
});
this.geocoder = new WorldWind.NominatimGeocoder();
$("#searchText").on("keypress", function ... | javascript | function (worldWindow) {
var thisGoToBox = this;
this.wwd = worldWindow;
$("#searchBox").find("button").on("click", function (e) {
thisGoToBox.onSearchButton(e);
});
this.geocoder = new WorldWind.NominatimGeocoder();
$("#searchText").on("keypress", function ... | [
"function",
"(",
"worldWindow",
")",
"{",
"var",
"thisGoToBox",
"=",
"this",
";",
"this",
".",
"wwd",
"=",
"worldWindow",
";",
"$",
"(",
"\"#searchBox\"",
")",
".",
"find",
"(",
"\"button\"",
")",
".",
"on",
"(",
"\"click\"",
",",
"function",
"(",
"e",... | Constructs a GoToBox.
@alias GoToBox
@constructor
@classdesc Provides a search box enabling the user to find and move to specified locations.
@param {WorldWindow} worldWindow The WorldWindow to associate this GoToBox with. | [
"Constructs",
"a",
"GoToBox",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/apps/util/GoToBox.js#L30-L42 | |
10,631 | NASAWorldWind/WebWorldWind | examples/WMS.js | function (xmlDom) {
// Create a WmsCapabilities object from the XML DOM
var wms = new WorldWind.WmsCapabilities(xmlDom);
// Retrieve a WmsLayerCapabilities object by the desired layer name
var wmsLayerCapabilities = wms.getNamedLayer(layerName);
// Form a conf... | javascript | function (xmlDom) {
// Create a WmsCapabilities object from the XML DOM
var wms = new WorldWind.WmsCapabilities(xmlDom);
// Retrieve a WmsLayerCapabilities object by the desired layer name
var wmsLayerCapabilities = wms.getNamedLayer(layerName);
// Form a conf... | [
"function",
"(",
"xmlDom",
")",
"{",
"// Create a WmsCapabilities object from the XML DOM",
"var",
"wms",
"=",
"new",
"WorldWind",
".",
"WmsCapabilities",
"(",
"xmlDom",
")",
";",
"// Retrieve a WmsLayerCapabilities object by the desired layer name",
"var",
"wmsLayerCapabilitie... | Called asynchronously to parse and create the WMS layer | [
"Called",
"asynchronously",
"to",
"parse",
"and",
"create",
"the",
"WMS",
"layer"
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/examples/WMS.js#L59-L74 | |
10,632 | NASAWorldWind/WebWorldWind | src/formats/kml/util/KmlRemoteFile.js | function(options) {
if(!options.ajax && !options.zip) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "RemoteDocument", "constructor",
"Invalid option for retrieval specified. Use either ajax or zip option.")
);
}
thi... | javascript | function(options) {
if(!options.ajax && !options.zip) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "RemoteDocument", "constructor",
"Invalid option for retrieval specified. Use either ajax or zip option.")
);
}
thi... | [
"function",
"(",
"options",
")",
"{",
"if",
"(",
"!",
"options",
".",
"ajax",
"&&",
"!",
"options",
".",
"zip",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"RemoteDocument\"",
",... | Creates representation of KmlRemoteFile. In order to load an object it is necessary to run get function on created object.
@param options {Object}
@param options.ajax {Boolean} If we should use plain AJAX
@param options.zip {Boolean} If we are downloading kmz
@param options.responseType {String} Optional responseType a... | [
"Creates",
"representation",
"of",
"KmlRemoteFile",
".",
"In",
"order",
"to",
"load",
"an",
"object",
"it",
"is",
"necessary",
"to",
"run",
"get",
"function",
"on",
"created",
"object",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/formats/kml/util/KmlRemoteFile.js#L36-L45 | |
10,633 | NASAWorldWind/WebWorldWind | src/shapes/SurfaceEllipse.js | function (center, majorRadius, minorRadius, heading, attributes) {
if (!center) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "SurfaceEllipse", "constructor", "missingLocation"));
}
if (majorRadius < 0 || minorRadius < 0) {
... | javascript | function (center, majorRadius, minorRadius, heading, attributes) {
if (!center) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "SurfaceEllipse", "constructor", "missingLocation"));
}
if (majorRadius < 0 || minorRadius < 0) {
... | [
"function",
"(",
"center",
",",
"majorRadius",
",",
"minorRadius",
",",
"heading",
",",
"attributes",
")",
"{",
"if",
"(",
"!",
"center",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
... | Constructs a surface ellipse with a specified center and radii and an optional attributes bundle.
@alias SurfaceEllipse
@constructor
@augments SurfaceShape
@classdesc Represents an ellipse draped over the terrain surface.
<p>
SurfaceEllipse uses the following attributes from its associated shape attributes bundle:
<ul>... | [
"Constructs",
"a",
"surface",
"ellipse",
"with",
"a",
"specified",
"center",
"and",
"radii",
"and",
"an",
"optional",
"attributes",
"bundle",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/shapes/SurfaceEllipse.js#L64-L83 | |
10,634 | NASAWorldWind/WebWorldWind | src/ogc/wms/WmsLayerCapabilities.js | function (layerElement, parentNode) {
if (!layerElement) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "WmsLayerCapabilities", "constructor",
"Layer element is null or undefined."));
}
/**
*... | javascript | function (layerElement, parentNode) {
if (!layerElement) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "WmsLayerCapabilities", "constructor",
"Layer element is null or undefined."));
}
/**
*... | [
"function",
"(",
"layerElement",
",",
"parentNode",
")",
"{",
"if",
"(",
"!",
"layerElement",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"WmsLayerCapabilities\"",
",",
"\"constructor\""... | Constructs an WMS Layer instance from an XML DOM.
@alias WmsLayerCapabilities
@constructor
@classdesc Represents a WMS layer description from a WMS Capabilities document. This object holds all the
fields specified in the associated WMS Capabilities document.
@param {{}} layerElement A WMS Layer element describing the l... | [
"Constructs",
"an",
"WMS",
"Layer",
"instance",
"from",
"an",
"XML",
"DOM",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/ogc/wms/WmsLayerCapabilities.js#L38-L119 | |
10,635 | NASAWorldWind/WebWorldWind | src/shapes/Placemark.js | function (position, eyeDistanceScaling, attributes) {
if (!position) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "Placemark", "constructor", "missingPosition"));
}
Renderable.call(this);
/**
* The pl... | javascript | function (position, eyeDistanceScaling, attributes) {
if (!position) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "Placemark", "constructor", "missingPosition"));
}
Renderable.call(this);
/**
* The pl... | [
"function",
"(",
"position",
",",
"eyeDistanceScaling",
",",
"attributes",
")",
"{",
"if",
"(",
"!",
"position",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"Placemark\"",
",",
"\"co... | Constructs a placemark.
@alias Placemark
@constructor
@augments Renderable
@classdesc Represents a Placemark shape. A placemark displays an image, a label and a leader line connecting
the placemark's geographic position to the ground. All three of these items are optional. By default, the
leader line is not pickable. S... | [
"Constructs",
"a",
"placemark",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/shapes/Placemark.js#L75-L281 | |
10,636 | NASAWorldWind/WebWorldWind | src/shapes/SurfaceSector.js | function (sector, attributes) {
if (!sector) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "SurfaceSector", "constructor", "missingSector"));
}
SurfaceShape.call(this, attributes);
/**
* This shape's s... | javascript | function (sector, attributes) {
if (!sector) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "SurfaceSector", "constructor", "missingSector"));
}
SurfaceShape.call(this, attributes);
/**
* This shape's s... | [
"function",
"(",
"sector",
",",
"attributes",
")",
"{",
"if",
"(",
"!",
"sector",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"SurfaceSector\"",
",",
"\"constructor\"",
",",
"\"missi... | Constructs a surface sector.
@alias SurfaceSector
@constructor
@augments SurfaceShape
@classdesc Represents a sector draped over the terrain surface. The sector is specified as a rectangular
region in geographic coordinates. By default, a surface sector is drawn with a linear path, see
{@link SurfaceShape#pathType}.
<p... | [
"Constructs",
"a",
"surface",
"sector",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/shapes/SurfaceSector.js#L58-L74 | |
10,637 | NASAWorldWind/WebWorldWind | src/layer/WmsLayer.js | function (config, timeString) {
if (!config) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "WmsLayer", "constructor", "No configuration specified."));
}
var cachePath = config.service + config.layerNames + config.styleNames;
... | javascript | function (config, timeString) {
if (!config) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "WmsLayer", "constructor", "No configuration specified."));
}
var cachePath = config.service + config.layerNames + config.styleNames;
... | [
"function",
"(",
"config",
",",
"timeString",
")",
"{",
"if",
"(",
"!",
"config",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"WmsLayer\"",
",",
"\"constructor\"",
",",
"\"No configu... | Constructs a WMS image layer.
@alias WmsLayer
@constructor
@augments TiledImageLayer
@classdesc Displays a WMS image layer.
@param {{}} config Specifies configuration information for the layer. Must contain the following
properties:
<ul>
<li>service: {String} The URL of the WMS server.</li>
<li>layerNames: {String} A c... | [
"Constructs",
"a",
"WMS",
"image",
"layer",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/layer/WmsLayer.js#L63-L92 | |
10,638 | NASAWorldWind/WebWorldWind | src/geom/BoundingBox.js | function () {
/**
* The box's center point.
* @type {Vec3}
* @default (0, 0, 0)
*/
this.center = new Vec3(0, 0, 0);
/**
* The center point of the box's bottom. (The origin of the R axis.)
* @type {Vec3}
... | javascript | function () {
/**
* The box's center point.
* @type {Vec3}
* @default (0, 0, 0)
*/
this.center = new Vec3(0, 0, 0);
/**
* The center point of the box's bottom. (The origin of the R axis.)
* @type {Vec3}
... | [
"function",
"(",
")",
"{",
"/**\n * The box's center point.\n * @type {Vec3}\n * @default (0, 0, 0)\n */",
"this",
".",
"center",
"=",
"new",
"Vec3",
"(",
"0",
",",
"0",
",",
"0",
")",
";",
"/**\n * The center point of... | Constructs a unit bounding box.
The unit box has its R, S and T axes aligned with the X, Y and Z axes, respectively, and has its length,
width and height set to 1.
@alias BoundingBox
@constructor
@classdesc Represents a bounding box in Cartesian coordinates. Typically used as a bounding volume. | [
"Constructs",
"a",
"unit",
"bounding",
"box",
".",
"The",
"unit",
"box",
"has",
"its",
"R",
"S",
"and",
"T",
"axes",
"aligned",
"with",
"the",
"X",
"Y",
"and",
"Z",
"axes",
"respectively",
"and",
"has",
"its",
"length",
"width",
"and",
"height",
"set",... | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/geom/BoundingBox.js#L54-L113 | |
10,639 | NASAWorldWind/WebWorldWind | src/globe/TiledElevationCoverage.js | function (config) {
if (!config) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "TiledElevationCoverage", "constructor", "missingConfig"));
}
if (!config.coverageSector) {
throw new ArgumentError(
... | javascript | function (config) {
if (!config) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "TiledElevationCoverage", "constructor", "missingConfig"));
}
if (!config.coverageSector) {
throw new ArgumentError(
... | [
"function",
"(",
"config",
")",
"{",
"if",
"(",
"!",
"config",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage",
"(",
"Logger",
".",
"LEVEL_SEVERE",
",",
"\"TiledElevationCoverage\"",
",",
"\"constructor\"",
",",
"\"missingConfig\"",
... | Constructs a TiledElevationCoverage
@alias TiledElevationCoverage
@constructor
@classdesc Represents the elevations for an area, often but not necessarily the whole globe.
@param {{}} config Configuration properties for the coverage:
<ul>
<li>coverageSector: {Sector} The sector this coverage spans.</li>
<li>resolution:... | [
"Constructs",
"a",
"TiledElevationCoverage"
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/globe/TiledElevationCoverage.js#L63-L198 | |
10,640 | NASAWorldWind/WebWorldWind | src/layer/WmtsLayerTile.js | function (sector, tileMatrix, row, column, imagePath) {
this.sector = sector;
this.tileMatrix = tileMatrix;
this.row = row;
this.column = column;
this.imagePath = imagePath;
this.texelSize = (sector.deltaLatitude() * Angle.DEGREES_TO_RADIANS) / ti... | javascript | function (sector, tileMatrix, row, column, imagePath) {
this.sector = sector;
this.tileMatrix = tileMatrix;
this.row = row;
this.column = column;
this.imagePath = imagePath;
this.texelSize = (sector.deltaLatitude() * Angle.DEGREES_TO_RADIANS) / ti... | [
"function",
"(",
"sector",
",",
"tileMatrix",
",",
"row",
",",
"column",
",",
"imagePath",
")",
"{",
"this",
".",
"sector",
"=",
"sector",
";",
"this",
".",
"tileMatrix",
"=",
"tileMatrix",
";",
"this",
".",
"row",
"=",
"row",
";",
"this",
".",
"colu... | This is an internal class and is intentionally not documented. | [
"This",
"is",
"an",
"internal",
"class",
"and",
"is",
"intentionally",
"not",
"documented",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/layer/WmtsLayerTile.js#L34-L46 | |
10,641 | NASAWorldWind/WebWorldWind | src/render/FramebufferTile.js | function (sector, level, row, column, cacheKey) {
if (!cacheKey || (cacheKey.length < 1)) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "FramebufferTile", "constructor",
"The specified cache name is null, undefined or zero lengt... | javascript | function (sector, level, row, column, cacheKey) {
if (!cacheKey || (cacheKey.length < 1)) {
throw new ArgumentError(
Logger.logMessage(Logger.LEVEL_SEVERE, "FramebufferTile", "constructor",
"The specified cache name is null, undefined or zero lengt... | [
"function",
"(",
"sector",
",",
"level",
",",
"row",
",",
"column",
",",
"cacheKey",
")",
"{",
"if",
"(",
"!",
"cacheKey",
"||",
"(",
"cacheKey",
".",
"length",
"<",
"1",
")",
")",
"{",
"throw",
"new",
"ArgumentError",
"(",
"Logger",
".",
"logMessage... | Constructs a framebuffer tile.
@alias FramebufferTile
@constructor
@augments TextureTile
@classdesc Represents a WebGL framebuffer applied to a portion of a globe's terrain. The framebuffer's width
and height in pixels are equal to this tile's [tileWidth]{@link FramebufferTile#tileWidth} and
[tileHeight]{@link Framebuf... | [
"Constructs",
"a",
"framebuffer",
"tile",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/src/render/FramebufferTile.js#L57-L74 | |
10,642 | NASAWorldWind/WebWorldWind | examples/Measurements.js | doCalc | function doCalc() {
var distance = lengthMeasurer.getLength(pathPositions, false, WorldWind.GREAT_CIRCLE);
var terrainDistance = lengthMeasurer.getLength(pathPositions, true, WorldWind.GREAT_CIRCLE);
var geographicDistance = lengthMeasurer.getGeographicDistance(pathPositions, WorldWi... | javascript | function doCalc() {
var distance = lengthMeasurer.getLength(pathPositions, false, WorldWind.GREAT_CIRCLE);
var terrainDistance = lengthMeasurer.getLength(pathPositions, true, WorldWind.GREAT_CIRCLE);
var geographicDistance = lengthMeasurer.getGeographicDistance(pathPositions, WorldWi... | [
"function",
"doCalc",
"(",
")",
"{",
"var",
"distance",
"=",
"lengthMeasurer",
".",
"getLength",
"(",
"pathPositions",
",",
"false",
",",
"WorldWind",
".",
"GREAT_CIRCLE",
")",
";",
"var",
"terrainDistance",
"=",
"lengthMeasurer",
".",
"getLength",
"(",
"pathP... | Calculate the length and area measurements of the path defined before. | [
"Calculate",
"the",
"length",
"and",
"area",
"measurements",
"of",
"the",
"path",
"defined",
"before",
"."
] | 399daee66deded581a2d1067a2ac04232c954b8f | https://github.com/NASAWorldWind/WebWorldWind/blob/399daee66deded581a2d1067a2ac04232c954b8f/examples/Measurements.js#L93-L106 |
10,643 | objectivehtml/FlipClock | src/flipclock/js/libs/timer.js | function(callback) {
this.factory.running = false;
this._clearInterval(callback);
this.callback(this.callbacks.stop);
this.callback(callback);
} | javascript | function(callback) {
this.factory.running = false;
this._clearInterval(callback);
this.callback(this.callbacks.stop);
this.callback(callback);
} | [
"function",
"(",
"callback",
")",
"{",
"this",
".",
"factory",
".",
"running",
"=",
"false",
";",
"this",
".",
"_clearInterval",
"(",
"callback",
")",
";",
"this",
".",
"callback",
"(",
"this",
".",
"callbacks",
".",
"stop",
")",
";",
"this",
".",
"c... | This method is stops the timer
@param callback A function that is called once the timer is destroyed
@return void | [
"This",
"method",
"is",
"stops",
"the",
"timer"
] | 6559204ce92585d29ccc1b5f303de9b85bf3f76a | https://github.com/objectivehtml/FlipClock/blob/6559204ce92585d29ccc1b5f303de9b85bf3f76a/src/flipclock/js/libs/timer.js#L129-L134 | |
10,644 | objectivehtml/FlipClock | src/flipclock/js/libs/timer.js | function(callback) {
var t = this;
t._interval(callback);
t.timer = setInterval(function() {
t._interval(callback);
}, this.interval);
} | javascript | function(callback) {
var t = this;
t._interval(callback);
t.timer = setInterval(function() {
t._interval(callback);
}, this.interval);
} | [
"function",
"(",
"callback",
")",
"{",
"var",
"t",
"=",
"this",
";",
"t",
".",
"_interval",
"(",
"callback",
")",
";",
"t",
".",
"timer",
"=",
"setInterval",
"(",
"function",
"(",
")",
"{",
"t",
".",
"_interval",
"(",
"callback",
")",
";",
"}",
"... | This sets the timer interval
@param callback A function that is called once the timer is destroyed
@return void | [
"This",
"sets",
"the",
"timer",
"interval"
] | 6559204ce92585d29ccc1b5f303de9b85bf3f76a | https://github.com/objectivehtml/FlipClock/blob/6559204ce92585d29ccc1b5f303de9b85bf3f76a/src/flipclock/js/libs/timer.js#L191-L199 | |
10,645 | objectivehtml/FlipClock | src/flipclock/js/libs/face.js | function(digit) {
var obj = this.createList(digit, {
classes: {
active: this.factory.classes.active,
before: this.factory.classes.before,
flip: this.factory.classes.flip
}
});
this.appendDigitToClock(obj);
} | javascript | function(digit) {
var obj = this.createList(digit, {
classes: {
active: this.factory.classes.active,
before: this.factory.classes.before,
flip: this.factory.classes.flip
}
});
this.appendDigitToClock(obj);
} | [
"function",
"(",
"digit",
")",
"{",
"var",
"obj",
"=",
"this",
".",
"createList",
"(",
"digit",
",",
"{",
"classes",
":",
"{",
"active",
":",
"this",
".",
"factory",
".",
"classes",
".",
"active",
",",
"before",
":",
"this",
".",
"factory",
".",
"c... | Add a digit to the clock face | [
"Add",
"a",
"digit",
"to",
"the",
"clock",
"face"
] | 6559204ce92585d29ccc1b5f303de9b85bf3f76a | https://github.com/objectivehtml/FlipClock/blob/6559204ce92585d29ccc1b5f303de9b85bf3f76a/src/flipclock/js/libs/face.js#L160-L170 | |
10,646 | objectivehtml/FlipClock | src/flipclock/js/libs/factory.js | function(name) {
var lang;
if(FlipClock.Lang[name.ucfirst()]) {
lang = FlipClock.Lang[name.ucfirst()];
}
else if(FlipClock.Lang[name]) {
lang = FlipClock.Lang[name];
}
else {
lang = FlipClock.Lang[this.defaultLanguage];
}
return this.lang = lang;
} | javascript | function(name) {
var lang;
if(FlipClock.Lang[name.ucfirst()]) {
lang = FlipClock.Lang[name.ucfirst()];
}
else if(FlipClock.Lang[name]) {
lang = FlipClock.Lang[name];
}
else {
lang = FlipClock.Lang[this.defaultLanguage];
}
return this.lang = lang;
} | [
"function",
"(",
"name",
")",
"{",
"var",
"lang",
";",
"if",
"(",
"FlipClock",
".",
"Lang",
"[",
"name",
".",
"ucfirst",
"(",
")",
"]",
")",
"{",
"lang",
"=",
"FlipClock",
".",
"Lang",
"[",
"name",
".",
"ucfirst",
"(",
")",
"]",
";",
"}",
"else... | Load the FlipClock.Lang object
@param object The name of the language to load | [
"Load",
"the",
"FlipClock",
".",
"Lang",
"object"
] | 6559204ce92585d29ccc1b5f303de9b85bf3f76a | https://github.com/objectivehtml/FlipClock/blob/6559204ce92585d29ccc1b5f303de9b85bf3f76a/src/flipclock/js/libs/factory.js#L245-L259 | |
10,647 | objectivehtml/FlipClock | src/flipclock/js/libs/factory.js | function(callback) {
var t = this;
if(!t.running && (!t.countdown || t.countdown && t.time.time > 0)) {
t.face.start(t.time);
t.timer.start(function() {
t.flip();
if(typeof callback === "function") {
callback();
}
});
}
else {
t.log('Trying to start timer when co... | javascript | function(callback) {
var t = this;
if(!t.running && (!t.countdown || t.countdown && t.time.time > 0)) {
t.face.start(t.time);
t.timer.start(function() {
t.flip();
if(typeof callback === "function") {
callback();
}
});
}
else {
t.log('Trying to start timer when co... | [
"function",
"(",
"callback",
")",
"{",
"var",
"t",
"=",
"this",
";",
"if",
"(",
"!",
"t",
".",
"running",
"&&",
"(",
"!",
"t",
".",
"countdown",
"||",
"t",
".",
"countdown",
"&&",
"t",
".",
"time",
".",
"time",
">",
"0",
")",
")",
"{",
"t",
... | Starts the clock | [
"Starts",
"the",
"clock"
] | 6559204ce92585d29ccc1b5f303de9b85bf3f76a | https://github.com/objectivehtml/FlipClock/blob/6559204ce92585d29ccc1b5f303de9b85bf3f76a/src/flipclock/js/libs/factory.js#L293-L309 | |
10,648 | objectivehtml/FlipClock | src/flipclock/js/libs/core.js | function(_default, options) {
if(typeof _default !== "object") {
_default = {};
}
if(typeof options !== "object") {
options = {};
}
this.setOptions($.extend(true, {}, _default, options));
} | javascript | function(_default, options) {
if(typeof _default !== "object") {
_default = {};
}
if(typeof options !== "object") {
options = {};
}
this.setOptions($.extend(true, {}, _default, options));
} | [
"function",
"(",
"_default",
",",
"options",
")",
"{",
"if",
"(",
"typeof",
"_default",
"!==",
"\"object\"",
")",
"{",
"_default",
"=",
"{",
"}",
";",
"}",
"if",
"(",
"typeof",
"options",
"!==",
"\"object\"",
")",
"{",
"options",
"=",
"{",
"}",
";",
... | Sets the default options
@param object The default options
@param object The override options | [
"Sets",
"the",
"default",
"options"
] | 6559204ce92585d29ccc1b5f303de9b85bf3f76a | https://github.com/objectivehtml/FlipClock/blob/6559204ce92585d29ccc1b5f303de9b85bf3f76a/src/flipclock/js/libs/core.js#L69-L77 | |
10,649 | objectivehtml/FlipClock | src/flipclock/js/libs/core.js | function(method) {
if(typeof method === "function") {
var args = [];
for(var x = 1; x <= arguments.length; x++) {
if(arguments[x]) {
args.push(arguments[x]);
}
}
method.apply(this, args);
}
} | javascript | function(method) {
if(typeof method === "function") {
var args = [];
for(var x = 1; x <= arguments.length; x++) {
if(arguments[x]) {
args.push(arguments[x]);
}
}
method.apply(this, args);
}
} | [
"function",
"(",
"method",
")",
"{",
"if",
"(",
"typeof",
"method",
"===",
"\"function\"",
")",
"{",
"var",
"args",
"=",
"[",
"]",
";",
"for",
"(",
"var",
"x",
"=",
"1",
";",
"x",
"<=",
"arguments",
".",
"length",
";",
"x",
"++",
")",
"{",
"if"... | Delegates the callback to the defined method
@param object The default options
@param object The override options | [
"Delegates",
"the",
"callback",
"to",
"the",
"defined",
"method"
] | 6559204ce92585d29ccc1b5f303de9b85bf3f76a | https://github.com/objectivehtml/FlipClock/blob/6559204ce92585d29ccc1b5f303de9b85bf3f76a/src/flipclock/js/libs/core.js#L86-L98 | |
10,650 | objectivehtml/FlipClock | src/flipclock/js/libs/time.js | function(str) {
var data = [];
str = str.toString();
for(var x = 0;x < str.length; x++) {
if(str[x].match(/^\d*$/g)) {
data.push(str[x]);
}
}
return data;
} | javascript | function(str) {
var data = [];
str = str.toString();
for(var x = 0;x < str.length; x++) {
if(str[x].match(/^\d*$/g)) {
data.push(str[x]);
}
}
return data;
} | [
"function",
"(",
"str",
")",
"{",
"var",
"data",
"=",
"[",
"]",
";",
"str",
"=",
"str",
".",
"toString",
"(",
")",
";",
"for",
"(",
"var",
"x",
"=",
"0",
";",
"x",
"<",
"str",
".",
"length",
";",
"x",
"++",
")",
"{",
"if",
"(",
"str",
"["... | Convert a string or integer to an array of digits
@param mixed String or Integer of digits
@return array An array of digits | [
"Convert",
"a",
"string",
"or",
"integer",
"to",
"an",
"array",
"of",
"digits"
] | 6559204ce92585d29ccc1b5f303de9b85bf3f76a | https://github.com/objectivehtml/FlipClock/blob/6559204ce92585d29ccc1b5f303de9b85bf3f76a/src/flipclock/js/libs/time.js#L77-L89 | |
10,651 | objectivehtml/FlipClock | src/flipclock/js/libs/time.js | function(i) {
var timeStr = this.toString();
var length = timeStr.length;
if(timeStr[length - i]) {
return timeStr[length - i];
}
return false;
} | javascript | function(i) {
var timeStr = this.toString();
var length = timeStr.length;
if(timeStr[length - i]) {
return timeStr[length - i];
}
return false;
} | [
"function",
"(",
"i",
")",
"{",
"var",
"timeStr",
"=",
"this",
".",
"toString",
"(",
")",
";",
"var",
"length",
"=",
"timeStr",
".",
"length",
";",
"if",
"(",
"timeStr",
"[",
"length",
"-",
"i",
"]",
")",
"{",
"return",
"timeStr",
"[",
"length",
... | Get a specific digit from the time integer
@param int The specific digit to select from the time
@return mixed Returns FALSE if no digit is found, otherwise
the method returns the defined digit | [
"Get",
"a",
"specific",
"digit",
"from",
"the",
"time",
"integer"
] | 6559204ce92585d29ccc1b5f303de9b85bf3f76a | https://github.com/objectivehtml/FlipClock/blob/6559204ce92585d29ccc1b5f303de9b85bf3f76a/src/flipclock/js/libs/time.js#L99-L108 | |
10,652 | objectivehtml/FlipClock | src/flipclock/js/libs/time.js | function(obj) {
var data = [];
$.each(obj, function(i, value) {
value = value.toString();
if(value.length == 1) {
value = '0'+value;
}
for(var x = 0; x < value.length; x++) {
data.push(value.charAt(x));
}
});
if(data.length > this.minimumDigits) {
this.minim... | javascript | function(obj) {
var data = [];
$.each(obj, function(i, value) {
value = value.toString();
if(value.length == 1) {
value = '0'+value;
}
for(var x = 0; x < value.length; x++) {
data.push(value.charAt(x));
}
});
if(data.length > this.minimumDigits) {
this.minim... | [
"function",
"(",
"obj",
")",
"{",
"var",
"data",
"=",
"[",
"]",
";",
"$",
".",
"each",
"(",
"obj",
",",
"function",
"(",
"i",
",",
"value",
")",
"{",
"value",
"=",
"value",
".",
"toString",
"(",
")",
";",
"if",
"(",
"value",
".",
"length",
"=... | Formats any array of digits into a valid array of digits
@param mixed An array of digits
@return array An array of digits | [
"Formats",
"any",
"array",
"of",
"digits",
"into",
"a",
"valid",
"array",
"of",
"digits"
] | 6559204ce92585d29ccc1b5f303de9b85bf3f76a | https://github.com/objectivehtml/FlipClock/blob/6559204ce92585d29ccc1b5f303de9b85bf3f76a/src/flipclock/js/libs/time.js#L117-L143 | |
10,653 | objectivehtml/FlipClock | src/flipclock/js/libs/time.js | function(includeSeconds) {
var digits = [
this.getDays(),
this.getHours(true),
this.getMinutes(true)
];
if(includeSeconds) {
digits.push(this.getSeconds(true));
}
return this.digitize(digits);
} | javascript | function(includeSeconds) {
var digits = [
this.getDays(),
this.getHours(true),
this.getMinutes(true)
];
if(includeSeconds) {
digits.push(this.getSeconds(true));
}
return this.digitize(digits);
} | [
"function",
"(",
"includeSeconds",
")",
"{",
"var",
"digits",
"=",
"[",
"this",
".",
"getDays",
"(",
")",
",",
"this",
".",
"getHours",
"(",
"true",
")",
",",
"this",
".",
"getMinutes",
"(",
"true",
")",
"]",
";",
"if",
"(",
"includeSeconds",
")",
... | Gets a digitized daily counter
@return object Returns a digitized object | [
"Gets",
"a",
"digitized",
"daily",
"counter"
] | 6559204ce92585d29ccc1b5f303de9b85bf3f76a | https://github.com/objectivehtml/FlipClock/blob/6559204ce92585d29ccc1b5f303de9b85bf3f76a/src/flipclock/js/libs/time.js#L165-L177 | |
10,654 | objectivehtml/FlipClock | src/flipclock/js/libs/time.js | function(date) {
if(!date) {
date = new Date();
}
if (this.time instanceof Date) {
if (this.factory.countdown) {
return Math.max(this.time.getTime()/1000 - date.getTime()/1000,0);
} else {
return date.getTime()/1000 - this.time.getTime()/1000 ;
}
} else {
return this.time;
... | javascript | function(date) {
if(!date) {
date = new Date();
}
if (this.time instanceof Date) {
if (this.factory.countdown) {
return Math.max(this.time.getTime()/1000 - date.getTime()/1000,0);
} else {
return date.getTime()/1000 - this.time.getTime()/1000 ;
}
} else {
return this.time;
... | [
"function",
"(",
"date",
")",
"{",
"if",
"(",
"!",
"date",
")",
"{",
"date",
"=",
"new",
"Date",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"time",
"instanceof",
"Date",
")",
"{",
"if",
"(",
"this",
".",
"factory",
".",
"countdown",
")",
"{",
... | Gets time count in seconds regardless of if targetting date or not.
@return int Returns a floored integer | [
"Gets",
"time",
"count",
"in",
"seconds",
"regardless",
"of",
"if",
"targetting",
"date",
"or",
"not",
"."
] | 6559204ce92585d29ccc1b5f303de9b85bf3f76a | https://github.com/objectivehtml/FlipClock/blob/6559204ce92585d29ccc1b5f303de9b85bf3f76a/src/flipclock/js/libs/time.js#L302-L316 | |
10,655 | objectivehtml/FlipClock | src/flipclock/js/libs/time.js | function(totalDigits, digits) {
var total = 0;
var newArray = [];
$.each(digits, function(i, digit) {
if(i < totalDigits) {
total += parseInt(digits[i], 10);
}
else {
newArray.push(digits[i]);
}
});
if(total === 0) {
return newArray;
}
return digits;
} | javascript | function(totalDigits, digits) {
var total = 0;
var newArray = [];
$.each(digits, function(i, digit) {
if(i < totalDigits) {
total += parseInt(digits[i], 10);
}
else {
newArray.push(digits[i]);
}
});
if(total === 0) {
return newArray;
}
return digits;
} | [
"function",
"(",
"totalDigits",
",",
"digits",
")",
"{",
"var",
"total",
"=",
"0",
";",
"var",
"newArray",
"=",
"[",
"]",
";",
"$",
".",
"each",
"(",
"digits",
",",
"function",
"(",
"i",
",",
"digit",
")",
"{",
"if",
"(",
"i",
"<",
"totalDigits",... | Removes a specific number of leading zeros from the array.
This method prevents you from removing too many digits, even
if you try.
@param int Total number of digits to remove
@return array An array of digits | [
"Removes",
"a",
"specific",
"number",
"of",
"leading",
"zeros",
"from",
"the",
"array",
".",
"This",
"method",
"prevents",
"you",
"from",
"removing",
"too",
"many",
"digits",
"even",
"if",
"you",
"try",
"."
] | 6559204ce92585d29ccc1b5f303de9b85bf3f76a | https://github.com/objectivehtml/FlipClock/blob/6559204ce92585d29ccc1b5f303de9b85bf3f76a/src/flipclock/js/libs/time.js#L398-L416 | |
10,656 | objectivehtml/FlipClock | src/flipclock/js/libs/time.js | function(x) {
if(this.time instanceof Date) {
this.time.setSeconds(this.time.getSeconds() + x);
}
else {
this.time += x;
}
} | javascript | function(x) {
if(this.time instanceof Date) {
this.time.setSeconds(this.time.getSeconds() + x);
}
else {
this.time += x;
}
} | [
"function",
"(",
"x",
")",
"{",
"if",
"(",
"this",
".",
"time",
"instanceof",
"Date",
")",
"{",
"this",
".",
"time",
".",
"setSeconds",
"(",
"this",
".",
"time",
".",
"getSeconds",
"(",
")",
"+",
"x",
")",
";",
"}",
"else",
"{",
"this",
".",
"t... | Adds X second to the current time | [
"Adds",
"X",
"second",
"to",
"the",
"current",
"time"
] | 6559204ce92585d29ccc1b5f303de9b85bf3f76a | https://github.com/objectivehtml/FlipClock/blob/6559204ce92585d29ccc1b5f303de9b85bf3f76a/src/flipclock/js/libs/time.js#L422-L429 | |
10,657 | joeferner/redis-commander | lib/util.js | createRedisClient | function createRedisClient(clientConfig, callback) {
let c = require('config');
let client = null;
let conId = null;
let redisOpts = {
//showFriendlyErrorStack: true,
db: clientConfig.dbIndex,
password: clientConfig.password,
connectionName: clientConfig.connectionName || c.get('redis.connectio... | javascript | function createRedisClient(clientConfig, callback) {
let c = require('config');
let client = null;
let conId = null;
let redisOpts = {
//showFriendlyErrorStack: true,
db: clientConfig.dbIndex,
password: clientConfig.password,
connectionName: clientConfig.connectionName || c.get('redis.connectio... | [
"function",
"createRedisClient",
"(",
"clientConfig",
",",
"callback",
")",
"{",
"let",
"c",
"=",
"require",
"(",
"'config'",
")",
";",
"let",
"client",
"=",
"null",
";",
"let",
"conId",
"=",
"null",
";",
"let",
"redisOpts",
"=",
"{",
"//showFriendlyErrorS... | Function to craete a new redis client object by given parameter
This one is used by creating clients at startup from command line, config file
or new connections added via ui during runtime.
The redis client created can be either a normal redis client or a sentinel client, base on
configuration given.
@param {object} ... | [
"Function",
"to",
"craete",
"a",
"new",
"redis",
"client",
"object",
"by",
"given",
"parameter",
"This",
"one",
"is",
"used",
"by",
"creating",
"clients",
"at",
"startup",
"from",
"command",
"line",
"config",
"file",
"or",
"new",
"connections",
"added",
"via... | c8966ff20f53fac73537643b64162d4007af68a8 | https://github.com/joeferner/redis-commander/blob/c8966ff20f53fac73537643b64162d4007af68a8/lib/util.js#L282-L338 |
10,658 | joeferner/redis-commander | lib/util.js | parseRedisSentinel | function parseRedisSentinel(key, sentinelsString) {
if (!sentinelsString) return [];
// convert array entries from string to object if needed
if (Array.isArray(sentinelsString)) {
sentinelsString.forEach(function(entry, index) {
if (typeof entry === 'string') {
let tmp = entry.trim().split(':')... | javascript | function parseRedisSentinel(key, sentinelsString) {
if (!sentinelsString) return [];
// convert array entries from string to object if needed
if (Array.isArray(sentinelsString)) {
sentinelsString.forEach(function(entry, index) {
if (typeof entry === 'string') {
let tmp = entry.trim().split(':')... | [
"function",
"parseRedisSentinel",
"(",
"key",
",",
"sentinelsString",
")",
"{",
"if",
"(",
"!",
"sentinelsString",
")",
"return",
"[",
"]",
";",
"// convert array entries from string to object if needed",
"if",
"(",
"Array",
".",
"isArray",
"(",
"sentinelsString",
"... | Parse a string with redis sentinel names and ports to an objects as needed
by ioredis for connections.
Allowed formats are:
<ul>
<li>comma separeted list of <code>hostname:port</code> values, port is optional</li>
<li>JSON-String with list of <code>hostname:port</code> string entries</li>
<li>JSON-String with list of ... | [
"Parse",
"a",
"string",
"with",
"redis",
"sentinel",
"names",
"and",
"ports",
"to",
"an",
"objects",
"as",
"needed",
"by",
"ioredis",
"for",
"connections",
"."
] | c8966ff20f53fac73537643b64162d4007af68a8 | https://github.com/joeferner/redis-commander/blob/c8966ff20f53fac73537643b64162d4007af68a8/lib/util.js#L621-L666 |
10,659 | joeferner/redis-commander | web/static/scripts/redisCommander.js | enableJsonValidationCheck | function enableJsonValidationCheck(value, isJsonCheckBox) {
try {
JSON.parse(value);
// if this is valid json and is array or object assume we want validation active
if (value.match(/^\s*[{\[]/)) {
$(isJsonCheckBox).click();
}
}
catch (ex) {
// do nothing
}
} | javascript | function enableJsonValidationCheck(value, isJsonCheckBox) {
try {
JSON.parse(value);
// if this is valid json and is array or object assume we want validation active
if (value.match(/^\s*[{\[]/)) {
$(isJsonCheckBox).click();
}
}
catch (ex) {
// do nothing
}
} | [
"function",
"enableJsonValidationCheck",
"(",
"value",
",",
"isJsonCheckBox",
")",
"{",
"try",
"{",
"JSON",
".",
"parse",
"(",
"value",
")",
";",
"// if this is valid json and is array or object assume we want validation active",
"if",
"(",
"value",
".",
"match",
"(",
... | check if given string value is valid json and, if so enable validation
for given field if this is an json object or array. Do not automatically
enable validation on numbers or quted strings. May be coincidence that this is json...
@param {string} value string to check if valid json
@param {string} isJsonCheckBox id st... | [
"check",
"if",
"given",
"string",
"value",
"is",
"valid",
"json",
"and",
"if",
"so",
"enable",
"validation",
"for",
"given",
"field",
"if",
"this",
"is",
"an",
"json",
"object",
"or",
"array",
".",
"Do",
"not",
"automatically",
"enable",
"validation",
"on"... | c8966ff20f53fac73537643b64162d4007af68a8 | https://github.com/joeferner/redis-commander/blob/c8966ff20f53fac73537643b64162d4007af68a8/web/static/scripts/redisCommander.js#L645-L656 |
10,660 | joeferner/redis-commander | web/static/scripts/redisCommander.js | addInputValidator | function addInputValidator(inputId, format, currentState) {
var input;
if (typeof inputId === 'string') {
input = $('#' + inputId)
}
else if (typeof inputId === 'object') {
input = inputId;
}
if (!input){
console.log('Invalid html id given to validate format: ', inputId);
return;
}
swi... | javascript | function addInputValidator(inputId, format, currentState) {
var input;
if (typeof inputId === 'string') {
input = $('#' + inputId)
}
else if (typeof inputId === 'object') {
input = inputId;
}
if (!input){
console.log('Invalid html id given to validate format: ', inputId);
return;
}
swi... | [
"function",
"addInputValidator",
"(",
"inputId",
",",
"format",
",",
"currentState",
")",
"{",
"var",
"input",
";",
"if",
"(",
"typeof",
"inputId",
"===",
"'string'",
")",
"{",
"input",
"=",
"$",
"(",
"'#'",
"+",
"inputId",
")",
"}",
"else",
"if",
"(",... | Add data format validation function to an input element.
The field gets decorated to visualize if input is valid for given data format.
@param {string|object} inputId id of html input element to watch or jquery object
@param {string} format data format to validate against, possible values: "json"
@param {boolean} [cur... | [
"Add",
"data",
"format",
"validation",
"function",
"to",
"an",
"input",
"element",
".",
"The",
"field",
"gets",
"decorated",
"to",
"visualize",
"if",
"input",
"is",
"valid",
"for",
"given",
"data",
"format",
"."
] | c8966ff20f53fac73537643b64162d4007af68a8 | https://github.com/joeferner/redis-commander/blob/c8966ff20f53fac73537643b64162d4007af68a8/web/static/scripts/redisCommander.js#L816-L846 |
10,661 | joeferner/redis-commander | web/static/scripts/redisCommander.js | validateInputAsJson | function validateInputAsJson() {
if (this.value) {
try {
JSON.parse(this.value);
setValidationClasses(this, true);
}
catch(e) {
setValidationClasses(this, false);
}
}
else {
setValidationClasses(this, false)
}
} | javascript | function validateInputAsJson() {
if (this.value) {
try {
JSON.parse(this.value);
setValidationClasses(this, true);
}
catch(e) {
setValidationClasses(this, false);
}
}
else {
setValidationClasses(this, false)
}
} | [
"function",
"validateInputAsJson",
"(",
")",
"{",
"if",
"(",
"this",
".",
"value",
")",
"{",
"try",
"{",
"JSON",
".",
"parse",
"(",
"this",
".",
"value",
")",
";",
"setValidationClasses",
"(",
"this",
",",
"true",
")",
";",
"}",
"catch",
"(",
"e",
... | method to check if a input field contains valid json and set visual accordingly. | [
"method",
"to",
"check",
"if",
"a",
"input",
"field",
"contains",
"valid",
"json",
"and",
"set",
"visual",
"accordingly",
"."
] | c8966ff20f53fac73537643b64162d4007af68a8 | https://github.com/joeferner/redis-commander/blob/c8966ff20f53fac73537643b64162d4007af68a8/web/static/scripts/redisCommander.js#L851-L864 |
10,662 | joeferner/redis-commander | web/static/scripts/redisCommander.js | setValidationClasses | function setValidationClasses(element, success) {
var add = (success ? 'validate-positive' : 'validate-negative');
var remove = (success ? 'validate-negative' : 'validate-positive');
if (element.className.indexOf(add) < 0) {
$(element).removeClass(remove).addClass(add);
}
} | javascript | function setValidationClasses(element, success) {
var add = (success ? 'validate-positive' : 'validate-negative');
var remove = (success ? 'validate-negative' : 'validate-positive');
if (element.className.indexOf(add) < 0) {
$(element).removeClass(remove).addClass(add);
}
} | [
"function",
"setValidationClasses",
"(",
"element",
",",
"success",
")",
"{",
"var",
"add",
"=",
"(",
"success",
"?",
"'validate-positive'",
":",
"'validate-negative'",
")",
";",
"var",
"remove",
"=",
"(",
"success",
"?",
"'validate-negative'",
":",
"'validate-p... | classes are only changed if not set right now
@param {Element} element HTML DOM element to change validation classes
@param {boolean} success true if positive validation class shall be assigned, false for error class | [
"classes",
"are",
"only",
"changed",
"if",
"not",
"set",
"right",
"now"
] | c8966ff20f53fac73537643b64162d4007af68a8 | https://github.com/joeferner/redis-commander/blob/c8966ff20f53fac73537643b64162d4007af68a8/web/static/scripts/redisCommander.js#L871-L877 |
10,663 | joeferner/redis-commander | web/static/scripts/redisCommander.js | renderEjs | function renderEjs(filename, data, element, callback) {
$.get(filename)
.done(function(htmlTmpl) {
element.html(ejs.render(htmlTmpl, data));
})
.fail(function(error) {
console.log('failed to get html template ' + filename + ': ' + JSON.stringify(error));
alert('failed to fetch html templ... | javascript | function renderEjs(filename, data, element, callback) {
$.get(filename)
.done(function(htmlTmpl) {
element.html(ejs.render(htmlTmpl, data));
})
.fail(function(error) {
console.log('failed to get html template ' + filename + ': ' + JSON.stringify(error));
alert('failed to fetch html templ... | [
"function",
"renderEjs",
"(",
"filename",
",",
"data",
",",
"element",
",",
"callback",
")",
"{",
"$",
".",
"get",
"(",
"filename",
")",
".",
"done",
"(",
"function",
"(",
"htmlTmpl",
")",
"{",
"element",
".",
"html",
"(",
"ejs",
".",
"render",
"(",
... | Fetch the url give at filename from the server and render the content of this
template with the data object. Afterwards the rendered html is added at the
html element given.
@param {string} filename url to retrieve as template
@param {object} data object to use for rendering
@param {object} element jquery html element... | [
"Fetch",
"the",
"url",
"give",
"at",
"filename",
"from",
"the",
"server",
"and",
"render",
"the",
"content",
"of",
"this",
"template",
"with",
"the",
"data",
"object",
".",
"Afterwards",
"the",
"rendered",
"html",
"is",
"added",
"at",
"the",
"html",
"eleme... | c8966ff20f53fac73537643b64162d4007af68a8 | https://github.com/joeferner/redis-commander/blob/c8966ff20f53fac73537643b64162d4007af68a8/web/static/scripts/redisCommander.js#L896-L909 |
10,664 | joeferner/redis-commander | lib/routes/apiv1.js | getConnection | function getConnection (req, res, next, connectionId) {
let con = req.app.locals.redisConnections.find(function(connection) {
return (connection.options.connectionId === connectionId);
});
if (con) {
res.locals.connection = con;
res.locals.connectionId = connectionId;
}
else {
console.error('C... | javascript | function getConnection (req, res, next, connectionId) {
let con = req.app.locals.redisConnections.find(function(connection) {
return (connection.options.connectionId === connectionId);
});
if (con) {
res.locals.connection = con;
res.locals.connectionId = connectionId;
}
else {
console.error('C... | [
"function",
"getConnection",
"(",
"req",
",",
"res",
",",
"next",
",",
"connectionId",
")",
"{",
"let",
"con",
"=",
"req",
".",
"app",
".",
"locals",
".",
"redisConnections",
".",
"find",
"(",
"function",
"(",
"connection",
")",
"{",
"return",
"(",
"co... | method called to extract url parameter 'connectionId' from all routes.
The connection object found is attached to the res.locals.connection variable for all
following routes to work with. The connectionId param is attached to res.locals.connectionId.
This method exits with JSON error response if no connection is found... | [
"method",
"called",
"to",
"extract",
"url",
"parameter",
"connectionId",
"from",
"all",
"routes",
".",
"The",
"connection",
"object",
"found",
"is",
"attached",
"to",
"the",
"res",
".",
"locals",
".",
"connection",
"variable",
"for",
"all",
"following",
"route... | c8966ff20f53fac73537643b64162d4007af68a8 | https://github.com/joeferner/redis-commander/blob/c8966ff20f53fac73537643b64162d4007af68a8/lib/routes/apiv1.js#L147-L160 |
10,665 | joeferner/redis-commander | lib/routes/apiv1.js | postExec | function postExec (req, res) {
let cmd = req.body.cmd;
let connection = res.locals.connection;
let parts = myutil.split(cmd);
parts[0] = parts[0].toLowerCase();
let commandName = parts[0].toLowerCase();
// must be in our white list to be allowed in read only mode
if (req.app.locals.redisReadOnly) {
i... | javascript | function postExec (req, res) {
let cmd = req.body.cmd;
let connection = res.locals.connection;
let parts = myutil.split(cmd);
parts[0] = parts[0].toLowerCase();
let commandName = parts[0].toLowerCase();
// must be in our white list to be allowed in read only mode
if (req.app.locals.redisReadOnly) {
i... | [
"function",
"postExec",
"(",
"req",
",",
"res",
")",
"{",
"let",
"cmd",
"=",
"req",
".",
"body",
".",
"cmd",
";",
"let",
"connection",
"=",
"res",
".",
"locals",
".",
"connection",
";",
"let",
"parts",
"=",
"myutil",
".",
"split",
"(",
"cmd",
")",
... | this needs special handling for read-only mode. Must check all commands and classify if command to view or manipulatie data... | [
"this",
"needs",
"special",
"handling",
"for",
"read",
"-",
"only",
"mode",
".",
"Must",
"check",
"all",
"commands",
"and",
"classify",
"if",
"command",
"to",
"view",
"or",
"manipulatie",
"data",
"..."
] | c8966ff20f53fac73537643b64162d4007af68a8 | https://github.com/joeferner/redis-commander/blob/c8966ff20f53fac73537643b64162d4007af68a8/lib/routes/apiv1.js#L254-L279 |
10,666 | thelinmichael/spotify-web-api-node | src/server-methods.js | function(options, callback) {
return AuthenticationRequest.builder()
.withPath('/api/token')
.withBodyParameters({
grant_type: 'client_credentials'
})
.withBodyParameters(options)
.withHeaders({
Authorization:
'Basic ' +
new Buffer(
this.... | javascript | function(options, callback) {
return AuthenticationRequest.builder()
.withPath('/api/token')
.withBodyParameters({
grant_type: 'client_credentials'
})
.withBodyParameters(options)
.withHeaders({
Authorization:
'Basic ' +
new Buffer(
this.... | [
"function",
"(",
"options",
",",
"callback",
")",
"{",
"return",
"AuthenticationRequest",
".",
"builder",
"(",
")",
".",
"withPath",
"(",
"'/api/token'",
")",
".",
"withBodyParameters",
"(",
"{",
"grant_type",
":",
"'client_credentials'",
"}",
")",
".",
"withB... | Request an access token using the Client Credentials flow.
Requires that client ID and client secret has been set previous to the call.
@param {Object} options Options.
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@returns {Promise|undefined} A promise that if succes... | [
"Request",
"an",
"access",
"token",
"using",
"the",
"Client",
"Credentials",
"flow",
".",
"Requires",
"that",
"client",
"ID",
"and",
"client",
"secret",
"has",
"been",
"set",
"previous",
"to",
"the",
"call",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/server-methods.js#L15-L31 | |
10,667 | thelinmichael/spotify-web-api-node | src/server-methods.js | function(code, callback) {
return AuthenticationRequest.builder()
.withPath('/api/token')
.withBodyParameters({
grant_type: 'authorization_code',
redirect_uri: this.getRedirectURI(),
code: code,
client_id: this.getClientId(),
client_secret: this.getClientSecret()
... | javascript | function(code, callback) {
return AuthenticationRequest.builder()
.withPath('/api/token')
.withBodyParameters({
grant_type: 'authorization_code',
redirect_uri: this.getRedirectURI(),
code: code,
client_id: this.getClientId(),
client_secret: this.getClientSecret()
... | [
"function",
"(",
"code",
",",
"callback",
")",
"{",
"return",
"AuthenticationRequest",
".",
"builder",
"(",
")",
".",
"withPath",
"(",
"'/api/token'",
")",
".",
"withBodyParameters",
"(",
"{",
"grant_type",
":",
"'authorization_code'",
",",
"redirect_uri",
":",
... | Request an access token using the Authorization Code flow.
Requires that client ID, client secret, and redirect URI has been set previous to the call.
@param {string} code The authorization code returned in the callback in the Authorization Code flow.
@param {requestCallback} [callback] Optional callback method to be c... | [
"Request",
"an",
"access",
"token",
"using",
"the",
"Authorization",
"Code",
"flow",
".",
"Requires",
"that",
"client",
"ID",
"client",
"secret",
"and",
"redirect",
"URI",
"has",
"been",
"set",
"previous",
"to",
"the",
"call",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/server-methods.js#L42-L54 | |
10,668 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(trackId, options, callback) {
// In case someone is using a version where options parameter did not exist.
var actualCallback, actualOptions;
if (typeof options === 'function' && !callback) {
actualCallback = options;
actualOptions = {};
} else {
actualCallback = callback;
... | javascript | function(trackId, options, callback) {
// In case someone is using a version where options parameter did not exist.
var actualCallback, actualOptions;
if (typeof options === 'function' && !callback) {
actualCallback = options;
actualOptions = {};
} else {
actualCallback = callback;
... | [
"function",
"(",
"trackId",
",",
"options",
",",
"callback",
")",
"{",
"// In case someone is using a version where options parameter did not exist.",
"var",
"actualCallback",
",",
"actualOptions",
";",
"if",
"(",
"typeof",
"options",
"===",
"'function'",
"&&",
"!",
"ca... | Look up a track.
@param {string} trackId The track's ID.
@param {Object} [options] The possible options, currently only market.
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@example getTrack('3Qm86XLflmIXVm1wcwkgDK').then(...)
@returns {Promise|undefined} A promise t... | [
"Look",
"up",
"a",
"track",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L118-L134 | |
10,669 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(trackIds, options, callback) {
// In case someone is using a version where options parameter did not exist.
var actualCallback, actualOptions;
if (typeof options === 'function' && !callback) {
actualCallback = options;
actualOptions = {};
} else {
actualCallback = callback;
... | javascript | function(trackIds, options, callback) {
// In case someone is using a version where options parameter did not exist.
var actualCallback, actualOptions;
if (typeof options === 'function' && !callback) {
actualCallback = options;
actualOptions = {};
} else {
actualCallback = callback;
... | [
"function",
"(",
"trackIds",
",",
"options",
",",
"callback",
")",
"{",
"// In case someone is using a version where options parameter did not exist.",
"var",
"actualCallback",
",",
"actualOptions",
";",
"if",
"(",
"typeof",
"options",
"===",
"'function'",
"&&",
"!",
"c... | Look up several tracks.
@param {string[]} trackIds The IDs of the artists.
@param {Object} [options] The possible options, currently only market.
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@example getArtists(['0oSGxfWSnnOXhD2fKuz2Gy', '3dBVyJ7JuOMt4GE9607Qin']).th... | [
"Look",
"up",
"several",
"tracks",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L145-L166 | |
10,670 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(query, types, options, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/search/')
.withQueryParameters(
{
type: types.join(','),
q: query
},
options
)
.build()
.execute(HttpManager.get, callback);
} | javascript | function(query, types, options, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/search/')
.withQueryParameters(
{
type: types.join(','),
q: query
},
options
)
.build()
.execute(HttpManager.get, callback);
} | [
"function",
"(",
"query",
",",
"types",
",",
"options",
",",
"callback",
")",
"{",
"return",
"WebApiRequest",
".",
"builder",
"(",
"this",
".",
"getAccessToken",
"(",
")",
")",
".",
"withPath",
"(",
"'/v1/search/'",
")",
".",
"withQueryParameters",
"(",
"{... | Search for music entities of certain types.
@param {string} query The search query.
@param {string[]} types An array of item types to search across.
Valid types are: 'album', 'artist', 'playlist', and 'track'.
@param {Object} [options] The possible options, e.g. limit, offset.
@param {requestCallback} [callback] Option... | [
"Search",
"for",
"music",
"entities",
"of",
"certain",
"types",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L272-L284 | |
10,671 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(userId, options, callback) {
var path;
if (typeof userId === 'string') {
path = '/v1/users/' + encodeURIComponent(userId) + '/playlists';
} else if (typeof userId === 'object') {
callback = options;
options = userId;
path = '/v1/me/playlists';
} /* undefined */ else {
... | javascript | function(userId, options, callback) {
var path;
if (typeof userId === 'string') {
path = '/v1/users/' + encodeURIComponent(userId) + '/playlists';
} else if (typeof userId === 'object') {
callback = options;
options = userId;
path = '/v1/me/playlists';
} /* undefined */ else {
... | [
"function",
"(",
"userId",
",",
"options",
",",
"callback",
")",
"{",
"var",
"path",
";",
"if",
"(",
"typeof",
"userId",
"===",
"'string'",
")",
"{",
"path",
"=",
"'/v1/users/'",
"+",
"encodeURIComponent",
"(",
"userId",
")",
"+",
"'/playlists'",
";",
"}... | Get a user's playlists.
@param {string} userId An optional id of the user. If you know the Spotify URI it is easy
to find the id (e.g. spotify:user:<here_is_the_id>). If not provided, the id of the user that granted
the permissions will be used.
@param {Object} [options] The options supplied to this request.
@param {re... | [
"Get",
"a",
"user",
"s",
"playlists",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L456-L473 | |
10,672 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(userId, playlistName, options, callback) {
// In case someone is using a version where options parameter did not exist.
var actualCallback;
if (typeof options === 'function' && !callback) {
actualCallback = options;
} else {
actualCallback = callback;
}
var actualOptions = ... | javascript | function(userId, playlistName, options, callback) {
// In case someone is using a version where options parameter did not exist.
var actualCallback;
if (typeof options === 'function' && !callback) {
actualCallback = options;
} else {
actualCallback = callback;
}
var actualOptions = ... | [
"function",
"(",
"userId",
",",
"playlistName",
",",
"options",
",",
"callback",
")",
"{",
"// In case someone is using a version where options parameter did not exist.",
"var",
"actualCallback",
";",
"if",
"(",
"typeof",
"options",
"===",
"'function'",
"&&",
"!",
"call... | Create a playlist.
@param {string} userId The playlist's owner's user ID.
@param {string} playlistName The name of the playlist.
@param {Object} [options] The possible options, currently only public.
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@example createPlaylis... | [
"Create",
"a",
"playlist",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L519-L541 | |
10,673 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(playlistId, options, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/playlists/' + playlistId + '/followers')
.withHeaders({ 'Content-Type': 'application/json' })
.withBodyParameters(options)
.build()
.execute(HttpManager.put, callback);
} | javascript | function(playlistId, options, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/playlists/' + playlistId + '/followers')
.withHeaders({ 'Content-Type': 'application/json' })
.withBodyParameters(options)
.build()
.execute(HttpManager.put, callback);
} | [
"function",
"(",
"playlistId",
",",
"options",
",",
"callback",
")",
"{",
"return",
"WebApiRequest",
".",
"builder",
"(",
"this",
".",
"getAccessToken",
"(",
")",
")",
".",
"withPath",
"(",
"'/v1/playlists/'",
"+",
"playlistId",
"+",
"'/followers'",
")",
"."... | Follow a playlist.
@param {string} playlistId The playlist's ID
@param {Object} [options] The possible options, currently only public.
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@returns {Promise|undefined} A promise that if successful, simply resolves to an empty ... | [
"Follow",
"a",
"playlist",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L551-L558 | |
10,674 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(playlistId, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/playlists/' + playlistId + '/followers')
.withHeaders({ 'Content-Type': 'application/json' })
.build()
.execute(HttpManager.del, callback);
} | javascript | function(playlistId, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/playlists/' + playlistId + '/followers')
.withHeaders({ 'Content-Type': 'application/json' })
.build()
.execute(HttpManager.del, callback);
} | [
"function",
"(",
"playlistId",
",",
"callback",
")",
"{",
"return",
"WebApiRequest",
".",
"builder",
"(",
"this",
".",
"getAccessToken",
"(",
")",
")",
".",
"withPath",
"(",
"'/v1/playlists/'",
"+",
"playlistId",
"+",
"'/followers'",
")",
".",
"withHeaders",
... | Unfollow a playlist.
@param {string} playlistId The playlist's ID
@param {Object} [options] The possible options, currently only public.
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@returns {Promise|undefined} A promise that if successful, simply resolves to an empt... | [
"Unfollow",
"a",
"playlist",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L568-L574 | |
10,675 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(playlistId, tracks, options, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/playlists/' + playlistId + '/tracks')
.withHeaders({ 'Content-Type': 'application/json' })
.withQueryParameters(options)
.withBodyParameters({
uris: tracks
})
... | javascript | function(playlistId, tracks, options, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/playlists/' + playlistId + '/tracks')
.withHeaders({ 'Content-Type': 'application/json' })
.withQueryParameters(options)
.withBodyParameters({
uris: tracks
})
... | [
"function",
"(",
"playlistId",
",",
"tracks",
",",
"options",
",",
"callback",
")",
"{",
"return",
"WebApiRequest",
".",
"builder",
"(",
"this",
".",
"getAccessToken",
"(",
")",
")",
".",
"withPath",
"(",
"'/v1/playlists/'",
"+",
"playlistId",
"+",
"'/tracks... | Add tracks to a playlist.
@param {string} playlistId The playlist's ID
@param {string[]} tracks URIs of the tracks to add to the playlist.
@param {Object} [options] Options, position being the only one.
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@example addTracksT... | [
"Add",
"tracks",
"to",
"a",
"playlist",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L623-L633 | |
10,676 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(
playlistId,
positions,
snapshotId,
callback
) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/playlists/' + playlistId + '/tracks')
.withHeaders({ 'Content-Type': 'application/json' })
.withBodyParameters({
positions: positions,
snap... | javascript | function(
playlistId,
positions,
snapshotId,
callback
) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/playlists/' + playlistId + '/tracks')
.withHeaders({ 'Content-Type': 'application/json' })
.withBodyParameters({
positions: positions,
snap... | [
"function",
"(",
"playlistId",
",",
"positions",
",",
"snapshotId",
",",
"callback",
")",
"{",
"return",
"WebApiRequest",
".",
"builder",
"(",
"this",
".",
"getAccessToken",
"(",
")",
")",
".",
"withPath",
"(",
"'/v1/playlists/'",
"+",
"playlistId",
"+",
"'/... | Remove tracks from a playlist by position instead of specifying the tracks' URIs.
@param {string} playlistId The playlist's ID
@param {int[]} positions The positions of the tracks in the playlist that should be removed
@param {string} snapshot_id The snapshot ID, or version, of the playlist. Required
@param {requestCal... | [
"Remove",
"tracks",
"from",
"a",
"playlist",
"by",
"position",
"instead",
"of",
"specifying",
"the",
"tracks",
"URIs",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L668-L683 | |
10,677 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(
playlistId,
rangeStart,
insertBefore,
options,
callback
) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/playlists/' + playlistId + '/tracks')
.withHeaders({ 'Content-Type': 'application/json' })
.withBodyParameters(
{
range_s... | javascript | function(
playlistId,
rangeStart,
insertBefore,
options,
callback
) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/playlists/' + playlistId + '/tracks')
.withHeaders({ 'Content-Type': 'application/json' })
.withBodyParameters(
{
range_s... | [
"function",
"(",
"playlistId",
",",
"rangeStart",
",",
"insertBefore",
",",
"options",
",",
"callback",
")",
"{",
"return",
"WebApiRequest",
".",
"builder",
"(",
"this",
".",
"getAccessToken",
"(",
")",
")",
".",
"withPath",
"(",
"'/v1/playlists/'",
"+",
"pl... | Reorder tracks in a playlist.
@param {string} playlistId The playlist's ID
@param {int} rangeStart The position of the first track to be reordered.
@param {int} insertBefore The position where the tracks should be inserted.
@param {Object} options Optional parameters, i.e. range_length and snapshot_id.
@param {requestC... | [
"Reorder",
"tracks",
"in",
"a",
"playlist",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L714-L733 | |
10,678 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(options, callback) {
var _opts = {};
var optionsOfTypeArray = ['seed_artists', 'seed_genres', 'seed_tracks'];
for (var option in options) {
if (options.hasOwnProperty(option)) {
if (
optionsOfTypeArray.indexOf(option) !== -1 &&
Object.prototype.toString.call(option... | javascript | function(options, callback) {
var _opts = {};
var optionsOfTypeArray = ['seed_artists', 'seed_genres', 'seed_tracks'];
for (var option in options) {
if (options.hasOwnProperty(option)) {
if (
optionsOfTypeArray.indexOf(option) !== -1 &&
Object.prototype.toString.call(option... | [
"function",
"(",
"options",
",",
"callback",
")",
"{",
"var",
"_opts",
"=",
"{",
"}",
";",
"var",
"optionsOfTypeArray",
"=",
"[",
"'seed_artists'",
",",
"'seed_genres'",
",",
"'seed_tracks'",
"]",
";",
"for",
"(",
"var",
"option",
"in",
"options",
")",
"... | Create a playlist-style listening experience based on seed artists, tracks and genres.
@param {Object} [options] The options supplied to this request.
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@example getRecommendations({ min_energy: 0.4, seed_artists: ['6mfK6Q2t... | [
"Create",
"a",
"playlist",
"-",
"style",
"listening",
"experience",
"based",
"on",
"seed",
"artists",
"tracks",
"and",
"genres",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L794-L815 | |
10,679 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(scopes, state, showDialog) {
return AuthenticationRequest.builder()
.withPath('/authorize')
.withQueryParameters({
client_id: this.getClientId(),
response_type: 'code',
redirect_uri: this.getRedirectURI(),
scope: scopes.join('%20'),
state: state,
... | javascript | function(scopes, state, showDialog) {
return AuthenticationRequest.builder()
.withPath('/authorize')
.withQueryParameters({
client_id: this.getClientId(),
response_type: 'code',
redirect_uri: this.getRedirectURI(),
scope: scopes.join('%20'),
state: state,
... | [
"function",
"(",
"scopes",
",",
"state",
",",
"showDialog",
")",
"{",
"return",
"AuthenticationRequest",
".",
"builder",
"(",
")",
".",
"withPath",
"(",
"'/authorize'",
")",
".",
"withQueryParameters",
"(",
"{",
"client_id",
":",
"this",
".",
"getClientId",
... | Retrieve a URL where the user can give the application permissions.
@param {string[]} scopes The scopes corresponding to the permissions the application needs.
@param {string} state A parameter that you can use to maintain a value between the request and the callback to redirect_uri.It is useful to prevent CSRF exploit... | [
"Retrieve",
"a",
"URL",
"where",
"the",
"user",
"can",
"give",
"the",
"application",
"permissions",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L839-L852 | |
10,680 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(trackIds, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/me/tracks')
.withHeaders({ 'Content-Type': 'application/json' })
.withBodyParameters({ ids: trackIds })
.build()
.execute(HttpManager.del, callback);
} | javascript | function(trackIds, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/me/tracks')
.withHeaders({ 'Content-Type': 'application/json' })
.withBodyParameters({ ids: trackIds })
.build()
.execute(HttpManager.del, callback);
} | [
"function",
"(",
"trackIds",
",",
"callback",
")",
"{",
"return",
"WebApiRequest",
".",
"builder",
"(",
"this",
".",
"getAccessToken",
"(",
")",
")",
".",
"withPath",
"(",
"'/v1/me/tracks'",
")",
".",
"withHeaders",
"(",
"{",
"'Content-Type'",
":",
"'applica... | Remove a track from the authenticated user's Your Music library.
@param {string[]} trackIds The track IDs
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@returns {Promise|undefined} A promise that if successful returns null, otherwise an error.
Not returned if a callba... | [
"Remove",
"a",
"track",
"from",
"the",
"authenticated",
"user",
"s",
"Your",
"Music",
"library",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L895-L902 | |
10,681 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(albumIds, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/me/albums')
.withHeaders({ 'Content-Type': 'application/json' })
.withBodyParameters(albumIds)
.build()
.execute(HttpManager.del, callback);
} | javascript | function(albumIds, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/me/albums')
.withHeaders({ 'Content-Type': 'application/json' })
.withBodyParameters(albumIds)
.build()
.execute(HttpManager.del, callback);
} | [
"function",
"(",
"albumIds",
",",
"callback",
")",
"{",
"return",
"WebApiRequest",
".",
"builder",
"(",
"this",
".",
"getAccessToken",
"(",
")",
")",
".",
"withPath",
"(",
"'/v1/me/albums'",
")",
".",
"withHeaders",
"(",
"{",
"'Content-Type'",
":",
"'applica... | Remove an album from the authenticated user's Your Music library.
@param {string[]} albumIds The album IDs
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@returns {Promise|undefined} A promise that if successful returns null, otherwise an error.
Not returned if a callb... | [
"Remove",
"an",
"album",
"from",
"the",
"authenticated",
"user",
"s",
"Your",
"Music",
"library",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L926-L933 | |
10,682 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(options, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/me/player')
.withHeaders({ 'Content-Type': 'application/json' })
.withBodyParameters({
device_ids: options.deviceIds,
play: !!options.play
})
.build()
.execute(HttpMan... | javascript | function(options, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/me/player')
.withHeaders({ 'Content-Type': 'application/json' })
.withBodyParameters({
device_ids: options.deviceIds,
play: !!options.play
})
.build()
.execute(HttpMan... | [
"function",
"(",
"options",
",",
"callback",
")",
"{",
"return",
"WebApiRequest",
".",
"builder",
"(",
"this",
".",
"getAccessToken",
"(",
")",
")",
".",
"withPath",
"(",
"'/v1/me/player'",
")",
".",
"withHeaders",
"(",
"{",
"'Content-Type'",
":",
"'applicat... | Transfer a User's Playback
@param {Object} [options] Options, being market.
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@returns {Promise|undefined} A promise that if successful, resolves into a paging object of tracks,
otherwise an error. Not returned if a callback... | [
"Transfer",
"a",
"User",
"s",
"Playback"
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L1079-L1089 | |
10,683 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(options, callback) {
/*jshint camelcase: false */
var _options = options || {};
var queryParams = _options.device_id
? { device_id: _options.device_id }
: null;
var postData = {};
['context_uri', 'uris', 'offset'].forEach(function(field) {
if (field in _options) {
... | javascript | function(options, callback) {
/*jshint camelcase: false */
var _options = options || {};
var queryParams = _options.device_id
? { device_id: _options.device_id }
: null;
var postData = {};
['context_uri', 'uris', 'offset'].forEach(function(field) {
if (field in _options) {
... | [
"function",
"(",
"options",
",",
"callback",
")",
"{",
"/*jshint camelcase: false */",
"var",
"_options",
"=",
"options",
"||",
"{",
"}",
";",
"var",
"queryParams",
"=",
"_options",
".",
"device_id",
"?",
"{",
"device_id",
":",
"_options",
".",
"device_id",
... | Starts o Resumes the Current User's Playback
@param {Object} [options] Options, being device_id, context_uri, offset, uris.
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@example playbackResume({context_uri: 'spotify:album:5ht7ItJgpBH7W6vJ5BqpPr'}).then(...)
@returns ... | [
"Starts",
"o",
"Resumes",
"the",
"Current",
"User",
"s",
"Playback"
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L1099-L1118 | |
10,684 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(options, callback) {
return (
WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/me/player/pause')
/*jshint camelcase: false */
.withQueryParameters(
options && options.device_id ? { device_id: options.device_id } : null
)
.withHeaders({ 'Con... | javascript | function(options, callback) {
return (
WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/me/player/pause')
/*jshint camelcase: false */
.withQueryParameters(
options && options.device_id ? { device_id: options.device_id } : null
)
.withHeaders({ 'Con... | [
"function",
"(",
"options",
",",
"callback",
")",
"{",
"return",
"(",
"WebApiRequest",
".",
"builder",
"(",
"this",
".",
"getAccessToken",
"(",
")",
")",
".",
"withPath",
"(",
"'/v1/me/player/pause'",
")",
"/*jshint camelcase: false */",
".",
"withQueryParameters"... | Pauses the Current User's Playback
@param {Object} [options] Options, for now device_id,
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@example playbackPause().then(...)
@returns {Promise|undefined} A promise that if successful, resolves into a paging object of tracks... | [
"Pauses",
"the",
"Current",
"User",
"s",
"Playback"
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L1128-L1140 | |
10,685 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/me/player/previous')
.withHeaders({ 'Content-Type': 'application/json' })
.build()
.execute(HttpManager.post, callback);
} | javascript | function(callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/me/player/previous')
.withHeaders({ 'Content-Type': 'application/json' })
.build()
.execute(HttpManager.post, callback);
} | [
"function",
"(",
"callback",
")",
"{",
"return",
"WebApiRequest",
".",
"builder",
"(",
"this",
".",
"getAccessToken",
"(",
")",
")",
".",
"withPath",
"(",
"'/v1/me/player/previous'",
")",
".",
"withHeaders",
"(",
"{",
"'Content-Type'",
":",
"'application/json'",... | Skip the Current User's Playback To Previous Track
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@example playbackPrevious().then(...)
@returns {Promise|undefined} A promise that if successful, resolves into a paging object of tracks,
otherwise an error. Not returned ... | [
"Skip",
"the",
"Current",
"User",
"s",
"Playback",
"To",
"Previous",
"Track"
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L1149-L1155 | |
10,686 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(options, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/me/player/repeat')
.withQueryParameters({
state: options.state || 'off'
})
.build()
.execute(HttpManager.put, callback);
} | javascript | function(options, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/me/player/repeat')
.withQueryParameters({
state: options.state || 'off'
})
.build()
.execute(HttpManager.put, callback);
} | [
"function",
"(",
"options",
",",
"callback",
")",
"{",
"return",
"WebApiRequest",
".",
"builder",
"(",
"this",
".",
"getAccessToken",
"(",
")",
")",
".",
"withPath",
"(",
"'/v1/me/player/repeat'",
")",
".",
"withQueryParameters",
"(",
"{",
"state",
":",
"opt... | Set Repeat Mode On The Current User's Playback
@param {Object} [options] Options, being state (track, context, off).
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@example playbackRepeat({state: 'context'}).then(...)
@returns {Promise|undefined} A promise that if succ... | [
"Set",
"Repeat",
"Mode",
"On",
"The",
"Current",
"User",
"s",
"Playback"
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L1205-L1213 | |
10,687 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(userIds, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/me/following')
.withQueryParameters({
ids: userIds.join(','),
type: 'user'
})
.build()
.execute(HttpManager.del, callback);
} | javascript | function(userIds, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/me/following')
.withQueryParameters({
ids: userIds.join(','),
type: 'user'
})
.build()
.execute(HttpManager.del, callback);
} | [
"function",
"(",
"userIds",
",",
"callback",
")",
"{",
"return",
"WebApiRequest",
".",
"builder",
"(",
"this",
".",
"getAccessToken",
"(",
")",
")",
".",
"withPath",
"(",
"'/v1/me/following'",
")",
".",
"withQueryParameters",
"(",
"{",
"ids",
":",
"userIds",... | Remove the current user as a follower of one or more other Spotify users.
@param {string[]} userIds The IDs of the users to be unfollowed.
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@example unfollowUsers(['thelinmichael', 'wizzler']).then(...)
@returns {Promise|un... | [
"Remove",
"the",
"current",
"user",
"as",
"a",
"follower",
"of",
"one",
"or",
"more",
"other",
"Spotify",
"users",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L1304-L1313 | |
10,688 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(options, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/me/following')
.withHeaders({ 'Content-Type': 'application/json' })
.withQueryParameters(
{
type: 'artist'
},
options
)
.build()
.execute(HttpManager... | javascript | function(options, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath('/v1/me/following')
.withHeaders({ 'Content-Type': 'application/json' })
.withQueryParameters(
{
type: 'artist'
},
options
)
.build()
.execute(HttpManager... | [
"function",
"(",
"options",
",",
"callback",
")",
"{",
"return",
"WebApiRequest",
".",
"builder",
"(",
"this",
".",
"getAccessToken",
"(",
")",
")",
".",
"withPath",
"(",
"'/v1/me/following'",
")",
".",
"withHeaders",
"(",
"{",
"'Content-Type'",
":",
"'appli... | Get the current user's followed artists.
@param {Object} [options] Options, being after and limit.
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@returns {Promise|undefined} A promise that if successful, resolves to an object containing a paging object which contains
... | [
"Get",
"the",
"current",
"user",
"s",
"followed",
"artists",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L1362-L1374 | |
10,689 | thelinmichael/spotify-web-api-node | src/spotify-web-api.js | function(userId, playlistId, followerIds, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath(
'/v1/users/' +
encodeURIComponent(userId) +
'/playlists/' +
playlistId +
'/followers/contains'
)
.withQueryParameters({
ids: ... | javascript | function(userId, playlistId, followerIds, callback) {
return WebApiRequest.builder(this.getAccessToken())
.withPath(
'/v1/users/' +
encodeURIComponent(userId) +
'/playlists/' +
playlistId +
'/followers/contains'
)
.withQueryParameters({
ids: ... | [
"function",
"(",
"userId",
",",
"playlistId",
",",
"followerIds",
",",
"callback",
")",
"{",
"return",
"WebApiRequest",
".",
"builder",
"(",
"this",
".",
"getAccessToken",
"(",
")",
")",
".",
"withPath",
"(",
"'/v1/users/'",
"+",
"encodeURIComponent",
"(",
"... | Check if users are following a playlist.
@param {string} userId The playlist's owner's user ID
@param {string} playlistId The playlist's ID
@param {String[]} User IDs of the following users
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@returns {Promise|undefined} A p... | [
"Check",
"if",
"users",
"are",
"following",
"a",
"playlist",
"."
] | 37a78656198185776ca825b37e2de4a31c2ae5de | https://github.com/thelinmichael/spotify-web-api-node/blob/37a78656198185776ca825b37e2de4a31c2ae5de/src/spotify-web-api.js#L1385-L1399 | |
10,690 | bee-queue/arena | src/server/views/dashboard/queueJobsByState.js | isValidState | function isValidState(state, isBee) {
const validStates = isBee ? BEE_STATES : BULL_STATES;
return _.includes(validStates, state);
} | javascript | function isValidState(state, isBee) {
const validStates = isBee ? BEE_STATES : BULL_STATES;
return _.includes(validStates, state);
} | [
"function",
"isValidState",
"(",
"state",
",",
"isBee",
")",
"{",
"const",
"validStates",
"=",
"isBee",
"?",
"BEE_STATES",
":",
"BULL_STATES",
";",
"return",
"_",
".",
"includes",
"(",
"validStates",
",",
"state",
")",
";",
"}"
] | Determines if the requested job state lookup is valid.
@param {String} state
@param {Boolean} isBee States vary between bull and bee
@return {Boolean} | [
"Determines",
"if",
"the",
"requested",
"job",
"state",
"lookup",
"is",
"valid",
"."
] | ae39d9051e87f5f0f120db24dc649c98129a9f1e | https://github.com/bee-queue/arena/blob/ae39d9051e87f5f0f120db24dc649c98129a9f1e/src/server/views/dashboard/queueJobsByState.js#L12-L15 |
10,691 | bee-queue/arena | src/server/views/dashboard/queueJobsByState.js | _json | async function _json(req, res) {
const { queueName, queueHost, state } = req.params;
const {Queues} = req.app.locals;
const queue = await Queues.get(queueName, queueHost);
if (!queue) return res.status(404).json({ message: 'Queue not found' });
if (!isValidState(state, queue.IS_BEE)) return res.status(400).j... | javascript | async function _json(req, res) {
const { queueName, queueHost, state } = req.params;
const {Queues} = req.app.locals;
const queue = await Queues.get(queueName, queueHost);
if (!queue) return res.status(404).json({ message: 'Queue not found' });
if (!isValidState(state, queue.IS_BEE)) return res.status(400).j... | [
"async",
"function",
"_json",
"(",
"req",
",",
"res",
")",
"{",
"const",
"{",
"queueName",
",",
"queueHost",
",",
"state",
"}",
"=",
"req",
".",
"params",
";",
"const",
"{",
"Queues",
"}",
"=",
"req",
".",
"app",
".",
"locals",
";",
"const",
"queue... | Returns the queue jobs in the requested state as a json document.
@prop {Object} req express request object
@prop {Object} res express response object | [
"Returns",
"the",
"queue",
"jobs",
"in",
"the",
"requested",
"state",
"as",
"a",
"json",
"document",
"."
] | ae39d9051e87f5f0f120db24dc649c98129a9f1e | https://github.com/bee-queue/arena/blob/ae39d9051e87f5f0f120db24dc649c98129a9f1e/src/server/views/dashboard/queueJobsByState.js#L29-L51 |
10,692 | bee-queue/arena | src/server/views/dashboard/queueJobsByState.js | _html | async function _html(req, res) {
const { queueName, queueHost, state } = req.params;
const {Queues} = req.app.locals;
const queue = await Queues.get(queueName, queueHost);
const basePath = req.baseUrl;
if (!queue) return res.status(404).render('dashboard/templates/queueNotFound', {basePath, queueName, queueHo... | javascript | async function _html(req, res) {
const { queueName, queueHost, state } = req.params;
const {Queues} = req.app.locals;
const queue = await Queues.get(queueName, queueHost);
const basePath = req.baseUrl;
if (!queue) return res.status(404).render('dashboard/templates/queueNotFound', {basePath, queueName, queueHo... | [
"async",
"function",
"_html",
"(",
"req",
",",
"res",
")",
"{",
"const",
"{",
"queueName",
",",
"queueHost",
",",
"state",
"}",
"=",
"req",
".",
"params",
";",
"const",
"{",
"Queues",
"}",
"=",
"req",
".",
"app",
".",
"locals",
";",
"const",
"queue... | Renders an html view of the queue jobs in the requested state.
@prop {Object} req express request object
@prop {Object} res express response object | [
"Renders",
"an",
"html",
"view",
"of",
"the",
"queue",
"jobs",
"in",
"the",
"requested",
"state",
"."
] | ae39d9051e87f5f0f120db24dc649c98129a9f1e | https://github.com/bee-queue/arena/blob/ae39d9051e87f5f0f120db24dc649c98129a9f1e/src/server/views/dashboard/queueJobsByState.js#L59-L121 |
10,693 | hustcc/timeago.js | src/lang/fa.js | toPersianNumber | function toPersianNumber(number) {
// List of standard persian numbers from 0 to 9
const persianDigits = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'];
return number
.toString()
.replace(/\d/g, x => persianDigits[x]);
} | javascript | function toPersianNumber(number) {
// List of standard persian numbers from 0 to 9
const persianDigits = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'];
return number
.toString()
.replace(/\d/g, x => persianDigits[x]);
} | [
"function",
"toPersianNumber",
"(",
"number",
")",
"{",
"// List of standard persian numbers from 0 to 9",
"const",
"persianDigits",
"=",
"[",
"'۰',",
" ",
"۱', ",
"'",
"', '",
"۳",
", '۴",
"'",
" '۵'",
",",
"'۶',",
" ",
"۷', ",
"'",
"', '",
"۹",
"];",
"",
"... | As persian language has different number symbols we need to replace regular numbers to standard persian numbres. | [
"As",
"persian",
"language",
"has",
"different",
"number",
"symbols",
"we",
"need",
"to",
"replace",
"regular",
"numbers",
"to",
"standard",
"persian",
"numbres",
"."
] | 1c58c61ced7ab40f630311c392a9142b8ee021fd | https://github.com/hustcc/timeago.js/blob/1c58c61ced7ab40f630311c392a9142b8ee021fd/src/lang/fa.js#L25-L32 |
10,694 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | _subclassObject | function _subclassObject(tree, base, extension, extName) {
// $.ui.fancytree.debug("_subclassObject", tree, base, extension, extName);
for (var attrName in extension) {
if (typeof extension[attrName] === "function") {
if (typeof tree[attrName] === "function") {
// override existing method
tree[attr... | javascript | function _subclassObject(tree, base, extension, extName) {
// $.ui.fancytree.debug("_subclassObject", tree, base, extension, extName);
for (var attrName in extension) {
if (typeof extension[attrName] === "function") {
if (typeof tree[attrName] === "function") {
// override existing method
tree[attr... | [
"function",
"_subclassObject",
"(",
"tree",
",",
"base",
",",
"extension",
",",
"extName",
")",
"{",
"// $.ui.fancytree.debug(\"_subclassObject\", tree, base, extension, extName);",
"for",
"(",
"var",
"attrName",
"in",
"extension",
")",
"{",
"if",
"(",
"typeof",
"exte... | Subclass `base` by creating proxy functions | [
"Subclass",
"base",
"by",
"creating",
"proxy",
"functions"
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L1704-L1743 |
10,695 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(node, mode) {
var i, n;
mode = mode || "child";
if (node === false) {
for (i = this.children.length - 1; i >= 0; i--) {
n = this.children[i];
if (n.statusNodeType === "paging") {
this.removeChild(n);
}
}
this.partload = false;
return;
}
node = $.extend(
... | javascript | function(node, mode) {
var i, n;
mode = mode || "child";
if (node === false) {
for (i = this.children.length - 1; i >= 0; i--) {
n = this.children[i];
if (n.statusNodeType === "paging") {
this.removeChild(n);
}
}
this.partload = false;
return;
}
node = $.extend(
... | [
"function",
"(",
"node",
",",
"mode",
")",
"{",
"var",
"i",
",",
"n",
";",
"mode",
"=",
"mode",
"||",
"\"child\"",
";",
"if",
"(",
"node",
"===",
"false",
")",
"{",
"for",
"(",
"i",
"=",
"this",
".",
"children",
".",
"length",
"-",
"1",
";",
... | Add child status nodes that indicate 'More...', etc.
This also maintains the node's `partload` property.
@param {boolean|object} node optional node definition. Pass `false` to remove all paging nodes.
@param {string} [mode='child'] 'child'|firstChild'
@since 2.15 | [
"Add",
"child",
"status",
"nodes",
"that",
"indicate",
"More",
"...",
"etc",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L2092-L2116 | |
10,696 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(patch) {
// patch [key, null] means 'remove'
if (patch === null) {
this.remove();
return _getResolvedPromise(this);
}
// TODO: make sure that root node is not collapsed or modified
// copy (most) attributes to node.ATTR or node.data.ATTR
var name,
promise,
v,
IGNORE_MAP = ... | javascript | function(patch) {
// patch [key, null] means 'remove'
if (patch === null) {
this.remove();
return _getResolvedPromise(this);
}
// TODO: make sure that root node is not collapsed or modified
// copy (most) attributes to node.ATTR or node.data.ATTR
var name,
promise,
v,
IGNORE_MAP = ... | [
"function",
"(",
"patch",
")",
"{",
"// patch [key, null] means 'remove'",
"if",
"(",
"patch",
"===",
"null",
")",
"{",
"this",
".",
"remove",
"(",
")",
";",
"return",
"_getResolvedPromise",
"(",
"this",
")",
";",
"}",
"// TODO: make sure that root node is not col... | Modify existing child nodes.
@param {NodePatch} patch
@returns {$.Promise}
@see FancytreeNode#addChildren | [
"Modify",
"existing",
"child",
"nodes",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L2135-L2179 | |
10,697 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(deep) {
var cl = this.children,
i,
l,
n;
if (!cl) {
return 0;
}
n = cl.length;
if (deep !== false) {
for (i = 0, l = n; i < l; i++) {
n += cl[i].countChildren();
}
}
return n;
} | javascript | function(deep) {
var cl = this.children,
i,
l,
n;
if (!cl) {
return 0;
}
n = cl.length;
if (deep !== false) {
for (i = 0, l = n; i < l; i++) {
n += cl[i].countChildren();
}
}
return n;
} | [
"function",
"(",
"deep",
")",
"{",
"var",
"cl",
"=",
"this",
".",
"children",
",",
"i",
",",
"l",
",",
"n",
";",
"if",
"(",
"!",
"cl",
")",
"{",
"return",
"0",
";",
"}",
"n",
"=",
"cl",
".",
"length",
";",
"if",
"(",
"deep",
"!==",
"false",... | Count direct and indirect children.
@param {boolean} [deep=true] pass 'false' to only count direct children
@returns {int} number of child nodes | [
"Count",
"direct",
"and",
"indirect",
"children",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L2201-L2216 | |
10,698 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function() {
if (this.lazy) {
if (this.children == null) {
// null or undefined: Not yet loaded
return undefined;
} else if (this.children.length === 0) {
// Loaded, but response was empty
return false;
} else if (
this.children.length === 1 &&
this.children[0].isStatusNode(... | javascript | function() {
if (this.lazy) {
if (this.children == null) {
// null or undefined: Not yet loaded
return undefined;
} else if (this.children.length === 0) {
// Loaded, but response was empty
return false;
} else if (
this.children.length === 1 &&
this.children[0].isStatusNode(... | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"lazy",
")",
"{",
"if",
"(",
"this",
".",
"children",
"==",
"null",
")",
"{",
"// null or undefined: Not yet loaded",
"return",
"undefined",
";",
"}",
"else",
"if",
"(",
"this",
".",
"children",
".",
"... | Return true if node has children. Return undefined if not sure, i.e. the node is lazy and not yet loaded).
@returns {boolean | undefined} | [
"Return",
"true",
"if",
"node",
"has",
"children",
".",
"Return",
"undefined",
"if",
"not",
"sure",
"i",
".",
"e",
".",
"the",
"node",
"is",
"lazy",
"and",
"not",
"yet",
"loaded",
")",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L2673-L2691 | |
10,699 | mar10/fancytree | dist/jquery.fancytree-all-deps.js | function(opts) {
var i,
that = this,
deferreds = [],
dfd = new $.Deferred(),
parents = this.getParentList(false, false),
len = parents.length,
effects = !(opts && opts.noAnimation === true),
scroll = !(opts && opts.scrollIntoView === false);
// Expand bottom-up, so only the top node i... | javascript | function(opts) {
var i,
that = this,
deferreds = [],
dfd = new $.Deferred(),
parents = this.getParentList(false, false),
len = parents.length,
effects = !(opts && opts.noAnimation === true),
scroll = !(opts && opts.scrollIntoView === false);
// Expand bottom-up, so only the top node i... | [
"function",
"(",
"opts",
")",
"{",
"var",
"i",
",",
"that",
"=",
"this",
",",
"deferreds",
"=",
"[",
"]",
",",
"dfd",
"=",
"new",
"$",
".",
"Deferred",
"(",
")",
",",
"parents",
"=",
"this",
".",
"getParentList",
"(",
"false",
",",
"false",
")",
... | Expand all parents and optionally scroll into visible area as neccessary.
Promise is resolved, when lazy loading and animations are done.
@param {object} [opts] passed to `setExpanded()`.
Defaults to {noAnimation: false, noEvents: false, scrollIntoView: true}
@returns {$.Promise} | [
"Expand",
"all",
"parents",
"and",
"optionally",
"scroll",
"into",
"visible",
"area",
"as",
"neccessary",
".",
"Promise",
"is",
"resolved",
"when",
"lazy",
"loading",
"and",
"animations",
"are",
"done",
"."
] | 54307b76844177207e321c5b88eb03a23a6e23a2 | https://github.com/mar10/fancytree/blob/54307b76844177207e321c5b88eb03a23a6e23a2/dist/jquery.fancytree-all-deps.js#L2927-L2955 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.