repo
stringclasses
195 values
path
stringlengths
4
99
func_name
stringlengths
0
41
original_string
stringlengths
72
56.1k
language
stringclasses
1 value
code
stringlengths
72
56.1k
code_tokens
listlengths
25
8.12k
docstring
stringlengths
2
12.5k
docstring_tokens
listlengths
1
449
sha
stringclasses
197 values
url
stringlengths
88
186
partition
stringclasses
1 value
summary
stringlengths
8
338
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
jhipster/generator-jhipster
generators/aws-containers/prompts.js
askDeployNow
function askDeployNow() { if (this.abort) return null; const done = this.async(); const prompts = [ { type: 'confirm', name: 'deployNow', message: 'Would you like to deploy now?.', default: true } ]; return this.prompt(prompts).then(pr...
javascript
function askDeployNow() { if (this.abort) return null; const done = this.async(); const prompts = [ { type: 'confirm', name: 'deployNow', message: 'Would you like to deploy now?.', default: true } ]; return this.prompt(prompts).then(pr...
[ "function", "askDeployNow", "(", ")", "{", "if", "(", "this", ".", "abort", ")", "return", "null", ";", "const", "done", "=", "this", ".", "async", "(", ")", ";", "const", "prompts", "=", "[", "{", "type", ":", "'confirm'", ",", "name", ":", "'depl...
Ask user if they would like to deploy now?
[ "Ask", "user", "if", "they", "would", "like", "to", "deploy", "now?" ]
f76fa8de0818ce6bda6c7b1455942e2a9b0ae3ff
https://github.com/jhipster/generator-jhipster/blob/f76fa8de0818ce6bda6c7b1455942e2a9b0ae3ff/generators/aws-containers/prompts.js#L495-L511
train
Ask user if they want to deploy now?
[ 30522, 3853, 3198, 3207, 24759, 6977, 19779, 1006, 1007, 1063, 2065, 1006, 2023, 1012, 11113, 11589, 1007, 2709, 19701, 1025, 9530, 3367, 2589, 1027, 2023, 1012, 2004, 6038, 2278, 1006, 1007, 1025, 9530, 3367, 25732, 2015, 1027, 1031, 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...
eslint/eslint
lib/rules/indent-legacy.js
checkNodeIndent
function checkNodeIndent(node, neededIndent) { const actualIndent = getNodeIndent(node, false); if ( node.type !== "ArrayExpression" && node.type !== "ObjectExpression" && (actualIndent.goodChar !== neededIndent || actualIndent.badChar !== 0) && ...
javascript
function checkNodeIndent(node, neededIndent) { const actualIndent = getNodeIndent(node, false); if ( node.type !== "ArrayExpression" && node.type !== "ObjectExpression" && (actualIndent.goodChar !== neededIndent || actualIndent.badChar !== 0) && ...
[ "function", "checkNodeIndent", "(", "node", ",", "neededIndent", ")", "{", "const", "actualIndent", "=", "getNodeIndent", "(", "node", ",", "false", ")", ";", "if", "(", "node", ".", "type", "!==", "\"ArrayExpression\"", "&&", "node", ".", "type", "!==", "...
Check indent for node @param {ASTNode} node Node to check @param {int} neededIndent needed indent @returns {void}
[ "Check", "indent", "for", "node" ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/indent-legacy.js#L375-L414
train
Check indent of node
[ 30522, 3853, 4638, 3630, 3207, 22254, 4765, 1006, 13045, 1010, 2734, 22254, 4765, 1007, 1063, 9530, 3367, 5025, 22254, 4765, 1027, 2131, 3630, 3207, 22254, 4765, 1006, 13045, 1010, 6270, 1007, 1025, 2065, 1006, 13045, 1012, 2828, 999, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aframevr/aframe
src/components/animation.js
toRadians
function toRadians (obj) { obj.x = THREE.Math.degToRad(obj.x); obj.y = THREE.Math.degToRad(obj.y); obj.z = THREE.Math.degToRad(obj.z); }
javascript
function toRadians (obj) { obj.x = THREE.Math.degToRad(obj.x); obj.y = THREE.Math.degToRad(obj.y); obj.z = THREE.Math.degToRad(obj.z); }
[ "function", "toRadians", "(", "obj", ")", "{", "obj", ".", "x", "=", "THREE", ".", "Math", ".", "degToRad", "(", "obj", ".", "x", ")", ";", "obj", ".", "y", "=", "THREE", ".", "Math", ".", "degToRad", "(", "obj", ".", "y", ")", ";", "obj", "....
Convert object to radians.
[ "Convert", "object", "to", "radians", "." ]
24acc78a7299a4cdfe3ef617f4d40ddf6275c992
https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/components/animation.js#L542-L546
train
Converts an object to an angle
[ 30522, 3853, 17153, 25205, 3619, 1006, 27885, 3501, 1007, 1063, 27885, 3501, 1012, 1060, 1027, 2093, 1012, 8785, 1012, 2139, 13512, 6525, 2094, 1006, 27885, 3501, 1012, 1060, 1007, 1025, 27885, 3501, 1012, 1061, 1027, 2093, 1012, 8785, 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...
GitbookIO/gitbook
lib/parse/parseBook.js
parseBook
function parseBook(book) { return timing.measure( 'parse.book', Promise(book) .then(parseIgnore) .then(parseConfig) .then(parseLanguages) .then(function(resultBook) { if (resultBook.isMultilingual()) { return parseMultilingualBook(resultBoo...
javascript
function parseBook(book) { return timing.measure( 'parse.book', Promise(book) .then(parseIgnore) .then(parseConfig) .then(parseLanguages) .then(function(resultBook) { if (resultBook.isMultilingual()) { return parseMultilingualBook(resultBoo...
[ "function", "parseBook", "(", "book", ")", "{", "return", "timing", ".", "measure", "(", "'parse.book'", ",", "Promise", "(", "book", ")", ".", "then", "(", "parseIgnore", ")", ".", "then", "(", "parseConfig", ")", ".", "then", "(", "parseLanguages", ")"...
Parse a whole book from a filesystem @param {Book} book @return {Promise<Book>}
[ "Parse", "a", "whole", "book", "from", "a", "filesystem" ]
6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4
https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/parse/parseBook.js#L60-L75
train
Parse a book
[ 30522, 3853, 11968, 3366, 8654, 1006, 2338, 1007, 1063, 2709, 10984, 1012, 5468, 1006, 1005, 11968, 3366, 1012, 2338, 1005, 1010, 4872, 1006, 2338, 1007, 1012, 2059, 1006, 11968, 20240, 26745, 2890, 1007, 1012, 2059, 1006, 11968, 3366, 8663...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/AnnotationParser.js
function(sPath, oProperties, sTarget, oSchema) { var iPos = sPath.indexOf("/"); if (iPos > -1) { var sPropertyName = sPath.substr(0, iPos); var mNavProperty = AnnotationParser.findNavProperty(sTarget, sPropertyName); if (mNavProperty) { var mToEntityType = AnnotationParser._parserData.metadataInstance...
javascript
function(sPath, oProperties, sTarget, oSchema) { var iPos = sPath.indexOf("/"); if (iPos > -1) { var sPropertyName = sPath.substr(0, iPos); var mNavProperty = AnnotationParser.findNavProperty(sTarget, sPropertyName); if (mNavProperty) { var mToEntityType = AnnotationParser._parserData.metadataInstance...
[ "function", "(", "sPath", ",", "oProperties", ",", "sTarget", ",", "oSchema", ")", "{", "var", "iPos", "=", "sPath", ".", "indexOf", "(", "\"/\"", ")", ";", "if", "(", "iPos", ">", "-", "1", ")", "{", "var", "sPropertyName", "=", "sPath", ".", "sub...
/* @static @private
[ "/", "*" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/AnnotationParser.js#L782-L808
train
Returns the target entity type and path of the property
[ 30522, 3853, 1006, 14690, 2232, 1010, 6728, 18981, 8743, 3111, 1010, 2732, 18150, 1010, 9808, 5403, 2863, 1007, 1063, 13075, 12997, 2891, 1027, 14690, 2232, 1012, 5950, 11253, 1006, 1000, 1013, 1000, 1007, 1025, 2065, 1006, 12997, 2891, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
markdown-it/markdown-it
lib/common/utils.js
arrayReplaceAt
function arrayReplaceAt(src, pos, newElements) { return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1)); }
javascript
function arrayReplaceAt(src, pos, newElements) { return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1)); }
[ "function", "arrayReplaceAt", "(", "src", ",", "pos", ",", "newElements", ")", "{", "return", "[", "]", ".", "concat", "(", "src", ".", "slice", "(", "0", ",", "pos", ")", ",", "newElements", ",", "src", ".", "slice", "(", "pos", "+", "1", ")", "...
Remove element from array and put another array at those position. Useful for some operations with tokens
[ "Remove", "element", "from", "array", "and", "put", "another", "array", "at", "those", "position", ".", "Useful", "for", "some", "operations", "with", "tokens" ]
ba6830ba13fb92953a91fb90318964ccd15b82c4
https://github.com/markdown-it/markdown-it/blob/ba6830ba13fb92953a91fb90318964ccd15b82c4/lib/common/utils.js#L38-L40
train
Replace elements in array at pos with newElements
[ 30522, 3853, 9140, 2890, 24759, 10732, 4017, 1006, 5034, 2278, 1010, 13433, 2015, 1010, 2047, 12260, 8163, 1007, 1063, 2709, 1031, 1033, 1012, 9530, 11266, 1006, 5034, 2278, 1012, 14704, 1006, 1014, 1010, 13433, 2015, 1007, 1010, 2047, 1226...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/_ODataMetaModelUtils.js
function (aArray, vExpectedPropertyValue, sPropertyName) { var i, n; sPropertyName = sPropertyName || "name"; if (aArray) { for (i = 0, n = aArray.length; i < n; i += 1) { if (aArray[i][sPropertyName] === vExpectedPropertyValue) { return i; } } } return -1; }
javascript
function (aArray, vExpectedPropertyValue, sPropertyName) { var i, n; sPropertyName = sPropertyName || "name"; if (aArray) { for (i = 0, n = aArray.length; i < n; i += 1) { if (aArray[i][sPropertyName] === vExpectedPropertyValue) { return i; } } } return -1; }
[ "function", "(", "aArray", ",", "vExpectedPropertyValue", ",", "sPropertyName", ")", "{", "var", "i", ",", "n", ";", "sPropertyName", "=", "sPropertyName", "||", "\"name\"", ";", "if", "(", "aArray", ")", "{", "for", "(", "i", "=", "0", ",", "n", "=", ...
Returns the index of the first object inside the given array, where the property with the given name has the given expected value. @param {object[]} [aArray] some array @param {any} vExpectedPropertyValue expected value of the property with given name @param {string} [sPropertyName="name"] some property name @returns ...
[ "Returns", "the", "index", "of", "the", "first", "object", "inside", "the", "given", "array", "where", "the", "property", "with", "the", "given", "name", "has", "the", "given", "expected", "value", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js#L586-L598
train
Returns the index of the property in the array that matches the expected value
[ 30522, 3853, 1006, 9779, 11335, 2100, 1010, 2310, 2595, 5051, 10985, 21572, 4842, 3723, 10175, 5657, 1010, 11867, 18981, 15010, 18442, 1007, 1063, 13075, 1045, 1010, 1050, 1025, 11867, 18981, 15010, 18442, 1027, 11867, 18981, 15010, 18442, 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...
mdn/browser-compat-data
scripts/render.js
getData
function getData(queryString, obj) { return queryString.split('.').reduce(function(prev, curr) { return prev ? prev[curr] : undefined }, obj); }
javascript
function getData(queryString, obj) { return queryString.split('.').reduce(function(prev, curr) { return prev ? prev[curr] : undefined }, obj); }
[ "function", "getData", "(", "queryString", ",", "obj", ")", "{", "return", "queryString", ".", "split", "(", "'.'", ")", ".", "reduce", "(", "function", "(", "prev", ",", "curr", ")", "{", "return", "prev", "?", "prev", "[", "curr", "]", ":", "undefi...
/* Get compat data using a query string like "webextensions.api.alarms"
[ "/", "*", "Get", "compat", "data", "using", "a", "query", "string", "like", "webextensions", ".", "api", ".", "alarms" ]
6ca59b232e8fe080f441c7cb625d2bfd1a6fbe2b
https://github.com/mdn/browser-compat-data/blob/6ca59b232e8fe080f441c7cb625d2bfd1a6fbe2b/scripts/render.js#L402-L406
train
Get data from query string
[ 30522, 3853, 2131, 2850, 2696, 1006, 23032, 3367, 4892, 1010, 27885, 3501, 1007, 1063, 2709, 23032, 3367, 4892, 1012, 3975, 1006, 1005, 1012, 1005, 1007, 1012, 5547, 1006, 3853, 1006, 3653, 2615, 1010, 12731, 12171, 1007, 1063, 2709, 3653, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/datepicker/js/calendarYearBody.js
CalendarYearBodyCtrl
function CalendarYearBodyCtrl($element, $$mdDateUtil, $mdDateLocale) { /** @final {!angular.JQLite} */ this.$element = $element; /** @final */ this.dateUtil = $$mdDateUtil; /** @final */ this.dateLocale = $mdDateLocale; /** @type {Object} Reference to the calendar. */ this.calendarCtr...
javascript
function CalendarYearBodyCtrl($element, $$mdDateUtil, $mdDateLocale) { /** @final {!angular.JQLite} */ this.$element = $element; /** @final */ this.dateUtil = $$mdDateUtil; /** @final */ this.dateLocale = $mdDateLocale; /** @type {Object} Reference to the calendar. */ this.calendarCtr...
[ "function", "CalendarYearBodyCtrl", "(", "$element", ",", "$$mdDateUtil", ",", "$mdDateLocale", ")", "{", "/** @final {!angular.JQLite} */", "this", ".", "$element", "=", "$element", ";", "/** @final */", "this", ".", "dateUtil", "=", "$$mdDateUtil", ";", "/** @final ...
Controller for a single year. @ngInject @constructor
[ "Controller", "for", "a", "single", "year", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/datepicker/js/calendarYearBody.js#L39-L67
train
The calendar year body controller.
[ 30522, 3853, 8094, 29100, 23684, 6593, 12190, 1006, 1002, 5783, 1010, 1002, 1002, 9108, 13701, 21823, 2140, 1010, 1002, 9108, 13701, 4135, 9289, 2063, 1007, 1063, 1013, 1008, 1008, 1030, 2345, 1063, 999, 16108, 1012, 1046, 4160, 22779, 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...
spencermountain/compromise
src/terms/index.js
function(arr, world, refText, refTerms) { this.terms = arr; this.world = world || w; this.refText = refText; this._refTerms = refTerms; this.get = n => { return this.terms[n]; }; //apply getters let keys = Object.keys(getters); for (let i = 0; i < keys.length; i++) { Object.defineProperty(this...
javascript
function(arr, world, refText, refTerms) { this.terms = arr; this.world = world || w; this.refText = refText; this._refTerms = refTerms; this.get = n => { return this.terms[n]; }; //apply getters let keys = Object.keys(getters); for (let i = 0; i < keys.length; i++) { Object.defineProperty(this...
[ "function", "(", "arr", ",", "world", ",", "refText", ",", "refTerms", ")", "{", "this", ".", "terms", "=", "arr", ";", "this", ".", "world", "=", "world", "||", "w", ";", "this", ".", "refText", "=", "refText", ";", "this", ".", "_refTerms", "=", ...
Terms is an array of Term objects, and methods that wrap around them
[ "Terms", "is", "an", "array", "of", "Term", "objects", "and", "methods", "that", "wrap", "around", "them" ]
526b1cab28a45ccbb430fbf2824db420acd587cf
https://github.com/spencermountain/compromise/blob/526b1cab28a45ccbb430fbf2824db420acd587cf/src/terms/index.js#L7-L20
train
A kludge for the terms in the formula
[ 30522, 3853, 1006, 12098, 2099, 1010, 2088, 1010, 25416, 18209, 1010, 25416, 3334, 5244, 1007, 1063, 2023, 1012, 3408, 1027, 12098, 2099, 1025, 2023, 1012, 2088, 1027, 2088, 1064, 1064, 1059, 1025, 2023, 1012, 25416, 18209, 1027, 25416, 182...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
nhn/tui.editor
src/js/extensions/table/tableRenderer.js
_createTheadOrTbodyHtml
function _createTheadOrTbodyHtml(trs, wrapperNodeName) { let html = ''; if (trs.length) { html = trs.map(tr => { const tdHtml = tr.map(_createCellHtml).join(''); return `<tr>${tdHtml}</tr>`; }).join(''); html = `<${wrapperNodeName}>${html}</${wrapperNodeName}>`; } return html; }
javascript
function _createTheadOrTbodyHtml(trs, wrapperNodeName) { let html = ''; if (trs.length) { html = trs.map(tr => { const tdHtml = tr.map(_createCellHtml).join(''); return `<tr>${tdHtml}</tr>`; }).join(''); html = `<${wrapperNodeName}>${html}</${wrapperNodeName}>`; } return html; }
[ "function", "_createTheadOrTbodyHtml", "(", "trs", ",", "wrapperNodeName", ")", "{", "let", "html", "=", "''", ";", "if", "(", "trs", ".", "length", ")", "{", "html", "=", "trs", ".", "map", "(", "tr", "=>", "{", "const", "tdHtml", "=", "tr", ".", ...
Create html for thead or tbody. @param {Array.<Array.<object>>} trs - tr list @param {string} wrapperNodeName - wrapper node name like THEAD, TBODY @returns {string} @private
[ "Create", "html", "for", "thead", "or", "tbody", "." ]
e75ab08c2a7ab07d1143e318f7cde135c5e3002e
https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/extensions/table/tableRenderer.js#L30-L43
train
Create html for the table head or tbody
[ 30522, 3853, 1035, 3443, 10760, 26467, 2102, 23684, 11039, 19968, 1006, 19817, 2015, 1010, 10236, 4842, 3630, 4181, 14074, 1007, 1063, 2292, 16129, 1027, 1005, 1005, 1025, 2065, 1006, 19817, 2015, 1012, 3091, 1007, 1063, 16129, 1027, 19817, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
jakesgordon/javascript-state-machine
src/jsm.js
JSM
function JSM(context, config) { this.context = context; this.config = config; this.state = config.init.from; this.observers = [context]; }
javascript
function JSM(context, config) { this.context = context; this.config = config; this.state = config.init.from; this.observers = [context]; }
[ "function", "JSM", "(", "context", ",", "config", ")", "{", "this", ".", "context", "=", "context", ";", "this", ".", "config", "=", "config", ";", "this", ".", "state", "=", "config", ".", "init", ".", "from", ";", "this", ".", "observers", "=", "...
-------------------------------------------------------------------------------------------------
[ "-------------------------------------------------------------------------------------------------" ]
0d603577423244228cebcd62e60dbbfff27c6ea3
https://github.com/jakesgordon/javascript-state-machine/blob/0d603577423244228cebcd62e60dbbfff27c6ea3/src/jsm.js#L9-L14
train
JSM constructor.
[ 30522, 3853, 1046, 6491, 1006, 6123, 1010, 9530, 8873, 2290, 1007, 1063, 2023, 1012, 6123, 1027, 6123, 1025, 2023, 1012, 9530, 8873, 2290, 1027, 9530, 8873, 2290, 1025, 2023, 1012, 2110, 1027, 9530, 8873, 2290, 1012, 1999, 4183, 1012, 201...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
updateTernFile
function updateTernFile(document) { var path = document.file.fullPath; _postMessageByPass({ type : MessageIds.TERN_UPDATE_FILE_MSG, path : path, text : getTextFromDocument(document) }); return addPending...
javascript
function updateTernFile(document) { var path = document.file.fullPath; _postMessageByPass({ type : MessageIds.TERN_UPDATE_FILE_MSG, path : path, text : getTextFromDocument(document) }); return addPending...
[ "function", "updateTernFile", "(", "document", ")", "{", "var", "path", "=", "document", ".", "file", ".", "fullPath", ";", "_postMessageByPass", "(", "{", "type", ":", "MessageIds", ".", "TERN_UPDATE_FILE_MSG", ",", "path", ":", "path", ",", "text", ":", ...
Update tern with the new contents of a given file. @param {Document} document - the document to update @return {jQuery.Promise} - the promise for the request
[ "Update", "tern", "with", "the", "new", "contents", "of", "a", "given", "file", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/JSUtils/ScopeManager.js#L885-L895
train
update Tern file
[ 30522, 3853, 10651, 16451, 8873, 2571, 1006, 6254, 1007, 1063, 13075, 4130, 1027, 6254, 1012, 5371, 1012, 2440, 15069, 1025, 1035, 2695, 7834, 3736, 3351, 3762, 15194, 1006, 1063, 2828, 1024, 4471, 9821, 1012, 28774, 2078, 1035, 10651, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/editor/EditorCommandHandlers.js
moveLine
function moveLine(editor, direction) { editor = editor || EditorManager.getFocusedEditor(); if (!editor) { return; } var doc = editor.document, lineSelections = editor.convertToLineSelections(editor.getSelections()), isInlineWidget = !!E...
javascript
function moveLine(editor, direction) { editor = editor || EditorManager.getFocusedEditor(); if (!editor) { return; } var doc = editor.document, lineSelections = editor.convertToLineSelections(editor.getSelections()), isInlineWidget = !!E...
[ "function", "moveLine", "(", "editor", ",", "direction", ")", "{", "editor", "=", "editor", "||", "EditorManager", ".", "getFocusedEditor", "(", ")", ";", "if", "(", "!", "editor", ")", "{", "return", ";", "}", "var", "doc", "=", "editor", ".", "docume...
Moves the selected text, or current line if no selection. The cursor/selection moves with the line/lines. @param {Editor} editor - target editor @param {Number} direction - direction of the move (-1,+1) => (Up,Down)
[ "Moves", "the", "selected", "text", "or", "current", "line", "if", "no", "selection", ".", "The", "cursor", "/", "selection", "moves", "with", "the", "line", "/", "lines", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/editor/EditorCommandHandlers.js#L826-L926
train
Move a line in the editor
[ 30522, 3853, 2693, 4179, 1006, 3559, 1010, 3257, 1007, 1063, 3559, 1027, 3559, 1064, 1064, 3559, 24805, 4590, 1012, 2131, 14876, 7874, 19082, 15660, 1006, 1007, 1025, 2065, 1006, 999, 3559, 1007, 1063, 2709, 1025, 1065, 13075, 9986, 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...
vuejs/vuepress
packages/@vuepress/markdown/lib/tableOfContents.js
vBindEscape
function vBindEscape (strs, ...args) { return strs.reduce((prev, curr, index) => { return prev + curr + (index >= args.length ? '' : `"${JSON.stringify(args[index]) .replace(/"/g, "'") .replace(/([^\\])(\\\\)*\\'/g, (_, char) => char + '\\u0022')}"`) }, '') }
javascript
function vBindEscape (strs, ...args) { return strs.reduce((prev, curr, index) => { return prev + curr + (index >= args.length ? '' : `"${JSON.stringify(args[index]) .replace(/"/g, "'") .replace(/([^\\])(\\\\)*\\'/g, (_, char) => char + '\\u0022')}"`) }, '') }
[ "function", "vBindEscape", "(", "strs", ",", "...", "args", ")", "{", "return", "strs", ".", "reduce", "(", "(", "prev", ",", "curr", ",", "index", ")", "=>", "{", "return", "prev", "+", "curr", "+", "(", "index", ">=", "args", ".", "length", "?", ...
escape double quotes in v-bind derivatives
[ "escape", "double", "quotes", "in", "v", "-", "bind", "derivatives" ]
15784acc0cf2e87de3c147895b2c3977b0195d78
https://github.com/vuejs/vuepress/blob/15784acc0cf2e87de3c147895b2c3977b0195d78/packages/@vuepress/markdown/lib/tableOfContents.js#L75-L83
train
vBindEscape - escape a string
[ 30522, 3853, 1058, 8428, 6155, 19464, 1006, 2358, 2869, 1010, 1012, 1012, 1012, 12098, 5620, 1007, 1063, 2709, 2358, 2869, 1012, 5547, 1006, 1006, 3653, 2615, 1010, 12731, 12171, 1010, 5950, 1007, 1027, 1028, 1063, 2709, 3653, 2615, 1009, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
benweet/stackedit
server/pdf.js
waitForJavaScript
function waitForJavaScript() { if (window.MathJax) { // Amazon EC2: fix TeX font detection MathJax.Hub.Register.StartupHook('HTML-CSS Jax Startup', function () { var htmlCss = MathJax.OutputJax['HTML-CSS']; htmlCss.Font.checkWebFont = function (check, font, callback) { if (check.time(callb...
javascript
function waitForJavaScript() { if (window.MathJax) { // Amazon EC2: fix TeX font detection MathJax.Hub.Register.StartupHook('HTML-CSS Jax Startup', function () { var htmlCss = MathJax.OutputJax['HTML-CSS']; htmlCss.Font.checkWebFont = function (check, font, callback) { if (check.time(callb...
[ "function", "waitForJavaScript", "(", ")", "{", "if", "(", "window", ".", "MathJax", ")", "{", "// Amazon EC2: fix TeX font detection", "MathJax", ".", "Hub", ".", "Register", ".", "StartupHook", "(", "'HTML-CSS Jax Startup'", ",", "function", "(", ")", "{", "va...
/* eslint-disable no-var, prefer-arrow-callback, func-names
[ "/", "*", "eslint", "-", "disable", "no", "-", "var", "prefer", "-", "arrow", "-", "callback", "func", "-", "names" ]
91f8cf3c10b75df65b69f9181cee8151d65a788d
https://github.com/benweet/stackedit/blob/91f8cf3c10b75df65b69f9181cee8151d65a788d/server/pdf.js#L8-L33
train
Wait for JavaScript to be loaded
[ 30522, 3853, 3524, 29278, 3900, 12044, 23235, 1006, 1007, 1063, 2065, 1006, 3332, 1012, 8785, 3900, 2595, 1007, 1063, 1013, 1013, 9733, 14925, 2475, 1024, 8081, 16060, 15489, 10788, 8785, 3900, 2595, 1012, 9594, 1012, 4236, 1012, 22752, 680...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-else-return.js
checkIfWithoutElse
function checkIfWithoutElse(node) { const parent = node.parent; /* * Fixing this would require splitting one statement into two, so no error should * be reported if this node is in a position where only one statement is allowed. */ if (!astUtil...
javascript
function checkIfWithoutElse(node) { const parent = node.parent; /* * Fixing this would require splitting one statement into two, so no error should * be reported if this node is in a position where only one statement is allowed. */ if (!astUtil...
[ "function", "checkIfWithoutElse", "(", "node", ")", "{", "const", "parent", "=", "node", ".", "parent", ";", "/*\n * Fixing this would require splitting one statement into two, so no error should\n * be reported if this node is in a position where only one statement...
Check the if statement, but don't catch else-if blocks. @returns {void} @param {Node} node The node for the if statement to check @private
[ "Check", "the", "if", "statement", "but", "don", "t", "catch", "else", "-", "if", "blocks", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-else-return.js#L220-L245
train
Check if node is not a if statement
[ 30522, 3853, 4638, 10128, 24415, 5833, 9050, 2063, 1006, 13045, 1007, 1063, 9530, 3367, 6687, 1027, 13045, 1012, 6687, 1025, 1013, 1008, 1008, 15887, 2023, 2052, 5478, 14541, 2028, 4861, 2046, 2048, 1010, 2061, 2053, 7561, 2323, 1008, 2022,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jgraph/mxgraph
javascript/mxClient.js
function(elems) { // Known block elements for handling linefeeds (list is not complete) var blocks = ['BLOCKQUOTE', 'DIV', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'OL', 'P', 'PRE', 'TABLE', 'UL']; var ret = []; function doExtract(elts) { // Single break should be ignored if (elts.length == 1 && (elts...
javascript
function(elems) { // Known block elements for handling linefeeds (list is not complete) var blocks = ['BLOCKQUOTE', 'DIV', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'OL', 'P', 'PRE', 'TABLE', 'UL']; var ret = []; function doExtract(elts) { // Single break should be ignored if (elts.length == 1 && (elts...
[ "function", "(", "elems", ")", "{", "// Known block elements for handling linefeeds (list is not complete)", "var", "blocks", "=", "[", "'BLOCKQUOTE'", ",", "'DIV'", ",", "'H1'", ",", "'H2'", ",", "'H3'", ",", "'H4'", ",", "'H5'", ",", "'H6'", ",", "'OL'", ",", ...
Function: extractTextWithWhitespace Returns the text content of the specified node. Parameters: elems - DOM nodes to return the text for.
[ "Function", ":", "extractTextWithWhitespace" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L3006-L3057
train
Returns an array of elements that are not part of a block
[ 30522, 3853, 1006, 3449, 6633, 2015, 1007, 1063, 1013, 1013, 2124, 3796, 3787, 2005, 8304, 2240, 7959, 2098, 2015, 1006, 2862, 2003, 2025, 3143, 1007, 13075, 5991, 1027, 1031, 1005, 3796, 28940, 12184, 1005, 1010, 1005, 4487, 2615, 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...
GitbookIO/gitbook
lib/output/generatePages.js
generatePages
function generatePages(generator, output) { var pages = output.getPages(); var logger = output.getLogger(); // Is generator ignoring assets? if (!generator.onPage) { return Promise(output); } return Promise.reduce(pages, function(out, page) { var file = page.getFile(); ...
javascript
function generatePages(generator, output) { var pages = output.getPages(); var logger = output.getLogger(); // Is generator ignoring assets? if (!generator.onPage) { return Promise(output); } return Promise.reduce(pages, function(out, page) { var file = page.getFile(); ...
[ "function", "generatePages", "(", "generator", ",", "output", ")", "{", "var", "pages", "=", "output", ".", "getPages", "(", ")", ";", "var", "logger", "=", "output", ".", "getLogger", "(", ")", ";", "// Is generator ignoring assets?", "if", "(", "!", "gen...
Output all pages using a generator @param {Generator} generator @param {Output} output @return {Promise<Output>}
[ "Output", "all", "pages", "using", "a", "generator" ]
6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4
https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/output/generatePages.js#L11-L34
train
Generate pages from generator
[ 30522, 3853, 9699, 13704, 2015, 1006, 13103, 1010, 6434, 1007, 1063, 13075, 5530, 1027, 6434, 1012, 2131, 13704, 2015, 1006, 1007, 1025, 13075, 8833, 4590, 1027, 6434, 1012, 2131, 21197, 4590, 1006, 1007, 1025, 1013, 1013, 2003, 13103, 9217...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
feathericons/feather
src/to-svg.js
toSvg
function toSvg(name, attrs = {}) { console.warn( 'feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead.', ); if (!name) { throw new Error('The required `key` (icon name) parameter is missing.'); } if (!icons[name]) { throw new Error( `No icon matching '${ n...
javascript
function toSvg(name, attrs = {}) { console.warn( 'feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead.', ); if (!name) { throw new Error('The required `key` (icon name) parameter is missing.'); } if (!icons[name]) { throw new Error( `No icon matching '${ n...
[ "function", "toSvg", "(", "name", ",", "attrs", "=", "{", "}", ")", "{", "console", ".", "warn", "(", "'feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead.'", ",", ")", ";", "if", "(", "!", "name", ")", "{", "throw", "new", "Error", ...
Create an SVG string. @deprecated @param {string} name @param {Object} attrs @returns {string}
[ "Create", "an", "SVG", "string", "." ]
8f658193d25e943b196a2367319b5d9e85ee9f9f
https://github.com/feathericons/feather/blob/8f658193d25e943b196a2367319b5d9e85ee9f9f/src/to-svg.js#L10-L28
train
Returns an svg string for the specified icon
[ 30522, 3853, 2000, 2015, 2615, 2290, 1006, 2171, 1010, 2012, 16344, 2015, 1027, 30524, 2290, 1006, 1007, 2003, 2139, 28139, 12921, 1012, 3531, 2224, 15550, 1012, 18407, 1031, 2171, 1033, 1012, 2000, 2015, 2615, 2290, 1006, 1007, 2612, 1012,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
javascript/selenium-core/scripts/ui-element.js
UIArgument
function UIArgument(uiArgumentShorthand, localVars) { /** * @param uiArgumentShorthand * * @throws UIArgumentException */ this.validate = function(uiArgumentShorthand) { var msg = "UIArgument validation error:\n" + print_r(uiArgumentShorthand); // tr...
javascript
function UIArgument(uiArgumentShorthand, localVars) { /** * @param uiArgumentShorthand * * @throws UIArgumentException */ this.validate = function(uiArgumentShorthand) { var msg = "UIArgument validation error:\n" + print_r(uiArgumentShorthand); // tr...
[ "function", "UIArgument", "(", "uiArgumentShorthand", ",", "localVars", ")", "{", "/**\n * @param uiArgumentShorthand\n *\n * @throws UIArgumentException\n */", "this", ".", "validate", "=", "function", "(", "uiArgumentShorthand", ")", "{", "var", "msg", "=",...
Constructs a UIArgument. This is mostly for checking that the values are valid. @param uiArgumentShorthand @param localVars @throws UIArgumentException
[ "Constructs", "a", "UIArgument", ".", "This", "is", "mostly", "for", "checking", "that", "the", "values", "are", "valid", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/ui-element.js#L530-L586
train
UIArgument constructor.
[ 30522, 3853, 21318, 2906, 22850, 4765, 1006, 21318, 2906, 22850, 11187, 27794, 11774, 1010, 2334, 10755, 2015, 1007, 1063, 1013, 1008, 1008, 1008, 1030, 11498, 2213, 21318, 2906, 22850, 11187, 27794, 11774, 1008, 1008, 1030, 11618, 21318, 290...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/StringUtils.js
breakableUrl
function breakableUrl(url) { // This is for displaying in UI, so always want it escaped var escUrl = _.escape(url); // Inject zero-width space character (U+200B) near path separators (/) to allow line breaking there return escUrl.replace( new RegExp(regexEscape("/"), "g"), ...
javascript
function breakableUrl(url) { // This is for displaying in UI, so always want it escaped var escUrl = _.escape(url); // Inject zero-width space character (U+200B) near path separators (/) to allow line breaking there return escUrl.replace( new RegExp(regexEscape("/"), "g"), ...
[ "function", "breakableUrl", "(", "url", ")", "{", "// This is for displaying in UI, so always want it escaped", "var", "escUrl", "=", "_", ".", "escape", "(", "url", ")", ";", "// Inject zero-width space character (U+200B) near path separators (/) to allow line breaking there", "...
Return an escaped path or URL string that can be broken near path separators. @param {string} url the path or URL to format @return {string} the formatted path or URL
[ "Return", "an", "escaped", "path", "or", "URL", "string", "that", "can", "be", "broken", "near", "path", "separators", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/utils/StringUtils.js#L166-L175
train
Break a URL into a line breakable
[ 30522, 3853, 3338, 3085, 3126, 2140, 1006, 24471, 2140, 1007, 1063, 1013, 1013, 2023, 2003, 2005, 14962, 1999, 21318, 1010, 2061, 2467, 2215, 2009, 6376, 13075, 9686, 10841, 12190, 1027, 1035, 1012, 4019, 1006, 24471, 2140, 1007, 1025, 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...
grpc/grpc
examples/node/static_codegen/route_guide/route_guide_server.js
recordRoute
function recordRoute(call, callback) { var point_count = 0; var feature_count = 0; var distance = 0; var previous = null; // Start a timer var start_time = process.hrtime(); call.on('data', function(point) { point_count += 1; if (checkFeature(point).name !== '') { feature_count += 1; } ...
javascript
function recordRoute(call, callback) { var point_count = 0; var feature_count = 0; var distance = 0; var previous = null; // Start a timer var start_time = process.hrtime(); call.on('data', function(point) { point_count += 1; if (checkFeature(point).name !== '') { feature_count += 1; } ...
[ "function", "recordRoute", "(", "call", ",", "callback", ")", "{", "var", "point_count", "=", "0", ";", "var", "feature_count", "=", "0", ";", "var", "distance", "=", "0", ";", "var", "previous", "=", "null", ";", "// Start a timer", "var", "start_time", ...
recordRoute handler. Gets a stream of points, and responds with statistics about the "trip": number of points, number of known features visited, total distance traveled, and total time spent. @param {Readable} call The request point stream. @param {function(Error, routeSummary)} callback The callback to pass the respon...
[ "recordRoute", "handler", ".", "Gets", "a", "stream", "of", "points", "and", "responds", "with", "statistics", "about", "the", "trip", ":", "number", "of", "points", "number", "of", "known", "features", "visited", "total", "distance", "traveled", "and", "total...
cc75d93818410e2b0edd0fa3009a6def9ac403ca
https://github.com/grpc/grpc/blob/cc75d93818410e2b0edd0fa3009a6def9ac403ca/examples/node/static_codegen/route_guide/route_guide_server.js#L137-L166
train
Record a route
[ 30522, 3853, 2501, 22494, 2618, 1006, 2655, 1010, 2655, 5963, 1007, 1063, 13075, 2391, 1035, 4175, 1027, 1014, 1025, 13075, 3444, 1035, 4175, 1027, 1014, 1025, 13075, 3292, 1027, 30524, 4017, 5397, 1006, 2391, 1007, 1012, 2171, 999, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/AutoUpdate/main.js
checkInstallationStatus
function checkInstallationStatus() { var searchParams = { "updateDir": updateDir, "installErrorStr": ["ERROR:"], "bracketsErrorStr": ["ERROR:"], "encoding": "utf8" }, // Below are the possible Windows Installer error strings...
javascript
function checkInstallationStatus() { var searchParams = { "updateDir": updateDir, "installErrorStr": ["ERROR:"], "bracketsErrorStr": ["ERROR:"], "encoding": "utf8" }, // Below are the possible Windows Installer error strings...
[ "function", "checkInstallationStatus", "(", ")", "{", "var", "searchParams", "=", "{", "\"updateDir\"", ":", "updateDir", ",", "\"installErrorStr\"", ":", "[", "\"ERROR:\"", "]", ",", "\"bracketsErrorStr\"", ":", "[", "\"ERROR:\"", "]", ",", "\"encoding\"", ":", ...
Checks Install failure scenarios
[ "Checks", "Install", "failure", "scenarios" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/AutoUpdate/main.js#L197-L214
train
Check installation status
[ 30522, 3853, 4638, 7076, 9080, 13490, 9153, 5809, 1006, 1007, 1063, 13075, 3945, 28689, 5244, 1027, 1063, 1000, 7172, 4313, 1000, 1024, 7172, 4313, 1010, 1000, 16500, 2121, 29165, 3367, 2099, 1000, 1024, 1031, 1000, 7561, 1024, 1000, 1033, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
examples/error/index.js
error
function error(err, req, res, next) { // log it if (!test) console.error(err.stack); // respond with 500 "Internal Server Error". res.status(500); res.send('Internal Server Error'); }
javascript
function error(err, req, res, next) { // log it if (!test) console.error(err.stack); // respond with 500 "Internal Server Error". res.status(500); res.send('Internal Server Error'); }
[ "function", "error", "(", "err", ",", "req", ",", "res", ",", "next", ")", "{", "// log it", "if", "(", "!", "test", ")", "console", ".", "error", "(", "err", ".", "stack", ")", ";", "// respond with 500 \"Internal Server Error\".", "res", ".", "status", ...
error handling middleware have an arity of 4 instead of the typical (req, res, next), otherwise they behave exactly like regular middleware, you may have several of them, in different orders etc.
[ "error", "handling", "middleware", "have", "an", "arity", "of", "4", "instead", "of", "the", "typical", "(", "req", "res", "next", ")", "otherwise", "they", "behave", "exactly", "like", "regular", "middleware", "you", "may", "have", "several", "of", "them", ...
dc538f6e810bd462c98ee7e6aae24c64d4b1da93
https://github.com/expressjs/express/blob/dc538f6e810bd462c98ee7e6aae24c64d4b1da93/examples/error/index.js#L18-L25
train
error handler for the request
[ 30522, 3853, 7561, 1006, 9413, 2099, 1010, 2128, 4160, 1010, 24501, 1010, 2279, 1007, 1063, 1013, 1013, 8833, 2009, 2065, 1006, 999, 3231, 1007, 10122, 1012, 7561, 1006, 9413, 2099, 1012, 9991, 1007, 1025, 1013, 1013, 6869, 2007, 3156, 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...
NetEase/pomelo
lib/connectors/hybrid/tcpsocket.js
function(socket, opts) { if(!(this instanceof Socket)) { return new Socket(socket, opts); } if(!socket || !opts) { throw new Error('invalid socket or opts'); } if(!opts.headSize || typeof opts.headHandler !== 'function') { throw new Error('invalid opts.headSize or opts.headHandler'); } // s...
javascript
function(socket, opts) { if(!(this instanceof Socket)) { return new Socket(socket, opts); } if(!socket || !opts) { throw new Error('invalid socket or opts'); } if(!opts.headSize || typeof opts.headHandler !== 'function') { throw new Error('invalid opts.headSize or opts.headHandler'); } // s...
[ "function", "(", "socket", ",", "opts", ")", "{", "if", "(", "!", "(", "this", "instanceof", "Socket", ")", ")", "{", "return", "new", "Socket", "(", "socket", ",", "opts", ")", ";", "}", "if", "(", "!", "socket", "||", "!", "opts", ")", "{", "...
closed Tcp socket wrapper with package compositing. Collect the package from socket and emit a completed package with 'data' event. Uniform with ws.WebSocket interfaces. @param {Object} socket origin socket from node.js net module @param {Object} opts options parameter. opts.headSize size of package head opts.headH...
[ "closed", "Tcp", "socket", "wrapper", "with", "package", "compositing", ".", "Collect", "the", "package", "from", "socket", "and", "emit", "a", "completed", "package", "with", "data", "event", ".", "Uniform", "with", "ws", ".", "WebSocket", "interfaces", "." ]
defcf019631ed399cc4dad932d3b028a04a039a4
https://github.com/NetEase/pomelo/blob/defcf019631ed399cc4dad932d3b028a04a039a4/lib/connectors/hybrid/tcpsocket.js#L24-L61
train
A stream that can be used to send a message to the remote node.
[ 30522, 3853, 1006, 22278, 1010, 23569, 2015, 1007, 1063, 2065, 1006, 999, 1006, 2023, 6013, 11253, 22278, 1007, 1007, 1063, 2709, 2047, 22278, 1006, 22278, 1010, 23569, 2015, 1007, 1025, 1065, 2065, 1006, 999, 22278, 1064, 1064, 999, 23569,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/publisher/configuration.js
fromEnvironment
function fromEnvironment(config) { config.port = config.port || process.env.AWS_CSM_PORT; config.enabled = config.enabled || process.env.AWS_CSM_ENABLED; config.clientId = config.clientId || process.env.AWS_CSM_CLIENT_ID; return config.port && config.enabled && config.clientId || ['false', '0'].indexOf(conf...
javascript
function fromEnvironment(config) { config.port = config.port || process.env.AWS_CSM_PORT; config.enabled = config.enabled || process.env.AWS_CSM_ENABLED; config.clientId = config.clientId || process.env.AWS_CSM_CLIENT_ID; return config.port && config.enabled && config.clientId || ['false', '0'].indexOf(conf...
[ "function", "fromEnvironment", "(", "config", ")", "{", "config", ".", "port", "=", "config", ".", "port", "||", "process", ".", "env", ".", "AWS_CSM_PORT", ";", "config", ".", "enabled", "=", "config", ".", "enabled", "||", "process", ".", "env", ".", ...
Resolve configurations from environmental variables. @param {object} client side monitoring config object needs to be resolved @returns {boolean} whether resolving configurations is done @api private
[ "Resolve", "configurations", "from", "environmental", "variables", "." ]
c23e5f0edd150f8885267e5f7c8a564f8e6e8562
https://github.com/aws/aws-sdk-js/blob/c23e5f0edd150f8885267e5f7c8a564f8e6e8562/lib/publisher/configuration.js#L26-L32
train
Get the configuration from the environment
[ 30522, 3853, 2013, 2368, 21663, 2239, 3672, 1006, 9530, 8873, 2290, 1007, 1063, 9530, 8873, 2290, 1012, 3417, 1027, 9530, 8873, 2290, 1012, 3417, 1064, 1064, 2832, 1012, 4372, 2615, 1012, 22091, 2015, 1035, 20116, 2213, 1035, 3417, 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...
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
XPathEvaluator
function XPathEvaluator(newDefaultEngineName) { // private var nativeEngine = new NativeEngine(); var defaultEngineName = newDefaultEngineName || 'ajaxslt'; var engines = { 'ajaxslt' : new AjaxsltEngine(), 'javascript-xpath' : new JavascriptXPathEngine(), 'rpc-opti...
javascript
function XPathEvaluator(newDefaultEngineName) { // private var nativeEngine = new NativeEngine(); var defaultEngineName = newDefaultEngineName || 'ajaxslt'; var engines = { 'ajaxslt' : new AjaxsltEngine(), 'javascript-xpath' : new JavascriptXPathEngine(), 'rpc-opti...
[ "function", "XPathEvaluator", "(", "newDefaultEngineName", ")", "{", "// private", "var", "nativeEngine", "=", "new", "NativeEngine", "(", ")", ";", "var", "defaultEngineName", "=", "newDefaultEngineName", "||", "'ajaxslt'", ";", "var", "engines", "=", "{", "'ajax...
An object responsible for handling XPath logic. New XPath engines can be registered to this evaluator on the fly. @param newDefaultEngineName the name of the default XPath engine. Must be a non-native engine that is always available. Defaults to 'ajaxslt'.
[ "An", "object", "responsible", "for", "handling", "XPath", "logic", ".", "New", "XPath", "engines", "can", "be", "registered", "to", "this", "evaluator", "on", "the", "fly", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L1947-L2092
train
XPathEvaluator - Augmenter for XPath evaluation.
[ 30522, 3853, 26726, 8988, 13331, 7630, 8844, 1006, 2047, 3207, 7011, 11314, 13159, 21820, 14074, 1007, 1063, 1013, 1013, 2797, 13075, 3128, 13159, 3170, 1027, 2047, 3128, 13159, 3170, 1006, 1007, 1025, 13075, 12398, 13159, 21820, 14074, 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...
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_categories
function addonsManager_categories(aSpec) { var spec = aSpec || { }; var categories = this.getElements({ type: "categories", subtype: spec.attribute, value: spec.value }); if (categories.length == 0) throw new Error(arguments.callee.name + ": Categories could not be found."); ...
javascript
function addonsManager_categories(aSpec) { var spec = aSpec || { }; var categories = this.getElements({ type: "categories", subtype: spec.attribute, value: spec.value }); if (categories.length == 0) throw new Error(arguments.callee.name + ": Categories could not be found."); ...
[ "function", "addonsManager_categories", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "categories", "=", "this", ".", "getElements", "(", "{", "type", ":", "\"categories\"", ",", "subtype", ":", "spec", ".", "attribute", ...
Returns the categories which match the filter criteria @param {object} aSpec Information about the filter to apply Elements: attribute - DOM attribute of the wanted category [optional - default: ""] value - Value of the DOM attribute [optional - default: ""] @returns List of categories @type {array of ElemBase}
[ "Returns", "the", "categories", "which", "match", "the", "filter", "criteria" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L629-L642
train
Returns the categories of the addons manager
[ 30522, 3853, 5587, 5644, 24805, 4590, 1035, 7236, 1006, 2004, 5051, 2278, 1007, 1063, 13075, 28699, 1027, 2004, 5051, 2278, 1064, 1064, 1063, 1065, 1025, 13075, 7236, 1027, 2023, 1012, 2131, 12260, 8163, 1006, 1063, 2828, 1024, 1000, 7236, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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_PtgAttrSemi
function parse_PtgAttrSemi(blob, length, opts) { var bitSemi = (blob[blob.l+1] & 0xFF) ? 1 : 0; blob.l += opts && opts.biff == 2 ? 3 : 4; return [bitSemi]; }
javascript
function parse_PtgAttrSemi(blob, length, opts) { var bitSemi = (blob[blob.l+1] & 0xFF) ? 1 : 0; blob.l += opts && opts.biff == 2 ? 3 : 4; return [bitSemi]; }
[ "function", "parse_PtgAttrSemi", "(", "blob", ",", "length", ",", "opts", ")", "{", "var", "bitSemi", "=", "(", "blob", "[", "blob", ".", "l", "+", "1", "]", "&", "0xFF", ")", "?", "1", ":", "0", ";", "blob", ".", "l", "+=", "opts", "&&", "opts...
/* [MS-XLS] 2.5.198.37 ; [MS-XLSB] 2.5.97.29
[ "/", "*", "[", "MS", "-", "XLS", "]", "2", ".", "5", ".", "198", ".", "37", ";", "[", "MS", "-", "XLSB", "]", "2", ".", "5", ".", "97", ".", "29" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L10397-L10401
train
Parse an PTG attribute
[ 30522, 3853, 11968, 3366, 1035, 13866, 20697, 16344, 3366, 4328, 1006, 1038, 4135, 2497, 1010, 3091, 1010, 23569, 2015, 1007, 1063, 13075, 9017, 23238, 1027, 1006, 1038, 4135, 2497, 1031, 1038, 4135, 2497, 1012, 1048, 1009, 1015, 1033, 1004...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
uber/deck.gl
examples/experimental/bezier/src/bezier-graph-layer.js
computeControlPoint
function computeControlPoint(source, target, direction, offset) { const midPoint = [(source[0] + target[0]) / 2, (source[1] + target[1]) / 2]; const dx = target[0] - source[0]; const dy = target[1] - source[1]; const normal = [dy, -dx]; const length = Math.sqrt(Math.pow(normal[0], 2.0) + Math.pow(normal[1], 2...
javascript
function computeControlPoint(source, target, direction, offset) { const midPoint = [(source[0] + target[0]) / 2, (source[1] + target[1]) / 2]; const dx = target[0] - source[0]; const dy = target[1] - source[1]; const normal = [dy, -dx]; const length = Math.sqrt(Math.pow(normal[0], 2.0) + Math.pow(normal[1], 2...
[ "function", "computeControlPoint", "(", "source", ",", "target", ",", "direction", ",", "offset", ")", "{", "const", "midPoint", "=", "[", "(", "source", "[", "0", "]", "+", "target", "[", "0", "]", ")", "/", "2", ",", "(", "source", "[", "1", "]",...
A helper function to compute the control point of a quadratic bezier curve @param {number[]} source - the coordinates of source point, ex: [x, y, z] @param {number[]} target - the coordinates of target point, ex: [x, y, z] @param {number} direction - the direction of the curve, 1 or -1 @param {number} offset -...
[ "A", "helper", "function", "to", "compute", "the", "control", "point", "of", "a", "quadratic", "bezier", "curve" ]
a2010448b7f268bbd03617b812334c68a6b9e5b2
https://github.com/uber/deck.gl/blob/a2010448b7f268bbd03617b812334c68a6b9e5b2/examples/experimental/bezier/src/bezier-graph-layer.js#L54-L65
train
Compute control point
[ 30522, 3853, 24134, 8663, 13181, 14277, 25785, 1006, 3120, 1010, 4539, 1010, 3257, 1010, 16396, 1007, 1063, 9530, 3367, 3054, 8400, 1027, 1031, 1006, 3120, 1031, 1014, 1033, 1009, 4539, 1031, 1014, 1033, 1007, 1013, 1016, 1010, 1006, 3120, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/utils.js
formatUrlPref
function formatUrlPref(prefName) { var formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"] .getService(Ci.nsIURLFormatter); return formatter.formatURLPref(prefName); }
javascript
function formatUrlPref(prefName) { var formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"] .getService(Ci.nsIURLFormatter); return formatter.formatURLPref(prefName); }
[ "function", "formatUrlPref", "(", "prefName", ")", "{", "var", "formatter", "=", "Cc", "[", "\"@mozilla.org/toolkit/URLFormatterService;1\"", "]", ".", "getService", "(", "Ci", ".", "nsIURLFormatter", ")", ";", "return", "formatter", ".", "formatURLPref", "(", "pr...
Format a URL by replacing all placeholders @param {string} prefName The preference name which contains the URL @return The formatted URL @type string
[ "Format", "a", "URL", "by", "replacing", "all", "placeholders" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/utils.js#L281-L286
train
Format a URL pref
[ 30522, 3853, 4289, 3126, 14277, 2890, 2546, 1006, 3653, 2546, 18442, 1007, 1063, 13075, 4289, 3334, 1027, 10507, 1031, 1000, 1030, 9587, 5831, 4571, 1012, 8917, 1013, 6994, 23615, 1013, 24471, 10270, 2953, 18900, 7747, 2121, 7903, 2063, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
catapult-project/catapult
tracing/third_party/oboe/src/ascentManager.js
ascentManager
function ascentManager(oboeBus, handlers){ "use strict"; var listenerId = {}, ascent; function stateAfter(handler) { return function(param){ ascent = handler( ascent, param); } } for( var eventName in handlers ) { oboeBus(eventName).on(stateAfter(handlers[event...
javascript
function ascentManager(oboeBus, handlers){ "use strict"; var listenerId = {}, ascent; function stateAfter(handler) { return function(param){ ascent = handler( ascent, param); } } for( var eventName in handlers ) { oboeBus(eventName).on(stateAfter(handlers[event...
[ "function", "ascentManager", "(", "oboeBus", ",", "handlers", ")", "{", "\"use strict\"", ";", "var", "listenerId", "=", "{", "}", ",", "ascent", ";", "function", "stateAfter", "(", "handler", ")", "{", "return", "function", "(", "param", ")", "{", "ascent...
A bridge used to assign stateless functions to listen to clarinet. As well as the parameter from clarinet, each callback will also be passed the result of the last callback. This may also be used to clear all listeners by assigning zero handlers: ascentManager( clarinet, {} )
[ "A", "bridge", "used", "to", "assign", "stateless", "functions", "to", "listen", "to", "clarinet", "." ]
992929ffccac68827869a497f01ee4d653ed4f25
https://github.com/catapult-project/catapult/blob/992929ffccac68827869a497f01ee4d653ed4f25/tracing/third_party/oboe/src/ascentManager.js#L12-L62
train
A function that handles ascent events.
[ 30522, 3853, 16354, 24805, 4590, 1006, 22523, 8286, 1010, 28213, 2015, 1007, 1063, 1000, 2224, 9384, 1000, 1025, 13075, 19373, 3593, 1027, 1063, 1065, 1010, 16354, 1025, 3853, 2110, 10354, 3334, 1006, 28213, 1007, 1063, 2709, 3853, 1006, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/ui/external/ElementTree.js
_getElementTreeLeftColumnOfListItem
function _getElementTreeLeftColumnOfListItem(controls, paddingLeft) { var html = "<offset style=\"padding-left:" + paddingLeft + "px\" >"; if (controls.content.length > 0) { html += "<arrow down=\"true\"></arrow>"; } else { html += "<place-holder></place-holder>"; } html += "</offset>"; ret...
javascript
function _getElementTreeLeftColumnOfListItem(controls, paddingLeft) { var html = "<offset style=\"padding-left:" + paddingLeft + "px\" >"; if (controls.content.length > 0) { html += "<arrow down=\"true\"></arrow>"; } else { html += "<place-holder></place-holder>"; } html += "</offset>"; ret...
[ "function", "_getElementTreeLeftColumnOfListItem", "(", "controls", ",", "paddingLeft", ")", "{", "var", "html", "=", "\"<offset style=\\\"padding-left:\"", "+", "paddingLeft", "+", "\"px\\\" >\"", ";", "if", "(", "controls", ".", "content", ".", "length", ">", "0",...
Create HTML for the left part of the ElementTree list item. @param {ElementTreeOptions.controls} controls @param {number} paddingLeft @returns {string} @private
[ "Create", "HTML", "for", "the", "left", "part", "of", "the", "ElementTree", "list", "item", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/external/ElementTree.js#L60-L72
train
Returns the HTML markup of the left column of the list item
[ 30522, 3853, 1035, 2131, 12260, 3672, 13334, 2571, 6199, 25778, 2819, 3630, 10258, 2923, 4221, 2213, 1006, 7711, 1010, 11687, 4667, 2571, 6199, 1007, 1063, 13075, 16129, 1027, 1000, 1026, 16396, 2806, 1027, 1032, 1000, 11687, 4667, 1011, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/autocomplete/js/autocompleteController.js
getAngularElements
function getAngularElements (elements) { var obj = {}; for (var key in elements) { if (elements.hasOwnProperty(key)) obj[ key ] = angular.element(elements[ key ]); } return obj; }
javascript
function getAngularElements (elements) { var obj = {}; for (var key in elements) { if (elements.hasOwnProperty(key)) obj[ key ] = angular.element(elements[ key ]); } return obj; }
[ "function", "getAngularElements", "(", "elements", ")", "{", "var", "obj", "=", "{", "}", ";", "for", "(", "var", "key", "in", "elements", ")", "{", "if", "(", "elements", ".", "hasOwnProperty", "(", "key", ")", ")", "obj", "[", "key", "]", "=", "a...
Gathers angular-wrapped versions of each element @param elements @returns {{}}
[ "Gathers", "angular", "-", "wrapped", "versions", "of", "each", "element" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/autocomplete/js/autocompleteController.js#L333-L339
train
Get angular elements from an object
[ 30522, 3853, 2131, 5654, 7934, 12260, 8163, 1006, 3787, 1007, 1063, 13075, 27885, 3501, 1027, 1063, 1065, 1025, 2005, 1006, 13075, 3145, 1999, 3787, 1007, 1063, 2065, 1006, 3787, 1012, 2038, 12384, 21572, 4842, 3723, 1006, 3145, 1007, 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...
Shopify/draggable
src/Swappable/Swappable.js
onSwappableSwappedDefaultAnnouncement
function onSwappableSwappedDefaultAnnouncement({dragEvent, swappedElement}) { const sourceText = dragEvent.source.textContent.trim() || dragEvent.source.id || 'swappable element'; const overText = swappedElement.textContent.trim() || swappedElement.id || 'swappable element'; return `Swapped ${sourceText} with ${...
javascript
function onSwappableSwappedDefaultAnnouncement({dragEvent, swappedElement}) { const sourceText = dragEvent.source.textContent.trim() || dragEvent.source.id || 'swappable element'; const overText = swappedElement.textContent.trim() || swappedElement.id || 'swappable element'; return `Swapped ${sourceText} with ${...
[ "function", "onSwappableSwappedDefaultAnnouncement", "(", "{", "dragEvent", ",", "swappedElement", "}", ")", "{", "const", "sourceText", "=", "dragEvent", ".", "source", ".", "textContent", ".", "trim", "(", ")", "||", "dragEvent", ".", "source", ".", "id", "|...
Returns an announcement message when the Draggable element is swapped with another draggable element @param {SwappableSwappedEvent} swappableEvent @return {String}
[ "Returns", "an", "announcement", "message", "when", "the", "Draggable", "element", "is", "swapped", "with", "another", "draggable", "element" ]
ecc04b2cdb8b5009664862472ff8cb237c38cfeb
https://github.com/Shopify/draggable/blob/ecc04b2cdb8b5009664862472ff8cb237c38cfeb/src/Swappable/Swappable.js#L13-L18
train
This function is called when the user clicks on a swappable element.
[ 30522, 3853, 2006, 26760, 29098, 3085, 26760, 29098, 22367, 12879, 23505, 11639, 23709, 3401, 3672, 1006, 1063, 8011, 18697, 3372, 1010, 29176, 12260, 3672, 1065, 1007, 1063, 9530, 3367, 3120, 18209, 1027, 8011, 18697, 3372, 1012, 3120, 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...
uber/deck.gl
modules/layers/src/icon-layer/icon-manager.js
resizeImage
function resizeImage(ctx, imageData, width, height) { const {naturalWidth, naturalHeight} = imageData; if (width === naturalWidth && height === naturalHeight) { return imageData; } ctx.canvas.height = height; ctx.canvas.width = width; ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); // ima...
javascript
function resizeImage(ctx, imageData, width, height) { const {naturalWidth, naturalHeight} = imageData; if (width === naturalWidth && height === naturalHeight) { return imageData; } ctx.canvas.height = height; ctx.canvas.width = width; ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); // ima...
[ "function", "resizeImage", "(", "ctx", ",", "imageData", ",", "width", ",", "height", ")", "{", "const", "{", "naturalWidth", ",", "naturalHeight", "}", "=", "imageData", ";", "if", "(", "width", "===", "naturalWidth", "&&", "height", "===", "naturalHeight",...
resize image to given width and height
[ "resize", "image", "to", "given", "width", "and", "height" ]
a2010448b7f268bbd03617b812334c68a6b9e5b2
https://github.com/uber/deck.gl/blob/a2010448b7f268bbd03617b812334c68a6b9e5b2/modules/layers/src/icon-layer/icon-manager.js#L23-L38
train
Resize image to the specified size
[ 30522, 3853, 24501, 4697, 9581, 3351, 1006, 14931, 2595, 1010, 30524, 1027, 3019, 9148, 11927, 2232, 1004, 1004, 4578, 1027, 1027, 1027, 3019, 26036, 13900, 1007, 1063, 2709, 3746, 2850, 2696, 1025, 1065, 14931, 2595, 1012, 10683, 1012, 457...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/downloads.js
downloadManager_getAllDownloads
function downloadManager_getAllDownloads() { var dbConn = this._dms.DBConnection; var stmt = null; if (dbConn.schemaVersion < 3) return new Array(); // Run a SQL query and iterate through all results which have been found var downloads = []; stmt = dbConn.createStatement("SELECT * FROM m...
javascript
function downloadManager_getAllDownloads() { var dbConn = this._dms.DBConnection; var stmt = null; if (dbConn.schemaVersion < 3) return new Array(); // Run a SQL query and iterate through all results which have been found var downloads = []; stmt = dbConn.createStatement("SELECT * FROM m...
[ "function", "downloadManager_getAllDownloads", "(", ")", "{", "var", "dbConn", "=", "this", ".", "_dms", ".", "DBConnection", ";", "var", "stmt", "=", "null", ";", "if", "(", "dbConn", ".", "schemaVersion", "<", "3", ")", "return", "new", "Array", "(", "...
Get the list of all downloaded files in the database @returns List of downloads @type {Array of download}
[ "Get", "the", "list", "of", "all", "downloaded", "files", "in", "the", "database" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/downloads.js#L195-L220
train
Get all the downloads
[ 30522, 3853, 8816, 24805, 4590, 1035, 2131, 8095, 7698, 11066, 2015, 1006, 1007, 1063, 13075, 16962, 8663, 2078, 1027, 2023, 1012, 1035, 1040, 5244, 1012, 16962, 8663, 2638, 7542, 1025, 13075, 2358, 20492, 1027, 19701, 1025, 2065, 1006, 169...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/routing/Router.js
function (sName, oParameters) { if (oParameters === undefined) { //even if there are only optional parameters crossroads cannot navigate with undefined oParameters = {}; } var oRoute = this.getRoute(sName); if (!oRoute) { Log.warning("Route with name " + sName + " does not exist", this);...
javascript
function (sName, oParameters) { if (oParameters === undefined) { //even if there are only optional parameters crossroads cannot navigate with undefined oParameters = {}; } var oRoute = this.getRoute(sName); if (!oRoute) { Log.warning("Route with name " + sName + " does not exist", this);...
[ "function", "(", "sName", ",", "oParameters", ")", "{", "if", "(", "oParameters", "===", "undefined", ")", "{", "//even if there are only optional parameters crossroads cannot navigate with undefined", "oParameters", "=", "{", "}", ";", "}", "var", "oRoute", "=", "thi...
Returns the URL for the route and replaces the placeholders with the values in oParameters @param {string} sName Name of the route @param {object} [oParameters] Parameters for the route @return {string} the unencoded pattern with interpolated arguments @public
[ "Returns", "the", "URL", "for", "the", "route", "and", "replaces", "the", "placeholders", "with", "the", "values", "in", "oParameters" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/routing/Router.js#L513-L525
train
Navigates to a route
[ 30522, 3853, 1006, 1055, 18442, 1010, 6728, 5400, 22828, 2015, 1007, 1063, 2065, 1006, 6728, 5400, 22828, 2015, 1027, 1027, 1027, 6151, 28344, 1007, 1063, 1013, 1013, 2130, 30524, 1065, 1025, 1065, 13075, 20298, 10421, 1027, 2023, 1012, 213...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/util/XMLPreprocessor.js
insertFragment
function insertFragment(sFragmentName, oElement, oWithControl) { var oFragmentPromise, fnLoad = oViewInfo.sync ? XMLTemplateProcessor.loadTemplate : XMLTemplateProcessor.loadTemplatePromise, sPreviousName = sCurrentName; // Note: It is perfectly valid to include the very same fragment aga...
javascript
function insertFragment(sFragmentName, oElement, oWithControl) { var oFragmentPromise, fnLoad = oViewInfo.sync ? XMLTemplateProcessor.loadTemplate : XMLTemplateProcessor.loadTemplatePromise, sPreviousName = sCurrentName; // Note: It is perfectly valid to include the very same fragment aga...
[ "function", "insertFragment", "(", "sFragmentName", ",", "oElement", ",", "oWithControl", ")", "{", "var", "oFragmentPromise", ",", "fnLoad", "=", "oViewInfo", ".", "sync", "?", "XMLTemplateProcessor", ".", "loadTemplate", ":", "XMLTemplateProcessor", ".", "loadTemp...
Inserts the fragment with the given name in place of the given element. Loads the fragment, takes care of caching (for the current pre-processor run) and visits the fragment's content once it has been imported into the element's owner document and put into place. Loading of fragments is asynchronous if the template vie...
[ "Inserts", "the", "fragment", "with", "the", "given", "name", "in", "place", "of", "the", "given", "element", ".", "Loads", "the", "fragment", "takes", "care", "of", "caching", "(", "for", "the", "current", "pre", "-", "processor", "run", ")", "and", "vi...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L1148-L1194
train
Inserts a fragment into the DOM.
[ 30522, 3853, 19274, 27843, 21693, 4765, 1006, 16420, 29181, 3672, 18442, 1010, 1051, 12260, 3672, 1010, 27593, 8939, 8663, 13181, 2140, 1007, 1063, 13075, 1997, 29181, 3672, 21572, 28732, 1010, 1042, 20554, 10441, 2094, 1027, 1051, 8584, 2378...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/tooltip/TooltipView.js
function (dataByCoordSys) { var lastCoordSys = this._lastDataByCoordSys; var contentNotChanged = !!lastCoordSys && lastCoordSys.length === dataByCoordSys.length; contentNotChanged && each(lastCoordSys, function (lastItemCoordSys, indexCoordSys) { var lastDataByAxis = las...
javascript
function (dataByCoordSys) { var lastCoordSys = this._lastDataByCoordSys; var contentNotChanged = !!lastCoordSys && lastCoordSys.length === dataByCoordSys.length; contentNotChanged && each(lastCoordSys, function (lastItemCoordSys, indexCoordSys) { var lastDataByAxis = las...
[ "function", "(", "dataByCoordSys", ")", "{", "var", "lastCoordSys", "=", "this", ".", "_lastDataByCoordSys", ";", "var", "contentNotChanged", "=", "!", "!", "lastCoordSys", "&&", "lastCoordSys", ".", "length", "===", "dataByCoordSys", ".", "length", ";", "conten...
FIXME Should we remove this but leave this to user?
[ "FIXME", "Should", "we", "remove", "this", "but", "leave", "this", "to", "user?" ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/component/tooltip/TooltipView.js#L677-L711
train
returns true if the data is not changed
[ 30522, 3853, 1006, 2951, 3762, 3597, 8551, 6508, 2015, 1007, 1063, 13075, 2197, 3597, 8551, 6508, 2015, 1027, 2023, 1012, 1035, 2197, 2850, 2696, 3762, 3597, 8551, 6508, 2015, 1025, 13075, 4180, 17048, 22305, 2098, 1027, 999, 999, 2197, 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...
jantimon/html-webpack-plugin
lib/html-tags.js
htmlTagObjectToString
function htmlTagObjectToString (tagDefinition, xhtml) { const attributes = Object.keys(tagDefinition.attributes || {}) .filter(function (attributeName) { return tagDefinition.attributes[attributeName] !== false; }) .map(function (attributeName) { if (tagDefinition.attributes[attributeName] ===...
javascript
function htmlTagObjectToString (tagDefinition, xhtml) { const attributes = Object.keys(tagDefinition.attributes || {}) .filter(function (attributeName) { return tagDefinition.attributes[attributeName] !== false; }) .map(function (attributeName) { if (tagDefinition.attributes[attributeName] ===...
[ "function", "htmlTagObjectToString", "(", "tagDefinition", ",", "xhtml", ")", "{", "const", "attributes", "=", "Object", ".", "keys", "(", "tagDefinition", ".", "attributes", "||", "{", "}", ")", ".", "filter", "(", "function", "(", "attributeName", ")", "{"...
Turn a tag definition into a html string @param {HtmlTagObject} tagDefinition A tag element according to the htmlWebpackPlugin object notation @param xhtml {boolean} Wether the generated html should add closing slashes to be xhtml compliant
[ "Turn", "a", "tag", "definition", "into", "a", "html", "string", "@param", "{", "HtmlTagObject", "}", "tagDefinition", "A", "tag", "element", "according", "to", "the", "htmlWebpackPlugin", "object", "notation" ]
38db64ae8805de37d038e0ee0f6dfa2a26e2163a
https://github.com/jantimon/html-webpack-plugin/blob/38db64ae8805de37d038e0ee0f6dfa2a26e2163a/lib/html-tags.js#L30-L44
train
Converts an HTML tag object to a string
[ 30522, 3853, 16129, 15900, 16429, 20614, 13122, 18886, 3070, 1006, 6415, 3207, 16294, 22753, 1010, 1060, 11039, 19968, 1007, 1063, 9530, 3367, 12332, 1027, 4874, 1012, 6309, 30524, 1063, 2065, 1006, 6415, 3207, 16294, 22753, 1012, 12332, 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...
aws/aws-sdk-js
features/extra/helpers.js
unexpectedError
function unexpectedError(resp, next) { var svc = resp.request.service.api.serviceName; var op = resp.request.operation; var code = resp.error.code; var msg = resp.error.message; var err = 'Received unexpected error from ' + svc + '.' + op + ', ' + code + ': ' + msg; next.fail(new Error(err)); ...
javascript
function unexpectedError(resp, next) { var svc = resp.request.service.api.serviceName; var op = resp.request.operation; var code = resp.error.code; var msg = resp.error.message; var err = 'Received unexpected error from ' + svc + '.' + op + ', ' + code + ': ' + msg; next.fail(new Error(err)); ...
[ "function", "unexpectedError", "(", "resp", ",", "next", ")", "{", "var", "svc", "=", "resp", ".", "request", ".", "service", ".", "api", ".", "serviceName", ";", "var", "op", "=", "resp", ".", "request", ".", "operation", ";", "var", "code", "=", "r...
Given a response that contains an error, this fails the current step with a formatted error message that indicates which service and operation failed.
[ "Given", "a", "response", "that", "contains", "an", "error", "this", "fails", "the", "current", "step", "with", "a", "formatted", "error", "message", "that", "indicates", "which", "service", "and", "operation", "failed", "." ]
c23e5f0edd150f8885267e5f7c8a564f8e6e8562
https://github.com/aws/aws-sdk-js/blob/c23e5f0edd150f8885267e5f7c8a564f8e6e8562/features/extra/helpers.js#L105-L112
train
Unexpected error from the cluster
[ 30522, 3853, 9223, 2121, 29165, 1006, 24501, 2361, 1010, 2279, 1007, 1063, 13075, 17917, 2278, 1027, 24501, 2361, 1012, 5227, 1012, 2326, 1012, 17928, 1012, 2326, 18442, 1025, 13075, 6728, 1027, 24501, 2361, 1012, 5227, 1012, 3169, 1025, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function() { if (this._aQueryResultNames) { return this._aQueryResultNames; } this._aQueryResultNames = new Array(0); for ( var sName in this._oQueryResultSet) { this._aQueryResultNames.push(this._oQueryResultSet[sName].getName()); } return this._aQueryResultNames; }
javascript
function() { if (this._aQueryResultNames) { return this._aQueryResultNames; } this._aQueryResultNames = new Array(0); for ( var sName in this._oQueryResultSet) { this._aQueryResultNames.push(this._oQueryResultSet[sName].getName()); } return this._aQueryResultNames; }
[ "function", "(", ")", "{", "if", "(", "this", ".", "_aQueryResultNames", ")", "{", "return", "this", ".", "_aQueryResultNames", ";", "}", "this", ".", "_aQueryResultNames", "=", "new", "Array", "(", "0", ")", ";", "for", "(", "var", "sName", "in", "thi...
Get the names of all query results (entity sets) offered by the model @returns {string[]} List of all query result names @public @function @name sap.ui.model.analytics.odata4analytics.Model#getAllQueryResultNames
[ "Get", "the", "names", "of", "all", "query", "results", "(", "entity", "sets", ")", "offered", "by", "the", "model" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L765-L777
train
Returns an array of the names of the query results.
[ 30522, 3853, 1006, 1007, 1063, 2065, 1006, 2023, 1012, 1035, 1037, 4226, 2854, 6072, 11314, 18442, 2015, 1007, 1063, 2709, 2023, 1012, 1035, 1037, 4226, 2854, 6072, 11314, 18442, 2015, 1025, 1065, 2023, 1012, 1035, 1037, 4226, 2854, 6072, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Freeboard/freeboard
js/freeboard.thirdparty.js
Collision
function Collision(el, colliders, options) { this.options = $.extend(defaults, options); this.$element = el; this.last_colliders = []; this.last_colliders_coords = []; if(typeof colliders === 'string' || colliders instanceof jQuery) { this.$colliders = $(colliders, this.options.colliders_context).not(th...
javascript
function Collision(el, colliders, options) { this.options = $.extend(defaults, options); this.$element = el; this.last_colliders = []; this.last_colliders_coords = []; if(typeof colliders === 'string' || colliders instanceof jQuery) { this.$colliders = $(colliders, this.options.colliders_context).not(th...
[ "function", "Collision", "(", "el", ",", "colliders", ",", "options", ")", "{", "this", ".", "options", "=", "$", ".", "extend", "(", "defaults", ",", "options", ")", ";", "this", ".", "$element", "=", "el", ";", "this", ".", "last_colliders", "=", "...
Detects collisions between a DOM element against other DOM elements or Coords objects. @class Collision @uses Coords @param {HTMLElement} el The jQuery wrapped HTMLElement. @param {HTMLElement|Array} colliders Can be a jQuery collection of HTMLElements or an Array of Coords instances. @param {Object} [options] An Obje...
[ "Detects", "collisions", "between", "a", "DOM", "element", "against", "other", "DOM", "elements", "or", "Coords", "objects", "." ]
38789f6e8bd3d04f7d3b2c3427e509d00f2610fc
https://github.com/Freeboard/freeboard/blob/38789f6e8bd3d04f7d3b2c3427e509d00f2610fc/js/freeboard.thirdparty.js#L15273-L15289
train
collision constructor
[ 30522, 3853, 12365, 1006, 3449, 1010, 8902, 24198, 2869, 1010, 7047, 1007, 1063, 2023, 1012, 7047, 1027, 1002, 1012, 7949, 1006, 12398, 2015, 1010, 7047, 1007, 1025, 2023, 1012, 1002, 5783, 1027, 3449, 1025, 2023, 1012, 2197, 1035, 8902, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
grpc/grpc
examples/node/dynamic_codegen/route_guide/route_guide_server.js
getServer
function getServer() { var server = new grpc.Server(); server.addProtoService(routeguide.RouteGuide.service, { getFeature: getFeature, listFeatures: listFeatures, recordRoute: recordRoute, routeChat: routeChat }); return server; }
javascript
function getServer() { var server = new grpc.Server(); server.addProtoService(routeguide.RouteGuide.service, { getFeature: getFeature, listFeatures: listFeatures, recordRoute: recordRoute, routeChat: routeChat }); return server; }
[ "function", "getServer", "(", ")", "{", "var", "server", "=", "new", "grpc", ".", "Server", "(", ")", ";", "server", ".", "addProtoService", "(", "routeguide", ".", "RouteGuide", ".", "service", ",", "{", "getFeature", ":", "getFeature", ",", "listFeatures...
Get a new server with the handler functions in this file bound to the methods it serves. @return {Server} The new server object
[ "Get", "a", "new", "server", "with", "the", "handler", "functions", "in", "this", "file", "bound", "to", "the", "methods", "it", "serves", "." ]
cc75d93818410e2b0edd0fa3009a6def9ac403ca
https://github.com/grpc/grpc/blob/cc75d93818410e2b0edd0fa3009a6def9ac403ca/examples/node/dynamic_codegen/route_guide/route_guide_server.js#L219-L228
train
Returns a grpc server
[ 30522, 3853, 4152, 2121, 6299, 1006, 1007, 1063, 13075, 8241, 1027, 2047, 24665, 15042, 1012, 8241, 1006, 1007, 1025, 8241, 1012, 5587, 21572, 22282, 30524, 22494, 2618, 1010, 2799, 7507, 2102, 1024, 2799, 7507, 2102, 1065, 1007, 1025, 2709...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(aDimensionName) { if (!aDimensionName) { return; } this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties for (var i = -1, sDimName; (sDimName = aDimensionName[++i]) !== undefined;) { if (!this._oQueryResult.findDimensionByName(sDimName)) { thro...
javascript
function(aDimensionName) { if (!aDimensionName) { return; } this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties for (var i = -1, sDimName; (sDimName = aDimensionName[++i]) !== undefined;) { if (!this._oQueryResult.findDimensionByName(sDimName)) { thro...
[ "function", "(", "aDimensionName", ")", "{", "if", "(", "!", "aDimensionName", ")", "{", "return", ";", "}", "this", ".", "_oSelectedPropertyNames", "=", "null", ";", "// reset previously compiled list of selected properties", "for", "(", "var", "i", "=", "-", "...
Add one or more dimensions to the aggregation level @param aDimensionName Array of dimension names to be added to the already defined aggregation level. @public @function @name sap.ui.model.analytics.odata4analytics.QueryResultRequest#addToAggregationLevel
[ "Add", "one", "or", "more", "dimensions", "to", "the", "aggregation", "level" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L4200-L4217
train
Sets the aggregation level for the given dimension name.
[ 30522, 3853, 1006, 27133, 3549, 10992, 18442, 1007, 1063, 2065, 1006, 999, 27133, 3549, 10992, 18442, 1007, 1063, 2709, 1025, 1065, 2023, 1012, 1035, 9808, 12260, 10985, 21572, 4842, 25680, 14074, 2015, 1027, 19701, 1025, 1013, 1013, 25141, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
codemirror/CodeMirror
src/edit/key_events.js
handleCharBinding
function handleCharBinding(cm, e, ch) { return dispatchKey(cm, "'" + ch + "'", e, b => doHandleBinding(cm, b, true)) }
javascript
function handleCharBinding(cm, e, ch) { return dispatchKey(cm, "'" + ch + "'", e, b => doHandleBinding(cm, b, true)) }
[ "function", "handleCharBinding", "(", "cm", ",", "e", ",", "ch", ")", "{", "return", "dispatchKey", "(", "cm", ",", "\"'\"", "+", "ch", "+", "\"'\"", ",", "e", ",", "b", "=>", "doHandleBinding", "(", "cm", ",", "b", ",", "true", ")", ")", "}" ]
Handle a key from the keypress event
[ "Handle", "a", "key", "from", "the", "keypress", "event" ]
dab6f676107c10ba8d16c654a42f66cae3f27db1
https://github.com/codemirror/CodeMirror/blob/dab6f676107c10ba8d16c654a42f66cae3f27db1/src/edit/key_events.js#L102-L104
train
Handle a character binding.
[ 30522, 3853, 5047, 7507, 27366, 4667, 1006, 4642, 1010, 1041, 1010, 10381, 1007, 1063, 2709, 18365, 14839, 1006, 4642, 1010, 1000, 1005, 1000, 1009, 10381, 1009, 1000, 1005, 1000, 30524, 2995, 1007, 1007, 1065, 102, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
isDirectoryExcluded
function isDirectoryExcluded(path) { var excludes = preferences.getExcludedDirectories(); if (!excludes) { return false; } var testPath = ProjectManager.makeProjectRelativeIfPossible(path); testPath = FileUtils.stripTrailingSlash(testPath); return excludes....
javascript
function isDirectoryExcluded(path) { var excludes = preferences.getExcludedDirectories(); if (!excludes) { return false; } var testPath = ProjectManager.makeProjectRelativeIfPossible(path); testPath = FileUtils.stripTrailingSlash(testPath); return excludes....
[ "function", "isDirectoryExcluded", "(", "path", ")", "{", "var", "excludes", "=", "preferences", ".", "getExcludedDirectories", "(", ")", ";", "if", "(", "!", "excludes", ")", "{", "return", "false", ";", "}", "var", "testPath", "=", "ProjectManager", ".", ...
Test if the directory should be excluded from analysis. @param {!string} path - full directory path. @return {boolean} true if excluded, false otherwise.
[ "Test", "if", "the", "directory", "should", "be", "excluded", "from", "analysis", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/JSUtils/ScopeManager.js#L198-L209
train
Check if a directory is excluded
[ 30522, 3853, 2003, 4305, 2890, 16761, 6672, 2595, 20464, 13936, 1006, 4130, 1007, 1063, 13075, 23329, 2015, 1027, 18394, 1012, 2131, 10288, 20464, 13936, 4305, 2890, 16761, 3111, 1006, 1007, 1025, 2065, 1006, 999, 23329, 2015, 1007, 1063, 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...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_Requestor.js
function (oPayload) { var oResult = oPayload; if (oResult) { Object.keys(oResult).forEach(function (sKey) { if (sKey.indexOf("@$ui5.") === 0) { if (oResult === oPayload) { oResult = jQuery.extend({}, oPayload); } delete oResult[sKey]; } }); } return oResult; }
javascript
function (oPayload) { var oResult = oPayload; if (oResult) { Object.keys(oResult).forEach(function (sKey) { if (sKey.indexOf("@$ui5.") === 0) { if (oResult === oPayload) { oResult = jQuery.extend({}, oPayload); } delete oResult[sKey]; } }); } return oResult; }
[ "function", "(", "oPayload", ")", "{", "var", "oResult", "=", "oPayload", ";", "if", "(", "oResult", ")", "{", "Object", ".", "keys", "(", "oResult", ")", ".", "forEach", "(", "function", "(", "sKey", ")", "{", "if", "(", "sKey", ".", "indexOf", "(...
Creates a duplicate of the payload where all properties starting with "@$ui5." are removed. @param {object} [oPayload] The request payload @returns {object} The payload without the unwanted properties (only copied if necessary) @private
[ "Creates", "a", "duplicate", "of", "the", "payload", "where", "all", "properties", "starting", "with", "@$ui5", ".", "are", "removed", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_Requestor.js#L1470-L1483
train
returns the object that is a hash of the payload
[ 30522, 3853, 1006, 6728, 4710, 11066, 1007, 1063, 13075, 10848, 23722, 2102, 1027, 6728, 4710, 11066, 1025, 2065, 1006, 10848, 23722, 2102, 1007, 1063, 4874, 1012, 6309, 1006, 10848, 23722, 2102, 1007, 1012, 18921, 6776, 1006, 3853, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/project/ProjectManager.js
_setProjectRoot
function _setProjectRoot(rootEntry) { var d = new $.Deferred(); model.setProjectRoot(rootEntry).then(function () { d.resolve(); model.reopenNodes(PreferencesManager.getViewState("project.treeState", _getProjectViewStateContext())); }); return d.promise(); }
javascript
function _setProjectRoot(rootEntry) { var d = new $.Deferred(); model.setProjectRoot(rootEntry).then(function () { d.resolve(); model.reopenNodes(PreferencesManager.getViewState("project.treeState", _getProjectViewStateContext())); }); return d.promise(); }
[ "function", "_setProjectRoot", "(", "rootEntry", ")", "{", "var", "d", "=", "new", "$", ".", "Deferred", "(", ")", ";", "model", ".", "setProjectRoot", "(", "rootEntry", ")", ".", "then", "(", "function", "(", ")", "{", "d", ".", "resolve", "(", ")",...
@private Sets the project root to the given directory, resetting the ProjectModel and file tree in the process. @param {Directory} rootEntry directory object for the project root @return {$.Promise} resolved when the project is done setting up
[ "@private" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/project/ProjectManager.js#L560-L567
train
Set the project root
[ 30522, 3853, 1035, 2275, 21572, 20614, 3217, 4140, 1006, 7117, 4765, 2854, 1007, 1063, 13075, 1040, 1027, 2047, 1002, 1012, 13366, 28849, 2094, 1006, 1007, 1025, 2944, 1012, 2275, 21572, 20614, 3217, 4140, 1006, 7117, 4765, 2854, 1007, 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...
dcloudio/mui
js/sliders.js
function() { slider.style['-webkit-transition-duration'] = '0'; slider.style.webkitTransform = 'translate3d(' + (slideNumber * slider.offsetWidth) + 'px,0,0)'; slider.removeEventListener('webkitTransitionEnd', fixedLoop); }
javascript
function() { slider.style['-webkit-transition-duration'] = '0'; slider.style.webkitTransform = 'translate3d(' + (slideNumber * slider.offsetWidth) + 'px,0,0)'; slider.removeEventListener('webkitTransitionEnd', fixedLoop); }
[ "function", "(", ")", "{", "slider", ".", "style", "[", "'-webkit-transition-duration'", "]", "=", "'0'", ";", "slider", ".", "style", ".", "webkitTransform", "=", "'translate3d('", "+", "(", "slideNumber", "*", "slider", ".", "offsetWidth", ")", "+", "'px,0...
slider.style.webkitTransform = 'translate3d(' + offsetX + 'px,0,0)'; self.updateProcess(offsetX);
[ "slider", ".", "style", ".", "webkitTransform", "=", "translate3d", "(", "+", "offsetX", "+", "px", "0", "0", ")", ";", "self", ".", "updateProcess", "(", "offsetX", ")", ";" ]
ff74c90a1671a552f3604b1288bf38a4126312d0
https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/js/sliders.js#L264-L268
train
This function is called when the user clicks on the slider
[ 30522, 3853, 1006, 1007, 1063, 7358, 2099, 1012, 2806, 1031, 1005, 1011, 4773, 23615, 1011, 6653, 1011, 9367, 1005, 1033, 1027, 1005, 1014, 1005, 1025, 7358, 2099, 1012, 2806, 1012, 4773, 23615, 6494, 3619, 14192, 1027, 1005, 17637, 29097, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
wuchangming/spy-debugger
buildin_modules/weinre/web/client/UglifyJS/parse-js.js
curry
function curry(f) { var args = slice(arguments, 1); return function() { return f.apply(this, args.concat(slice(arguments))); }; }
javascript
function curry(f) { var args = slice(arguments, 1); return function() { return f.apply(this, args.concat(slice(arguments))); }; }
[ "function", "curry", "(", "f", ")", "{", "var", "args", "=", "slice", "(", "arguments", ",", "1", ")", ";", "return", "function", "(", ")", "{", "return", "f", ".", "apply", "(", "this", ",", "args", ".", "concat", "(", "slice", "(", "arguments", ...
/* -----[ Utilities ]-----
[ "/", "*", "-----", "[", "Utilities", "]", "-----" ]
55c1dda0dff0c44920673711656ddfd7ff03c307
https://github.com/wuchangming/spy-debugger/blob/55c1dda0dff0c44920673711656ddfd7ff03c307/buildin_modules/weinre/web/client/UglifyJS/parse-js.js#L1193-L1196
train
Curry function f.
[ 30522, 3853, 15478, 1006, 1042, 1007, 1063, 13075, 12098, 5620, 1027, 14704, 1006, 9918, 1010, 1015, 1007, 1025, 2709, 3853, 1006, 1007, 1063, 2709, 1042, 1012, 6611, 1006, 2023, 1010, 12098, 5620, 1012, 9530, 11266, 1006, 14704, 1006, 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...
adobe/brackets
src/utils/DeprecationWarning.js
deprecateEvent
function deprecateEvent(outbound, inbound, oldEventName, newEventName, canonicalOutboundName, canonicalInboundName) { // Mark deprecated so EventDispatcher.on() will emit warnings EventDispatcher.markDeprecated(outbound, oldEventName, canonicalInboundName); // create an event handler for the ne...
javascript
function deprecateEvent(outbound, inbound, oldEventName, newEventName, canonicalOutboundName, canonicalInboundName) { // Mark deprecated so EventDispatcher.on() will emit warnings EventDispatcher.markDeprecated(outbound, oldEventName, canonicalInboundName); // create an event handler for the ne...
[ "function", "deprecateEvent", "(", "outbound", ",", "inbound", ",", "oldEventName", ",", "newEventName", ",", "canonicalOutboundName", ",", "canonicalInboundName", ")", "{", "// Mark deprecated so EventDispatcher.on() will emit warnings", "EventDispatcher", ".", "markDeprecated...
Show a deprecation warning if there are listeners for the event ``` DeprecationWarning.deprecateEvent(exports, MainViewManager, "workingSetAdd", "workingSetAdd", "DocumentManager.workingSetAdd", "MainViewManager.workingSetAdd"); ``` @param {Object} outbound - the object with the old event to dispatch @param {Object} ...
[ "Show", "a", "deprecation", "warning", "if", "there", "are", "listeners", "for", "the", "event" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/utils/DeprecationWarning.js#L115-L124
train
Deprecate an event
[ 30522, 3853, 2139, 28139, 16280, 18697, 3372, 1006, 2041, 15494, 1010, 1999, 15494, 1010, 2214, 18697, 3372, 18442, 1010, 2047, 18697, 3372, 18442, 1010, 18562, 5833, 15494, 18442, 1010, 18562, 2378, 15494, 18442, 1007, 1063, 1013, 1013, 2928...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
chartjs/Chart.js
src/scales/scale.time.js
buildLookupTable
function buildLookupTable(timestamps, min, max, distribution) { if (distribution === 'linear' || !timestamps.length) { return [ {time: min, pos: 0}, {time: max, pos: 1} ]; } var table = []; var items = [min]; var i, ilen, prev, curr, next; for (i = 0, ilen = timestamps.length; i < ilen; ++i) { curr ...
javascript
function buildLookupTable(timestamps, min, max, distribution) { if (distribution === 'linear' || !timestamps.length) { return [ {time: min, pos: 0}, {time: max, pos: 1} ]; } var table = []; var items = [min]; var i, ilen, prev, curr, next; for (i = 0, ilen = timestamps.length; i < ilen; ++i) { curr ...
[ "function", "buildLookupTable", "(", "timestamps", ",", "min", ",", "max", ",", "distribution", ")", "{", "if", "(", "distribution", "===", "'linear'", "||", "!", "timestamps", ".", "length", ")", "{", "return", "[", "{", "time", ":", "min", ",", "pos", ...
Returns an array of {time, pos} objects used to interpolate a specific `time` or position (`pos`) on the scale, by searching entries before and after the requested value. `pos` is a decimal between 0 and 1: 0 being the start of the scale (left or top) and 1 the other extremity (left + width or top + height). Note that ...
[ "Returns", "an", "array", "of", "{", "time", "pos", "}", "objects", "used", "to", "interpolate", "a", "specific", "time", "or", "position", "(", "pos", ")", "on", "the", "scale", "by", "searching", "entries", "before", "and", "after", "the", "requested", ...
f093c36574d290330ed623e60fbd070421c730d5
https://github.com/chartjs/Chart.js/blob/f093c36574d290330ed623e60fbd070421c730d5/src/scales/scale.time.js#L114-L147
train
Build lookup table
[ 30522, 3853, 3857, 4135, 21940, 22799, 3468, 1006, 2335, 15464, 4523, 1010, 8117, 1010, 4098, 1010, 4353, 1007, 1063, 2065, 1006, 4353, 1027, 1027, 1027, 1005, 7399, 1005, 1064, 1064, 999, 2335, 15464, 4523, 1012, 3091, 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...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_Helper.js
function (mChangeListeners, sPath, oOldValue, oNewValue, aSelect) { var sPredicate; /* * Take over the property value from source to target and fires an event if the property * is changed * @param {string} sPath The path of oOldValue in mChangeListeners * @param {string} sProperty The property ...
javascript
function (mChangeListeners, sPath, oOldValue, oNewValue, aSelect) { var sPredicate; /* * Take over the property value from source to target and fires an event if the property * is changed * @param {string} sPath The path of oOldValue in mChangeListeners * @param {string} sProperty The property ...
[ "function", "(", "mChangeListeners", ",", "sPath", ",", "oOldValue", ",", "oNewValue", ",", "aSelect", ")", "{", "var", "sPredicate", ";", "/*\n\t\t\t * Take over the property value from source to target and fires an event if the property\n\t\t\t * is changed\n\t\t\t * @param {string...
Updates the old value with the given new value for the selected properties (see {@link #updateExisting}). If no selected properties are given or if "*" is contained in the selected properties, then all properties are selected. <code>@odata.etag</code> is always selected. Fires change events for all changed properties. ...
[ "Updates", "the", "old", "value", "with", "the", "given", "new", "value", "for", "the", "selected", "properties", "(", "see", "{", "@link", "#updateExisting", "}", ")", ".", "If", "no", "selected", "properties", "are", "given", "or", "if", "*", "is", "co...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_Helper.js#L1193-L1278
train
Creates a property path from source to target.
[ 30522, 3853, 1006, 11338, 18003, 29282, 6528, 2545, 1010, 14690, 2232, 1010, 1051, 11614, 10175, 5657, 1010, 2028, 2860, 10175, 5657, 1010, 2004, 12260, 6593, 1007, 1063, 13075, 11867, 5596, 24695, 1025, 1013, 1008, 1008, 2202, 2058, 1996, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.m/src/sap/m/ViewSettingsDialog.js
findViewSettingsItemByKey
function findViewSettingsItemByKey(vItemOrKey, aViewSettingsItems, sErrorMessage) { var oItem; // convenience, also allow strings if (typeof vItemOrKey === "string") { // find item with this key oItem = getViewSettingsItemByKey(aViewSettingsItems, vItemOrKey); if (!oItem) { Log.error(sErrorMessage)...
javascript
function findViewSettingsItemByKey(vItemOrKey, aViewSettingsItems, sErrorMessage) { var oItem; // convenience, also allow strings if (typeof vItemOrKey === "string") { // find item with this key oItem = getViewSettingsItemByKey(aViewSettingsItems, vItemOrKey); if (!oItem) { Log.error(sErrorMessage)...
[ "function", "findViewSettingsItemByKey", "(", "vItemOrKey", ",", "aViewSettingsItems", ",", "sErrorMessage", ")", "{", "var", "oItem", ";", "// convenience, also allow strings", "if", "(", "typeof", "vItemOrKey", "===", "\"string\"", ")", "{", "// find item with this key"...
Finds an sap.m.ViewSettingsItem from a list of items by a given key. If it does not succeed logs an error. @param {sap.m.ViewSettingsItem|string} vItemOrKey The searched item or its key @param {array} aViewSettingsItems The list of sap.m.ViewSettingsItem objects to be searched @param {string} sErrorMessage The error m...
[ "Finds", "an", "sap", ".", "m", ".", "ViewSettingsItem", "from", "a", "list", "of", "items", "by", "a", "given", "key", ".", "If", "it", "does", "not", "succeed", "logs", "an", "error", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/ViewSettingsDialog.js#L2967-L2983
train
Returns the view settings item by key
[ 30522, 3853, 2424, 8584, 21678, 8613, 4221, 14905, 15922, 3240, 1006, 6819, 18532, 2953, 14839, 1010, 20704, 2666, 9333, 18319, 3070, 28032, 6633, 2015, 1010, 14262, 29165, 7834, 3736, 3351, 1007, 1063, 13075, 1051, 4221, 2213, 1025, 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...
apache/incubator-echarts
src/data/helper/sourceHelper.js
doGuessOrdinal
function doGuessOrdinal( data, sourceFormat, seriesLayoutBy, dimensionsDefine, startIndex, dimIndex ) { var result; // Experience value. var maxLoop = 5; if (isTypedArray(data)) { return false; } // When sourceType is 'objectRows' or 'keyedColumns', dimensionsDefine // always e...
javascript
function doGuessOrdinal( data, sourceFormat, seriesLayoutBy, dimensionsDefine, startIndex, dimIndex ) { var result; // Experience value. var maxLoop = 5; if (isTypedArray(data)) { return false; } // When sourceType is 'objectRows' or 'keyedColumns', dimensionsDefine // always e...
[ "function", "doGuessOrdinal", "(", "data", ",", "sourceFormat", ",", "seriesLayoutBy", ",", "dimensionsDefine", ",", "startIndex", ",", "dimIndex", ")", "{", "var", "result", ";", "// Experience value.", "var", "maxLoop", "=", "5", ";", "if", "(", "isTypedArray"...
dimIndex may be overflow source data.
[ "dimIndex", "may", "be", "overflow", "source", "data", "." ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/data/helper/sourceHelper.js#L500-L587
train
Guess ordinal value from data
[ 30522, 3853, 3899, 15808, 21748, 18979, 2140, 1006, 2951, 1010, 3120, 14192, 4017, 1010, 2186, 8485, 5833, 3762, 1010, 9646, 3207, 23460, 1010, 2707, 22254, 10288, 1010, 11737, 22254, 10288, 1007, 1063, 13075, 2765, 1025, 1013, 1013, 3325, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/downloads.js
downloadManager_cancelActiveDownloads
function downloadManager_cancelActiveDownloads() { // Get a list of all active downloads (nsISimpleEnumerator) var downloads = this._dms.activeDownloads; // Iterate through each active download and cancel it while (downloads.hasMoreElements()) { var download = downloads.getNext().QueryInterfa...
javascript
function downloadManager_cancelActiveDownloads() { // Get a list of all active downloads (nsISimpleEnumerator) var downloads = this._dms.activeDownloads; // Iterate through each active download and cancel it while (downloads.hasMoreElements()) { var download = downloads.getNext().QueryInterfa...
[ "function", "downloadManager_cancelActiveDownloads", "(", ")", "{", "// Get a list of all active downloads (nsISimpleEnumerator)", "var", "downloads", "=", "this", ".", "_dms", ".", "activeDownloads", ";", "// Iterate through each active download and cancel it", "while", "(", "do...
Cancel all active downloads
[ "Cancel", "all", "active", "downloads" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/downloads.js#L106-L115
train
Cancel all active downloads
[ 30522, 3853, 8816, 24805, 4590, 1035, 17542, 19620, 7698, 11066, 2015, 1006, 1007, 1063, 1013, 1013, 2131, 1037, 2862, 1997, 2035, 3161, 22956, 1006, 24978, 17417, 23344, 2368, 17897, 16259, 1007, 13075, 22956, 1027, 2023, 1012, 1035, 1040, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
chartjs/Chart.js
src/helpers/helpers.core.js
function(fn, args, thisArg) { if (fn && typeof fn.call === 'function') { return fn.apply(thisArg, args); } }
javascript
function(fn, args, thisArg) { if (fn && typeof fn.call === 'function') { return fn.apply(thisArg, args); } }
[ "function", "(", "fn", ",", "args", ",", "thisArg", ")", "{", "if", "(", "fn", "&&", "typeof", "fn", ".", "call", "===", "'function'", ")", "{", "return", "fn", ".", "apply", "(", "thisArg", ",", "args", ")", ";", "}", "}" ]
Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the value returned by `fn`. If `fn` is not a function, this method returns undefined. @param {function} fn - The function to call. @param {Array|undefined|null} args - The arguments with which `fn` should be called. @param {object} [thisArg]...
[ "Calls", "fn", "with", "the", "given", "args", "in", "the", "scope", "defined", "by", "thisArg", "and", "returns", "the", "value", "returned", "by", "fn", ".", "If", "fn", "is", "not", "a", "function", "this", "method", "returns", "undefined", "." ]
f093c36574d290330ed623e60fbd070421c730d5
https://github.com/chartjs/Chart.js/blob/f093c36574d290330ed623e60fbd070421c730d5/src/helpers/helpers.core.js#L99-L103
train
This function is a bit of a hack to avoid the race condition of calling a function in the same way as the function.
[ 30522, 3853, 1006, 1042, 2078, 1010, 12098, 5620, 1010, 2023, 2906, 2290, 1007, 1063, 2065, 1006, 1042, 2078, 1004, 1004, 2828, 11253, 1042, 2078, 1012, 2655, 1027, 1027, 1027, 1005, 3853, 1005, 1007, 1063, 2709, 1042, 2078, 1012, 6611, 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...
ccxt/ccxt
build/transpile.js
createPHPClass
function createPHPClass (className, baseClass, body, methods) { const baseFolder = (baseClass == 'Exchange') ? 'base/' : '' const baseFile = baseFolder + baseClass + '.php' const header = [ "<?php\n", "namespace ccxt;\n", "// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL ...
javascript
function createPHPClass (className, baseClass, body, methods) { const baseFolder = (baseClass == 'Exchange') ? 'base/' : '' const baseFile = baseFolder + baseClass + '.php' const header = [ "<?php\n", "namespace ccxt;\n", "// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL ...
[ "function", "createPHPClass", "(", "className", ",", "baseClass", ",", "body", ",", "methods", ")", "{", "const", "baseFolder", "=", "(", "baseClass", "==", "'Exchange'", ")", "?", "'base/'", ":", "''", "const", "baseFile", "=", "baseFolder", "+", "baseClass...
----------------------------------------------------------------------------
[ "----------------------------------------------------------------------------" ]
8168069b9180a465532905e225586215e115a565
https://github.com/ccxt/ccxt/blob/8168069b9180a465532905e225586215e115a565/build/transpile.js#L449-L477
train
Creates a class with the given name baseClass and body.
[ 30522, 3853, 3443, 8458, 15042, 27102, 1006, 2465, 18442, 1010, 2918, 26266, 1010, 2303, 1010, 4725, 1007, 1063, 9530, 3367, 2918, 10371, 2121, 1027, 1006, 2918, 26266, 1027, 1027, 1005, 3863, 1005, 1007, 1029, 1005, 2918, 1013, 1005, 1024,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/rotation.js
function () { var data = this.data; var object3D = this.el.object3D; object3D.rotation.set(degToRad(data.x), degToRad(data.y), degToRad(data.z)); object3D.rotation.order = 'YXZ'; }
javascript
function () { var data = this.data; var object3D = this.el.object3D; object3D.rotation.set(degToRad(data.x), degToRad(data.y), degToRad(data.z)); object3D.rotation.order = 'YXZ'; }
[ "function", "(", ")", "{", "var", "data", "=", "this", ".", "data", ";", "var", "object3D", "=", "this", ".", "el", ".", "object3D", ";", "object3D", ".", "rotation", ".", "set", "(", "degToRad", "(", "data", ".", "x", ")", ",", "degToRad", "(", ...
Updates object3D rotation.
[ "Updates", "object3D", "rotation", "." ]
24acc78a7299a4cdfe3ef617f4d40ddf6275c992
https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/components/rotation.js#L10-L15
train
Update the rotation of the object3D
[ 30522, 3853, 1006, 1007, 1063, 13075, 2951, 1027, 2023, 1012, 2951, 1025, 13075, 4874, 29097, 1027, 2023, 1012, 3449, 1012, 4874, 29097, 1025, 4874, 29097, 1012, 9963, 1012, 2275, 1006, 2139, 13512, 6525, 2094, 1006, 2951, 1012, 1060, 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...
SeleniumHQ/selenium
javascript/selenium-core/xpath/xpath.js
xpathSortByKey
function xpathSortByKey(v1, v2) { // NOTE: Sort key vectors of different length never occur in // xsltSort. for (var i = 0; i < v1.key.length; ++i) { var o = v1.key[i].order == 'descending' ? -1 : 1; if (v1.key[i].value > v2.key[i].value) { return +1 * o; } else if (v1.key[i].value < v2.key[i]....
javascript
function xpathSortByKey(v1, v2) { // NOTE: Sort key vectors of different length never occur in // xsltSort. for (var i = 0; i < v1.key.length; ++i) { var o = v1.key[i].order == 'descending' ? -1 : 1; if (v1.key[i].value > v2.key[i].value) { return +1 * o; } else if (v1.key[i].value < v2.key[i]....
[ "function", "xpathSortByKey", "(", "v1", ",", "v2", ")", "{", "// NOTE: Sort key vectors of different length never occur in", "// xsltSort.", "for", "(", "var", "i", "=", "0", ";", "i", "<", "v1", ".", "key", ".", "length", ";", "++", "i", ")", "{", "var", ...
Sorts by all order criteria defined. According to the JavaScript spec ([ECMA] Section 11.8.5), the compare operators compare strings as strings and numbers as numbers. NOTE: In browsers which do not follow the spec, this breaks only in the case that numbers should be sorted as strings, which is very uncommon.
[ "Sorts", "by", "all", "order", "criteria", "defined", ".", "According", "to", "the", "JavaScript", "spec", "(", "[", "ECMA", "]", "Section", "11", ".", "8", ".", "5", ")", "the", "compare", "operators", "compare", "strings", "as", "strings", "and", "numb...
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/xpath/xpath.js#L2461-L2475
train
Sort by key vector
[ 30522, 3853, 26726, 8988, 21748, 2102, 3762, 14839, 1006, 1058, 2487, 1010, 1058, 2475, 1007, 1063, 1013, 1013, 3602, 1024, 4066, 3145, 19019, 1997, 2367, 3091, 2196, 5258, 1999, 1013, 1013, 1060, 14540, 3215, 11589, 1012, 2005, 1006, 13075...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/AnnotationParser.js
function(mTargetAnnotations, mSourceAnnotations) { // Merge must be done on Term level, this is why the original line does not suffice any more: // jQuery.extend(true, this.oAnnotations, mAnnotations); // Terms are defined on different levels, the main one is below the target level, which is directly // ad...
javascript
function(mTargetAnnotations, mSourceAnnotations) { // Merge must be done on Term level, this is why the original line does not suffice any more: // jQuery.extend(true, this.oAnnotations, mAnnotations); // Terms are defined on different levels, the main one is below the target level, which is directly // ad...
[ "function", "(", "mTargetAnnotations", ",", "mSourceAnnotations", ")", "{", "// Merge must be done on Term level, this is why the original line does not suffice any more:", "// jQuery.extend(true, this.oAnnotations, mAnnotations);", "// Terms are defined on different levels, the main one is be...
Merges the given parsed annotation map into the given target annotation map. @param {map} mTargetAnnotations The target annotation map into which the source annotations should be merged @param {map} mSourceAnnotations The source annotation map that should be merged into the target annotation map @static @protected
[ "Merges", "the", "given", "parsed", "annotation", "map", "into", "the", "given", "target", "annotation", "map", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/AnnotationParser.js#L92-L133
train
Merge the annotations from the source annotations to the target annotations
[ 30522, 3853, 1006, 11047, 2906, 18150, 11639, 17287, 9285, 1010, 5796, 8162, 21456, 10695, 17287, 9285, 1007, 1063, 1013, 1013, 13590, 2442, 2022, 2589, 2006, 2744, 2504, 1010, 2023, 2003, 2339, 1996, 2434, 2240, 2515, 2025, 10514, 26989, 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...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sPropertyName, sOperator, oValue, oValue2) { var oProperty = this._oEntityType.findPropertyByName(sPropertyName); if (oProperty == null) { throw "Cannot add filter condition for unknown property name " + sPropertyName; // TODO } var aFilterablePropertyNames = this._oEntityType.getFilterableProp...
javascript
function(sPropertyName, sOperator, oValue, oValue2) { var oProperty = this._oEntityType.findPropertyByName(sPropertyName); if (oProperty == null) { throw "Cannot add filter condition for unknown property name " + sPropertyName; // TODO } var aFilterablePropertyNames = this._oEntityType.getFilterableProp...
[ "function", "(", "sPropertyName", ",", "sOperator", ",", "oValue", ",", "oValue2", ")", "{", "var", "oProperty", "=", "this", ".", "_oEntityType", ".", "findPropertyByName", "(", "sPropertyName", ")", ";", "if", "(", "oProperty", "==", "null", ")", "{", "t...
Add a condition to the filter expression. Multiple conditions on the same property are combined with a logical OR first, and in a second step conditions for different properties are combined with a logical AND. @param {string} sPropertyName The name of the property bound in the condition @param {sap.ui.model.FilterOp...
[ "Add", "a", "condition", "to", "the", "filter", "expression", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L3153-L3164
train
Adds a filter condition to the filter expression.
[ 30522, 3853, 1006, 11867, 18981, 15010, 18442, 1010, 2061, 4842, 8844, 1010, 9242, 5657, 1010, 9242, 5657, 2475, 1007, 1063, 13075, 6728, 18981, 15010, 1027, 2023, 1012, 1035, 1051, 4765, 3012, 13874, 1012, 2424, 21572, 4842, 3723, 3762, 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...
adobe/brackets
src/preferences/PreferencesBase.js
function (id, addBefore) { var shadowScopeOrder = this._defaults._shadowScopeOrder, index = _.findIndex(shadowScopeOrder, function (entry) { return entry.id === id; }), entry; if (index > -1) { entry = shadowScop...
javascript
function (id, addBefore) { var shadowScopeOrder = this._defaults._shadowScopeOrder, index = _.findIndex(shadowScopeOrder, function (entry) { return entry.id === id; }), entry; if (index > -1) { entry = shadowScop...
[ "function", "(", "id", ",", "addBefore", ")", "{", "var", "shadowScopeOrder", "=", "this", ".", "_defaults", ".", "_shadowScopeOrder", ",", "index", "=", "_", ".", "findIndex", "(", "shadowScopeOrder", ",", "function", "(", "entry", ")", "{", "return", "en...
Adds scope to the scope order by its id. The scope should be previously added to the preference system. @param {string} id the scope id @param {string} before the id of the scope to add before
[ "Adds", "scope", "to", "the", "scope", "order", "by", "its", "id", ".", "The", "scope", "should", "be", "previously", "added", "to", "the", "preference", "system", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/preferences/PreferencesBase.js#L1516-L1526
train
Add a new record to the scope order
[ 30522, 3853, 30524, 2121, 1010, 3853, 1006, 4443, 1007, 1063, 2709, 4443, 1012, 8909, 1027, 1027, 1027, 8909, 1025, 1065, 1007, 1010, 4443, 1025, 2065, 1006, 5950, 1028, 1011, 1015, 1007, 1063, 4443, 1027, 6281, 16186, 8551, 2121, 1031, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 (sVersion) { // remove all whitespaces sVersion = sVersion.replace(/\s/g, ""); // get version without snapshot // we need to run the regex twice to avoid that version 1-2-3-SNAPSHOT will result in version 1. var oRegexp1 = /\b\d{1,5}(.\d{1,5}){0,2}/g; var oRegexp2 = /\b\d{1,5}(\.\d{1,5}){0,2...
javascript
function (sVersion) { // remove all whitespaces sVersion = sVersion.replace(/\s/g, ""); // get version without snapshot // we need to run the regex twice to avoid that version 1-2-3-SNAPSHOT will result in version 1. var oRegexp1 = /\b\d{1,5}(.\d{1,5}){0,2}/g; var oRegexp2 = /\b\d{1,5}(\.\d{1,5}){0,2...
[ "function", "(", "sVersion", ")", "{", "// remove all whitespaces", "sVersion", "=", "sVersion", ".", "replace", "(", "/", "\\s", "/", "g", ",", "\"\"", ")", ";", "// get version without snapshot", "// we need to run the regex twice to avoid that version 1-2-3-SNAPSHOT will...
Checks if the application version has the correct format: "major.minor.patch". @param {string} sVersion - Version of application @returns {boolean} true if the format is correct, otherwise false @public
[ "Checks", "if", "the", "application", "version", "has", "the", "correct", "format", ":", "major", ".", "minor", ".", "patch", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/Utils.js#L1192-L1227
train
returns true if the version is a valid version
[ 30522, 3853, 1006, 17917, 2545, 3258, 1007, 1063, 1013, 1013, 6366, 2035, 12461, 15327, 2015, 17917, 2545, 3258, 1027, 17917, 2545, 3258, 1012, 5672, 1006, 1013, 1032, 1055, 1013, 1043, 1010, 1000, 1000, 1007, 1025, 1013, 1013, 2131, 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.core/src/sap/ui/core/routing/TargetCache.js
function () { EventProvider.prototype.destroy.apply(this); if (this.bIsDestroyed) { return this; } function destroyObject(oObject) { if (oObject && oObject.destroy) { oObject.destroy(); } } Object.keys(this._oCache).forEach(function (sType) { var oTypeCache = this._o...
javascript
function () { EventProvider.prototype.destroy.apply(this); if (this.bIsDestroyed) { return this; } function destroyObject(oObject) { if (oObject && oObject.destroy) { oObject.destroy(); } } Object.keys(this._oCache).forEach(function (sType) { var oTypeCache = this._o...
[ "function", "(", ")", "{", "EventProvider", ".", "prototype", ".", "destroy", ".", "apply", "(", "this", ")", ";", "if", "(", "this", ".", "bIsDestroyed", ")", "{", "return", "this", ";", "}", "function", "destroyObject", "(", "oObject", ")", "{", "if"...
Destroys all the views and components created by this instance. @returns {sap.ui.core.routing.TargetCache} this for chaining.
[ "Destroys", "all", "the", "views", "and", "components", "created", "by", "this", "instance", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/routing/TargetCache.js#L155-L188
train
Destroys the object cache
[ 30522, 3853, 1006, 1007, 1063, 2724, 21572, 17258, 2121, 1012, 8773, 1012, 6033, 1012, 6611, 1006, 2023, 1007, 1025, 2065, 1006, 2023, 1012, 20377, 6155, 13181, 20821, 1007, 1063, 2709, 2023, 1025, 1065, 3853, 6033, 16429, 20614, 1006, 1051...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/scripts/htmlutils.js
function( elem, types, handler ) { // don't do events on text and comment nodes if ( elem.nodeType === 3 || elem.nodeType === 8 ) { return; } var events = jQuery.data( elem, "events" ), ret, type, fn; if ( events ) { // Unbind all events for the element if ( types === undefined || (typeof types ===...
javascript
function( elem, types, handler ) { // don't do events on text and comment nodes if ( elem.nodeType === 3 || elem.nodeType === 8 ) { return; } var events = jQuery.data( elem, "events" ), ret, type, fn; if ( events ) { // Unbind all events for the element if ( types === undefined || (typeof types ===...
[ "function", "(", "elem", ",", "types", ",", "handler", ")", "{", "// don't do events on text and comment nodes", "if", "(", "elem", ".", "nodeType", "===", "3", "||", "elem", ".", "nodeType", "===", "8", ")", "{", "return", ";", "}", "var", "events", "=", ...
Detach an event or set of events from an element
[ "Detach", "an", "event", "or", "set", "of", "events", "from", "an", "element" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L4266-L4352
train
Remove event handlers for an element
[ 30522, 3853, 1006, 3449, 6633, 1010, 4127, 1010, 28213, 1007, 1063, 1013, 1013, 2123, 1005, 1056, 2079, 2824, 2006, 3793, 1998, 7615, 14164, 2065, 1006, 3449, 6633, 1012, 13045, 13874, 1027, 1027, 1027, 1017, 1064, 1064, 3449, 6633, 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...
jgraph/mxgraph
javascript/mxClient.js
function(terminal, edge, source, defaultValue) { var value = mxUtils.getValue(terminal.style, mxConstants.STYLE_PORT_CONSTRAINT, mxUtils.getValue(edge.style, (source) ? mxConstants.STYLE_SOURCE_PORT_CONSTRAINT : mxConstants.STYLE_TARGET_PORT_CONSTRAINT, null)); if (value == null) { return defaultVal...
javascript
function(terminal, edge, source, defaultValue) { var value = mxUtils.getValue(terminal.style, mxConstants.STYLE_PORT_CONSTRAINT, mxUtils.getValue(edge.style, (source) ? mxConstants.STYLE_SOURCE_PORT_CONSTRAINT : mxConstants.STYLE_TARGET_PORT_CONSTRAINT, null)); if (value == null) { return defaultVal...
[ "function", "(", "terminal", ",", "edge", ",", "source", ",", "defaultValue", ")", "{", "var", "value", "=", "mxUtils", ".", "getValue", "(", "terminal", ".", "style", ",", "mxConstants", ".", "STYLE_PORT_CONSTRAINT", ",", "mxUtils", ".", "getValue", "(", ...
Returns an integer mask of the port constraints of the given map @param dict the style map to determine the port constraints for @param defaultValue Default value to return if the key is undefined. @return the mask of port constraint directions Parameters: terminal - <mxCelState> that represents the terminal. edge - ...
[ "Returns", "an", "integer", "mask", "of", "the", "port", "constraints", "of", "the", "given", "map", "@param", "dict", "the", "style", "map", "to", "determine", "the", "port", "constraints", "for", "@param", "defaultValue", "Default", "value", "to", "return", ...
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L4273-L4391
train
Returns the direction mask of the given edge
[ 30522, 3853, 1006, 5536, 1010, 3341, 1010, 3120, 1010, 12398, 10175, 5657, 1007, 1063, 13075, 3643, 1027, 25630, 21823, 4877, 1012, 2131, 10175, 5657, 1006, 5536, 1012, 2806, 1010, 25630, 8663, 12693, 3215, 1012, 2806, 1035, 3417, 1035, 271...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ecomfe/zrender
build/babel-plugin-transform-modules-commonjs-ec.js
getLocalExportMetadata
function getLocalExportMetadata(programPath){ const bindingKindLookup = new Map(); programPath.get('body').forEach(child => { let kind; if (child.isImportDeclaration()) { kind = 'import'; } else { if (child.isExportDefaultDeclaration()) { ...
javascript
function getLocalExportMetadata(programPath){ const bindingKindLookup = new Map(); programPath.get('body').forEach(child => { let kind; if (child.isImportDeclaration()) { kind = 'import'; } else { if (child.isExportDefaultDeclaration()) { ...
[ "function", "getLocalExportMetadata", "(", "programPath", ")", "{", "const", "bindingKindLookup", "=", "new", "Map", "(", ")", ";", "programPath", ".", "get", "(", "'body'", ")", ".", "forEach", "(", "child", "=>", "{", "let", "kind", ";", "if", "(", "ch...
Get metadata about local variables that are exported. @return {Map<string, LocalExportMetadata>}
[ "Get", "metadata", "about", "local", "variables", "that", "are", "exported", "." ]
30321b57cba3149c30eacb0c1e18276f0f001b9f
https://github.com/ecomfe/zrender/blob/30321b57cba3149c30eacb0c1e18276f0f001b9f/build/babel-plugin-transform-modules-commonjs-ec.js#L263-L363
train
Get local export metadata
[ 30522, 3853, 2131, 4135, 9289, 10288, 6442, 11368, 8447, 2696, 1006, 2565, 15069, 1007, 1063, 9530, 3367, 8031, 18824, 4135, 21940, 2361, 1027, 2047, 4949, 1006, 1007, 1025, 2565, 15069, 1012, 2131, 1006, 1005, 2303, 1005, 1007, 1012, 18921...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
knn-classifier/demo/camera.js
animate
async function animate() { stats.begin(); // Get image data from video element const image = tf.browser.fromPixels(video); let logits; // 'conv_preds' is the logits activation of MobileNet. const infer = () => mobilenet.infer(image, 'conv_preds'); // Train class if one of the buttons is held down if (...
javascript
async function animate() { stats.begin(); // Get image data from video element const image = tf.browser.fromPixels(video); let logits; // 'conv_preds' is the logits activation of MobileNet. const infer = () => mobilenet.infer(image, 'conv_preds'); // Train class if one of the buttons is held down if (...
[ "async", "function", "animate", "(", ")", "{", "stats", ".", "begin", "(", ")", ";", "// Get image data from video element", "const", "image", "=", "tf", ".", "browser", ".", "fromPixels", "(", "video", ")", ";", "let", "logits", ";", "// 'conv_preds' is the l...
Animation function called on each frame, running prediction
[ "Animation", "function", "called", "on", "each", "frame", "running", "prediction" ]
af194797c90cc5bcac1060d3cd41b0258a34c7dc
https://github.com/tensorflow/tfjs-models/blob/af194797c90cc5bcac1060d3cd41b0258a34c7dc/knn-classifier/demo/camera.js#L124-L171
train
Animate the image
[ 30522, 2004, 6038, 2278, 3853, 2019, 21499, 1006, 1007, 1063, 26319, 1012, 4088, 1006, 1007, 1025, 1013, 1013, 2131, 3746, 2951, 2013, 2678, 5783, 9530, 3367, 3746, 1027, 1056, 2546, 1012, 16602, 1012, 2013, 8197, 2595, 9050, 1006, 2678, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
bower_components/chart.js/Chart.js
function(){ // First we need the width of the yLabels, assuming the xLabels aren't rotated // To do that we need the base line at the top and base of the chart, assuming there is no x label rotation this.startPoint = (this.display) ? this.fontSize : 0; this.endPoint = (this.display) ? this.height - (this.f...
javascript
function(){ // First we need the width of the yLabels, assuming the xLabels aren't rotated // To do that we need the base line at the top and base of the chart, assuming there is no x label rotation this.startPoint = (this.display) ? this.fontSize : 0; this.endPoint = (this.display) ? this.height - (this.f...
[ "function", "(", ")", "{", "// First we need the width of the yLabels, assuming the xLabels aren't rotated", "// To do that we need the base line at the top and base of the chart, assuming there is no x label rotation", "this", ".", "startPoint", "=", "(", "this", ".", "display", ")", ...
Fitting loop to rotate x Labels and figure out what fits there, and also calculate how many Y steps to use
[ "Fitting", "loop", "to", "rotate", "x", "Labels", "and", "figure", "out", "what", "fits", "there", "and", "also", "calculate", "how", "many", "Y", "steps", "to", "use" ]
19113c3cbc19a7afe0cfd3158d647064d2d30661
https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/bower_components/chart.js/Chart.js#L1482-L1528
train
Calculate the y range of the y labels
[ 30522, 3853, 1006, 1007, 1063, 1013, 1013, 2034, 2057, 2342, 1996, 9381, 1997, 1996, 1061, 20470, 9050, 1010, 10262, 1996, 28712, 16336, 4877, 4995, 1005, 1056, 20931, 1013, 1013, 2000, 2079, 2008, 2057, 2342, 1996, 2918, 2240, 2012, 1996, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SheetJS/js-xlsx
bits/44_offcrypto.js
parse_RC4CryptoHeader
function parse_RC4CryptoHeader(blob, length/*:number*/) { var o = {}; var vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); length -= 4; if(vers.Minor != 2) throw new Error('unrecognized minor version code: ' + vers.Minor); if(vers.Major > 4 || vers.Major < 2) throw new Error('unrecognized major versio...
javascript
function parse_RC4CryptoHeader(blob, length/*:number*/) { var o = {}; var vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); length -= 4; if(vers.Minor != 2) throw new Error('unrecognized minor version code: ' + vers.Minor); if(vers.Major > 4 || vers.Major < 2) throw new Error('unrecognized major versio...
[ "function", "parse_RC4CryptoHeader", "(", "blob", ",", "length", "/*:number*/", ")", "{", "var", "o", "=", "{", "}", ";", "var", "vers", "=", "o", ".", "EncryptionVersionInfo", "=", "parse_CRYPTOVersion", "(", "blob", ",", "4", ")", ";", "length", "-=", ...
/* [MS-OFFCRYPTO] 2.3.5.1 RC4 CryptoAPI Encryption Header
[ "/", "*", "[", "MS", "-", "OFFCRYPTO", "]", "2", ".", "3", ".", "5", ".", "1", "RC4", "CryptoAPI", "Encryption", "Header" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/bits/44_offcrypto.js#L169-L179
train
Parse the RC4 Crypto Header
[ 30522, 3853, 11968, 3366, 1035, 22110, 2549, 26775, 22571, 3406, 4974, 2121, 1006, 1038, 4135, 2497, 1010, 3091, 1013, 1008, 1024, 2193, 1008, 1013, 1007, 1063, 13075, 1051, 1027, 1063, 1065, 1025, 13075, 2310, 2869, 1027, 1051, 1012, 21999...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jgraph/mxgraph
javascript/mxClient.js
mxText
function mxText(value, bounds, align, valign, color, family, size, fontStyle, spacing, spacingTop, spacingRight, spacingBottom, spacingLeft, horizontal, background, border, wrap, clipped, overflow, labelPadding, textDirection) { mxShape.call(this); this.value = value; this.bounds = bounds; this.color = (color !=...
javascript
function mxText(value, bounds, align, valign, color, family, size, fontStyle, spacing, spacingTop, spacingRight, spacingBottom, spacingLeft, horizontal, background, border, wrap, clipped, overflow, labelPadding, textDirection) { mxShape.call(this); this.value = value; this.bounds = bounds; this.color = (color !=...
[ "function", "mxText", "(", "value", ",", "bounds", ",", "align", ",", "valign", ",", "color", ",", "family", ",", "size", ",", "fontStyle", ",", "spacing", ",", "spacingTop", ",", "spacingRight", ",", "spacingBottom", ",", "spacingLeft", ",", "horizontal", ...
Copyright (c) 2006-2015, JGraph Ltd Copyright (c) 2006-2015, Gaudenz Alder Class: mxText Extends <mxShape> to implement a text shape. To change vertical text from bottom to top to top to bottom, the following code can be used: (code) mxText.prototype.verticalTextRotation = 90; (end) Constructor: mxText Constructs...
[ "Copyright", "(", "c", ")", "2006", "-", "2015", "JGraph", "Ltd", "Copyright", "(", "c", ")", "2006", "-", "2015", "Gaudenz", "Alder", "Class", ":", "mxText" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L26096-L26125
train
A text shape
[ 30522, 3853, 25630, 18209, 1006, 3643, 1010, 19202, 1010, 25705, 1010, 11748, 23773, 1010, 3609, 1010, 2155, 1010, 2946, 1010, 15489, 21756, 2571, 1010, 12403, 6129, 1010, 12403, 6129, 14399, 1010, 12403, 6129, 15950, 1010, 12403, 6129, 18384...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
gatsby-browser.js
scrollToElementId
function scrollToElementId(id) { const el = document.querySelector(id) if (el) { return window.scrollTo(0, el.offsetTop - 20) } else { return false } }
javascript
function scrollToElementId(id) { const el = document.querySelector(id) if (el) { return window.scrollTo(0, el.offsetTop - 20) } else { return false } }
[ "function", "scrollToElementId", "(", "id", ")", "{", "const", "el", "=", "document", ".", "querySelector", "(", "id", ")", "if", "(", "el", ")", "{", "return", "window", ".", "scrollTo", "(", "0", ",", "el", ".", "offsetTop", "-", "20", ")", "}", ...
Adapted from https://github.com/gatsbyjs/gatsby/issues/8413
[ "Adapted", "from", "https", ":", "//", "github", ".", "com", "/", "gatsbyjs", "/", "gatsby", "/", "issues", "/", "8413" ]
283601423f3d1a19aae83bf62032d40683948636
https://github.com/badges/shields/blob/283601423f3d1a19aae83bf62032d40683948636/gatsby-browser.js#L4-L11
train
scrollToElementId - scroll to element id
[ 30522, 3853, 17186, 3406, 12260, 3672, 3593, 1006, 8909, 1007, 1063, 9530, 3367, 3449, 1027, 6254, 1012, 23032, 11246, 22471, 2953, 1006, 8909, 1007, 2065, 1006, 3449, 1007, 1063, 2709, 3332, 1012, 17186, 3406, 1006, 1014, 1010, 3449, 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...
babel/babel
packages/babel-standalone/src/index.js
processOptions
function processOptions(options) { // Parse preset names const presets = (options.presets || []).map(presetName => { const preset = loadBuiltin(availablePresets, presetName); if (preset) { // workaround for babel issue // at some point, babel copies the preset, losing the non-enumerable /...
javascript
function processOptions(options) { // Parse preset names const presets = (options.presets || []).map(presetName => { const preset = loadBuiltin(availablePresets, presetName); if (preset) { // workaround for babel issue // at some point, babel copies the preset, losing the non-enumerable /...
[ "function", "processOptions", "(", "options", ")", "{", "// Parse preset names", "const", "presets", "=", "(", "options", ".", "presets", "||", "[", "]", ")", ".", "map", "(", "presetName", "=>", "{", "const", "preset", "=", "loadBuiltin", "(", "availablePre...
Parses plugin names and presets from the specified options.
[ "Parses", "plugin", "names", "and", "presets", "from", "the", "specified", "options", "." ]
1969e6b6aa7d90be3fbb3aca98ea96849656a55a
https://github.com/babel/babel/blob/1969e6b6aa7d90be3fbb3aca98ea96849656a55a/packages/babel-standalone/src/index.js#L57-L99
train
Process Babel options
[ 30522, 3853, 2832, 7361, 9285, 1006, 7047, 1007, 1063, 1013, 1013, 11968, 3366, 3653, 13462, 3415, 9530, 3367, 3653, 13462, 2015, 1027, 1006, 7047, 1012, 3653, 13462, 2015, 1064, 1064, 1031, 1033, 1007, 1012, 4949, 1006, 3653, 13462, 18442,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
catapult-project/catapult
third_party/polymer3/bower_components/polymer/lib/utils/gestures.js
function(mouseEvent) { // Check for sourceCapabilities, used to distinguish synthetic events // if mouseEvent did not come from a device that fires touch events, // it was made by a real mouse and should be counted // http://wicg.github.io/InputDeviceCapabilities/#dom-inputdevicecapabilities-firestouchevents ...
javascript
function(mouseEvent) { // Check for sourceCapabilities, used to distinguish synthetic events // if mouseEvent did not come from a device that fires touch events, // it was made by a real mouse and should be counted // http://wicg.github.io/InputDeviceCapabilities/#dom-inputdevicecapabilities-firestouchevents ...
[ "function", "(", "mouseEvent", ")", "{", "// Check for sourceCapabilities, used to distinguish synthetic events", "// if mouseEvent did not come from a device that fires touch events,", "// it was made by a real mouse and should be counted", "// http://wicg.github.io/InputDeviceCapabilities/#dom-inp...
touch will make synthetic mouse events `preventDefault` on touchend will cancel them, but this breaks `<input>` focus and link clicks disable mouse handlers for MOUSE_TIMEOUT ms after a touchend to ignore synthetic mouse events
[ "touch", "will", "make", "synthetic", "mouse", "events", "preventDefault", "on", "touchend", "will", "cancel", "them", "but", "this", "breaks", "<input", ">", "focus", "and", "link", "clicks", "disable", "mouse", "handlers", "for", "MOUSE_TIMEOUT", "ms", "after"...
992929ffccac68827869a497f01ee4d653ed4f25
https://github.com/catapult-project/catapult/blob/992929ffccac68827869a497f01ee4d653ed4f25/third_party/polymer3/bower_components/polymer/lib/utils/gestures.js#L152-L193
train
Check for synthetic mouse events
[ 30522, 3853, 1006, 8000, 18697, 3372, 1007, 1063, 1013, 1013, 4638, 2005, 3120, 17695, 28518, 15909, 3111, 1010, 2109, 2000, 10782, 12553, 2824, 1013, 1013, 2065, 8000, 18697, 3372, 2106, 2025, 2272, 2013, 1037, 5080, 2008, 8769, 3543, 2824...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/language/HTMLDOMDiff.js
domdiff
function domdiff(oldNode, newNode) { var queue = [], edits = [], moves = [], newElement, oldElement, oldNodeMap = oldNode ? oldNode.nodeMap : {}, newNodeMap = newNode.nodeMap; /** * Adds elements to the queue for generateC...
javascript
function domdiff(oldNode, newNode) { var queue = [], edits = [], moves = [], newElement, oldElement, oldNodeMap = oldNode ? oldNode.nodeMap : {}, newNodeMap = newNode.nodeMap; /** * Adds elements to the queue for generateC...
[ "function", "domdiff", "(", "oldNode", ",", "newNode", ")", "{", "var", "queue", "=", "[", "]", ",", "edits", "=", "[", "]", ",", "moves", "=", "[", "]", ",", "newElement", ",", "oldElement", ",", "oldNodeMap", "=", "oldNode", "?", "oldNode", ".", ...
Generate a list of edits that will mutate oldNode to look like newNode. Currently, there are the following possible edit operations: * elementInsert * elementDelete * elementMove * textInsert * textDelete * textReplace * attrDelete * attrChange * attrAdd * rememberNodes (a special instruction that reflects the need to...
[ "Generate", "a", "list", "of", "edits", "that", "will", "mutate", "oldNode", "to", "look", "like", "newNode", ".", "Currently", "there", "are", "the", "following", "possible", "edit", "operations", ":" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/language/HTMLDOMDiff.js#L535-L626
train
diff function for domdiff
[ 30522, 3853, 14383, 4305, 4246, 1006, 2214, 3630, 3207, 1010, 2047, 3630, 3207, 1007, 1063, 13075, 24240, 1027, 1031, 1033, 1010, 10086, 2015, 1027, 1031, 1033, 1010, 5829, 1027, 1031, 1033, 1010, 2047, 12260, 3672, 1010, 2214, 12260, 3672,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/qunit/utils/ControlIterator.js
_run
function _run(fnCallback, mOptions) { if (!mOptions) { mOptions = {}; } var fnDone = mOptions.done || function(){}; var aLibrariesToTest = mOptions.librariesToTest || undefined; var aExcludedLibraries = mOptions.excludedLibraries || []; var aControlsToTest = mOptions.controlsToTest || []; var aExclude...
javascript
function _run(fnCallback, mOptions) { if (!mOptions) { mOptions = {}; } var fnDone = mOptions.done || function(){}; var aLibrariesToTest = mOptions.librariesToTest || undefined; var aExcludedLibraries = mOptions.excludedLibraries || []; var aControlsToTest = mOptions.controlsToTest || []; var aExclude...
[ "function", "_run", "(", "fnCallback", ",", "mOptions", ")", "{", "if", "(", "!", "mOptions", ")", "{", "mOptions", "=", "{", "}", ";", "}", "var", "fnDone", "=", "mOptions", ".", "done", "||", "function", "(", ")", "{", "}", ";", "var", "aLibrarie...
Called by run() with a 1:1 parameter forwarding
[ "Called", "by", "run", "()", "with", "a", "1", ":", "1", "parameter", "forwarding" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/qunit/utils/ControlIterator.js#L479-L539
train
Run the test
[ 30522, 3853, 1035, 2448, 1006, 1042, 20909, 3363, 5963, 1010, 9587, 16790, 2015, 1007, 1063, 2065, 1006, 999, 9587, 16790, 2015, 1007, 1063, 9587, 16790, 2015, 1027, 1063, 1065, 1025, 1065, 13075, 1042, 19333, 2063, 1027, 9587, 16790, 2015,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/search/FindReplace.js
doSearch
function doSearch(editor, searchBackwards) { var state = getSearchState(editor._codeMirror); if (state.parsedQuery) { findNext(editor, searchBackwards); } else { openSearchBar(editor, false); } }
javascript
function doSearch(editor, searchBackwards) { var state = getSearchState(editor._codeMirror); if (state.parsedQuery) { findNext(editor, searchBackwards); } else { openSearchBar(editor, false); } }
[ "function", "doSearch", "(", "editor", ",", "searchBackwards", ")", "{", "var", "state", "=", "getSearchState", "(", "editor", ".", "_codeMirror", ")", ";", "if", "(", "state", ".", "parsedQuery", ")", "{", "findNext", "(", "editor", ",", "searchBackwards", ...
If no search pending, opens the Find dialog. If search bar already open, moves to next/prev result (depending on 'searchBackwards')
[ "If", "no", "search", "pending", "opens", "the", "Find", "dialog", ".", "If", "search", "bar", "already", "open", "moves", "to", "next", "/", "prev", "result", "(", "depending", "on", "searchBackwards", ")" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/search/FindReplace.js#L655-L663
train
doSearch - Search for a search term
[ 30522, 3853, 13004, 2906, 2818, 1006, 3559, 1010, 3945, 5963, 7652, 2015, 1007, 1063, 13075, 2110, 1027, 4152, 14644, 18069, 12259, 1006, 3559, 1012, 1035, 3642, 14503, 29165, 1007, 1025, 2065, 1006, 2110, 1012, 11968, 6924, 4226, 2854, 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...
openlayers/openlayers
src/ol/pointer/MouseSource.js
mousedown
function mousedown(inEvent) { if (!this.isEventSimulatedFromTouch_(inEvent)) { // TODO(dfreedman) workaround for some elements not sending mouseup // http://crbug/149091 if (POINTER_ID.toString() in this.pointerMap) { this.cancel(inEvent); } const e = prepareEvent(inEvent, this.dispatcher); ...
javascript
function mousedown(inEvent) { if (!this.isEventSimulatedFromTouch_(inEvent)) { // TODO(dfreedman) workaround for some elements not sending mouseup // http://crbug/149091 if (POINTER_ID.toString() in this.pointerMap) { this.cancel(inEvent); } const e = prepareEvent(inEvent, this.dispatcher); ...
[ "function", "mousedown", "(", "inEvent", ")", "{", "if", "(", "!", "this", ".", "isEventSimulatedFromTouch_", "(", "inEvent", ")", ")", "{", "// TODO(dfreedman) workaround for some elements not sending mouseup", "// http://crbug/149091", "if", "(", "POINTER_ID", ".", "t...
Handler for `mousedown`. @this {MouseSource} @param {MouseEvent} inEvent The in event.
[ "Handler", "for", "mousedown", "." ]
f366eaea522388fb575b11010e69d309164baca7
https://github.com/openlayers/openlayers/blob/f366eaea522388fb575b11010e69d309164baca7/src/ol/pointer/MouseSource.js#L63-L74
train
mouse down event handler
[ 30522, 3853, 8000, 7698, 1006, 1999, 18697, 3372, 1007, 1063, 2065, 1006, 999, 2023, 1012, 2003, 18697, 7666, 5714, 8898, 19699, 5358, 24826, 2818, 1035, 1006, 1999, 18697, 3372, 1007, 1007, 1063, 1013, 1013, 28681, 2080, 1006, 1040, 23301,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jgraph/mxgraph
javascript/mxClient.js
function(obj, array) { var result = null; if (typeof(array) == 'object') { var index = mxUtils.indexOf(array, obj); while (index >= 0) { array.splice(index, 1); result = obj; index = mxUtils.indexOf(array, obj); } } for (var key in array) { if (array[key] == obj) { ...
javascript
function(obj, array) { var result = null; if (typeof(array) == 'object') { var index = mxUtils.indexOf(array, obj); while (index >= 0) { array.splice(index, 1); result = obj; index = mxUtils.indexOf(array, obj); } } for (var key in array) { if (array[key] == obj) { ...
[ "function", "(", "obj", ",", "array", ")", "{", "var", "result", "=", "null", ";", "if", "(", "typeof", "(", "array", ")", "==", "'object'", ")", "{", "var", "index", "=", "mxUtils", ".", "indexOf", "(", "array", ",", "obj", ")", ";", "while", "(...
Function: remove Removes all occurrences of the given object in the given array or object. If there are multiple occurrences of the object, be they associative or as an array entry, all occurrences are removed from the array or deleted from the object. By removing the object from the array, all elements following the ...
[ "Function", ":", "remove" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L2533-L2559
train
Removes an object from an array
[ 30522, 3853, 1006, 27885, 3501, 1010, 9140, 1007, 1063, 13075, 2765, 1027, 19701, 1025, 2065, 1006, 2828, 11253, 1006, 9140, 1007, 1027, 1027, 1005, 4874, 1005, 1007, 1063, 13075, 5950, 1027, 25630, 21823, 4877, 1012, 5950, 11253, 1006, 914...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/core/services/ripple/ripple.js
getElementColor
function getElementColor () { var items = self.options && self.options.colorElement ? self.options.colorElement : []; var elem = items.length ? items[ 0 ] : self.$element[ 0 ]; return elem ? self.$window.getComputedStyle(elem).color : 'rgb(0,0,0)'; }
javascript
function getElementColor () { var items = self.options && self.options.colorElement ? self.options.colorElement : []; var elem = items.length ? items[ 0 ] : self.$element[ 0 ]; return elem ? self.$window.getComputedStyle(elem).color : 'rgb(0,0,0)'; }
[ "function", "getElementColor", "(", ")", "{", "var", "items", "=", "self", ".", "options", "&&", "self", ".", "options", ".", "colorElement", "?", "self", ".", "options", ".", "colorElement", ":", "[", "]", ";", "var", "elem", "=", "items", ".", "lengt...
Finds the color element and returns its text color for use as default ripple color @returns {string}
[ "Finds", "the", "color", "element", "and", "returns", "its", "text", "color", "for", "use", "as", "default", "ripple", "color" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/services/ripple/ripple.js#L214-L219
train
Get the color of the element
[ 30522, 3853, 2131, 12260, 3672, 18717, 1006, 1007, 1063, 13075, 5167, 1027, 2969, 1012, 7047, 1004, 1004, 2969, 1012, 7047, 1012, 3609, 12260, 3672, 1029, 2969, 1012, 7047, 1012, 3609, 12260, 3672, 1024, 1031, 1033, 1025, 13075, 3449, 6633,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/crossroads.js
Route
function Route(pattern, callback, priority, router) { var isRegexPattern = isRegExp(pattern), patternLexer = router.patternLexer; this._router = router; this._pattern = pattern; this._paramsIds = isRegexPattern? null : patternLexer.getParamIds(pattern); this._optional...
javascript
function Route(pattern, callback, priority, router) { var isRegexPattern = isRegExp(pattern), patternLexer = router.patternLexer; this._router = router; this._pattern = pattern; this._paramsIds = isRegexPattern? null : patternLexer.getParamIds(pattern); this._optional...
[ "function", "Route", "(", "pattern", ",", "callback", ",", "priority", ",", "router", ")", "{", "var", "isRegexPattern", "=", "isRegExp", "(", "pattern", ")", ",", "patternLexer", "=", "router", ".", "patternLexer", ";", "this", ".", "_router", "=", "route...
Route -------------- ===================== @constructor
[ "Route", "--------------", "=====================" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/crossroads.js#L292-L306
train
Constructor for Route
[ 30522, 3853, 2799, 1006, 5418, 1010, 2655, 5963, 1010, 9470, 1010, 2799, 2099, 1007, 1063, 13075, 2003, 2890, 3351, 2595, 4502, 12079, 2078, 1027, 2003, 2890, 3351, 2595, 2361, 1006, 5418, 1007, 1010, 5418, 2571, 2595, 2121, 1027, 2799, 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...
keplergl/kepler.gl
examples/demo-app/src/utils/cloud-providers/dropbox.js
getAccessToken
function getAccessToken() { let token = dropbox.getAccessToken(); if (!token && window.localStorage) { const jsonString = window.localStorage.getItem('dropbox'); token = jsonString && JSON.parse(jsonString).token; if (token) { dropbox.setAccessToken(token); } } return (token || '') !== ''...
javascript
function getAccessToken() { let token = dropbox.getAccessToken(); if (!token && window.localStorage) { const jsonString = window.localStorage.getItem('dropbox'); token = jsonString && JSON.parse(jsonString).token; if (token) { dropbox.setAccessToken(token); } } return (token || '') !== ''...
[ "function", "getAccessToken", "(", ")", "{", "let", "token", "=", "dropbox", ".", "getAccessToken", "(", ")", ";", "if", "(", "!", "token", "&&", "window", ".", "localStorage", ")", "{", "const", "jsonString", "=", "window", ".", "localStorage", ".", "ge...
Provides the current dropbox auth token. If stored in localStorage is set onto dropbox handler and returned @returns {any}
[ "Provides", "the", "current", "dropbox", "auth", "token", ".", "If", "stored", "in", "localStorage", "is", "set", "onto", "dropbox", "handler", "and", "returned" ]
779238435707cc54335c2d00001e4b9334b314aa
https://github.com/keplergl/kepler.gl/blob/779238435707cc54335c2d00001e4b9334b314aa/examples/demo-app/src/utils/cloud-providers/dropbox.js#L150-L161
train
Get the token from the local storage
[ 30522, 3853, 2131, 6305, 9623, 16033, 7520, 1006, 1007, 1063, 2292, 19204, 1027, 4530, 8758, 1012, 2131, 6305, 9623, 16033, 7520, 1006, 1007, 1025, 2065, 1006, 999, 19204, 1004, 1004, 3332, 1012, 10575, 4263, 4270, 1007, 1063, 9530, 3367, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/light.js
function () { var el = this.el; var data = this.data; var light = this.light; light.castShadow = data.castShadow; // Shadow camera helper. var cameraHelper = el.getObject3D('cameraHelper'); if (data.shadowCameraVisible && !cameraHelper) { el.setObject3D('cameraHelper', new THREE.Came...
javascript
function () { var el = this.el; var data = this.data; var light = this.light; light.castShadow = data.castShadow; // Shadow camera helper. var cameraHelper = el.getObject3D('cameraHelper'); if (data.shadowCameraVisible && !cameraHelper) { el.setObject3D('cameraHelper', new THREE.Came...
[ "function", "(", ")", "{", "var", "el", "=", "this", ".", "el", ";", "var", "data", "=", "this", ".", "data", ";", "var", "light", "=", "this", ".", "light", ";", "light", ".", "castShadow", "=", "data", ".", "castShadow", ";", "// Shadow camera help...
Updates shadow-related properties on the current light.
[ "Updates", "shadow", "-", "related", "properties", "on", "the", "current", "light", "." ]
24acc78a7299a4cdfe3ef617f4d40ddf6275c992
https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/components/light.js#L168-L205
train
Update shadow properties
[ 30522, 3853, 1006, 1007, 1063, 13075, 3449, 1027, 2023, 1012, 3449, 1025, 13075, 2951, 1027, 2023, 1012, 2951, 1025, 13075, 2422, 1027, 2023, 1012, 2422, 1025, 2422, 1012, 23942, 16102, 5004, 1027, 2951, 1012, 23942, 16102, 5004, 1025, 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...
nhn/tui.editor
src/js/wysiwygCommands/tableRemoveCol.js
focusToCell
function focusToCell(sq, $cell, tableMgr) { const nextFocusCell = $cell.get(0); if ($cell.length && $.contains(document, $cell)) { const range = sq.getSelection(); range.selectNodeContents($cell[0]); range.collapse(true); sq.setSelection(range); tableMgr.setLastCellNode(nextFocusCell); } }
javascript
function focusToCell(sq, $cell, tableMgr) { const nextFocusCell = $cell.get(0); if ($cell.length && $.contains(document, $cell)) { const range = sq.getSelection(); range.selectNodeContents($cell[0]); range.collapse(true); sq.setSelection(range); tableMgr.setLastCellNode(nextFocusCell); } }
[ "function", "focusToCell", "(", "sq", ",", "$cell", ",", "tableMgr", ")", "{", "const", "nextFocusCell", "=", "$cell", ".", "get", "(", "0", ")", ";", "if", "(", "$cell", ".", "length", "&&", "$", ".", "contains", "(", "document", ",", "$cell", ")", ...
Focus to given cell @param {Squire} sq - Squire instance @param {jQuery} $cell - jQuery wrapped table cell @param {object} tableMgr - Table manager instance
[ "Focus", "to", "given", "cell" ]
e75ab08c2a7ab07d1143e318f7cde135c5e3002e
https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/wysiwygCommands/tableRemoveCol.js#L112-L123
train
Focus to cell
[ 30522, 3853, 3579, 3406, 29109, 2140, 1006, 5490, 1010, 1002, 3526, 1010, 2795, 24798, 2099, 1007, 1063, 9530, 3367, 2279, 14876, 7874, 29109, 2140, 1027, 1002, 3526, 1012, 2131, 1006, 1014, 1007, 1025, 2065, 1006, 1002, 3526, 1012, 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...
testing-library/dom-testing-library
src/query-helpers.js
makeGetAllQuery
function makeGetAllQuery(allQuery, getMissingError) { return (container, ...args) => { const els = allQuery(container, ...args) if (!els.length) { throw getElementError(getMissingError(container, ...args), container) } return els } }
javascript
function makeGetAllQuery(allQuery, getMissingError) { return (container, ...args) => { const els = allQuery(container, ...args) if (!els.length) { throw getElementError(getMissingError(container, ...args), container) } return els } }
[ "function", "makeGetAllQuery", "(", "allQuery", ",", "getMissingError", ")", "{", "return", "(", "container", ",", "...", "args", ")", "=>", "{", "const", "els", "=", "allQuery", "(", "container", ",", "...", "args", ")", "if", "(", "!", "els", ".", "l...
this accepts a query function and returns a function which throws an error if an empty list of elements is returned
[ "this", "accepts", "a", "query", "function", "and", "returns", "a", "function", "which", "throws", "an", "error", "if", "an", "empty", "list", "of", "elements", "is", "returned" ]
fcb2cbcffb7aff6ecff3be8731168c86eee82ce1
https://github.com/testing-library/dom-testing-library/blob/fcb2cbcffb7aff6ecff3be8731168c86eee82ce1/src/query-helpers.js#L83-L91
train
Returns a function that will return an array of elements that match the query.
[ 30522, 3853, 2191, 18150, 8095, 4226, 2854, 1006, 2035, 4226, 2854, 1010, 2131, 15630, 7741, 2121, 29165, 1007, 1063, 2709, 1006, 11661, 1010, 1012, 1012, 1012, 30524, 5466, 2131, 12260, 3672, 2121, 29165, 1006, 2131, 15630, 7741, 2121, 291...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/events/F6Navigation.js
findFirstTabbableOfPreviousGroup
function findFirstTabbableOfPreviousGroup($FirstTabbableInScope, $Tabbables, oSouceGroup, bFindPreviousGroup) { var oGroup, $Target; for (var i = $Tabbables.length - 1; i >= 0; i--) { oGroup = findClosestGroup($Tabbables[i]); if (oGroup != oSouceGroup) { if (bFindPreviousGroup) { //First find ...
javascript
function findFirstTabbableOfPreviousGroup($FirstTabbableInScope, $Tabbables, oSouceGroup, bFindPreviousGroup) { var oGroup, $Target; for (var i = $Tabbables.length - 1; i >= 0; i--) { oGroup = findClosestGroup($Tabbables[i]); if (oGroup != oSouceGroup) { if (bFindPreviousGroup) { //First find ...
[ "function", "findFirstTabbableOfPreviousGroup", "(", "$FirstTabbableInScope", ",", "$Tabbables", ",", "oSouceGroup", ",", "bFindPreviousGroup", ")", "{", "var", "oGroup", ",", "$Target", ";", "for", "(", "var", "i", "=", "$Tabbables", ".", "length", "-", "1", ";...
see navigate() (bForward = false)
[ "see", "navigate", "()", "(", "bForward", "=", "false", ")" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/events/F6Navigation.js#L124-L149
train
Find the first tabbable of the previous group
[ 30522, 3853, 2424, 8873, 12096, 2696, 22414, 3468, 11253, 28139, 24918, 17058, 1006, 1002, 2034, 2696, 22414, 3468, 7076, 16186, 1010, 1002, 21628, 3676, 13510, 1010, 9808, 7140, 3401, 17058, 1010, 28939, 22254, 28139, 24918, 17058, 1007, 106...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mui-org/material-ui
examples/nextjs-next/src/Link.js
Link
function Link(props) { const { activeClassName, router, className: classNameProps, naked, ...other } = props; const className = clsx(classNameProps, { [activeClassName]: router.pathname === props.href && activeClassName, }); if (naked) { return <NextComposed className={className} {...other} />; } ...
javascript
function Link(props) { const { activeClassName, router, className: classNameProps, naked, ...other } = props; const className = clsx(classNameProps, { [activeClassName]: router.pathname === props.href && activeClassName, }); if (naked) { return <NextComposed className={className} {...other} />; } ...
[ "function", "Link", "(", "props", ")", "{", "const", "{", "activeClassName", ",", "router", ",", "className", ":", "classNameProps", ",", "naked", ",", "...", "other", "}", "=", "props", ";", "const", "className", "=", "clsx", "(", "classNameProps", ",", ...
A styled version of the Next.js Link component: https://nextjs.org/docs/#with-link
[ "A", "styled", "version", "of", "the", "Next", ".", "js", "Link", "component", ":", "https", ":", "//", "nextjs", ".", "org", "/", "docs", "/", "#with", "-", "link" ]
1555e52367835946382fbf2a8f681de71318915d
https://github.com/mui-org/material-ui/blob/1555e52367835946382fbf2a8f681de71318915d/examples/nextjs-next/src/Link.js#L27-L39
train
Link component
[ 30522, 3853, 4957, 1006, 24387, 1007, 1063, 9530, 3367, 1063, 3161, 26266, 18442, 1010, 2799, 2099, 1010, 2465, 18442, 1024, 2465, 18442, 21572, 4523, 1010, 6248, 1010, 1012, 1012, 1012, 2060, 1065, 1027, 24387, 1025, 9530, 3367, 2465, 1844...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/caja-html-sanitizer.js
makeTagPolicy
function makeTagPolicy(opt_naiveUriRewriter, opt_nmTokenPolicy) { return function(tagName, attribs) { if (!(html4.ELEMENTS[tagName] & html4.eflags.UNSAFE)) { return sanitizeAttribs( tagName, attribs, opt_naiveUriRewriter, opt_nmTokenPolicy); } }; }
javascript
function makeTagPolicy(opt_naiveUriRewriter, opt_nmTokenPolicy) { return function(tagName, attribs) { if (!(html4.ELEMENTS[tagName] & html4.eflags.UNSAFE)) { return sanitizeAttribs( tagName, attribs, opt_naiveUriRewriter, opt_nmTokenPolicy); } }; }
[ "function", "makeTagPolicy", "(", "opt_naiveUriRewriter", ",", "opt_nmTokenPolicy", ")", "{", "return", "function", "(", "tagName", ",", "attribs", ")", "{", "if", "(", "!", "(", "html4", ".", "ELEMENTS", "[", "tagName", "]", "&", "html4", ".", "eflags", "...
Creates a tag policy that omits all tags marked UNSAFE in html4-defs.js and applies the default attribute sanitizer with the supplied policy for URI attributes and NMTOKEN attributes. @param {?function(?string): ?string} opt_naiveUriRewriter A transform to apply to URI attributes. If not given, URI attributes are dele...
[ "Creates", "a", "tag", "policy", "that", "omits", "all", "tags", "marked", "UNSAFE", "in", "html4", "-", "defs", ".", "js", "and", "applies", "the", "default", "attribute", "sanitizer", "with", "the", "supplied", "policy", "for", "URI", "attributes", "and", ...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/caja-html-sanitizer.js#L3520-L3527
train
Creates a tag policy function that checks if the tag is safe
[ 30522, 3853, 2191, 15900, 18155, 2594, 2100, 1006, 23569, 1035, 15743, 9496, 15603, 17625, 2099, 1010, 23569, 1035, 13221, 18715, 2368, 18155, 2594, 2100, 1007, 1063, 2709, 3853, 1006, 6415, 18442, 1010, 2012, 18886, 5910, 1007, 1063, 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...
goldfire/howler.js
dist/howler.js
function() { var self = this; var args = arguments; var rate, id; // Determine the values based on arguments. if (args.length === 0) { // We will simply return the current rate of the first node. id = self._sounds[0]._id; } else if (args.length === 1) { // Fi...
javascript
function() { var self = this; var args = arguments; var rate, id; // Determine the values based on arguments. if (args.length === 0) { // We will simply return the current rate of the first node. id = self._sounds[0]._id; } else if (args.length === 1) { // Fi...
[ "function", "(", ")", "{", "var", "self", "=", "this", ";", "var", "args", "=", "arguments", ";", "var", "rate", ",", "id", ";", "// Determine the values based on arguments.", "if", "(", "args", ".", "length", "===", "0", ")", "{", "// We will simply return ...
Get/set the playback rate of a sound. This method can optionally take 0, 1 or 2 arguments. rate() -> Returns the first sound node's current playback rate. rate(id) -> Returns the sound id's current playback rate. rate(rate) -> Sets the playback rate of all sounds in this Howl group. rate(rate, id) -> Sets the playback ...
[ "Get", "/", "set", "the", "playback", "rate", "of", "a", "sound", ".", "This", "method", "can", "optionally", "take", "0", "1", "or", "2", "arguments", ".", "rate", "()", "-", ">", "Returns", "the", "first", "sound", "node", "s", "current", "playback",...
030db918dd8ce640afd57e172418472497e8f113
https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/dist/howler.js#L1454-L1539
train
Update the rate of the sound
[ 30522, 3853, 1006, 1007, 1063, 13075, 2969, 1027, 2023, 1025, 13075, 12098, 5620, 1027, 9918, 1025, 13075, 3446, 1010, 8909, 1025, 1013, 1013, 5646, 1996, 5300, 2241, 2006, 9918, 1012, 2065, 1006, 12098, 5620, 1012, 3091, 1027, 1027, 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...
apache/incubator-echarts
src/chart/funnel/FunnelView.js
FunnelPiece
function FunnelPiece(data, idx) { graphic.Group.call(this); var polygon = new graphic.Polygon(); var labelLine = new graphic.Polyline(); var text = new graphic.Text(); this.add(polygon); this.add(labelLine); this.add(text); this.highDownOnUpdate = function (fromState, toState) { ...
javascript
function FunnelPiece(data, idx) { graphic.Group.call(this); var polygon = new graphic.Polygon(); var labelLine = new graphic.Polyline(); var text = new graphic.Text(); this.add(polygon); this.add(labelLine); this.add(text); this.highDownOnUpdate = function (fromState, toState) { ...
[ "function", "FunnelPiece", "(", "data", ",", "idx", ")", "{", "graphic", ".", "Group", ".", "call", "(", "this", ")", ";", "var", "polygon", "=", "new", "graphic", ".", "Polygon", "(", ")", ";", "var", "labelLine", "=", "new", "graphic", ".", "Polyli...
Piece of pie including Sector, Label, LabelLine @constructor @extends {module:zrender/graphic/Group}
[ "Piece", "of", "pie", "including", "Sector", "Label", "LabelLine" ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/chart/funnel/FunnelView.js#L29-L52
train
FunnelPiece constructor.
[ 30522, 3853, 25102, 11198, 1006, 2951, 1010, 8909, 2595, 1007, 1063, 8425, 1012, 2177, 1012, 2655, 1006, 2023, 1007, 1025, 13075, 26572, 7446, 1027, 2047, 8425, 1012, 26572, 7446, 1006, 1007, 1025, 13075, 3830, 4179, 1027, 2047, 8425, 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...
nhn/tui.editor
src/js/extensions/table/mergedTableCreator.js
_findIndex
function _findIndex(arr, onFind) { let foundIndex = -1; util.forEach(arr, (item, index) => { let nextFind = true; if (onFind(item, index)) { foundIndex = index; nextFind = false; } return nextFind; }); return foundIndex; }
javascript
function _findIndex(arr, onFind) { let foundIndex = -1; util.forEach(arr, (item, index) => { let nextFind = true; if (onFind(item, index)) { foundIndex = index; nextFind = false; } return nextFind; }); return foundIndex; }
[ "function", "_findIndex", "(", "arr", ",", "onFind", ")", "{", "let", "foundIndex", "=", "-", "1", ";", "util", ".", "forEach", "(", "arr", ",", "(", "item", ",", "index", ")", "=>", "{", "let", "nextFind", "=", "true", ";", "if", "(", "onFind", ...
Find index by onFind function. @param {Array} arr - target array @param {function} onFind - find function @returns {number} @private
[ "Find", "index", "by", "onFind", "function", "." ]
e75ab08c2a7ab07d1143e318f7cde135c5e3002e
https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/extensions/table/mergedTableCreator.js#L80-L94
train
Find index of an item in an array
[ 30522, 3853, 1035, 2424, 22254, 10288, 1006, 12098, 2099, 1010, 2006, 16294, 2094, 1007, 1063, 2292, 2179, 22254, 10288, 1027, 1011, 1015, 1025, 21183, 30524, 1027, 6270, 1025, 1065, 2709, 2279, 16294, 2094, 1025, 1065, 1007, 1025, 2709, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
modood/Administrative-divisions-of-China
lib/sqlite.js
init
async function init () { try { await sequelize.sync() } catch (err) { console.log(err) process.exit(-1) } }
javascript
async function init () { try { await sequelize.sync() } catch (err) { console.log(err) process.exit(-1) } }
[ "async", "function", "init", "(", ")", "{", "try", "{", "await", "sequelize", ".", "sync", "(", ")", "}", "catch", "(", "err", ")", "{", "console", ".", "log", "(", "err", ")", "process", ".", "exit", "(", "-", "1", ")", "}", "}" ]
/* Connect database
[ "/", "*", "Connect", "database" ]
31aaa3c31dc767a01f8f5e724c795f02f4540437
https://github.com/modood/Administrative-divisions-of-China/blob/31aaa3c31dc767a01f8f5e724c795f02f4540437/lib/sqlite.js#L62-L69
train
init
[ 30522, 2004, 6038, 2278, 3853, 1999, 4183, 1006, 1007, 1063, 3046, 1063, 26751, 8297, 4697, 1012, 26351, 1006, 1007, 1065, 4608, 1006, 9413, 2099, 1007, 1063, 10122, 1012, 8833, 1006, 9413, 2099, 1007, 2832, 1012, 6164, 1006, 1011, 1015, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
build_tree
function build_tree(clens, cmap, MAX) { var maxlen = 1, w = 0, i = 0, j = 0, ccode = 0, L = clens.length; var bl_count = use_typed_arrays ? new Uint16Array(32) : zero_fill_array(32); for(i = 0; i < 32; ++i) bl_count[i] = 0; for(i = L; i < MAX; ++i) clens[i] = 0; L = clens.length; var ctree = use_typed_arrays ...
javascript
function build_tree(clens, cmap, MAX) { var maxlen = 1, w = 0, i = 0, j = 0, ccode = 0, L = clens.length; var bl_count = use_typed_arrays ? new Uint16Array(32) : zero_fill_array(32); for(i = 0; i < 32; ++i) bl_count[i] = 0; for(i = L; i < MAX; ++i) clens[i] = 0; L = clens.length; var ctree = use_typed_arrays ...
[ "function", "build_tree", "(", "clens", ",", "cmap", ",", "MAX", ")", "{", "var", "maxlen", "=", "1", ",", "w", "=", "0", ",", "i", "=", "0", ",", "j", "=", "0", ",", "ccode", "=", "0", ",", "L", "=", "clens", ".", "length", ";", "var", "bl...
/* modified inflate function also moves original read head /* build tree (used for literals and lengths)
[ "/", "*", "modified", "inflate", "function", "also", "moves", "original", "read", "head", "/", "*", "build", "tree", "(", "used", "for", "literals", "and", "lengths", ")" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L2069-L2104
train
build tree
[ 30522, 3853, 3857, 1035, 3392, 1006, 18856, 6132, 1010, 4642, 9331, 1010, 4098, 1007, 1063, 13075, 4098, 7770, 1027, 1015, 1010, 1059, 1027, 1014, 1010, 1045, 1027, 1014, 1010, 1046, 1027, 1014, 1010, 10507, 10244, 1027, 1014, 1010, 1048, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
lovell/sharp
lib/operation.js
linear
function linear (a, b) { if (!is.defined(a)) { this.options.linearA = 1.0; } else if (is.number(a)) { this.options.linearA = a; } else { throw new Error('Invalid linear transform multiplier ' + a); } if (!is.defined(b)) { this.options.linearB = 0.0; } else if (is.number(b)) { this.optio...
javascript
function linear (a, b) { if (!is.defined(a)) { this.options.linearA = 1.0; } else if (is.number(a)) { this.options.linearA = a; } else { throw new Error('Invalid linear transform multiplier ' + a); } if (!is.defined(b)) { this.options.linearB = 0.0; } else if (is.number(b)) { this.optio...
[ "function", "linear", "(", "a", ",", "b", ")", "{", "if", "(", "!", "is", ".", "defined", "(", "a", ")", ")", "{", "this", ".", "options", ".", "linearA", "=", "1.0", ";", "}", "else", "if", "(", "is", ".", "number", "(", "a", ")", ")", "{"...
Apply the linear formula a * input + b to the image (levels adjustment) @param {Number} [a=1.0] multiplier @param {Number} [b=0.0] offset @returns {Sharp} @throws {Error} Invalid parameters
[ "Apply", "the", "linear", "formula", "a", "*", "input", "+", "b", "to", "the", "image", "(", "levels", "adjustment", ")" ]
05d76eeadfe54713606a615185b2da047923406b
https://github.com/lovell/sharp/blob/05d76eeadfe54713606a615185b2da047923406b/lib/operation.js#L361-L379
train
Linear transform
[ 30522, 3853, 7399, 1006, 1037, 1010, 1038, 1007, 1063, 2065, 1006, 999, 2003, 1012, 4225, 1006, 1037, 1007, 1007, 1063, 2023, 1012, 7047, 1012, 7399, 2050, 1027, 1015, 1012, 1014, 1025, 1065, 2842, 2065, 1006, 2003, 1012, 2193, 1006, 1037...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/scripts/htmlutils.js
getFunctionName
function getFunctionName(aFunction) { var regexpResult = aFunction.toString().match(/function (\w*)/); if (regexpResult && regexpResult[1]) { return regexpResult[1]; } return 'anonymous'; }
javascript
function getFunctionName(aFunction) { var regexpResult = aFunction.toString().match(/function (\w*)/); if (regexpResult && regexpResult[1]) { return regexpResult[1]; } return 'anonymous'; }
[ "function", "getFunctionName", "(", "aFunction", ")", "{", "var", "regexpResult", "=", "aFunction", ".", "toString", "(", ")", ".", "match", "(", "/", "function (\\w*)", "/", ")", ";", "if", "(", "regexpResult", "&&", "regexpResult", "[", "1", "]", ")", ...
Override the broken getFunctionName() method from JsUnit This file must be loaded _after_ the jsunitCore.js
[ "Override", "the", "broken", "getFunctionName", "()", "method", "from", "JsUnit", "This", "file", "must", "be", "loaded", "_after_", "the", "jsunitCore", ".", "js" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L365-L371
train
Get the name of a function
[ 30522, 3853, 2131, 11263, 27989, 18442, 1006, 21358, 4609, 7542, 1007, 1063, 13075, 19723, 10288, 28994, 11314, 1027, 21358, 4609, 7542, 1012, 2000, 3367, 4892, 1006, 1007, 1012, 2674, 1006, 1013, 3853, 1006, 1032, 1059, 1008, 1007, 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...
SAP/openui5
src/sap.ui.ux3/src/sap/ui/ux3/ToolPopup.js
_fnGetFocusControlById
function _fnGetFocusControlById(oToolPopup, id) { var oControl, parent; if (!id) { return null; } oControl = sap.ui.getCore().byId(id); while (!oControl && oControl !== oToolPopup) { ...
javascript
function _fnGetFocusControlById(oToolPopup, id) { var oControl, parent; if (!id) { return null; } oControl = sap.ui.getCore().byId(id); while (!oControl && oControl !== oToolPopup) { ...
[ "function", "_fnGetFocusControlById", "(", "oToolPopup", ",", "id", ")", "{", "var", "oControl", ",", "parent", ";", "if", "(", "!", "id", ")", "{", "return", "null", ";", "}", "oControl", "=", "sap", ".", "ui", ".", "getCore", "(", ")", ".", "byId",...
Returns a DOM element by its Id. @param {Number} id @returns {Element|sap.ui.core.Element|Object|sap.ui.core.tmpl.Template} @private
[ "Returns", "a", "DOM", "element", "by", "its", "Id", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.ux3/src/sap/ui/ux3/ToolPopup.js#L371-L390
train
Returns the control with the given id
[ 30522, 3853, 1035, 1042, 15465, 24475, 10085, 2271, 8663, 13181, 14510, 3593, 1006, 27178, 13669, 16340, 6279, 1010, 8909, 1007, 1063, 13075, 1051, 8663, 13181, 2140, 1010, 6687, 1025, 2065, 1006, 999, 8909, 1007, 1063, 2709, 19701, 1025, 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...