text stringlengths 24 1.04M | metadata stringlengths 233 497 |
|---|---|
### File: src/ol/source/Raster.js
/**
* @module ol/source/Raster
*/
import Disposable from '../Disposable.js';
import Event from '../events/Event.js';
import EventType from '../events/EventType.js';
import ImageCanvas from '../ImageCanvas.js';
import ImageLayer from '../layer/Image.js';
import ImageSource from './Ima... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/Raster.js", "license": "bsd-2-clause", "size": 25994} |
### File: src/ol/source/Source.js
/**
* @module ol/source/Source
*/
import BaseObject from '../Object.js';
import SourceState from './State.js';
import {abstract} from '../util.js';
import {get as getProjection} from '../proj.js';
/**
* A function that returns a string or an array of strings representing source
* ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/Source.js", "license": "bsd-2-clause", "size": 4919} |
### File: src/ol/source/Stamen.js
/**
* @module ol/source/Stamen
*/
import XYZ from './XYZ.js';
import {ATTRIBUTION as OSM_ATTRIBUTION} from './OSM.js';
/**
* @const
* @type {Array<string>}
*/
const ATTRIBUTIONS = [
'Map tiles by <a href="https://stamen.com/" target="_blank">Stamen Design</a>, ' +
'under <... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/Stamen.js", "license": "bsd-2-clause", "size": 3816} |
### File: src/ol/source/State.js
/**
* @module ol/source/State
*/
/**
* @enum {string}
* State of the source, one of 'undefined', 'loading', 'ready' or 'error'.
*/
export default {
UNDEFINED: 'undefined',
LOADING: 'loading',
READY: 'ready',
ERROR: 'error',
};
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/State.js", "license": "bsd-2-clause", "size": 241} |
### File: src/ol/source/Tile.js
/**
* @module ol/source/Tile
*/
import Event from '../events/Event.js';
import Source from './Source.js';
import TileCache from '../TileCache.js';
import TileState from '../TileState.js';
import {abstract} from '../util.js';
import {equivalent} from '../proj.js';
import {getKeyZXY, wit... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/Tile.js", "license": "bsd-2-clause", "size": 10467} |
### File: src/ol/source/TileArcGISRest.js
/**
* @module ol/source/TileArcGISRest
*/
import TileImage from './TileImage.js';
import {appendParams} from '../uri.js';
import {assign} from '../obj.js';
import {createEmpty} from '../extent.js';
import {modulo} from '../math.js';
import {scale as scaleSize, toSize} from '... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/TileArcGISRest.js", "license": "bsd-2-clause", "size": 7942} |
### File: src/ol/source/TileDebug.js
/**
* @module ol/source/TileDebug
*/
import Tile from '../Tile.js';
import TileState from '../TileState.js';
import XYZ from './XYZ.js';
import {createCanvasContext2D} from '../dom.js';
import {getKeyZXY} from '../tilecoord.js';
import {toSize} from '../size.js';
class LabeledTi... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/TileDebug.js", "license": "bsd-2-clause", "size": 4171} |
### File: src/ol/source/TileEventType.js
/**
* @module ol/source/TileEventType
*/
/**
* @enum {string}
*/
export default {
/**
* Triggered when a tile starts loading.
* @event module:ol/source/Tile.TileSourceEvent#tileloadstart
* @api
*/
TILELOADSTART: 'tileloadstart',
/**
* Triggered when a ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/TileEventType.js", "license": "bsd-2-clause", "size": 689} |
### File: src/ol/source/TileImage.js
/**
* @module ol/source/TileImage
*/
import EventType from '../events/EventType.js';
import ImageTile from '../ImageTile.js';
import ReprojTile from '../reproj/Tile.js';
import TileCache from '../TileCache.js';
import TileState from '../TileState.js';
import UrlTile from './UrlTil... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/TileImage.js", "license": "bsd-2-clause", "size": 15840} |
### File: src/ol/source/TileJSON.js
/**
* @module ol/source/TileJSON
*/
// FIXME check order of async callbacks
/**
* See https://mapbox.com/developers/api/.
*/
import SourceState from './State.js';
import TileImage from './TileImage.js';
import {applyTransform, intersects} from '../extent.js';
import {assert} fr... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/TileJSON.js", "license": "bsd-2-clause", "size": 6805} |
### File: src/ol/source/TileWMS.js
/**
* @module ol/source/TileWMS
*/
import {DEFAULT_WMS_VERSION} from './common.js';
import TileImage from './TileImage.js';
import WMSServerType from './WMSServerType.js';
import {appendParams} from '../uri.js';
import {assert} from '../asserts.js';
import {assign} from '../obj.js... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/TileWMS.js", "license": "bsd-2-clause", "size": 15235} |
### File: src/ol/source/UTFGrid.js
/**
* @module ol/source/UTFGrid
*/
import EventType from '../events/EventType.js';
import SourceState from './State.js';
import Tile from '../Tile.js';
import TileSource from './Tile.js';
import TileState from '../TileState.js';
import {applyTransform, intersects} from '../extent.j... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/UTFGrid.js", "license": "bsd-2-clause", "size": 13632} |
### File: src/ol/source/UrlTile.js
/**
* @module ol/source/UrlTile
*/
import TileEventType from './TileEventType.js';
import TileSource, {TileSourceEvent} from './Tile.js';
import TileState from '../TileState.js';
import {createFromTemplates, expandUrl} from '../tileurlfunction.js';
import {getKeyZXY} from '../tileco... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/UrlTile.js", "license": "bsd-2-clause", "size": 6115} |
### File: src/ol/source/Vector.js
/**
* @module ol/source/Vector
*/
import Collection from '../Collection.js';
import CollectionEventType from '../CollectionEventType.js';
import Event from '../events/Event.js';
import EventType from '../events/EventType.js';
import ObjectEventType from '../ObjectEventType.js';
impo... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/Vector.js", "license": "bsd-2-clause", "size": 34327} |
### File: src/ol/source/VectorEventType.js
/**
* @module ol/source/VectorEventType
*/
/**
* @enum {string}
*/
export default {
/**
* Triggered when a feature is added to the source.
* @event module:ol/source/Vector.VectorSourceEvent#addfeature
* @api
*/
ADDFEATURE: 'addfeature',
/**
* Trigger... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/VectorEventType.js", "license": "bsd-2-clause", "size": 852} |
### File: src/ol/source/VectorTile.js
/**
* @module ol/source/VectorTile
*/
import EventType from '../events/EventType.js';
import Tile from '../VectorTile.js';
import TileCache from '../TileCache.js';
import TileState from '../TileState.js';
import UrlTile from './UrlTile.js';
import VectorRenderTile from '../Vecto... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/VectorTile.js", "license": "bsd-2-clause", "size": 18928} |
### File: src/ol/source/WMSServerType.js
/**
* @module ol/source/WMSServerType
*/
/**
* Available server types: `'carmentaserver'`, `'geoserver'`, `'mapserver'`,
* `'qgis'`. These are servers that have vendor parameters beyond the WMS
* specification that OpenLayers can make use of.
* @enum {string}
*/
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/WMSServerType.js", "license": "bsd-2-clause", "size": 754} |
### File: src/ol/source/WMTS.js
/**
* @module ol/source/WMTS
*/
import TileImage from './TileImage.js';
import WMTSRequestEncoding from './WMTSRequestEncoding.js';
import {appendParams} from '../uri.js';
import {assign} from '../obj.js';
import {createFromCapabilitiesMatrixSet} from '../tilegrid/WMTS.js';
import {cr... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/WMTS.js", "license": "bsd-2-clause", "size": 17706} |
### File: src/ol/source/WMTSRequestEncoding.js
/**
* @module ol/source/WMTSRequestEncoding
*/
/**
* Request encoding. One of 'KVP', 'REST'.
* @enum {string}
*/
export default {
KVP: 'KVP', // see spec §8
REST: 'REST', // see spec §10
};
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/WMTSRequestEncoding.js", "license": "bsd-2-clause", "size": 202} |
### File: src/ol/source/XYZ.js
/**
* @module ol/source/XYZ
*/
import TileImage from './TileImage.js';
import {createXYZ, extentFromProjection} from '../tilegrid.js';
/**
* @typedef {Object} Options
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
* @property {boolean} [attribution... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/XYZ.js", "license": "bsd-2-clause", "size": 5297} |
### File: src/ol/source/Zoomify.js
/**
* @module ol/source/Zoomify
*/
import {DEFAULT_TILE_SIZE} from '../tilegrid/common.js';
import ImageTile from '../ImageTile.js';
import TileGrid from '../tilegrid/TileGrid.js';
import TileImage from './TileImage.js';
import TileState from '../TileState.js';
import {assert} from... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/Zoomify.js", "license": "bsd-2-clause", "size": 10606} |
### File: src/ol/source/common.js
/**
* @module ol/source/common
*/
/**
* Default WMS version.
* @type {string}
*/
export const DEFAULT_WMS_VERSION = '1.3.0';
/**
* Context options to disable image smoothing.
* @type {Object}
*/
export const IMAGE_SMOOTHING_DISABLED = {
imageSmoothingEnabled: false,
msIma... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/source/common.js", "license": "bsd-2-clause", "size": 316} |
### File: src/ol/sphere.js
/**
* @module ol/sphere
*/
import GeometryType from './geom/GeometryType.js';
import {toDegrees, toRadians} from './math.js';
/**
* Object literal with options for the {@link getLength} or {@link getArea}
* functions.
* @typedef {Object} SphereMetricOptions
* @property {import("./proj.... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/sphere.js", "license": "bsd-2-clause", "size": 9131} |
### File: src/ol/string.js
/**
* @module ol/string
*/
/**
* @param {number} number Number to be formatted
* @param {number} width The desired width
* @param {number=} opt_precision Precision of the output string (i.e. number of decimal places)
* @returns {string} Formatted string
*/
export function padNumber(nu... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/string.js", "license": "bsd-2-clause", "size": 1207} |
### File: src/ol/structs/LRUCache.js
/**
* @module ol/structs/LRUCache
*/
import {assert} from '../asserts.js';
/**
* @typedef {Object} Entry
* @property {string} key_
* @property {Object} newer
* @property {Object} older
* @property {*} value_
*/
/**
* @classdesc
* Implements a Least-Recently-Used cache w... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/structs/LRUCache.js", "license": "bsd-2-clause", "size": 5673} |
### File: src/ol/structs/LinkedList.js
/**
* @module ol/structs/LinkedList
*/
/**
* @typedef {Object} Item
* @property {Item} [prev]
* @property {Item} [next]
* @property {?} data
*/
/**
* @classdesc
* Creates an empty linked list structure.
*/
class LinkedList {
/**
* @param {boolean=} opt_circular Th... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/structs/LinkedList.js", "license": "bsd-2-clause", "size": 5195} |
### File: src/ol/structs/PriorityQueue.js
/**
* @module ol/structs/PriorityQueue
*/
import {assert} from '../asserts.js';
import {clear} from '../obj.js';
/**
* @type {number}
*/
export const DROP = Infinity;
/**
* @classdesc
* Priority queue.
*
* The implementation is inspired from the Closure Library's Heap... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/structs/PriorityQueue.js", "license": "bsd-2-clause", "size": 6351} |
### File: src/ol/structs/RBush.js
/**
* @module ol/structs/RBush
*/
import RBush_ from 'rbush/rbush.js';
import {createOrUpdate, equals} from '../extent.js';
import {getUid} from '../util.js';
import {isEmpty} from '../obj.js';
/**
* @typedef {Object} Entry
* @property {number} minX
* @property {number} minY
* @... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/structs/RBush.js", "license": "bsd-2-clause", "size": 5193} |
### File: src/ol/style.js
/**
* @module ol/style
*/
export {default as Circle} from './style/Circle.js';
export {default as Fill} from './style/Fill.js';
export {default as Icon} from './style/Icon.js';
export {default as IconImage} from './style/IconImage.js';
export {default as Image} from './style/Image.js';
expo... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/style.js", "license": "bsd-2-clause", "size": 508} |
### File: src/ol/style/Circle.js
/**
* @module ol/style/Circle
*/
import RegularShape from './RegularShape.js';
/**
* @typedef {Object} Options
* @property {import("./Fill.js").default} [fill] Fill style.
* @property {number} radius Circle radius.
* @property {import("./Stroke.js").default} [stroke] Stroke styl... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/style/Circle.js", "license": "bsd-2-clause", "size": 1507} |
### File: src/ol/style/Fill.js
/**
* @module ol/style/Fill
*/
/**
* @typedef {Object} Options
* @property {import("../color.js").Color|import("../colorlike.js").ColorLike} [color=null] A color, gradient or pattern.
* See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/style/Fill.js", "license": "bsd-2-clause", "size": 1462} |
### File: src/ol/style/Icon.js
/**
* @module ol/style/Icon
*/
import EventType from '../events/EventType.js';
import IconAnchorUnits from './IconAnchorUnits.js';
import IconOrigin from './IconOrigin.js';
import ImageState from '../ImageState.js';
import ImageStyle from './Image.js';
import {asArray} from '../color.js... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/style/Icon.js", "license": "bsd-2-clause", "size": 12646} |
### File: src/ol/style/IconAnchorUnits.js
/**
* @module ol/style/IconAnchorUnits
*/
/**
* Icon anchor units. One of 'fraction', 'pixels'.
* @enum {string}
*/
export default {
/**
* Anchor is a fraction
* @api
*/
FRACTION: 'fraction',
/**
* Anchor is in pixels
* @api
*/
PIXELS: 'pixels',
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/style/IconAnchorUnits.js", "license": "bsd-2-clause", "size": 281} |
### File: src/ol/style/IconImage.js
/**
* @module ol/style/IconImage
*/
import EventTarget from '../events/Target.js';
import EventType from '../events/EventType.js';
import ImageState from '../ImageState.js';
import {createCanvasContext2D} from '../dom.js';
import {shared as iconImageCache} from './IconImageCache.j... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/style/IconImage.js", "license": "bsd-2-clause", "size": 7162} |
### File: src/ol/style/IconImageCache.js
/**
* @module ol/style/IconImageCache
*/
import {asString} from '../color.js';
/**
* @classdesc
* Singleton class. Available through {@link module:ol/style/IconImageCache~shared}.
*/
class IconImageCache {
constructor() {
/**
* @type {!Object<string, import("./I... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/style/IconImageCache.js", "license": "bsd-2-clause", "size": 2719} |
### File: src/ol/style/IconOrigin.js
/**
* @module ol/style/IconOrigin
*/
/**
* Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'.
* @enum {string}
*/
export default {
/**
* Origin is at bottom left
* @api
*/
BOTTOM_LEFT: 'bottom-left',
/**
* Origin is at bottom right
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/style/IconOrigin.js", "license": "bsd-2-clause", "size": 481} |
### File: src/ol/style/Image.js
/**
* @module ol/style/Image
*/
import {abstract} from '../util.js';
import {toSize} from '../size.js';
/**
* @typedef {Object} Options
* @property {number} opacity
* @property {boolean} rotateWithView
* @property {number} rotation
* @property {number|import("../size.js").Size} s... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/style/Image.js", "license": "bsd-2-clause", "size": 5293} |
### File: src/ol/style/LiteralStyle.js
/**
* Literal Style objects differ from standard styles in that they cannot
* be functions and are made up of simple objects instead of classes.
* @module ol/style/LiteralStyle
*/
/**
* @typedef {import("./expressions.js").ExpressionValue} ExpressionValue
*/
/**
* @typede... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/style/LiteralStyle.js", "license": "bsd-2-clause", "size": 2019} |
### File: src/ol/style/RegularShape.js
/**
* @module ol/style/RegularShape
*/
import ImageState from '../ImageState.js';
import ImageStyle from './Image.js';
import {asArray} from '../color.js';
import {asColorLike} from '../colorlike.js';
import {createCanvasContext2D} from '../dom.js';
import {
defaultFillStyle,... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/style/RegularShape.js", "license": "bsd-2-clause", "size": 13767} |
### File: src/ol/style/Stroke.js
/**
* @module ol/style/Stroke
*/
/**
* @typedef {Object} Options
* @property {import("../color.js").Color|import("../colorlike.js").ColorLike} [color] A color, gradient or pattern.
* See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/style/Stroke.js", "license": "bsd-2-clause", "size": 5507} |
### File: src/ol/style/Style.js
/**
* @module ol/style/Style
*/
import CircleStyle from './Circle.js';
import Fill from './Fill.js';
import GeometryType from '../geom/GeometryType.js';
import Stroke from './Stroke.js';
import {assert} from '../asserts.js';
/**
* A function that takes an {@link module:ol/Feature} a... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/style/Style.js", "license": "bsd-2-clause", "size": 13904} |
### File: src/ol/style/Text.js
/**
* @module ol/style/Text
*/
import Fill from './Fill.js';
import TextPlacement from './TextPlacement.js';
import {toSize} from '../size.js';
/**
* The default fill color to use if no fill was set at construction time; a
* blackish `#333`.
*
* @const {string}
*/
const DEFAULT_FI... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/style/Text.js", "license": "bsd-2-clause", "size": 12273} |
### File: src/ol/style/TextPlacement.js
/**
* @module ol/style/TextPlacement
*/
/**
* Text placement. One of `'point'`, `'line'`. Default is `'point'`. Note that
* `'line'` requires the underlying geometry to be a {@link module:ol/geom/LineString~LineString},
* {@link module:ol/geom/Polygon~Polygon}, {@link modul... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/style/TextPlacement.js", "license": "bsd-2-clause", "size": 455} |
### File: src/ol/style/expressions.js
/**
* Operators and utilities used for style expressions
* @module ol/style/expressions
*/
import {asArray, isStringColor} from '../color.js';
/**
* Base type used for literal style parameters; can be a number literal or the output of an operator,
* which in turns takes {@li... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/style/expressions.js", "license": "bsd-2-clause", "size": 24449} |
### File: src/ol/tilecoord.js
/**
* @module ol/tilecoord
*/
/**
* An array of three numbers representing the location of a tile in a tile
* grid. The order is `z` (zoom level), `x` (column), and `y` (row).
* @typedef {Array<number>} TileCoord
* @api
*/
/**
* @param {number} z Z.
* @param {number} x X.
* @pa... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/tilecoord.js", "license": "bsd-2-clause", "size": 2119} |
### File: src/ol/tilegrid.js
/**
* @module ol/tilegrid
*/
import Corner from './extent/Corner.js';
import TileGrid from './tilegrid/TileGrid.js';
import Units from './proj/Units.js';
import {DEFAULT_MAX_ZOOM, DEFAULT_TILE_SIZE} from './tilegrid/common.js';
import {METERS_PER_UNIT, get as getProjection} from './proj.j... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/tilegrid.js", "license": "bsd-2-clause", "size": 6211} |
### File: src/ol/tilegrid/TileGrid.js
/**
* @module ol/tilegrid/TileGrid
*/
import TileRange, {
createOrUpdate as createOrUpdateTileRange,
} from '../TileRange.js';
import {DEFAULT_TILE_SIZE} from './common.js';
import {assert} from '../asserts.js';
import {clamp} from '../math.js';
import {createOrUpdate, getTopLe... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/tilegrid/TileGrid.js", "license": "bsd-2-clause", "size": 20183} |
### File: src/ol/tilegrid/WMTS.js
/**
* @module ol/tilegrid/WMTS
*/
import TileGrid from './TileGrid.js';
import {find} from '../array.js';
import {get as getProjection} from '../proj.js';
/**
* @typedef {Object} Options
* @property {import("../extent.js").Extent} [extent] Extent for the tile grid. No tiles
* ou... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/tilegrid/WMTS.js", "license": "bsd-2-clause", "size": 6859} |
### File: src/ol/tilegrid/common.js
/**
* @module ol/tilegrid/common
*/
/**
* Default maximum zoom for default tile grids.
* @type {number}
*/
export const DEFAULT_MAX_ZOOM = 42;
/**
* Default tile size.
* @type {number}
*/
export const DEFAULT_TILE_SIZE = 256;
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/tilegrid/common.js", "license": "bsd-2-clause", "size": 236} |
### File: src/ol/tileurlfunction.js
/**
* @module ol/tileurlfunction
*/
import {assert} from './asserts.js';
import {modulo} from './math.js';
import {hash as tileCoordHash} from './tilecoord.js';
/**
* @param {string} template Template.
* @param {import("./tilegrid/TileGrid.js").default} tileGrid Tile grid.
* @r... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/tileurlfunction.js", "license": "bsd-2-clause", "size": 3945} |
### File: src/ol/transform.js
/**
* @module ol/transform
*/
import {assert} from './asserts.js';
/**
* An array representing an affine 2d transformation for use with
* {@link module:ol/transform} functions. The array has 6 elements.
* @typedef {!Array<number>} Transform
* @api
*/
/**
* Collection of affine 2d... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/transform.js", "license": "bsd-2-clause", "size": 8450} |
### File: src/ol/uri.js
/**
* @module ol/uri
*/
/**
* Appends query parameters to a URI.
*
* @param {string} uri The original URI, which may already have query data.
* @param {!Object} params An object where keys are URI-encoded parameter keys,
* and the values are arbitrary types or arrays.
* @return {str... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/uri.js", "license": "bsd-2-clause", "size": 858} |
### File: src/ol/util.js
/**
* @module ol/util
*/
/**
* @return {?} Any return.
*/
export function abstract() {
return /** @type {?} */ ((function () {
throw new Error('Unimplemented abstract method.');
})());
}
/**
* Counter for getUid.
* @type {number}
* @private
*/
let uidCounter_ = 0;
/**
* Gets... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/util.js", "license": "bsd-2-clause", "size": 822} |
### File: src/ol/vec/mat4.js
/**
* @module ol/vec/mat4
*/
/**
* @return {Array<number>} "4x4 matrix representing a 3D identity transform."
*/
export function create() {
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
}
/**
* @param {Array<number>} mat4 Flattened 4x4 matrix receiving the result.
* @pa... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/vec/mat4.js", "license": "bsd-2-clause", "size": 673} |
### File: src/ol/webgl.js
/**
* @module ol/webgl
*/
/**
* Constants taken from goog.webgl
*/
/**
* Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers containing vertices data, such as
* position, color, texture coordinate, etc. These vertices are then referenced by an index buffer
* to be drawn on ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/webgl.js", "license": "bsd-2-clause", "size": 2585} |
### File: src/ol/webgl/Buffer.js
/**
* @module ol/webgl/Buffer
*/
import {ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER} from '../webgl.js';
import {DYNAMIC_DRAW, STATIC_DRAW, STREAM_DRAW} from '../webgl.js';
import {assert} from '../asserts.js';
/**
* Used to describe the intended usage for the data: `STATIC_DRAW`, `STREAM_D... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/webgl/Buffer.js", "license": "bsd-2-clause", "size": 3597} |
### File: src/ol/webgl/ContextEventType.js
/**
* @module ol/webgl/ContextEventType
*/
/**
* @enum {string}
*/
export default {
LOST: 'webglcontextlost',
RESTORED: 'webglcontextrestored',
};
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/webgl/ContextEventType.js", "license": "bsd-2-clause", "size": 156} |
### File: src/ol/webgl/Helper.js
/**
* @module ol/webgl/Helper
*/
import ContextEventType from '../webgl/ContextEventType.js';
import Disposable from '../Disposable.js';
import WebGLPostProcessingPass from './PostProcessingPass.js';
import {
FLOAT,
UNSIGNED_BYTE,
UNSIGNED_INT,
UNSIGNED_SHORT,
getContext,
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/webgl/Helper.js", "license": "bsd-2-clause", "size": 31822} |
### File: src/ol/webgl/PostProcessingPass.js
/**
* @module ol/webgl/PostProcessingPass
*/
const DEFAULT_VERTEX_SHADER = `
precision mediump float;
attribute vec2 a_position;
varying vec2 v_texCoord;
varying vec2 v_screenCoord;
uniform vec2 u_screenSize;
void main() {
v_texCoord = a_position... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/webgl/PostProcessingPass.js", "license": "bsd-2-clause", "size": 10775} |
### File: src/ol/webgl/RenderTarget.js
/**
* A wrapper class to simplify rendering to a texture instead of the final canvas
* @module ol/webgl/RenderTarget
*/
import {equals} from '../array.js';
// for pixel color reading
const tmpArray4 = new Uint8Array(4);
/**
* @classdesc
* This class is a wrapper around the ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/webgl/RenderTarget.js", "license": "bsd-2-clause", "size": 4516} |
### File: src/ol/webgl/ShaderBuilder.js
/**
* Classes and utilities for generating shaders from literal style objects
* @module ol/webgl/ShaderBuilder
*/
import {
ValueTypes,
expressionToGlsl,
getStringNumberEquivalent,
} from '../style/expressions.js';
/**
* @typedef {Object} VaryingDescription
* @propert... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/webgl/ShaderBuilder.js", "license": "bsd-2-clause", "size": 18307} |
### File: src/ol/worker/version.js
/**
* A worker that responds to messages by posting a message with the version identifer.
* @module ol/worker/version
*/
import {VERSION} from '../util.js';
/** @type {any} */
const worker = self;
worker.onmessage = (event) => {
console.log('version worker received message:', e... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/worker/version.js", "license": "bsd-2-clause", "size": 388} |
### File: src/ol/worker/webgl.js
/**
* A worker that does cpu-heavy tasks related to webgl rendering.
* @module ol/worker/webgl
*/
import {
WebGLWorkerMessageType,
writePointFeatureToBuffers,
} from '../renderer/webgl/Layer.js';
import {assign} from '../obj.js';
/** @type {any} */
const worker = self;
worker.o... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/worker/webgl.js", "license": "bsd-2-clause", "size": 1835} |
### File: src/ol/xml.js
/**
* @module ol/xml
*/
import {extend} from './array.js';
/**
* When using {@link module:ol/xml~makeChildAppender} or
* {@link module:ol/xml~makeSimpleNodeFactory}, the top `objectStack` item needs
* to have this structure.
* @typedef {Object} NodeStackItem
* @property {Node} node
*/
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "src/ol/xml.js", "license": "bsd-2-clause", "size": 18577} |
### File: tasks/changelog.sh
#!/bin/bash
#
# Generate a Markdown-formatted changelog from merge commits.
#
set -o errexit
#
# Regex to match the standard pull request commit message. Creates capture
# groups for pull request number, GitHub username, and commit message body.
#
MERGE_RE=Merge\ pull\ request\ #\([0-9]+... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/OpenLayers", "path": "tasks/changelog.sh", "license": "bsd-2-clause", "size": 2132} |
### File: tasks/generate-index.js
const fse = require('fs-extra');
const path = require('path');
const generateInfo = require('./generate-info');
/**
* Read the symbols from info file.
* @return {Promise<Array>} Resolves with an array of symbol objects.
*/
async function getSymbols() {
const info = await generate... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "tasks/generate-index.js", "license": "bsd-2-clause", "size": 3810} |
### File: tasks/generate-info.js
const fse = require('fs-extra');
const path = require('path');
const spawn = require('child_process').spawn;
const walk = require('walk').walk;
const isWindows = process.platform.indexOf('win') === 0;
const sourceDir = path.join(__dirname, '..', 'src');
const infoPath = path.join(__dir... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "tasks/generate-info.js", "license": "bsd-2-clause", "size": 4438} |
### File: tasks/next-dev-version.js
const version = require('../package.json').version;
const semver = require('semver');
function nextVersion() {
const s = semver.parse(version);
if (!s) {
throw new Error(`Invalid version ${version}`);
}
return `${s.major}.${s.minor}.${s.patch}-dev.${Date.now()}`;
}
if (... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "tasks/next-dev-version.js", "license": "bsd-2-clause", "size": 359} |
### File: tasks/prepare-package.js
const fs = require('fs');
const path = require('path');
const pkg = require('../package.json');
const buildDir = path.resolve(__dirname, '../build/ol');
// update the version number in util.js
const utilPath = path.join(buildDir, 'util.js');
const versionRegEx = /var VERSION = '(.*)... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "tasks/prepare-package.js", "license": "bsd-2-clause", "size": 703} |
### File: tasks/publish.sh
#!/bin/bash
#
# Run this script to publish a new version of the library to npm. This requires
# that you have a clean working directory and have created a tag that matches
# the version number in package.json.
#
set -o errexit
#
# Destination directory for the package.
#
BUILT_PACKAGE=buil... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/OpenLayers", "path": "tasks/publish.sh", "license": "bsd-2-clause", "size": 1915} |
### File: tasks/serialize-workers.js
const path = require('path');
const babel = require('rollup-plugin-babel');
const resolve = require('rollup-plugin-node-resolve');
const common = require('rollup-plugin-commonjs');
const rollup = require('rollup');
const terser = require('rollup-plugin-terser').terser;
const fse = r... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "tasks/serialize-workers.js", "license": "bsd-2-clause", "size": 2385} |
### File: test/index_test.js
// require all modules ending in ".test.js" from the
// current directory and all subdirectories
const testsContext = require.context('./spec', true, /\.test\.js$/);
testsContext.keys().forEach(testsContext);
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "test/index_test.js", "license": "bsd-2-clause", "size": 210} |
### File: test/karma.config.js
const path = require('path');
module.exports = function (karma) {
karma.set({
browsers: [process.env.CI ? 'ChromeHeadless' : 'Chrome'],
browserDisconnectTolerance: 2,
frameworks: ['mocha'],
client: {
runInParent: true,
mocha: {
timeout: 2500,
}... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "test/karma.config.js", "license": "bsd-2-clause", "size": 3314} |
### File: test/module-global.js
window.module = {};
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "test/module-global.js", "license": "bsd-2-clause", "size": 20} |
### File: test/spec/util.js
export function overrideRAF() {
const raf = window.requestAnimationFrame;
const caf = window.cancelAnimationFrame;
window.requestAnimationFrame = function (callback) {
return setTimeout(callback, 1);
};
window.cancelAnimationFrame = function (key) {
return clearTimeout(key... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "test/spec/util.js", "license": "bsd-2-clause", "size": 410} |
### File: test/test-extensions.js
// avoid importing anything that results in an instanceof check
// since these extensions are global, instanceof checks fail with modules
(function (global) {
// show generated maps for rendering tests
const showMap = global.location.search.indexOf('generate') >= 0;
// show a d... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "test/test-extensions.js", "license": "bsd-2-clause", "size": 15673} |
### File: text/machine_comprehension/bert-squad/BERT-Squad.ipynb
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Running BERT-Squad model "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**This tutorial shows how to run the BERT-Squad model on On... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Jupyter Notebook", "repo_name": "minhanghuang/onnx-models", "path": "text/machine_comprehension/bert-squad/BERT-Squad.ipynb", "license": "apache-2.0", "size": 10909} |
### File: text/machine_comprehension/bert-squad/dependencies/run_onnx_squad.py
# SPDX-License-Identifier: Apache-2.0
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obt... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "text/machine_comprehension/bert-squad/dependencies/run_onnx_squad.py", "license": "apache-2.0", "size": 23646... |
### File: text/machine_comprehension/bert-squad/dependencies/tokenization.py
# SPDX-License-Identifier: Apache-2.0
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "text/machine_comprehension/bert-squad/dependencies/tokenization.py", "license": "apache-2.0", "size": 12296} |
### File: text/machine_comprehension/gpt-2/dependencies/GPT2-export.py
# SPDX-License-Identifier: Apache-2.0
import torch
import onnxruntime
import onnx
from onnx import numpy_helper
from transformers import GPT2Model, GPT2LMHeadModel, GPT2Tokenizer
import numpy as np
import os
# Transformers has a unified API
# for... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "text/machine_comprehension/gpt-2/dependencies/GPT2-export.py", "license": "apache-2.0", "size": 7068} |
### File: text/machine_comprehension/roberta/dependencies/roberta-sequence-classification-inference.ipynb
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Running roberta-movie-sentiment model\n",
"\n",
"This tutorial shows how to run the roberta-movie-sentiment model on On... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Jupyter Notebook", "repo_name": "minhanghuang/onnx-models", "path": "text/machine_comprehension/roberta/dependencies/roberta-sequence-classification-inference.ipynb", "... |
### File: text/machine_comprehension/roberta/dependencies/roberta-sequence-classification-validation.ipynb
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Epoch... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Jupyter Notebook", "repo_name": "minhanghuang/onnx-models", "path": "text/machine_comprehension/roberta/dependencies/roberta-sequence-classification-validation.ipynb", ... |
### File: text/machine_comprehension/t5/dependencies/T5-export.py
# SPDX-License-Identifier: Apache-2.0
from transformers import T5ForConditionalGeneration
from .models import CombinedDecoder, SimplifiedT5Encoder
import torch
def create_t5_encoder_decoder(pretrained_version='t5-base'):
""" Generates an encoder a... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "text/machine_comprehension/t5/dependencies/T5-export.py", "license": "apache-2.0", "size": 3853} |
### File: text/machine_comprehension/t5/dependencies/models.py
# SPDX-License-Identifier: Apache-2.0
import torch
import torch.nn.functional as F
from tqdm import trange
class CombinedDecoder(torch.nn.Module):
""" Creation of a class to combine the decoder and the lm head """
def __init__(self, decoder, lm_h... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "text/machine_comprehension/t5/dependencies/models.py", "license": "apache-2.0", "size": 8585} |
### File: vision/body_analysis/age_gender/levi_googlenet.py
# SPDX-License-Identifier: Apache-2.0
import cv2
import onnxruntime as ort
import argparse
import numpy as np
import sys
sys.path.append('..')
from ultraface.dependencies.box_utils import predict
# ------------------------------------------------------------... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "vision/body_analysis/age_gender/levi_googlenet.py", "license": "apache-2.0", "size": 5912} |
### File: vision/body_analysis/age_gender/rothe_vgg.py
# SPDX-License-Identifier: Apache-2.0
import cv2
import onnxruntime as ort
import argparse
import numpy as np
import sys
sys.path.append('..')
from ultraface.dependencies.box_utils import predict
# -----------------------------------------------------------------... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "vision/body_analysis/age_gender/rothe_vgg.py", "license": "apache-2.0", "size": 5889} |
### File: vision/body_analysis/arcface/dependencies/arcface_inference.ipynb
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Inference Demo for ArcFace models\n",
"\n",
"## Overview\n",
"This notebook can be used for inference on ArcFace ONNX models. The demo shows how ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Jupyter Notebook", "repo_name": "minhanghuang/onnx-models", "path": "vision/body_analysis/arcface/dependencies/arcface_inference.ipynb", "license": "apache-2.0", "size"... |
### File: vision/body_analysis/arcface/dependencies/arcface_validation.ipynb
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Validation notebook for ArcFace models\n",
"\n",
"## Overview\n",
"Use this notebook to verify the accuracy of a trained ArcFace model in ONNX f... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Jupyter Notebook", "repo_name": "minhanghuang/onnx-models", "path": "vision/body_analysis/arcface/dependencies/arcface_validation.ipynb", "license": "apache-2.0", "size... |
### File: vision/body_analysis/arcface/dependencies/face_image.py
# SPDX-License-Identifier: Apache-2.0
from easydict import EasyDict as edict
import os
import json
import numpy as np
def load_property(data_dir):
'''
Returns number of classes (in train dataset) and image size
'''
prop = edict()
for line in... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "vision/body_analysis/arcface/dependencies/face_image.py", "license": "apache-2.0", "size": 8530} |
### File: vision/body_analysis/arcface/dependencies/face_postprocess.py
# SPDX-License-Identifier: Apache-2.0
import sklearn
def postprocess(embedding):
embedding = sklearn.preprocessing.normalize(embedding).flatten()
return embedding
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "vision/body_analysis/arcface/dependencies/face_postprocess.py", "license": "apache-2.0", "size": 173} |
### File: vision/body_analysis/arcface/dependencies/face_preprocess.py
# SPDX-License-Identifier: Apache-2.0
import cv2
import numpy as np
from skimage import transform as trans
def parse_lst_line(line):
'''
Helper function for line parsing
'''
vec = line.strip().split("\t")
assert len(vec)>=3
aligned = ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "vision/body_analysis/arcface/dependencies/face_preprocess.py", "license": "apache-2.0", "size": 3121} |
### File: vision/body_analysis/arcface/dependencies/fresnet.py
# SPDX-License-Identifier: Apache-2.0
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "vision/body_analysis/arcface/dependencies/fresnet.py", "license": "apache-2.0", "size": 30173} |
### File: vision/body_analysis/arcface/dependencies/helper.py
# SPDX-License-Identifier: Apache-2.0
# coding: utf-8
# YuanYang
import math
import cv2
import numpy as np
def nms(boxes, overlap_threshold, mode='Union'):
"""
non max suppression
Parameters:
----------
box: numpy array n x 5
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "vision/body_analysis/arcface/dependencies/helper.py", "license": "apache-2.0", "size": 4722} |
### File: vision/body_analysis/arcface/dependencies/image_iter.py
# SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import random
import logging
import sys
import numbers
import math
import sklearn
import dateti... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "vision/body_analysis/arcface/dependencies/image_iter.py", "license": "apache-2.0", "size": 9473} |
### File: vision/body_analysis/arcface/dependencies/mtcnn_detector.py
# SPDX-License-Identifier: Apache-2.0
# coding: utf-8
import os
import mxnet as mx
import numpy as np
import math
import cv2
from multiprocessing import Pool
from itertools import repeat
from helper import nms, adjust_input, generate_bbox, detect_fi... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "vision/body_analysis/arcface/dependencies/mtcnn_detector.py", "license": "apache-2.0", "size": 23237} |
### File: vision/body_analysis/arcface/dependencies/symbol_utils.py
# SPDX-License-Identifier: Apache-2.0
import mxnet as mx
def Conv(**kwargs):
body = mx.sym.Convolution(**kwargs)
return body
def Act(data, act_type, name):
#ignore param act_type, set it in this function
body = mx.sym.LeakyReLU(data ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "vision/body_analysis/arcface/dependencies/symbol_utils.py", "license": "apache-2.0", "size": 5981} |
### File: vision/body_analysis/arcface/dependencies/train_arcface.ipynb
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Training Notebook for ArcFace model on Refined MS1M dataset\n",
"\n",
"## Overview\n",
"Use this notebook to train a ArcFace model from scratch. Make... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Jupyter Notebook", "repo_name": "minhanghuang/onnx-models", "path": "vision/body_analysis/arcface/dependencies/train_arcface.ipynb", "license": "apache-2.0", "size": 33... |
### File: vision/body_analysis/arcface/dependencies/verification.py
# SPDX-License-Identifier: MIT
"""Helper for evaluation on the Labeled Faces in the Wild dataset
"""
# MIT License
#
# Copyright (c) 2016 David Sandberg
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this softwa... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "vision/body_analysis/arcface/dependencies/verification.py", "license": "apache-2.0", "size": 8401} |
### File: vision/body_analysis/ultraface/demo.py
# SPDX-License-Identifier: MIT
import cv2
import onnxruntime as ort
import argparse
import numpy as np
from dependencies.box_utils import predict
# -------------------------------------------------------------------------------------------------------------------------... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "vision/body_analysis/ultraface/demo.py", "license": "apache-2.0", "size": 2630} |
### File: vision/body_analysis/ultraface/dependencies/box_utils.py
# SPDX-License-Identifier: MIT
import numpy as np
def area_of(left_top, right_bottom):
"""
Compute the areas of rectangles given two corners.
Args:
left_top (N, 2): left top corner.
right_bottom (N, 2): right bottom corner.... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx-models", "path": "vision/body_analysis/ultraface/dependencies/box_utils.py", "license": "apache-2.0", "size": 4079} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.