repo
stringclasses
195 values
path
stringlengths
4
99
func_name
stringlengths
0
41
original_string
stringlengths
72
56.1k
language
stringclasses
1 value
code
stringlengths
72
56.1k
code_tokens
listlengths
25
8.12k
docstring
stringlengths
2
12.5k
docstring_tokens
listlengths
1
449
sha
stringclasses
197 values
url
stringlengths
88
186
partition
stringclasses
1 value
summary
stringlengths
8
338
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
adobe/brackets
src/LiveDevelopment/main.js
_showStatusChangeReason
function _showStatusChangeReason(reason) { // Destroy the previous twipsy (options are not updated otherwise) _$btnGoLive.twipsy("hide").removeData("twipsy"); // If there was no reason or the action was an explicit request by the user, don't show a twipsy if (!reason || reason === "expl...
javascript
function _showStatusChangeReason(reason) { // Destroy the previous twipsy (options are not updated otherwise) _$btnGoLive.twipsy("hide").removeData("twipsy"); // If there was no reason or the action was an explicit request by the user, don't show a twipsy if (!reason || reason === "expl...
[ "function", "_showStatusChangeReason", "(", "reason", ")", "{", "// Destroy the previous twipsy (options are not updated otherwise)", "_$btnGoLive", ".", "twipsy", "(", "\"hide\"", ")", ".", "removeData", "(", "\"twipsy\"", ")", ";", "// If there was no reason or the action was...
Called on status change
[ "Called", "on", "status", "change" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/LiveDevelopment/main.js#L197-L224
train
Show the status change reason
[ 30522, 3853, 1035, 3065, 29336, 2271, 22305, 7869, 3022, 2239, 1006, 3114, 1007, 1063, 1013, 1013, 6033, 1996, 3025, 1056, 9148, 18075, 1006, 7047, 2024, 2025, 7172, 4728, 1007, 1035, 1002, 18411, 16656, 3669, 3726, 1012, 1056, 9148, 18075,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/semi-spacing.js
hasTrailingSpace
function hasTrailingSpace(token) { const tokenAfter = sourceCode.getTokenAfter(token); return tokenAfter && astUtils.isTokenOnSameLine(token, tokenAfter) && sourceCode.isSpaceBetweenTokens(token, tokenAfter); }
javascript
function hasTrailingSpace(token) { const tokenAfter = sourceCode.getTokenAfter(token); return tokenAfter && astUtils.isTokenOnSameLine(token, tokenAfter) && sourceCode.isSpaceBetweenTokens(token, tokenAfter); }
[ "function", "hasTrailingSpace", "(", "token", ")", "{", "const", "tokenAfter", "=", "sourceCode", ".", "getTokenAfter", "(", "token", ")", ";", "return", "tokenAfter", "&&", "astUtils", ".", "isTokenOnSameLine", "(", "token", ",", "tokenAfter", ")", "&&", "sou...
Checks if a given token has trailing whitespace. @param {Object} token The token to check. @returns {boolean} True if the given token has trailing space, false if not.
[ "Checks", "if", "a", "given", "token", "has", "trailing", "whitespace", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/semi-spacing.js#L73-L77
train
Check if a token has trailing space
[ 30522, 3853, 2038, 6494, 16281, 23058, 1006, 19204, 1007, 1063, 9530, 3367, 19204, 10354, 3334, 1027, 3120, 16044, 1012, 2131, 18715, 8189, 6199, 2121, 1006, 19204, 1007, 1025, 2709, 19204, 10354, 3334, 1004, 1004, 2004, 8525, 3775, 4877, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
goldfire/howler.js
dist/howler.js
function() { var self = this; // Fire an error event and pass back the code. self._parent._emit('loaderror', self._id, self._node.error ? self._node.error.code : 0); // Clear the event listener. self._node.removeEventListener('error', self._errorFn, false); }
javascript
function() { var self = this; // Fire an error event and pass back the code. self._parent._emit('loaderror', self._id, self._node.error ? self._node.error.code : 0); // Clear the event listener. self._node.removeEventListener('error', self._errorFn, false); }
[ "function", "(", ")", "{", "var", "self", "=", "this", ";", "// Fire an error event and pass back the code.", "self", ".", "_parent", ".", "_emit", "(", "'loaderror'", ",", "self", ".", "_id", ",", "self", ".", "_node", ".", "error", "?", "self", ".", "_no...
HTML5 Audio error listener callback.
[ "HTML5", "Audio", "error", "listener", "callback", "." ]
030db918dd8ce640afd57e172418472497e8f113
https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/dist/howler.js#L2257-L2265
train
Handle load error.
[ 30522, 3853, 1006, 1007, 1063, 13075, 2969, 1027, 2023, 1025, 1013, 1013, 2543, 2019, 7561, 2724, 1998, 3413, 2067, 1996, 3642, 1012, 2969, 1012, 1035, 6687, 1012, 1035, 12495, 2102, 1006, 1005, 7170, 2121, 29165, 1005, 1010, 2969, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/core/util/util.js
disableElementScroll
function disableElementScroll(element) { element = angular.element(element || body); var scrollMask; if (options.disableScrollMask) { scrollMask = element; } else { scrollMask = angular.element( '<div class="md-scroll-mask">' + ' <div class=...
javascript
function disableElementScroll(element) { element = angular.element(element || body); var scrollMask; if (options.disableScrollMask) { scrollMask = element; } else { scrollMask = angular.element( '<div class="md-scroll-mask">' + ' <div class=...
[ "function", "disableElementScroll", "(", "element", ")", "{", "element", "=", "angular", ".", "element", "(", "element", "||", "body", ")", ";", "var", "scrollMask", ";", "if", "(", "options", ".", "disableScrollMask", ")", "{", "scrollMask", "=", "element",...
Creates a virtual scrolling mask to prevent touchmove, keyboard, scrollbar clicking, and wheel events
[ "Creates", "a", "virtual", "scrolling", "mask", "to", "prevent", "touchmove", "keyboard", "scrollbar", "clicking", "and", "wheel", "events" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/util/util.js#L252-L282
train
disable element scroll
[ 30522, 3853, 4487, 19150, 12260, 8163, 26775, 14511, 1006, 5783, 1007, 1063, 5783, 1027, 16108, 1012, 5783, 1006, 5783, 1064, 1064, 2303, 1007, 1025, 13075, 17186, 9335, 2243, 1025, 2065, 1006, 7047, 1012, 4487, 19150, 11020, 28402, 9335, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Freeboard/freeboard
js/freeboard.thirdparty.js
Coords
function Coords(obj) { if(obj[0] && $.isPlainObject(obj[0])) { this.data = obj[0]; } else { this.el = obj; } this.isCoords = true; this.coords = {}; this.init(); return this; }
javascript
function Coords(obj) { if(obj[0] && $.isPlainObject(obj[0])) { this.data = obj[0]; } else { this.el = obj; } this.isCoords = true; this.coords = {}; this.init(); return this; }
[ "function", "Coords", "(", "obj", ")", "{", "if", "(", "obj", "[", "0", "]", "&&", "$", ".", "isPlainObject", "(", "obj", "[", "0", "]", ")", ")", "{", "this", ".", "data", "=", "obj", "[", "0", "]", ";", "}", "else", "{", "this", ".", "el"...
Creates objects with coordinates (x1, y1, x2, y2, cx, cy, width, height) to simulate DOM elements on the screen. Coords is used by Gridster to create a faux grid with any DOM element can collide. @class Coords @param {HTMLElement|Object} obj The jQuery HTMLElement or a object with: left, top, width and height properti...
[ "Creates", "objects", "with", "coordinates", "(", "x1", "y1", "x2", "y2", "cx", "cy", "width", "height", ")", "to", "simulate", "DOM", "elements", "on", "the", "screen", ".", "Coords", "is", "used", "by", "Gridster", "to", "create", "a", "faux", "grid", ...
38789f6e8bd3d04f7d3b2c3427e509d00f2610fc
https://github.com/Freeboard/freeboard/blob/38789f6e8bd3d04f7d3b2c3427e509d00f2610fc/js/freeboard.thirdparty.js#L15139-L15154
train
The Coords constructor.
[ 30522, 3853, 2522, 8551, 2015, 1006, 27885, 3501, 1007, 1063, 2065, 1006, 27885, 3501, 1031, 1014, 1033, 1004, 1004, 1002, 1012, 2003, 24759, 8113, 16429, 20614, 1006, 27885, 3501, 1031, 1014, 1033, 1007, 1007, 1063, 2023, 1012, 2951, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jgraph/mxgraph
javascript/mxClient.js
mxValueChange
function mxValueChange(model, cell, value) { this.model = model; this.cell = cell; this.value = value; this.previous = value; }
javascript
function mxValueChange(model, cell, value) { this.model = model; this.cell = cell; this.value = value; this.previous = value; }
[ "function", "mxValueChange", "(", "model", ",", "cell", ",", "value", ")", "{", "this", ".", "model", "=", "model", ";", "this", ".", "cell", "=", "cell", ";", "this", ".", "value", "=", "value", ";", "this", ".", "previous", "=", "value", ";", "}"...
Class: mxValueChange Action to change a user object in a model. Constructor: mxValueChange Constructs a change of a user object in the specified model.
[ "Class", ":", "mxValueChange" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L41742-L41748
train
Change value of cell
[ 30522, 3853, 25630, 10175, 5657, 22305, 2063, 1006, 2944, 1010, 3526, 1010, 3643, 1007, 1063, 2023, 1012, 2944, 1027, 2944, 1025, 2023, 1012, 3526, 1027, 3526, 1025, 2023, 1012, 3643, 1027, 3643, 1025, 2023, 1012, 3025, 1027, 3643, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jantimon/html-webpack-plugin
lib/hooks.js
createHtmlWebpackPluginHooks
function createHtmlWebpackPluginHooks () { return { beforeAssetTagGeneration: new AsyncSeriesWaterfallHook(['pluginArgs']), alterAssetTags: new AsyncSeriesWaterfallHook(['pluginArgs']), alterAssetTagGroups: new AsyncSeriesWaterfallHook(['pluginArgs']), afterTemplateExecution: new AsyncSeriesWaterfallH...
javascript
function createHtmlWebpackPluginHooks () { return { beforeAssetTagGeneration: new AsyncSeriesWaterfallHook(['pluginArgs']), alterAssetTags: new AsyncSeriesWaterfallHook(['pluginArgs']), alterAssetTagGroups: new AsyncSeriesWaterfallHook(['pluginArgs']), afterTemplateExecution: new AsyncSeriesWaterfallH...
[ "function", "createHtmlWebpackPluginHooks", "(", ")", "{", "return", "{", "beforeAssetTagGeneration", ":", "new", "AsyncSeriesWaterfallHook", "(", "[", "'pluginArgs'", "]", ")", ",", "alterAssetTags", ":", "new", "AsyncSeriesWaterfallHook", "(", "[", "'pluginArgs'", "...
Add hooks to the webpack compilation object to allow foreign plugins to extend the HtmlWebpackPlugin @returns {HtmlWebpackPluginHooks}
[ "Add", "hooks", "to", "the", "webpack", "compilation", "object", "to", "allow", "foreign", "plugins", "to", "extend", "the", "HtmlWebpackPlugin" ]
38db64ae8805de37d038e0ee0f6dfa2a26e2163a
https://github.com/jantimon/html-webpack-plugin/blob/38db64ae8805de37d038e0ee0f6dfa2a26e2163a/lib/hooks.js#L93-L102
train
Creates a hook object for webpack - plugin - webpack
[ 30522, 3853, 3443, 11039, 19968, 8545, 2497, 23947, 24759, 15916, 29344, 6559, 2015, 1006, 1007, 1063, 2709, 1063, 2077, 27241, 5946, 13871, 30524, 1005, 13354, 3981, 10623, 2015, 1005, 1033, 1007, 1010, 11477, 27241, 5946, 13871, 22107, 2015...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/cache/CacheManager.js
function () { var pReset, oMsr = startMeasurements("reset"); Log.debug("Cache Manager: Reset called."); pReset = this._callInstanceMethod("reset", arguments).then(function callInstanceHandler() { Log.debug("Cache Manager: Reset completed successfully."); oMsr.endAsync(); //nothing to return,...
javascript
function () { var pReset, oMsr = startMeasurements("reset"); Log.debug("Cache Manager: Reset called."); pReset = this._callInstanceMethod("reset", arguments).then(function callInstanceHandler() { Log.debug("Cache Manager: Reset completed successfully."); oMsr.endAsync(); //nothing to return,...
[ "function", "(", ")", "{", "var", "pReset", ",", "oMsr", "=", "startMeasurements", "(", "\"reset\"", ")", ";", "Log", ".", "debug", "(", "\"Cache Manager: Reset called.\"", ")", ";", "pReset", "=", "this", ".", "_callInstanceMethod", "(", "\"reset\"", ",", "...
Clears all entries in the cache. @returns {Promise} a promise that would be resolved in case of successful operation or rejected with value of the error message if the operation fails. @public
[ "Clears", "all", "entries", "in", "the", "cache", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/cache/CacheManager.js#L222-L237
train
Reset the cache
[ 30522, 3853, 1006, 1007, 1063, 13075, 3653, 13462, 1010, 18168, 21338, 1027, 2707, 4168, 3022, 5397, 8163, 1006, 1000, 25141, 1000, 1007, 1025, 8833, 1012, 2139, 8569, 2290, 1006, 1000, 17053, 3208, 1024, 25141, 2170, 1012, 1000, 1007, 1025...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jgraph/mxgraph
javascript/examples/webpack/src/anchors.js
main
function main(container) { // Disables the built-in context menu mxEvent.disableContextMenu(container); // Creates the graph inside the given container var graph = new mxGraph(container); graph.setConnectable(true); // Enables connect preview for the default edge style graph.connectionHa...
javascript
function main(container) { // Disables the built-in context menu mxEvent.disableContextMenu(container); // Creates the graph inside the given container var graph = new mxGraph(container); graph.setConnectable(true); // Enables connect preview for the default edge style graph.connectionHa...
[ "function", "main", "(", "container", ")", "{", "// Disables the built-in context menu", "mxEvent", ".", "disableContextMenu", "(", "container", ")", ";", "// Creates the graph inside the given container", "var", "graph", "=", "new", "mxGraph", "(", "container", ")", ";...
Program starts here. Creates a sample graph in the DOM node with the specified ID. This function is invoked from the onLoad event handler of the document (see below).
[ "Program", "starts", "here", ".", "Creates", "a", "sample", "graph", "in", "the", "DOM", "node", "with", "the", "specified", "ID", ".", "This", "function", "is", "invoked", "from", "the", "onLoad", "event", "handler", "of", "the", "document", "(", "see", ...
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/examples/webpack/src/anchors.js#L56-L96
train
Main entry point for the cluster
[ 30522, 3853, 2364, 1006, 11661, 1007, 1063, 1013, 1013, 4487, 19150, 2015, 1996, 2328, 1011, 1999, 6123, 12183, 25630, 18697, 3372, 1012, 4487, 19150, 8663, 18209, 3549, 2226, 1006, 11661, 1007, 1025, 1013, 1013, 9005, 1996, 10629, 2503, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/tabs/js/tabsController.js
scroll
function scroll (event) { if (!ctrl.shouldPaginate) return; event.preventDefault(); if (event.deltaY) { ctrl.offsetLeft = fixOffset(ctrl.offsetLeft + event.deltaY); } else if (event.deltaX) { ctrl.offsetLeft = fixOffset(ctrl.offsetLeft + event.deltaX); } }
javascript
function scroll (event) { if (!ctrl.shouldPaginate) return; event.preventDefault(); if (event.deltaY) { ctrl.offsetLeft = fixOffset(ctrl.offsetLeft + event.deltaY); } else if (event.deltaX) { ctrl.offsetLeft = fixOffset(ctrl.offsetLeft + event.deltaX); } }
[ "function", "scroll", "(", "event", ")", "{", "if", "(", "!", "ctrl", ".", "shouldPaginate", ")", "return", ";", "event", ".", "preventDefault", "(", ")", ";", "if", "(", "event", ".", "deltaY", ")", "{", "ctrl", ".", "offsetLeft", "=", "fixOffset", ...
When pagination is on, this makes sure the selected index is in view. @param {WheelEvent} event
[ "When", "pagination", "is", "on", "this", "makes", "sure", "the", "selected", "index", "is", "in", "view", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/tabs/js/tabsController.js#L353-L361
train
scroll to the right of the page
[ 30522, 3853, 17186, 1006, 2724, 1007, 1063, 2065, 1006, 999, 14931, 12190, 1012, 2323, 4502, 20876, 2618, 1007, 2709, 1025, 2724, 1012, 4652, 3207, 7011, 11314, 1006, 1007, 1025, 2065, 1006, 2724, 1012, 7160, 2100, 1007, 1063, 14931, 12190,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jgraph/mxgraph
javascript/mxClient.js
function() { var string = ''; for (var i = 0; i < arguments.length; i++) { string += arguments[i]; if (i < arguments.length - 1) { string += ' '; } } if (mxLog.textarea != null) { mxLog.textarea.value = mxLog.textarea.value + string; // Workaround for no update in Presto 2....
javascript
function() { var string = ''; for (var i = 0; i < arguments.length; i++) { string += arguments[i]; if (i < arguments.length - 1) { string += ' '; } } if (mxLog.textarea != null) { mxLog.textarea.value = mxLog.textarea.value + string; // Workaround for no update in Presto 2....
[ "function", "(", ")", "{", "var", "string", "=", "''", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "arguments", ".", "length", ";", "i", "++", ")", "{", "string", "+=", "arguments", "[", "i", "]", ";", "if", "(", "i", "<", "argument...
Function: write Adds the specified strings to the console.
[ "Function", ":", "write" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L982-L1013
train
Adds the given string to the log buffer
[ 30522, 3853, 1006, 1007, 1063, 13075, 5164, 1027, 1005, 1005, 1025, 2005, 1006, 13075, 1045, 1027, 1014, 1025, 1045, 1026, 9918, 1012, 3091, 1025, 1045, 1009, 1009, 1007, 1063, 5164, 1009, 1027, 9918, 1031, 1045, 1033, 1025, 2065, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/RecentProjects/main.js
selectNextItem
function selectNextItem(direction) { var $links = $dropdown.find("a"), index = $dropdownItem ? $links.index($dropdownItem) : (direction > 0 ? -1 : 0), $newItem = $links.eq((index + direction) % $links.length); if ($dropdownItem) { $dropdownItem.removeClass("sele...
javascript
function selectNextItem(direction) { var $links = $dropdown.find("a"), index = $dropdownItem ? $links.index($dropdownItem) : (direction > 0 ? -1 : 0), $newItem = $links.eq((index + direction) % $links.length); if ($dropdownItem) { $dropdownItem.removeClass("sele...
[ "function", "selectNextItem", "(", "direction", ")", "{", "var", "$links", "=", "$dropdown", ".", "find", "(", "\"a\"", ")", ",", "index", "=", "$dropdownItem", "?", "$links", ".", "index", "(", "$dropdownItem", ")", ":", "(", "direction", ">", "0", "?",...
Selects the next or previous item in the list @param {number} direction +1 for next, -1 for prev
[ "Selects", "the", "next", "or", "previous", "item", "in", "the", "list" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/RecentProjects/main.js#L162-L174
train
select next item
[ 30522, 3853, 7276, 2638, 18413, 4221, 2213, 1006, 3257, 1007, 1063, 13075, 1002, 6971, 1027, 1002, 4530, 7698, 1012, 2424, 1006, 1000, 1037, 1000, 1007, 1010, 5950, 1027, 1002, 4530, 7698, 4221, 2213, 1029, 1002, 6971, 1012, 5950, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
GitbookIO/gitbook
lib/utils/promise.js
map
function map(arr, iter) { if (Immutable.Map.isMap(arr)) { var type = 'Map'; if (Immutable.OrderedMap.isOrderedMap(arr)) { type = 'OrderedMap'; } return mapAsList(arr, function(value, key) { return Q(iter(value, key)) .then(function(result) { ...
javascript
function map(arr, iter) { if (Immutable.Map.isMap(arr)) { var type = 'Map'; if (Immutable.OrderedMap.isOrderedMap(arr)) { type = 'OrderedMap'; } return mapAsList(arr, function(value, key) { return Q(iter(value, key)) .then(function(result) { ...
[ "function", "map", "(", "arr", ",", "iter", ")", "{", "if", "(", "Immutable", ".", "Map", ".", "isMap", "(", "arr", ")", ")", "{", "var", "type", "=", "'Map'", ";", "if", "(", "Immutable", ".", "OrderedMap", ".", "isOrderedMap", "(", "arr", ")", ...
Map an array or map @param {Array|List|Map|OrderedMap} arr @param {Function(element, key)} @return {Promise<List|Map|OrderedMap>}
[ "Map", "an", "array", "or", "map" ]
6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4
https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/utils/promise.js#L100-L122
train
mapAsList - Map - Iterator - Iterator - Function
[ 30522, 3853, 4949, 1006, 12098, 2099, 1010, 2009, 2121, 1007, 1063, 2065, 1006, 10047, 28120, 3085, 1012, 4949, 1012, 2003, 2863, 2361, 1006, 12098, 2099, 1007, 1007, 1063, 13075, 2828, 1027, 1005, 4949, 1005, 1025, 2065, 1006, 10047, 28120...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mui-org/material-ui
docs/src/modules/utils/find.js
findPagesMarkdown
function findPagesMarkdown( directory = path.resolve(__dirname, '../../../src/pages'), pagesMarkdown = [], ) { const items = fs.readdirSync(directory); items.forEach(item => { const itemPath = path.resolve(directory, item); if (fs.statSync(itemPath).isDirectory()) { findPagesMarkdown(itemPath, p...
javascript
function findPagesMarkdown( directory = path.resolve(__dirname, '../../../src/pages'), pagesMarkdown = [], ) { const items = fs.readdirSync(directory); items.forEach(item => { const itemPath = path.resolve(directory, item); if (fs.statSync(itemPath).isDirectory()) { findPagesMarkdown(itemPath, p...
[ "function", "findPagesMarkdown", "(", "directory", "=", "path", ".", "resolve", "(", "__dirname", ",", "'../../../src/pages'", ")", ",", "pagesMarkdown", "=", "[", "]", ",", ")", "{", "const", "items", "=", "fs", ".", "readdirSync", "(", "directory", ")", ...
Returns the markdowns of the documentation in a flat array. { pathname: String, filename: String, }
[ "Returns", "the", "markdowns", "of", "the", "documentation", "in", "a", "flat", "array", ".", "{", "pathname", ":", "String", "filename", ":", "String", "}" ]
1555e52367835946382fbf2a8f681de71318915d
https://github.com/mui-org/material-ui/blob/1555e52367835946382fbf2a8f681de71318915d/docs/src/modules/utils/find.js#L11-L49
train
Find the pages markdown file in the specified directory
[ 30522, 3853, 2424, 13704, 26212, 8024, 7698, 1006, 14176, 1027, 4130, 1012, 10663, 1006, 1035, 1035, 16101, 18442, 1010, 1005, 1012, 1012, 1013, 1012, 1012, 1013, 1012, 1012, 1013, 5034, 2278, 1013, 5530, 1005, 1007, 1010, 5530, 10665, 7698...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/autocomplete/demoCustomTemplate/script.js
createFilterFor
function createFilterFor(query) { var lowercaseQuery = query.toLowerCase(); return function filterFn(item) { return (item.value.indexOf(lowercaseQuery) === 0); }; }
javascript
function createFilterFor(query) { var lowercaseQuery = query.toLowerCase(); return function filterFn(item) { return (item.value.indexOf(lowercaseQuery) === 0); }; }
[ "function", "createFilterFor", "(", "query", ")", "{", "var", "lowercaseQuery", "=", "query", ".", "toLowerCase", "(", ")", ";", "return", "function", "filterFn", "(", "item", ")", "{", "return", "(", "item", ".", "value", ".", "indexOf", "(", "lowercaseQu...
Create filter function for a query string
[ "Create", "filter", "function", "for", "a", "query", "string" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/autocomplete/demoCustomTemplate/script.js#L97-L104
train
Create a filter function for a given query
[ 30522, 3853, 3443, 8873, 21928, 29278, 1006, 23032, 1007, 1063, 13075, 2896, 18382, 4226, 2854, 1027, 23032, 1012, 2000, 27663, 18992, 3366, 1006, 1007, 1025, 2709, 3853, 11307, 2546, 2078, 1006, 8875, 1007, 1063, 2709, 1006, 8875, 1012, 36...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.fl/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js
function (oModelData, oPage, oMetadata) { oModelData.metadata = oMetadata; this.oSelectedContentModel.setData(oModelData); var oCore = sap.ui.getCore(); var sIconTabBarId = this.getView().createId("contentDetailsIconTabBar"); var oIconTabBar = oCore.getElementById(sIconTabBarId); if (oIconTabBar){ ...
javascript
function (oModelData, oPage, oMetadata) { oModelData.metadata = oMetadata; this.oSelectedContentModel.setData(oModelData); var oCore = sap.ui.getCore(); var sIconTabBarId = this.getView().createId("contentDetailsIconTabBar"); var oIconTabBar = oCore.getElementById(sIconTabBarId); if (oIconTabBar){ ...
[ "function", "(", "oModelData", ",", "oPage", ",", "oMetadata", ")", "{", "oModelData", ".", "metadata", "=", "oMetadata", ";", "this", ".", "oSelectedContentModel", ".", "setData", "(", "oModelData", ")", ";", "var", "oCore", "=", "sap", ".", "ui", ".", ...
Handler if content metadata was received; Sets the received data to the current content model, updates the icon tab bar, and releases the busy mode of the current page. @param {Object} oModelData - model data of current page @param {Object} oPage - current page used to set display busy mode on/off @param {Object} oMeta...
[ "Handler", "if", "content", "metadata", "was", "received", ";", "Sets", "the", "received", "data", "to", "the", "current", "content", "model", "updates", "the", "icon", "tab", "bar", "and", "releases", "the", "busy", "mode", "of", "the", "current", "page", ...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js#L124-L137
train
Sets the selected content model and sets the busy flag
[ 30522, 3853, 1006, 18168, 10244, 15150, 2696, 1010, 6728, 4270, 1010, 18168, 12928, 2850, 2696, 1007, 1063, 18168, 10244, 15150, 2696, 1012, 27425, 1027, 18168, 12928, 2850, 2696, 1025, 2023, 1012, 9808, 12260, 10985, 8663, 6528, 21246, 10244...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
goldfire/howler.js
examples/3d/js/map.js
function(x, y) { x = Math.floor(x); y = Math.floor(y); if (x < 0 || x > this.size - 1 || y < 0 || y > this.size - 1) { return -1; } return this.grid[y * this.size + x]; }
javascript
function(x, y) { x = Math.floor(x); y = Math.floor(y); if (x < 0 || x > this.size - 1 || y < 0 || y > this.size - 1) { return -1; } return this.grid[y * this.size + x]; }
[ "function", "(", "x", ",", "y", ")", "{", "x", "=", "Math", ".", "floor", "(", "x", ")", ";", "y", "=", "Math", ".", "floor", "(", "y", ")", ";", "if", "(", "x", "<", "0", "||", "x", ">", "this", ".", "size", "-", "1", "||", "y", "<", ...
Check if a gird location is out of bounds, a wall or empty. @param {Number} x x-coordinate @param {Number} y y-coordinate @return {Number} -1, 0, 1
[ "Check", "if", "a", "gird", "location", "is", "out", "of", "bounds", "a", "wall", "or", "empty", "." ]
030db918dd8ce640afd57e172418472497e8f113
https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/examples/3d/js/map.js#L49-L58
train
Returns the index of the element at the specified location
[ 30522, 3853, 1006, 1060, 1010, 1061, 1007, 1063, 1060, 1027, 8785, 1012, 2723, 1006, 1060, 1007, 1025, 1061, 1027, 8785, 1012, 2723, 1006, 1061, 1007, 1025, 2065, 1006, 1060, 1026, 1014, 1064, 1064, 1060, 1028, 2023, 1012, 2946, 1011, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/ComponentContainer.js
createComponentConfig
function createComponentConfig(oComponentContainer) { var sName = oComponentContainer.getName(); var vManifest = oComponentContainer.getManifest(); var sUrl = oComponentContainer.getUrl(); var mSettings = oComponentContainer.getSettings(); var mConfig = { name: sName ? sName : undefined, manifest: vMani...
javascript
function createComponentConfig(oComponentContainer) { var sName = oComponentContainer.getName(); var vManifest = oComponentContainer.getManifest(); var sUrl = oComponentContainer.getUrl(); var mSettings = oComponentContainer.getSettings(); var mConfig = { name: sName ? sName : undefined, manifest: vMani...
[ "function", "createComponentConfig", "(", "oComponentContainer", ")", "{", "var", "sName", "=", "oComponentContainer", ".", "getName", "(", ")", ";", "var", "vManifest", "=", "oComponentContainer", ".", "getManifest", "(", ")", ";", "var", "sUrl", "=", "oCompone...
/* Helper to create the settings object for the Component Factory or the createComponent function.
[ "/", "*", "Helper", "to", "create", "the", "settings", "object", "for", "the", "Component", "Factory", "or", "the", "createComponent", "function", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/ComponentContainer.js#L264-L278
train
Creates a configuration object for a component container.
[ 30522, 3853, 3443, 9006, 29513, 3372, 8663, 8873, 2290, 1006, 1051, 9006, 29513, 3372, 8663, 18249, 2121, 1007, 1063, 13075, 1055, 18442, 1027, 1051, 9006, 29513, 3372, 8663, 18249, 2121, 1012, 2131, 18442, 1006, 1007, 1025, 13075, 1058, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jgraph/mxgraph
javascript/mxClient.js
function(x1, y1, x2, y2, px, py) { x2 -= x1; y2 -= y1; px -= x1; py -= y1; var ccw = px * y2 - py * x2; if (ccw == 0.0) { ccw = px * x2 + py * y2; if (ccw > 0.0) { px -= x2; py -= y2; ccw = px * x2 + py * y2; if (ccw < 0.0) { ccw = 0.0; ...
javascript
function(x1, y1, x2, y2, px, py) { x2 -= x1; y2 -= y1; px -= x1; py -= y1; var ccw = px * y2 - py * x2; if (ccw == 0.0) { ccw = px * x2 + py * y2; if (ccw > 0.0) { px -= x2; py -= y2; ccw = px * x2 + py * y2; if (ccw < 0.0) { ccw = 0.0; ...
[ "function", "(", "x1", ",", "y1", ",", "x2", ",", "y2", ",", "px", ",", "py", ")", "{", "x2", "-=", "x1", ";", "y2", "-=", "y1", ";", "px", "-=", "x1", ";", "py", "-=", "y1", ";", "var", "ccw", "=", "px", "*", "y2", "-", "py", "*", "x2"...
Function: relativeCcw Returns 1 if the given point on the right side of the segment, 0 if its on the segment, and -1 if the point is on the left side of the segment. Parameters: x1 - X-coordinate of the startpoint of the segment. y1 - Y-coordinate of the startpoint of the segment. x2 - X-coordinate of the endpoint o...
[ "Function", ":", "relativeCcw" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L5131-L5157
train
Compute the cCW of a curve
[ 30522, 3853, 1006, 1060, 2487, 1010, 1061, 2487, 1010, 1060, 2475, 1010, 1061, 2475, 1010, 1052, 2595, 1010, 1052, 2100, 1007, 1063, 1060, 2475, 1011, 1027, 1060, 2487, 1025, 1061, 2475, 1011, 1027, 1061, 2487, 1025, 1052, 2595, 1011, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js
checkAndClearTapHandlers
function checkAndClearTapHandlers( mouseUpEvent ) { // if the mouseup event occurs out of the origin target of the mousedown event, // unbind all of the listeners if (mouseUpEvent.target !== mouseDownTarget && !$.contains(mouseDownTarget, mouseUpEvent.target) && !buttonTappedInEdgeBrowser( mouseUpEvent )...
javascript
function checkAndClearTapHandlers( mouseUpEvent ) { // if the mouseup event occurs out of the origin target of the mousedown event, // unbind all of the listeners if (mouseUpEvent.target !== mouseDownTarget && !$.contains(mouseDownTarget, mouseUpEvent.target) && !buttonTappedInEdgeBrowser( mouseUpEvent )...
[ "function", "checkAndClearTapHandlers", "(", "mouseUpEvent", ")", "{", "// if the mouseup event occurs out of the origin target of the mousedown event,", "// unbind all of the listeners", "if", "(", "mouseUpEvent", ".", "target", "!==", "mouseDownTarget", "&&", "!", "$", ".", "...
SAP MODIFICATION: terminate the firing of 'tap' event if 'mouseup' event occurs out of the 'mousedown' target
[ "SAP", "MODIFICATION", ":", "terminate", "the", "firing", "of", "tap", "event", "if", "mouseup", "event", "occurs", "out", "of", "the", "mousedown", "target" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js#L1986-L1992
train
check and clear tap handlers
[ 30522, 3853, 4638, 5685, 14321, 8445, 9331, 11774, 12910, 1006, 8000, 6279, 18697, 3372, 1007, 1063, 1013, 1013, 2065, 1996, 8000, 6279, 2724, 5158, 2041, 1997, 1996, 4761, 4539, 1997, 1996, 8000, 7698, 2724, 1010, 1013, 1013, 4895, 8428, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Freeboard/freeboard
js/freeboard.thirdparty.js
function(inst, date) { var minDate = this._getMinMaxDate(inst, "min"), maxDate = this._getMinMaxDate(inst, "max"), newDate = (minDate && date < minDate ? minDate : date); return (maxDate && newDate > maxDate ? maxDate : newDate); }
javascript
function(inst, date) { var minDate = this._getMinMaxDate(inst, "min"), maxDate = this._getMinMaxDate(inst, "max"), newDate = (minDate && date < minDate ? minDate : date); return (maxDate && newDate > maxDate ? maxDate : newDate); }
[ "function", "(", "inst", ",", "date", ")", "{", "var", "minDate", "=", "this", ".", "_getMinMaxDate", "(", "inst", ",", "\"min\"", ")", ",", "maxDate", "=", "this", ".", "_getMinMaxDate", "(", "inst", ",", "\"max\"", ")", ",", "newDate", "=", "(", "m...
/* Ensure a date is within any min/max bounds.
[ "/", "*", "Ensure", "a", "date", "is", "within", "any", "min", "/", "max", "bounds", "." ]
38789f6e8bd3d04f7d3b2c3427e509d00f2610fc
https://github.com/Freeboard/freeboard/blob/38789f6e8bd3d04f7d3b2c3427e509d00f2610fc/js/freeboard.thirdparty.js#L9468-L9473
train
Returns the new date
[ 30522, 3853, 1006, 16021, 2102, 1010, 3058, 1007, 1063, 13075, 2568, 3686, 1027, 2023, 1012, 1035, 2131, 10020, 17848, 13701, 1006, 16021, 2102, 1010, 1000, 8117, 1000, 1007, 1010, 4098, 13701, 1027, 2023, 1012, 1035, 2131, 10020, 17848, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/InlineTimingFunctionEditor/BezierCurveEditor.js
updateTimeProgression
function updateTimeProgression(curve, x, y) { var percentX = Math.round(100 * x / WIDTH_MAIN), percentY = Math.round(100 * ((HEIGHT_MAIN - y) / HEIGHT_MAIN)); // Constrain horizontal percentage to [0, 100] range percentX = Math.min(Math.max(0, percentX), 100); curve.parentN...
javascript
function updateTimeProgression(curve, x, y) { var percentX = Math.round(100 * x / WIDTH_MAIN), percentY = Math.round(100 * ((HEIGHT_MAIN - y) / HEIGHT_MAIN)); // Constrain horizontal percentage to [0, 100] range percentX = Math.min(Math.max(0, percentX), 100); curve.parentN...
[ "function", "updateTimeProgression", "(", "curve", ",", "x", ",", "y", ")", "{", "var", "percentX", "=", "Math", ".", "round", "(", "100", "*", "x", "/", "WIDTH_MAIN", ")", ",", "percentY", "=", "Math", ".", "round", "(", "100", "*", "(", "(", "HEI...
Update Time (x-axis) and Progression (y-axis) data for mouse position @param {Element} canvas <canvas> element @param {number} x Horizontal position @param {number} y Vertical position
[ "Update", "Time", "(", "x", "-", "axis", ")", "and", "Progression", "(", "y", "-", "axis", ")", "data", "for", "mouse", "position" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/InlineTimingFunctionEditor/BezierCurveEditor.js#L343-L352
train
Update the time and progression of the log curve
[ 30522, 3853, 10651, 7292, 21572, 17603, 28231, 1006, 7774, 1010, 1060, 1010, 1061, 1007, 1063, 13075, 3867, 2595, 1027, 8785, 1012, 2461, 1006, 2531, 1008, 1060, 1013, 9381, 1035, 2364, 1007, 1010, 3867, 2100, 1027, 8785, 1012, 2461, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.table/src/sap/ui/table/TableRendererUtils.js
function(rm, sClassName, bShouldAdd) { if (sClassName && (!!bShouldAdd || arguments.length == 2)) { rm.addClass(sClassName); if (TAGCONTEXT) { TAGCONTEXT.writeClasses = true; } } return TableRendererUtils; }
javascript
function(rm, sClassName, bShouldAdd) { if (sClassName && (!!bShouldAdd || arguments.length == 2)) { rm.addClass(sClassName); if (TAGCONTEXT) { TAGCONTEXT.writeClasses = true; } } return TableRendererUtils; }
[ "function", "(", "rm", ",", "sClassName", ",", "bShouldAdd", ")", "{", "if", "(", "sClassName", "&&", "(", "!", "!", "bShouldAdd", "||", "arguments", ".", "length", "==", "2", ")", ")", "{", "rm", ".", "addClass", "(", "sClassName", ")", ";", "if", ...
Adds the given CSS class if no condition is given or the condition is truthy. @param {sap.ui.core.RenderManager} rm Instance of the rendermanager @param {string} sClassName The CSS class which should be written @param {boolean} [bShouldAdd] optional condition @returns TableRendererUtils to allow method chaining @priv...
[ "Adds", "the", "given", "CSS", "class", "if", "no", "condition", "is", "given", "or", "the", "condition", "is", "truthy", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableRendererUtils.js#L33-L41
train
Adds a class to the specified markup manager.
[ 30522, 3853, 1006, 28549, 1010, 8040, 27102, 18442, 1010, 18667, 6806, 21285, 4215, 2094, 1007, 1063, 2065, 1006, 8040, 27102, 18442, 1004, 1004, 1006, 999, 999, 18667, 6806, 21285, 4215, 2094, 1064, 1064, 9918, 1012, 3091, 1027, 1027, 1016...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mochajs/mocha
lib/reporters/json-stream.js
clean
function clean(test) { return { title: test.title, fullTitle: test.fullTitle(), duration: test.duration, currentRetry: test.currentRetry() }; }
javascript
function clean(test) { return { title: test.title, fullTitle: test.fullTitle(), duration: test.duration, currentRetry: test.currentRetry() }; }
[ "function", "clean", "(", "test", ")", "{", "return", "{", "title", ":", "test", ".", "title", ",", "fullTitle", ":", "test", ".", "fullTitle", "(", ")", ",", "duration", ":", "test", ".", "duration", ",", "currentRetry", ":", "test", ".", "currentRetr...
Returns an object literal representation of `test` free of cyclic properties, etc. @private @param {Test} test - Instance used as data source. @return {Object} object containing pared-down test instance data
[ "Returns", "an", "object", "literal", "representation", "of", "test", "free", "of", "cyclic", "properties", "etc", "." ]
9b00fedb610241e33f7592c40164e42a38a793cf
https://github.com/mochajs/mocha/blob/9b00fedb610241e33f7592c40164e42a38a793cf/lib/reporters/json-stream.js#L81-L88
train
clean test object
[ 30522, 3853, 4550, 1006, 3231, 1007, 1063, 2709, 1063, 2516, 1024, 3231, 1012, 2516, 1010, 2440, 3775, 9286, 1024, 3231, 1012, 2440, 3775, 9286, 1006, 1007, 1010, 9367, 1024, 3231, 1012, 9367, 1010, 2783, 13465, 2854, 1024, 3231, 1012, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/CodeFolding/main.js
setupGutterEventListeners
function setupGutterEventListeners(editor) { var cm = editor._codeMirror; $(editor.getRootElement()).addClass("folding-enabled"); cm.setOption("foldGutter", {onGutterClick: onGutterClick}); $(cm.getGutterElement()).on({ mouseenter: function () { if (prefs.get...
javascript
function setupGutterEventListeners(editor) { var cm = editor._codeMirror; $(editor.getRootElement()).addClass("folding-enabled"); cm.setOption("foldGutter", {onGutterClick: onGutterClick}); $(cm.getGutterElement()).on({ mouseenter: function () { if (prefs.get...
[ "function", "setupGutterEventListeners", "(", "editor", ")", "{", "var", "cm", "=", "editor", ".", "_codeMirror", ";", "$", "(", "editor", ".", "getRootElement", "(", ")", ")", ".", "addClass", "(", "\"folding-enabled\"", ")", ";", "cm", ".", "setOption", ...
Renders and sets up event listeners the code-folding gutter. @param {Editor} editor the editor on which to initialise the fold gutter
[ "Renders", "and", "sets", "up", "event", "listeners", "the", "code", "-", "folding", "gutter", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/CodeFolding/main.js#L288-L309
train
Setup event listeners for fold gutter
[ 30522, 3853, 16437, 27920, 3334, 18697, 3372, 9863, 24454, 2015, 1006, 3559, 1007, 1063, 13075, 4642, 1027, 3559, 1012, 1035, 3642, 14503, 29165, 1025, 1002, 1006, 3559, 1012, 2131, 3217, 12184, 16930, 4765, 1006, 1007, 1007, 1012, 5587, 26...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
babel/babel
packages/babel-standalone/src/index.js
loadBuiltin
function loadBuiltin(builtinTable, name) { if (isArray(name) && typeof name[0] === "string") { if (builtinTable.hasOwnProperty(name[0])) { return [builtinTable[name[0]]].concat(name.slice(1)); } return; } else if (typeof name === "string") { return builtinTable[name]; } // Could be an actu...
javascript
function loadBuiltin(builtinTable, name) { if (isArray(name) && typeof name[0] === "string") { if (builtinTable.hasOwnProperty(name[0])) { return [builtinTable[name[0]]].concat(name.slice(1)); } return; } else if (typeof name === "string") { return builtinTable[name]; } // Could be an actu...
[ "function", "loadBuiltin", "(", "builtinTable", ",", "name", ")", "{", "if", "(", "isArray", "(", "name", ")", "&&", "typeof", "name", "[", "0", "]", "===", "\"string\"", ")", "{", "if", "(", "builtinTable", ".", "hasOwnProperty", "(", "name", "[", "0"...
Loads the given name (or [name, options] pair) from the given table object holding the available presets or plugins. Returns undefined if the preset or plugin is not available; passes through name unmodified if it (or the first element of the pair) is not a string.
[ "Loads", "the", "given", "name", "(", "or", "[", "name", "options", "]", "pair", ")", "from", "the", "given", "table", "object", "holding", "the", "available", "presets", "or", "plugins", "." ]
1969e6b6aa7d90be3fbb3aca98ea96849656a55a
https://github.com/babel/babel/blob/1969e6b6aa7d90be3fbb3aca98ea96849656a55a/packages/babel-standalone/src/index.js#L41-L52
train
Load a builtin module
[ 30522, 3853, 7170, 8569, 4014, 7629, 1006, 2328, 18447, 3085, 1010, 2171, 1007, 1063, 2065, 1006, 18061, 11335, 2100, 1006, 2171, 1007, 1004, 1004, 2828, 11253, 2171, 1031, 1014, 1033, 1027, 1027, 1027, 1000, 5164, 1000, 1007, 1063, 2065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jgraph/mxgraph
javascript/mxClient.js
function(pageCount, graph, pageFormat, border) { if (pageCount < 1) { // We can't work with less than 1 page, return no scale // change return 1; } pageFormat = (pageFormat != null) ? pageFormat : mxConstants.PAGE_FORMAT_A4_PORTRAIT; border = (border != null) ? border : 0; var availablePageW...
javascript
function(pageCount, graph, pageFormat, border) { if (pageCount < 1) { // We can't work with less than 1 page, return no scale // change return 1; } pageFormat = (pageFormat != null) ? pageFormat : mxConstants.PAGE_FORMAT_A4_PORTRAIT; border = (border != null) ? border : 0; var availablePageW...
[ "function", "(", "pageCount", ",", "graph", ",", "pageFormat", ",", "border", ")", "{", "if", "(", "pageCount", "<", "1", ")", "{", "// We can't work with less than 1 page, return no scale", "// change", "return", "1", ";", "}", "pageFormat", "=", "(", "pageForm...
Function: getScaleForPageCount Returns the scale to be used for printing the graph with the given bounds across the specifies number of pages with the given format. The scale is always computed such that it given the given amount or fewer pages in the print output. See <mxPrintPreview> for an example. Parameters: pa...
[ "Function", ":", "getScaleForPageCount" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L5884-L6007
train
Calculates the number of pages required for a graph
[ 30522, 3853, 1006, 3931, 3597, 16671, 1010, 10629, 1010, 3931, 14192, 4017, 1010, 3675, 1007, 1063, 2065, 1006, 3931, 3597, 16671, 1026, 1015, 1007, 1063, 1013, 1013, 2057, 2064, 1005, 1056, 2147, 2007, 2625, 2084, 1015, 3931, 1010, 2709, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/RuleEngineOpaExtension.js
function(options) { var ruleDeferred = jQueryDOM.Deferred(), options = options[0] || {}, failOnAnyRuleIssues = options["failOnAnyIssues"], failOnHighRuleIssues = options["failOnHighIssues"], rules = options.rules, preset = options.preset, metadata = options.metadata, execu...
javascript
function(options) { var ruleDeferred = jQueryDOM.Deferred(), options = options[0] || {}, failOnAnyRuleIssues = options["failOnAnyIssues"], failOnHighRuleIssues = options["failOnHighIssues"], rules = options.rules, preset = options.preset, metadata = options.metadata, execu...
[ "function", "(", "options", ")", "{", "var", "ruleDeferred", "=", "jQueryDOM", ".", "Deferred", "(", ")", ",", "options", "=", "options", "[", "0", "]", "||", "{", "}", ",", "failOnAnyRuleIssues", "=", "options", "[", "\"failOnAnyIssues\"", "]", ",", "fa...
Run the Support Assistant and analyze against a specific state of the application. Depending on the options passed the assertion might either fail or not if any issues were found. If "sap-skip-rules-issues=true" is set as an URI parameter, assertion result will be always positive. @function @name sap.ui.core.support....
[ "Run", "the", "Support", "Assistant", "and", "analyze", "against", "a", "specific", "state", "of", "the", "application", ".", "Depending", "on", "the", "options", "passed", "the", "assertion", "might", "either", "fail", "or", "not", "if", "any", "issues", "w...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/RuleEngineOpaExtension.js#L109-L156
train
Returns a promise that resolves to a rule
[ 30522, 3853, 1006, 7047, 1007, 1063, 13075, 5451, 27235, 20529, 1027, 1046, 4226, 2854, 9527, 1012, 13366, 28849, 2094, 1006, 1007, 1010, 7047, 1027, 7047, 1031, 1014, 1033, 1064, 1064, 1063, 1065, 1010, 8246, 7856, 4890, 6820, 23057, 4757,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/Manifest.js
function() { // skip loading includes once already loaded if (this._bIncludesLoaded) { return; } var mResources = this.getEntry("/sap.ui5/resources"); if (!mResources) { return; } var sComponentName = this.getComponentName(); // load JS files var aJSResources = mResources["js"]; ...
javascript
function() { // skip loading includes once already loaded if (this._bIncludesLoaded) { return; } var mResources = this.getEntry("/sap.ui5/resources"); if (!mResources) { return; } var sComponentName = this.getComponentName(); // load JS files var aJSResources = mResources["js"]; ...
[ "function", "(", ")", "{", "// skip loading includes once already loaded", "if", "(", "this", ".", "_bIncludesLoaded", ")", "{", "return", ";", "}", "var", "mResources", "=", "this", ".", "getEntry", "(", "\"/sap.ui5/resources\"", ")", ";", "if", "(", "!", "mR...
Loads the included CSS and JavaScript resources. The resources will be resolved relative to the component location. @private
[ "Loads", "the", "included", "CSS", "and", "JavaScript", "resources", ".", "The", "resources", "will", "be", "resolved", "relative", "to", "the", "component", "location", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/Manifest.js#L397-L450
train
Loads all includes from the component s resources
[ 30522, 3853, 1006, 1007, 1063, 1013, 1013, 13558, 10578, 2950, 2320, 2525, 8209, 2065, 1006, 2023, 1012, 1035, 8026, 20464, 22087, 17468, 1007, 1063, 2709, 1025, 1065, 13075, 2720, 2229, 8162, 9623, 1027, 2023, 1012, 2131, 4765, 2854, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/preferences/PreferencesBase.js
function (id, type, initial, options) { options = options || {}; if (this._knownPrefs.hasOwnProperty(id)) { throw new Error("Preference " + id + " was redefined"); } var pref = this._knownPrefs[id] = new Preference({ type: type, ...
javascript
function (id, type, initial, options) { options = options || {}; if (this._knownPrefs.hasOwnProperty(id)) { throw new Error("Preference " + id + " was redefined"); } var pref = this._knownPrefs[id] = new Preference({ type: type, ...
[ "function", "(", "id", ",", "type", ",", "initial", ",", "options", ")", "{", "options", "=", "options", "||", "{", "}", ";", "if", "(", "this", ".", "_knownPrefs", ".", "hasOwnProperty", "(", "id", ")", ")", "{", "throw", "new", "Error", "(", "\"P...
Defines a new preference. @param {string} id identifier of the preference. Generally a dotted name. @param {string} type Data type for the preference (generally, string, boolean, number) @param {Object} initial Default value for the preference @param {?{name: string=, description: string=, validator: function=, exclud...
[ "Defines", "a", "new", "preference", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/preferences/PreferencesBase.js#L1311-L1333
train
Create a new preference
[ 30522, 3853, 1006, 8909, 1010, 2828, 1010, 3988, 1010, 7047, 1007, 1063, 7047, 1027, 7047, 1064, 1064, 1063, 1065, 1025, 30524, 10343, 1012, 2038, 12384, 21572, 4842, 3723, 1006, 8909, 1007, 1007, 1063, 5466, 2047, 7561, 1006, 1000, 12157, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/filesystem/impls/appshell/AppshellFileSystem.js
initWatchers
function initWatchers(changeCallback, offlineCallback) { _changeCallback = changeCallback; _offlineCallback = offlineCallback; if (_isRunningOnWindowsXP && _offlineCallback) { _offlineCallback(); } }
javascript
function initWatchers(changeCallback, offlineCallback) { _changeCallback = changeCallback; _offlineCallback = offlineCallback; if (_isRunningOnWindowsXP && _offlineCallback) { _offlineCallback(); } }
[ "function", "initWatchers", "(", "changeCallback", ",", "offlineCallback", ")", "{", "_changeCallback", "=", "changeCallback", ";", "_offlineCallback", "=", "offlineCallback", ";", "if", "(", "_isRunningOnWindowsXP", "&&", "_offlineCallback", ")", "{", "_offlineCallback...
Initialize file watching for this filesystem, using the supplied changeCallback to provide change notifications. The first parameter of changeCallback specifies the changed path (either a file or a directory); if this parameter is null, it indicates that the implementation cannot specify a particular changed path, and ...
[ "Initialize", "file", "watching", "for", "this", "filesystem", "using", "the", "supplied", "changeCallback", "to", "provide", "change", "notifications", ".", "The", "first", "parameter", "of", "changeCallback", "specifies", "the", "changed", "path", "(", "either", ...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/filesystem/impls/appshell/AppshellFileSystem.js#L506-L513
train
Initialize the watchers
[ 30522, 3853, 1999, 4183, 18866, 2545, 1006, 2689, 9289, 20850, 8684, 1010, 2125, 4179, 9289, 20850, 8684, 1007, 1063, 1035, 2689, 9289, 20850, 8684, 1027, 2689, 9289, 20850, 8684, 1025, 1035, 2125, 4179, 9289, 20850, 8684, 1027, 2125, 4179,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-echarts
src/coord/parallel/Parallel.js
function (parallelModel, ecModel, api) { var dimensions = parallelModel.dimensions; var parallelAxisIndex = parallelModel.parallelAxisIndex; each(dimensions, function (dim, idx) { var axisIndex = parallelAxisIndex[idx]; var axisModel = ecModel.getComponent('parallelAxi...
javascript
function (parallelModel, ecModel, api) { var dimensions = parallelModel.dimensions; var parallelAxisIndex = parallelModel.parallelAxisIndex; each(dimensions, function (dim, idx) { var axisIndex = parallelAxisIndex[idx]; var axisModel = ecModel.getComponent('parallelAxi...
[ "function", "(", "parallelModel", ",", "ecModel", ",", "api", ")", "{", "var", "dimensions", "=", "parallelModel", ".", "dimensions", ";", "var", "parallelAxisIndex", "=", "parallelModel", ".", "parallelAxisIndex", ";", "each", "(", "dimensions", ",", "function"...
Initialize cartesian coordinate systems @private
[ "Initialize", "cartesian", "coordinate", "systems" ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/coord/parallel/Parallel.js#L90-L118
train
Initialize the series model
[ 30522, 3853, 1006, 5903, 5302, 9247, 1010, 14925, 5302, 9247, 1010, 17928, 1007, 1063, 13075, 9646, 1027, 5903, 5302, 9247, 1012, 9646, 1025, 13075, 5903, 8528, 17417, 13629, 2595, 1027, 5903, 5302, 9247, 1012, 5903, 8528, 17417, 13629, 259...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SheetJS/js-xlsx
demos/altjs/nashorn.js
b2a
function b2a(b) { var out = new Array(b.length); for(var i = 0; i < out.length; i++) out[i] = (b[i] < 0 ? b[i] + 256 : b[i]); return out; }
javascript
function b2a(b) { var out = new Array(b.length); for(var i = 0; i < out.length; i++) out[i] = (b[i] < 0 ? b[i] + 256 : b[i]); return out; }
[ "function", "b2a", "(", "b", ")", "{", "var", "out", "=", "new", "Array", "(", "b", ".", "length", ")", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "out", ".", "length", ";", "i", "++", ")", "out", "[", "i", "]", "=", "(", "b", ...
/* helper to convert byte array to plain JS array
[ "/", "*", "helper", "to", "convert", "byte", "array", "to", "plain", "JS", "array" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/demos/altjs/nashorn.js#L9-L13
train
Convert a byte array to a byte array
[ 30522, 3853, 1038, 2475, 2050, 1006, 1038, 1007, 1063, 13075, 2041, 1027, 2047, 9140, 1006, 1038, 1012, 3091, 1007, 1025, 2005, 1006, 13075, 1045, 1027, 1014, 1025, 1045, 1026, 2041, 1012, 3091, 1025, 1045, 1009, 1009, 1007, 2041, 1031, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/project/FileSyncManager.js
syncOpenDocuments
function syncOpenDocuments(title) { title = title || Strings.EXT_MODIFIED_TITLE; // We can become "re-entrant" if the user leaves & then returns to Brackets before we're // done -- easy if a prompt dialog is left open. Since the user may have left Brackets to // revert some of the disk...
javascript
function syncOpenDocuments(title) { title = title || Strings.EXT_MODIFIED_TITLE; // We can become "re-entrant" if the user leaves & then returns to Brackets before we're // done -- easy if a prompt dialog is left open. Since the user may have left Brackets to // revert some of the disk...
[ "function", "syncOpenDocuments", "(", "title", ")", "{", "title", "=", "title", "||", "Strings", ".", "EXT_MODIFIED_TITLE", ";", "// We can become \"re-entrant\" if the user leaves & then returns to Brackets before we're", "// done -- easy if a prompt dialog is left open. Since the use...
Check to see whether any open files have been modified by an external app since the last time Brackets synced up with the copy on disk (either by loading or saving the file). For clean files, we silently upate the editor automatically. For files with unsaved changes, we prompt the user. @param {string} title Title to ...
[ "Check", "to", "see", "whether", "any", "open", "files", "have", "been", "modified", "by", "an", "external", "app", "since", "the", "last", "time", "Brackets", "synced", "up", "with", "the", "copy", "on", "disk", "(", "either", "by", "loading", "or", "sa...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/project/FileSyncManager.js#L404-L492
train
Syncs all open files for modifications
[ 30522, 3853, 26351, 26915, 3527, 24894, 11187, 1006, 2516, 1007, 1063, 2516, 1027, 2516, 1064, 1064, 7817, 1012, 4654, 2102, 1035, 6310, 1035, 2516, 1025, 1013, 1013, 2057, 2064, 2468, 1000, 2128, 1011, 4372, 6494, 3372, 1000, 2065, 1996, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Dogfalo/materialize
extras/noUiSlider/nouislider.js
getClosestHandle
function getClosestHandle ( proposal ) { var closest = 100; var handleNumber = false; scope_Handles.forEach(function(handle, index){ // Disabled handles are ignored if ( handle.hasAttribute('disabled') ) { return; ...
javascript
function getClosestHandle ( proposal ) { var closest = 100; var handleNumber = false; scope_Handles.forEach(function(handle, index){ // Disabled handles are ignored if ( handle.hasAttribute('disabled') ) { return; ...
[ "function", "getClosestHandle", "(", "proposal", ")", "{", "var", "closest", "=", "100", ";", "var", "handleNumber", "=", "false", ";", "scope_Handles", ".", "forEach", "(", "function", "(", "handle", ",", "index", ")", "{", "// Disabled handles are ignored", ...
Find handle closest to a certain percentage on the slider
[ "Find", "handle", "closest", "to", "a", "certain", "percentage", "on", "the", "slider" ]
1122efadad8f1433d404696f7613e3cc13fb83a4
https://github.com/Dogfalo/materialize/blob/1122efadad8f1433d404696f7613e3cc13fb83a4/extras/noUiSlider/nouislider.js#L1367-L1388
train
Get closest handle to proposal
[ 30522, 3853, 2131, 20464, 27465, 21604, 10362, 1006, 6378, 1007, 1063, 13075, 7541, 1027, 2531, 1025, 13075, 5047, 19172, 5677, 1027, 6270, 1025, 9531, 1035, 16024, 1012, 18921, 6776, 1006, 3853, 1006, 5047, 1010, 5950, 1007, 1063, 1013, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/base/syncXHRFix.js
wrapTimerHandler
function wrapTimerHandler(vHandler) { var fnWrappedHandler = function() { var aArgs, fnHandler; if (bPromisesQueued) { aArgs = [fnWrappedHandler, 0].concat(arguments); _timeout.apply(window, aArgs); } else { fnHandler = typeof vHandler !== "function" ? new Function(vHandler) : vHand...
javascript
function wrapTimerHandler(vHandler) { var fnWrappedHandler = function() { var aArgs, fnHandler; if (bPromisesQueued) { aArgs = [fnWrappedHandler, 0].concat(arguments); _timeout.apply(window, aArgs); } else { fnHandler = typeof vHandler !== "function" ? new Function(vHandler) : vHand...
[ "function", "wrapTimerHandler", "(", "vHandler", ")", "{", "var", "fnWrappedHandler", "=", "function", "(", ")", "{", "var", "aArgs", ",", "fnHandler", ";", "if", "(", "bPromisesQueued", ")", "{", "aArgs", "=", "[", "fnWrappedHandler", ",", "0", "]", ".", ...
If there are promise handlers waiting for execution at the time the timeout fires, start another timeout to postpone timer execution after promise execution.
[ "If", "there", "are", "promise", "handlers", "waiting", "for", "execution", "at", "the", "time", "the", "timeout", "fires", "start", "another", "timeout", "to", "postpone", "timer", "execution", "after", "promise", "execution", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/base/syncXHRFix.js#L94-L106
train
wrap timer handler
[ 30522, 3853, 10236, 7292, 25032, 5685, 3917, 1006, 1058, 11774, 3917, 1007, 1063, 13075, 1042, 2078, 13088, 29098, 2098, 11774, 3917, 1027, 3853, 1006, 1007, 1063, 13075, 9779, 10623, 2015, 1010, 1042, 25311, 5685, 3917, 1025, 2065, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
google/material-design-icons
gulpfile.babel.js
generateIjmap
function generateIjmap(ijmapPath) { return through2.obj((codepointsFile, encoding, callback) => { const ijmap = { icons: codepointsToIjmap(codepointsFile.contents.toString()) }; callback(null, new File({ path: ijmapPath, contents: new Buffer(JSON.stringify(ijmap), 'utf8') })); ...
javascript
function generateIjmap(ijmapPath) { return through2.obj((codepointsFile, encoding, callback) => { const ijmap = { icons: codepointsToIjmap(codepointsFile.contents.toString()) }; callback(null, new File({ path: ijmapPath, contents: new Buffer(JSON.stringify(ijmap), 'utf8') })); ...
[ "function", "generateIjmap", "(", "ijmapPath", ")", "{", "return", "through2", ".", "obj", "(", "(", "codepointsFile", ",", "encoding", ",", "callback", ")", "=>", "{", "const", "ijmap", "=", "{", "icons", ":", "codepointsToIjmap", "(", "codepointsFile", "."...
Returns a stream that transforms between our icon font's codepoint file and an Iconjar ijmap.
[ "Returns", "a", "stream", "that", "transforms", "between", "our", "icon", "font", "s", "codepoint", "file", "and", "an", "Iconjar", "ijmap", "." ]
224895a86501195e7a7ff3dde18e39f00b8e3d5a
https://github.com/google/material-design-icons/blob/224895a86501195e7a7ff3dde18e39f00b8e3d5a/gulpfile.babel.js#L94-L116
train
Generate an ijmap file
[ 30522, 3853, 9699, 28418, 2863, 2361, 1006, 1045, 24703, 29098, 8988, 1007, 1063, 2709, 2083, 2475, 1012, 27885, 3501, 1006, 1006, 3642, 26521, 8873, 30524, 26521, 3406, 28418, 2863, 2361, 1006, 3642, 26521, 8873, 2571, 1012, 8417, 1012, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js
_findODataProperty
function _findODataProperty(aBindingPaths, aODataProperties) { return aODataProperties.filter(function (oDataProperty) { return aBindingPaths.indexOf(oDataProperty.bindingPath) !== -1; }).pop(); }
javascript
function _findODataProperty(aBindingPaths, aODataProperties) { return aODataProperties.filter(function (oDataProperty) { return aBindingPaths.indexOf(oDataProperty.bindingPath) !== -1; }).pop(); }
[ "function", "_findODataProperty", "(", "aBindingPaths", ",", "aODataProperties", ")", "{", "return", "aODataProperties", ".", "filter", "(", "function", "(", "oDataProperty", ")", "{", "return", "aBindingPaths", ".", "indexOf", "(", "oDataProperty", ".", "bindingPat...
Looks for a ODataProperty for a set of bindings paths @param {Array.<String>} aBindingPaths - Array of collected binding paths @param {Array.<Object>} aODataProperties - Array of Fields @return {Object|undefined} - returns first found Object with Field (Property) description, undefined if not found @private
[ "Looks", "for", "a", "ODataProperty", "for", "a", "set", "of", "bindings", "paths" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js#L356-L360
train
Find the last OData property in the array of OData properties
[ 30522, 3853, 1035, 2424, 13390, 2696, 21572, 4842, 3723, 1006, 11113, 22254, 2075, 15069, 2015, 1010, 20118, 2850, 2696, 21572, 4842, 7368, 1007, 1063, 2709, 20118, 2850, 2696, 21572, 4842, 7368, 1012, 11307, 1006, 3853, 1006, 1051, 2850, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/file/FileUtils.js
getRelativeFilename
function getRelativeFilename(basePath, filename) { if (!filename || filename.substr(0, basePath.length) !== basePath) { return; } return filename.substr(basePath.length); }
javascript
function getRelativeFilename(basePath, filename) { if (!filename || filename.substr(0, basePath.length) !== basePath) { return; } return filename.substr(basePath.length); }
[ "function", "getRelativeFilename", "(", "basePath", ",", "filename", ")", "{", "if", "(", "!", "filename", "||", "filename", ".", "substr", "(", "0", ",", "basePath", ".", "length", ")", "!==", "basePath", ")", "{", "return", ";", "}", "return", "filenam...
Computes filename as relative to the basePath. For example: basePath: /foo/bar/, filename: /foo/bar/baz.txt returns: baz.txt The net effect is that the common prefix is stripped away. If basePath is not a prefix of filename, then undefined is returned. @param {string} basePath Path against which we're computing the r...
[ "Computes", "filename", "as", "relative", "to", "the", "basePath", ".", "For", "example", ":", "basePath", ":", "/", "foo", "/", "bar", "/", "filename", ":", "/", "foo", "/", "bar", "/", "baz", ".", "txt", "returns", ":", "baz", ".", "txt" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/file/FileUtils.js#L380-L386
train
Get the relative filename of a file
[ 30522, 3853, 2131, 16570, 8082, 8873, 20844, 4168, 1006, 2918, 15069, 1010, 5371, 18442, 1007, 1063, 2065, 1006, 999, 5371, 18442, 1064, 1064, 5371, 18442, 1012, 4942, 3367, 2099, 1006, 1014, 1010, 2918, 15069, 1012, 3091, 1007, 999, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/AutoUpdate/main.js
checkUpdateStatus
function checkUpdateStatus() { var filesToCache = ['.logs'], downloadCompleted = updateJsonHandler.get("downloadCompleted"), updateInitiatedInPrevSession = updateJsonHandler.get("updateInitiatedInPrevSession"); if (downloadCompleted && updateInitiatedInPrevSession) { ...
javascript
function checkUpdateStatus() { var filesToCache = ['.logs'], downloadCompleted = updateJsonHandler.get("downloadCompleted"), updateInitiatedInPrevSession = updateJsonHandler.get("updateInitiatedInPrevSession"); if (downloadCompleted && updateInitiatedInPrevSession) { ...
[ "function", "checkUpdateStatus", "(", ")", "{", "var", "filesToCache", "=", "[", "'.logs'", "]", ",", "downloadCompleted", "=", "updateJsonHandler", ".", "get", "(", "\"downloadCompleted\"", ")", ",", "updateInitiatedInPrevSession", "=", "updateJsonHandler", ".", "g...
Checks and handles the update success and failure scenarios
[ "Checks", "and", "handles", "the", "update", "success", "and", "failure", "scenarios" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/AutoUpdate/main.js#L219-L260
train
Check update status
[ 30522, 3853, 4638, 6279, 27122, 30524, 1005, 1012, 15664, 1005, 1033, 1010, 8816, 9006, 10814, 3064, 1027, 10651, 22578, 2239, 11774, 3917, 1012, 2131, 1006, 1000, 8816, 9006, 10814, 3064, 1000, 1007, 1010, 10651, 5498, 10711, 3064, 2378, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/project/WorkingSetView.js
createWorkingSetViewForPane
function createWorkingSetViewForPane($container, paneId) { var view = _views[paneId]; if (!view) { view = new WorkingSetView($container, paneId); _views[view.paneId] = view; } }
javascript
function createWorkingSetViewForPane($container, paneId) { var view = _views[paneId]; if (!view) { view = new WorkingSetView($container, paneId); _views[view.paneId] = view; } }
[ "function", "createWorkingSetViewForPane", "(", "$container", ",", "paneId", ")", "{", "var", "view", "=", "_views", "[", "paneId", "]", ";", "if", "(", "!", "view", ")", "{", "view", "=", "new", "WorkingSetView", "(", "$container", ",", "paneId", ")", "...
Creates a new WorkingSetView object for the specified pane @param {!jQuery} $container - the WorkingSetView's DOM parent node @param {!string} paneId - the id of the pane the view is being created for
[ "Creates", "a", "new", "WorkingSetView", "object", "for", "the", "specified", "pane" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/project/WorkingSetView.js#L1427-L1433
train
Creates a WorkingSetView for the given paneId
[ 30522, 3853, 3443, 21398, 13462, 8584, 29278, 9739, 2063, 1006, 1002, 11661, 1010, 6090, 7416, 2094, 1007, 1063, 13075, 3193, 1027, 1035, 5328, 1031, 6090, 7416, 2094, 1033, 1025, 2065, 1006, 999, 3193, 1007, 1063, 3193, 1027, 2047, 24884, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/InlineTimingFunctionEditor/main.js
init
function init() { // Load our stylesheet ExtensionUtils.loadStyleSheet(module, "main.less"); ExtensionUtils.addEmbeddedStyleSheet(Mustache.render(Localized, Strings)); EditorManager.registerInlineEditProvider(inlineTimingFunctionEditorProvider); }
javascript
function init() { // Load our stylesheet ExtensionUtils.loadStyleSheet(module, "main.less"); ExtensionUtils.addEmbeddedStyleSheet(Mustache.render(Localized, Strings)); EditorManager.registerInlineEditProvider(inlineTimingFunctionEditorProvider); }
[ "function", "init", "(", ")", "{", "// Load our stylesheet", "ExtensionUtils", ".", "loadStyleSheet", "(", "module", ",", "\"main.less\"", ")", ";", "ExtensionUtils", ".", "addEmbeddedStyleSheet", "(", "Mustache", ".", "render", "(", "Localized", ",", "Strings", "...
Initialization code
[ "Initialization", "code" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/InlineTimingFunctionEditor/main.js#L154-L160
train
Initialize the plugin
[ 30522, 3853, 1999, 4183, 1006, 1007, 1063, 1013, 1013, 7170, 2256, 6782, 21030, 2102, 5331, 21823, 4877, 1012, 15665, 27983, 4095, 15558, 1006, 11336, 1010, 1000, 2364, 1012, 2625, 1000, 1007, 1025, 5331, 21823, 4877, 1012, 5587, 6633, 8270...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
catapult-project/catapult
netlog_viewer/netlog_viewer/ui_webui_resources_js_util.js
parseQueryParams
function parseQueryParams(location) { var params = {}; var query = unescape(location.search.substring(1)); var vars = query.split('&'); for (var i = 0; i < vars.length; i++) { var pair = vars[i].split('='); params[pair[0]] = pair[1]; } return params; }
javascript
function parseQueryParams(location) { var params = {}; var query = unescape(location.search.substring(1)); var vars = query.split('&'); for (var i = 0; i < vars.length; i++) { var pair = vars[i].split('='); params[pair[0]] = pair[1]; } return params; }
[ "function", "parseQueryParams", "(", "location", ")", "{", "var", "params", "=", "{", "}", ";", "var", "query", "=", "unescape", "(", "location", ".", "search", ".", "substring", "(", "1", ")", ")", ";", "var", "vars", "=", "query", ".", "split", "("...
Parses query parameters from Location. @param {Location} location The URL to generate the CSS url for. @return {Object} Dictionary containing name value pairs for URL
[ "Parses", "query", "parameters", "from", "Location", "." ]
992929ffccac68827869a497f01ee4d653ed4f25
https://github.com/catapult-project/catapult/blob/992929ffccac68827869a497f01ee4d653ed4f25/netlog_viewer/netlog_viewer/ui_webui_resources_js_util.js#L72-L81
train
Parse the query string
[ 30522, 3853, 11968, 3366, 4226, 2854, 28689, 5244, 1006, 3295, 1007, 1063, 13075, 11498, 5244, 1027, 1063, 1065, 1025, 13075, 23032, 1027, 16655, 15782, 5051, 1006, 3295, 1012, 3945, 1012, 4942, 3367, 4892, 1006, 1015, 1007, 1007, 1025, 130...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
summernote/summernote
src/js/base/core/dom.js
replace
function replace(node, nodeName) { if (node.nodeName.toUpperCase() === nodeName.toUpperCase()) { return node; } const newNode = create(nodeName); if (node.style.cssText) { newNode.style.cssText = node.style.cssText; } appendChildNodes(newNode, lists.from(node.childNodes)); insertAfter(newNode, ...
javascript
function replace(node, nodeName) { if (node.nodeName.toUpperCase() === nodeName.toUpperCase()) { return node; } const newNode = create(nodeName); if (node.style.cssText) { newNode.style.cssText = node.style.cssText; } appendChildNodes(newNode, lists.from(node.childNodes)); insertAfter(newNode, ...
[ "function", "replace", "(", "node", ",", "nodeName", ")", "{", "if", "(", "node", ".", "nodeName", ".", "toUpperCase", "(", ")", "===", "nodeName", ".", "toUpperCase", "(", ")", ")", "{", "return", "node", ";", "}", "const", "newNode", "=", "create", ...
@method replace replace node with provided nodeName @param {Node} node @param {String} nodeName @return {Node} - new node
[ "@method", "replace" ]
8dcafb8107453006b905ef697a529c42e76beb3f
https://github.com/summernote/summernote/blob/8dcafb8107453006b905ef697a529c42e76beb3f/src/js/base/core/dom.js#L921-L937
train
Replace node with nodeName
[ 30522, 3853, 5672, 1006, 13045, 1010, 13045, 18442, 1007, 1063, 2065, 1006, 13045, 1012, 13045, 18442, 1012, 2000, 29547, 18992, 3366, 1006, 1007, 1027, 1027, 1027, 13045, 18442, 1012, 2000, 29547, 18992, 3366, 1006, 1007, 1007, 1063, 2709, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/object-shorthand.js
checkConsistency
function checkConsistency(node, checkRedundancy) { // We are excluding getters/setters and spread properties as they are considered neither longform nor shorthand. const properties = node.properties.filter(canHaveShorthand); // Do we still have properties left after filtering the g...
javascript
function checkConsistency(node, checkRedundancy) { // We are excluding getters/setters and spread properties as they are considered neither longform nor shorthand. const properties = node.properties.filter(canHaveShorthand); // Do we still have properties left after filtering the g...
[ "function", "checkConsistency", "(", "node", ",", "checkRedundancy", ")", "{", "// We are excluding getters/setters and spread properties as they are considered neither longform nor shorthand.", "const", "properties", "=", "node", ".", "properties", ".", "filter", "(", "canHaveSh...
Ensures that an object's properties are consistently shorthand, or not shorthand at all. @param {ASTNode} node Property AST node @param {boolean} checkRedundancy Whether to check longform redundancy @returns {void}
[ "Ensures", "that", "an", "object", "s", "properties", "are", "consistently", "shorthand", "or", "not", "shorthand", "at", "all", ".", "@param", "{", "ASTNode", "}", "node", "Property", "AST", "node", "@param", "{", "boolean", "}", "checkRedundancy", "Whether",...
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/object-shorthand.js#L197-L229
train
Check consistency of the node
[ 30522, 3853, 4638, 8663, 6190, 6528, 5666, 1006, 13045, 1010, 4638, 5596, 18426, 9407, 1007, 1063, 1013, 1013, 2057, 2024, 13343, 2131, 7747, 1013, 2275, 7747, 1998, 3659, 5144, 2004, 2027, 2024, 2641, 4445, 2146, 14192, 4496, 2460, 11774, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_undo
function addonsManager_undo(aSpec) { var spec = aSpec || { }; spec.link = "undo"; var link = this.getAddonLink(spec); this._controller.click(link); }
javascript
function addonsManager_undo(aSpec) { var spec = aSpec || { }; spec.link = "undo"; var link = this.getAddonLink(spec); this._controller.click(link); }
[ "function", "addonsManager_undo", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "spec", ".", "link", "=", "\"undo\"", ";", "var", "link", "=", "this", ".", "getAddonLink", "(", "spec", ")", ";", "this", ".", "_controller", ...
Undo the last action performed for the given add-on @param {object} aSpec Information on which add-on to operate on Elements: addon - Add-on element
[ "Undo", "the", "last", "action", "performed", "for", "the", "given", "add", "-", "on" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L416-L422
train
Undo an add - on
[ 30522, 3853, 5587, 5644, 24805, 4590, 1035, 25672, 1006, 2004, 5051, 2278, 1007, 1063, 13075, 28699, 1027, 2004, 5051, 2278, 1064, 1064, 1063, 1065, 1025, 28699, 1012, 4957, 1027, 1000, 25672, 1000, 1025, 13075, 4957, 1027, 2023, 1012, 2131...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/no-lone-blocks.js
markLoneBlock
function markLoneBlock() { if (loneBlocks.length === 0) { return; } const block = context.getAncestors().pop(); if (loneBlocks[loneBlocks.length - 1] === block) { loneBlocks.pop(); } }
javascript
function markLoneBlock() { if (loneBlocks.length === 0) { return; } const block = context.getAncestors().pop(); if (loneBlocks[loneBlocks.length - 1] === block) { loneBlocks.pop(); } }
[ "function", "markLoneBlock", "(", ")", "{", "if", "(", "loneBlocks", ".", "length", "===", "0", ")", "{", "return", ";", "}", "const", "block", "=", "context", ".", "getAncestors", "(", ")", ".", "pop", "(", ")", ";", "if", "(", "loneBlocks", "[", ...
Checks the enclosing block of the current node for block-level bindings, and "marks it" as valid if any. @returns {void}
[ "Checks", "the", "enclosing", "block", "of", "the", "current", "node", "for", "block", "-", "level", "bindings", "and", "marks", "it", "as", "valid", "if", "any", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-lone-blocks.js#L61-L71
train
Mark the last block in the list of lone blocks
[ 30522, 3853, 2928, 27165, 23467, 1006, 1007, 1063, 2065, 1006, 10459, 23467, 2015, 1012, 3091, 1027, 1027, 1027, 1014, 1007, 1063, 2709, 1025, 1065, 9530, 3367, 3796, 1027, 6123, 1012, 2131, 26755, 6591, 1006, 1007, 1012, 3769, 1006, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getsentry/sentry-javascript
packages/raven-js/src/raven.js
function(ex, options) { options = objectMerge({trimHeadFrames: 0}, options ? options : {}); if (isErrorEvent(ex) && ex.error) { // If it is an ErrorEvent with `error` property, extract it to get actual Error ex = ex.error; } else if (isDOMError(ex) || isDOMException(ex)) { // If it is a D...
javascript
function(ex, options) { options = objectMerge({trimHeadFrames: 0}, options ? options : {}); if (isErrorEvent(ex) && ex.error) { // If it is an ErrorEvent with `error` property, extract it to get actual Error ex = ex.error; } else if (isDOMError(ex) || isDOMException(ex)) { // If it is a D...
[ "function", "(", "ex", ",", "options", ")", "{", "options", "=", "objectMerge", "(", "{", "trimHeadFrames", ":", "0", "}", ",", "options", "?", "options", ":", "{", "}", ")", ";", "if", "(", "isErrorEvent", "(", "ex", ")", "&&", "ex", ".", "error",...
Manually capture an exception and send it over to Sentry @param {error} ex An exception to be logged @param {object} options A specific set of options for this error [optional] @return {Raven}
[ "Manually", "capture", "an", "exception", "and", "send", "it", "over", "to", "Sentry" ]
a872223343fecf7364473b78bede937f1eb57bd0
https://github.com/getsentry/sentry-javascript/blob/a872223343fecf7364473b78bede937f1eb57bd0/packages/raven-js/src/raven.js#L468-L534
train
Returns an Error object containing the name and message of the error and the stack trace of the error.
[ 30522, 3853, 1006, 4654, 1010, 7047, 1007, 1063, 7047, 1027, 4874, 5017, 3351, 1006, 1063, 12241, 4974, 15643, 2015, 1024, 1014, 1065, 1010, 7047, 1029, 7047, 1024, 1063, 1065, 1007, 1025, 2065, 1006, 2003, 2121, 29165, 18697, 3372, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ngrx/platform
projects/ngrx.io/tools/examples/run-example-e2e.js
reportStatus
function reportStatus(status, outputFile) { let log = ['']; log.push('Suites passed:'); status.passed.forEach(function (val) { log.push(' ' + val); }); if (status.failed.length == 0) { log.push('All tests passed'); } else { log.push('Suites failed:'); status.failed.forEach(function (val) {...
javascript
function reportStatus(status, outputFile) { let log = ['']; log.push('Suites passed:'); status.passed.forEach(function (val) { log.push(' ' + val); }); if (status.failed.length == 0) { log.push('All tests passed'); } else { log.push('Suites failed:'); status.failed.forEach(function (val) {...
[ "function", "reportStatus", "(", "status", ",", "outputFile", ")", "{", "let", "log", "=", "[", "''", "]", ";", "log", ".", "push", "(", "'Suites passed:'", ")", ";", "status", ".", "passed", ".", "forEach", "(", "function", "(", "val", ")", "{", "lo...
Report final status.
[ "Report", "final", "status", "." ]
eec9cc615440526ddedac04ae0082bfecef13d50
https://github.com/ngrx/platform/blob/eec9cc615440526ddedac04ae0082bfecef13d50/projects/ngrx.io/tools/examples/run-example-e2e.js#L224-L243
train
Report the status of a suite
[ 30522, 3853, 4311, 29336, 2271, 1006, 3570, 1010, 6434, 8873, 2571, 1007, 1063, 2292, 8833, 1027, 1031, 1005, 1005, 1033, 1025, 8833, 1012, 5245, 1006, 1005, 19796, 2979, 1024, 1005, 1007, 30524, 1063, 8833, 1012, 5245, 1006, 1005, 2035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
verdaccio/verdaccio
src/lib/logger.js
pad
function pad(str) { if (str.length < max) { return str + ' '.repeat(max - str.length); } return str; }
javascript
function pad(str) { if (str.length < max) { return str + ' '.repeat(max - str.length); } return str; }
[ "function", "pad", "(", "str", ")", "{", "if", "(", "str", ".", "length", "<", "max", ")", "{", "return", "str", "+", "' '", ".", "repeat", "(", "max", "-", "str", ".", "length", ")", ";", "}", "return", "str", ";", "}" ]
Apply whitespaces based on the length @param {*} str the log message @return {String}
[ "Apply", "whitespaces", "based", "on", "the", "length" ]
daa7e897b6d093bf8282ff12df3f450bcd73476c
https://github.com/verdaccio/verdaccio/blob/daa7e897b6d093bf8282ff12df3f450bcd73476c/src/lib/logger.js#L179-L184
train
Pads a string if it is too long
[ 30522, 3853, 11687, 1006, 2358, 2099, 1007, 1063, 2065, 1006, 2358, 2099, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/keyword-spacing.js
parseOptions
function parseOptions(options = {}) { const before = options.before !== false; const after = options.after !== false; const defaultValue = { before: before ? expectSpaceBefore : unexpectSpaceBefore, after: after ? expectSpaceAfter : unexpectSpaceAfter ...
javascript
function parseOptions(options = {}) { const before = options.before !== false; const after = options.after !== false; const defaultValue = { before: before ? expectSpaceBefore : unexpectSpaceBefore, after: after ? expectSpaceAfter : unexpectSpaceAfter ...
[ "function", "parseOptions", "(", "options", "=", "{", "}", ")", "{", "const", "before", "=", "options", ".", "before", "!==", "false", ";", "const", "after", "=", "options", ".", "after", "!==", "false", ";", "const", "defaultValue", "=", "{", "before", ...
Parses the option object and determines check methods for each keyword. @param {Object|undefined} options - The option object to parse. @returns {Object} - Normalized option object. Keys are keywords (there are for every keyword). Values are instances of `{"before": function, "after": function}`.
[ "Parses", "the", "option", "object", "and", "determines", "check", "methods", "for", "each", "keyword", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/keyword-spacing.js#L231-L259
train
parse options
[ 30522, 3853, 11968, 3366, 7361, 9285, 1006, 7047, 1027, 1063, 1065, 1007, 1063, 9530, 3367, 2077, 1027, 7047, 1012, 2077, 999, 1027, 1027, 6270, 1025, 9530, 3367, 2044, 1027, 7047, 1012, 2044, 999, 1027, 1027, 6270, 1025, 30524, 2015, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ecomfe/zrender
src/graphic/mixin/RectText.js
function (ctx, rect) { var style = this.style; rect = style.textRect || rect; // Optimize, avoid normalize every time. this.__dirty && textHelper.normalizeTextStyle(style, true); var text = style.text; // Convert to string text != null && (text += ''); ...
javascript
function (ctx, rect) { var style = this.style; rect = style.textRect || rect; // Optimize, avoid normalize every time. this.__dirty && textHelper.normalizeTextStyle(style, true); var text = style.text; // Convert to string text != null && (text += ''); ...
[ "function", "(", "ctx", ",", "rect", ")", "{", "var", "style", "=", "this", ".", "style", ";", "rect", "=", "style", ".", "textRect", "||", "rect", ";", "// Optimize, avoid normalize every time.", "this", ".", "__dirty", "&&", "textHelper", ".", "normalizeTe...
Draw text in a rect with specified position. @param {CanvasRenderingContext2D} ctx @param {Object} rect Displayable rect
[ "Draw", "text", "in", "a", "rect", "with", "specified", "position", "." ]
30321b57cba3149c30eacb0c1e18276f0f001b9f
https://github.com/ecomfe/zrender/blob/30321b57cba3149c30eacb0c1e18276f0f001b9f/src/graphic/mixin/RectText.js#L23-L63
train
Render text to the given canvas
[ 30522, 3853, 1006, 14931, 2595, 1010, 28667, 2102, 1007, 1063, 13075, 2806, 1027, 2023, 1012, 2806, 1025, 28667, 2102, 1027, 2806, 1012, 3793, 2890, 6593, 1064, 1064, 28667, 2102, 1025, 1013, 1013, 23569, 27605, 4371, 1010, 4468, 3671, 4697...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/core/util/util.js
function(node, child) { var hasContains = (window.Node && window.Node.prototype && Node.prototype.contains); var findFn = hasContains ? angular.bind(node, node.contains) : angular.bind(node, function(arg) { // compares the positions of two nodes and returns a bitmask return (node === child) ...
javascript
function(node, child) { var hasContains = (window.Node && window.Node.prototype && Node.prototype.contains); var findFn = hasContains ? angular.bind(node, node.contains) : angular.bind(node, function(arg) { // compares the positions of two nodes and returns a bitmask return (node === child) ...
[ "function", "(", "node", ",", "child", ")", "{", "var", "hasContains", "=", "(", "window", ".", "Node", "&&", "window", ".", "Node", ".", "prototype", "&&", "Node", ".", "prototype", ".", "contains", ")", ";", "var", "findFn", "=", "hasContains", "?", ...
Build polyfill for the Node.contains feature (if needed) @param {Node} node @param {Node} child @returns {Node}
[ "Build", "polyfill", "for", "the", "Node", ".", "contains", "feature", "(", "if", "needed", ")" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/util/util.js#L578-L586
train
Find the child node
[ 30522, 3853, 1006, 13045, 1010, 2775, 1007, 1063, 13075, 2038, 8663, 18249, 2015, 1027, 1006, 3332, 1012, 13045, 1004, 1004, 3332, 1012, 13045, 1012, 8773, 1004, 1004, 13045, 1012, 8773, 1012, 3397, 1007, 1025, 13075, 2424, 2546, 2078, 1027...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/ControlsMaster.controller.js
function(oBody, sDensityMode){ switch (sDensityMode) { case COMPACT: oBody.toggleClass("sapUiSizeCompact", true).toggleClass("sapUiSizeCozy", false).toggleClass("sapUiSizeCondensed", false); break; case CONDENSED: oBody.toggleClass("sapUiSizeCondensed", true).toggleClass("sapUiSizeCozy",...
javascript
function(oBody, sDensityMode){ switch (sDensityMode) { case COMPACT: oBody.toggleClass("sapUiSizeCompact", true).toggleClass("sapUiSizeCozy", false).toggleClass("sapUiSizeCondensed", false); break; case CONDENSED: oBody.toggleClass("sapUiSizeCondensed", true).toggleClass("sapUiSizeCozy",...
[ "function", "(", "oBody", ",", "sDensityMode", ")", "{", "switch", "(", "sDensityMode", ")", "{", "case", "COMPACT", ":", "oBody", ".", "toggleClass", "(", "\"sapUiSizeCompact\"", ",", "true", ")", ".", "toggleClass", "(", "\"sapUiSizeCozy\"", ",", "false", ...
Toggles content density classes in the provided html body @param {object} oBody the html body to set the correct class on @param {string} sDensityMode content density mode @private
[ "Toggles", "content", "density", "classes", "in", "the", "provided", "html", "body" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/ControlsMaster.controller.js#L203-L214
train
Toggles the CSS class of the given control based on the density mode.
[ 30522, 3853, 1006, 27885, 7716, 2100, 1010, 17371, 6132, 3012, 5302, 3207, 1007, 1063, 6942, 1006, 17371, 6132, 3012, 5302, 3207, 1007, 1063, 2553, 9233, 1024, 27885, 7716, 2100, 1012, 2000, 24679, 26266, 1006, 1000, 20066, 27020, 4697, 900...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
electron/electron
npm/install.js
extractFile
function extractFile (err, zipPath) { if (err) return onerror(err) extract(zipPath, { dir: path.join(__dirname, 'dist') }, function (err) { if (err) return onerror(err) fs.writeFile(path.join(__dirname, 'path.txt'), platformPath, function (err) { if (err) return onerror(err) }) }) }
javascript
function extractFile (err, zipPath) { if (err) return onerror(err) extract(zipPath, { dir: path.join(__dirname, 'dist') }, function (err) { if (err) return onerror(err) fs.writeFile(path.join(__dirname, 'path.txt'), platformPath, function (err) { if (err) return onerror(err) }) }) }
[ "function", "extractFile", "(", "err", ",", "zipPath", ")", "{", "if", "(", "err", ")", "return", "onerror", "(", "err", ")", "extract", "(", "zipPath", ",", "{", "dir", ":", "path", ".", "join", "(", "__dirname", ",", "'dist'", ")", "}", ",", "fun...
unzips and makes path.txt point at the correct executable
[ "unzips", "and", "makes", "path", ".", "txt", "point", "at", "the", "correct", "executable" ]
6e29611788277729647acf465f10db1ea6f15788
https://github.com/electron/electron/blob/6e29611788277729647acf465f10db1ea6f15788/npm/install.js#L42-L50
train
Extract the platform file
[ 30522, 3853, 14817, 8873, 2571, 1006, 9413, 2099, 1010, 14101, 15069, 1007, 1063, 2065, 1006, 9413, 2099, 1007, 2709, 2028, 18933, 2099, 1006, 9413, 2099, 1007, 14817, 1006, 14101, 15069, 1010, 1063, 16101, 1024, 4130, 1012, 3693, 1006, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
javascript/node/selenium-webdriver/firefox.js
installExtension
async function installExtension(extension, dir) { if (extension.slice(-4) !== '.xpi') { throw Error('Path ath is not a xpi file: ' + extension); } let archive = await zip.load(extension); if (!archive.has('manifest.json')) { throw new AddonFormatError(`Couldn't find manifest.json in ${extension}`); }...
javascript
async function installExtension(extension, dir) { if (extension.slice(-4) !== '.xpi') { throw Error('Path ath is not a xpi file: ' + extension); } let archive = await zip.load(extension); if (!archive.has('manifest.json')) { throw new AddonFormatError(`Couldn't find manifest.json in ${extension}`); }...
[ "async", "function", "installExtension", "(", "extension", ",", "dir", ")", "{", "if", "(", "extension", ".", "slice", "(", "-", "4", ")", "!==", "'.xpi'", ")", "{", "throw", "Error", "(", "'Path ath is not a xpi file: '", "+", "extension", ")", ";", "}", ...
Installs an extension to the given directory. @param {string} extension Path to the xpi extension file to install. @param {string} dir Path to the directory to install the extension in. @return {!Promise<string>} A promise for the add-on ID once installed.
[ "Installs", "an", "extension", "to", "the", "given", "directory", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/firefox.js#L158-L178
train
Installs an extension to the add - on.
[ 30522, 2004, 6038, 2278, 3853, 16500, 10288, 29048, 1006, 5331, 1010, 16101, 1007, 1063, 2065, 1006, 5331, 1012, 14704, 1006, 1011, 1018, 1007, 999, 1027, 1027, 1005, 1012, 26726, 2072, 1005, 1007, 1063, 5466, 7561, 1006, 1005, 4130, 2012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
wuchangming/spy-debugger
buildin_modules/weinre/web/modjewel.js
getModulePath
function getModulePath(module) { if (!module || !module.id) return "" var parts = module.id.split("/") return parts.slice(0, parts.length-1).join("/") }
javascript
function getModulePath(module) { if (!module || !module.id) return "" var parts = module.id.split("/") return parts.slice(0, parts.length-1).join("/") }
[ "function", "getModulePath", "(", "module", ")", "{", "if", "(", "!", "module", "||", "!", "module", ".", "id", ")", "return", "\"\"", "var", "parts", "=", "module", ".", "id", ".", "split", "(", "\"/\"", ")", "return", "parts", ".", "slice", "(", ...
---------------------------------------------------------------------------- get the path of a module ----------------------------------------------------------------------------
[ "----------------------------------------------------------------------------", "get", "the", "path", "of", "a", "module", "----------------------------------------------------------------------------" ]
55c1dda0dff0c44920673711656ddfd7ff03c307
https://github.com/wuchangming/spy-debugger/blob/55c1dda0dff0c44920673711656ddfd7ff03c307/buildin_modules/weinre/web/modjewel.js#L233-L239
train
Get the path of a module
[ 30522, 3853, 2131, 5302, 8566, 2571, 15069, 1006, 11336, 1007, 1063, 2065, 1006, 999, 11336, 1064, 1064, 999, 11336, 1012, 8909, 1007, 2709, 1000, 1000, 13075, 3033, 1027, 11336, 1012, 8909, 1012, 3975, 1006, 1000, 1013, 1000, 1007, 2709, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
facebook/relay
packages/relay-runtime/handlers/connection/RelayConnectionHandler.js
insertEdgeAfter
function insertEdgeAfter( record: RecordProxy, newEdge: RecordProxy, cursor?: ?string, ): void { const {CURSOR, EDGES} = RelayConnectionInterface.get(); const edges = record.getLinkedRecords(EDGES); if (!edges) { record.setLinkedRecords([newEdge], EDGES); return; } let nextEdges; if (cursor =...
javascript
function insertEdgeAfter( record: RecordProxy, newEdge: RecordProxy, cursor?: ?string, ): void { const {CURSOR, EDGES} = RelayConnectionInterface.get(); const edges = record.getLinkedRecords(EDGES); if (!edges) { record.setLinkedRecords([newEdge], EDGES); return; } let nextEdges; if (cursor =...
[ "function", "insertEdgeAfter", "(", "record", ":", "RecordProxy", ",", "newEdge", ":", "RecordProxy", ",", "cursor", "?", ":", "?", "string", ",", ")", ":", "void", "{", "const", "{", "CURSOR", ",", "EDGES", "}", "=", "RelayConnectionInterface", ".", "get"...
@public Inserts an edge after the given cursor, or at the end of the list if no cursor is provided. Example: Given that data has already been fetched on some user `<id>` on the `friends` field: ``` fragment FriendsFragment on User { friends(first: 10) @connection(key: "FriendsFragment_friends") { edges { node { id ...
[ "@public" ]
7fb9be5182b9650637d7b92ead9a42713ac30aa4
https://github.com/facebook/relay/blob/7fb9be5182b9650637d7b92ead9a42713ac30aa4/packages/relay-runtime/handlers/connection/RelayConnectionHandler.js#L291-L326
train
Insert an edge after the cursor
[ 30522, 3853, 12889, 3351, 10354, 3334, 1006, 2501, 1024, 2501, 21572, 18037, 1010, 2047, 24225, 1024, 2501, 21572, 18037, 1010, 12731, 25301, 2099, 1029, 1024, 1029, 5164, 1010, 1007, 1024, 11675, 1063, 9530, 3367, 1063, 12731, 25301, 2099, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jgraph/mxgraph
javascript/mxClient.js
function(container, scrollOffset) { var offsetLeft = 0; var offsetTop = 0; // Ignores document scroll origin for fixed elements var fixed = false; var node = container; var b = document.body; var d = document.documentElement; while (node != null && node != b && node != d && !fixed) { var style...
javascript
function(container, scrollOffset) { var offsetLeft = 0; var offsetTop = 0; // Ignores document scroll origin for fixed elements var fixed = false; var node = container; var b = document.body; var d = document.documentElement; while (node != null && node != b && node != d && !fixed) { var style...
[ "function", "(", "container", ",", "scrollOffset", ")", "{", "var", "offsetLeft", "=", "0", ";", "var", "offsetTop", "=", "0", ";", "// Ignores document scroll origin for fixed elements", "var", "fixed", "=", "false", ";", "var", "node", "=", "container", ";", ...
Function: getOffset Returns the offset for the specified container as an <mxPoint>. The offset is the distance from the top left corner of the container to the top left corner of the document. Parameters: container - DOM node to return the offset for. scollOffset - Optional boolean to add the scroll offset of the do...
[ "Function", ":", "getOffset" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L4754-L4793
train
Returns the absolute position of the container.
[ 30522, 3853, 1006, 11661, 1010, 17186, 27475, 3388, 1007, 1063, 13075, 16396, 2571, 6199, 1027, 1014, 1025, 13075, 16396, 14399, 1027, 1014, 1025, 1013, 1013, 26663, 6254, 17186, 4761, 2005, 4964, 3787, 13075, 4964, 1027, 6270, 1025, 13075, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mui-org/material-ui
packages/material-ui-styles/src/jssPreset/jssPreset.js
jssPreset
function jssPreset() { return { plugins: [ functions(), global(), nested(), camelCase(), defaultUnit(), // Disable the vendor prefixer server-side, it does nothing. // This way, we can get a performance boost. // In the documentation, we are using `autoprefixer` to ...
javascript
function jssPreset() { return { plugins: [ functions(), global(), nested(), camelCase(), defaultUnit(), // Disable the vendor prefixer server-side, it does nothing. // This way, we can get a performance boost. // In the documentation, we are using `autoprefixer` to ...
[ "function", "jssPreset", "(", ")", "{", "return", "{", "plugins", ":", "[", "functions", "(", ")", ",", "global", "(", ")", ",", "nested", "(", ")", ",", "camelCase", "(", ")", ",", "defaultUnit", "(", ")", ",", "// Disable the vendor prefixer server-side,...
Subset of jss-preset-default with only the plugins the Material-UI components are using.
[ "Subset", "of", "jss", "-", "preset", "-", "default", "with", "only", "the", "plugins", "the", "Material", "-", "UI", "components", "are", "using", "." ]
1555e52367835946382fbf2a8f681de71318915d
https://github.com/mui-org/material-ui/blob/1555e52367835946382fbf2a8f681de71318915d/packages/material-ui-styles/src/jssPreset/jssPreset.js#L10-L25
train
The jss preset is a function that can be used to generate a plugin for the jss module.
[ 30522, 3853, 1046, 4757, 28994, 3388, 1006, 1007, 1063, 2709, 30524, 19150, 1996, 21431, 17576, 2121, 8241, 1011, 2217, 1010, 2009, 2515, 2498, 1012, 1013, 1013, 2023, 2126, 1010, 2057, 2064, 2131, 1037, 2836, 12992, 1012, 1013, 1013, 1999,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dcloudio/mui
examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js
function (handler, ns, name, type, id) { var hand = new Strophe.Handler(handler, ns, name, type, id); hand.user = false; this.addHandlers.push(hand); return hand; }
javascript
function (handler, ns, name, type, id) { var hand = new Strophe.Handler(handler, ns, name, type, id); hand.user = false; this.addHandlers.push(hand); return hand; }
[ "function", "(", "handler", ",", "ns", ",", "name", ",", "type", ",", "id", ")", "{", "var", "hand", "=", "new", "Strophe", ".", "Handler", "(", "handler", ",", "ns", ",", "name", ",", "type", ",", "id", ")", ";", "hand", ".", "user", "=", "fal...
PrivateFunction: _addSysHandler _Private_ function to add a system level stanza handler. This function is used to add a Strophe.Handler for the library code. System stanza handlers are allowed to run before authentication is complete. Parameters: (Function) handler - The callback function. (String) ns - The namespac...
[ "PrivateFunction", ":", "_addSysHandler", "_Private_", "function", "to", "add", "a", "system", "level", "stanza", "handler", "." ]
ff74c90a1671a552f3604b1288bf38a4126312d0
https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js#L3405-L3411
train
Add a new handler to the end of the list of handlers
[ 30522, 3853, 1006, 28213, 1010, 24978, 1010, 2171, 1010, 2828, 1010, 8909, 1007, 1063, 13075, 2192, 1027, 2047, 2358, 18981, 5369, 1012, 28213, 1006, 28213, 1010, 24978, 1010, 2171, 1010, 2828, 1010, 8909, 1007, 1025, 2192, 1012, 5310, 1027...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sparksuite/simplemde-markdown-editor
src/js/simplemde.js
drawLink
function drawLink(editor) { var cm = editor.codemirror; var stat = getState(cm); var options = editor.options; var url = "http://"; if(options.promptURLs) { url = prompt(options.promptTexts.link); if(!url) { return false; } } _replaceSelection(cm, stat.link, options.insertTexts.link, url); }
javascript
function drawLink(editor) { var cm = editor.codemirror; var stat = getState(cm); var options = editor.options; var url = "http://"; if(options.promptURLs) { url = prompt(options.promptTexts.link); if(!url) { return false; } } _replaceSelection(cm, stat.link, options.insertTexts.link, url); }
[ "function", "drawLink", "(", "editor", ")", "{", "var", "cm", "=", "editor", ".", "codemirror", ";", "var", "stat", "=", "getState", "(", "cm", ")", ";", "var", "options", "=", "editor", ".", "options", ";", "var", "url", "=", "\"http://\"", ";", "if...
Action for drawing a link.
[ "Action", "for", "drawing", "a", "link", "." ]
6abda7ab68cc20f4aca870eb243747951b90ab04
https://github.com/sparksuite/simplemde-markdown-editor/blob/6abda7ab68cc20f4aca870eb243747951b90ab04/src/js/simplemde.js#L616-L628
train
Draw link text
[ 30522, 3853, 4009, 13767, 1006, 3559, 1007, 1063, 13075, 4642, 1027, 3559, 1012, 3642, 14503, 29165, 1025, 13075, 28093, 1027, 4152, 12259, 1006, 4642, 30524, 1024, 1013, 1013, 1000, 1025, 2065, 1006, 7047, 1012, 25732, 3126, 4877, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/menu/js/menuServiceProvider.js
onRemove
function onRemove(scope, element, opts) { opts.cleanupInteraction(); opts.cleanupBackdrop(); opts.cleanupResizing(); opts.hideBackdrop(); // Before the menu is closing remove the clickable class. element.removeClass('md-clickable'); // For navigation $destroy events, do a qui...
javascript
function onRemove(scope, element, opts) { opts.cleanupInteraction(); opts.cleanupBackdrop(); opts.cleanupResizing(); opts.hideBackdrop(); // Before the menu is closing remove the clickable class. element.removeClass('md-clickable'); // For navigation $destroy events, do a qui...
[ "function", "onRemove", "(", "scope", ",", "element", ",", "opts", ")", "{", "opts", ".", "cleanupInteraction", "(", ")", ";", "opts", ".", "cleanupBackdrop", "(", ")", ";", "opts", ".", "cleanupResizing", "(", ")", ";", "opts", ".", "hideBackdrop", "(",...
Removing the menu element from the DOM and remove all associated event listeners and backdrop
[ "Removing", "the", "menu", "element", "from", "the", "DOM", "and", "remove", "all", "associated", "event", "listeners", "and", "backdrop" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/menu/js/menuServiceProvider.js#L78-L109
train
Remove the menu element
[ 30522, 3853, 2006, 28578, 21818, 1006, 9531, 1010, 5783, 1010, 23569, 2015, 1007, 1063, 23569, 2015, 1012, 27686, 18447, 6906, 7542, 1006, 1007, 1025, 23569, 2015, 1012, 27686, 5963, 25711, 1006, 1007, 1025, 23569, 2015, 1012, 27686, 6072, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dcloudio/mui
examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js
function () { var data = this._conn._data; if (data.length > 0 && !this._conn.paused) { for (var i = 0; i < data.length; i++) { if (data[i] !== null) { var stanza, rawStanza; if (data[i] === "restart") { s...
javascript
function () { var data = this._conn._data; if (data.length > 0 && !this._conn.paused) { for (var i = 0; i < data.length; i++) { if (data[i] !== null) { var stanza, rawStanza; if (data[i] === "restart") { s...
[ "function", "(", ")", "{", "var", "data", "=", "this", ".", "_conn", ".", "_data", ";", "if", "(", "data", ".", "length", ">", "0", "&&", "!", "this", ".", "_conn", ".", "paused", ")", "{", "for", "(", "var", "i", "=", "0", ";", "i", "<", "...
PrivateFunction: _onIdle _Private_ function called by Strophe.Connection._onIdle sends all queued stanzas
[ "PrivateFunction", ":", "_onIdle", "_Private_", "function", "called", "by", "Strophe", ".", "Connection", ".", "_onIdle" ]
ff74c90a1671a552f3604b1288bf38a4126312d0
https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js#L5097-L5116
train
End of the function
[ 30522, 3853, 1006, 1007, 1063, 13075, 2951, 1027, 2023, 1012, 1035, 9530, 2078, 1012, 1035, 2951, 1025, 2065, 1006, 2951, 1012, 3091, 1028, 1014, 1004, 1004, 999, 2023, 1012, 1035, 9530, 2078, 1012, 5864, 1007, 1063, 2005, 1006, 13075, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
fex-team/webuploader
dist/webuploader.withoutimage.js
function( file ) { var invalid = !file || !file.size || this.accept && // 如果名字中有后缀,才做后缀白名单处理。 rExt.exec( file.name ) && !this.accept.test( file.name ); return !invalid; }
javascript
function( file ) { var invalid = !file || !file.size || this.accept && // 如果名字中有后缀,才做后缀白名单处理。 rExt.exec( file.name ) && !this.accept.test( file.name ); return !invalid; }
[ "function", "(", "file", ")", "{", "var", "invalid", "=", "!", "file", "||", "!", "file", ".", "size", "||", "this", ".", "accept", "&&", "// 如果名字中有后缀,才做后缀白名单处理。", "rExt", ".", "exec", "(", "file", ".", "name", ")", "&&", "!", "this", ".", "accept", ...
判断文件是否可以被加入队列
[ "判断文件是否可以被加入队列" ]
7094e4476c5af3b06993d91dde2d223200b9feb7
https://github.com/fex-team/webuploader/blob/7094e4476c5af3b06993d91dde2d223200b9feb7/dist/webuploader.withoutimage.js#L2469-L2476
train
check if file is valid
[ 30522, 3853, 1006, 5371, 1007, 1063, 13075, 19528, 1027, 999, 5371, 1064, 1064, 999, 5371, 1012, 2946, 1064, 1064, 2023, 1012, 5138, 1004, 1004, 1013, 1013, 100, 100, 1795, 100, 1746, 1873, 100, 100, 1989, 100, 100, 100, 100, 1915, 1795...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
shipshapecode/shepherd
src/js/utils/modal.js
_setAttributes
function _setAttributes(el, attrs) { Object.keys(attrs).forEach((key) => { el.setAttribute(key, attrs[key]); }); }
javascript
function _setAttributes(el, attrs) { Object.keys(attrs).forEach((key) => { el.setAttribute(key, attrs[key]); }); }
[ "function", "_setAttributes", "(", "el", ",", "attrs", ")", "{", "Object", ".", "keys", "(", "attrs", ")", ".", "forEach", "(", "(", "key", ")", "=>", "{", "el", ".", "setAttribute", "(", "key", ",", "attrs", "[", "key", "]", ")", ";", "}", ")", ...
Set multiple attributes on an element, via a hash @param {HTMLElement|SVGElement} el The element to set the attributes on @param {Object} attrs A hash of key value pairs for attributes to set @private
[ "Set", "multiple", "attributes", "on", "an", "element", "via", "a", "hash" ]
0cb1c63fb07b58796358f6d33da5f6405e2b05f4
https://github.com/shipshapecode/shepherd/blob/0cb1c63fb07b58796358f6d33da5f6405e2b05f4/src/js/utils/modal.js#L183-L187
train
Set attributes on an element
[ 30522, 3853, 1035, 2275, 19321, 3089, 8569, 4570, 1006, 3449, 1010, 2012, 16344, 2015, 1007, 1063, 4874, 1012, 6309, 1006, 2012, 16344, 2015, 1007, 1012, 18921, 6776, 1006, 1006, 3145, 1007, 1027, 1028, 1063, 3449, 1012, 2275, 19321, 3089, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
BrainJS/brain.js
dist/recurrent/matrix/multiply-element-b.js
multiplyElementB
function multiplyElementB(product, left, right) { for (var i = 0; i < left.weights.length; i++) { left.deltas[i] = right.weights[i] * product.deltas[i]; right.deltas[i] = left.weights[i] * product.deltas[i]; } }
javascript
function multiplyElementB(product, left, right) { for (var i = 0; i < left.weights.length; i++) { left.deltas[i] = right.weights[i] * product.deltas[i]; right.deltas[i] = left.weights[i] * product.deltas[i]; } }
[ "function", "multiplyElementB", "(", "product", ",", "left", ",", "right", ")", "{", "for", "(", "var", "i", "=", "0", ";", "i", "<", "left", ".", "weights", ".", "length", ";", "i", "++", ")", "{", "left", ".", "deltas", "[", "i", "]", "=", "r...
multiplies {left} and {right} weight by {from} deltas into {left} and {right} deltas @param {Matrix} product @param {Matrix} left @param {Matrix} right
[ "multiplies", "{", "left", "}", "and", "{", "right", "}", "weight", "by", "{", "from", "}", "deltas", "into", "{", "left", "}", "and", "{", "right", "}", "deltas" ]
ab09bfc74a0d29d4731dcbdebfa17aeba7f7b1ef
https://github.com/BrainJS/brain.js/blob/ab09bfc74a0d29d4731dcbdebfa17aeba7f7b1ef/dist/recurrent/matrix/multiply-element-b.js#L13-L18
train
multiply element B
[ 30522, 3853, 4800, 22086, 12260, 3672, 2497, 1006, 4031, 1010, 2187, 1010, 2157, 1007, 1063, 2005, 1006, 13075, 1045, 1027, 1014, 1025, 1045, 1026, 2187, 1012, 15871, 1012, 3091, 1025, 1045, 1009, 1009, 1007, 1063, 2187, 1012, 7160, 2015, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
testing-library/react-testing-library
src/act-compat.js
actPolyfill
function actPolyfill(cb) { ReactDOM.unstable_batchedUpdates(cb) ReactDOM.render(<div />, document.createElement('div')) }
javascript
function actPolyfill(cb) { ReactDOM.unstable_batchedUpdates(cb) ReactDOM.render(<div />, document.createElement('div')) }
[ "function", "actPolyfill", "(", "cb", ")", "{", "ReactDOM", ".", "unstable_batchedUpdates", "(", "cb", ")", "ReactDOM", ".", "render", "(", "<", "div", "/", ">", ",", "document", ".", "createElement", "(", "'div'", ")", ")", "}" ]
act is supported react-dom@16.8.0 so for versions that don't have act from test utils we do this little polyfill. No warnings, but it's better than nothing.
[ "act", "is", "supported", "react", "-", "dom" ]
960451b00196352fc3085a3d1bb233b5b85f454b
https://github.com/testing-library/react-testing-library/blob/960451b00196352fc3085a3d1bb233b5b85f454b/src/act-compat.js#L33-L36
train
act polyfill
[ 30522, 3853, 2552, 18155, 2100, 8873, 3363, 1006, 17324, 1007, 1063, 10509, 9527, 1012, 14480, 1035, 14108, 2098, 6279, 27122, 1006, 17324, 1007, 10509, 9527, 30524, 3672, 1006, 1005, 4487, 2615, 1005, 1007, 1007, 1065, 102, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aframevr/aframe
src/components/look-controls.js
function () { var el = this.el; this.savedPose.position.copy(el.object3D.position); this.savedPose.rotation.copy(el.object3D.rotation); this.hasSavedPose = true; }
javascript
function () { var el = this.el; this.savedPose.position.copy(el.object3D.position); this.savedPose.rotation.copy(el.object3D.rotation); this.hasSavedPose = true; }
[ "function", "(", ")", "{", "var", "el", "=", "this", ".", "el", ";", "this", ".", "savedPose", ".", "position", ".", "copy", "(", "el", ".", "object3D", ".", "position", ")", ";", "this", ".", "savedPose", ".", "rotation", ".", "copy", "(", "el", ...
Save camera pose before entering VR to restore later if exiting.
[ "Save", "camera", "pose", "before", "entering", "VR", "to", "restore", "later", "if", "exiting", "." ]
24acc78a7299a4cdfe3ef617f4d40ddf6275c992
https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/components/look-controls.js#L409-L415
train
Save pose to saved position rotation and position
[ 30522, 3853, 1006, 1007, 1063, 13075, 3449, 1027, 2023, 1012, 3449, 1025, 2023, 1012, 5552, 20688, 1012, 2597, 1012, 6100, 1006, 3449, 1012, 4874, 29097, 1012, 2597, 1007, 1025, 2023, 1012, 5552, 20688, 1012, 9963, 1012, 6100, 1006, 3449, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/code-path-analysis/code-path-state.js
getBreakContext
function getBreakContext(state, label) { let context = state.breakContext; while (context) { if (label ? context.label === label : context.breakable) { return context; } context = context.upper; } /* istanbul ignore next: foolproof (syntax error) */ return null;...
javascript
function getBreakContext(state, label) { let context = state.breakContext; while (context) { if (label ? context.label === label : context.breakable) { return context; } context = context.upper; } /* istanbul ignore next: foolproof (syntax error) */ return null;...
[ "function", "getBreakContext", "(", "state", ",", "label", ")", "{", "let", "context", "=", "state", ".", "breakContext", ";", "while", "(", "context", ")", "{", "if", "(", "label", "?", "context", ".", "label", "===", "label", ":", "context", ".", "br...
Gets a context for a `break` statement. @param {CodePathState} state - A state to get. @param {string} label - The label of a `break` statement. @returns {LoopContext|SwitchContext} A context for a `break` statement.
[ "Gets", "a", "context", "for", "a", "break", "statement", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/code-path-analysis/code-path-state.js#L75-L87
train
Get the break context for a given label
[ 30522, 3853, 2131, 23890, 8663, 18209, 1006, 2110, 1010, 3830, 1007, 1063, 2292, 6123, 1027, 2110, 1012, 3338, 8663, 18209, 1025, 2096, 1006, 6123, 1007, 1063, 2065, 1006, 3830, 1029, 6123, 1012, 3830, 1027, 1027, 1027, 3830, 1024, 6123, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.fl/src/sap/ui/fl/Utils.js
function(sLogType, aMessageComponents, aValuesToInsert, sCallStack) { var sLogMessage = aMessageComponents.join(' '); sLogMessage = formatMessage(sLogMessage, aValuesToInsert); this.log[sLogType](sLogMessage, sCallStack || ""); }
javascript
function(sLogType, aMessageComponents, aValuesToInsert, sCallStack) { var sLogMessage = aMessageComponents.join(' '); sLogMessage = formatMessage(sLogMessage, aValuesToInsert); this.log[sLogType](sLogMessage, sCallStack || ""); }
[ "function", "(", "sLogType", ",", "aMessageComponents", ",", "aValuesToInsert", ",", "sCallStack", ")", "{", "var", "sLogMessage", "=", "aMessageComponents", ".", "join", "(", "' '", ")", ";", "sLogMessage", "=", "formatMessage", "(", "sLogMessage", ",", "aValue...
Formats the log message by replacing placeholders with values and logging the message. @param {string} sLogType - Logging type to be used. Possible values: info | warning | debug | error @param {array.<string>} aMessageComponents - Individual parts of the message text @param {array.<any>} aValuesToInsert - The values ...
[ "Formats", "the", "log", "message", "by", "replacing", "placeholders", "with", "values", "and", "logging", "the", "message", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/Utils.js#L90-L94
train
Log a message to the log file
[ 30522, 3853, 1006, 22889, 8649, 13874, 1010, 19900, 3736, 3351, 9006, 29513, 7666, 1010, 10927, 7630, 4355, 28765, 8043, 2102, 1010, 8040, 8095, 9153, 3600, 1007, 1063, 13075, 22889, 8649, 7834, 3736, 3351, 1027, 19900, 3736, 3351, 9006, 29...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/tooltip/tooltip.js
MdTooltipDirective
function MdTooltipDirective($timeout, $window, $$rAF, $document, $interpolate, $mdUtil, $mdPanel, $$mdTooltipRegistry) { var ENTER_EVENTS = 'focus touchstart mouseenter'; var LEAVE_EVENTS = 'blur touchcancel mouseleave'; var TOOLTIP_DEFAULT_Z_INDEX = 100; var TOOLTIP_DEFAULT_SHOW_DELAY = 0; var TOOLTIP_D...
javascript
function MdTooltipDirective($timeout, $window, $$rAF, $document, $interpolate, $mdUtil, $mdPanel, $$mdTooltipRegistry) { var ENTER_EVENTS = 'focus touchstart mouseenter'; var LEAVE_EVENTS = 'blur touchcancel mouseleave'; var TOOLTIP_DEFAULT_Z_INDEX = 100; var TOOLTIP_DEFAULT_SHOW_DELAY = 0; var TOOLTIP_D...
[ "function", "MdTooltipDirective", "(", "$timeout", ",", "$window", ",", "$$rAF", ",", "$document", ",", "$interpolate", ",", "$mdUtil", ",", "$mdPanel", ",", "$$mdTooltipRegistry", ")", "{", "var", "ENTER_EVENTS", "=", "'focus touchstart mouseenter'", ";", "var", ...
@ngdoc directive @name mdTooltip @module material.components.tooltip @description Tooltips are used to describe elements that are interactive and primarily graphical (not textual). Place a `<md-tooltip>` as a child of the element it describes. A tooltip will activate when the user hovers over, focuses, or touches the...
[ "@ngdoc", "directive", "@name", "mdTooltip", "@module", "material", ".", "components", ".", "tooltip", "@description", "Tooltips", "are", "used", "to", "describe", "elements", "that", "are", "interactive", "and", "primarily", "graphical", "(", "not", "textual", ")...
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/tooltip/tooltip.js#L48-L413
train
A directive that displays the tooltip in the DOM.
[ 30522, 3853, 9108, 3406, 27914, 11514, 4305, 2890, 15277, 1006, 1002, 2051, 5833, 1010, 1002, 3332, 1010, 1002, 1002, 7148, 1010, 1002, 6254, 1010, 1002, 6970, 18155, 3686, 1010, 1002, 9108, 21823, 2140, 1010, 1002, 9108, 9739, 2884, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/view/ThemeManager.js
refresh
function refresh(force) { if (force) { currentTheme = null; } $.when(force && loadCurrentTheme()).done(function () { var editor = EditorManager.getActiveEditor(); if (!editor || !editor._codeMirror) { return; } var cm ...
javascript
function refresh(force) { if (force) { currentTheme = null; } $.when(force && loadCurrentTheme()).done(function () { var editor = EditorManager.getActiveEditor(); if (!editor || !editor._codeMirror) { return; } var cm ...
[ "function", "refresh", "(", "force", ")", "{", "if", "(", "force", ")", "{", "currentTheme", "=", "null", ";", "}", "$", ".", "when", "(", "force", "&&", "loadCurrentTheme", "(", ")", ")", ".", "done", "(", "function", "(", ")", "{", "var", "editor...
Refresh current theme in the editor @param {boolean} force Forces a reload of the current theme. It reloads the theme file.
[ "Refresh", "current", "theme", "in", "the", "editor" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/view/ThemeManager.js#L254-L271
train
refresh theme view
[ 30522, 3853, 25416, 21898, 30524, 1007, 1063, 13075, 3559, 1027, 3559, 24805, 4590, 1012, 2131, 19620, 2098, 15660, 1006, 1007, 1025, 2065, 1006, 999, 3559, 1064, 1064, 999, 3559, 1012, 1035, 3642, 14503, 29165, 1007, 1063, 2709, 1025, 1065...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
blueimp/jQuery-File-Upload
js/jquery.fileupload-ui.js
function (e, data) { if (e.isDefaultPrevented()) { return false; } var that = $(this).data('blueimp-fileupload') || $(this).data('fileupload'), removeNode = function () { that._transit...
javascript
function (e, data) { if (e.isDefaultPrevented()) { return false; } var that = $(this).data('blueimp-fileupload') || $(this).data('fileupload'), removeNode = function () { that._transit...
[ "function", "(", "e", ",", "data", ")", "{", "if", "(", "e", ".", "isDefaultPrevented", "(", ")", ")", "{", "return", "false", ";", "}", "var", "that", "=", "$", "(", "this", ")", ".", "data", "(", "'blueimp-fileupload'", ")", "||", "$", "(", "th...
Callback for file deletion:
[ "Callback", "for", "file", "deletion", ":" ]
4586771d65482dc9678c7e48d245a1501bf96ff5
https://github.com/blueimp/jQuery-File-Upload/blob/4586771d65482dc9678c7e48d245a1501bf96ff5/js/jquery.fileupload-ui.js#L371-L393
train
Called when the file upload is destroyed
[ 30522, 3853, 1006, 1041, 1010, 2951, 1007, 1063, 2065, 1006, 1041, 1012, 2003, 3207, 7011, 11314, 28139, 15338, 2098, 1006, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 13075, 2008, 1027, 1002, 1006, 2023, 1007, 1012, 2951, 1006, 1005, 2630, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
google/closure-library
closure/goog/html/sanitizer/safedomtreeprocessor.js
getDomTreeWalker
function getDomTreeWalker(html) { var iteratorParent; var safeHtml = uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract( Const.from('Never attached to DOM.'), html); // Use a <template> element if possible. var templateElement = document.createElement('template'); if ('content' ...
javascript
function getDomTreeWalker(html) { var iteratorParent; var safeHtml = uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract( Const.from('Never attached to DOM.'), html); // Use a <template> element if possible. var templateElement = document.createElement('template'); if ('content' ...
[ "function", "getDomTreeWalker", "(", "html", ")", "{", "var", "iteratorParent", ";", "var", "safeHtml", "=", "uncheckedconversions", ".", "safeHtmlFromStringKnownToSatisfyTypeContract", "(", "Const", ".", "from", "(", "'Never attached to DOM.'", ")", ",", "html", ")",...
Parses a string of unsanitized HTML and provides an iterator over the resulting DOM tree nodes. The parsing operation is inert (that is, it does not cause execution of any active content or cause the browser to issue any requests). The returned iterator is guaranteed to iterate over a parent element before iterating ov...
[ "Parses", "a", "string", "of", "unsanitized", "HTML", "and", "provides", "an", "iterator", "over", "the", "resulting", "DOM", "tree", "nodes", ".", "The", "parsing", "operation", "is", "inert", "(", "that", "is", "it", "does", "not", "cause", "execution", ...
97390e9ca4483cebb9628e06026139fbb3023d65
https://github.com/google/closure-library/blob/97390e9ca4483cebb9628e06026139fbb3023d65/closure/goog/html/sanitizer/safedomtreeprocessor.js#L60-L80
train
Returns a treeWalker for the given HTML string.
[ 30522, 3853, 2131, 9527, 13334, 26965, 1006, 16129, 1007, 1063, 13075, 2009, 6906, 4263, 19362, 4765, 1025, 13075, 3647, 11039, 19968, 1027, 4895, 5403, 18141, 8663, 27774, 2015, 1012, 3647, 11039, 19968, 19699, 22225, 18886, 3070, 2243, 1977...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/search/FindInFiles.js
_addSearchResultsForEntries
function _addSearchResultsForEntries(entries) { var fullPaths = []; return Async.doInParallel(entries, function (entry) { var addedFiles = [], addedFilePaths = [], deferred = new $.Deferred(); // gather up added files ...
javascript
function _addSearchResultsForEntries(entries) { var fullPaths = []; return Async.doInParallel(entries, function (entry) { var addedFiles = [], addedFilePaths = [], deferred = new $.Deferred(); // gather up added files ...
[ "function", "_addSearchResultsForEntries", "(", "entries", ")", "{", "var", "fullPaths", "=", "[", "]", ";", "return", "Async", ".", "doInParallel", "(", "entries", ",", "function", "(", "entry", ")", "{", "var", "addedFiles", "=", "[", "]", ",", "addedFil...
/* Add new search results for these entries and all of its children @param {Array.<(File|Directory)>} entries @return {jQuery.Promise} Resolves when the results have been added
[ "/", "*", "Add", "new", "search", "results", "for", "these", "entries", "and", "all", "of", "its", "children" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/search/FindInFiles.js#L775-L826
train
Add search results for all entries
[ 30522, 3853, 1035, 9909, 14644, 2818, 6072, 11314, 22747, 5686, 3372, 5134, 1006, 10445, 1007, 1063, 13075, 2440, 15069, 2015, 1027, 1031, 1033, 1025, 2709, 2004, 6038, 2278, 1012, 24341, 28689, 6216, 2140, 1006, 10445, 1010, 3853, 1006, 44...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/document/DocumentManager.js
getCurrentDocument
function getCurrentDocument() { var file = MainViewManager.getCurrentlyViewedFile(MainViewManager.ACTIVE_PANE); if (file) { return getOpenDocumentForPath(file.fullPath); } return null; }
javascript
function getCurrentDocument() { var file = MainViewManager.getCurrentlyViewedFile(MainViewManager.ACTIVE_PANE); if (file) { return getOpenDocumentForPath(file.fullPath); } return null; }
[ "function", "getCurrentDocument", "(", ")", "{", "var", "file", "=", "MainViewManager", ".", "getCurrentlyViewedFile", "(", "MainViewManager", ".", "ACTIVE_PANE", ")", ";", "if", "(", "file", ")", "{", "return", "getOpenDocumentForPath", "(", "file", ".", "fullP...
Returns the Document that is currently open in the editor UI. May be null. @return {?Document}
[ "Returns", "the", "Document", "that", "is", "currently", "open", "in", "the", "editor", "UI", ".", "May", "be", "null", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/document/DocumentManager.js#L140-L148
train
Get the current document
[ 30522, 3853, 2131, 10841, 14343, 3372, 3527, 24894, 4765, 1006, 1007, 1063, 13075, 5371, 1027, 2364, 8584, 24805, 4590, 1012, 2131, 10841, 14343, 20630, 8584, 2098, 8873, 2571, 1006, 2364, 8584, 24805, 4590, 1012, 3161, 1035, 6090, 2063, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/v4/ODataUtils.js
function (sDate) { var oDate = rDate.test(sDate) && DateFormat.getDateInstance({ pattern : "yyyy-MM-dd", strictParsing : true, UTC : true }).parse(sDate); if (!oDate) { throw new Error("Not a valid Edm.Date value: " + sDate); } return oDate; }
javascript
function (sDate) { var oDate = rDate.test(sDate) && DateFormat.getDateInstance({ pattern : "yyyy-MM-dd", strictParsing : true, UTC : true }).parse(sDate); if (!oDate) { throw new Error("Not a valid Edm.Date value: " + sDate); } return oDate; }
[ "function", "(", "sDate", ")", "{", "var", "oDate", "=", "rDate", ".", "test", "(", "sDate", ")", "&&", "DateFormat", ".", "getDateInstance", "(", "{", "pattern", ":", "\"yyyy-MM-dd\"", ",", "strictParsing", ":", "true", ",", "UTC", ":", "true", "}", "...
Parses an "Edm.Date" value and returns the corresponding JavaScript <code>Date</code> value (UTC with a time value of "00:00:00"). @param {string} sDate The "Edm.Date" value to parse @returns {Date} The JavaScript <code>Date</code> value @throws {Error} If the input cannot be parsed @public @since 1.43.0
[ "Parses", "an", "Edm", ".", "Date", "value", "and", "returns", "the", "corresponding", "JavaScript", "<code", ">", "Date<", "/", "code", ">", "value", "(", "UTC", "with", "a", "time", "value", "of", "00", ":", "00", ":", "00", ")", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/ODataUtils.js#L111-L122
train
Parses a Edm. Date value
[ 30522, 3853, 1006, 17371, 3686, 1007, 1063, 13075, 1051, 13701, 1027, 16428, 3686, 1012, 3231, 1006, 17371, 3686, 1007, 1004, 1004, 3058, 14192, 4017, 1012, 2131, 13701, 7076, 26897, 1006, 1063, 5418, 1024, 1000, 1061, 2100, 2100, 2100, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/base/ManagedObjectObserver.js
remove
function remove(oTarget, oListener, oConfiguration) { oConfiguration = oConfiguration || getConfiguration(oTarget, oListener); updateConfiguration(oTarget, oListener, oConfiguration, true); }
javascript
function remove(oTarget, oListener, oConfiguration) { oConfiguration = oConfiguration || getConfiguration(oTarget, oListener); updateConfiguration(oTarget, oListener, oConfiguration, true); }
[ "function", "remove", "(", "oTarget", ",", "oListener", ",", "oConfiguration", ")", "{", "oConfiguration", "=", "oConfiguration", "||", "getConfiguration", "(", "oTarget", ",", "oListener", ")", ";", "updateConfiguration", "(", "oTarget", ",", "oListener", ",", ...
removes the given configuration for the given listener from the internal list of observed targets mTargets. removes the observer from the target managed object if the target hasn't to be observed any longer
[ "removes", "the", "given", "configuration", "for", "the", "given", "listener", "from", "the", "internal", "list", "of", "observed", "targets", "mTargets", ".", "removes", "the", "observer", "from", "the", "target", "managed", "object", "if", "the", "target", "...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/base/ManagedObjectObserver.js#L481-L484
train
Removes the specified event listener from the target.
[ 30522, 3853, 6366, 1006, 27178, 2906, 18150, 1010, 19330, 27870, 3678, 1010, 1051, 8663, 8873, 27390, 3370, 1007, 1063, 1051, 8663, 8873, 27390, 3370, 1027, 1051, 8663, 8873, 27390, 3370, 1064, 1064, 2131, 8663, 8873, 27390, 3370, 1006, 271...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.ux3/src/sap/ui/ux3/Exact.js
function(oThis, oEvent){ oThis._sSearchQuery = oEvent.getParameter("query"); //Store the value until next Search oThis.fireSearch({query: oThis._sSearchQuery}); oThis._bDetailsVisible = true; oThis.invalidate(); }
javascript
function(oThis, oEvent){ oThis._sSearchQuery = oEvent.getParameter("query"); //Store the value until next Search oThis.fireSearch({query: oThis._sSearchQuery}); oThis._bDetailsVisible = true; oThis.invalidate(); }
[ "function", "(", "oThis", ",", "oEvent", ")", "{", "oThis", ".", "_sSearchQuery", "=", "oEvent", ".", "getParameter", "(", "\"query\"", ")", ";", "//Store the value until next Search", "oThis", ".", "fireSearch", "(", "{", "query", ":", "oThis", ".", "_sSearch...
*** Private helper functions *** Handles the search event
[ "***", "Private", "helper", "functions", "***", "Handles", "the", "search", "event" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.ux3/src/sap/ui/ux3/Exact.js#L220-L225
train
Search on the details
[ 30522, 3853, 1006, 27178, 24158, 1010, 1051, 18697, 3372, 1007, 1063, 27178, 24158, 1012, 1035, 7020, 14644, 2818, 4226, 2854, 1027, 1051, 18697, 3372, 1012, 2131, 28689, 22828, 1006, 1000, 23032, 1000, 1007, 1025, 1013, 1013, 3573, 1996, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/CodeFolding/foldhelpers/handlebarsFold.js
scanTextUntil
function scanTextUntil(cm, startCh, startLine, condition) { var line = cm.getLine(startLine), seen = "", characterIndex = startCh, currentLine = startLine, range; while (currentLine <= cm.lastLine()) { if (line.length === 0) { c...
javascript
function scanTextUntil(cm, startCh, startLine, condition) { var line = cm.getLine(startLine), seen = "", characterIndex = startCh, currentLine = startLine, range; while (currentLine <= cm.lastLine()) { if (line.length === 0) { c...
[ "function", "scanTextUntil", "(", "cm", ",", "startCh", ",", "startLine", ",", "condition", ")", "{", "var", "line", "=", "cm", ".", "getLine", "(", "startLine", ")", ",", "seen", "=", "\"\"", ",", "characterIndex", "=", "startCh", ",", "currentLine", "=...
Utility function for scanning the text in a document until a certain condition is met @param {object} cm The code mirror object representing the document @param {string} startCh The start character position for the scan operation @param {number} startLine The start line position for the scan operation @param {func...
[ "Utility", "function", "for", "scanning", "the", "text", "in", "a", "document", "until", "a", "certain", "condition", "is", "met" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/CodeFolding/foldhelpers/handlebarsFold.js#L44-L80
train
Scan text until condition returns true
[ 30522, 3853, 13594, 18209, 16671, 4014, 1006, 4642, 1010, 2707, 2818, 1010, 2707, 4179, 1010, 4650, 1007, 1063, 13075, 2240, 1027, 4642, 1012, 2131, 4179, 1006, 2707, 4179, 1007, 1010, 2464, 1027, 1000, 1000, 1010, 2839, 22254, 10288, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/AutoUpdate/main.js
registerBracketsFunctions
function registerBracketsFunctions() { functionMap["brackets.notifyinitializationComplete"] = handleInitializationComplete; functionMap["brackets.showStatusInfo"] = showStatusInfo; functionMap["brackets.notifyDownloadSuccess"] = handleDownloadSuccess; functionMap["br...
javascript
function registerBracketsFunctions() { functionMap["brackets.notifyinitializationComplete"] = handleInitializationComplete; functionMap["brackets.showStatusInfo"] = showStatusInfo; functionMap["brackets.notifyDownloadSuccess"] = handleDownloadSuccess; functionMap["br...
[ "function", "registerBracketsFunctions", "(", ")", "{", "functionMap", "[", "\"brackets.notifyinitializationComplete\"", "]", "=", "handleInitializationComplete", ";", "functionMap", "[", "\"brackets.showStatusInfo\"", "]", "=", "showStatusInfo", ";", "functionMap", "[", "\...
Generates a map for brackets side functions
[ "Generates", "a", "map", "for", "brackets", "side", "functions" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/AutoUpdate/main.js#L1098-L1109
train
Registers brackets functions
[ 30522, 3853, 4236, 10024, 19869, 3215, 11263, 27989, 2015, 1006, 1007, 1063, 3853, 2863, 2361, 1031, 1000, 19719, 1012, 2025, 8757, 5498, 20925, 3989, 9006, 10814, 2618, 1000, 1033, 1027, 5047, 5498, 20925, 3989, 9006, 10814, 2618, 1025, 38...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
KaTeX/KaTeX
contrib/mhchem/mhchem.js
function (m, input) { var pattern = mhchemParser.patterns.patterns[m]; if (pattern === undefined) { throw ["MhchemBugP", "mhchem bug P. Please report. (" + m + ")"]; // Trying to use non-existing pattern } else if (typeof pattern === "function") { return mhchemParser.pattern...
javascript
function (m, input) { var pattern = mhchemParser.patterns.patterns[m]; if (pattern === undefined) { throw ["MhchemBugP", "mhchem bug P. Please report. (" + m + ")"]; // Trying to use non-existing pattern } else if (typeof pattern === "function") { return mhchemParser.pattern...
[ "function", "(", "m", ",", "input", ")", "{", "var", "pattern", "=", "mhchemParser", ".", "patterns", ".", "patterns", "[", "m", "]", ";", "if", "(", "pattern", "===", "undefined", ")", "{", "throw", "[", "\"MhchemBugP\"", ",", "\"mhchem bug P. Please repo...
Matching function e.g. match("a", input) will look for the regexp called "a" and see if it matches returns null or {match_:"a", remainder:"bc"}
[ "Matching", "function", "e", ".", "g", ".", "match", "(", "a", "input", ")", "will", "look", "for", "the", "regexp", "called", "a", "and", "see", "if", "it", "matches", "returns", "null", "or", "{", "match_", ":", "a", "remainder", ":", "bc", "}" ]
17bfb247b88070267f3e5c7b21fe4a360fdf49d9
https://github.com/KaTeX/KaTeX/blob/17bfb247b88070267f3e5c7b21fe4a360fdf49d9/contrib/mhchem/mhchem.js#L444-L465
train
returns the match_ and remainder of the input string
[ 30522, 3853, 1006, 1049, 1010, 7953, 1007, 1063, 13075, 5418, 1027, 1049, 16257, 29122, 19362, 8043, 1012, 7060, 1012, 7060, 1031, 1049, 1033, 1025, 2065, 1006, 5418, 1027, 1027, 1027, 6151, 28344, 1007, 1063, 5466, 1031, 1000, 1049, 16257,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
goldfire/howler.js
examples/3d/js/controls.js
function() { // Define our control key codes and states. this.codes = { // Arrows 37: 'left', 39: 'right', 38: 'front', 40: 'back', // WASD 65: 'left', 68: 'right', 87: 'front', 83: 'back', }; this.states = {left: false, right: false, front: false, back: false}; // Setup the DOM listeners. ...
javascript
function() { // Define our control key codes and states. this.codes = { // Arrows 37: 'left', 39: 'right', 38: 'front', 40: 'back', // WASD 65: 'left', 68: 'right', 87: 'front', 83: 'back', }; this.states = {left: false, right: false, front: false, back: false}; // Setup the DOM listeners. ...
[ "function", "(", ")", "{", "// Define our control key codes and states.", "this", ".", "codes", "=", "{", "// Arrows", "37", ":", "'left'", ",", "39", ":", "'right'", ",", "38", ":", "'front'", ",", "40", ":", "'back'", ",", "// WASD", "65", ":", "'left'",...
Defines and handles the various controls.
[ "Defines", "and", "handles", "the", "various", "controls", "." ]
030db918dd8ce640afd57e172418472497e8f113
https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/examples/3d/js/controls.js#L16-L32
train
Initialize the key handling
[ 30522, 3853, 1006, 1007, 1063, 1013, 1013, 9375, 2256, 2491, 3145, 9537, 1998, 2163, 1012, 2023, 1012, 9537, 1027, 1063, 1013, 1013, 12563, 4261, 1024, 1005, 2187, 1005, 1010, 4464, 1024, 1005, 2157, 1005, 1010, 4229, 1024, 1005, 2392, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jhipster/generator-jhipster
generators/utils.js
normalizeBlueprintName
function normalizeBlueprintName(blueprint) { if (blueprint && blueprint.startsWith('@')) { return blueprint; } if (blueprint && !blueprint.startsWith('generator-jhipster')) { return `generator-jhipster-${blueprint}`; } return blueprint; }
javascript
function normalizeBlueprintName(blueprint) { if (blueprint && blueprint.startsWith('@')) { return blueprint; } if (blueprint && !blueprint.startsWith('generator-jhipster')) { return `generator-jhipster-${blueprint}`; } return blueprint; }
[ "function", "normalizeBlueprintName", "(", "blueprint", ")", "{", "if", "(", "blueprint", "&&", "blueprint", ".", "startsWith", "(", "'@'", ")", ")", "{", "return", "blueprint", ";", "}", "if", "(", "blueprint", "&&", "!", "blueprint", ".", "startsWith", "...
Normalize blueprint name: prepend 'generator-jhipster-' if needed @param {string} blueprint - name of the blueprint
[ "Normalize", "blueprint", "name", ":", "prepend", "generator", "-", "jhipster", "-", "if", "needed" ]
6a7d614d6756e003b700d07dad6e4c41b3234502
https://github.com/jhipster/generator-jhipster/blob/6a7d614d6756e003b700d07dad6e4c41b3234502/generators/utils.js#L477-L485
train
Normalize blueprint name
[ 30522, 3853, 3671, 4697, 16558, 5657, 16550, 18442, 1006, 2630, 16550, 1007, 1063, 2065, 1006, 2630, 16550, 1004, 1004, 2630, 16550, 1012, 4627, 24415, 1006, 1005, 1030, 1005, 1007, 1007, 1063, 2709, 2630, 16550, 1025, 1065, 2065, 1006, 263...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.table/src/sap/ui/table/TableGrouping.js
function(oTable, oRow, bChildren, bExpanded, bHidden, bSum, iLevel, sGroupHeaderText) { var oDomRefs = oRow.getDomRefs(true), $Row = oDomRefs.row, $ScrollRow = oDomRefs.rowScrollPart, $FixedRow = oDomRefs.rowFixedPart, $RowHdr = oDomRefs.rowSelector, $RowAct = oDomRefs.rowAction; $Row.attr({ ...
javascript
function(oTable, oRow, bChildren, bExpanded, bHidden, bSum, iLevel, sGroupHeaderText) { var oDomRefs = oRow.getDomRefs(true), $Row = oDomRefs.row, $ScrollRow = oDomRefs.rowScrollPart, $FixedRow = oDomRefs.rowFixedPart, $RowHdr = oDomRefs.rowSelector, $RowAct = oDomRefs.rowAction; $Row.attr({ ...
[ "function", "(", "oTable", ",", "oRow", ",", "bChildren", ",", "bExpanded", ",", "bHidden", ",", "bSum", ",", "iLevel", ",", "sGroupHeaderText", ")", "{", "var", "oDomRefs", "=", "oRow", ".", "getDomRefs", "(", "true", ")", ",", "$Row", "=", "oDomRefs", ...
Updates the dom of the given row depending on the given parameters. @param {sap.ui.table.Table} oTable Instance of the table. @param {sap.ui.table.Row} oRow Instance of the row. @param {boolean} bChildren Whether the row is a group (has children). @param {boolean} bExpanded Whether the row should be expanded. @param {...
[ "Updates", "the", "dom", "of", "the", "given", "row", "depending", "on", "the", "given", "parameters", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableGrouping.js#L353-L414
train
Sets the class of the table row
[ 30522, 3853, 1006, 27178, 3085, 1010, 20298, 2860, 1010, 4647, 19466, 16200, 2078, 1010, 2022, 2595, 9739, 5732, 1010, 1038, 27511, 4181, 1010, 18667, 2819, 1010, 17869, 15985, 1010, 22214, 22107, 4974, 8743, 10288, 2102, 1007, 1063, 13075, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
lovell/sharp
lib/output.js
jpeg
function jpeg (options) { if (is.object(options)) { if (is.defined(options.quality)) { if (is.integer(options.quality) && is.inRange(options.quality, 1, 100)) { this.options.jpegQuality = options.quality; } else { throw new Error('Invalid quality (integer, 1-100) ' + options.quality); ...
javascript
function jpeg (options) { if (is.object(options)) { if (is.defined(options.quality)) { if (is.integer(options.quality) && is.inRange(options.quality, 1, 100)) { this.options.jpegQuality = options.quality; } else { throw new Error('Invalid quality (integer, 1-100) ' + options.quality); ...
[ "function", "jpeg", "(", "options", ")", "{", "if", "(", "is", ".", "object", "(", "options", ")", ")", "{", "if", "(", "is", ".", "defined", "(", "options", ".", "quality", ")", ")", "{", "if", "(", "is", ".", "integer", "(", "options", ".", "...
Use these JPEG options for output image. @example // Convert any input to very high quality JPEG output const data = await sharp(input) .jpeg({ quality: 100, chromaSubsampling: '4:4:4' }) .toBuffer(); @param {Object} [options] - output options @param {Number} [options.quality=80] - quality, integer 1-100 @param {Bool...
[ "Use", "these", "JPEG", "options", "for", "output", "image", "." ]
05d76eeadfe54713606a615185b2da047923406b
https://github.com/lovell/sharp/blob/05d76eeadfe54713606a615185b2da047923406b/lib/output.js#L159-L206
train
Set JPEG parameters
[ 30522, 3853, 16545, 13910, 1006, 7047, 1007, 1063, 2065, 1006, 2003, 1012, 4874, 30524, 1012, 3737, 1010, 1015, 1010, 2531, 1007, 1007, 1063, 2023, 1012, 7047, 1012, 16545, 13910, 26426, 3012, 1027, 7047, 1012, 3737, 1025, 1065, 2842, 1063,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
markdown-it/markdown-it
lib/parser_core.js
Core
function Core() { /** * Core#ruler -> Ruler * * [[Ruler]] instance. Keep configuration of core rules. **/ this.ruler = new Ruler(); for (var i = 0; i < _rules.length; i++) { this.ruler.push(_rules[i][0], _rules[i][1]); } }
javascript
function Core() { /** * Core#ruler -> Ruler * * [[Ruler]] instance. Keep configuration of core rules. **/ this.ruler = new Ruler(); for (var i = 0; i < _rules.length; i++) { this.ruler.push(_rules[i][0], _rules[i][1]); } }
[ "function", "Core", "(", ")", "{", "/**\n * Core#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of core rules.\n **/", "this", ".", "ruler", "=", "new", "Ruler", "(", ")", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "_rules", ".", ...
new Core()
[ "new", "Core", "()" ]
ba6830ba13fb92953a91fb90318964ccd15b82c4
https://github.com/markdown-it/markdown-it/blob/ba6830ba13fb92953a91fb90318964ccd15b82c4/lib/parser_core.js#L26-L37
train
Core class.
[ 30522, 3853, 4563, 1006, 1007, 1063, 1013, 1008, 1008, 1008, 4563, 1001, 7786, 1011, 1028, 7786, 1008, 1008, 1031, 1031, 7786, 1033, 1033, 6013, 1012, 2562, 9563, 1997, 4563, 3513, 1012, 1008, 1008, 1013, 2023, 1012, 7786, 1027, 2047, 778...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/BlockLayerUtils.js
fnHandleInteraction
function fnHandleInteraction (bEnabled) { if (bEnabled) { var oParentDOM = this.$parent.get(0); if (oParentDOM){ // Those two elements handle the tab chain so it is not possible to tab behind the busy section. this.fnRedirectFocus = redirectFocus.bind(this); this.oTabbableBefore = createTabbable(th...
javascript
function fnHandleInteraction (bEnabled) { if (bEnabled) { var oParentDOM = this.$parent.get(0); if (oParentDOM){ // Those two elements handle the tab chain so it is not possible to tab behind the busy section. this.fnRedirectFocus = redirectFocus.bind(this); this.oTabbableBefore = createTabbable(th...
[ "function", "fnHandleInteraction", "(", "bEnabled", ")", "{", "if", "(", "bEnabled", ")", "{", "var", "oParentDOM", "=", "this", ".", "$parent", ".", "get", "(", "0", ")", ";", "if", "(", "oParentDOM", ")", "{", "// Those two elements handle the tab chain so i...
Suppress interactions on all DOM elements in the blocked section. Starting with the fnHandleInteraction call, all following function calls are bound in the context of the block-state object. Meaning "this" will always reference the block-state object. @param {boolean} bEnabled New blocked state @private
[ "Suppress", "interactions", "on", "all", "DOM", "elements", "in", "the", "blocked", "section", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/BlockLayerUtils.js#L176-L334
train
Handles the interaction event on the DOMRef.
[ 30522, 3853, 1042, 25311, 5685, 19856, 14621, 7542, 1006, 3841, 3085, 2094, 1007, 1063, 2065, 1006, 3841, 3085, 2094, 1007, 1063, 13075, 6728, 12069, 3372, 9527, 1027, 2023, 1012, 1002, 6687, 1012, 2131, 1006, 1014, 1007, 1025, 2065, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/core/services/interimElement/interimElement.js
createAndTransitionIn
function createAndTransitionIn() { return $q(function(resolve, reject) { // Trigger onCompiling callback before the compilation starts. // This is useful, when modifying options, which can be influenced by developers. options.onCompiling && options.onCompiling(options); ...
javascript
function createAndTransitionIn() { return $q(function(resolve, reject) { // Trigger onCompiling callback before the compilation starts. // This is useful, when modifying options, which can be influenced by developers. options.onCompiling && options.onCompiling(options); ...
[ "function", "createAndTransitionIn", "(", ")", "{", "return", "$q", "(", "function", "(", "resolve", ",", "reject", ")", "{", "// Trigger onCompiling callback before the compilation starts.", "// This is useful, when modifying options, which can be influenced by developers.", "opti...
Compile, link, and show this interim element Use optional autoHided and transition-in effects
[ "Compile", "link", "and", "show", "this", "interim", "element", "Use", "optional", "autoHided", "and", "transition", "-", "in", "effects" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/services/interimElement/interimElement.js#L492-L518
train
Creates a promise that will be resolved when the element is not yet rendered.
[ 30522, 3853, 3443, 5685, 6494, 3619, 22753, 2378, 1006, 1007, 1063, 2709, 1002, 1053, 1006, 3853, 1006, 10663, 1010, 15454, 1007, 1063, 1013, 1013, 9495, 2006, 9006, 8197, 2989, 2655, 5963, 2077, 1996, 6268, 4627, 1012, 1013, 1013, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
nhn/tui.editor
src/js/extensions/mark/viewerMarkerHelper.js
getRange
function getRange() { const selection = window.getSelection(); let range; if (selection && selection.rangeCount) { range = selection.getRangeAt(0).cloneRange(); } else { range = document.createRange(); range.selectNodeContents(this.preview.$el[0]); range.collapse(true); } return range; }
javascript
function getRange() { const selection = window.getSelection(); let range; if (selection && selection.rangeCount) { range = selection.getRangeAt(0).cloneRange(); } else { range = document.createRange(); range.selectNodeContents(this.preview.$el[0]); range.collapse(true); } return range; }
[ "function", "getRange", "(", ")", "{", "const", "selection", "=", "window", ".", "getSelection", "(", ")", ";", "let", "range", ";", "if", "(", "selection", "&&", "selection", ".", "rangeCount", ")", "{", "range", "=", "selection", ".", "getRangeAt", "("...
getRange get current range @returns {Range} @ignore
[ "getRange", "get", "current", "range" ]
e75ab08c2a7ab07d1143e318f7cde135c5e3002e
https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/extensions/mark/viewerMarkerHelper.js#L207-L220
train
Get the range of the preview element
[ 30522, 3853, 2131, 24388, 2063, 1006, 1007, 1063, 9530, 3367, 4989, 1027, 3332, 1012, 4152, 12260, 7542, 1006, 1007, 1025, 2292, 2846, 1025, 2065, 1006, 4989, 1004, 1004, 4989, 1012, 2846, 3597, 16671, 1007, 1063, 2846, 1027, 4989, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
javascript/node/selenium-webdriver/lib/webdriver.js
fromWireValue
function fromWireValue(driver, value) { if (Array.isArray(value)) { value = value.map(v => fromWireValue(driver, v)); } else if (WebElement.isId(value)) { let id = WebElement.extractId(value); value = new WebElement(driver, id); } else if (value && typeof value === 'object') { let result = {}; ...
javascript
function fromWireValue(driver, value) { if (Array.isArray(value)) { value = value.map(v => fromWireValue(driver, v)); } else if (WebElement.isId(value)) { let id = WebElement.extractId(value); value = new WebElement(driver, id); } else if (value && typeof value === 'object') { let result = {}; ...
[ "function", "fromWireValue", "(", "driver", ",", "value", ")", "{", "if", "(", "Array", ".", "isArray", "(", "value", ")", ")", "{", "value", "=", "value", ".", "map", "(", "v", "=>", "fromWireValue", "(", "driver", ",", "v", ")", ")", ";", "}", ...
Converts a value from its JSON representation according to the WebDriver wire protocol. Any JSON object that defines a WebElement ID will be decoded to a {@link WebElement} object. All other values will be passed through as is. @param {!WebDriver} driver The driver to use as the parent of any unwrapped {@link WebEleme...
[ "Converts", "a", "value", "from", "its", "JSON", "representation", "according", "to", "the", "WebDriver", "wire", "protocol", ".", "Any", "JSON", "object", "that", "defines", "a", "WebElement", "ID", "will", "be", "decoded", "to", "a", "{", "@link", "WebElem...
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/lib/webdriver.js#L206-L222
train
Converts a value from a wire format to a WebElement
[ 30522, 3853, 2013, 20357, 10175, 5657, 1006, 4062, 1010, 3643, 1007, 1063, 2065, 1006, 9140, 1012, 18061, 11335, 2100, 1006, 3643, 1007, 1007, 1063, 3643, 1027, 3643, 1012, 4949, 1006, 1058, 1027, 1028, 2013, 20357, 10175, 5657, 1006, 4062,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/jszip.js
function(file) { var result = getRawData(file), type = utils.getTypeOf(result); if (type === "string") { if (!file.options.binary) { // unicode text ! // unicode string => binary string is a painful process, check if we can avoid it. if (textEncoder) { ...
javascript
function(file) { var result = getRawData(file), type = utils.getTypeOf(result); if (type === "string") { if (!file.options.binary) { // unicode text ! // unicode string => binary string is a painful process, check if we can avoid it. if (textEncoder) { ...
[ "function", "(", "file", ")", "{", "var", "result", "=", "getRawData", "(", "file", ")", ",", "type", "=", "utils", ".", "getTypeOf", "(", "result", ")", ";", "if", "(", "type", "===", "\"string\"", ")", "{", "if", "(", "!", "file", ".", "options",...
Returns the data of a ZipObject in a binary form. If the content is an unicode string, encode it. @param {ZipObject} file the file to use. @return {String|ArrayBuffer|Uint8Array|Buffer} the data.
[ "Returns", "the", "data", "of", "a", "ZipObject", "in", "a", "binary", "form", ".", "If", "the", "content", "is", "an", "unicode", "string", "encode", "it", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/jszip.js#L398-L415
train
get the raw data of a file
[ 30522, 3853, 1006, 5371, 1007, 1063, 13075, 2765, 1027, 2131, 2527, 21724, 6790, 1006, 5371, 1007, 1010, 2828, 1027, 21183, 12146, 1012, 2131, 13874, 11253, 1006, 2765, 1007, 1025, 2065, 1006, 2828, 1027, 1027, 1027, 1000, 5164, 1000, 1007,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/NavigationAndHistory/main.js
_addToMROFList
function _addToMROFList(file, paneId, cursorPos) { var filePath = file.fullPath; if (!paneId) { // Don't handle this if not a full view/editor return; } // Check existing list for this doc path and pane entry var index = _.findIndex(_mrofList, function (re...
javascript
function _addToMROFList(file, paneId, cursorPos) { var filePath = file.fullPath; if (!paneId) { // Don't handle this if not a full view/editor return; } // Check existing list for this doc path and pane entry var index = _.findIndex(_mrofList, function (re...
[ "function", "_addToMROFList", "(", "file", ",", "paneId", ",", "cursorPos", ")", "{", "var", "filePath", "=", "file", ".", "fullPath", ";", "if", "(", "!", "paneId", ")", "{", "// Don't handle this if not a full view/editor", "return", ";", "}", "// Check existi...
Adds an entry to MROF list @private @param {Editor} editor - editor to extract file information
[ "Adds", "an", "entry", "to", "MROF", "list" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/NavigationAndHistory/main.js#L579-L618
train
Add a file to the MROF list
[ 30522, 3853, 1035, 5587, 20389, 3217, 10258, 2923, 1006, 5371, 1010, 6090, 7416, 2094, 1010, 12731, 25301, 14536, 2891, 1007, 1063, 13075, 5371, 15069, 1027, 5371, 1012, 2440, 15069, 1025, 2065, 1006, 999, 6090, 7416, 2094, 1007, 1063, 1013...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
goldfire/howler.js
dist/howler.js
function(from, to, len, id) { var self = this; // If the sound hasn't loaded, add it to the load queue to fade when capable. if (self._state !== 'loaded' || self._playLock) { self._queue.push({ event: 'fade', action: function() { self.fade(from, to, len, id); ...
javascript
function(from, to, len, id) { var self = this; // If the sound hasn't loaded, add it to the load queue to fade when capable. if (self._state !== 'loaded' || self._playLock) { self._queue.push({ event: 'fade', action: function() { self.fade(from, to, len, id); ...
[ "function", "(", "from", ",", "to", ",", "len", ",", "id", ")", "{", "var", "self", "=", "this", ";", "// If the sound hasn't loaded, add it to the load queue to fade when capable.", "if", "(", "self", ".", "_state", "!==", "'loaded'", "||", "self", ".", "_playL...
Fade a currently playing sound between two volumes (if no id is passsed, all sounds will fade). @param {Number} from The value to fade from (0.0 to 1.0). @param {Number} to The volume to fade to (0.0 to 1.0). @param {Number} len Time in milliseconds to fade. @param {Number} id The sound id (omit to fade all so...
[ "Fade", "a", "currently", "playing", "sound", "between", "two", "volumes", "(", "if", "no", "id", "is", "passsed", "all", "sounds", "will", "fade", ")", "." ]
030db918dd8ce640afd57e172418472497e8f113
https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/dist/howler.js#L1261-L1311
train
Fade the sound at the specified location.
[ 30522, 3853, 1006, 2013, 1010, 2000, 1010, 18798, 1010, 8909, 1007, 1063, 13075, 2969, 1027, 2023, 1025, 1013, 1013, 2065, 1996, 2614, 8440, 1005, 1056, 8209, 1010, 5587, 2009, 2000, 30524, 5245, 1006, 1063, 2724, 1024, 1005, 12985, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jantimon/html-webpack-plugin
lib/compiler.js
clearCache
function clearCache (mainCompiler) { const childCompiler = getChildCompiler(mainCompiler); // If this childCompiler was already used // remove the entire childCompiler from the cache if (childCompiler.isCompiling() || childCompiler.didCompile()) { childCompilerCache.delete(mainCompiler); } }
javascript
function clearCache (mainCompiler) { const childCompiler = getChildCompiler(mainCompiler); // If this childCompiler was already used // remove the entire childCompiler from the cache if (childCompiler.isCompiling() || childCompiler.didCompile()) { childCompilerCache.delete(mainCompiler); } }
[ "function", "clearCache", "(", "mainCompiler", ")", "{", "const", "childCompiler", "=", "getChildCompiler", "(", "mainCompiler", ")", ";", "// If this childCompiler was already used", "// remove the entire childCompiler from the cache", "if", "(", "childCompiler", ".", "isCom...
Remove the childCompiler from the cache @param {WebpackCompiler} mainCompiler
[ "Remove", "the", "childCompiler", "from", "the", "cache" ]
38db64ae8805de37d038e0ee0f6dfa2a26e2163a
https://github.com/jantimon/html-webpack-plugin/blob/38db64ae8805de37d038e0ee0f6dfa2a26e2163a/lib/compiler.js#L225-L232
train
Clear the cache for a given mainCompiler
[ 30522, 3853, 3154, 3540, 5403, 1006, 2364, 9006, 22090, 2099, 1007, 1063, 9530, 3367, 2775, 9006, 22090, 2099, 1027, 2131, 19339, 9006, 22090, 2099, 1006, 2364, 9006, 22090, 2099, 1007, 1025, 1013, 1013, 2065, 2023, 2775, 9006, 22090, 2099,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(aDimensionName) { if (!aDimensionName) { return; } this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties for (var i = -1, sDimName; (sDimName = aDimensionName[++i]) !== undefined;) { if (!this._oQueryResult.findDimensionByName(sDimName)) { throw...
javascript
function(aDimensionName) { if (!aDimensionName) { return; } this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties for (var i = -1, sDimName; (sDimName = aDimensionName[++i]) !== undefined;) { if (!this._oQueryResult.findDimensionByName(sDimName)) { throw...
[ "function", "(", "aDimensionName", ")", "{", "if", "(", "!", "aDimensionName", ")", "{", "return", ";", "}", "this", ".", "_oSelectedPropertyNames", "=", "null", ";", "// reset previously compiled list of selected properties", "for", "(", "var", "i", "=", "-", "...
Remove one or more dimensions from the aggregation level. The method also removed a potential sort expression on the dimension. @param aDimensionName Array of dimension names to be removed from the already defined aggregation level. @public @function @name sap.ui.model.analytics.odata4analytics.QueryResultRequest#remo...
[ "Remove", "one", "or", "more", "dimensions", "from", "the", "aggregation", "level", ".", "The", "method", "also", "removed", "a", "potential", "sort", "expression", "on", "the", "dimension", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L4230-L4247
train
Removes the aggregation level for a dimension
[ 30522, 3853, 1006, 27133, 3549, 10992, 18442, 1007, 1063, 2065, 1006, 999, 27133, 3549, 10992, 18442, 1007, 1063, 2709, 1025, 1065, 2023, 1012, 1035, 9808, 12260, 10985, 21572, 4842, 25680, 14074, 2015, 1027, 19701, 1025, 1013, 1013, 25141, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
goldfire/howler.js
examples/3d/js/camera.js
function(height, angle, dist) { var z = dist * Math.cos(angle); var wallH = this.height * height / z; var bottom = this.height / 2 * (1 + 1 / z); return { top: bottom - wallH, height: wallH }; }
javascript
function(height, angle, dist) { var z = dist * Math.cos(angle); var wallH = this.height * height / z; var bottom = this.height / 2 * (1 + 1 / z); return { top: bottom - wallH, height: wallH }; }
[ "function", "(", "height", ",", "angle", ",", "dist", ")", "{", "var", "z", "=", "dist", "*", "Math", ".", "cos", "(", "angle", ")", ";", "var", "wallH", "=", "this", ".", "height", "*", "height", "/", "z", ";", "var", "bottom", "=", "this", "....
Based on the angle and distance, determine how we are going to project the image. @param {Number} height Wall piece height. @param {Number} angle Angle of the ray. @param {Number} dist Distnace from the player. @return {Object} top and height
[ "Based", "on", "the", "angle", "and", "distance", "determine", "how", "we", "are", "going", "to", "project", "the", "image", "." ]
030db918dd8ce640afd57e172418472497e8f113
https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/examples/3d/js/camera.js#L143-L152
train
Compute the top and height of the line
[ 30522, 3853, 1006, 4578, 1010, 6466, 1010, 4487, 3367, 1007, 1063, 13075, 1062, 1027, 4487, 3367, 1008, 8785, 1012, 2522, 2015, 1006, 6466, 1007, 1025, 13075, 2813, 2232, 1027, 2023, 1012, 4578, 1008, 4578, 1013, 1062, 1025, 13075, 3953, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/v4/ODataListBinding.js
replaceLambdaVariables
function replaceLambdaVariables(sPath, mLambdaVariableToPath) { var aSegments = sPath.split("/"); aSegments[0] = mLambdaVariableToPath[aSegments[0]]; return aSegments[0] ? aSegments.join("/") : sPath; }
javascript
function replaceLambdaVariables(sPath, mLambdaVariableToPath) { var aSegments = sPath.split("/"); aSegments[0] = mLambdaVariableToPath[aSegments[0]]; return aSegments[0] ? aSegments.join("/") : sPath; }
[ "function", "replaceLambdaVariables", "(", "sPath", ",", "mLambdaVariableToPath", ")", "{", "var", "aSegments", "=", "sPath", ".", "split", "(", "\"/\"", ")", ";", "aSegments", "[", "0", "]", "=", "mLambdaVariableToPath", "[", "aSegments", "[", "0", "]", "]"...
Replaces an optional lambda variable in the first segment of the given path by the correct path. @param {string} sPath The path with an optional lambda variable at the beginning @param {object} mLambdaVariableToPath The map from lambda variable to full path @returns {string} The path with replaced lambda variable
[ "Replaces", "an", "optional", "lambda", "variable", "in", "the", "first", "segment", "of", "the", "given", "path", "by", "the", "correct", "path", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/ODataListBinding.js#L968-L973
train
Replaces the given path with the corresponding value in the given map.
[ 30522, 3853, 5672, 10278, 2497, 29045, 10980, 13510, 1006, 14690, 2232, 1010, 18619, 14905, 29045, 10980, 3468, 14399, 8988, 1007, 1063, 13075, 2004, 13910, 8163, 1027, 14690, 2232, 1012, 3975, 1006, 1000, 1013, 1000, 1007, 1025, 2004, 13910,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-echarts
src/scale/Log.js
function (opt) { intervalScaleProto.niceExtent.call(this, opt); var originalScale = this._originalScale; originalScale.__fixMin = opt.fixMin; originalScale.__fixMax = opt.fixMax; }
javascript
function (opt) { intervalScaleProto.niceExtent.call(this, opt); var originalScale = this._originalScale; originalScale.__fixMin = opt.fixMin; originalScale.__fixMax = opt.fixMax; }
[ "function", "(", "opt", ")", "{", "intervalScaleProto", ".", "niceExtent", ".", "call", "(", "this", ",", "opt", ")", ";", "var", "originalScale", "=", "this", ".", "_originalScale", ";", "originalScale", ".", "__fixMin", "=", "opt", ".", "fixMin", ";", ...
Nice extent. @override
[ "Nice", "extent", "." ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/scale/Log.js#L181-L187
train
This method is called by the base class to determine the extent of the interval.
[ 30522, 3853, 1006, 23569, 1007, 1063, 14025, 9289, 13699, 21709, 2080, 1012, 3835, 10288, 6528, 2102, 1012, 2655, 1006, 2023, 1010, 23569, 1007, 1025, 13075, 23728, 9289, 2063, 1027, 2023, 1012, 1035, 23728, 9289, 2063, 1025, 23728, 9289, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...