repo
stringclasses
192 values
path
stringlengths
4
115
func_name
stringlengths
0
45
original_string
stringlengths
74
24k
language
stringclasses
1 value
code
stringlengths
74
24k
code_tokens
listlengths
23
4.2k
docstring
stringlengths
2
23.7k
docstring_tokens
listlengths
1
810
sha
stringclasses
192 values
url
stringlengths
90
200
partition
stringclasses
1 value
summary
stringlengths
6
313
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
adobe/brackets
src/extensibility/ExtensionManager.js
synchronizeEntry
function synchronizeEntry(id) { var entry = extensions[id]; // Do nothing if we only have one set of data if (!entry || !entry.installInfo || !entry.registryInfo) { return; } entry.installInfo.owner = entry.registryInfo.owner; // Assume false entry....
javascript
function synchronizeEntry(id) { var entry = extensions[id]; // Do nothing if we only have one set of data if (!entry || !entry.installInfo || !entry.registryInfo) { return; } entry.installInfo.owner = entry.registryInfo.owner; // Assume false entry....
[ "function", "synchronizeEntry", "(", "id", ")", "{", "var", "entry", "=", "extensions", "[", "id", "]", ";", "// Do nothing if we only have one set of data", "if", "(", "!", "entry", "||", "!", "entry", ".", "installInfo", "||", "!", "entry", ".", "registryInf...
@private Synchronizes the information between the public registry and the installed extensions. Specifically, this makes the `owner` available in each and sets an `updateAvailable` flag. @param {string} id of the extension to synchronize
[ "@private", "Synchronizes", "the", "information", "between", "the", "public", "registry", "and", "the", "installed", "extensions", ".", "Specifically", "this", "makes", "the", "owner", "available", "in", "each", "and", "sets", "an", "updateAvailable", "flag", "." ...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensibility/ExtensionManager.js#L123-L157
train
Synchronize the registry with the current version of the extension
[ 30522, 3853, 26351, 8093, 10698, 23940, 3372, 2854, 1006, 8909, 1007, 1063, 13075, 4443, 1027, 14305, 1031, 30524, 4443, 1012, 16500, 2378, 14876, 1064, 1064, 999, 4443, 1012, 15584, 2378, 14876, 1007, 1063, 2709, 1025, 1065, 4443, 1012, 16...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/parallelPreprocessor.js
mergeAxisOptionFromParallel
function mergeAxisOptionFromParallel(option) { var axes = modelUtil.normalizeToArray(option.parallelAxis); zrUtil.each(axes, function (axisOption) { if (!zrUtil.isObject(axisOption)) { return; } var parallelIndex = axisOption.parallelIndex || 0; var parallelOption =...
javascript
function mergeAxisOptionFromParallel(option) { var axes = modelUtil.normalizeToArray(option.parallelAxis); zrUtil.each(axes, function (axisOption) { if (!zrUtil.isObject(axisOption)) { return; } var parallelIndex = axisOption.parallelIndex || 0; var parallelOption =...
[ "function", "mergeAxisOptionFromParallel", "(", "option", ")", "{", "var", "axes", "=", "modelUtil", ".", "normalizeToArray", "(", "option", ".", "parallelAxis", ")", ";", "zrUtil", ".", "each", "(", "axes", ",", "function", "(", "axisOption", ")", "{", "if"...
Merge aixs definition from parallel option (if exists) to axis option. @inner
[ "Merge", "aixs", "definition", "from", "parallel", "option", "(", "if", "exists", ")", "to", "axis", "option", "." ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/coord/parallel/parallelPreprocessor.js#L54-L69
train
Merge parallel axis option from parallel option
[ 30522, 3853, 13590, 8528, 19565, 16790, 19699, 25377, 5400, 6216, 2140, 1006, 5724, 1007, 1063, 13075, 19589, 1027, 2944, 21823, 2140, 1012, 3671, 4697, 3406, 2906, 9447, 1006, 5724, 1012, 5903, 8528, 2483, 1007, 1025, 1062, 22134, 4014, 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/AnnotationHelper.js
function (sPath) { var iIndexOfAt; if (!sPath || sPath[0] === "@") { return ""; } if (rCount.test(sPath)) { return sPath.slice(0, -7); } iIndexOfAt = sPath.indexOf("@"); if (iIndexOfAt > -1) { sPath = sPath.slice(0, iIndexOfAt); } if (sPath[sPath.length - 1] === "/"...
javascript
function (sPath) { var iIndexOfAt; if (!sPath || sPath[0] === "@") { return ""; } if (rCount.test(sPath)) { return sPath.slice(0, -7); } iIndexOfAt = sPath.indexOf("@"); if (iIndexOfAt > -1) { sPath = sPath.slice(0, iIndexOfAt); } if (sPath[sPath.length - 1] === "/"...
[ "function", "(", "sPath", ")", "{", "var", "iIndexOfAt", ";", "if", "(", "!", "sPath", "||", "sPath", "[", "0", "]", "===", "\"@\"", ")", "{", "return", "\"\"", ";", "}", "if", "(", "rCount", ".", "test", "(", "sPath", ")", ")", "{", "return", ...
A function that helps to interpret OData V4 annotations. It knows about the syntax of the path value used by the following dynamic expressions: <ul> <li>"14.5.2 Expression edm:AnnotationPath"</li> <li>"14.5.11 Expression edm:NavigationPropertyPath"</li> <li>"14.5.12 Expression edm:Path"</li> <li>"14.5.13 Expression edm...
[ "A", "function", "that", "helps", "to", "interpret", "OData", "V4", "annotations", ".", "It", "knows", "about", "the", "syntax", "of", "the", "path", "value", "used", "by", "the", "following", "dynamic", "expressions", ":", "<ul", ">", "<li", ">", "14", ...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/AnnotationHelper.js#L274-L301
train
Returns the path of the node
[ 30522, 3853, 1006, 14690, 2232, 1007, 1063, 13075, 2462, 13629, 2595, 11253, 4017, 1025, 2065, 1006, 999, 14690, 2232, 1064, 1064, 14690, 2232, 1031, 1014, 1033, 1027, 1027, 1027, 1000, 1030, 1000, 1007, 1063, 2709, 1000, 1000, 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...
angular/material
src/components/tooltip/tooltip.js
globalEventHandler
function globalEventHandler(event) { if (listeners[event.type]) { listeners[event.type].forEach(function(currentHandler) { currentHandler.call(this, event); }, this); } }
javascript
function globalEventHandler(event) { if (listeners[event.type]) { listeners[event.type].forEach(function(currentHandler) { currentHandler.call(this, event); }, this); } }
[ "function", "globalEventHandler", "(", "event", ")", "{", "if", "(", "listeners", "[", "event", ".", "type", "]", ")", "{", "listeners", "[", "event", ".", "type", "]", ".", "forEach", "(", "function", "(", "currentHandler", ")", "{", "currentHandler", "...
Global event handler that dispatches the registered handlers in the service. @param {!Event} event Event object passed in by the browser
[ "Global", "event", "handler", "that", "dispatches", "the", "registered", "handlers", "in", "the", "service", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/tooltip/tooltip.js#L437-L443
train
Global event handler
[ 30522, 3853, 3795, 18697, 3372, 11774, 3917, 1006, 2724, 1007, 1063, 2065, 1006, 13810, 1031, 2724, 1012, 2828, 1033, 1007, 1063, 13810, 1031, 2724, 1012, 2828, 1033, 1012, 18921, 6776, 1006, 3853, 1006, 2783, 11774, 3917, 1007, 1063, 2783,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/features/ParameterHintsManager.js
formatHint
function formatHint(hints) { $hintContent.empty(); $hintContent.addClass("brackets-hints"); function appendSeparators(separators) { $hintContent.append(separators); } function appendParameter(param, documentation, index) { if (hints.currentIndex === inde...
javascript
function formatHint(hints) { $hintContent.empty(); $hintContent.addClass("brackets-hints"); function appendSeparators(separators) { $hintContent.append(separators); } function appendParameter(param, documentation, index) { if (hints.currentIndex === inde...
[ "function", "formatHint", "(", "hints", ")", "{", "$hintContent", ".", "empty", "(", ")", ";", "$hintContent", ".", "addClass", "(", "\"brackets-hints\"", ")", ";", "function", "appendSeparators", "(", "separators", ")", "{", "$hintContent", ".", "append", "("...
Bold the parameter at the caret. @param {{inFunctionCall: boolean, functionCallPos: {line: number, ch: number}}} functionInfo - tells if the caret is in a function call and the position of the function call.
[ "Bold", "the", "parameter", "at", "the", "caret", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/features/ParameterHintsManager.js#L199-L224
train
Format hint
[ 30522, 3853, 4289, 10606, 2102, 1006, 20385, 1007, 1063, 1002, 9374, 8663, 6528, 2102, 1012, 4064, 1006, 1007, 1025, 1002, 9374, 8663, 6528, 2102, 1012, 5587, 26266, 1006, 1000, 19719, 1011, 20385, 1000, 1007, 1025, 3853, 10439, 10497, 3366...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/noclobber.js
prototypeMethodOrNull
function prototypeMethodOrNull(className, method) { var ctor = goog.global[className]; return (ctor && ctor.prototype && ctor.prototype[method]) || null; }
javascript
function prototypeMethodOrNull(className, method) { var ctor = goog.global[className]; return (ctor && ctor.prototype && ctor.prototype[method]) || null; }
[ "function", "prototypeMethodOrNull", "(", "className", ",", "method", ")", "{", "var", "ctor", "=", "goog", ".", "global", "[", "className", "]", ";", "return", "(", "ctor", "&&", "ctor", ".", "prototype", "&&", "ctor", ".", "prototype", "[", "method", "...
Shorthand for `DOMInterface.prototype.method` to improve readability during initialization of `Methods`. @param {string} className @param {string} method @return {?Function}
[ "Shorthand", "for", "DOMInterface", ".", "prototype", ".", "method", "to", "improve", "readability", "during", "initialization", "of", "Methods", "." ]
97390e9ca4483cebb9628e06026139fbb3023d65
https://github.com/google/closure-library/blob/97390e9ca4483cebb9628e06026139fbb3023d65/closure/goog/html/sanitizer/noclobber.js#L73-L76
train
Returns the prototype method of the given class or method.
[ 30522, 3853, 8773, 11368, 6806, 7983, 11231, 3363, 1006, 2465, 18442, 1010, 4118, 1007, 1063, 13075, 14931, 2953, 1027, 27571, 2290, 1012, 3795, 1031, 2465, 18442, 1033, 1025, 2709, 1006, 14931, 2953, 1004, 1004, 14931, 2953, 1012, 8773, 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...
ReactiveX/rxjs
docs_app/src/app/search/search-worker.js
createIndex
function createIndex(addFn) { return lunr(/** @this */function() { this.pipeline.remove(lunr.stopWordFilter); this.ref('path'); this.field('titleWords', {boost: 100}); this.field('headingWords', {boost: 50}); this.field('members', {boost: 40}); this.field('keywords', {boost: 20}); addFn(th...
javascript
function createIndex(addFn) { return lunr(/** @this */function() { this.pipeline.remove(lunr.stopWordFilter); this.ref('path'); this.field('titleWords', {boost: 100}); this.field('headingWords', {boost: 50}); this.field('members', {boost: 40}); this.field('keywords', {boost: 20}); addFn(th...
[ "function", "createIndex", "(", "addFn", ")", "{", "return", "lunr", "(", "/** @this */", "function", "(", ")", "{", "this", ".", "pipeline", ".", "remove", "(", "lunr", ".", "stopWordFilter", ")", ";", "this", ".", "ref", "(", "'path'", ")", ";", "thi...
Create the lunr index - the docs should be an array of objects, each object containing the path and search terms for a page
[ "Create", "the", "lunr", "index", "-", "the", "docs", "should", "be", "an", "array", "of", "objects", "each", "object", "containing", "the", "path", "and", "search", "terms", "for", "a", "page" ]
1037a1d1e6b80c7218e7ffdf8c0d96a612653a4f
https://github.com/ReactiveX/rxjs/blob/1037a1d1e6b80c7218e7ffdf8c0d96a612653a4f/docs_app/src/app/search/search-worker.js#L29-L39
train
Creates an index function for the lunr object.
[ 30522, 3853, 3443, 22254, 10288, 1006, 5587, 2546, 2078, 1007, 1063, 2709, 11320, 16118, 1006, 1013, 1008, 1008, 1030, 2023, 1008, 1013, 3853, 1006, 1007, 1063, 2023, 1012, 13117, 1012, 6366, 1006, 11320, 16118, 1012, 2644, 18351, 8873, 219...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
getinsomnia/insomnia
packages/insomnia-importers/src/importers/swagger2.js
prepareBody
function prepareBody(endpointSchema, globalMimeTypes) { const mimeTypes = endpointSchema.consumes || globalMimeTypes || []; const isAvailable = m => mimeTypes.includes(m); const supportedMimeType = SUPPORTED_MIME_TYPES.find(isAvailable); if (supportedMimeType === MIMETYPE_JSON) { const isSendInBody = p => ...
javascript
function prepareBody(endpointSchema, globalMimeTypes) { const mimeTypes = endpointSchema.consumes || globalMimeTypes || []; const isAvailable = m => mimeTypes.includes(m); const supportedMimeType = SUPPORTED_MIME_TYPES.find(isAvailable); if (supportedMimeType === MIMETYPE_JSON) { const isSendInBody = p => ...
[ "function", "prepareBody", "(", "endpointSchema", ",", "globalMimeTypes", ")", "{", "const", "mimeTypes", "=", "endpointSchema", ".", "consumes", "||", "globalMimeTypes", "||", "[", "]", ";", "const", "isAvailable", "=", "m", "=>", "mimeTypes", ".", "includes", ...
Imports insomnia request body definitions, including data mock (if available) If multiple types are available, the one for which an example can be generated will be selected first (i.e. application/json) @param {Object} endpointSchema - swagger 2.0 endpoint schema @param {string[]} globalMimeTypes - list of mimeTypes...
[ "Imports", "insomnia", "request", "body", "definitions", "including", "data", "mock", "(", "if", "available", ")" ]
e24ce7f7b41246e700c4b9bdb6b34b6652ad589b
https://github.com/getinsomnia/insomnia/blob/e24ce7f7b41246e700c4b9bdb6b34b6652ad589b/packages/insomnia-importers/src/importers/swagger2.js#L223-L253
train
Prepare the body for the request
[ 30522, 3853, 7374, 23684, 1006, 2203, 26521, 5403, 2863, 1010, 3795, 4328, 11368, 18863, 2015, 1007, 1063, 9530, 3367, 2771, 11368, 18863, 2015, 1027, 2203, 26521, 5403, 2863, 1012, 16678, 2015, 1064, 1064, 3795, 4328, 11368, 18863, 2015, 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...
SAP/openui5
src/sap.ui.table/src/sap/ui/table/TableUtils.js
function(oTable, sIdSuffix, fnHandler, bRegisterParent) { var oDomRef; if (typeof sIdSuffix == "string") { oDomRef = oTable.getDomRef(sIdSuffix); } else { Log.error("sIdSuffix must be a string", oTable); return undefined; } if (typeof fnHandler !== "function") { Log.error("fnHandler must...
javascript
function(oTable, sIdSuffix, fnHandler, bRegisterParent) { var oDomRef; if (typeof sIdSuffix == "string") { oDomRef = oTable.getDomRef(sIdSuffix); } else { Log.error("sIdSuffix must be a string", oTable); return undefined; } if (typeof fnHandler !== "function") { Log.error("fnHandler must...
[ "function", "(", "oTable", ",", "sIdSuffix", ",", "fnHandler", ",", "bRegisterParent", ")", "{", "var", "oDomRef", ";", "if", "(", "typeof", "sIdSuffix", "==", "\"string\"", ")", "{", "oDomRef", "=", "oTable", ".", "getDomRef", "(", "sIdSuffix", ")", ";", ...
Registers a ResizeHandler for a DOM reference identified by its ID suffix. The ResizeHandler ID is tracked in _mResizeHandlerIds of the table instance. The sIdSuffix is used as key. Existing ResizeHandlers will be de-registered before the new one is registered. @param {sap.ui.table.Table} oTable Instance of the table....
[ "Registers", "a", "ResizeHandler", "for", "a", "DOM", "reference", "identified", "by", "its", "ID", "suffix", ".", "The", "ResizeHandler", "ID", "is", "tracked", "in", "_mResizeHandlerIds", "of", "the", "table", "instance", ".", "The", "sIdSuffix", "is", "used...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableUtils.js#L917-L947
train
Registers a resize handler for the given table.
[ 30522, 3853, 1006, 27178, 3085, 1010, 15765, 6342, 26989, 2595, 1010, 1042, 25311, 5685, 3917, 1010, 7987, 13910, 12911, 19362, 4765, 1007, 1063, 13075, 1051, 9527, 2890, 2546, 1025, 2065, 1006, 2828, 11253, 15765, 6342, 26989, 2595, 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.f/src/sap/f/cards/BindingResolver.js
resolveBinding
function resolveBinding(sBinding, oModel, sPath) { if (!sBinding) { return sBinding; } var oBindingInfo = ManagedObject.bindingParser(sBinding); if (!oBindingInfo) { return sBinding; } if (!sPath) { sPath = "/"; } oSimpleControl.setModel(oModel); oSimpleControl.bindObject(sPath...
javascript
function resolveBinding(sBinding, oModel, sPath) { if (!sBinding) { return sBinding; } var oBindingInfo = ManagedObject.bindingParser(sBinding); if (!oBindingInfo) { return sBinding; } if (!sPath) { sPath = "/"; } oSimpleControl.setModel(oModel); oSimpleControl.bindObject(sPath...
[ "function", "resolveBinding", "(", "sBinding", ",", "oModel", ",", "sPath", ")", "{", "if", "(", "!", "sBinding", ")", "{", "return", "sBinding", ";", "}", "var", "oBindingInfo", "=", "ManagedObject", ".", "bindingParser", "(", "sBinding", ")", ";", "if", ...
Resolves a single binding syntax. @param {string} sBinding The value to resolve. @param {sap.ui.model.Model} oModel The model. @param {string} [sPath] The path to the referenced entity which is going to be used as a binding context. @private @returns {*} The resolved value.
[ "Resolves", "a", "single", "binding", "syntax", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.f/src/sap/f/cards/BindingResolver.js#L88-L113
train
Resolves the binding and returns the resolved value
[ 30522, 3853, 10663, 30524, 1010, 14690, 2232, 1007, 1063, 2065, 1006, 999, 24829, 22254, 2075, 1007, 1063, 2709, 24829, 22254, 2075, 1025, 1065, 13075, 27885, 22254, 2075, 2378, 14876, 1027, 3266, 16429, 20614, 1012, 8031, 19362, 8043, 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/utils/ExtensionLoader.js
_loadAll
function _loadAll(directory, config, entryPoint, processExtension) { var result = new $.Deferred(); FileSystem.getDirectoryForPath(directory).getContents(function (err, contents) { if (!err) { var i, extensions = []; for (i = 0; i < conte...
javascript
function _loadAll(directory, config, entryPoint, processExtension) { var result = new $.Deferred(); FileSystem.getDirectoryForPath(directory).getContents(function (err, contents) { if (!err) { var i, extensions = []; for (i = 0; i < conte...
[ "function", "_loadAll", "(", "directory", ",", "config", ",", "entryPoint", ",", "processExtension", ")", "{", "var", "result", "=", "new", "$", ".", "Deferred", "(", ")", ";", "FileSystem", ".", "getDirectoryForPath", "(", "directory", ")", ".", "getContent...
@private Loads a file entryPoint from each extension folder within the baseUrl into its own Require.js context @param {!string} directory, an absolute native path that contains a directory of extensions. each subdirectory is interpreted as an independent extension @param {!{baseUrl: string}} config object with baseUrl...
[ "@private", "Loads", "a", "file", "entryPoint", "from", "each", "extension", "folder", "within", "the", "baseUrl", "into", "its", "own", "Require", ".", "js", "context" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/utils/ExtensionLoader.js#L321-L359
train
Load all extensions from a directory
[ 30522, 3853, 1035, 7170, 8095, 1006, 14176, 1010, 9530, 8873, 2290, 1010, 4443, 8400, 1010, 2832, 10288, 29048, 1007, 1063, 13075, 2765, 1027, 2047, 1002, 1012, 13366, 28849, 2094, 1006, 1007, 1025, 6764, 27268, 6633, 1012, 2131, 4305, 2890...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/mvc/HTMLViewRenderer.js
function(oControl) { var sTemp = HTMLViewRenderer._getHTML(rm, oControl, sHTML); if (sTemp) { sHTML = sTemp; } else { aDeferred.push(oControl); } }
javascript
function(oControl) { var sTemp = HTMLViewRenderer._getHTML(rm, oControl, sHTML); if (sTemp) { sHTML = sTemp; } else { aDeferred.push(oControl); } }
[ "function", "(", "oControl", ")", "{", "var", "sTemp", "=", "HTMLViewRenderer", ".", "_getHTML", "(", "rm", ",", "oControl", ",", "sHTML", ")", ";", "if", "(", "sTemp", ")", "{", "sHTML", "=", "sTemp", ";", "}", "else", "{", "aDeferred", ".", "push",...
helper method to render the controls
[ "helper", "method", "to", "render", "the", "controls" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/mvc/HTMLViewRenderer.js#L54-L61
train
If the control is not in the control list then it is not in the list of deferred items
[ 30522, 3853, 1006, 1051, 8663, 13181, 2140, 1007, 1063, 13075, 7872, 2361, 1027, 16129, 8584, 7389, 4063, 2121, 1012, 1035, 2131, 11039, 19968, 1006, 28549, 1010, 1051, 8663, 13181, 2140, 1010, 14021, 21246, 2140, 1007, 1025, 2065, 1006, 78...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-duplicate-imports.js
getValue
function getValue(node) { if (node && node.source && node.source.value) { return node.source.value.trim(); } return ""; }
javascript
function getValue(node) { if (node && node.source && node.source.value) { return node.source.value.trim(); } return ""; }
[ "function", "getValue", "(", "node", ")", "{", "if", "(", "node", "&&", "node", ".", "source", "&&", "node", ".", "source", ".", "value", ")", "{", "return", "node", ".", "source", ".", "value", ".", "trim", "(", ")", ";", "}", "return", "\"\"", ...
------------------------------------------------------------------------------ Rule Definition ------------------------------------------------------------------------------ Returns the name of the module imported or re-exported. @param {ASTNode} node - A node to get. @returns {string} the name of the module, or empt...
[ "------------------------------------------------------------------------------", "Rule", "Definition", "------------------------------------------------------------------------------", "Returns", "the", "name", "of", "the", "module", "imported", "or", "re", "-", "exported", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-duplicate-imports.js#L17-L23
train
Get the value of a node
[ 30522, 3853, 2131, 10175, 5657, 1006, 13045, 1007, 1063, 2065, 1006, 13045, 1004, 1004, 13045, 1012, 3120, 1004, 1004, 13045, 1012, 3120, 1012, 3643, 1007, 1063, 2709, 13045, 1012, 3120, 1012, 3643, 1012, 12241, 1006, 1007, 1025, 1065, 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...
adobe/brackets
src/JSUtils/ScopeManager.js
isFileExcludedInternal
function isFileExcludedInternal(path) { // The detectedExclusions are files detected to be troublesome with current versions of Tern. // detectedExclusions is an array of full paths. var detectedExclusions = PreferencesManager.get("jscodehints.detectedExclusions") || []; if (detectedExcl...
javascript
function isFileExcludedInternal(path) { // The detectedExclusions are files detected to be troublesome with current versions of Tern. // detectedExclusions is an array of full paths. var detectedExclusions = PreferencesManager.get("jscodehints.detectedExclusions") || []; if (detectedExcl...
[ "function", "isFileExcludedInternal", "(", "path", ")", "{", "// The detectedExclusions are files detected to be troublesome with current versions of Tern.", "// detectedExclusions is an array of full paths.", "var", "detectedExclusions", "=", "PreferencesManager", ".", "get", "(", "\"...
Test if the file path is an internal exclusion. @param {string} path file path to test for exclusion. @return {boolean} true if excluded, false otherwise.
[ "Test", "if", "the", "file", "path", "is", "an", "internal", "exclusion", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/JSUtils/ScopeManager.js#L230-L239
train
Check if a file is excluded from the current version of Tern.
[ 30522, 3853, 2003, 8873, 10559, 2595, 20464, 13936, 18447, 11795, 2389, 1006, 4130, 1007, 1063, 1013, 1013, 1996, 11156, 10288, 20464, 22016, 2024, 6764, 11156, 2000, 2022, 13460, 8462, 2007, 2783, 4617, 1997, 28774, 2078, 1012, 1013, 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...
adobe/brackets
src/utils/TokenUtils.js
getTokenAt
function getTokenAt(cm, pos, precise) { if (precise) { _clearCache(); // reset cache return cm.getTokenAt(pos, precise); } var cachedTokens = _manageCache(cm, pos.line), tokenIndex = _.sortedIndex(cachedTokens, {end: pos.ch}, "end"), // binary search i...
javascript
function getTokenAt(cm, pos, precise) { if (precise) { _clearCache(); // reset cache return cm.getTokenAt(pos, precise); } var cachedTokens = _manageCache(cm, pos.line), tokenIndex = _.sortedIndex(cachedTokens, {end: pos.ch}, "end"), // binary search i...
[ "function", "getTokenAt", "(", "cm", ",", "pos", ",", "precise", ")", "{", "if", "(", "precise", ")", "{", "_clearCache", "(", ")", ";", "// reset cache", "return", "cm", ".", "getTokenAt", "(", "pos", ",", "precise", ")", ";", "}", "var", "cachedToken...
/* Like cm.getTokenAt, but with caching. Way more performant for long lines. @param {!CodeMirror} cm @param {!{ch:number, line:number}} pos @param {boolean} precise If given, results in more current results. Suppresses caching. @return {Object} Token for position
[ "/", "*", "Like", "cm", ".", "getTokenAt", "but", "with", "caching", ".", "Way", "more", "performant", "for", "long", "lines", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/utils/TokenUtils.js#L76-L85
train
Get a token from the cache
[ 30522, 3853, 2131, 18715, 8189, 2102, 1006, 4642, 1010, 13433, 2015, 1010, 10480, 1007, 1063, 2065, 1006, 10480, 1007, 1063, 1035, 3154, 3540, 5403, 1006, 1007, 1025, 1013, 1013, 25141, 17053, 2709, 4642, 1012, 2131, 18715, 8189, 2102, 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.m/src/sap/m/HyphenationSupport.js
hyphenateTexts
function hyphenateTexts(oControl) { if (!shouldControlHyphenate(oControl) || !shouldUseThirdParty()) { // no hyphenation needed oControl._mHyphenatedTexts = {}; oControl._mUnhyphenatedTexts = {}; return; } var mTexts = oControl.getTextsToBeHyphenated(), aChangedTextKeys = diffTexts(mTexts,...
javascript
function hyphenateTexts(oControl) { if (!shouldControlHyphenate(oControl) || !shouldUseThirdParty()) { // no hyphenation needed oControl._mHyphenatedTexts = {}; oControl._mUnhyphenatedTexts = {}; return; } var mTexts = oControl.getTextsToBeHyphenated(), aChangedTextKeys = diffTexts(mTexts,...
[ "function", "hyphenateTexts", "(", "oControl", ")", "{", "if", "(", "!", "shouldControlHyphenate", "(", "oControl", ")", "||", "!", "shouldUseThirdParty", "(", ")", ")", "{", "// no hyphenation needed", "oControl", ".", "_mHyphenatedTexts", "=", "{", "}", ";", ...
Hyphenates all texts needed for the given control. @param {sap.m.IHyphenation} oControl The control whose texts need hyphenation @private
[ "Hyphenates", "all", "texts", "needed", "for", "the", "given", "control", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/HyphenationSupport.js#L148-L192
train
hyphenates all text in the given control
[ 30522, 3853, 1044, 22571, 10222, 3686, 18209, 2015, 1006, 1051, 8663, 13181, 2140, 1007, 1063, 2065, 1006, 999, 2323, 8663, 13181, 2140, 10536, 8458, 8189, 2618, 1006, 1051, 8663, 13181, 2140, 1007, 1064, 1064, 999, 2323, 8557, 15222, 4103,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
laurent22/joplin
Clipper/joplin-webclipper/content_scripts/Readability.js
function(node) { node.readability = {"contentScore": 0}; switch (node.tagName) { case 'DIV': node.readability.contentScore += 5; break; case 'PRE': case 'TD': case 'BLOCKQUOTE': node.readability.contentScore += 3; break; case 'ADDRESS': case...
javascript
function(node) { node.readability = {"contentScore": 0}; switch (node.tagName) { case 'DIV': node.readability.contentScore += 5; break; case 'PRE': case 'TD': case 'BLOCKQUOTE': node.readability.contentScore += 3; break; case 'ADDRESS': case...
[ "function", "(", "node", ")", "{", "node", ".", "readability", "=", "{", "\"contentScore\"", ":", "0", "}", ";", "switch", "(", "node", ".", "tagName", ")", "{", "case", "'DIV'", ":", "node", ".", "readability", ".", "contentScore", "+=", "5", ";", "...
Initialize a node with the readability object. Also checks the className/id for special names to add to its score. @param Element @return void
[ "Initialize", "a", "node", "with", "the", "readability", "object", ".", "Also", "checks", "the", "className", "/", "id", "for", "special", "names", "to", "add", "to", "its", "score", "." ]
beb428b246cecba4630a3ca57b472f43c0933a43
https://github.com/laurent22/joplin/blob/beb428b246cecba4630a3ca57b472f43c0933a43/Clipper/joplin-webclipper/content_scripts/Readability.js#L624-L661
train
Calculate the readability of a node
[ 30522, 3853, 1006, 13045, 1007, 1063, 13045, 1012, 3191, 8010, 1027, 1063, 1000, 8417, 17345, 1000, 1024, 1014, 1065, 1025, 6942, 1006, 13045, 1012, 6415, 18442, 1007, 1063, 2553, 1005, 4487, 2615, 1005, 1024, 13045, 1012, 3191, 8010, 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...
SAP/openui5
src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/DemoApps.controller.js
function(oEvent) { this.byId("phoneImage").setVisible(oEvent.name === "Phone"); this.byId("desktopImage").setVisible(oEvent.name !== "Phone"); this.byId("phoneImage").toggleStyleClass("phoneHeaderImageDesktop", oEvent.name === "Phone"); }
javascript
function(oEvent) { this.byId("phoneImage").setVisible(oEvent.name === "Phone"); this.byId("desktopImage").setVisible(oEvent.name !== "Phone"); this.byId("phoneImage").toggleStyleClass("phoneHeaderImageDesktop", oEvent.name === "Phone"); }
[ "function", "(", "oEvent", ")", "{", "this", ".", "byId", "(", "\"phoneImage\"", ")", ".", "setVisible", "(", "oEvent", ".", "name", "===", "\"Phone\"", ")", ";", "this", ".", "byId", "(", "\"desktopImage\"", ")", ".", "setVisible", "(", "oEvent", ".", ...
Switches the image to phone and hides the download icon when decreasing the window size @param {sap.ui.base.Event} oEvent Device media change event @private
[ "Switches", "the", "image", "to", "phone", "and", "hides", "the", "download", "icon", "when", "decreasing", "the", "window", "size" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/DemoApps.controller.js#L134-L138
train
Toggle the phone image and the desktop image
[ 30522, 3853, 1006, 1051, 18697, 3372, 1007, 1063, 2023, 1012, 2011, 3593, 1006, 1000, 3042, 9581, 3351, 1000, 1007, 1012, 2275, 11365, 7028, 1006, 1051, 18697, 3372, 1012, 2171, 1027, 1027, 1027, 1000, 3042, 1000, 1007, 1025, 2023, 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...
SAP/openui5
src/sap.ui.support/src/sap/ui/support/supportRules/report/IssueRenderer.js
render
function render(issues, enableFiltering) { var content = ''; if (enableFiltering) { content += '<div class="filters">' + getSeverityFilters(issues) + '<div>\n'; } content += '<div>' + getIssues(issues) + '</div>'; return '<div>' + content + '</div>'; }
javascript
function render(issues, enableFiltering) { var content = ''; if (enableFiltering) { content += '<div class="filters">' + getSeverityFilters(issues) + '<div>\n'; } content += '<div>' + getIssues(issues) + '</div>'; return '<div>' + content + '</div>'; }
[ "function", "render", "(", "issues", ",", "enableFiltering", ")", "{", "var", "content", "=", "''", ";", "if", "(", "enableFiltering", ")", "{", "content", "+=", "'<div class=\"filters\">'", "+", "getSeverityFilters", "(", "issues", ")", "+", "'<div>\\n'", ";"...
Public functions Creates an html string containing the issues. @param {Object} issues - the issues in viewmodel format @param {Boolean} enableFiltering - if true renders the severity filters @returns {String}
[ "Public", "functions", "Creates", "an", "html", "string", "containing", "the", "issues", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/report/IssueRenderer.js#L168-L178
train
Render the issue list
[ 30522, 3853, 17552, 1006, 3314, 1010, 9585, 8873, 21928, 2075, 1007, 1063, 13075, 4180, 1027, 1005, 1005, 1025, 2065, 1006, 9585, 8873, 21928, 2075, 1007, 1063, 4180, 1009, 1027, 1005, 1026, 4487, 2615, 2465, 1027, 1000, 17736, 1000, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.m/src/sap/m/Suggest.js
createDialog
function createDialog() { var dialog, originalValue, dialogSearchField, customHeader, closeButton; // use sap.ui.require to avoid circular dependency between the SearchField and Suggest dialogSearchField = new (sap.ui.require('sap/m/SearchField'))({ liveChange : function (oEvent) { va...
javascript
function createDialog() { var dialog, originalValue, dialogSearchField, customHeader, closeButton; // use sap.ui.require to avoid circular dependency between the SearchField and Suggest dialogSearchField = new (sap.ui.require('sap/m/SearchField'))({ liveChange : function (oEvent) { va...
[ "function", "createDialog", "(", ")", "{", "var", "dialog", ",", "originalValue", ",", "dialogSearchField", ",", "customHeader", ",", "closeButton", ";", "// use sap.ui.require to avoid circular dependency between the SearchField and Suggest", "dialogSearchField", "=", "new", ...
/* =========================================================== /* internal helper functions /* ===========================================================
[ "/", "*", "===========================================================", "/", "*", "internal", "helper", "functions", "/", "*", "===========================================================" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/Suggest.js#L70-L136
train
Creates a dialog
[ 30522, 3853, 2580, 4818, 8649, 1006, 1007, 1063, 13075, 13764, 8649, 1010, 2434, 10175, 5657, 1010, 13764, 8649, 17310, 11140, 3790, 1010, 7661, 4974, 2121, 1010, 2485, 8569, 15474, 1025, 1013, 1013, 2224, 20066, 1012, 21318, 1012, 5478, 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...
expressjs/express
lib/response.js
sendfile
function sendfile(res, file, options, callback) { var done = false; var streaming; // request aborted function onaborted() { if (done) return; done = true; var err = new Error('Request aborted'); err.code = 'ECONNABORTED'; callback(err); } // directory function ondirectory() { i...
javascript
function sendfile(res, file, options, callback) { var done = false; var streaming; // request aborted function onaborted() { if (done) return; done = true; var err = new Error('Request aborted'); err.code = 'ECONNABORTED'; callback(err); } // directory function ondirectory() { i...
[ "function", "sendfile", "(", "res", ",", "file", ",", "options", ",", "callback", ")", "{", "var", "done", "=", "false", ";", "var", "streaming", ";", "// request aborted", "function", "onaborted", "(", ")", "{", "if", "(", "done", ")", "return", ";", ...
pipe the send file stream
[ "pipe", "the", "send", "file", "stream" ]
dc538f6e810bd462c98ee7e6aae24c64d4b1da93
https://github.com/expressjs/express/blob/dc538f6e810bd462c98ee7e6aae24c64d4b1da93/lib/response.js#L1012-L1100
train
sendfile - Sends a file to the client
[ 30522, 3853, 4604, 8873, 2571, 1006, 24501, 1010, 5371, 1010, 7047, 1010, 2655, 5963, 1007, 1063, 13075, 2589, 1027, 6270, 1025, 13075, 11058, 1025, 1013, 1013, 5227, 11113, 15613, 3853, 2006, 7875, 15613, 1006, 1007, 1063, 2065, 1006, 2589...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 (element) { var parent = element.parent(); // jqLite might return a non-null, but still empty, parent; so check for parent and length while (hasComputedStyle(parent, 'pointer-events', 'none')) { parent = parent.parent(); } return parent; }
javascript
function (element) { var parent = element.parent(); // jqLite might return a non-null, but still empty, parent; so check for parent and length while (hasComputedStyle(parent, 'pointer-events', 'none')) { parent = parent.parent(); } return parent; }
[ "function", "(", "element", ")", "{", "var", "parent", "=", "element", ".", "parent", "(", ")", ";", "// jqLite might return a non-null, but still empty, parent; so check for parent and length", "while", "(", "hasComputedStyle", "(", "parent", ",", "'pointer-events'", ","...
Scan up dom hierarchy for enabled parent;
[ "Scan", "up", "dom", "hierarchy", "for", "enabled", "parent", ";" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/util/util.js#L733-L742
train
Returns the parent of the element
[ 30522, 3853, 1006, 5783, 1007, 1063, 13075, 6687, 1027, 5783, 1012, 6687, 1006, 1007, 1025, 1013, 1013, 1046, 4160, 22779, 2453, 2709, 1037, 2512, 1011, 19701, 1010, 2021, 2145, 4064, 1010, 6687, 1025, 2061, 4638, 2005, 6687, 1998, 3091, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
marcuswestin/store.js
src/store-engine.js
function(key, value) { if (value === undefined) { return this.remove(key) } this.storage.write(this._namespacePrefix + key, this._serialize(value)) return value }
javascript
function(key, value) { if (value === undefined) { return this.remove(key) } this.storage.write(this._namespacePrefix + key, this._serialize(value)) return value }
[ "function", "(", "key", ",", "value", ")", "{", "if", "(", "value", "===", "undefined", ")", "{", "return", "this", ".", "remove", "(", "key", ")", "}", "this", ".", "storage", ".", "write", "(", "this", ".", "_namespacePrefix", "+", "key", ",", "t...
set will store the given value at key and returns value. Calling set with value === undefined is equivalent to calling remove.
[ "set", "will", "store", "the", "given", "value", "at", "key", "and", "returns", "value", ".", "Calling", "set", "with", "value", "===", "undefined", "is", "equivalent", "to", "calling", "remove", "." ]
b8e22fea8738fc19da4d9e7dbf1cda6e5185c481
https://github.com/marcuswestin/store.js/blob/b8e22fea8738fc19da4d9e7dbf1cda6e5185c481/src/store-engine.js#L28-L34
train
Set a value in the cache
[ 30522, 3853, 1006, 3145, 1010, 3643, 1007, 1063, 2065, 1006, 3643, 1027, 1027, 1027, 6151, 28344, 1007, 1063, 2709, 2023, 1012, 6366, 1006, 3145, 1007, 1065, 2023, 1012, 5527, 1012, 4339, 1006, 2023, 1012, 1035, 3415, 15327, 28139, 8873, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
docs/app/js/anchor.js
createContentURL
function createContentURL() { var path = ''; var name = element.text(); // Use $window.location.pathname to get the path with the baseURL included. // $location.path() does not include the baseURL. This is important to support how the docs // are deployed with baseURLs like /late...
javascript
function createContentURL() { var path = ''; var name = element.text(); // Use $window.location.pathname to get the path with the baseURL included. // $location.path() does not include the baseURL. This is important to support how the docs // are deployed with baseURLs like /late...
[ "function", "createContentURL", "(", ")", "{", "var", "path", "=", "''", ";", "var", "name", "=", "element", ".", "text", "(", ")", ";", "// Use $window.location.pathname to get the path with the baseURL included.", "// $location.path() does not include the baseURL. This is i...
Creates URL from the text content of the element and writes it into the scope.
[ "Creates", "URL", "from", "the", "text", "content", "of", "the", "element", "and", "writes", "it", "into", "the", "scope", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/docs/app/js/anchor.js#L43-L61
train
Create the content URL
[ 30522, 3853, 3443, 8663, 6528, 20689, 2140, 1006, 1007, 1063, 13075, 4130, 1027, 1005, 1005, 1025, 13075, 2171, 1027, 5783, 1012, 3793, 1006, 1007, 1025, 1013, 1013, 2224, 1002, 3332, 1012, 3295, 1012, 4130, 18442, 2000, 2131, 1996, 4130, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/computed-property-spacing.js
reportRequiredBeginningSpace
function reportRequiredBeginningSpace(node, token) { context.report({ node, loc: token.loc.start, messageId: "missingSpaceAfter", data: { tokenValue: token.value }, fix(fixer) { ...
javascript
function reportRequiredBeginningSpace(node, token) { context.report({ node, loc: token.loc.start, messageId: "missingSpaceAfter", data: { tokenValue: token.value }, fix(fixer) { ...
[ "function", "reportRequiredBeginningSpace", "(", "node", ",", "token", ")", "{", "context", ".", "report", "(", "{", "node", ",", "loc", ":", "token", ".", "loc", ".", "start", ",", "messageId", ":", "\"missingSpaceAfter\"", ",", "data", ":", "{", "tokenVa...
Reports that there should be a space after the first token @param {ASTNode} node - The node to report in the event of an error. @param {Token} token - The token to use for the report. @returns {void}
[ "Reports", "that", "there", "should", "be", "a", "space", "after", "the", "first", "token" ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/computed-property-spacing.js#L97-L109
train
Reports a missing space after the first token.
[ 30522, 3853, 3189, 2890, 15549, 5596, 4783, 11528, 5582, 23058, 1006, 13045, 1010, 19204, 1007, 1063, 6123, 1012, 3189, 1006, 1063, 13045, 1010, 8840, 2278, 1024, 19204, 1012, 8840, 2278, 1012, 2707, 1010, 4471, 3593, 1024, 1000, 4394, 2305...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-unused-vars.js
getRhsNode
function getRhsNode(ref, prevRhsNode) { const id = ref.identifier; const parent = id.parent; const granpa = parent.parent; const refScope = ref.from.variableScope; const varScope = ref.resolved.scope.variableScope; const canBeUsedLater = refScope !...
javascript
function getRhsNode(ref, prevRhsNode) { const id = ref.identifier; const parent = id.parent; const granpa = parent.parent; const refScope = ref.from.variableScope; const varScope = ref.resolved.scope.variableScope; const canBeUsedLater = refScope !...
[ "function", "getRhsNode", "(", "ref", ",", "prevRhsNode", ")", "{", "const", "id", "=", "ref", ".", "identifier", ";", "const", "parent", "=", "id", ".", "parent", ";", "const", "granpa", "=", "parent", ".", "parent", ";", "const", "refScope", "=", "re...
If a given reference is left-hand side of an assignment, this gets the right-hand side node of the assignment. In the following cases, this returns null. - The reference is not the LHS of an assignment expression. - The reference is inside of a loop. - The reference is inside of a function scope which is different fr...
[ "If", "a", "given", "reference", "is", "left", "-", "hand", "side", "of", "an", "assignment", "this", "gets", "the", "right", "-", "hand", "side", "node", "of", "the", "assignment", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-unused-vars.js#L284-L308
train
Returns the right - hand side of the given reference node.
[ 30522, 3853, 2131, 25032, 2015, 3630, 3207, 1006, 25416, 1010, 3653, 19716, 7898, 3630, 3207, 1007, 1063, 9530, 3367, 8909, 1027, 25416, 1012, 8909, 4765, 18095, 1025, 9530, 3367, 6687, 1027, 8909, 1012, 6687, 1025, 9530, 3367, 12604, 4502,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
xlsx.js
parse_ColRelU
function parse_ColRelU(blob, length) { var c = blob.read_shift(length == 1 ? 1 : 2); return [c & 0x3FFF, (c >> 14) & 1, (c >> 15) & 1]; }
javascript
function parse_ColRelU(blob, length) { var c = blob.read_shift(length == 1 ? 1 : 2); return [c & 0x3FFF, (c >> 14) & 1, (c >> 15) & 1]; }
[ "function", "parse_ColRelU", "(", "blob", ",", "length", ")", "{", "var", "c", "=", "blob", ".", "read_shift", "(", "length", "==", "1", "?", "1", ":", "2", ")", ";", "return", "[", "c", "&", "0x3FFF", ",", "(", "c", ">>", "14", ")", "&", "1", ...
/* [MS-XLS] 2.5.51
[ "/", "*", "[", "MS", "-", "XLS", "]", "2", ".", "5", ".", "51" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L10228-L10231
train
Parse ColRelU
[ 30522, 3853, 11968, 3366, 1035, 8902, 16570, 2226, 1006, 1038, 4135, 2497, 1010, 3091, 1007, 1063, 13075, 1039, 1027, 1038, 4135, 2497, 1012, 3191, 1035, 5670, 1006, 3091, 1027, 1027, 1015, 1029, 1015, 1024, 1016, 1007, 1025, 2709, 1031, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
tensorflow/tfjs-models
posenet/demos/coco.js
visualizeOutputs
function visualizeOutputs( partId, drawHeatmaps, drawOffsetVectors, drawDisplacements, ctx) { const {heatmapScores, offsets, displacementFwd, displacementBwd} = modelOutputs; const outputStride = +guiState.outputStride; const [height, width] = heatmapScores.shape; ctx.globalAlpha = 0; const heatma...
javascript
function visualizeOutputs( partId, drawHeatmaps, drawOffsetVectors, drawDisplacements, ctx) { const {heatmapScores, offsets, displacementFwd, displacementBwd} = modelOutputs; const outputStride = +guiState.outputStride; const [height, width] = heatmapScores.shape; ctx.globalAlpha = 0; const heatma...
[ "function", "visualizeOutputs", "(", "partId", ",", "drawHeatmaps", ",", "drawOffsetVectors", ",", "drawDisplacements", ",", "ctx", ")", "{", "const", "{", "heatmapScores", ",", "offsets", ",", "displacementFwd", ",", "displacementBwd", "}", "=", "modelOutputs", "...
Visualizes the outputs from the model which are used for decoding poses. Limited to visualizing the outputs for a single part. @param partId The id of the part to visualize
[ "Visualizes", "the", "outputs", "from", "the", "model", "which", "are", "used", "for", "decoding", "poses", ".", "Limited", "to", "visualizing", "the", "outputs", "for", "a", "single", "part", "." ]
af194797c90cc5bcac1060d3cd41b0258a34c7dc
https://github.com/tensorflow/tfjs-models/blob/af194797c90cc5bcac1060d3cd41b0258a34c7dc/posenet/demos/coco.js#L227-L277
train
visualize the outputs of the model
[ 30522, 3853, 5107, 4697, 5833, 18780, 2015, 1006, 2112, 3593, 1010, 4009, 20192, 29418, 4523, 1010, 4009, 27475, 3388, 3726, 24817, 1010, 4009, 10521, 24759, 10732, 8163, 1010, 14931, 2595, 1007, 1063, 9530, 3367, 1063, 3684, 2863, 4523, 17...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-loop-func.js
isSafe
function isSafe(loopNode, reference) { const variable = reference.resolved; const definition = variable && variable.defs[0]; const declaration = definition && definition.parent; const kind = (declaration && declaration.type === "VariableDeclaration") ? declaration.kind : ""; // Vari...
javascript
function isSafe(loopNode, reference) { const variable = reference.resolved; const definition = variable && variable.defs[0]; const declaration = definition && definition.parent; const kind = (declaration && declaration.type === "VariableDeclaration") ? declaration.kind : ""; // Vari...
[ "function", "isSafe", "(", "loopNode", ",", "reference", ")", "{", "const", "variable", "=", "reference", ".", "resolved", ";", "const", "definition", "=", "variable", "&&", "variable", ".", "defs", "[", "0", "]", ";", "const", "declaration", "=", "definit...
Checks whether a given reference which refers to an upper scope's variable is safe or not. @param {ASTNode} loopNode - A containing loop node. @param {eslint-scope.Reference} reference - A reference to check. @returns {boolean} `true` if the reference is safe or not.
[ "Checks", "whether", "a", "given", "reference", "which", "refers", "to", "an", "upper", "scope", "s", "variable", "is", "safe", "or", "not", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-loop-func.js#L93-L149
train
Checks whether a given reference is safe or not.
[ 30522, 3853, 26354, 10354, 2063, 1006, 7077, 3630, 3207, 1010, 4431, 1007, 1063, 9530, 3367, 8023, 1027, 4431, 1012, 10395, 1025, 9530, 3367, 6210, 1027, 8023, 1004, 1004, 8023, 1012, 13366, 2015, 1031, 1014, 1033, 1025, 9530, 3367, 8170, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
zalmoxisus/redux-devtools-extension
src/browser/extension/inject/contentScript.js
handleMessages
function handleMessages(event) { if (!isAllowed()) return; if (!event || event.source !== window || typeof event.data !== 'object') return; const message = event.data; if (message.source !== pageSource) return; if (message.type === 'DISCONNECT') { if (bg) { bg.disconnect(); connected = false; ...
javascript
function handleMessages(event) { if (!isAllowed()) return; if (!event || event.source !== window || typeof event.data !== 'object') return; const message = event.data; if (message.source !== pageSource) return; if (message.type === 'DISCONNECT') { if (bg) { bg.disconnect(); connected = false; ...
[ "function", "handleMessages", "(", "event", ")", "{", "if", "(", "!", "isAllowed", "(", ")", ")", "return", ";", "if", "(", "!", "event", "||", "event", ".", "source", "!==", "window", "||", "typeof", "event", ".", "data", "!==", "'object'", ")", "re...
Resend messages from the page to the background script
[ "Resend", "messages", "from", "the", "page", "to", "the", "background", "script" ]
d127175196388c9b1f874b04b2792cf487c5d5e0
https://github.com/zalmoxisus/redux-devtools-extension/blob/d127175196388c9b1f874b04b2792cf487c5d5e0/src/browser/extension/inject/contentScript.js#L102-L116
train
Handle messages from the page
[ 30522, 3853, 5047, 7834, 3736, 8449, 1006, 2724, 1007, 1063, 2065, 1006, 999, 18061, 7174, 15557, 1006, 1007, 1007, 2709, 1025, 2065, 1006, 999, 2724, 1064, 1064, 2724, 1012, 3120, 999, 1027, 1027, 3332, 1064, 1064, 2828, 11253, 2724, 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...
markdown-it/markdown-it
support/demo_template/index.js
buildScrollMap
function buildScrollMap() { var i, offset, nonEmptyList, pos, a, b, lineHeightMap, linesCount, acc, sourceLikeDiv, textarea = $('.source'), _scrollMap; sourceLikeDiv = $('<div />').css({ position: 'absolute', visibility: 'hidden', height: 'auto', width: textarea[0].clientWidth, 'fon...
javascript
function buildScrollMap() { var i, offset, nonEmptyList, pos, a, b, lineHeightMap, linesCount, acc, sourceLikeDiv, textarea = $('.source'), _scrollMap; sourceLikeDiv = $('<div />').css({ position: 'absolute', visibility: 'hidden', height: 'auto', width: textarea[0].clientWidth, 'fon...
[ "function", "buildScrollMap", "(", ")", "{", "var", "i", ",", "offset", ",", "nonEmptyList", ",", "pos", ",", "a", ",", "b", ",", "lineHeightMap", ",", "linesCount", ",", "acc", ",", "sourceLikeDiv", ",", "textarea", "=", "$", "(", "'.source'", ")", ",...
Build offsets for each line (lines can be wrapped) That's a bit dirty to process each line everytime, but ok for demo. Optimizations are required only for big texts.
[ "Build", "offsets", "for", "each", "line", "(", "lines", "can", "be", "wrapped", ")", "That", "s", "a", "bit", "dirty", "to", "process", "each", "line", "everytime", "but", "ok", "for", "demo", ".", "Optimizations", "are", "required", "only", "for", "big...
ba6830ba13fb92953a91fb90318964ccd15b82c4
https://github.com/markdown-it/markdown-it/blob/ba6830ba13fb92953a91fb90318964ccd15b82c4/support/demo_template/index.js#L230-L300
train
Build the scroll map
[ 30522, 3853, 16473, 26775, 14511, 2863, 2361, 1006, 1007, 1063, 13075, 1045, 1010, 16396, 1010, 3904, 27718, 8516, 2923, 1010, 13433, 2015, 1010, 1037, 1010, 1038, 1010, 2240, 26036, 13900, 2863, 2361, 1010, 3210, 3597, 16671, 1010, 16222, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
ColorlibHQ/AdminLTE
plugins/bootstrap-slider/bootstrap-slider.js
function(percentage) { var min = (this.options.min === 0) ? 0 : Math.log(this.options.min); var max = Math.log(this.options.max); var value = Math.exp(min + (max - min) * percentage / 100); value = this.options.min + Math.round((value - this.options.min) / this.options.step) * this.options.step; ...
javascript
function(percentage) { var min = (this.options.min === 0) ? 0 : Math.log(this.options.min); var max = Math.log(this.options.max); var value = Math.exp(min + (max - min) * percentage / 100); value = this.options.min + Math.round((value - this.options.min) / this.options.step) * this.options.step; ...
[ "function", "(", "percentage", ")", "{", "var", "min", "=", "(", "this", ".", "options", ".", "min", "===", "0", ")", "?", "0", ":", "Math", ".", "log", "(", "this", ".", "options", ".", "min", ")", ";", "var", "max", "=", "Math", ".", "log", ...
/* Based on http://stackoverflow.com/questions/846221/logarithmic-slider
[ "/", "*", "Based", "on", "http", ":", "//", "stackoverflow", ".", "com", "/", "questions", "/", "846221", "/", "logarithmic", "-", "slider" ]
19113c3cbc19a7afe0cfd3158d647064d2d30661
https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/plugins/bootstrap-slider/bootstrap-slider.js#L266-L280
train
Calculate the value of the logarithmic value
[ 30522, 3853, 1006, 7017, 1007, 1063, 13075, 8117, 1027, 1006, 2023, 1012, 7047, 1012, 8117, 1027, 1027, 1027, 1014, 1007, 1029, 1014, 1024, 8785, 1012, 8833, 1006, 2023, 1012, 7047, 1012, 8117, 1007, 1025, 13075, 4098, 1027, 8785, 1012, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
NervJS/taro
packages/taro/src/internal/_common.js
baseToString
function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value === 'string') { return value } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : '' } var result = value + '' return result == '0' && 1 / value == -I...
javascript
function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value === 'string') { return value } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : '' } var result = value + '' return result == '0' && 1 / value == -I...
[ "function", "baseToString", "(", "value", ")", "{", "// Exit early for strings to avoid a performance hit in some environments.", "if", "(", "typeof", "value", "===", "'string'", ")", "{", "return", "value", "}", "if", "(", "isSymbol", "(", "value", ")", ")", "{", ...
The base implementation of `_.toString` which doesn't convert nullish values to empty strings. @private @param {*} value The value to process. @returns {string} Returns the string.
[ "The", "base", "implementation", "of", "_", ".", "toString", "which", "doesn", "t", "convert", "nullish", "values", "to", "empty", "strings", "." ]
274e76d731d7f158141287e31cbd51f092d472c5
https://github.com/NervJS/taro/blob/274e76d731d7f158141287e31cbd51f092d472c5/packages/taro/src/internal/_common.js#L503-L513
train
The base implementation of _. toString which is similar to _. toString except that it is not a string.
[ 30522, 3853, 2918, 13122, 18886, 3070, 1006, 3643, 1007, 1063, 1013, 1013, 6164, 2220, 2005, 7817, 2000, 4468, 1037, 2836, 2718, 1999, 2070, 10058, 1012, 2065, 1006, 2828, 11253, 3643, 1027, 1027, 1027, 1005, 5164, 1005, 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...
googleapis/google-api-nodejs-client
samples/customsearch/customsearch.js
runSample
async function runSample(options) { console.log(options); const res = await customsearch.cse.list({ cx: options.cx, q: options.q, auth: options.apiKey, }); console.log(res.data); return res.data; }
javascript
async function runSample(options) { console.log(options); const res = await customsearch.cse.list({ cx: options.cx, q: options.q, auth: options.apiKey, }); console.log(res.data); return res.data; }
[ "async", "function", "runSample", "(", "options", ")", "{", "console", ".", "log", "(", "options", ")", ";", "const", "res", "=", "await", "customsearch", ".", "cse", ".", "list", "(", "{", "cx", ":", "options", ".", "cx", ",", "q", ":", "options", ...
Ex: node customsearch.js "Google Node.js" "API KEY" "CUSTOM ENGINE ID"
[ "Ex", ":", "node", "customsearch", ".", "js", "Google", "Node", ".", "js", "API", "KEY", "CUSTOM", "ENGINE", "ID" ]
e6e632a29d0b246d058e3067de3a5c3827e2b54e
https://github.com/googleapis/google-api-nodejs-client/blob/e6e632a29d0b246d058e3067de3a5c3827e2b54e/samples/customsearch/customsearch.js#L26-L35
train
A sample function that runs the customsearch API
[ 30522, 2004, 6038, 2278, 3853, 3216, 16613, 2571, 1006, 7047, 1007, 1063, 10122, 1012, 8833, 1006, 7047, 1007, 1025, 9530, 3367, 24501, 1027, 26751, 8205, 14644, 2818, 1012, 20116, 2063, 1012, 2862, 1006, 1063, 1039, 2595, 1024, 7047, 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...
getsentry/sentry-javascript
packages/raven-node/lib/client.js
Client
function Client(dsn, options) { if (dsn instanceof Client) return dsn; var ravenInstance = new Raven(); return ravenInstance.config.apply(ravenInstance, arguments); }
javascript
function Client(dsn, options) { if (dsn instanceof Client) return dsn; var ravenInstance = new Raven(); return ravenInstance.config.apply(ravenInstance, arguments); }
[ "function", "Client", "(", "dsn", ",", "options", ")", "{", "if", "(", "dsn", "instanceof", "Client", ")", "return", "dsn", ";", "var", "ravenInstance", "=", "new", "Raven", "(", ")", ";", "return", "ravenInstance", ".", "config", ".", "apply", "(", "r...
Maintain old API compat, need to make sure arguments length is preserved
[ "Maintain", "old", "API", "compat", "need", "to", "make", "sure", "arguments", "length", "is", "preserved" ]
a872223343fecf7364473b78bede937f1eb57bd0
https://github.com/getsentry/sentry-javascript/blob/a872223343fecf7364473b78bede937f1eb57bd0/packages/raven-node/lib/client.js#L662-L666
train
Create a new client
[ 30522, 3853, 7396, 1006, 16233, 2078, 1010, 7047, 1007, 1063, 2065, 1006, 16233, 2078, 6013, 11253, 7396, 1007, 2709, 16233, 2078, 1025, 13075, 10000, 7076, 26897, 1027, 2047, 10000, 1006, 1007, 1025, 2709, 10000, 7076, 26897, 1012, 9530, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
exceljs/exceljs
lib/xlsx/xform/style/styles-xform.js
function(id) { // if the style doesn't exist return null var style = this.model.styles[id]; if (!style) return null; // have we built this model before? var model = this.index.model[id]; if (model) return model; // build a new model model = this.index.model[id] = {}; // ----------...
javascript
function(id) { // if the style doesn't exist return null var style = this.model.styles[id]; if (!style) return null; // have we built this model before? var model = this.index.model[id]; if (model) return model; // build a new model model = this.index.model[id] = {}; // ----------...
[ "function", "(", "id", ")", "{", "// if the style doesn't exist return null", "var", "style", "=", "this", ".", "model", ".", "styles", "[", "id", "]", ";", "if", "(", "!", "style", ")", "return", "null", ";", "// have we built this model before?", "var", "mod...
given a styleId (i.e. s="n"), get the cell's style model objects are shared where possible.
[ "given", "a", "styleId", "(", "i", ".", "e", ".", "s", "=", "n", ")", "get", "the", "cell", "s", "style", "model", "objects", "are", "shared", "where", "possible", "." ]
c6ee7a14d5e0e5a07bf0e475aa4dd7b9a1e907f2
https://github.com/exceljs/exceljs/blob/c6ee7a14d5e0e5a07bf0e475aa4dd7b9a1e907f2/lib/xlsx/xform/style/styles-xform.js#L292-L333
train
returns a model for the given id
[ 30522, 3853, 1006, 8909, 1007, 1063, 1013, 1013, 2065, 1996, 2806, 2987, 1005, 1056, 4839, 2709, 19701, 13075, 2806, 1027, 2023, 1012, 2944, 1012, 6782, 1031, 8909, 1033, 1025, 2065, 1006, 999, 2806, 1007, 2709, 19701, 1025, 1013, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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/lines-around-comment.js
isCommentAtParentStart
function isCommentAtParentStart(token, nodeType) { const parent = getParentNodeOfToken(token); return parent && isParentNodeType(parent, nodeType) && token.loc.start.line - parent.loc.start.line === 1; }
javascript
function isCommentAtParentStart(token, nodeType) { const parent = getParentNodeOfToken(token); return parent && isParentNodeType(parent, nodeType) && token.loc.start.line - parent.loc.start.line === 1; }
[ "function", "isCommentAtParentStart", "(", "token", ",", "nodeType", ")", "{", "const", "parent", "=", "getParentNodeOfToken", "(", "token", ")", ";", "return", "parent", "&&", "isParentNodeType", "(", "parent", ",", "nodeType", ")", "&&", "token", ".", "loc",...
Returns whether or not comments are at the parent start or not. @param {token} token The Comment token. @param {string} nodeType The parent type to check against. @returns {boolean} True if the comment is at parent start.
[ "Returns", "whether", "or", "not", "comments", "are", "at", "the", "parent", "start", "or", "not", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/lines-around-comment.js#L202-L207
train
Check if comment is at parent start of node
[ 30522, 3853, 2003, 9006, 3672, 4017, 19362, 11187, 7559, 2102, 1006, 19204, 1010, 13045, 13874, 1007, 1063, 9530, 3367, 6687, 1027, 2131, 19362, 4765, 3630, 3207, 15794, 11045, 2078, 1006, 19204, 1007, 1025, 2709, 6687, 1004, 1004, 2003, 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...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/LocaleData.js
function(sDateStyle, sTimeStyle, sCalendarType) { assert(sDateStyle == "short" || sDateStyle == "medium" || sDateStyle == "long" || sDateStyle == "full", "sStyle must be short, medium, long or full"); assert(sTimeStyle == "short" || sTimeStyle == "medium" || sTimeStyle == "long" || sTimeStyle == "full", "sStyle m...
javascript
function(sDateStyle, sTimeStyle, sCalendarType) { assert(sDateStyle == "short" || sDateStyle == "medium" || sDateStyle == "long" || sDateStyle == "full", "sStyle must be short, medium, long or full"); assert(sTimeStyle == "short" || sTimeStyle == "medium" || sTimeStyle == "long" || sTimeStyle == "full", "sStyle m...
[ "function", "(", "sDateStyle", ",", "sTimeStyle", ",", "sCalendarType", ")", "{", "assert", "(", "sDateStyle", "==", "\"short\"", "||", "sDateStyle", "==", "\"medium\"", "||", "sDateStyle", "==", "\"long\"", "||", "sDateStyle", "==", "\"full\"", ",", "\"sStyle m...
Get combined datetime pattern with given date and and time style. @param {string} sDateStyle the required style for the date part @param {string} sTimeStyle the required style for the time part @param {sap.ui.core.CalendarType} [sCalendarType] the type of calendar. If it's not set, it falls back to the calendar type e...
[ "Get", "combined", "datetime", "pattern", "with", "given", "date", "and", "and", "time", "style", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/LocaleData.js#L247-L254
train
Returns a date time pattern for the given date style and time style.
[ 30522, 3853, 1006, 17371, 8520, 27983, 1010, 2358, 14428, 21756, 2571, 1010, 4094, 8943, 5339, 18863, 1007, 1063, 20865, 1006, 17371, 8520, 27983, 1027, 1027, 1000, 2460, 1000, 1064, 1064, 17371, 8520, 27983, 1027, 1027, 1000, 5396, 1000, 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...
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_getCategoryId
function addonsManager_getCategoryId(aSpec) { var spec = aSpec || { }; var category = spec.category; if (!category) throw new Error(arguments.callee.name + ": Category not specified."); return category.getNode().id; }
javascript
function addonsManager_getCategoryId(aSpec) { var spec = aSpec || { }; var category = spec.category; if (!category) throw new Error(arguments.callee.name + ": Category not specified."); return category.getNode().id; }
[ "function", "addonsManager_getCategoryId", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "category", "=", "spec", ".", "category", ";", "if", "(", "!", "category", ")", "throw", "new", "Error", "(", "arguments", ".", ...
Get the ID of the given category element @param {object} aSpec Information for getting a category Elements: category - Category to get the id from @returns Category Id @type {string}
[ "Get", "the", "ID", "of", "the", "given", "category", "element" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L679-L687
train
Returns the category id for the given add - ons
[ 30522, 3853, 5587, 5644, 24805, 4590, 1035, 2131, 16280, 20255, 10139, 2094, 1006, 2004, 5051, 2278, 1007, 1063, 13075, 28699, 1027, 2004, 5051, 2278, 1064, 1064, 1063, 1065, 1025, 13075, 4696, 1027, 28699, 1012, 4696, 1025, 2065, 1006, 999...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
dequelabs/axe-core
lib/commons/color/get-background-color.js
contentOverlapping
function contentOverlapping(targetElement, bgNode) { // get content box of target element // check to see if the current bgNode is overlapping var targetRect = targetElement.getClientRects()[0]; var obscuringElements = dom.shadowElementsFromPoint( targetRect.left, targetRect.top ); if (obscuringElements) { ...
javascript
function contentOverlapping(targetElement, bgNode) { // get content box of target element // check to see if the current bgNode is overlapping var targetRect = targetElement.getClientRects()[0]; var obscuringElements = dom.shadowElementsFromPoint( targetRect.left, targetRect.top ); if (obscuringElements) { ...
[ "function", "contentOverlapping", "(", "targetElement", ",", "bgNode", ")", "{", "// get content box of target element", "// check to see if the current bgNode is overlapping", "var", "targetRect", "=", "targetElement", ".", "getClientRects", "(", ")", "[", "0", "]", ";", ...
Determines overlap of node's content with a bgNode. Used for inline elements @private @param {Element} targetElement @param {Element} bgNode @return {Boolean}
[ "Determines", "overlap", "of", "node", "s", "content", "with", "a", "bgNode", ".", "Used", "for", "inline", "elements" ]
727323c07980e2291575f545444d389fb942906f
https://github.com/dequelabs/axe-core/blob/727323c07980e2291575f545444d389fb942906f/lib/commons/color/get-background-color.js#L338-L357
train
check if target element is overlapping with bgNode
[ 30522, 3853, 4180, 7840, 2721, 14853, 1006, 4539, 12260, 3672, 1010, 1038, 26745, 3207, 1007, 1063, 1013, 1013, 2131, 4180, 3482, 1997, 4539, 5783, 1013, 1013, 4638, 2000, 2156, 2065, 1996, 2783, 1038, 26745, 3207, 2003, 20567, 13075, 4539,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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(point, angle, range) { var sin = Math.sin(angle); var cos = Math.cos(angle); return this.ray(sin, cos, range, { x: point.x, y: point.y, height: 0, dist: 0 }); }
javascript
function(point, angle, range) { var sin = Math.sin(angle); var cos = Math.cos(angle); return this.ray(sin, cos, range, { x: point.x, y: point.y, height: 0, dist: 0 }); }
[ "function", "(", "point", ",", "angle", ",", "range", ")", "{", "var", "sin", "=", "Math", ".", "sin", "(", "angle", ")", ";", "var", "cos", "=", "Math", ".", "cos", "(", "angle", ")", ";", "return", "this", ".", "ray", "(", "sin", ",", "cos", ...
Casts a ray from the camera and returns the results. @param {Object} point Player/camera's x/y position. @param {Number} angle Angle (in radians) of camera. @param {Number} range Max length of the ray.
[ "Casts", "a", "ray", "from", "the", "camera", "and", "returns", "the", "results", "." ]
030db918dd8ce640afd57e172418472497e8f113
https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/examples/3d/js/map.js#L140-L150
train
Returns a ray of the given point on the cluster
[ 30522, 3853, 1006, 2391, 1010, 6466, 1010, 2846, 1007, 1063, 13075, 8254, 1027, 8785, 1012, 8254, 1006, 6466, 1007, 1025, 13075, 2522, 2015, 1027, 8785, 1012, 2522, 2015, 1006, 6466, 1007, 1025, 2709, 2023, 1012, 4097, 1006, 8254, 1010, 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...
GoogleChrome/workbox
packages/workbox-webpack-plugin/src/lib/get-manifest-entries-from-compilation.js
generateMetadataForAssets
function generateMetadataForAssets(assets, chunks) { const mapping = {}; // Start out by getting metadata for all the assets associated with a chunk. for (const chunk of chunks) { for (const file of chunk.files) { mapping[file] = { chunkName: chunk.name, hash: chunk.renderedHash, ...
javascript
function generateMetadataForAssets(assets, chunks) { const mapping = {}; // Start out by getting metadata for all the assets associated with a chunk. for (const chunk of chunks) { for (const file of chunk.files) { mapping[file] = { chunkName: chunk.name, hash: chunk.renderedHash, ...
[ "function", "generateMetadataForAssets", "(", "assets", ",", "chunks", ")", "{", "const", "mapping", "=", "{", "}", ";", "// Start out by getting metadata for all the assets associated with a chunk.", "for", "(", "const", "chunk", "of", "chunks", ")", "{", "for", "(",...
Takes in compilation.assets and compilation.chunks, and assigns metadata to each file listed in assets: - If the asset was created by a chunk, it assigns the existing chunk name and chunk hash. - If the asset was created outside of a chunk, it assigns a chunk name of '' and generates a hash of the asset. @param {Obje...
[ "Takes", "in", "compilation", ".", "assets", "and", "compilation", ".", "chunks", "and", "assigns", "metadata", "to", "each", "file", "listed", "in", "assets", ":" ]
8379c51b6deaf52faed5879206fe84579cae41f0
https://github.com/GoogleChrome/workbox/blob/8379c51b6deaf52faed5879206fe84579cae41f0/packages/workbox-webpack-plugin/src/lib/get-manifest-entries-from-compilation.js#L99-L127
train
Generate metadata for all the assets associated with a chunk.
[ 30522, 3853, 9699, 11368, 8447, 2696, 29278, 27241, 3215, 1006, 7045, 1010, 24839, 1007, 1063, 9530, 3367, 12375, 1027, 1063, 1065, 1025, 1013, 1013, 2707, 2041, 2011, 2893, 27425, 2005, 2035, 1996, 7045, 3378, 2007, 1037, 20000, 1012, 2005...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
firebase/firebaseui-web
gulpfile.js
buildFirebaseUiJs
function buildFirebaseUiJs(locale) { const flags = { closure_entry_point: 'firebaseui.auth.exports', define: `goog.LOCALE='${locale}'`, externs: [ 'node_modules/firebase/externs/firebase-app-externs.js', 'node_modules/firebase/externs/firebase-auth-externs.js', 'node_modules/firebase/ext...
javascript
function buildFirebaseUiJs(locale) { const flags = { closure_entry_point: 'firebaseui.auth.exports', define: `goog.LOCALE='${locale}'`, externs: [ 'node_modules/firebase/externs/firebase-app-externs.js', 'node_modules/firebase/externs/firebase-auth-externs.js', 'node_modules/firebase/ext...
[ "function", "buildFirebaseUiJs", "(", "locale", ")", "{", "const", "flags", "=", "{", "closure_entry_point", ":", "'firebaseui.auth.exports'", ",", "define", ":", "`", "${", "locale", "}", "`", ",", "externs", ":", "[", "'node_modules/firebase/externs/firebase-app-e...
Builds the core FirebaseUI binary in the given locale. @param {string} locale @return {*} A stream that finishes when compilation finishes.
[ "Builds", "the", "core", "FirebaseUI", "binary", "in", "the", "given", "locale", "." ]
c10aa51e38aeb38dc63baa22b48cd6690c2be087
https://github.com/firebase/firebaseui-web/blob/c10aa51e38aeb38dc63baa22b48cd6690c2be087/gulpfile.js#L186-L211
train
Build Firebase UI JS
[ 30522, 3853, 3857, 10273, 15058, 10179, 22578, 1006, 2334, 2063, 1007, 1063, 9530, 3367, 9245, 1027, 1063, 8503, 1035, 4443, 1035, 2391, 1024, 1005, 2543, 15058, 10179, 1012, 8740, 2705, 1012, 14338, 1005, 1010, 9375, 1024, 1036, 27571, 229...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/util/symbol.js
symbolPathSetColor
function symbolPathSetColor(color, innerColor) { if (this.type !== 'image') { var symbolStyle = this.style; var symbolShape = this.shape; if (symbolShape && symbolShape.symbolType === 'line') { symbolStyle.stroke = color; } else if (this.__isEmptyBrush) { ...
javascript
function symbolPathSetColor(color, innerColor) { if (this.type !== 'image') { var symbolStyle = this.style; var symbolShape = this.shape; if (symbolShape && symbolShape.symbolType === 'line') { symbolStyle.stroke = color; } else if (this.__isEmptyBrush) { ...
[ "function", "symbolPathSetColor", "(", "color", ",", "innerColor", ")", "{", "if", "(", "this", ".", "type", "!==", "'image'", ")", "{", "var", "symbolStyle", "=", "this", ".", "style", ";", "var", "symbolShape", "=", "this", ".", "shape", ";", "if", "...
Provide setColor helper method to avoid determine if set the fill or stroke outside
[ "Provide", "setColor", "helper", "method", "to", "avoid", "determine", "if", "set", "the", "fill", "or", "stroke", "outside" ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/util/symbol.js#L301-L319
train
set color of symbol
[ 30522, 3853, 6454, 15069, 13462, 18717, 1006, 3609, 1010, 5110, 18717, 1007, 1063, 2065, 1006, 2023, 1012, 2828, 999, 1027, 1027, 1005, 3746, 1005, 1007, 1063, 13075, 9255, 27983, 1027, 2023, 1012, 2806, 1025, 13075, 9255, 3270, 5051, 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/search/FindInFiles.js
_removeListeners
function _removeListeners() { DocumentModule.off("documentChange", _documentChangeHandler); FileSystem.off("change", _debouncedFileSystemChangeHandler); DocumentManager.off("fileNameChange", _fileNameChangeHandler); }
javascript
function _removeListeners() { DocumentModule.off("documentChange", _documentChangeHandler); FileSystem.off("change", _debouncedFileSystemChangeHandler); DocumentManager.off("fileNameChange", _fileNameChangeHandler); }
[ "function", "_removeListeners", "(", ")", "{", "DocumentModule", ".", "off", "(", "\"documentChange\"", ",", "_documentChangeHandler", ")", ";", "FileSystem", ".", "off", "(", "\"change\"", ",", "_debouncedFileSystemChangeHandler", ")", ";", "DocumentManager", ".", ...
Remove the listeners that were tracking potential search result changes
[ "Remove", "the", "listeners", "that", "were", "tracking", "potential", "search", "result", "changes" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/search/FindInFiles.js#L91-L95
train
Remove all listeners
[ 30522, 3853, 1035, 6366, 9863, 24454, 2015, 1006, 1007, 1063, 6254, 5302, 8566, 2571, 1012, 2125, 1006, 1000, 6254, 22305, 2063, 1000, 1010, 1035, 6254, 22305, 24660, 21222, 1007, 1025, 6764, 27268, 6633, 1012, 2125, 1006, 1000, 2689, 1000,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/techinfo/TechnicalInfo.js
function (sBootstrapURL) { var oModel = this._oDialog.getModel("view"), oSettings = { // start the application in support mode support: "true", // open in new window window: oModel.getProperty("/OpenSupportAssistantInNewWindow") }; this._loadAssistant(sBootstrapURL, oSettings); }
javascript
function (sBootstrapURL) { var oModel = this._oDialog.getModel("view"), oSettings = { // start the application in support mode support: "true", // open in new window window: oModel.getProperty("/OpenSupportAssistantInNewWindow") }; this._loadAssistant(sBootstrapURL, oSettings); }
[ "function", "(", "sBootstrapURL", ")", "{", "var", "oModel", "=", "this", ".", "_oDialog", ".", "getModel", "(", "\"view\"", ")", ",", "oSettings", "=", "{", "// start the application in support mode", "support", ":", "\"true\"", ",", "// open in new window", "win...
Start the support assistant with the given bootstrap URL By default, it is started with the current version for >=1.48 release or SAPUI5 CDN version for lower releases. This behavior can be overridden by specifying a custom bootstrap URL where the support assistant is loaded from @param {string} [sBootstrapURL] If spec...
[ "Start", "the", "support", "assistant", "with", "the", "given", "bootstrap", "URL", "By", "default", "it", "is", "started", "with", "the", "current", "version", "for", ">", "=", "1", ".", "48", "release", "or", "SAPUI5", "CDN", "version", "for", "lower", ...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L511-L521
train
Load the assistant
[ 30522, 3853, 1006, 24829, 17206, 20528, 5311, 2140, 1007, 1063, 13075, 18168, 10244, 2140, 1027, 2023, 1012, 1035, 21045, 23067, 2290, 1012, 2131, 5302, 9247, 1006, 1000, 3193, 1000, 1007, 1010, 9808, 18319, 3070, 2015, 1027, 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...
dcloudio/mui
examples/hello-mui/js/update.js
update
function update() { mui.getJSON(server, { "appid": plus.runtime.appid, "version": plus.runtime.version, "imei": plus.device.imei }, function(data) { if (data.status) { plus.nativeUI.confirm(data.note, function(event) { if (0 == event.index) { plus.runtime.openURL(data.url); } }, data.title,...
javascript
function update() { mui.getJSON(server, { "appid": plus.runtime.appid, "version": plus.runtime.version, "imei": plus.device.imei }, function(data) { if (data.status) { plus.nativeUI.confirm(data.note, function(event) { if (0 == event.index) { plus.runtime.openURL(data.url); } }, data.title,...
[ "function", "update", "(", ")", "{", "mui", ".", "getJSON", "(", "server", ",", "{", "\"appid\"", ":", "plus", ".", "runtime", ".", "appid", ",", "\"version\"", ":", "plus", ".", "runtime", ".", "version", ",", "\"imei\"", ":", "plus", ".", "device", ...
获取升级描述文件服务器地址
[ "获取升级描述文件服务器地址" ]
ff74c90a1671a552f3604b1288bf38a4126312d0
https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/hello-mui/js/update.js#L19-L33
train
update the device
[ 30522, 3853, 10651, 1006, 1007, 1063, 14163, 2072, 1012, 2131, 22578, 2239, 1006, 8241, 1010, 1063, 1000, 10439, 3593, 1000, 1024, 4606, 1012, 2448, 7292, 1012, 10439, 3593, 1010, 1000, 2544, 1000, 1024, 4606, 1012, 2448, 7292, 1012, 2544, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 (sPropertyValue) { var bIsBinding = false; if (sPropertyValue && typeof sPropertyValue === "string" && sPropertyValue.substring(0, 1) === "{" && sPropertyValue.slice(-1) === "}") { bIsBinding = true; } return bIsBinding; }
javascript
function (sPropertyValue) { var bIsBinding = false; if (sPropertyValue && typeof sPropertyValue === "string" && sPropertyValue.substring(0, 1) === "{" && sPropertyValue.slice(-1) === "}") { bIsBinding = true; } return bIsBinding; }
[ "function", "(", "sPropertyValue", ")", "{", "var", "bIsBinding", "=", "false", ";", "if", "(", "sPropertyValue", "&&", "typeof", "sPropertyValue", "===", "\"string\"", "&&", "sPropertyValue", ".", "substring", "(", "0", ",", "1", ")", "===", "\"{\"", "&&", ...
Indicates if the property value represents a binding @param {object} sPropertyValue - Property value @returns {boolean} true if value represents a binding @public @function @name sap.ui.fl.Utils.isBinding
[ "Indicates", "if", "the", "property", "value", "represents", "a", "binding" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/Utils.js#L316-L322
train
Determines if the given property value is a binding
[ 30522, 3853, 1006, 11867, 18981, 15010, 10175, 5657, 1007, 1063, 13075, 20377, 8428, 4667, 1027, 6270, 1025, 2065, 1006, 11867, 18981, 15010, 10175, 5657, 1004, 1004, 2828, 11253, 11867, 18981, 15010, 10175, 5657, 1027, 1027, 1027, 1000, 5164...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/util/timing.js
alignLeft
function alignLeft(str, len, ch) { return str + new Array(len - str.length + 1).join(ch || " "); }
javascript
function alignLeft(str, len, ch) { return str + new Array(len - str.length + 1).join(ch || " "); }
[ "function", "alignLeft", "(", "str", ",", "len", ",", "ch", ")", "{", "return", "str", "+", "new", "Array", "(", "len", "-", "str", ".", "length", "+", "1", ")", ".", "join", "(", "ch", "||", "\" \"", ")", ";", "}" ]
/* istanbul ignore next Align the string to left @param {string} str string to evaluate @param {int} len length of the string @param {string} ch delimiter character @returns {string} modified string @private
[ "/", "*", "istanbul", "ignore", "next", "Align", "the", "string", "to", "left" ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/util/timing.js#L21-L23
train
Aligns str to the left
[ 30522, 3853, 25705, 2571, 6199, 1006, 2358, 2099, 1010, 18798, 1010, 10381, 1007, 1063, 2709, 2358, 2099, 1009, 2047, 9140, 1006, 18798, 1011, 2358, 2099, 1012, 3091, 1009, 1015, 1007, 1012, 3693, 1006, 10381, 1064, 1064, 1000, 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...
eslint/eslint
lib/util/ast-utils.js
equalTokens
function equalTokens(left, right, sourceCode) { const tokensL = sourceCode.getTokens(left); const tokensR = sourceCode.getTokens(right); if (tokensL.length !== tokensR.length) { return false; } for (let i = 0; i < tokensL.length; ++i) { if (tokensL[i].type !== tokensR[i].type || ...
javascript
function equalTokens(left, right, sourceCode) { const tokensL = sourceCode.getTokens(left); const tokensR = sourceCode.getTokens(right); if (tokensL.length !== tokensR.length) { return false; } for (let i = 0; i < tokensL.length; ++i) { if (tokensL[i].type !== tokensR[i].type || ...
[ "function", "equalTokens", "(", "left", ",", "right", ",", "sourceCode", ")", "{", "const", "tokensL", "=", "sourceCode", ".", "getTokens", "(", "left", ")", ";", "const", "tokensR", "=", "sourceCode", ".", "getTokens", "(", "right", ")", ";", "if", "(",...
Checks whether or not the tokens of two given nodes are same. @param {ASTNode} left - A node 1 to compare. @param {ASTNode} right - A node 2 to compare. @param {SourceCode} sourceCode - The ESLint source code object. @returns {boolean} the source code for the given node.
[ "Checks", "whether", "or", "not", "the", "tokens", "of", "two", "given", "nodes", "are", "same", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/util/ast-utils.js#L412-L428
train
Check if two tokens are equal
[ 30522, 3853, 5020, 18715, 6132, 1006, 2187, 1010, 2157, 1010, 3120, 16044, 1007, 1063, 9530, 3367, 19204, 14540, 1027, 3120, 16044, 1012, 2131, 18715, 6132, 1006, 2187, 1007, 1025, 9530, 3367, 19204, 21338, 1027, 3120, 16044, 1012, 2131, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
muaz-khan/RecordRTC
WebGL-Recording/view.js
init
function init() { var menu = $('#menu').show(); var scorecard = $('#scorecard').hide(); scorecard.find('.info').html(menu.find('.info').html()); var canvas = $('canvas'); var debug = $('#debug'); // Standard GLGE initialization. var renderer = new GLGE.Renderer(canvas[0]); scene = doc.getElement('main...
javascript
function init() { var menu = $('#menu').show(); var scorecard = $('#scorecard').hide(); scorecard.find('.info').html(menu.find('.info').html()); var canvas = $('canvas'); var debug = $('#debug'); // Standard GLGE initialization. var renderer = new GLGE.Renderer(canvas[0]); scene = doc.getElement('main...
[ "function", "init", "(", ")", "{", "var", "menu", "=", "$", "(", "'#menu'", ")", ".", "show", "(", ")", ";", "var", "scorecard", "=", "$", "(", "'#scorecard'", ")", ".", "hide", "(", ")", ";", "scorecard", ".", "find", "(", "'.info'", ")", ".", ...
Main ====
[ "Main", "====" ]
3c6bad427b9da35c1cf617199ed13dda056c38ba
https://github.com/muaz-khan/RecordRTC/blob/3c6bad427b9da35c1cf617199ed13dda056c38ba/WebGL-Recording/view.js#L138-L316
train
Initialize the GLGE.
[ 30522, 3853, 1999, 4183, 1006, 1007, 1063, 13075, 12183, 1027, 1002, 1006, 1005, 1001, 12183, 1005, 1007, 1012, 2265, 1006, 1007, 1025, 13075, 3556, 30524, 1027, 1002, 1006, 1005, 10683, 1005, 1007, 1025, 13075, 2139, 8569, 2290, 1027, 1002...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
airyland/vux
build/build-components.js
buildPlugin
function buildPlugin(name) { delete config.entry config.plugins.forEach((one, index) => { if (one.constructor.name === 'ExtractTextPlugin') { config.plugins.splice(index, 1) } }) config.plugins.push(new ExtractTextPlugin({ filename: 'index.min.css' })) config.entry = config.entry || {} ...
javascript
function buildPlugin(name) { delete config.entry config.plugins.forEach((one, index) => { if (one.constructor.name === 'ExtractTextPlugin') { config.plugins.splice(index, 1) } }) config.plugins.push(new ExtractTextPlugin({ filename: 'index.min.css' })) config.entry = config.entry || {} ...
[ "function", "buildPlugin", "(", "name", ")", "{", "delete", "config", ".", "entry", "config", ".", "plugins", ".", "forEach", "(", "(", "one", ",", "index", ")", "=>", "{", "if", "(", "one", ".", "constructor", ".", "name", "===", "'ExtractTextPlugin'", ...
build plugins
[ "build", "plugins" ]
484fc3c18bdca99b0c08efbb678c0ee0f5ceedd6
https://github.com/airyland/vux/blob/484fc3c18bdca99b0c08efbb678c0ee0f5ceedd6/build/build-components.js#L208-L229
train
Build a plugin
[ 30522, 3853, 3857, 24759, 15916, 2378, 1006, 2171, 1007, 1063, 3972, 12870, 9530, 8873, 2290, 1012, 4443, 9530, 8873, 2290, 1012, 13354, 7076, 1012, 18921, 6776, 1006, 1006, 2028, 1010, 5950, 1007, 1027, 1028, 1063, 2065, 1006, 2028, 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...
moleculerjs/moleculer
examples/middlewares/index.js
middleware2
function middleware2() { return function (handler) { return function mw2(ctx) { broker.logger.info(chalk.magenta("mw2 before-promise", ctx.action.name)); return new broker.Promise(resolve => { setTimeout(() => { broker.logger.info(chalk.magenta("mw2 before", ctx.action.name)); //resolve("data fr...
javascript
function middleware2() { return function (handler) { return function mw2(ctx) { broker.logger.info(chalk.magenta("mw2 before-promise", ctx.action.name)); return new broker.Promise(resolve => { setTimeout(() => { broker.logger.info(chalk.magenta("mw2 before", ctx.action.name)); //resolve("data fr...
[ "function", "middleware2", "(", ")", "{", "return", "function", "(", "handler", ")", "{", "return", "function", "mw2", "(", "ctx", ")", "{", "broker", ".", "logger", ".", "info", "(", "chalk", ".", "magenta", "(", "\"mw2 before-promise\"", ",", "ctx", "....
Promise example
[ "Promise", "example" ]
f95aadc2d61b0d0e3c643a43c3ed28bca6425cde
https://github.com/moleculerjs/moleculer/blob/f95aadc2d61b0d0e3c643a43c3ed28bca6425cde/examples/middlewares/index.js#L25-L44
train
Middleware for middleware2
[ 30522, 3853, 2690, 8059, 2475, 1006, 1007, 1063, 2709, 3853, 1006, 28213, 1007, 1063, 2709, 3853, 12464, 2475, 1006, 14931, 2595, 1007, 1063, 20138, 1012, 8833, 4590, 1012, 18558, 1006, 16833, 1012, 17454, 12380, 1006, 1000, 12464, 2475, 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...
adobe/brackets
src/extensions/default/InlineTimingFunctionEditor/StepEditor.js
function (settings) { var setting, i, j, last, interval, sp = this.stepParams, isStart = (sp.timing === "start"), p = []; var defaultSettings = { bgColor: "transparent", borderColor: "#bbb", ...
javascript
function (settings) { var setting, i, j, last, interval, sp = this.stepParams, isStart = (sp.timing === "start"), p = []; var defaultSettings = { bgColor: "transparent", borderColor: "#bbb", ...
[ "function", "(", "settings", ")", "{", "var", "setting", ",", "i", ",", "j", ",", "last", ",", "interval", ",", "sp", "=", "this", ".", "stepParams", ",", "isStart", "=", "(", "sp", ".", "timing", "===", "\"start\"", ")", ",", "p", "=", "[", "]",...
Paint canvas @param {Object} settings Paint settings
[ "Paint", "canvas" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/InlineTimingFunctionEditor/StepEditor.js#L158-L213
train
This function is the main function of the algorithm
[ 30522, 3853, 1006, 10906, 1007, 1063, 13075, 4292, 1010, 1045, 1010, 1046, 1010, 2197, 1010, 13483, 1010, 11867, 1027, 2023, 1012, 3357, 28689, 5244, 1010, 26354, 7559, 2102, 1027, 1006, 11867, 1012, 10984, 1027, 1027, 1027, 1000, 2707, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/StaticServer/node/StaticServerDomain.js
_cmdSetRequestFilterPaths
function _cmdSetRequestFilterPaths(root, paths) { var pathKey = getPathKey(root), rewritePaths = {}; // reset list of filtered paths for each call to setRequestFilterPaths _rewritePaths[pathKey] = rewritePaths; paths.forEach(function (path) { rewritePaths[path] = pathJoin(root, path); ...
javascript
function _cmdSetRequestFilterPaths(root, paths) { var pathKey = getPathKey(root), rewritePaths = {}; // reset list of filtered paths for each call to setRequestFilterPaths _rewritePaths[pathKey] = rewritePaths; paths.forEach(function (path) { rewritePaths[path] = pathJoin(root, path); ...
[ "function", "_cmdSetRequestFilterPaths", "(", "root", ",", "paths", ")", "{", "var", "pathKey", "=", "getPathKey", "(", "root", ")", ",", "rewritePaths", "=", "{", "}", ";", "// reset list of filtered paths for each call to setRequestFilterPaths", "_rewritePaths", "[", ...
@private Defines a set of paths from a server's root path to watch and fire "request" events for. @param {string} path The absolute path whose server we should watch @param {Array.<string>} paths An array of root-relative paths to watch. Each path should begin with a forward slash "/".
[ "@private", "Defines", "a", "set", "of", "paths", "from", "a", "server", "s", "root", "path", "to", "watch", "and", "fire", "request", "events", "for", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/StaticServer/node/StaticServerDomain.js#L313-L323
train
Set the paths to be filtered by the application
[ 30522, 3853, 1035, 4642, 5104, 3388, 2890, 15500, 8873, 21928, 15069, 2015, 1006, 7117, 1010, 10425, 1007, 1063, 13075, 4130, 14839, 1027, 2131, 15069, 14839, 1006, 7117, 1007, 1010, 2128, 26373, 15069, 2015, 1027, 1063, 1065, 1025, 1013, 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...
dcloudio/mui
examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js
function (elem) { var i, el, j, tag, attribute, value, css, cssAttrs, attr, cssName, cssValue; if (elem.nodeType == Strophe.ElementType.NORMAL) { tag = elem.nodeName; if(Strophe.XHTML.validTag(tag)) { try { el = Strophe.xmlElement(ta...
javascript
function (elem) { var i, el, j, tag, attribute, value, css, cssAttrs, attr, cssName, cssValue; if (elem.nodeType == Strophe.ElementType.NORMAL) { tag = elem.nodeName; if(Strophe.XHTML.validTag(tag)) { try { el = Strophe.xmlElement(ta...
[ "function", "(", "elem", ")", "{", "var", "i", ",", "el", ",", "j", ",", "tag", ",", "attribute", ",", "value", ",", "css", ",", "cssAttrs", ",", "attr", ",", "cssName", ",", "cssValue", ";", "if", "(", "elem", ".", "nodeType", "==", "Strophe", "...
Function: createHtml Copy an HTML DOM element into an XML DOM. This function copies a DOM element and all its descendants and returns the new copy. Parameters: (HTMLElement) elem - A DOM element. Returns: A new, copied DOM element tree.
[ "Function", ":", "createHtml", "Copy", "an", "HTML", "DOM", "element", "into", "an", "XML", "DOM", "." ]
ff74c90a1671a552f3604b1288bf38a4126312d0
https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js#L1183-L1245
train
Returns the current page s page s page structure
[ 30522, 3853, 1006, 3449, 6633, 1007, 1063, 13075, 1045, 1010, 3449, 1010, 1046, 1010, 6415, 1010, 17961, 1010, 3643, 1010, 20116, 2015, 1010, 20116, 16846, 16344, 2015, 1010, 2012, 16344, 1010, 20116, 2015, 18442, 1010, 20116, 2015, 10175, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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(id) { var self = this; var duration = self._duration; // If we pass an ID, get the sound and return the sprite length. var sound = self._soundById(id); if (sound) { duration = self._sprite[sound._sprite][1] / 1000; } return duration; }
javascript
function(id) { var self = this; var duration = self._duration; // If we pass an ID, get the sound and return the sprite length. var sound = self._soundById(id); if (sound) { duration = self._sprite[sound._sprite][1] / 1000; } return duration; }
[ "function", "(", "id", ")", "{", "var", "self", "=", "this", ";", "var", "duration", "=", "self", ".", "_duration", ";", "// If we pass an ID, get the sound and return the sprite length.", "var", "sound", "=", "self", ".", "_soundById", "(", "id", ")", ";", "i...
Get the duration of this sound. Passing a sound id will return the sprite duration. @param {Number} id The sound id to check. If none is passed, return full source duration. @return {Number} Audio duration in seconds.
[ "Get", "the", "duration", "of", "this", "sound", ".", "Passing", "a", "sound", "id", "will", "return", "the", "sprite", "duration", "." ]
030db918dd8ce640afd57e172418472497e8f113
https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/dist/howler.js#L1677-L1688
train
Returns the duration of the sound
[ 30522, 3853, 1006, 8909, 1007, 1063, 13075, 2969, 1027, 2023, 1025, 13075, 9367, 1027, 2969, 1012, 1035, 9367, 1025, 1013, 1013, 2065, 2057, 3413, 2019, 8909, 1010, 2131, 1996, 2614, 1998, 2709, 1996, 11867, 17625, 3091, 1012, 13075, 2614, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
cytoscape/cytoscape.js
dist/cytoscape.esm.js
getBarrelCurveConstants
function getBarrelCurveConstants(width, height) { return { heightOffset: Math.min(15, 0.05 * height), widthOffset: Math.min(100, 0.25 * width), ctrlPtOffsetPct: 0.05 }; }
javascript
function getBarrelCurveConstants(width, height) { return { heightOffset: Math.min(15, 0.05 * height), widthOffset: Math.min(100, 0.25 * width), ctrlPtOffsetPct: 0.05 }; }
[ "function", "getBarrelCurveConstants", "(", "width", ",", "height", ")", "{", "return", "{", "heightOffset", ":", "Math", ".", "min", "(", "15", ",", "0.05", "*", "height", ")", ",", "widthOffset", ":", "Math", ".", "min", "(", "100", ",", "0.25", "*",...
get curve width, height, and control point position offsets as a percentage of node height / width
[ "get", "curve", "width", "height", "and", "control", "point", "position", "offsets", "as", "a", "percentage", "of", "node", "height", "/", "width" ]
ad2051b65e2243cfd953d8b24a8bf95bfa8559e5
https://github.com/cytoscape/cytoscape.js/blob/ad2051b65e2243cfd953d8b24a8bf95bfa8559e5/dist/cytoscape.esm.js#L3192-L3198
train
Returns the constants for the arrel curve
[ 30522, 3853, 2131, 8237, 16570, 10841, 2099, 3726, 8663, 12693, 3215, 1006, 9381, 1010, 4578, 1007, 1063, 2709, 1063, 4578, 27475, 3388, 1024, 8785, 1012, 8117, 1006, 2321, 1010, 1014, 1012, 5709, 1008, 4578, 1007, 1010, 9381, 27475, 3388, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
grunt/config/aliases.js
function(mode) { if (!mode || (mode !== 'src' && mode !== 'target')) { mode = 'src'; } var taskName = 'openui5_connect:' + mode; if (grunt.option('watch') && mode === 'src') { grunt.task.run([ taskName, 'watch']); } else { grunt.task.run(taskName + ':keepalive'); } }
javascript
function(mode) { if (!mode || (mode !== 'src' && mode !== 'target')) { mode = 'src'; } var taskName = 'openui5_connect:' + mode; if (grunt.option('watch') && mode === 'src') { grunt.task.run([ taskName, 'watch']); } else { grunt.task.run(taskName + ':keepalive'); } }
[ "function", "(", "mode", ")", "{", "if", "(", "!", "mode", "||", "(", "mode", "!==", "'src'", "&&", "mode", "!==", "'target'", ")", ")", "{", "mode", "=", "'src'", ";", "}", "var", "taskName", "=", "'openui5_connect:'", "+", "mode", ";", "if", "(",...
Server task
[ "Server", "task" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/grunt/config/aliases.js#L13-L24
train
connects to the remote node
[ 30522, 3853, 1006, 5549, 1007, 1063, 2065, 1006, 999, 5549, 1064, 1064, 1006, 5549, 999, 1027, 1027, 1005, 5034, 2278, 1005, 1004, 1004, 5549, 999, 1027, 1027, 1005, 4539, 1005, 1007, 1007, 1063, 5549, 1027, 1005, 5034, 2278, 1005, 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...
aframevr/aframe
src/systems/camera.js
function () { var cameraEls; var newActiveCameraEl; cameraEls = this.sceneEl.querySelectorAll('[camera]'); newActiveCameraEl = cameraEls[cameraEls.length - 1]; newActiveCameraEl.setAttribute('camera', 'active', true); }
javascript
function () { var cameraEls; var newActiveCameraEl; cameraEls = this.sceneEl.querySelectorAll('[camera]'); newActiveCameraEl = cameraEls[cameraEls.length - 1]; newActiveCameraEl.setAttribute('camera', 'active', true); }
[ "function", "(", ")", "{", "var", "cameraEls", ";", "var", "newActiveCameraEl", ";", "cameraEls", "=", "this", ".", "sceneEl", ".", "querySelectorAll", "(", "'[camera]'", ")", ";", "newActiveCameraEl", "=", "cameraEls", "[", "cameraEls", ".", "length", "-", ...
Set a different active camera. When we choose a (sort of) random scene camera as the replacement, set its `active` to true. The camera component will call `setActiveCamera` and handle passing the torch to the new camera.
[ "Set", "a", "different", "active", "camera", ".", "When", "we", "choose", "a", "(", "sort", "of", ")", "random", "scene", "camera", "as", "the", "replacement", "set", "its", "active", "to", "true", ".", "The", "camera", "component", "will", "call", "setA...
24acc78a7299a4cdfe3ef617f4d40ddf6275c992
https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/systems/camera.js#L132-L138
train
Sets the active camera on the last camera element
[ 30522, 3853, 1006, 1007, 1063, 13075, 4950, 9050, 1025, 13075, 2047, 19620, 28727, 6906, 2884, 1025, 4950, 9050, 1027, 2023, 1012, 3496, 2884, 1012, 23032, 11246, 22471, 6525, 3363, 1006, 1005, 1031, 4950, 1033, 1005, 1007, 1025, 2047, 1962...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/TableUtils.js
function(oTable) { if (!oTable || !oTable.getDomRef()) { return false; } return oTable.getDomRef().querySelector("#" + oTable.getId() + "-sapUiTableGridCnt > .sapUiLocalBusyIndicator") != null; }
javascript
function(oTable) { if (!oTable || !oTable.getDomRef()) { return false; } return oTable.getDomRef().querySelector("#" + oTable.getId() + "-sapUiTableGridCnt > .sapUiLocalBusyIndicator") != null; }
[ "function", "(", "oTable", ")", "{", "if", "(", "!", "oTable", "||", "!", "oTable", ".", "getDomRef", "(", ")", ")", "{", "return", "false", ";", "}", "return", "oTable", ".", "getDomRef", "(", ")", ".", "querySelector", "(", "\"#\"", "+", "oTable", ...
Returns whether the busy indicator is visible. It is considered as visible when the busy indicator element exists in the DOM as a child of the table element. It is not checked whether the indicator is actually visible on the screen. @param {sap.ui.table.Table} oTable Instance of the table. @returns {boolean} Whether t...
[ "Returns", "whether", "the", "busy", "indicator", "is", "visible", ".", "It", "is", "considered", "as", "visible", "when", "the", "busy", "indicator", "element", "exists", "in", "the", "DOM", "as", "a", "child", "of", "the", "table", "element", ".", "It", ...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableUtils.js#L377-L383
train
Returns true if the busy indicator is present in the table.
[ 30522, 3853, 1006, 27178, 3085, 1007, 1063, 2065, 1006, 999, 27178, 3085, 1064, 1064, 999, 27178, 3085, 1012, 2131, 9527, 2890, 2546, 1006, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 2709, 27178, 3085, 1012, 2131, 9527, 2890, 2546, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
ColorlibHQ/AdminLTE
plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js
function(node, touchingIsIntersecting) { assertRangeValid(this); assertNode(node, "NOT_FOUND_ERR"); if (getDocument(node) !== getRangeDocument(this)) { return false; } var parent = node.parentNode, offset = getNodeIndex...
javascript
function(node, touchingIsIntersecting) { assertRangeValid(this); assertNode(node, "NOT_FOUND_ERR"); if (getDocument(node) !== getRangeDocument(this)) { return false; } var parent = node.parentNode, offset = getNodeIndex...
[ "function", "(", "node", ",", "touchingIsIntersecting", ")", "{", "assertRangeValid", "(", "this", ")", ";", "assertNode", "(", "node", ",", "\"NOT_FOUND_ERR\"", ")", ";", "if", "(", "getDocument", "(", "node", ")", "!==", "getRangeDocument", "(", "this", ")...
touchingIsIntersecting determines whether this method considers a node that borders a range intersects with it (as in WebKit) or not (as in Gecko pre-1.9, and the default)
[ "touchingIsIntersecting", "determines", "whether", "this", "method", "considers", "a", "node", "that", "borders", "a", "range", "intersects", "with", "it", "(", "as", "in", "WebKit", ")", "or", "not", "(", "as", "in", "Gecko", "pre", "-", "1", ".", "9", ...
19113c3cbc19a7afe0cfd3158d647064d2d30661
https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js#L1663-L1677
train
Returns true if node is in the range of the specified node
[ 30522, 3853, 1006, 13045, 1010, 7244, 17417, 10111, 22573, 11873, 1007, 1063, 20865, 24388, 13331, 21273, 1006, 2023, 1007, 1025, 20865, 3630, 3207, 1006, 13045, 1010, 1000, 2025, 1035, 2179, 1035, 9413, 2099, 1000, 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...
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/sessionstore.js
undoClosedWindow
function undoClosedWindow(controller, event) { var count = sessionStoreService.getClosedWindowCount(controller.window); switch (event.type) { case "menu": throw new Error("Menu gets build dynamically and cannot be accessed."); break; case "shortcut": var cmdKey = utils.getEntity(this.getD...
javascript
function undoClosedWindow(controller, event) { var count = sessionStoreService.getClosedWindowCount(controller.window); switch (event.type) { case "menu": throw new Error("Menu gets build dynamically and cannot be accessed."); break; case "shortcut": var cmdKey = utils.getEntity(this.getD...
[ "function", "undoClosedWindow", "(", "controller", ",", "event", ")", "{", "var", "count", "=", "sessionStoreService", ".", "getClosedWindowCount", "(", "controller", ".", "window", ")", ";", "switch", "(", "event", ".", "type", ")", "{", "case", "\"menu\"", ...
Restores the window which has been recently closed @param {MozMillController} controller MozMillController of the window to operate on @param {object} event Specifies the event to use to execute the command
[ "Restores", "the", "window", "which", "has", "been", "recently", "closed" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/sessionstore.js#L289-L309
train
Undo a closed window
[ 30522, 3853, 25672, 20464, 24768, 11101, 5004, 1006, 11486, 1010, 2724, 1007, 1063, 13075, 4175, 1027, 6521, 19277, 8043, 7903, 2063, 1012, 2131, 20464, 24768, 11101, 5004, 3597, 16671, 1006, 11486, 1012, 3332, 1007, 1025, 6942, 1006, 2724, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/animation.js
function () { var component; var componentName; for (componentName in this.el.components) { component = this.el.components[componentName]; if (componentName === this.attrName) { continue; } if (component.name !== 'animation') { continue; } if (!component.animationIsPlaying) { continu...
javascript
function () { var component; var componentName; for (componentName in this.el.components) { component = this.el.components[componentName]; if (componentName === this.attrName) { continue; } if (component.name !== 'animation') { continue; } if (!component.animationIsPlaying) { continu...
[ "function", "(", ")", "{", "var", "component", ";", "var", "componentName", ";", "for", "(", "componentName", "in", "this", ".", "el", ".", "components", ")", "{", "component", "=", "this", ".", "el", ".", "components", "[", "componentName", "]", ";", ...
Make sure two animations on the same property don't fight each other. e.g., animation__mouseenter="property: material.opacity" animation__mouseleave="property: material.opacity"
[ "Make", "sure", "two", "animations", "on", "the", "same", "property", "don", "t", "fight", "each", "other", ".", "e", ".", "g", ".", "animation__mouseenter", "=", "property", ":", "material", ".", "opacity", "animation__mouseleave", "=", "property", ":", "ma...
24acc78a7299a4cdfe3ef617f4d40ddf6275c992
https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/components/animation.js#L468-L479
train
This function is called by the animation component when the animation is playing
[ 30522, 3853, 1006, 1007, 1063, 13075, 6922, 1025, 13075, 6922, 18442, 1025, 2005, 1006, 6922, 18442, 1999, 2023, 1012, 3449, 1012, 6177, 1007, 1063, 6922, 1027, 2023, 1012, 3449, 1012, 6177, 1031, 6922, 18442, 1033, 1025, 2065, 1006, 6922, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/command/KeyBindingManager.js
_translateKeyboardEvent
function _translateKeyboardEvent(event) { var hasMacCtrl = (brackets.platform === "mac") ? (event.ctrlKey) : false, hasCtrl = (brackets.platform !== "mac") ? (event.ctrlKey) : (event.metaKey), hasAlt = (event.altKey), hasShift = (event.shiftKey), key = String.from...
javascript
function _translateKeyboardEvent(event) { var hasMacCtrl = (brackets.platform === "mac") ? (event.ctrlKey) : false, hasCtrl = (brackets.platform !== "mac") ? (event.ctrlKey) : (event.metaKey), hasAlt = (event.altKey), hasShift = (event.shiftKey), key = String.from...
[ "function", "_translateKeyboardEvent", "(", "event", ")", "{", "var", "hasMacCtrl", "=", "(", "brackets", ".", "platform", "===", "\"mac\"", ")", "?", "(", "event", ".", "ctrlKey", ")", ":", "false", ",", "hasCtrl", "=", "(", "brackets", ".", "platform", ...
Takes a keyboard event and translates it into a key in a key map
[ "Takes", "a", "keyboard", "event", "and", "translates", "it", "into", "a", "key", "in", "a", "key", "map" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/command/KeyBindingManager.js#L482-L520
train
Translate a keyboard event to a key descriptor
[ 30522, 3853, 1035, 17637, 14839, 6277, 18697, 3372, 1006, 2724, 1007, 1063, 13075, 2038, 22911, 6593, 12190, 1027, 1006, 19719, 1012, 4132, 1027, 1027, 1027, 1000, 6097, 1000, 1007, 1029, 1006, 2724, 1012, 14931, 12190, 14839, 1007, 1024, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/selenium-core/lib/prototype.js
function() { this.deltaX = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0; this.deltaY = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop ...
javascript
function() { this.deltaX = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0; this.deltaY = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop ...
[ "function", "(", ")", "{", "this", ".", "deltaX", "=", "window", ".", "pageXOffset", "||", "document", ".", "documentElement", ".", "scrollLeft", "||", "document", ".", "body", ".", "scrollLeft", "||", "0", ";", "this", ".", "deltaY", "=", "window", ".",...
must be called before calling withinIncludingScrolloffset, every time the page is scrolled
[ "must", "be", "called", "before", "calling", "withinIncludingScrolloffset", "every", "time", "the", "page", "is", "scrolled" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/lib/prototype.js#L1784-L1793
train
This is the function that is called when the page is scrolled.
[ 30522, 3853, 1006, 1007, 1063, 2023, 1012, 7160, 2595, 1027, 3332, 1012, 3931, 2595, 27475, 3388, 1064, 1064, 6254, 1012, 6254, 12260, 3672, 1012, 17186, 2571, 6199, 1064, 1064, 6254, 1012, 2303, 1012, 17186, 2571, 6199, 1064, 1064, 1014, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/output/website/copyPluginAssets.js
copyPluginAssets
function copyPluginAssets(output) { var book = output.getBook(); // Don't copy plugins assets for language book // It'll be resolved to the parent folder if (book.isLanguageBook()) { return Promise(output); } var plugins = output.getPlugins() // We reverse the order of plugins...
javascript
function copyPluginAssets(output) { var book = output.getBook(); // Don't copy plugins assets for language book // It'll be resolved to the parent folder if (book.isLanguageBook()) { return Promise(output); } var plugins = output.getPlugins() // We reverse the order of plugins...
[ "function", "copyPluginAssets", "(", "output", ")", "{", "var", "book", "=", "output", ".", "getBook", "(", ")", ";", "// Don't copy plugins assets for language book", "// It'll be resolved to the parent folder", "if", "(", "book", ".", "isLanguageBook", "(", ")", ")"...
Copy all assets from plugins. Assets are files stored in "_assets" nd resources declared in the plugin itself. @param {Output} @return {Promise}
[ "Copy", "all", "assets", "from", "plugins", ".", "Assets", "are", "files", "stored", "in", "_assets", "nd", "resources", "declared", "in", "the", "plugin", "itself", "." ]
6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4
https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/output/website/copyPluginAssets.js#L15-L37
train
Copy assets from all plugins to the output folder
[ 30522, 3853, 6100, 24759, 15916, 15227, 13462, 2015, 1006, 6434, 1007, 1063, 13075, 2338, 1027, 6434, 1012, 2131, 8654, 1006, 1007, 1025, 1013, 1013, 2123, 1005, 1056, 6100, 13354, 7076, 7045, 2005, 2653, 2338, 1013, 1013, 2009, 1005, 2222,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/component/toolbox/feature/DataView.js
groupSeries
function groupSeries(ecModel) { var seriesGroupByCategoryAxis = {}; var otherSeries = []; var meta = []; ecModel.eachRawSeries(function (seriesModel) { var coordSys = seriesModel.coordinateSystem; if (coordSys && (coordSys.type === 'cartesian2d' || coordSys.type === 'polar')) { ...
javascript
function groupSeries(ecModel) { var seriesGroupByCategoryAxis = {}; var otherSeries = []; var meta = []; ecModel.eachRawSeries(function (seriesModel) { var coordSys = seriesModel.coordinateSystem; if (coordSys && (coordSys.type === 'cartesian2d' || coordSys.type === 'polar')) { ...
[ "function", "groupSeries", "(", "ecModel", ")", "{", "var", "seriesGroupByCategoryAxis", "=", "{", "}", ";", "var", "otherSeries", "=", "[", "]", ";", "var", "meta", "=", "[", "]", ";", "ecModel", ".", "eachRawSeries", "(", "function", "(", "seriesModel", ...
Group series into two types 1. on category axis, like line, bar 2. others, like scatter, pie @param {module:echarts/model/Global} ecModel @return {Object} @inner
[ "Group", "series", "into", "two", "types", "1", ".", "on", "category", "axis", "like", "line", "bar", "2", ".", "others", "like", "scatter", "pie" ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/component/toolbox/feature/DataView.js#L38-L76
train
groupSeries - group series by category axis
[ 30522, 3853, 2967, 28077, 1006, 14925, 5302, 9247, 1007, 1063, 13075, 2186, 17058, 3762, 16280, 20255, 3148, 9048, 2015, 1027, 1063, 1065, 1025, 13075, 2500, 28077, 1027, 1031, 1033, 1025, 13075, 18804, 1027, 1031, 1033, 1025, 14925, 5302, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
badges/shields
services/endpoint-common.js
validateEndpointData
function validateEndpointData( data, { prettyErrorMessage = 'invalid response data', includeKeys = false } = {} ) { return validate( { ErrorClass: InvalidResponse, prettyErrorMessage, includeKeys, traceErrorMessage: 'Response did not match schema', traceSuccessMessage: 'Response ...
javascript
function validateEndpointData( data, { prettyErrorMessage = 'invalid response data', includeKeys = false } = {} ) { return validate( { ErrorClass: InvalidResponse, prettyErrorMessage, includeKeys, traceErrorMessage: 'Response did not match schema', traceSuccessMessage: 'Response ...
[ "function", "validateEndpointData", "(", "data", ",", "{", "prettyErrorMessage", "=", "'invalid response data'", ",", "includeKeys", "=", "false", "}", "=", "{", "}", ")", "{", "return", "validate", "(", "{", "ErrorClass", ":", "InvalidResponse", ",", "prettyErr...
Strictly validate according to the endpoint schema. This rejects unknown / invalid keys. Optionally it prints those keys in the message in order to provide detailed feedback.
[ "Strictly", "validate", "according", "to", "the", "endpoint", "schema", ".", "This", "rejects", "unknown", "/", "invalid", "keys", ".", "Optionally", "it", "prints", "those", "keys", "in", "the", "message", "in", "order", "to", "provide", "detailed", "feedback...
283601423f3d1a19aae83bf62032d40683948636
https://github.com/badges/shields/blob/283601423f3d1a19aae83bf62032d40683948636/services/endpoint-common.js#L45-L61
train
Validate endpoint data
[ 30522, 3853, 9398, 3686, 10497, 8400, 2850, 2696, 1006, 2951, 1010, 1063, 3492, 2121, 29165, 7834, 3736, 3351, 1027, 1005, 19528, 3433, 2951, 1005, 1010, 2421, 14839, 30524, 1010, 2421, 14839, 2015, 1010, 7637, 2121, 29165, 7834, 3736, 3351...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
openlayers/openlayers
src/ol/format/MVT.js
readRawFeature
function readRawFeature(pbf, layer, i) { pbf.pos = layer.features[i]; const end = pbf.readVarint() + pbf.pos; const feature = { layer: layer, type: 0, properties: {} }; pbf.readFields(featurePBFReader, feature, end); return feature; }
javascript
function readRawFeature(pbf, layer, i) { pbf.pos = layer.features[i]; const end = pbf.readVarint() + pbf.pos; const feature = { layer: layer, type: 0, properties: {} }; pbf.readFields(featurePBFReader, feature, end); return feature; }
[ "function", "readRawFeature", "(", "pbf", ",", "layer", ",", "i", ")", "{", "pbf", ".", "pos", "=", "layer", ".", "features", "[", "i", "]", ";", "const", "end", "=", "pbf", ".", "readVarint", "(", ")", "+", "pbf", ".", "pos", ";", "const", "feat...
Read a raw feature from the pbf offset stored at index `i` in the raw layer. @param {PBF} pbf PBF. @param {Object} layer Raw layer. @param {number} i Index of the feature in the raw layer's `features` array. @return {Object} Raw feature.
[ "Read", "a", "raw", "feature", "from", "the", "pbf", "offset", "stored", "at", "index", "i", "in", "the", "raw", "layer", "." ]
f366eaea522388fb575b11010e69d309164baca7
https://github.com/openlayers/openlayers/blob/f366eaea522388fb575b11010e69d309164baca7/src/ol/format/MVT.js#L371-L382
train
Reads a raw feature from a layer
[ 30522, 3853, 3191, 2527, 2860, 7959, 4017, 5397, 1006, 1052, 29292, 1010, 6741, 1010, 1045, 1007, 1063, 1052, 29292, 1012, 13433, 2015, 1027, 6741, 1012, 2838, 1031, 1045, 1033, 1025, 9530, 3367, 2203, 1027, 1052, 29292, 1012, 3191, 10755, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
NervJS/taro
packages/taro/src/internal/_common.js
baseAssignValue
function baseAssignValue(object, key, value) { if (key == '__proto__') { Object.defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }) } else { object[key] = value } }
javascript
function baseAssignValue(object, key, value) { if (key == '__proto__') { Object.defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }) } else { object[key] = value } }
[ "function", "baseAssignValue", "(", "object", ",", "key", ",", "value", ")", "{", "if", "(", "key", "==", "'__proto__'", ")", "{", "Object", ".", "defineProperty", "(", "object", ",", "key", ",", "{", "'configurable'", ":", "true", ",", "'enumerable'", "...
The base implementation of `assignValue` and `assignMergeValue` without value checks. @private @param {Object} object The object to modify. @param {string} key The key of the property to assign. @param {*} value The value to assign.
[ "The", "base", "implementation", "of", "assignValue", "and", "assignMergeValue", "without", "value", "checks", "." ]
274e76d731d7f158141287e31cbd51f092d472c5
https://github.com/NervJS/taro/blob/274e76d731d7f158141287e31cbd51f092d472c5/packages/taro/src/internal/_common.js#L945-L956
train
baseAssignValue - base assign value to object
[ 30522, 3853, 2918, 12054, 23773, 10175, 5657, 1006, 4874, 1010, 3145, 1010, 3643, 1007, 1063, 2065, 1006, 3145, 1027, 1027, 1005, 1035, 1035, 15053, 1035, 1035, 1005, 1007, 1063, 4874, 1012, 9375, 21572, 4842, 3723, 1006, 4874, 1010, 3145, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-alert.js
isShadowed
function isShadowed(scope, node) { const reference = findReference(scope, node); return reference && reference.resolved && reference.resolved.defs.length > 0; }
javascript
function isShadowed(scope, node) { const reference = findReference(scope, node); return reference && reference.resolved && reference.resolved.defs.length > 0; }
[ "function", "isShadowed", "(", "scope", ",", "node", ")", "{", "const", "reference", "=", "findReference", "(", "scope", ",", "node", ")", ";", "return", "reference", "&&", "reference", ".", "resolved", "&&", "reference", ".", "resolved", ".", "defs", ".",...
Checks if the given identifier node is shadowed in the given scope. @param {Object} scope The current scope. @param {string} node The identifier node to check @returns {boolean} Whether or not the name is shadowed.
[ "Checks", "if", "the", "given", "identifier", "node", "is", "shadowed", "in", "the", "given", "scope", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-alert.js#L48-L52
train
Returns true if node is shadowed
[ 30522, 3853, 26354, 16102, 15096, 1006, 9531, 1010, 13045, 1007, 1063, 9530, 3367, 4431, 1027, 2424, 2890, 25523, 1006, 9531, 1010, 13045, 1007, 1025, 2709, 4431, 1004, 1004, 4431, 1012, 10395, 1004, 1004, 4431, 1012, 10395, 1012, 13366, 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...
SeleniumHQ/selenium
common/src/web/jquery-1.3.2.js
num
function num(elem, prop) { return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0; }
javascript
function num(elem, prop) { return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0; }
[ "function", "num", "(", "elem", ",", "prop", ")", "{", "return", "elem", "[", "0", "]", "&&", "parseInt", "(", "jQuery", ".", "curCSS", "(", "elem", "[", "0", "]", ",", "prop", ",", "true", ")", ",", "10", ")", "||", "0", ";", "}" ]
Helper function used by the dimensions and offset modules
[ "Helper", "function", "used", "by", "the", "dimensions", "and", "offset", "modules" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/common/src/web/jquery-1.3.2.js#L1266-L1268
train
Get the number of elements in the DOM
[ 30522, 3853, 16371, 2213, 1006, 3449, 6633, 1010, 17678, 1007, 1063, 2709, 3449, 6633, 1031, 1014, 1033, 1004, 1004, 11968, 20240, 3372, 1006, 1046, 4226, 2854, 1012, 12731, 11890, 4757, 1006, 3449, 6633, 1031, 1014, 1033, 1010, 17678, 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...
fex-team/webuploader
dist/webuploader.withoutimage.js
function( size, pointLength, units ) { var unit; units = units || [ 'B', 'K', 'M', 'G', 'TB' ]; while ( (unit = units.shift()) && size > 1024 ) { size = size / 1024; } return (unit === 'B' ? size : size.to...
javascript
function( size, pointLength, units ) { var unit; units = units || [ 'B', 'K', 'M', 'G', 'TB' ]; while ( (unit = units.shift()) && size > 1024 ) { size = size / 1024; } return (unit === 'B' ? size : size.to...
[ "function", "(", "size", ",", "pointLength", ",", "units", ")", "{", "var", "unit", ";", "units", "=", "units", "||", "[", "'B'", ",", "'K'", ",", "'M'", ",", "'G'", ",", "'TB'", "]", ";", "while", "(", "(", "unit", "=", "units", ".", "shift", ...
格式化文件大小, 输出成带单位的字符串 @method formatSize @grammar Base.formatSize( size ) => String @grammar Base.formatSize( size, pointLength ) => String @grammar Base.formatSize( size, pointLength, units ) => String @param {Number} size 文件大小 @param {Number} [pointLength=2] 精确到的小数点数。 @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]]...
[ "格式化文件大小", "输出成带单位的字符串" ]
7094e4476c5af3b06993d91dde2d223200b9feb7
https://github.com/fex-team/webuploader/blob/7094e4476c5af3b06993d91dde2d223200b9feb7/dist/webuploader.withoutimage.js#L479-L490
train
Returns the size of the image in bytes
[ 30522, 3853, 1006, 2946, 1010, 2391, 7770, 13512, 2232, 1010, 3197, 1007, 1063, 13075, 3131, 1025, 3197, 1027, 3197, 1064, 1064, 1031, 1005, 1038, 1005, 1010, 1005, 1047, 1005, 1010, 1005, 1049, 1005, 1010, 1005, 1043, 1005, 1010, 1005, 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...
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/search.js
searchBar_clear
function searchBar_clear() { var activeElement = this._controller.window.document.activeElement; var searchInput = this.getElement({type: "searchBar_input"}); var cmdKey = utils.getEntity(this.getDtds(), "selectAllCmd.key"); this._controller.keypress(searchInput, cmdKey, {accelKey: true}); this._...
javascript
function searchBar_clear() { var activeElement = this._controller.window.document.activeElement; var searchInput = this.getElement({type: "searchBar_input"}); var cmdKey = utils.getEntity(this.getDtds(), "selectAllCmd.key"); this._controller.keypress(searchInput, cmdKey, {accelKey: true}); this._...
[ "function", "searchBar_clear", "(", ")", "{", "var", "activeElement", "=", "this", ".", "_controller", ".", "window", ".", "document", ".", "activeElement", ";", "var", "searchInput", "=", "this", ".", "getElement", "(", "{", "type", ":", "\"searchBar_input\""...
Clear the search field
[ "Clear", "the", "search", "field" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/search.js#L533-L544
train
Clear all search items
[ 30522, 3853, 3945, 8237, 1035, 3154, 1006, 1007, 1063, 13075, 3161, 12260, 3672, 1027, 2023, 1012, 1035, 11486, 1012, 3332, 1012, 6254, 1012, 3161, 12260, 3672, 1025, 13075, 3945, 2378, 18780, 1027, 2023, 1012, 2131, 12260, 3672, 1006, 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...
SAP/openui5
src/sap.ui.support/src/sap/ui/support/supportRules/History.js
function () { var aOutput = []; _aRuns.forEach(function (oRun) { var oTmp = _generateRootLevelKeys(oRun); for (var sLibraryName in oRun.rules) { _generateLibraryStructure(oTmp, sLibraryName, oRun); for (var sRuleName in oRun.rules[sLibraryName]) { _generateRuleStructure(oTmp, sLibraryNa...
javascript
function () { var aOutput = []; _aRuns.forEach(function (oRun) { var oTmp = _generateRootLevelKeys(oRun); for (var sLibraryName in oRun.rules) { _generateLibraryStructure(oTmp, sLibraryName, oRun); for (var sRuleName in oRun.rules[sLibraryName]) { _generateRuleStructure(oTmp, sLibraryNa...
[ "function", "(", ")", "{", "var", "aOutput", "=", "[", "]", ";", "_aRuns", ".", "forEach", "(", "function", "(", "oRun", ")", "{", "var", "oTmp", "=", "_generateRootLevelKeys", "(", "oRun", ")", ";", "for", "(", "var", "sLibraryName", "in", "oRun", "...
Gets all passed analyses in a JSON object that can easily be converted into a string. @public @method @name sap.ui.support.History.getHistory @returns {Array} Which contains all passed run analysis objects.
[ "Gets", "all", "passed", "analyses", "in", "a", "JSON", "object", "that", "can", "easily", "be", "converted", "into", "a", "string", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/History.js#L191-L209
train
Generates the structure of all the run objects
[ 30522, 30524, 1027, 1035, 9699, 3217, 4140, 20414, 2884, 14839, 2015, 1006, 2030, 4609, 1007, 1025, 2005, 1006, 13075, 22889, 12322, 19848, 18279, 4168, 1999, 2030, 4609, 1012, 3513, 1007, 1063, 1035, 9699, 29521, 19848, 27268, 6820, 14890, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
cytoscape/cytoscape.js
dist/cytoscape.esm.js
removeData
function removeData(params) { var defaults$$1 = { field: 'data', event: 'data', triggerFnName: 'trigger', triggerEvent: false, immutableKeys: {} // key => true if immutable }; params = extend({}, defaults$$1, params); return function removeDataImpl(names) { var p = p...
javascript
function removeData(params) { var defaults$$1 = { field: 'data', event: 'data', triggerFnName: 'trigger', triggerEvent: false, immutableKeys: {} // key => true if immutable }; params = extend({}, defaults$$1, params); return function removeDataImpl(names) { var p = p...
[ "function", "removeData", "(", "params", ")", "{", "var", "defaults$$1", "=", "{", "field", ":", "'data'", ",", "event", ":", "'data'", ",", "triggerFnName", ":", "'trigger'", ",", "triggerEvent", ":", "false", ",", "immutableKeys", ":", "{", "}", "// key ...
data remove data field
[ "data", "remove", "data", "field" ]
ad2051b65e2243cfd953d8b24a8bf95bfa8559e5
https://github.com/cytoscape/cytoscape.js/blob/ad2051b65e2243cfd953d8b24a8bf95bfa8559e5/dist/cytoscape.esm.js#L6107-L6174
train
removeData - remove data
[ 30522, 3853, 3718, 6790, 1006, 11498, 5244, 1007, 1063, 13075, 12398, 2015, 1002, 1002, 1015, 1027, 1063, 2492, 1024, 1005, 2951, 1005, 1010, 2724, 1024, 1005, 2951, 1005, 1010, 9495, 2546, 9516, 4168, 1024, 1005, 9495, 1005, 1010, 9495, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/select/select.js
SelectDirective
function SelectDirective($mdSelect, $mdUtil, $mdConstant, $mdTheming, $mdAria, $parse, $sce, $injector) { var keyCodes = $mdConstant.KEY_CODE; var NAVIGATION_KEYS = [keyCodes.SPACE, keyCodes.ENTER, keyCodes.UP_ARROW, keyCodes.DOWN_ARROW]; return { restrict: 'E', require: ['^?mdInputContainer', 'mdSel...
javascript
function SelectDirective($mdSelect, $mdUtil, $mdConstant, $mdTheming, $mdAria, $parse, $sce, $injector) { var keyCodes = $mdConstant.KEY_CODE; var NAVIGATION_KEYS = [keyCodes.SPACE, keyCodes.ENTER, keyCodes.UP_ARROW, keyCodes.DOWN_ARROW]; return { restrict: 'E', require: ['^?mdInputContainer', 'mdSel...
[ "function", "SelectDirective", "(", "$mdSelect", ",", "$mdUtil", ",", "$mdConstant", ",", "$mdTheming", ",", "$mdAria", ",", "$parse", ",", "$sce", ",", "$injector", ")", "{", "var", "keyCodes", "=", "$mdConstant", ".", "KEY_CODE", ";", "var", "NAVIGATION_KEYS...
@ngdoc directive @name mdSelect @restrict E @module material.components.select @description Displays a select box, bound to an `ng-model`. Selectable options are defined using the <a ng-href="/api/directive/mdOption">md-option</a> element directive. Options can be grouped using the <a ng-href="/api/directive/mdOptgrou...
[ "@ngdoc", "directive", "@name", "mdSelect", "@restrict", "E", "@module", "material", ".", "components", ".", "select" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/select/select.js#L158-L584
train
Select directive.
[ 30522, 3853, 7276, 4305, 2890, 15277, 1006, 1002, 9108, 11246, 22471, 1010, 1002, 9108, 21823, 2140, 1010, 1002, 9108, 8663, 12693, 2102, 1010, 1002, 9108, 10760, 6562, 1010, 1002, 9108, 10980, 1010, 1002, 11968, 3366, 1010, 1002, 8040, 206...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
vuejs/vue-devtools
shells/chrome/src/devtools.js
injectScript
function injectScript (scriptName, cb) { const src = ` (function() { var script = document.constructor.prototype.createElement.call(document, 'script'); script.src = "${scriptName}"; document.documentElement.appendChild(script); script.parentNode.removeChild(script); })() ` chrome....
javascript
function injectScript (scriptName, cb) { const src = ` (function() { var script = document.constructor.prototype.createElement.call(document, 'script'); script.src = "${scriptName}"; document.documentElement.appendChild(script); script.parentNode.removeChild(script); })() ` chrome....
[ "function", "injectScript", "(", "scriptName", ",", "cb", ")", "{", "const", "src", "=", "`", "${", "scriptName", "}", "`", "chrome", ".", "devtools", ".", "inspectedWindow", ".", "eval", "(", "src", ",", "function", "(", "res", ",", "err", ")", "{", ...
Inject a globally evaluated script, in the same context with the actual user app. @param {String} scriptName @param {Function} cb
[ "Inject", "a", "globally", "evaluated", "script", "in", "the", "same", "context", "with", "the", "actual", "user", "app", "." ]
4de4b86388453cd07f0c1bf967d43a4dd4b011c9
https://github.com/vuejs/vue-devtools/blob/4de4b86388453cd07f0c1bf967d43a4dd4b011c9/shells/chrome/src/devtools.js#L60-L75
train
Inject a script into the page
[ 30522, 3853, 1999, 20614, 22483, 1006, 5896, 18442, 1010, 17324, 1007, 1063, 9530, 3367, 5034, 2278, 1027, 1036, 1006, 3853, 1006, 1007, 1063, 13075, 5896, 1027, 6254, 1012, 9570, 2953, 1012, 8773, 1012, 3443, 12260, 3672, 1012, 2655, 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...
GitbookIO/gitbook
lib/modifiers/summary/insertArticle.js
insertArticle
function insertArticle(summary, article, level) { article = SummaryArticle(article); level = is.string(level)? level : level.getLevel(); var parent = summary.getParent(level); if (!parent) { return summary; } // Find the index to insert at var articles = parent.getArticles(); v...
javascript
function insertArticle(summary, article, level) { article = SummaryArticle(article); level = is.string(level)? level : level.getLevel(); var parent = summary.getParent(level); if (!parent) { return summary; } // Find the index to insert at var articles = parent.getArticles(); v...
[ "function", "insertArticle", "(", "summary", ",", "article", ",", "level", ")", "{", "article", "=", "SummaryArticle", "(", "article", ")", ";", "level", "=", "is", ".", "string", "(", "level", ")", "?", "level", ":", "level", ".", "getLevel", "(", ")"...
Returns a new Summary with the article at the given level, with subsequent article shifted. @param {Summary} summary @param {Article} article @param {String|Article} level: level to insert at @return {Summary}
[ "Returns", "a", "new", "Summary", "with", "the", "article", "at", "the", "given", "level", "with", "subsequent", "article", "shifted", "." ]
6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4
https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/modifiers/summary/insertArticle.js#L15-L36
train
Insert an article into the summary at the given level
[ 30522, 3853, 19274, 8445, 25128, 1006, 12654, 1010, 3720, 1010, 2504, 1007, 1063, 3720, 1027, 12654, 8445, 25128, 1006, 3720, 1007, 1025, 2504, 1027, 2003, 1012, 5164, 1006, 2504, 1007, 1029, 2504, 1024, 2504, 1012, 2131, 20414, 2884, 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...
TryGhost/Ghost
core/server/lib/image/cached-image-size-from-url.js
getCachedImageSizeFromUrl
function getCachedImageSizeFromUrl(url) { if (!url || url === undefined || url === null) { return; } // image size is not in cache if (!cache[url]) { return imageSize.getImageSizeFromUrl(url).then(function (res) { cache[url] = res; debug('Cached image:', url); ...
javascript
function getCachedImageSizeFromUrl(url) { if (!url || url === undefined || url === null) { return; } // image size is not in cache if (!cache[url]) { return imageSize.getImageSizeFromUrl(url).then(function (res) { cache[url] = res; debug('Cached image:', url); ...
[ "function", "getCachedImageSizeFromUrl", "(", "url", ")", "{", "if", "(", "!", "url", "||", "url", "===", "undefined", "||", "url", "===", "null", ")", "{", "return", ";", "}", "// image size is not in cache", "if", "(", "!", "cache", "[", "url", "]", ")...
Get cached image size from URL Always returns {object} imageSizeCache @param {string} url @returns {Promise<Object>} imageSizeCache @description Takes a url and returns image width and height from cache if available. If not in cache, `getImageSizeFromUrl` is called and returns the dimensions in a Promise.
[ "Get", "cached", "image", "size", "from", "URL", "Always", "returns", "{", "object", "}", "imageSizeCache" ]
bb7bb55cf3e60af99ebbc56099928827b58461bc
https://github.com/TryGhost/Ghost/blob/bb7bb55cf3e60af99ebbc56099928827b58461bc/core/server/lib/image/cached-image-size-from-url.js#L14-L46
train
Get image size from cache
[ 30522, 3853, 2131, 3540, 7690, 9581, 8449, 4697, 19699, 5358, 3126, 2140, 1006, 24471, 2140, 1007, 1063, 2065, 1006, 999, 24471, 2140, 1064, 1064, 24471, 2140, 1027, 1027, 1027, 6151, 28344, 1064, 1064, 24471, 2140, 1027, 1027, 1027, 19701,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/jquery.sap.history.js
getAppendId
function getAppendId(sHash){ var iIndex = jQuery.inArray(currentHash, hashHistory), i, sHistory; if (iIndex > -1) { for (i = 0 ; i < iIndex + 1 ; i++) { sHistory = hashHistory[i]; if (sHistory.slice(0, sHistory.length - 2) === sHash) { return uid(); } } } return ""; }
javascript
function getAppendId(sHash){ var iIndex = jQuery.inArray(currentHash, hashHistory), i, sHistory; if (iIndex > -1) { for (i = 0 ; i < iIndex + 1 ; i++) { sHistory = hashHistory[i]; if (sHistory.slice(0, sHistory.length - 2) === sHash) { return uid(); } } } return ""; }
[ "function", "getAppendId", "(", "sHash", ")", "{", "var", "iIndex", "=", "jQuery", ".", "inArray", "(", "currentHash", ",", "hashHistory", ")", ",", "i", ",", "sHistory", ";", "if", "(", "iIndex", ">", "-", "1", ")", "{", "for", "(", "i", "=", "0",...
This function checks if the combination of the identifier and data is unique in the current history stack. If yes, it returns an empty string. Otherwise it returns a unique id. @private
[ "This", "function", "checks", "if", "the", "combination", "of", "the", "identifier", "and", "data", "is", "unique", "in", "the", "current", "history", "stack", ".", "If", "yes", "it", "returns", "an", "empty", "string", ".", "Otherwise", "it", "returns", "...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/jquery.sap.history.js#L506-L519
train
Returns the id of the append element
[ 30522, 3853, 2131, 29098, 10497, 3593, 1006, 21146, 4095, 1007, 1063, 13075, 2462, 13629, 2595, 1027, 1046, 4226, 2854, 1012, 27118, 11335, 2100, 1006, 2783, 14949, 2232, 1010, 23325, 24158, 7062, 1007, 1010, 1045, 1010, 11895, 23809, 2100, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
laurent22/joplin
Clipper/joplin-webclipper/content_scripts/Readability.js
function (node) { var next = node; while (next && (next.nodeType != this.ELEMENT_NODE) && this.REGEXPS.whitespace.test(next.textContent)) { next = next.nextSibling; } return next; }
javascript
function (node) { var next = node; while (next && (next.nodeType != this.ELEMENT_NODE) && this.REGEXPS.whitespace.test(next.textContent)) { next = next.nextSibling; } return next; }
[ "function", "(", "node", ")", "{", "var", "next", "=", "node", ";", "while", "(", "next", "&&", "(", "next", ".", "nodeType", "!=", "this", ".", "ELEMENT_NODE", ")", "&&", "this", ".", "REGEXPS", ".", "whitespace", ".", "test", "(", "next", ".", "t...
Finds the next element, starting from the given node, and ignoring whitespace in between. If the given node is an element, the same node is returned.
[ "Finds", "the", "next", "element", "starting", "from", "the", "given", "node", "and", "ignoring", "whitespace", "in", "between", ".", "If", "the", "given", "node", "is", "an", "element", "the", "same", "node", "is", "returned", "." ]
beb428b246cecba4630a3ca57b472f43c0933a43
https://github.com/laurent22/joplin/blob/beb428b246cecba4630a3ca57b472f43c0933a43/Clipper/joplin-webclipper/content_scripts/Readability.js#L449-L457
train
Returns the next sibling of node
[ 30522, 3853, 1006, 13045, 1007, 1063, 13075, 2279, 1027, 13045, 1025, 2096, 1006, 2279, 1004, 1004, 1006, 2279, 1012, 13045, 13874, 999, 1027, 2023, 1012, 5783, 1035, 13045, 1007, 1004, 1004, 2023, 1012, 19723, 10288, 4523, 1012, 12461, 153...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/debug/LogViewer.js
function(oWindow, sRootId) { this.oWindow = oWindow; this.oDomNode = oWindow.document.getElementById(sRootId); if (!this.oDomNode) { var oDiv = this.oWindow.document.createElement("DIV"); oDiv.setAttribute("id", sRootId); oDiv.style.overflow = "auto"; oDiv.style.tabIndex = "-1"; oDiv.style.position...
javascript
function(oWindow, sRootId) { this.oWindow = oWindow; this.oDomNode = oWindow.document.getElementById(sRootId); if (!this.oDomNode) { var oDiv = this.oWindow.document.createElement("DIV"); oDiv.setAttribute("id", sRootId); oDiv.style.overflow = "auto"; oDiv.style.tabIndex = "-1"; oDiv.style.position...
[ "function", "(", "oWindow", ",", "sRootId", ")", "{", "this", ".", "oWindow", "=", "oWindow", ";", "this", ".", "oDomNode", "=", "oWindow", ".", "document", ".", "getElementById", "(", "sRootId", ")", ";", "if", "(", "!", "this", ".", "oDomNode", ")", ...
Constructs a LogViewer in the given window, embedded into the given DOM element. If the DOM element doesn't exist, a DIV is created. @param {Window} oTargetWindow the window where the log will be displayed in @param {sRootId} sRootId id of the top level element that will contain the log entries @class HTML LogViewer ...
[ "Constructs", "a", "LogViewer", "in", "the", "given", "window", "embedded", "into", "the", "given", "DOM", "element", ".", "If", "the", "DOM", "element", "doesn", "t", "exist", "a", "DIV", "is", "created", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/debug/LogViewer.js#L20-L44
train
Initializes the log viewer.
[ 30522, 3853, 1006, 27593, 22254, 5004, 1010, 5034, 17206, 3593, 1007, 1063, 2023, 1012, 27593, 22254, 5004, 1027, 27593, 22254, 5004, 1025, 2023, 1012, 1051, 9527, 3630, 3207, 1027, 27593, 22254, 5004, 1012, 6254, 1012, 2131, 12260, 3672, 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...
apache/incubator-echarts
src/component/dataZoom/DataZoomModel.js
function (opt, ignoreUpdateRangeUsg) { var option = this.option; each([['start', 'startValue'], ['end', 'endValue']], function (names) { // If only one of 'start' and 'startValue' is not null/undefined, the other // should be cleared, which enable clear the option. //...
javascript
function (opt, ignoreUpdateRangeUsg) { var option = this.option; each([['start', 'startValue'], ['end', 'endValue']], function (names) { // If only one of 'start' and 'startValue' is not null/undefined, the other // should be cleared, which enable clear the option. //...
[ "function", "(", "opt", ",", "ignoreUpdateRangeUsg", ")", "{", "var", "option", "=", "this", ".", "option", ";", "each", "(", "[", "[", "'start'", ",", "'startValue'", "]", ",", "[", "'end'", ",", "'endValue'", "]", "]", ",", "function", "(", "names", ...
If not specified, set to undefined. @public @param {Object} opt @param {number} [opt.start] @param {number} [opt.end] @param {number} [opt.startValue] @param {number} [opt.endValue] @param {boolean} [ignoreUpdateRangeUsg=false]
[ "If", "not", "specified", "set", "to", "undefined", "." ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/component/dataZoom/DataZoomModel.js#L455-L470
train
Update the options of the current page
[ 30522, 3853, 1006, 23569, 1010, 8568, 6279, 13701, 24388, 10600, 2290, 1007, 1063, 13075, 5724, 1027, 2023, 1012, 5724, 1025, 2169, 1006, 1031, 1031, 1005, 2707, 1005, 1010, 1005, 2707, 10175, 5657, 1005, 1033, 1010, 1031, 1005, 2203, 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...
SeleniumHQ/selenium
javascript/selenium-core/lib/scriptaculous/dragdrop.js
function (element, containerTag) { if (element && element.hasChildNodes) for (var i = 0; i < element.childNodes.length; ++i) if (element.childNodes[i].tagName == containerTag) return element.childNodes[i]; return null; }
javascript
function (element, containerTag) { if (element && element.hasChildNodes) for (var i = 0; i < element.childNodes.length; ++i) if (element.childNodes[i].tagName == containerTag) return element.childNodes[i]; return null; }
[ "function", "(", "element", ",", "containerTag", ")", "{", "if", "(", "element", "&&", "element", ".", "hasChildNodes", ")", "for", "(", "var", "i", "=", "0", ";", "i", "<", "element", ".", "childNodes", ".", "length", ";", "++", "i", ")", "if", "(...
/* Finds the first element of the given tag type within a parent element. Used for finding the first LI[ST] within a L[IST]I[TEM].
[ "/", "*", "Finds", "the", "first", "element", "of", "the", "given", "tag", "type", "within", "a", "parent", "element", ".", "Used", "for", "finding", "the", "first", "LI", "[", "ST", "]", "within", "a", "L", "[", "IST", "]", "I", "[", "TEM", "]", ...
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/lib/scriptaculous/dragdrop.js#L795-L802
train
Returns the first node of the specified container tag
[ 30522, 3853, 1006, 5783, 1010, 11661, 15900, 1007, 1063, 2065, 1006, 5783, 1004, 1004, 5783, 1012, 2038, 19339, 3630, 6155, 1007, 2005, 1006, 13075, 30524, 1031, 1045, 1033, 1025, 2709, 19701, 1025, 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, 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/hello-mui/js/mui.js
function(container, progress, color) { if (typeof container === 'number') { color = progress; progress = container; container = 'body'; } container = $(container || 'body'); if (container.length === 0) return; container = container[0]; var progressbar; if (container.classList.contains(CLASS_PROGR...
javascript
function(container, progress, color) { if (typeof container === 'number') { color = progress; progress = container; container = 'body'; } container = $(container || 'body'); if (container.length === 0) return; container = container[0]; var progressbar; if (container.classList.contains(CLASS_PROGR...
[ "function", "(", "container", ",", "progress", ",", "color", ")", "{", "if", "(", "typeof", "container", "===", "'number'", ")", "{", "color", "=", "progress", ";", "progress", "=", "container", ";", "container", "=", "'body'", ";", "}", "container", "="...
创建并显示进度条 @param {Object} container 可选,默认body,支持selector,DOM Node,mui wrapper @param {Object} progress 可选,undefined表示循环,数字表示具体进度 @param {Object} color 可选,指定颜色样式(目前暂未提供实际样式,可暂时不暴露此参数)
[ "创建并显示进度条" ]
ff74c90a1671a552f3604b1288bf38a4126312d0
https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/hello-mui/js/mui.js#L7653-L7689
train
Creates a progress bar element
[ 30522, 3853, 1006, 11661, 1010, 5082, 1010, 3609, 1007, 1063, 2065, 1006, 2828, 11253, 11661, 1027, 1027, 1027, 1005, 2193, 1005, 1007, 1063, 3609, 1027, 5082, 1025, 5082, 1027, 11661, 1025, 11661, 1027, 1005, 2303, 1005, 1025, 1065, 11661,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/ODataMetaModel.js
function (oRequestor, sUrl, vAnnotationUri, oModel, bSupportReferences) { MetaModel.call(this); this.aAnnotationUris = vAnnotationUri && !Array.isArray(vAnnotationUri) ? [vAnnotationUri] : vAnnotationUri; this.sDefaultBindingMode = BindingMode.OneTime; this.mETags = {}; this.dLastModified = new Date(...
javascript
function (oRequestor, sUrl, vAnnotationUri, oModel, bSupportReferences) { MetaModel.call(this); this.aAnnotationUris = vAnnotationUri && !Array.isArray(vAnnotationUri) ? [vAnnotationUri] : vAnnotationUri; this.sDefaultBindingMode = BindingMode.OneTime; this.mETags = {}; this.dLastModified = new Date(...
[ "function", "(", "oRequestor", ",", "sUrl", ",", "vAnnotationUri", ",", "oModel", ",", "bSupportReferences", ")", "{", "MetaModel", ".", "call", "(", "this", ")", ";", "this", ".", "aAnnotationUris", "=", "vAnnotationUri", "&&", "!", "Array", ".", "isArray",...
/* @param {sap.ui.model.odata.v4.lib._MetadataRequestor} oRequestor
[ "/", "*" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/ODataMetaModel.js#L626-L654
train
A metadata model that is used to store the metadata for the given schema.
[ 30522, 3853, 1006, 10848, 15500, 2953, 1010, 7505, 2140, 1010, 3158, 17048, 3370, 9496, 1010, 18168, 10244, 2140, 1010, 18667, 6279, 6442, 2890, 25523, 2015, 1007, 1063, 18804, 5302, 9247, 1012, 2655, 1006, 2023, 1007, 1025, 2023, 1012, 977...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
dist/js/materialize.js
destroy
function destroy() { Modal._count--; this._removeEventHandlers(); this.el.removeAttribute('style'); this.$overlay.remove(); this.el.M_Modal = undefined; }
javascript
function destroy() { Modal._count--; this._removeEventHandlers(); this.el.removeAttribute('style'); this.$overlay.remove(); this.el.M_Modal = undefined; }
[ "function", "destroy", "(", ")", "{", "Modal", ".", "_count", "--", ";", "this", ".", "_removeEventHandlers", "(", ")", ";", "this", ".", "el", ".", "removeAttribute", "(", "'style'", ")", ";", "this", ".", "$overlay", ".", "remove", "(", ")", ";", "...
Teardown component
[ "Teardown", "component" ]
1122efadad8f1433d404696f7613e3cc13fb83a4
https://github.com/Dogfalo/materialize/blob/1122efadad8f1433d404696f7613e3cc13fb83a4/dist/js/materialize.js#L2940-L2946
train
Destroys the modal
[ 30522, 3853, 6033, 1006, 1007, 1063, 16913, 2389, 1012, 1035, 4175, 1011, 1011, 1025, 2023, 1012, 1035, 6366, 18697, 3372, 11774, 12910, 1006, 1007, 1025, 2023, 1012, 3449, 1012, 6366, 19321, 3089, 8569, 2618, 1006, 1005, 2806, 1005, 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...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sServiceRootURI) { // construct resource path var sResourcePath = this.getURIToDimensionMemberEntitySet(sServiceRootURI); // check if request is compliant with filter constraints expressed in // metadata this.getFilterExpression().checkValidity(); // construct query options var sSelectO...
javascript
function(sServiceRootURI) { // construct resource path var sResourcePath = this.getURIToDimensionMemberEntitySet(sServiceRootURI); // check if request is compliant with filter constraints expressed in // metadata this.getFilterExpression().checkValidity(); // construct query options var sSelectO...
[ "function", "(", "sServiceRootURI", ")", "{", "// construct resource path", "var", "sResourcePath", "=", "this", ".", "getURIToDimensionMemberEntitySet", "(", "sServiceRootURI", ")", ";", "// check if request is compliant with filter constraints expressed in", "// metadata", "thi...
Get the unescaped URI to fetch the dimension members, optionally augmented by text and attributes. @param {String} sServiceRootURI (optional) Identifies the root of the OData service @returns {String} The unescaped URI that contains the OData resource path and OData system query options to express the request for the ...
[ "Get", "the", "unescaped", "URI", "to", "fetch", "the", "dimension", "members", "optionally", "augmented", "by", "text", "and", "attributes", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L5561-L5631
train
Construct the URI to the dimension member entity set
[ 30522, 3853, 1006, 7020, 2121, 7903, 10624, 4140, 9496, 1007, 1063, 1013, 1013, 9570, 7692, 4130, 13075, 5034, 2229, 8162, 3401, 15069, 1027, 2023, 1012, 2131, 9496, 3406, 22172, 6132, 3258, 4168, 21784, 4765, 3012, 13462, 1006, 7020, 2121,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/techinfo/moduleTreeHelper.js
function (oNode) { var iSelectedNodesCount = 0, oChildNode; for (var i = 0; i < oNode.nodes.length; i++) { oChildNode = oNode.nodes[i]; if (oChildNode.nodes.length) { oChildNode.selected = this.isNodeSelected(oChildNode); } if (oChildNode.selected) { iSelectedNodesCount++; } ...
javascript
function (oNode) { var iSelectedNodesCount = 0, oChildNode; for (var i = 0; i < oNode.nodes.length; i++) { oChildNode = oNode.nodes[i]; if (oChildNode.nodes.length) { oChildNode.selected = this.isNodeSelected(oChildNode); } if (oChildNode.selected) { iSelectedNodesCount++; } ...
[ "function", "(", "oNode", ")", "{", "var", "iSelectedNodesCount", "=", "0", ",", "oChildNode", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "oNode", ".", "nodes", ".", "length", ";", "i", "++", ")", "{", "oChildNode", "=", "oNode", ".", ...
Checks and update the tree model based on selected child nodes. @param oNode The tree to be updated @returns {boolean} The selected of the node.
[ "Checks", "and", "update", "the", "tree", "model", "based", "on", "selected", "child", "nodes", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/moduleTreeHelper.js#L193-L208
train
Determines if the selected nodes are present in the selected nodes array.
[ 30522, 3853, 1006, 21058, 3207, 1007, 1063, 13075, 2003, 12260, 10985, 3630, 6155, 3597, 16671, 1027, 1014, 1010, 28166, 4014, 2094, 3630, 3207, 1025, 2005, 1006, 13075, 1045, 1027, 1014, 1025, 1045, 1026, 21058, 3207, 1012, 14164, 1012, 30...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/component/axis/AngleAxisView.js
fixAngleOverlap
function fixAngleOverlap(list) { var firstItem = list[0]; var lastItem = list[list.length - 1]; if (firstItem && lastItem && Math.abs(Math.abs(firstItem.coord - lastItem.coord) - 360) < 1e-4 ) { list.pop(); } }
javascript
function fixAngleOverlap(list) { var firstItem = list[0]; var lastItem = list[list.length - 1]; if (firstItem && lastItem && Math.abs(Math.abs(firstItem.coord - lastItem.coord) - 360) < 1e-4 ) { list.pop(); } }
[ "function", "fixAngleOverlap", "(", "list", ")", "{", "var", "firstItem", "=", "list", "[", "0", "]", ";", "var", "lastItem", "=", "list", "[", "list", ".", "length", "-", "1", "]", ";", "if", "(", "firstItem", "&&", "lastItem", "&&", "Math", ".", ...
Remove the last tick which will overlap the first tick
[ "Remove", "the", "last", "tick", "which", "will", "overlap", "the", "first", "tick" ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/component/axis/AngleAxisView.js#L47-L56
train
Fix the angle overlap between two nodes
[ 30522, 3853, 8081, 5654, 2571, 7840, 2721, 2361, 1006, 2862, 1007, 1063, 13075, 2034, 4221, 2213, 1027, 2862, 1031, 1014, 1033, 1025, 13075, 2197, 4221, 2213, 1027, 2862, 1031, 2862, 1012, 3091, 1011, 1015, 1033, 1025, 2065, 1006, 2034, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
muaz-khan/RecordRTC
RecordRTC.js
function() { if (mediaRecorder && typeof mediaRecorder.clearRecordedData === 'function') { mediaRecorder.clearRecordedData(); } mediaRecorder = null; setState('inactive'); self.blob = null; }
javascript
function() { if (mediaRecorder && typeof mediaRecorder.clearRecordedData === 'function') { mediaRecorder.clearRecordedData(); } mediaRecorder = null; setState('inactive'); self.blob = null; }
[ "function", "(", ")", "{", "if", "(", "mediaRecorder", "&&", "typeof", "mediaRecorder", ".", "clearRecordedData", "===", "'function'", ")", "{", "mediaRecorder", ".", "clearRecordedData", "(", ")", ";", "}", "mediaRecorder", "=", "null", ";", "setState", "(", ...
This method resets the recorder. So that you can reuse single recorder instance many times. @method @memberof RecordRTC @instance @example recorder.reset(); recorder.startRecording();
[ "This", "method", "resets", "the", "recorder", ".", "So", "that", "you", "can", "reuse", "single", "recorder", "instance", "many", "times", "." ]
3c6bad427b9da35c1cf617199ed13dda056c38ba
https://github.com/muaz-khan/RecordRTC/blob/3c6bad427b9da35c1cf617199ed13dda056c38ba/RecordRTC.js#L683-L690
train
clear the recorder
[ 30522, 3853, 1006, 1007, 1063, 2065, 1006, 2865, 2890, 27108, 4063, 1004, 1004, 2828, 11253, 2865, 2890, 27108, 4063, 1012, 3154, 2890, 27108, 5732, 2850, 2696, 1027, 1027, 1027, 1005, 3853, 1005, 1007, 1063, 2865, 2890, 27108, 4063, 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...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/LocaleData.js
function(sSkeleton, vGreatestDiff, sCalendarType) { var oAvailableFormats = this._get(getCLDRCalendarName(sCalendarType), "dateTimeFormats", "intervalFormats"); return this._getFormatPattern(sSkeleton, oAvailableFormats, sCalendarType, vGreatestDiff); }
javascript
function(sSkeleton, vGreatestDiff, sCalendarType) { var oAvailableFormats = this._get(getCLDRCalendarName(sCalendarType), "dateTimeFormats", "intervalFormats"); return this._getFormatPattern(sSkeleton, oAvailableFormats, sCalendarType, vGreatestDiff); }
[ "function", "(", "sSkeleton", ",", "vGreatestDiff", ",", "sCalendarType", ")", "{", "var", "oAvailableFormats", "=", "this", ".", "_get", "(", "getCLDRCalendarName", "(", "sCalendarType", ")", ",", "\"dateTimeFormats\"", ",", "\"intervalFormats\"", ")", ";", "retu...
Get interval pattern for a given skeleton format. The format string does contain pattern symbols (e.g. "yMMMd" or "Hms") and will be converted into the pattern in the used locale, which matches the wanted symbols best. The symbols must be in canonical order, that is: Era (G), Year (y/Y), Quarter (q/Q), Month (M/L), We...
[ "Get", "interval", "pattern", "for", "a", "given", "skeleton", "format", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/LocaleData.js#L344-L347
train
Returns the pattern for the given skeleton and interval.
[ 30522, 3853, 1006, 7020, 11705, 18903, 2078, 1010, 1058, 17603, 8520, 2102, 4305, 4246, 1010, 4094, 8943, 5339, 18863, 1007, 1063, 13075, 1051, 12462, 11733, 3468, 14192, 11149, 1027, 2023, 1012, 1035, 2131, 1006, 2131, 20464, 13626, 9289, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
xlsx.js
write_BrtBeginTableStyles
function write_BrtBeginTableStyles(cnt, defTableStyle, defPivotStyle) { var o = new_buf(4+256*2*4); o.write_shift(4, cnt); write_XLNullableWideString(defTableStyle, o); write_XLNullableWideString(defPivotStyle, o); return o.length > o.l ? o.slice(0, o.l) : o; }
javascript
function write_BrtBeginTableStyles(cnt, defTableStyle, defPivotStyle) { var o = new_buf(4+256*2*4); o.write_shift(4, cnt); write_XLNullableWideString(defTableStyle, o); write_XLNullableWideString(defPivotStyle, o); return o.length > o.l ? o.slice(0, o.l) : o; }
[ "function", "write_BrtBeginTableStyles", "(", "cnt", ",", "defTableStyle", ",", "defPivotStyle", ")", "{", "var", "o", "=", "new_buf", "(", "4", "+", "256", "*", "2", "*", "4", ")", ";", "o", ".", "write_shift", "(", "4", ",", "cnt", ")", ";", "write...
/* [MS-XLSB] 2.4.272 BrtBeginTableStyles
[ "/", "*", "[", "MS", "-", "XLSB", "]", "2", ".", "4", ".", "272", "BrtBeginTableStyles" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L9214-L9220
train
Writes the begin table styles
[ 30522, 3853, 4339, 1035, 7987, 2102, 4783, 11528, 10880, 21756, 4244, 1006, 27166, 2102, 1010, 13366, 10880, 21756, 2571, 1010, 13366, 8197, 22994, 21756, 2571, 1007, 1063, 13075, 1051, 1027, 2047, 1035, 20934, 2546, 1006, 1018, 1009, 17273, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/prefer-rest-params.js
checkForArguments
function checkForArguments() { const argumentsVar = getVariableOfArguments(context.getScope()); if (argumentsVar) { argumentsVar .references .filter(isNotNormalMemberAccess) .forEach(report); } }
javascript
function checkForArguments() { const argumentsVar = getVariableOfArguments(context.getScope()); if (argumentsVar) { argumentsVar .references .filter(isNotNormalMemberAccess) .forEach(report); } }
[ "function", "checkForArguments", "(", ")", "{", "const", "argumentsVar", "=", "getVariableOfArguments", "(", "context", ".", "getScope", "(", ")", ")", ";", "if", "(", "argumentsVar", ")", "{", "argumentsVar", ".", "references", ".", "filter", "(", "isNotNorma...
Reports references of the implicit `arguments` variable if exist. @returns {void}
[ "Reports", "references", "of", "the", "implicit", "arguments", "variable", "if", "exist", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/prefer-rest-params.js#L98-L107
train
Check if the arguments variable is not normal member access
[ 30522, 3853, 4638, 29278, 2906, 22850, 11187, 1006, 1007, 1063, 9530, 3367, 9918, 10755, 1027, 2131, 10755, 19210, 11253, 2906, 22850, 11187, 1006, 6123, 1012, 4152, 16186, 1006, 1007, 1007, 1025, 2065, 1006, 9918, 10755, 1007, 1063, 9918, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.support/src/sap/ui/support/supportRules/report/ReportProvider.js
getTechnicalInformation
function getTechnicalInformation(technicalInfo) { var content = ''; if (!technicalInfo) { return new Handlebars.SafeString(content); } try { technicalInfo.modules.sort(); var html = ["<div class='sapUiSupportToolbar'>", "<div><div class='sapUiSupportTechInfoCntnt'>", "<table border='0' ce...
javascript
function getTechnicalInformation(technicalInfo) { var content = ''; if (!technicalInfo) { return new Handlebars.SafeString(content); } try { technicalInfo.modules.sort(); var html = ["<div class='sapUiSupportToolbar'>", "<div><div class='sapUiSupportTechInfoCntnt'>", "<table border='0' ce...
[ "function", "getTechnicalInformation", "(", "technicalInfo", ")", "{", "var", "content", "=", "''", ";", "if", "(", "!", "technicalInfo", ")", "{", "return", "new", "Handlebars", ".", "SafeString", "(", "content", ")", ";", "}", "try", "{", "technicalInfo", ...
/* Modified version of the function onsapUiSupportTechInfoData from core.support.plugins.TechInfo.js
[ "/", "*", "Modified", "version", "of", "the", "function", "onsapUiSupportTechInfoData", "from", "core", ".", "support", ".", "plugins", ".", "TechInfo", ".", "js" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/report/ReportProvider.js#L82-L143
train
Returns technical information
[ 30522, 3853, 2131, 15007, 20913, 2378, 14192, 3370, 1006, 4087, 2378, 14876, 1007, 1063, 13075, 4180, 1027, 1005, 1005, 1025, 2065, 1006, 999, 4087, 2378, 14876, 1007, 1063, 2709, 2047, 5047, 8237, 2015, 1012, 3647, 3367, 4892, 1006, 4180, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
notifyPathDeleted
function notifyPathDeleted(fullPath) { // FileSyncManager.syncOpenDocuments() does all the work prompting // the user to save any unsaved changes and then calls us back // via notifyFileDeleted FileSyncManager.syncOpenDocuments(Strings.FILE_DELETED_TITLE); var projectRoot = Pr...
javascript
function notifyPathDeleted(fullPath) { // FileSyncManager.syncOpenDocuments() does all the work prompting // the user to save any unsaved changes and then calls us back // via notifyFileDeleted FileSyncManager.syncOpenDocuments(Strings.FILE_DELETED_TITLE); var projectRoot = Pr...
[ "function", "notifyPathDeleted", "(", "fullPath", ")", "{", "// FileSyncManager.syncOpenDocuments() does all the work prompting", "// the user to save any unsaved changes and then calls us back", "// via notifyFileDeleted", "FileSyncManager", ".", "syncOpenDocuments", "(", "Strings", "...
Called after a file or folder has been deleted. This function is responsible for updating underlying model data and notifying all views of the change. @param {string} fullPath The path of the file/folder that has been deleted
[ "Called", "after", "a", "file", "or", "folder", "has", "been", "deleted", ".", "This", "function", "is", "responsible", "for", "updating", "underlying", "model", "data", "and", "notifying", "all", "views", "of", "the", "change", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/document/DocumentManager.js#L497-L522
train
notifyFileDeleted is called when a file was deleted
[ 30522, 3853, 2025, 8757, 15069, 9247, 12870, 2094, 1006, 2440, 15069, 1007, 1063, 1013, 1013, 6764, 6038, 27487, 5162, 4590, 1012, 26351, 26915, 3527, 24894, 11187, 1006, 1007, 2515, 2035, 1996, 2147, 15870, 1013, 1013, 1996, 5310, 2000, 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...
Freeboard/freeboard
examples/plugin_example.js
function(settings, updateCallback) { // Always a good idea... var self = this; // Good idea to create a variable to hold on to our settings, because they might change in the future. See below. var currentSettings = settings; /* This is some function where I'll get my data from somewhere */ function getDa...
javascript
function(settings, updateCallback) { // Always a good idea... var self = this; // Good idea to create a variable to hold on to our settings, because they might change in the future. See below. var currentSettings = settings; /* This is some function where I'll get my data from somewhere */ function getDa...
[ "function", "(", "settings", ",", "updateCallback", ")", "{", "// Always a good idea...", "var", "self", "=", "this", ";", "// Good idea to create a variable to hold on to our settings, because they might change in the future. See below.", "var", "currentSettings", "=", "settings",...
### Datasource Implementation ------------------- Here we implement the actual datasource plugin. We pass in the settings and updateCallback.
[ "###", "Datasource", "Implementation", "-------------------", "Here", "we", "implement", "the", "actual", "datasource", "plugin", ".", "We", "pass", "in", "the", "settings", "and", "updateCallback", "." ]
38789f6e8bd3d04f7d3b2c3427e509d00f2610fc
https://github.com/Freeboard/freeboard/blob/38789f6e8bd3d04f7d3b2c3427e509d00f2610fc/examples/plugin_example.js#L127-L188
train
This plugin is a public function that will update the freeboard with the new data.
[ 30522, 3853, 1006, 10906, 1010, 10651, 9289, 20850, 8684, 1007, 1063, 1013, 1013, 2467, 1037, 2204, 2801, 1012, 1012, 1012, 13075, 2969, 1027, 2023, 1025, 1013, 1013, 2204, 2801, 2000, 3443, 1037, 8023, 2000, 2907, 2006, 2000, 2256, 10906, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
aws/aws-sdk-js
lib/event-stream/parse-message.js
parseHeaders
function parseHeaders(headers) { var out = {}; var position = 0; while (position < headers.length) { var nameLength = headers.readUInt8(position++); var name = headers.slice(position, position + nameLength).toString(); position += nameLength; switch (headers.readUInt8(positio...
javascript
function parseHeaders(headers) { var out = {}; var position = 0; while (position < headers.length) { var nameLength = headers.readUInt8(position++); var name = headers.slice(position, position + nameLength).toString(); position += nameLength; switch (headers.readUInt8(positio...
[ "function", "parseHeaders", "(", "headers", ")", "{", "var", "out", "=", "{", "}", ";", "var", "position", "=", "0", ";", "while", "(", "position", "<", "headers", ".", "length", ")", "{", "var", "nameLength", "=", "headers", ".", "readUInt8", "(", "...
@api private @param {Buffer} headers
[ "@api", "private" ]
c23e5f0edd150f8885267e5f7c8a564f8e6e8562
https://github.com/aws/aws-sdk-js/blob/c23e5f0edd150f8885267e5f7c8a564f8e6e8562/lib/event-stream/parse-message.js#L20-L116
train
Parses the HTTP headers into an object containing the information about the log record.
[ 30522, 3853, 11968, 3366, 4974, 2545, 1006, 20346, 2015, 1007, 1063, 13075, 2041, 1027, 1063, 1065, 1025, 13075, 2597, 1027, 1014, 1025, 2096, 1006, 2597, 1026, 20346, 2015, 1012, 3091, 1007, 1063, 13075, 2171, 7770, 13512, 2232, 1027, 2034...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...