repo
stringclasses
192 values
path
stringlengths
4
115
func_name
stringlengths
0
45
original_string
stringlengths
74
24k
language
stringclasses
1 value
code
stringlengths
74
24k
code_tokens
listlengths
23
4.2k
docstring
stringlengths
2
23.7k
docstring_tokens
listlengths
1
810
sha
stringclasses
192 values
url
stringlengths
90
200
partition
stringclasses
1 value
summary
stringlengths
6
313
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
SAP/openui5
src/sap.ui.core/src/sap/ui/core/routing/Targets.js
function (sName, oTargetOptions) { var oOldTarget = this.getTarget(sName), oTarget; if (oOldTarget) { Log.error("Target with name " + sName + " already exists", this); } else { oTarget = this._createTarget(sName, oTargetOptions); this._addParentTo(oTarget); } return this; }
javascript
function (sName, oTargetOptions) { var oOldTarget = this.getTarget(sName), oTarget; if (oOldTarget) { Log.error("Target with name " + sName + " already exists", this); } else { oTarget = this._createTarget(sName, oTargetOptions); this._addParentTo(oTarget); } return this; }
[ "function", "(", "sName", ",", "oTargetOptions", ")", "{", "var", "oOldTarget", "=", "this", ".", "getTarget", "(", "sName", ")", ",", "oTarget", ";", "if", "(", "oOldTarget", ")", "{", "Log", ".", "error", "(", "\"Target with name \"", "+", "sName", "+"...
Creates a target by using the given name and options. If there's already a target with the same name exists, the existing target is kept from being overwritten and an error log will be written to the development console. @param {string} sName the name of a target @param {object} oTarget the options of a target. The op...
[ "Creates", "a", "target", "by", "using", "the", "given", "name", "and", "options", ".", "If", "there", "s", "already", "a", "target", "with", "the", "same", "name", "exists", "the", "existing", "target", "is", "kept", "from", "being", "overwritten", "and",...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/routing/Targets.js#L427-L439
train
Creates a new target instance
[ 30522, 3853, 1006, 1055, 18442, 1010, 27178, 2906, 18150, 7361, 9285, 1007, 1063, 13075, 1051, 11614, 7559, 18150, 1027, 2023, 1012, 2131, 7559, 18150, 1006, 1055, 18442, 1007, 1010, 27178, 2906, 18150, 1025, 2065, 1006, 1051, 11614, 7559, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
graphql/graphiql
src/utility/fillLeafs.js
getIndentation
function getIndentation(str, index) { let indentStart = index; let indentEnd = index; while (indentStart) { const c = str.charCodeAt(indentStart - 1); // line break if (c === 10 || c === 13 || c === 0x2028 || c === 0x2029) { break; } indentStart--; // not white space if (c !== 9 ...
javascript
function getIndentation(str, index) { let indentStart = index; let indentEnd = index; while (indentStart) { const c = str.charCodeAt(indentStart - 1); // line break if (c === 10 || c === 13 || c === 0x2028 || c === 0x2029) { break; } indentStart--; // not white space if (c !== 9 ...
[ "function", "getIndentation", "(", "str", ",", "index", ")", "{", "let", "indentStart", "=", "index", ";", "let", "indentEnd", "=", "index", ";", "while", "(", "indentStart", ")", "{", "const", "c", "=", "str", ".", "charCodeAt", "(", "indentStart", "-",...
Given a string and an index, look backwards to find the string of whitespace following the next previous line break.
[ "Given", "a", "string", "and", "an", "index", "look", "backwards", "to", "find", "the", "string", "of", "whitespace", "following", "the", "next", "previous", "line", "break", "." ]
5d0f31d6059edc5f816edba3962c3b57fdabd478
https://github.com/graphql/graphiql/blob/5d0f31d6059edc5f816edba3962c3b57fdabd478/src/utility/fillLeafs.js#L161-L177
train
Get the indentation of a line
[ 30522, 3853, 2131, 22254, 19304, 1006, 2358, 2099, 1010, 5950, 1007, 1063, 2292, 27427, 11187, 7559, 2102, 1027, 5950, 1025, 2292, 27427, 15781, 4859, 1027, 5950, 1025, 2096, 1006, 27427, 11187, 7559, 2102, 1007, 1063, 9530, 3367, 1039, 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...
adobe/brackets
src/extensions/default/CodeFolding/foldhelpers/foldgutter.js
updateFoldInfo
function updateFoldInfo(cm, from, to) { var minFoldSize = prefs.getSetting("minFoldSize") || 2; var opts = cm.state.foldGutter.options; var fade = prefs.getSetting("hideUntilMouseover"); var $gutter = $(cm.getGutterElement()); var i = from; function clear(m) { ...
javascript
function updateFoldInfo(cm, from, to) { var minFoldSize = prefs.getSetting("minFoldSize") || 2; var opts = cm.state.foldGutter.options; var fade = prefs.getSetting("hideUntilMouseover"); var $gutter = $(cm.getGutterElement()); var i = from; function clear(m) { ...
[ "function", "updateFoldInfo", "(", "cm", ",", "from", ",", "to", ")", "{", "var", "minFoldSize", "=", "prefs", ".", "getSetting", "(", "\"minFoldSize\"", ")", "||", "2", ";", "var", "opts", "=", "cm", ".", "state", ".", "foldGutter", ".", "options", ";...
Updates the gutter markers for the specified range @param {!CodeMirror} cm the CodeMirror instance for the active editor @param {!number} from the starting line for the update @param {!number} to the ending line for the update
[ "Updates", "the", "gutter", "markers", "for", "the", "specified", "range" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/CodeFolding/foldhelpers/foldgutter.js#L50-L122
train
Update the fold gutter
[ 30522, 3853, 10651, 30524, 1027, 3653, 10343, 1012, 4152, 18319, 3070, 1006, 1000, 8117, 10371, 5332, 4371, 1000, 1007, 1064, 1064, 1016, 1025, 13075, 23569, 2015, 1027, 4642, 1012, 2110, 1012, 10671, 27920, 3334, 1012, 7047, 1025, 13075, 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.core/src/sap/ui/model/odata/ODataUtils.js
simpleCompare
function simpleCompare(vValue1, vValue2) { if (vValue1 === vValue2) { return 0; } if (vValue1 === null || vValue2 === null || vValue1 === undefined || vValue2 === undefined) { return NaN; } return vValue1 > vValue2 ? 1 : -1; }
javascript
function simpleCompare(vValue1, vValue2) { if (vValue1 === vValue2) { return 0; } if (vValue1 === null || vValue2 === null || vValue1 === undefined || vValue2 === undefined) { return NaN; } return vValue1 > vValue2 ? 1 : -1; }
[ "function", "simpleCompare", "(", "vValue1", ",", "vValue2", ")", "{", "if", "(", "vValue1", "===", "vValue2", ")", "{", "return", "0", ";", "}", "if", "(", "vValue1", "===", "null", "||", "vValue2", "===", "null", "||", "vValue1", "===", "undefined", ...
Compares the given values using <code>===</code> and <code>></code>. @param {any} vValue1 the first value to compare @param {any} vValue2 the second value to compare @return {int} the result of the compare: <code>0</code> if the values are equal, <code>-1</code> if the first value is smaller, <code>1</code> if the fir...
[ "Compares", "the", "given", "values", "using", "<code", ">", "===", "<", "/", "code", ">", "and", "<code", ">>", "<", "/", "code", ">", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/ODataUtils.js#L551-L560
train
Simple compare function
[ 30522, 3853, 3722, 9006, 19362, 2063, 1006, 1058, 10175, 5657, 2487, 1010, 1058, 10175, 5657, 2475, 1007, 1063, 2065, 1006, 1058, 10175, 5657, 2487, 1027, 1027, 1027, 1058, 10175, 5657, 2475, 1007, 1063, 2709, 1014, 1025, 1065, 2065, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
Makefile.js
getFirstVersionOfDeletion
function getFirstVersionOfDeletion(filePath) { const deletionCommit = getCommitDeletingFile(filePath), tags = execSilent(`git tag --contains ${deletionCommit}`); return splitCommandResultToLines(tags) .map(version => semver.valid(version.trim())) .filter(version => version) .sor...
javascript
function getFirstVersionOfDeletion(filePath) { const deletionCommit = getCommitDeletingFile(filePath), tags = execSilent(`git tag --contains ${deletionCommit}`); return splitCommandResultToLines(tags) .map(version => semver.valid(version.trim())) .filter(version => version) .sor...
[ "function", "getFirstVersionOfDeletion", "(", "filePath", ")", "{", "const", "deletionCommit", "=", "getCommitDeletingFile", "(", "filePath", ")", ",", "tags", "=", "execSilent", "(", "`", "${", "deletionCommit", "}", "`", ")", ";", "return", "splitCommandResultTo...
Gets the first version number where a given file is no longer present. @param {string} filePath The path to the deleted file. @returns {string} The version number.
[ "Gets", "the", "first", "version", "number", "where", "a", "given", "file", "is", "no", "longer", "present", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/Makefile.js#L371-L379
train
Get the first version of the given file
[ 30522, 3853, 2131, 8873, 12096, 27774, 11253, 9247, 20624, 2239, 1006, 5371, 15069, 1007, 1063, 9530, 3367, 3972, 20624, 2239, 9006, 22930, 1027, 2131, 9006, 22930, 9247, 20624, 3070, 8873, 2571, 1006, 5371, 15069, 1007, 1010, 22073, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_Cache.js
fetchType
function fetchType(sMetaPath) { aPromises.push(that.oRequestor.fetchTypeForPath(sMetaPath).then(function (oType) { var oMessageAnnotation = that.oRequestor.getModelInterface() .fetchMetadata(sMetaPath + "/" + sMessagesAnnotation).getResult(); if (oMessageAnnotation) { oType = Object.create(oType)...
javascript
function fetchType(sMetaPath) { aPromises.push(that.oRequestor.fetchTypeForPath(sMetaPath).then(function (oType) { var oMessageAnnotation = that.oRequestor.getModelInterface() .fetchMetadata(sMetaPath + "/" + sMessagesAnnotation).getResult(); if (oMessageAnnotation) { oType = Object.create(oType)...
[ "function", "fetchType", "(", "sMetaPath", ")", "{", "aPromises", ".", "push", "(", "that", ".", "oRequestor", ".", "fetchTypeForPath", "(", "sMetaPath", ")", ".", "then", "(", "function", "(", "oType", ")", "{", "var", "oMessageAnnotation", "=", "that", "...
/* Adds a promise to aPromises to fetch the type for the given path, put it into mTypeForMetaPath and recursively add the key properties' types if they are complex. @param {string} sMetaPath The meta path of the resource + navigation or key path (which may lead to an entity or complex type or to <code>undefined</code>)
[ "/", "*", "Adds", "a", "promise", "to", "aPromises", "to", "fetch", "the", "type", "for", "the", "given", "path", "put", "it", "into", "mTypeForMetaPath", "and", "recursively", "add", "the", "key", "properties", "types", "if", "they", "are", "complex", "."...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_Cache.js#L549-L575
train
Fetch the type for the given meta path
[ 30522, 3853, 18584, 13874, 1006, 15488, 12928, 15069, 1007, 1063, 19804, 20936, 8583, 1012, 5245, 1006, 2008, 1012, 10848, 15500, 2953, 1012, 18584, 13874, 29278, 15069, 1006, 15488, 12928, 15069, 1007, 1012, 2059, 1006, 3853, 1006, 27178, 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...
SAP/openui5
src/sap.m/src/sap/m/SuggestionItem.js
renderItemText
function renderItemText(oRm, sText, sSearch){ var i; if (sText) { i = sText.toUpperCase().indexOf(sSearch.toUpperCase()); if (i > -1){ oRm.writeEscaped(sText.slice(0, i)); oRm.write("<b>"); oRm.writeEscaped(sText.slice(i, i + sSearch.length)); oRm.write("</b>"); sText = sText.substring(i +...
javascript
function renderItemText(oRm, sText, sSearch){ var i; if (sText) { i = sText.toUpperCase().indexOf(sSearch.toUpperCase()); if (i > -1){ oRm.writeEscaped(sText.slice(0, i)); oRm.write("<b>"); oRm.writeEscaped(sText.slice(i, i + sSearch.length)); oRm.write("</b>"); sText = sText.substring(i +...
[ "function", "renderItemText", "(", "oRm", ",", "sText", ",", "sSearch", ")", "{", "var", "i", ";", "if", "(", "sText", ")", "{", "i", "=", "sText", ".", "toUpperCase", "(", ")", ".", "indexOf", "(", "sSearch", ".", "toUpperCase", "(", ")", ")", ";"...
Render output text to make occurrences of the search text value bold:
[ "Render", "output", "text", "to", "make", "occurrences", "of", "the", "search", "text", "value", "bold", ":" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/SuggestionItem.js#L51-L64
train
Renders the given text
[ 30522, 3853, 17552, 4221, 20492, 10288, 2102, 1006, 2030, 2213, 1010, 26261, 18413, 1010, 7020, 14644, 2818, 1007, 1063, 13075, 1045, 1025, 2065, 1006, 26261, 18413, 1007, 1063, 1045, 1027, 26261, 18413, 1012, 2000, 29547, 18992, 3366, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function () { // create i18n model var oI18nModel = new ResourceModel({ bundleName: "sap.ui.core.messagebundle" }); this._oDialog.setModel(oI18nModel, "i18n"); this._oDialog.setModel(this._createViewModel(), "view"); // set compact/cozy style class this._oDialog.addStyleClass(this._getContentD...
javascript
function () { // create i18n model var oI18nModel = new ResourceModel({ bundleName: "sap.ui.core.messagebundle" }); this._oDialog.setModel(oI18nModel, "i18n"); this._oDialog.setModel(this._createViewModel(), "view"); // set compact/cozy style class this._oDialog.addStyleClass(this._getContentD...
[ "function", "(", ")", "{", "// create i18n model", "var", "oI18nModel", "=", "new", "ResourceModel", "(", "{", "bundleName", ":", "\"sap.ui.core.messagebundle\"", "}", ")", ";", "this", ".", "_oDialog", ".", "setModel", "(", "oI18nModel", ",", "\"i18n\"", ")", ...
Initalizes the technical information dialog @private
[ "Initalizes", "the", "technical", "information", "dialog" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L574-L584
train
Creates the i18n model and sets the view model
[ 30522, 3853, 1006, 1007, 1063, 1013, 1013, 3443, 1045, 15136, 2078, 2944, 13075, 1051, 2072, 15136, 2078, 5302, 9247, 1027, 2047, 7692, 5302, 9247, 1006, 1063, 14012, 18442, 1024, 1000, 20066, 1012, 21318, 1012, 4563, 1012, 4471, 27265, 257...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
thomaspark/bootswatch
docs/3/bower_components/html5shiv/dist/html5shiv-printshiv.js
createDocumentFragment
function createDocumentFragment(ownerDocument, data){ if (!ownerDocument) { ownerDocument = document; } if(supportsUnknownElements){ return ownerDocument.createDocumentFragment(); } data = data || getExpandoData(ownerDocument); var clone = data.frag.cloneNode(), i = 0, ...
javascript
function createDocumentFragment(ownerDocument, data){ if (!ownerDocument) { ownerDocument = document; } if(supportsUnknownElements){ return ownerDocument.createDocumentFragment(); } data = data || getExpandoData(ownerDocument); var clone = data.frag.cloneNode(), i = 0, ...
[ "function", "createDocumentFragment", "(", "ownerDocument", ",", "data", ")", "{", "if", "(", "!", "ownerDocument", ")", "{", "ownerDocument", "=", "document", ";", "}", "if", "(", "supportsUnknownElements", ")", "{", "return", "ownerDocument", ".", "createDocum...
returns a shived DocumentFragment for the given document @memberOf html5 @param {Document} ownerDocument The context document. @returns {Object} The shived DocumentFragment.
[ "returns", "a", "shived", "DocumentFragment", "for", "the", "given", "document" ]
a913e4992dad8f7bf38df2e1d3f4cc6bfe5f26dd
https://github.com/thomaspark/bootswatch/blob/a913e4992dad8f7bf38df2e1d3f4cc6bfe5f26dd/docs/3/bower_components/html5shiv/dist/html5shiv-printshiv.js#L163-L179
train
Creates a document fragment
[ 30522, 3853, 2580, 10085, 27417, 24475, 29181, 3672, 1006, 3954, 3527, 24894, 4765, 1010, 2951, 1007, 1063, 2065, 1006, 999, 3954, 3527, 24894, 4765, 1007, 1063, 3954, 3527, 24894, 4765, 1027, 6254, 1025, 1065, 2065, 1006, 6753, 16814, 1977...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
openlayers/openlayers
src/ol/pointer/MouseSource.js
mouseup
function mouseup(inEvent) { if (!this.isEventSimulatedFromTouch_(inEvent)) { const p = this.pointerMap[POINTER_ID.toString()]; if (p && p.button === inEvent.button) { const e = prepareEvent(inEvent, this.dispatcher); this.dispatcher.up(e, inEvent); this.cleanupMouse(); } } }
javascript
function mouseup(inEvent) { if (!this.isEventSimulatedFromTouch_(inEvent)) { const p = this.pointerMap[POINTER_ID.toString()]; if (p && p.button === inEvent.button) { const e = prepareEvent(inEvent, this.dispatcher); this.dispatcher.up(e, inEvent); this.cleanupMouse(); } } }
[ "function", "mouseup", "(", "inEvent", ")", "{", "if", "(", "!", "this", ".", "isEventSimulatedFromTouch_", "(", "inEvent", ")", ")", "{", "const", "p", "=", "this", ".", "pointerMap", "[", "POINTER_ID", ".", "toString", "(", ")", "]", ";", "if", "(", ...
Handler for `mouseup`. @this {MouseSource} @param {MouseEvent} inEvent The in event.
[ "Handler", "for", "mouseup", "." ]
f366eaea522388fb575b11010e69d309164baca7
https://github.com/openlayers/openlayers/blob/f366eaea522388fb575b11010e69d309164baca7/src/ol/pointer/MouseSource.js#L95-L105
train
mouseup event handler
[ 30522, 3853, 8000, 6279, 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, 9530, 3367, 1052, 1027, 2023, 1012, 20884, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
Makefile.js
hasIdInTitle
function hasIdInTitle(id) { const docText = cat(docFilename); const idOldAtEndOfTitleRegExp = new RegExp(`^# (.*?) \\(${id}\\)`, "u"); // original format const idNewAtBeginningOfTitleRegExp = new RegExp(`^# ${id}: `, "u"); // new format is same as rules index /* ...
javascript
function hasIdInTitle(id) { const docText = cat(docFilename); const idOldAtEndOfTitleRegExp = new RegExp(`^# (.*?) \\(${id}\\)`, "u"); // original format const idNewAtBeginningOfTitleRegExp = new RegExp(`^# ${id}: `, "u"); // new format is same as rules index /* ...
[ "function", "hasIdInTitle", "(", "id", ")", "{", "const", "docText", "=", "cat", "(", "docFilename", ")", ";", "const", "idOldAtEndOfTitleRegExp", "=", "new", "RegExp", "(", "`", "\\\\", "${", "id", "}", "\\\\", "`", ",", "\"u\"", ")", ";", "// original ...
Check if id is present in title @param {string} id id to check for @returns {boolean} true if present @private
[ "Check", "if", "id", "is", "present", "in", "title" ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/Makefile.js#L817-L828
train
Check if the doc has the given id in the title
[ 30522, 3853, 2038, 28173, 16778, 9286, 1006, 8909, 1007, 1063, 9530, 3367, 9986, 18209, 1027, 4937, 1006, 9986, 8873, 20844, 4168, 1007, 1025, 9530, 3367, 10282, 13701, 15482, 6199, 4183, 3917, 24746, 2595, 2361, 1027, 2047, 19723, 10288, 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...
jgraph/mxgraph
javascript/mxClient.js
mxGraphHierarchyNode
function mxGraphHierarchyNode(cell) { mxGraphAbstractHierarchyCell.apply(this, arguments); this.cell = cell; this.id = mxObjectIdentity.get(cell); this.connectsAsTarget = []; this.connectsAsSource = []; }
javascript
function mxGraphHierarchyNode(cell) { mxGraphAbstractHierarchyCell.apply(this, arguments); this.cell = cell; this.id = mxObjectIdentity.get(cell); this.connectsAsTarget = []; this.connectsAsSource = []; }
[ "function", "mxGraphHierarchyNode", "(", "cell", ")", "{", "mxGraphAbstractHierarchyCell", ".", "apply", "(", "this", ",", "arguments", ")", ";", "this", ".", "cell", "=", "cell", ";", "this", ".", "id", "=", "mxObjectIdentity", ".", "get", "(", "cell", ")...
Copyright (c) 2006-2015, JGraph Ltd Copyright (c) 2006-2015, Gaudenz Alder Class: mxGraphHierarchyNode An abstraction of a hierarchical edge for the hierarchy layout Constructor: mxGraphHierarchyNode Constructs an internal node to represent the specified real graph cell Arguments: cell - the real graph cell this...
[ "Copyright", "(", "c", ")", "2006", "-", "2015", "JGraph", "Ltd", "Copyright", "(", "c", ")", "2006", "-", "2015", "Gaudenz", "Alder", "Class", ":", "mxGraphHierarchyNode" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L32959-L32966
train
A node in the hierarchy of a cell.
[ 30522, 3853, 25630, 14413, 4048, 6906, 29389, 3630, 3207, 1006, 3526, 1007, 1063, 25630, 14413, 7875, 20528, 6593, 4048, 6906, 29389, 29109, 2140, 1012, 6611, 1006, 2023, 1010, 9918, 1007, 1025, 2023, 1012, 3526, 1027, 3526, 1025, 2023, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jgraph/mxgraph
javascript/mxClient.js
function() { var doc = null; if (document.implementation && document.implementation.createDocument) { doc = document.implementation.createDocument('', '', null); } else if (window.ActiveXObject) { doc = new ActiveXObject('Microsoft.XMLDOM'); } return doc; }
javascript
function() { var doc = null; if (document.implementation && document.implementation.createDocument) { doc = document.implementation.createDocument('', '', null); } else if (window.ActiveXObject) { doc = new ActiveXObject('Microsoft.XMLDOM'); } return doc; }
[ "function", "(", ")", "{", "var", "doc", "=", "null", ";", "if", "(", "document", ".", "implementation", "&&", "document", ".", "implementation", ".", "createDocument", ")", "{", "doc", "=", "document", ".", "implementation", ".", "createDocument", "(", "'...
Function: createXmlDocument Returns a new, empty XML document.
[ "Function", ":", "createXmlDocument" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L2713-L2727
train
Returns a document object
[ 30522, 3853, 1006, 1007, 1063, 13075, 9986, 1027, 19701, 1025, 2065, 1006, 6254, 1012, 7375, 1004, 1004, 6254, 1012, 7375, 1012, 2580, 10085, 27417, 2102, 1007, 1063, 9986, 1027, 6254, 1012, 7375, 1012, 2580, 10085, 27417, 2102, 1006, 1005,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabview.js
tabView_closeGroup
function tabView_closeGroup(aSpec) { var spec = aSpec || {}; var group = spec.group; if (!group) { throw new Error(arguments.callee.name + ": Group not specified."); } var button = this.getElement({ type: "group_closeButton", value: group }); this._controller.click(button...
javascript
function tabView_closeGroup(aSpec) { var spec = aSpec || {}; var group = spec.group; if (!group) { throw new Error(arguments.callee.name + ": Group not specified."); } var button = this.getElement({ type: "group_closeButton", value: group }); this._controller.click(button...
[ "function", "tabView_closeGroup", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "group", "=", "spec", ".", "group", ";", "if", "(", "!", "group", ")", "{", "throw", "new", "Error", "(", "arguments", ".", "callee", ...
Close the specified tab group @param {object} aSpec Information on which group to operate on Elements: group - Group
[ "Close", "the", "specified", "tab", "group" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabview.js#L211-L226
train
Close a group
[ 30522, 3853, 21628, 8584, 1035, 2485, 17058, 1006, 2004, 5051, 2278, 1007, 1063, 13075, 28699, 1027, 2004, 5051, 2278, 1064, 1064, 1063, 1065, 1025, 13075, 2177, 1027, 28699, 1012, 2177, 1025, 2065, 1006, 999, 2177, 1007, 1063, 5466, 2047, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/controllers/controller.bar.js
computeFlexCategoryTraits
function computeFlexCategoryTraits(index, ruler, options) { var pixels = ruler.pixels; var curr = pixels[index]; var prev = index > 0 ? pixels[index - 1] : null; var next = index < pixels.length - 1 ? pixels[index + 1] : null; var percent = options.categoryPercentage; var start, size; if (prev === null) { // ...
javascript
function computeFlexCategoryTraits(index, ruler, options) { var pixels = ruler.pixels; var curr = pixels[index]; var prev = index > 0 ? pixels[index - 1] : null; var next = index < pixels.length - 1 ? pixels[index + 1] : null; var percent = options.categoryPercentage; var start, size; if (prev === null) { // ...
[ "function", "computeFlexCategoryTraits", "(", "index", ",", "ruler", ",", "options", ")", "{", "var", "pixels", "=", "ruler", ".", "pixels", ";", "var", "curr", "=", "pixels", "[", "index", "]", ";", "var", "prev", "=", "index", ">", "0", "?", "pixels"...
Computes an "optimal" category that globally arranges bars side by side (no gap when percentage options are 1), based on the previous and following categories. This mode generates bars with different widths when data are not evenly spaced. @private
[ "Computes", "an", "optimal", "category", "that", "globally", "arranges", "bars", "side", "by", "side", "(", "no", "gap", "when", "percentage", "options", "are", "1", ")", "based", "on", "the", "previous", "and", "following", "categories", ".", "This", "mode"...
f093c36574d290330ed623e60fbd070421c730d5
https://github.com/chartjs/Chart.js/blob/f093c36574d290330ed623e60fbd070421c730d5/src/controllers/controller.bar.js#L90-L117
train
Compute the data for a given index of a ruler.
[ 30522, 3853, 24134, 21031, 2595, 16280, 20255, 22123, 14995, 3215, 1006, 5950, 1010, 7786, 1010, 7047, 1007, 1063, 13075, 27725, 1027, 7786, 1012, 27725, 1025, 13075, 12731, 12171, 1027, 27725, 1031, 5950, 1033, 1025, 13075, 3653, 2615, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.ux3/src/sap/ui/ux3/ToolPopup.js
function () { var $This = this.$(); var iValue = 0; var sMaxHeight = this.getMaxHeight(); var iMaxHeight = sMaxHeight ? parseInt(sMaxHeight) : 0; /* * Fix the width (if necessary) */ var s...
javascript
function () { var $This = this.$(); var iValue = 0; var sMaxHeight = this.getMaxHeight(); var iMaxHeight = sMaxHeight ? parseInt(sMaxHeight) : 0; /* * Fix the width (if necessary) */ var s...
[ "function", "(", ")", "{", "var", "$This", "=", "this", ".", "$", "(", ")", ";", "var", "iValue", "=", "0", ";", "var", "sMaxHeight", "=", "this", ".", "getMaxHeight", "(", ")", ";", "var", "iMaxHeight", "=", "sMaxHeight", "?", "parseInt", "(", "sM...
This function fixes the height of the ToolPopup if the content is too large. So the height will be set to the possible maximum and a scrollbar is provided. Additionally the width of the ToolPopup is fixed as well since the scrollbar reduces the possible space for the content. @private
[ "This", "function", "fixes", "the", "height", "of", "the", "ToolPopup", "if", "the", "content", "is", "too", "large", ".", "So", "the", "height", "will", "be", "set", "to", "the", "possible", "maximum", "and", "a", "scrollbar", "is", "provided", ".", "Ad...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.ux3/src/sap/ui/ux3/ToolPopup.js#L438-L560
train
Calculates the height of the ToolPopup
[ 30522, 3853, 1006, 1007, 1063, 13075, 1002, 2023, 1027, 2023, 1012, 1002, 1006, 1007, 1025, 13075, 4921, 2389, 5657, 1027, 1014, 1025, 13075, 15488, 8528, 26036, 13900, 1027, 2023, 1012, 2131, 17848, 26036, 13900, 1006, 1007, 1025, 13075, 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...
BlackrockDigital/startbootstrap-sb-admin-2
vendor/chart.js/Chart.js
getRelativePosition
function getRelativePosition(e, chart) { if (e.native) { return { x: e.x, y: e.y }; } return helpers$1.getRelativePosition(e, chart); }
javascript
function getRelativePosition(e, chart) { if (e.native) { return { x: e.x, y: e.y }; } return helpers$1.getRelativePosition(e, chart); }
[ "function", "getRelativePosition", "(", "e", ",", "chart", ")", "{", "if", "(", "e", ".", "native", ")", "{", "return", "{", "x", ":", "e", ".", "x", ",", "y", ":", "e", ".", "y", "}", ";", "}", "return", "helpers$1", ".", "getRelativePosition", ...
Helper function to get relative position for an event @param {Event|IEvent} event - The event to get the position for @param {Chart} chart - The chart @returns {object} the event position
[ "Helper", "function", "to", "get", "relative", "position", "for", "an", "event" ]
ddfaceb4a8e65a41f163e2fdc4eab49384b810a1
https://github.com/BlackrockDigital/startbootstrap-sb-admin-2/blob/ddfaceb4a8e65a41f163e2fdc4eab49384b810a1/vendor/chart.js/Chart.js#L5835-L5844
train
Get relative position of an element
[ 30522, 3853, 2131, 16570, 8082, 26994, 1006, 1041, 1010, 3673, 1007, 1063, 2065, 1006, 1041, 1012, 3128, 1007, 1063, 2709, 1063, 1060, 1024, 1041, 1012, 1060, 1010, 1061, 1024, 1041, 1012, 1061, 1065, 1025, 1065, 2709, 2393, 2545, 1002, 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...
elastic/elasticsearch-js
api/api/search.js
buildSearch
function buildSearch (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts /** * Perform a [search](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html) request * * @param {list} index - A comma-separa...
javascript
function buildSearch (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts /** * Perform a [search](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html) request * * @param {list} index - A comma-separa...
[ "function", "buildSearch", "(", "opts", ")", "{", "// eslint-disable-next-line no-unused-vars", "const", "{", "makeRequest", ",", "ConfigurationError", ",", "handleError", ",", "snakeCaseKeys", "}", "=", "opts", "/**\n * Perform a [search](http://www.elastic.co/guide/en/elast...
/* eslint camelcase: 0 /* eslint no-unused-vars: 0
[ "/", "*", "eslint", "camelcase", ":", "0", "/", "*", "eslint", "no", "-", "unused", "-", "vars", ":", "0" ]
4fc4699a4d4474d7887bc7757e0269218a859294
https://github.com/elastic/elasticsearch-js/blob/4fc4699a4d4474d7887bc7757e0269218a859294/api/api/search.js#L25-L218
train
Build a search function
[ 30522, 3853, 16473, 14644, 2818, 1006, 23569, 2015, 1007, 1063, 1013, 1013, 9686, 4115, 2102, 1011, 4487, 19150, 1011, 2279, 1011, 2240, 2053, 1011, 15171, 1011, 13075, 2015, 9530, 3367, 1063, 9338, 2063, 15500, 1010, 9563, 2121, 29165, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/search/FileFilters.js
setActiveFilter
function setActiveFilter(filter, index) { var filterSets = PreferencesManager.get("fileFilters") || []; if (filter) { if (index === -1) { // Add a new filter set index = filterSets.length; filterSets.push(filter); } else if (index ...
javascript
function setActiveFilter(filter, index) { var filterSets = PreferencesManager.get("fileFilters") || []; if (filter) { if (index === -1) { // Add a new filter set index = filterSets.length; filterSets.push(filter); } else if (index ...
[ "function", "setActiveFilter", "(", "filter", ",", "index", ")", "{", "var", "filterSets", "=", "PreferencesManager", ".", "get", "(", "\"fileFilters\"", ")", "||", "[", "]", ";", "if", "(", "filter", ")", "{", "if", "(", "index", "===", "-", "1", ")",...
Sets and save the index of the active filter. Automatically set when editFilter() is completed. If no filter is passed in, then clear the last active filter index by setting it to -1. @param {{name: string, patterns: Array.<string>}=} filter @param {number=} index The index of the filter set in the list of saved filte...
[ "Sets", "and", "save", "the", "index", "of", "the", "active", "filter", ".", "Automatically", "set", "when", "editFilter", "()", "is", "completed", ".", "If", "no", "filter", "is", "passed", "in", "then", "clear", "the", "last", "active", "filter", "index"...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/search/FileFilters.js#L175-L201
train
Set the active filter
[ 30522, 3853, 2275, 19620, 8873, 21928, 1006, 11307, 1010, 5950, 1007, 1063, 13075, 17736, 8454, 1027, 18394, 24805, 4590, 1012, 2131, 1006, 1000, 5371, 8873, 21928, 2015, 1000, 1007, 1064, 1064, 1031, 1033, 1025, 2065, 1006, 11307, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ecomfe/zrender
src/core/env.js
detect
function detect(ua) { var os = {}; var browser = {}; // var webkit = ua.match(/Web[kK]it[\/]{0,1}([\d.]+)/); // var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // var ipad = ua.match(/(iPad).*OS\s([\d_]+)/); // var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); // var iphone = !ipad && u...
javascript
function detect(ua) { var os = {}; var browser = {}; // var webkit = ua.match(/Web[kK]it[\/]{0,1}([\d.]+)/); // var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // var ipad = ua.match(/(iPad).*OS\s([\d_]+)/); // var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); // var iphone = !ipad && u...
[ "function", "detect", "(", "ua", ")", "{", "var", "os", "=", "{", "}", ";", "var", "browser", "=", "{", "}", ";", "// var webkit = ua.match(/Web[kK]it[\\/]{0,1}([\\d.]+)/);", "// var android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/);", "// var ipad = ua.match(/(iPad).*OS\\...
Zepto.js (c) 2010-2013 Thomas Fuchs Zepto.js may be freely distributed under the MIT license.
[ "Zepto", ".", "js", "(", "c", ")", "2010", "-", "2013", "Thomas", "Fuchs", "Zepto", ".", "js", "may", "be", "freely", "distributed", "under", "the", "MIT", "license", "." ]
30321b57cba3149c30eacb0c1e18276f0f001b9f
https://github.com/ecomfe/zrender/blob/30321b57cba3149c30eacb0c1e18276f0f001b9f/src/core/env.js#L58-L158
train
Detects the OS and browser from the user agent.
[ 30522, 3853, 11487, 1006, 25423, 1007, 1063, 13075, 9808, 1027, 1063, 1065, 1025, 13075, 16602, 1027, 1063, 1065, 1025, 1013, 1013, 13075, 4773, 23615, 1027, 25423, 1012, 2674, 1006, 1013, 4773, 1031, 1047, 2243, 1033, 2009, 1031, 1032, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/JSUtils/Preferences.js
settingsToRegExp
function settingsToRegExp(settings, baseRegExp, defaultRegExp) { var regExpString = ""; if (settings instanceof Array && settings.length > 0) { // Append base settings to user settings. The base // settings are builtin and cannot be overridden. if (baseRegExp) { ...
javascript
function settingsToRegExp(settings, baseRegExp, defaultRegExp) { var regExpString = ""; if (settings instanceof Array && settings.length > 0) { // Append base settings to user settings. The base // settings are builtin and cannot be overridden. if (baseRegExp) { ...
[ "function", "settingsToRegExp", "(", "settings", ",", "baseRegExp", ",", "defaultRegExp", ")", "{", "var", "regExpString", "=", "\"\"", ";", "if", "(", "settings", "instanceof", "Array", "&&", "settings", ".", "length", ">", "0", ")", "{", "// Append base sett...
Convert an array of strings with optional wildcards, to an equivalent regular expression. @param {Array.<string|RegExp>} settings from the file (note: this may be mutated by this function) @param {?RegExp} baseRegExp - base regular expression that is always used @param {?RegExp} defaultRegExp - additional regular expr...
[ "Convert", "an", "array", "of", "strings", "with", "optional", "wildcards", "to", "an", "equivalent", "regular", "expression", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/JSUtils/Preferences.js#L80-L138
train
Converts the given settings array to a regular expression.
[ 30522, 3853, 10906, 19277, 3351, 2595, 2361, 1006, 10906, 1010, 2918, 2890, 3351, 2595, 2361, 1010, 12398, 2890, 3351, 2595, 2361, 1007, 1063, 30524, 10906, 2024, 2328, 2378, 1998, 3685, 2022, 2058, 14615, 4181, 1012, 2065, 1006, 2918, 2890...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dequelabs/axe-core
lib/commons/text/form-control-value.js
ariaComboboxValue
function ariaComboboxValue(virtualNode, context) { const { actualNode } = virtualNode; const role = aria.getRole(actualNode, { noImplicit: true }); let listbox; // For combobox, find the first owned listbox: if (!role === 'combobox') { return ''; } listbox = aria .getOwnedVirtual(virtualNode) .filter(elm ...
javascript
function ariaComboboxValue(virtualNode, context) { const { actualNode } = virtualNode; const role = aria.getRole(actualNode, { noImplicit: true }); let listbox; // For combobox, find the first owned listbox: if (!role === 'combobox') { return ''; } listbox = aria .getOwnedVirtual(virtualNode) .filter(elm ...
[ "function", "ariaComboboxValue", "(", "virtualNode", ",", "context", ")", "{", "const", "{", "actualNode", "}", "=", "virtualNode", ";", "const", "role", "=", "aria", ".", "getRole", "(", "actualNode", ",", "{", "noImplicit", ":", "true", "}", ")", ";", ...
Calculate value of an element with role=combobox or role=listbox @param {VirtualNode} element The VirtualNode instance whose value we want @param {Object} context The VirtualNode instance whose value we want @property {Element} startNode First node in accessible name computation @property {String[]} unsupported List o...
[ "Calculate", "value", "of", "an", "element", "with", "role", "=", "combobox", "or", "role", "=", "listbox" ]
727323c07980e2291575f545444d389fb942906f
https://github.com/dequelabs/axe-core/blob/727323c07980e2291575f545444d389fb942906f/lib/commons/text/form-control-value.js#L170-L186
train
Get the value of the given virtual node
[ 30522, 3853, 9342, 18274, 16429, 11636, 10175, 5657, 1006, 7484, 3630, 3207, 1010, 6123, 1007, 1063, 9530, 3367, 1063, 5025, 3630, 3207, 1065, 1027, 7484, 3630, 3207, 1025, 9530, 3367, 2535, 1027, 9342, 1012, 2131, 13153, 2063, 1006, 5025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
mxCellState
function mxCellState(view, cell, style) { this.view = view; this.cell = cell; this.style = (style != null) ? style : {}; this.origin = new mxPoint(); this.absoluteOffset = new mxPoint(); }
javascript
function mxCellState(view, cell, style) { this.view = view; this.cell = cell; this.style = (style != null) ? style : {}; this.origin = new mxPoint(); this.absoluteOffset = new mxPoint(); }
[ "function", "mxCellState", "(", "view", ",", "cell", ",", "style", ")", "{", "this", ".", "view", "=", "view", ";", "this", ".", "cell", "=", "cell", ";", "this", ".", "style", "=", "(", "style", "!=", "null", ")", "?", "style", ":", "{", "}", ...
Copyright (c) 2006-2015, JGraph Ltd Copyright (c) 2006-2015, Gaudenz Alder Class: mxCellState Represents the current state of a cell in a given <mxGraphView>. For edges, the edge label position is stored in <absoluteOffset>. The size for oversize labels can be retrieved using the boundingBox property of the <text>...
[ "Copyright", "(", "c", ")", "2006", "-", "2015", "JGraph", "Ltd", "Copyright", "(", "c", ")", "2006", "-", "2015", "Gaudenz", "Alder", "Class", ":", "mxCellState" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L45803-L45811
train
A state object that can be used to change the position of the cell
[ 30522, 3853, 25630, 29109, 4877, 12259, 1006, 3193, 1010, 3526, 1010, 2806, 1007, 1063, 2023, 1012, 3193, 1027, 3193, 1025, 2023, 1012, 3526, 1027, 3526, 1025, 2023, 1012, 2806, 1027, 1006, 2806, 999, 1027, 19701, 1007, 1029, 2806, 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...
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
XPathOptimizationCache
function XPathOptimizationCache(newMaxSize) { // private var cache = new BoundedCache(newMaxSize); // public /** * Returns the optimized item by document markup and XPath, or null if * it is not found in the cache. Never calls put() on the underlying cache. */ this.get = function(html, xpath...
javascript
function XPathOptimizationCache(newMaxSize) { // private var cache = new BoundedCache(newMaxSize); // public /** * Returns the optimized item by document markup and XPath, or null if * it is not found in the cache. Never calls put() on the underlying cache. */ this.get = function(html, xpath...
[ "function", "XPathOptimizationCache", "(", "newMaxSize", ")", "{", "// private", "var", "cache", "=", "new", "BoundedCache", "(", "newMaxSize", ")", ";", "// public", "/**\n * Returns the optimized item by document markup and XPath, or null if\n * it is not found in the cac...
/////////////////////////////////////////////////////////////////////////////
[ "/////////////////////////////////////////////////////////////////////////////" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L1562-L1605
train
XPathOptimizationCache - A cache that is used to optimize the given xpath.
[ 30522, 3853, 26726, 8988, 7361, 3775, 4328, 9276, 3540, 5403, 1006, 2047, 17848, 5332, 4371, 1007, 1063, 1013, 1013, 2797, 13075, 17053, 1027, 2047, 10351, 3540, 5403, 1006, 2047, 17848, 5332, 4371, 1007, 1025, 1013, 1013, 2270, 1013, 1008,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/UpdateNotification.js
_stripOldVersionInfo
function _stripOldVersionInfo(versionInfo, buildNumber) { // Do a simple linear search. Since we are going in reverse-chronological order, we // should get through the search quickly. var lastIndex = 0; var len = versionInfo.length; var versionEntry; var validBuildEntries...
javascript
function _stripOldVersionInfo(versionInfo, buildNumber) { // Do a simple linear search. Since we are going in reverse-chronological order, we // should get through the search quickly. var lastIndex = 0; var len = versionInfo.length; var versionEntry; var validBuildEntries...
[ "function", "_stripOldVersionInfo", "(", "versionInfo", ",", "buildNumber", ")", "{", "// Do a simple linear search. Since we are going in reverse-chronological order, we", "// should get through the search quickly.", "var", "lastIndex", "=", "0", ";", "var", "len", "=", "version...
Return a new array of version information that is newer than "buildNumber". Returns null if there is no new version information.
[ "Return", "a", "new", "array", "of", "version", "information", "that", "is", "newer", "than", "buildNumber", ".", "Returns", "null", "if", "there", "is", "no", "new", "version", "information", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/utils/UpdateNotification.js#L275-L297
train
Strip old version info
[ 30522, 3853, 1035, 6167, 11614, 27774, 2378, 14876, 1006, 2544, 2378, 14876, 1010, 3857, 19172, 5677, 1007, 1063, 1013, 1013, 2079, 1037, 3722, 7399, 3945, 1012, 2144, 2057, 2024, 2183, 1999, 7901, 1011, 23472, 2344, 1010, 2057, 1013, 1013,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SheetJS/js-xlsx
bits/62_fxls.js
parse_PtgAttrChoose
function parse_PtgAttrChoose(blob, length, opts)/*:Array<number>*/ { blob.l +=2; var offset = blob.read_shift(opts && opts.biff == 2 ? 1 : 2); var o/*:Array<number>*/ = []; /* offset is 1 less than the number of elements */ for(var i = 0; i <= offset; ++i) o.push(blob.read_shift(opts && opts.biff == 2 ? 1 : 2)); ...
javascript
function parse_PtgAttrChoose(blob, length, opts)/*:Array<number>*/ { blob.l +=2; var offset = blob.read_shift(opts && opts.biff == 2 ? 1 : 2); var o/*:Array<number>*/ = []; /* offset is 1 less than the number of elements */ for(var i = 0; i <= offset; ++i) o.push(blob.read_shift(opts && opts.biff == 2 ? 1 : 2)); ...
[ "function", "parse_PtgAttrChoose", "(", "blob", ",", "length", ",", "opts", ")", "/*:Array<number>*/", "{", "blob", ".", "l", "+=", "2", ";", "var", "offset", "=", "blob", ".", "read_shift", "(", "opts", "&&", "opts", ".", "biff", "==", "2", "?", "1", ...
/* [MS-XLS] 2.5.198.34 ; [MS-XLSB] 2.5.97.25
[ "/", "*", "[", "MS", "-", "XLS", "]", "2", ".", "5", ".", "198", ".", "34", ";", "[", "MS", "-", "XLSB", "]", "2", ".", "5", ".", "97", ".", "25" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/bits/62_fxls.js#L142-L149
train
Parse an attribute choose
[ 30522, 3853, 11968, 3366, 1035, 13866, 20697, 16344, 9905, 9232, 1006, 1038, 4135, 2497, 1010, 3091, 1010, 23569, 2015, 1007, 1013, 1008, 1024, 9140, 1026, 2193, 1028, 1008, 1013, 1063, 1038, 4135, 2497, 1012, 1048, 1009, 1027, 1016, 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...
angular/material
src/core/services/interimElement/interimElement.js
factory
function factory($$interimElement, $injector) { var defaultMethods; var defaultOptions; var interimElementService = $$interimElement(); /* * publicService is what the developer will be using. * It has methods hide(), cancel(), show(), build(), and any other * presets which ...
javascript
function factory($$interimElement, $injector) { var defaultMethods; var defaultOptions; var interimElementService = $$interimElement(); /* * publicService is what the developer will be using. * It has methods hide(), cancel(), show(), build(), and any other * presets which ...
[ "function", "factory", "(", "$$interimElement", ",", "$injector", ")", "{", "var", "defaultMethods", ";", "var", "defaultOptions", ";", "var", "interimElementService", "=", "$$interimElement", "(", ")", ";", "/*\n * publicService is what the developer will be using.\n...
Create a factory that has the given methods & defaults implementing interimElement /* @ngInject
[ "Create", "a", "factory", "that", "has", "the", "given", "methods", "&", "defaults", "implementing", "interimElement", "/", "*" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/services/interimElement/interimElement.js#L110-L242
train
Creates a new instance of the public service
[ 30522, 3853, 4713, 1006, 1002, 1002, 9455, 12260, 3672, 1010, 1002, 1999, 20614, 2953, 1007, 1063, 13075, 12398, 11368, 6806, 5104, 1025, 13075, 12398, 7361, 9285, 1025, 13075, 9455, 12260, 8163, 2121, 7903, 2063, 1027, 1002, 1002, 9455, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/config/config-initializer.js
configureRules
function configureRules(answers, config) { const BAR_TOTAL = 20, BAR_SOURCE_CODE_TOTAL = 4, newConfig = Object.assign({}, config), disabledConfigs = {}; let sourceCodes, registry; // Set up a progress bar, as this process can take a long time const bar = new ProgressBar(...
javascript
function configureRules(answers, config) { const BAR_TOTAL = 20, BAR_SOURCE_CODE_TOTAL = 4, newConfig = Object.assign({}, config), disabledConfigs = {}; let sourceCodes, registry; // Set up a progress bar, as this process can take a long time const bar = new ProgressBar(...
[ "function", "configureRules", "(", "answers", ",", "config", ")", "{", "const", "BAR_TOTAL", "=", "20", ",", "BAR_SOURCE_CODE_TOTAL", "=", "4", ",", "newConfig", "=", "Object", ".", "assign", "(", "{", "}", ",", "config", ")", ",", "disabledConfigs", "=", ...
Set the `rules` of a config by examining a user's source code Note: This clones the config object and returns a new config to avoid mutating the original config parameter. @param {Object} answers answers received from inquirer @param {Object} config config object @returns {Object} config object with c...
[ "Set", "the", "rules", "of", "a", "config", "by", "examining", "a", "user", "s", "source", "code" ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/config/config-initializer.js#L139-L238
train
Configure the rules of the given file
[ 30522, 3853, 9530, 8873, 27390, 2121, 16308, 1006, 6998, 1010, 9530, 8873, 2290, 1007, 1063, 9530, 3367, 3347, 1035, 2561, 1027, 2322, 1010, 3347, 1035, 3120, 1035, 3642, 1035, 2561, 1027, 1018, 1010, 2047, 8663, 8873, 2290, 1027, 4874, 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...
jgraph/mxgraph
javascript/mxClient.js
function(x1, y1, x2, y2, px, py) { return Math.abs((y2 - y1) * px - (x2 - x1) * py + x2 * y1 - y2 * x1) / Math.sqrt((y2 - y1) * (y2 - y1) + (x2 - x1) * (x2 - x1)); }
javascript
function(x1, y1, x2, y2, px, py) { return Math.abs((y2 - y1) * px - (x2 - x1) * py + x2 * y1 - y2 * x1) / Math.sqrt((y2 - y1) * (y2 - y1) + (x2 - x1) * (x2 - x1)); }
[ "function", "(", "x1", ",", "y1", ",", "x2", ",", "y2", ",", "px", ",", "py", ")", "{", "return", "Math", ".", "abs", "(", "(", "y2", "-", "y1", ")", "*", "px", "-", "(", "x2", "-", "x1", ")", "*", "py", "+", "x2", "*", "y1", "-", "y2",...
Function: ptLineDist Returns the distance between a line defined by two points and a point. To get the distance between a point and a segment (with a specific length) use <mxUtils.ptSeqDistSq>. Parameters: x1 - X-coordinate of point 1 of the line. y1 - Y-coordinate of point 1 of the line. x2 - X-coordinate of point ...
[ "Function", ":", "ptLineDist" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L5110-L5114
train
Calculate the distance between two points
[ 30522, 3853, 1006, 1060, 2487, 1010, 1061, 2487, 1010, 1060, 2475, 1010, 1061, 2475, 1010, 1052, 2595, 1010, 1052, 2100, 1007, 1063, 2709, 8785, 1012, 14689, 1006, 1006, 1061, 2475, 1011, 1061, 2487, 1007, 1008, 1052, 2595, 1011, 1006, 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...
adobe/brackets
src/JSUtils/node/TernNodeDomain.js
getTernProperties
function getTernProperties(fileInfo, offset, type) { var request = buildRequest(fileInfo, "properties", offset), i; //_log("tern properties: request " + request.type + dir + " " + file); try { ternServer.request(request, function (error, data) { var properties = []; ...
javascript
function getTernProperties(fileInfo, offset, type) { var request = buildRequest(fileInfo, "properties", offset), i; //_log("tern properties: request " + request.type + dir + " " + file); try { ternServer.request(request, function (error, data) { var properties = []; ...
[ "function", "getTernProperties", "(", "fileInfo", ",", "offset", ",", "type", ")", "{", "var", "request", "=", "buildRequest", "(", "fileInfo", ",", "\"properties\"", ",", "offset", ")", ",", "i", ";", "//_log(\"tern properties: request \" + request.type + dir + \" \"...
Get all the known properties for guessing. @param {{type: string, name: string, offsetLines: number, text: string}} fileInfo - type of update, name of file, and the text of the update. For "full" updates, the whole text of the file is present. For "part" updates, the changed portion of the text. For "empty" updates, t...
[ "Get", "all", "the", "known", "properties", "for", "guessing", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/JSUtils/node/TernNodeDomain.js#L416-L442
train
Get Tern properties
[ 30522, 3853, 2131, 16451, 21572, 4842, 7368, 1006, 5371, 2378, 14876, 1010, 16396, 1010, 2828, 1007, 1063, 13075, 5227, 1027, 3857, 2890, 15500, 1006, 5371, 2378, 14876, 1010, 1000, 5144, 1000, 1010, 16396, 1007, 1010, 1045, 1025, 1013, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/LiveDevelopment/Agents/HighlightAgent.js
_onRemoteHighlight
function _onRemoteHighlight(event, res) { var node; if (res.value === "1") { node = DOMAgent.nodeWithId(res.nodeId); } exports.trigger("highlight", node); }
javascript
function _onRemoteHighlight(event, res) { var node; if (res.value === "1") { node = DOMAgent.nodeWithId(res.nodeId); } exports.trigger("highlight", node); }
[ "function", "_onRemoteHighlight", "(", "event", ",", "res", ")", "{", "var", "node", ";", "if", "(", "res", ".", "value", "===", "\"1\"", ")", "{", "node", "=", "DOMAgent", ".", "nodeWithId", "(", "res", ".", "nodeId", ")", ";", "}", "exports", ".", ...
active highlight Remote Event: Highlight
[ "active", "highlight", "Remote", "Event", ":", "Highlight" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/LiveDevelopment/Agents/HighlightAgent.js#L43-L49
train
Called when a remote highlight is received
[ 30522, 3853, 1035, 2006, 28578, 12184, 4048, 5603, 7138, 1006, 2724, 1010, 24501, 1007, 1063, 13075, 13045, 1025, 2065, 1006, 24501, 1012, 3643, 1027, 1027, 1027, 1000, 1015, 1000, 1007, 1063, 13045, 1027, 14383, 4270, 3372, 1012, 13045, 24...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jquery/jquery
build/release.js
function( callback ) { Release.exec( "grunt", "Grunt command failed" ); Release.exec( "grunt custom:-ajax,-effects --filename=jquery.slim.js && " + "grunt remove_map_comment --filename=jquery.slim.js", "Grunt custom failed" ); cdn.makeReleaseCopies( Release ); Release._setSrcVersion(); ca...
javascript
function( callback ) { Release.exec( "grunt", "Grunt command failed" ); Release.exec( "grunt custom:-ajax,-effects --filename=jquery.slim.js && " + "grunt remove_map_comment --filename=jquery.slim.js", "Grunt custom failed" ); cdn.makeReleaseCopies( Release ); Release._setSrcVersion(); ca...
[ "function", "(", "callback", ")", "{", "Release", ".", "exec", "(", "\"grunt\"", ",", "\"Grunt command failed\"", ")", ";", "Release", ".", "exec", "(", "\"grunt custom:-ajax,-effects --filename=jquery.slim.js && \"", "+", "\"grunt remove_map_comment --filename=jquery.slim.js...
Generates any release artifacts that should be included in the release. The callback must be invoked with an array of files that should be committed before creating the tag. @param {Function} callback
[ "Generates", "any", "release", "artifacts", "that", "should", "be", "included", "in", "the", "release", ".", "The", "callback", "must", "be", "invoked", "with", "an", "array", "of", "files", "that", "should", "be", "committed", "before", "creating", "the", "...
ccbd6b93424cbdbf86f07a86c2e55cbab497d7a3
https://github.com/jquery/jquery/blob/ccbd6b93424cbdbf86f07a86c2e55cbab497d7a3/build/release.js#L49-L59
train
This function is called when the release is not installed
[ 30522, 3853, 1006, 2655, 5963, 1007, 1063, 2713, 1012, 4654, 8586, 1006, 1000, 20696, 1000, 1010, 1000, 20696, 3094, 3478, 1000, 1007, 1025, 2713, 1012, 4654, 8586, 1006, 1000, 20696, 7661, 1024, 1011, 18176, 1010, 1011, 3896, 1011, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
firebase/firebase-js-sdk
packages/auth/demo/public/script.js
onUpdateProfile
function onUpdateProfile() { var displayName = $('#display-name').val(); var photoURL = $('#photo-url').val(); activeUser().updateProfile({ 'displayName': displayName, 'photoURL': photoURL }).then(function() { refreshUserData(); alertSuccess('Profile updated!'); }, onAuthError); }
javascript
function onUpdateProfile() { var displayName = $('#display-name').val(); var photoURL = $('#photo-url').val(); activeUser().updateProfile({ 'displayName': displayName, 'photoURL': photoURL }).then(function() { refreshUserData(); alertSuccess('Profile updated!'); }, onAuthError); }
[ "function", "onUpdateProfile", "(", ")", "{", "var", "displayName", "=", "$", "(", "'#display-name'", ")", ".", "val", "(", ")", ";", "var", "photoURL", "=", "$", "(", "'#photo-url'", ")", ".", "val", "(", ")", ";", "activeUser", "(", ")", ".", "upda...
Changes the user's password.
[ "Changes", "the", "user", "s", "password", "." ]
491598a499813dacc23724de5e237ec220cc560e
https://github.com/firebase/firebase-js-sdk/blob/491598a499813dacc23724de5e237ec220cc560e/packages/auth/demo/public/script.js#L625-L635
train
Update profile
[ 30522, 3853, 2006, 6279, 13701, 21572, 8873, 2571, 1006, 1007, 1063, 13075, 4653, 18442, 1027, 1002, 1006, 1005, 1001, 4653, 1011, 2171, 1005, 1007, 1012, 11748, 1006, 1007, 1025, 13075, 6302, 3126, 2140, 1027, 1002, 1006, 1005, 1001, 6302,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jaywcjlove/linux-command
build/build.js
readMarkdownPaths
function readMarkdownPaths(filepath) { return new Promise((resolve, reject) => { try { let pathAll = []; const files = FS.readdirSync(filepath); for (let i = 0; i < files.length; i++) { if (/\.md$/.test(files[i])) { pathAll.push(path.join(filepath, files[i])); } }...
javascript
function readMarkdownPaths(filepath) { return new Promise((resolve, reject) => { try { let pathAll = []; const files = FS.readdirSync(filepath); for (let i = 0; i < files.length; i++) { if (/\.md$/.test(files[i])) { pathAll.push(path.join(filepath, files[i])); } }...
[ "function", "readMarkdownPaths", "(", "filepath", ")", "{", "return", "new", "Promise", "(", "(", "resolve", ",", "reject", ")", "=>", "{", "try", "{", "let", "pathAll", "=", "[", "]", ";", "const", "files", "=", "FS", ".", "readdirSync", "(", "filepat...
返回 MD 所有路径的 Array @param {String} filepath
[ "返回", "MD", "所有路径的", "Array" ]
7d6c8c6b3468a0dd5311ee68934c9b8db64469f7
https://github.com/jaywcjlove/linux-command/blob/7d6c8c6b3468a0dd5311ee68934c9b8db64469f7/build/build.js#L294-L309
train
Read markdown files
[ 30522, 3853, 3191, 10665, 7698, 15069, 2015, 1006, 5371, 15069, 1007, 1063, 2709, 2047, 4872, 1006, 1006, 10663, 1010, 15454, 1007, 1027, 1028, 1063, 3046, 1063, 2292, 4130, 8095, 1027, 1031, 1033, 1025, 9530, 3367, 6764, 1027, 1042, 2015, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/_AnnotationHelperExpression.js
function (oInterface, oPathValue) { var oCondition = Expression.parameter(oInterface, oPathValue, 0, "Edm.Boolean"), oThen = Expression.parameter(oInterface, oPathValue, 1), oElse = Expression.parameter(oInterface, oPathValue, 2), sType = oThen.type, bWithType = oPathValue.withType; if (oThen.typ...
javascript
function (oInterface, oPathValue) { var oCondition = Expression.parameter(oInterface, oPathValue, 0, "Edm.Boolean"), oThen = Expression.parameter(oInterface, oPathValue, 1), oElse = Expression.parameter(oInterface, oPathValue, 2), sType = oThen.type, bWithType = oPathValue.withType; if (oThen.typ...
[ "function", "(", "oInterface", ",", "oPathValue", ")", "{", "var", "oCondition", "=", "Expression", ".", "parameter", "(", "oInterface", ",", "oPathValue", ",", "0", ",", "\"Edm.Boolean\"", ")", ",", "oThen", "=", "Expression", ".", "parameter", "(", "oInter...
Handling of "14.5.6 Expression edm:If". @param {sap.ui.core.util.XMLPreprocessor.IContext|sap.ui.model.Context} oInterface the callback interface related to the current formatter call @param {object} oPathValue path and value information pointing to the parameters array (see Expression object). The first parameter ele...
[ "Handling", "of", "14", ".", "5", ".", "6", "Expression", "edm", ":", "If", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_AnnotationHelperExpression.js#L236-L257
train
Returns an object with the type and value of the parameter
[ 30522, 3853, 1006, 1051, 18447, 2121, 12172, 1010, 6728, 8988, 10175, 5657, 1007, 1063, 13075, 1051, 8663, 20562, 1027, 3670, 1012, 16381, 1006, 1051, 18447, 2121, 12172, 1010, 6728, 8988, 10175, 5657, 1010, 1014, 1010, 1000, 3968, 2213, 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...
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/utils.js
getEntity
function getEntity(urls, entityId) { // Add xhtml11.dtd to prevent missing entity errors with XHTML files urls.push("resource:///res/dtd/xhtml11.dtd"); // Build a string of external entities var extEntities = ""; for (i = 0; i < urls.length; i++) { extEntities += '<!ENTITY % dtd' + i + ' SYSTEM "' + ...
javascript
function getEntity(urls, entityId) { // Add xhtml11.dtd to prevent missing entity errors with XHTML files urls.push("resource:///res/dtd/xhtml11.dtd"); // Build a string of external entities var extEntities = ""; for (i = 0; i < urls.length; i++) { extEntities += '<!ENTITY % dtd' + i + ' SYSTEM "' + ...
[ "function", "getEntity", "(", "urls", ",", "entityId", ")", "{", "// Add xhtml11.dtd to prevent missing entity errors with XHTML files", "urls", ".", "push", "(", "\"resource:///res/dtd/xhtml11.dtd\"", ")", ";", "// Build a string of external entities", "var", "extEntities", "=...
Returns the value of an individual entity in a DTD file. @param [string] urls Array of DTD urls. @param {string} entityId The ID of the entity to get the value of. @return The value of the requested entity @type string
[ "Returns", "the", "value", "of", "an", "individual", "entity", "in", "a", "DTD", "file", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/utils.js#L313-L335
train
Get the content of an entity
[ 30522, 3853, 2131, 4765, 3012, 1006, 24471, 4877, 1010, 9178, 3593, 1007, 1063, 1013, 1013, 5587, 1060, 11039, 19968, 14526, 1012, 26718, 2094, 2000, 4652, 4394, 9178, 10697, 2007, 1060, 11039, 19968, 6764, 24471, 4877, 1012, 5245, 1006, 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...
GeekyAnts/vue-native-core
dist/vue.runtime.common.js
createElement$1
function createElement$1 (tagName, vnode) { var elm = document.createElement(tagName); if (tagName !== 'select') { return elm } // false or null will remove the attribute but undefined will not if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) { elm.setAttribute('multiple'...
javascript
function createElement$1 (tagName, vnode) { var elm = document.createElement(tagName); if (tagName !== 'select') { return elm } // false or null will remove the attribute but undefined will not if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) { elm.setAttribute('multiple'...
[ "function", "createElement$1", "(", "tagName", ",", "vnode", ")", "{", "var", "elm", "=", "document", ".", "createElement", "(", "tagName", ")", ";", "if", "(", "tagName", "!==", "'select'", ")", "{", "return", "elm", "}", "// false or null will remove the att...
/*
[ "/", "*" ]
a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e
https://github.com/GeekyAnts/vue-native-core/blob/a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e/dist/vue.runtime.common.js#L4160-L4170
train
create element
[ 30522, 3853, 3443, 12260, 3672, 1002, 1015, 1006, 6415, 18442, 1010, 1058, 3630, 3207, 1007, 1063, 13075, 17709, 1027, 6254, 1012, 3443, 12260, 3672, 1006, 6415, 18442, 1007, 1025, 2065, 1006, 6415, 18442, 999, 1027, 1027, 1005, 7276, 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...
dequelabs/axe-core
lib/core/utils/respondable.js
createResponder
function createResponder(source, topic, uuid) { return function(message, keepalive, callback) { post(source, topic, message, uuid, keepalive, callback); }; }
javascript
function createResponder(source, topic, uuid) { return function(message, keepalive, callback) { post(source, topic, message, uuid, keepalive, callback); }; }
[ "function", "createResponder", "(", "source", ",", "topic", ",", "uuid", ")", "{", "return", "function", "(", "message", ",", "keepalive", ",", "callback", ")", "{", "post", "(", "source", ",", "topic", ",", "message", ",", "uuid", ",", "keepalive", ",",...
Helper closure to create a function that may be used to respond to a message @private @param {Window} source The window from which the message originated @param {String} topic The topic of the message @param {String} uuid The "unique" ID of the original message @return {Function} A function that may be invok...
[ "Helper", "closure", "to", "create", "a", "function", "that", "may", "be", "used", "to", "respond", "to", "a", "message" ]
727323c07980e2291575f545444d389fb942906f
https://github.com/dequelabs/axe-core/blob/727323c07980e2291575f545444d389fb942906f/lib/core/utils/respondable.js#L138-L142
train
Creates a function that will send a message to the topic
[ 30522, 3853, 3443, 6072, 26029, 4063, 1006, 3120, 1010, 8476, 1010, 1057, 21272, 1007, 1063, 2709, 3853, 1006, 4471, 1010, 2562, 11475, 3726, 1010, 2655, 5963, 1007, 1063, 2695, 1006, 3120, 1010, 8476, 1010, 4471, 1010, 1057, 21272, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
webtorrent/webtorrent
lib/server.js
encodeRFC5987
function encodeRFC5987 (str) { return encodeURIComponent(str) // Note that although RFC3986 reserves "!", RFC5987 does not, // so we do not need to escape it .replace(/['()]/g, escape) // i.e., %27 %28 %29 .replace(/\*/g, '%2A') // The following are not required for percent-encoding per RFC5987, ...
javascript
function encodeRFC5987 (str) { return encodeURIComponent(str) // Note that although RFC3986 reserves "!", RFC5987 does not, // so we do not need to escape it .replace(/['()]/g, escape) // i.e., %27 %28 %29 .replace(/\*/g, '%2A') // The following are not required for percent-encoding per RFC5987, ...
[ "function", "encodeRFC5987", "(", "str", ")", "{", "return", "encodeURIComponent", "(", "str", ")", "// Note that although RFC3986 reserves \"!\", RFC5987 does not,", "// so we do not need to escape it", ".", "replace", "(", "/", "['()]", "/", "g", ",", "escape", ")", "...
From https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
[ "From", "https", ":", "//", "developer", ".", "mozilla", ".", "org", "/", "en", "/", "docs", "/", "Web", "/", "JavaScript", "/", "Reference", "/", "Global_Objects", "/", "encodeURIComponent" ]
f8923a66a8b1178a412b067bc913e267025b3d57
https://github.com/webtorrent/webtorrent/blob/f8923a66a8b1178a412b067bc913e267025b3d57/lib/server.js#L225-L234
train
Encode a string as RFC5987
[ 30522, 3853, 4372, 16044, 12881, 2278, 28154, 2620, 2581, 1006, 2358, 2099, 1007, 1063, 2709, 4372, 16044, 9496, 9006, 29513, 3372, 1006, 2358, 2099, 1007, 1013, 1013, 3602, 2008, 2348, 14645, 23499, 20842, 8269, 1000, 999, 1000, 1010, 1464...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/utils/TokenUtils.js
_manageCache
function _manageCache(cm, line) { if (!cache || !cache.tokens || cache.line !== line || cache.cm !== cm) { // Cache is no longer matching -> Update var tokens = cm.getLineTokens(line, false); // Add empty beginning-of-line token for backwards compatibility tokens....
javascript
function _manageCache(cm, line) { if (!cache || !cache.tokens || cache.line !== line || cache.cm !== cm) { // Cache is no longer matching -> Update var tokens = cm.getLineTokens(line, false); // Add empty beginning-of-line token for backwards compatibility tokens....
[ "function", "_manageCache", "(", "cm", ",", "line", ")", "{", "if", "(", "!", "cache", "||", "!", "cache", ".", "tokens", "||", "cache", ".", "line", "!==", "line", "||", "cache", ".", "cm", "!==", "cm", ")", "{", "// Cache is no longer matching -> Updat...
/* Caches the tokens for the given editor/line if needed @param {!CodeMirror} cm @param {!number} line @return {Array.<Object>} (Cached) array of tokens
[ "/", "*", "Caches", "the", "tokens", "for", "the", "given", "editor", "/", "line", "if", "needed" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/utils/TokenUtils.js#L51-L67
train
manage cache
[ 30522, 3853, 1035, 6133, 3540, 5403, 1006, 4642, 1010, 2240, 1007, 1063, 2065, 1006, 999, 17053, 1064, 1064, 999, 17053, 1012, 19204, 2015, 1064, 1064, 17053, 1012, 2240, 999, 1027, 1027, 2240, 1064, 1064, 17053, 1012, 4642, 999, 1027, 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...
facebook/relay
packages/relay-runtime/store/RelayConcreteVariables.js
getFragmentVariables
function getFragmentVariables( fragment: ReaderFragment, rootVariables: Variables, argumentVariables: Variables, ): Variables { let variables; fragment.argumentDefinitions.forEach(definition => { if (argumentVariables.hasOwnProperty(definition.name)) { return; } variables = variables || {......
javascript
function getFragmentVariables( fragment: ReaderFragment, rootVariables: Variables, argumentVariables: Variables, ): Variables { let variables; fragment.argumentDefinitions.forEach(definition => { if (argumentVariables.hasOwnProperty(definition.name)) { return; } variables = variables || {......
[ "function", "getFragmentVariables", "(", "fragment", ":", "ReaderFragment", ",", "rootVariables", ":", "Variables", ",", "argumentVariables", ":", "Variables", ",", ")", ":", "Variables", "{", "let", "variables", ";", "fragment", ".", "argumentDefinitions", ".", "...
Determines the variables that are in scope for a fragment given the variables in scope at the root query as well as any arguments applied at the fragment spread via `@arguments`. Note that this is analagous to determining function arguments given a function call.
[ "Determines", "the", "variables", "that", "are", "in", "scope", "for", "a", "fragment", "given", "the", "variables", "in", "scope", "at", "the", "root", "query", "as", "well", "as", "any", "arguments", "applied", "at", "the", "fragment", "spread", "via", "...
7fb9be5182b9650637d7b92ead9a42713ac30aa4
https://github.com/facebook/relay/blob/7fb9be5182b9650637d7b92ead9a42713ac30aa4/packages/relay-runtime/store/RelayConcreteVariables.js#L26-L65
train
Get the variables of a ReaderFragment
[ 30522, 3853, 2131, 27843, 21693, 4765, 10755, 19210, 2015, 1006, 15778, 1024, 8068, 27843, 21693, 4765, 1010, 7117, 10755, 19210, 2015, 1024, 10857, 1010, 6685, 10755, 19210, 2015, 1024, 10857, 1010, 1007, 1024, 10857, 1063, 2292, 10857, 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...
SAP/openui5
src/sap.ui.support/src/sap/ui/support/supportRules/ExecutionScope.js
function (type) { var log = jQuery.sap.log.getLogEntries(), loggedObjects = [], elemIds; // Add logEntries that have support info object, // and that have the same type as the type provided log.forEach(function (logEntry) { if (!logEntry.supportInfo) { return; } if (...
javascript
function (type) { var log = jQuery.sap.log.getLogEntries(), loggedObjects = [], elemIds; // Add logEntries that have support info object, // and that have the same type as the type provided log.forEach(function (logEntry) { if (!logEntry.supportInfo) { return; } if (...
[ "function", "(", "type", ")", "{", "var", "log", "=", "jQuery", ".", "sap", ".", "log", ".", "getLogEntries", "(", ")", ",", "loggedObjects", "=", "[", "]", ",", "elemIds", ";", "// Add logEntries that have support info object,", "// and that have the same type as...
Gets the logged objects by object type @public @function @param {any} type Type of logged objects @returns {Array} Array of logged objects @alias sap.ui.support.ExecutionScope.getLoggedObjects
[ "Gets", "the", "logged", "objects", "by", "object", "type" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ExecutionScope.js#L298-L336
train
Returns an array of logged objects that match the type provided
[ 30522, 3853, 1006, 2828, 1007, 1063, 13075, 8833, 1027, 1046, 4226, 2854, 1012, 20066, 1012, 8833, 1012, 2131, 21197, 4765, 5134, 1006, 1007, 1010, 26618, 16429, 20614, 2015, 1027, 1031, 1033, 1010, 3449, 23238, 5104, 1025, 1013, 1013, 5587...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/JSUtils.js
_getFunctionsForFile
function _getFunctionsForFile(fileInfo) { var result = new $.Deferred(); _shouldGetFromCache(fileInfo) .done(function (useCache) { if (useCache) { // Return cached data. doc property is undefined since we hit the cache. // _getOffsets(...
javascript
function _getFunctionsForFile(fileInfo) { var result = new $.Deferred(); _shouldGetFromCache(fileInfo) .done(function (useCache) { if (useCache) { // Return cached data. doc property is undefined since we hit the cache. // _getOffsets(...
[ "function", "_getFunctionsForFile", "(", "fileInfo", ")", "{", "var", "result", "=", "new", "$", ".", "Deferred", "(", ")", ";", "_shouldGetFromCache", "(", "fileInfo", ")", ".", "done", "(", "function", "(", "useCache", ")", "{", "if", "(", "useCache", ...
Resolves with a record containing the Document or FileInfo and an Array of all function names with offsets for the specified file. Results may be cached. @param {FileInfo} fileInfo @return {$.Promise} A promise resolved with a document info object that contains a map of all function names from the document and each fun...
[ "Resolves", "with", "a", "record", "containing", "the", "Document", "or", "FileInfo", "and", "an", "Array", "of", "all", "function", "names", "with", "offsets", "for", "the", "specified", "file", ".", "Results", "may", "be", "cached", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/language/JSUtils.js#L389-L406
train
Get the functions for a file
[ 30522, 3853, 1035, 2131, 11263, 27989, 22747, 16347, 9463, 1006, 5371, 2378, 14876, 1007, 1063, 13075, 2765, 1027, 2047, 1002, 1012, 13366, 28849, 2094, 1006, 1007, 1025, 1035, 2323, 18150, 19699, 5358, 3540, 5403, 1006, 5371, 2378, 14876, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-redeclare.js
findVariablesInScope
function findVariablesInScope(scope) { for (const variable of scope.variables) { const [ declaration, ...extraDeclarations ] = iterateDeclarations(variable); if (extraDeclarations.length === 0) { con...
javascript
function findVariablesInScope(scope) { for (const variable of scope.variables) { const [ declaration, ...extraDeclarations ] = iterateDeclarations(variable); if (extraDeclarations.length === 0) { con...
[ "function", "findVariablesInScope", "(", "scope", ")", "{", "for", "(", "const", "variable", "of", "scope", ".", "variables", ")", "{", "const", "[", "declaration", ",", "...", "extraDeclarations", "]", "=", "iterateDeclarations", "(", "variable", ")", ";", ...
Find variables in a given scope and flag redeclared ones. @param {Scope} scope - An eslint-scope scope object. @returns {void} @private
[ "Find", "variables", "in", "a", "given", "scope", "and", "flag", "redeclared", "ones", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-redeclare.js#L93-L123
train
Find variables in a given scope.
[ 30522, 3853, 2424, 10755, 19210, 11493, 26127, 1006, 9531, 1007, 1063, 2005, 1006, 9530, 3367, 8023, 1997, 9531, 1012, 10857, 1007, 1063, 9530, 3367, 1031, 8170, 1010, 1012, 1012, 1012, 4469, 3207, 20464, 25879, 8496, 1033, 1027, 2009, 1684...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/colorSyntax.js
initUI
function initUI(editor, preset) { const name = 'colorSyntax'; const className = 'tui-color'; const i18n = editor.i18n; const toolbar = editor.getUI().getToolbar(); const {usageStatistics} = editor.options; editor.eventManager.addEventType('colorButtonClicked'); toolbar.insertItem(3, { type: 'button'...
javascript
function initUI(editor, preset) { const name = 'colorSyntax'; const className = 'tui-color'; const i18n = editor.i18n; const toolbar = editor.getUI().getToolbar(); const {usageStatistics} = editor.options; editor.eventManager.addEventType('colorButtonClicked'); toolbar.insertItem(3, { type: 'button'...
[ "function", "initUI", "(", "editor", ",", "preset", ")", "{", "const", "name", "=", "'colorSyntax'", ";", "const", "className", "=", "'tui-color'", ";", "const", "i18n", "=", "editor", ".", "i18n", ";", "const", "toolbar", "=", "editor", ".", "getUI", "(...
Initialize UI @param {object} editor - Editor instance @param {Array.<string>} preset - Preset for color palette @ignore
[ "Initialize", "UI" ]
e75ab08c2a7ab07d1143e318f7cde135c5e3002e
https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/extensions/colorSyntax.js#L145-L244
train
Initialize the UI
[ 30522, 3853, 1999, 4183, 10179, 1006, 3559, 1010, 3653, 13462, 1007, 1063, 9530, 3367, 2171, 1027, 1005, 6087, 6038, 2696, 2595, 1005, 1025, 9530, 3367, 2465, 18442, 1027, 1005, 10722, 2072, 1011, 3609, 1005, 1025, 9530, 3367, 1045, 15136, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
GeekyAnts/vue-native-core
packages/weex-vue-framework/index.js
genModuleGetter
function genModuleGetter (instanceId) { var instance = instances[instanceId]; return function (name) { var nativeModule = modules[name] || []; var output = {}; var loop = function ( methodName ) { output[methodName] = function () { var args = [], len = arguments.length; while ( len...
javascript
function genModuleGetter (instanceId) { var instance = instances[instanceId]; return function (name) { var nativeModule = modules[name] || []; var output = {}; var loop = function ( methodName ) { output[methodName] = function () { var args = [], len = arguments.length; while ( len...
[ "function", "genModuleGetter", "(", "instanceId", ")", "{", "var", "instance", "=", "instances", "[", "instanceId", "]", ";", "return", "function", "(", "name", ")", "{", "var", "nativeModule", "=", "modules", "[", "name", "]", "||", "[", "]", ";", "var"...
Generate native module getter. Each native module has several methods to call. And all the behaviors is instance-related. So this getter will return a set of methods which additionally send current instance id to native when called. Also the args will be normalized into "safe" value. For example function arg will be co...
[ "Generate", "native", "module", "getter", ".", "Each", "native", "module", "has", "several", "methods", "to", "call", ".", "And", "all", "the", "behaviors", "is", "instance", "-", "related", ".", "So", "this", "getter", "will", "return", "a", "set", "of", ...
a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e
https://github.com/GeekyAnts/vue-native-core/blob/a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e/packages/weex-vue-framework/index.js#L323-L343
train
Generate a getter function for a module
[ 30522, 3853, 8991, 5302, 8566, 23115, 7585, 2099, 1006, 6013, 3593, 1007, 1063, 13075, 6013, 1027, 12107, 1031, 6013, 3593, 1033, 1025, 2709, 3853, 1006, 2171, 1007, 1063, 13075, 3128, 5302, 8566, 2571, 1027, 14184, 1031, 2171, 1033, 1064, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/max-params.js
checkFunction
function checkFunction(node) { if (node.params.length > numParams) { context.report({ loc: astUtils.getFunctionHeadLoc(node, sourceCode), node, messageId: "exceed", data: { name: lodash.up...
javascript
function checkFunction(node) { if (node.params.length > numParams) { context.report({ loc: astUtils.getFunctionHeadLoc(node, sourceCode), node, messageId: "exceed", data: { name: lodash.up...
[ "function", "checkFunction", "(", "node", ")", "{", "if", "(", "node", ".", "params", ".", "length", ">", "numParams", ")", "{", "context", ".", "report", "(", "{", "loc", ":", "astUtils", ".", "getFunctionHeadLoc", "(", "node", ",", "sourceCode", ")", ...
Checks a function to see if it has too many parameters. @param {ASTNode} node The node to check. @returns {void} @private
[ "Checks", "a", "function", "to", "see", "if", "it", "has", "too", "many", "parameters", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/max-params.js#L81-L94
train
Check if the number of parameters of a function is too large
[ 30522, 3853, 4638, 11263, 27989, 1006, 13045, 1007, 30524, 5244, 1007, 1063, 6123, 1012, 3189, 1006, 1063, 8840, 2278, 1024, 2004, 8525, 3775, 4877, 1012, 2131, 11263, 27989, 4974, 4135, 2278, 1006, 13045, 1010, 3120, 16044, 1007, 1010, 130...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
necolas/react-native-web
packages/react-native-web/src/vendor/react-native/PanResponder/index.js
function (gestureState, touchHistory) { gestureState.numberActiveTouches = touchHistory.numberActiveTouches; gestureState.moveX = currentCentroidXOfTouchesChangedAfter(touchHistory, gestureState._accountsForMovesUpTo); gestureState.moveY = currentCentroidYOfTouchesChangedAfter(touchHistory, gestureState._ac...
javascript
function (gestureState, touchHistory) { gestureState.numberActiveTouches = touchHistory.numberActiveTouches; gestureState.moveX = currentCentroidXOfTouchesChangedAfter(touchHistory, gestureState._accountsForMovesUpTo); gestureState.moveY = currentCentroidYOfTouchesChangedAfter(touchHistory, gestureState._ac...
[ "function", "(", "gestureState", ",", "touchHistory", ")", "{", "gestureState", ".", "numberActiveTouches", "=", "touchHistory", ".", "numberActiveTouches", ";", "gestureState", ".", "moveX", "=", "currentCentroidXOfTouchesChangedAfter", "(", "touchHistory", ",", "gestu...
This is nuanced and is necessary. It is incorrect to continuously take all active *and* recently moved touches, find the centroid, and track how that result changes over time. Instead, we must take all recently moved touches, and calculate how the centroid has changed just for those recently moved touches, and append t...
[ "This", "is", "nuanced", "and", "is", "necessary", ".", "It", "is", "incorrect", "to", "continuously", "take", "all", "active", "*", "and", "*", "recently", "moved", "touches", "find", "the", "centroid", "and", "track", "how", "that", "result", "changes", ...
801937748b2f3c96284bee1881164ac0c62a9c6d
https://github.com/necolas/react-native-web/blob/801937748b2f3c96284bee1881164ac0c62a9c6d/packages/react-native-web/src/vendor/react-native/PanResponder/index.js#L219-L239
train
Update the gesture state based on the current touch history
[ 30522, 3853, 1006, 18327, 12259, 1010, 3543, 24158, 7062, 1007, 1063, 18327, 12259, 1012, 2193, 19620, 24826, 8376, 1027, 3543, 24158, 7062, 1012, 2193, 19620, 24826, 8376, 1025, 18327, 12259, 1012, 2693, 2595, 1027, 2783, 13013, 22943, 2595,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ksky521/nodeppt
packages/nodeppt-parser/lib/markdown/regexp/index.js
Plugin
function Plugin(regexp, replacer, id) { // return value should be a callable function // with strictly defined options passed by markdown-it var self = function(md, options) { self.options = options; self.init(md); }; // initialize plugin object self.__proto__ = Plugin.prototype...
javascript
function Plugin(regexp, replacer, id) { // return value should be a callable function // with strictly defined options passed by markdown-it var self = function(md, options) { self.options = options; self.init(md); }; // initialize plugin object self.__proto__ = Plugin.prototype...
[ "function", "Plugin", "(", "regexp", ",", "replacer", ",", "id", ")", "{", "// return value should be a callable function", "// with strictly defined options passed by markdown-it", "var", "self", "=", "function", "(", "md", ",", "options", ")", "{", "self", ".", "opt...
Constructor function
[ "Constructor", "function" ]
ca77e29ef818c08b0522b31e3925b073cf159b9c
https://github.com/ksky521/nodeppt/blob/ca77e29ef818c08b0522b31e3925b073cf159b9c/packages/nodeppt-parser/lib/markdown/regexp/index.js#L29-L54
train
The plugin that will be used to replace the regexp with the new options
[ 30522, 3853, 13354, 2378, 1006, 19723, 10288, 2361, 1010, 5672, 2099, 1010, 8909, 1007, 1063, 1013, 1013, 2709, 3643, 2323, 2022, 1037, 2655, 3085, 3853, 1013, 1013, 2007, 9975, 4225, 7047, 2979, 2011, 2928, 7698, 1011, 2009, 13075, 2969, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-node
packages/grpc-native-core/src/client_interceptors.js
function(metadata, current_listener) { // If there is a next call in the chain, run it. Otherwise do nothing. if (self.next_call) { // Wire together any listener provided with the next listener var listener = _getInterceptingListener(current_listener, next_listener); self.next_call.start(metad...
javascript
function(metadata, current_listener) { // If there is a next call in the chain, run it. Otherwise do nothing. if (self.next_call) { // Wire together any listener provided with the next listener var listener = _getInterceptingListener(current_listener, next_listener); self.next_call.start(metad...
[ "function", "(", "metadata", ",", "current_listener", ")", "{", "// If there is a next call in the chain, run it. Otherwise do nothing.", "if", "(", "self", ".", "next_call", ")", "{", "// Wire together any listener provided with the next listener", "var", "listener", "=", "_ge...
Build the next method in the interceptor chain
[ "Build", "the", "next", "method", "in", "the", "interceptor", "chain" ]
b36b285f4cdb334bbd48f74c12c13bec69961488
https://github.com/grpc/grpc-node/blob/b36b285f4cdb334bbd48f74c12c13bec69961488/packages/grpc-native-core/src/client_interceptors.js#L448-L455
train
Starts the next call in the chain
[ 30522, 3853, 1006, 27425, 1010, 2783, 1035, 19373, 1007, 1063, 1013, 1013, 2065, 2045, 2003, 1037, 2279, 2655, 1999, 1996, 4677, 1010, 2448, 2009, 1012, 4728, 2079, 2498, 1012, 2065, 1006, 2969, 1012, 2279, 1035, 2655, 1007, 1063, 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...
dequelabs/axe-core
lib/checks/label/label-content-name-mismatch.js
curateString
function curateString(str) { const noUnicodeStr = text.removeUnicode(str, { emoji: true, nonBmp: true, punctuations: true }); return text.sanitize(noUnicodeStr); }
javascript
function curateString(str) { const noUnicodeStr = text.removeUnicode(str, { emoji: true, nonBmp: true, punctuations: true }); return text.sanitize(noUnicodeStr); }
[ "function", "curateString", "(", "str", ")", "{", "const", "noUnicodeStr", "=", "text", ".", "removeUnicode", "(", "str", ",", "{", "emoji", ":", "true", ",", "nonBmp", ":", "true", ",", "punctuations", ":", "true", "}", ")", ";", "return", "text", "."...
Curate given text, by removing emoji's, punctuations, unicode and trim whitespace. @param {String} str given text to curate @returns {String}
[ "Curate", "given", "text", "by", "removing", "emoji", "s", "punctuations", "unicode", "and", "trim", "whitespace", "." ]
727323c07980e2291575f545444d389fb942906f
https://github.com/dequelabs/axe-core/blob/727323c07980e2291575f545444d389fb942906f/lib/checks/label/label-content-name-mismatch.js#L42-L49
train
Curates a string.
[ 30522, 3853, 27530, 3367, 4892, 1006, 2358, 2099, 1007, 1063, 9530, 3367, 15156, 11261, 6155, 16344, 1027, 3793, 1012, 6366, 19496, 16044, 1006, 2358, 2099, 1010, 1063, 7861, 29147, 2072, 1024, 2995, 1010, 2512, 25526, 2361, 1024, 2995, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/LocaleData.js
function(sStyle, sNumber, sPlural) { var sFormat; var oFormats; switch (sStyle) { case "long": oFormats = this._get("decimalFormat-long"); break; default: //short oFormats = this._get("decimalFormat-short"); break; } if (oFormats) { var sName = sNumber + "-" + sPlural; s...
javascript
function(sStyle, sNumber, sPlural) { var sFormat; var oFormats; switch (sStyle) { case "long": oFormats = this._get("decimalFormat-long"); break; default: //short oFormats = this._get("decimalFormat-short"); break; } if (oFormats) { var sName = sNumber + "-" + sPlural; s...
[ "function", "(", "sStyle", ",", "sNumber", ",", "sPlural", ")", "{", "var", "sFormat", ";", "var", "oFormats", ";", "switch", "(", "sStyle", ")", "{", "case", "\"long\"", ":", "oFormats", "=", "this", ".", "_get", "(", "\"decimalFormat-long\"", ")", ";",...
Returns the short decimal formats (like 1K, 1M....). @param {string} sStyle short or long @param {string} sNumber 1000, 10000 ... @param {string} sPlural one or other (if not exists other is used) @returns {string} decimal format @public @since 1.25.0
[ "Returns", "the", "short", "decimal", "formats", "(", "like", "1K", "1M", "....", ")", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/LocaleData.js#L1319-L1345
train
Returns the format for the given number and plural.
[ 30522, 3853, 1006, 7020, 27983, 1010, 1055, 19172, 5677, 1010, 11867, 7630, 7941, 1007, 1063, 13075, 16420, 2953, 18900, 1025, 13075, 1997, 2953, 18900, 2015, 1025, 6942, 1006, 7020, 27983, 1007, 1063, 2553, 1000, 2146, 1000, 1024, 1997, 29...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/util/naming.js
normalizePackageName
function normalizePackageName(name, prefix) { let normalizedName = name; /** * On Windows, name can come in with Windows slashes instead of Unix slashes. * Normalize to Unix first to avoid errors later on. * https://github.com/eslint/eslint/issues/5644 */ if (normalizedName.indexOf("\\"...
javascript
function normalizePackageName(name, prefix) { let normalizedName = name; /** * On Windows, name can come in with Windows slashes instead of Unix slashes. * Normalize to Unix first to avoid errors later on. * https://github.com/eslint/eslint/issues/5644 */ if (normalizedName.indexOf("\\"...
[ "function", "normalizePackageName", "(", "name", ",", "prefix", ")", "{", "let", "normalizedName", "=", "name", ";", "/**\n * On Windows, name can come in with Windows slashes instead of Unix slashes.\n * Normalize to Unix first to avoid errors later on.\n * https://github.com/...
Brings package name to correct format based on prefix @param {string} name The name of the package. @param {string} prefix Can be either "eslint-plugin", "eslint-config" or "eslint-formatter" @returns {string} Normalized name of the package @private
[ "Brings", "package", "name", "to", "correct", "format", "based", "on", "prefix" ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/util/naming.js#L25-L61
train
Normalize a package name
[ 30522, 3853, 3671, 4697, 23947, 4270, 18442, 1006, 2171, 1010, 17576, 1007, 1063, 2292, 3671, 3550, 18442, 1027, 2171, 1025, 1013, 1008, 1008, 1008, 2006, 3645, 1010, 2171, 2064, 2272, 1999, 2007, 3645, 18296, 2229, 2612, 1997, 19998, 18296...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/layout/layout.js
registerLayoutAPI
function registerLayoutAPI(module){ var PREFIX_REGEXP = /^((?:x|data)[:\-_])/i; var SPECIAL_CHARS_REGEXP = /([:\-_]+(.))/g; // NOTE: these are also defined in constants::MEDIA_PRIORITY and constants::MEDIA var BREAKPOINTS = ["", "xs", "gt-xs", "sm", "gt-sm", "md", "gt-md", "lg", "gt-lg", "xl", "pri...
javascript
function registerLayoutAPI(module){ var PREFIX_REGEXP = /^((?:x|data)[:\-_])/i; var SPECIAL_CHARS_REGEXP = /([:\-_]+(.))/g; // NOTE: these are also defined in constants::MEDIA_PRIORITY and constants::MEDIA var BREAKPOINTS = ["", "xs", "gt-xs", "sm", "gt-sm", "md", "gt-md", "lg", "gt-lg", "xl", "pri...
[ "function", "registerLayoutAPI", "(", "module", ")", "{", "var", "PREFIX_REGEXP", "=", "/", "^((?:x|data)[:\\-_])", "/", "i", ";", "var", "SPECIAL_CHARS_REGEXP", "=", "/", "([:\\-_]+(.))", "/", "g", ";", "// NOTE: these are also defined in constants::MEDIA_PRIORITY and co...
registerLayoutAPI() The original AngularJS Material Layout solution used attribute selectors and CSS. ```html <div layout="column"> My Content </div> ``` ```css [layout] { box-sizing: border-box; display:flex; } [layout=column] { flex-direction : column } ``` Use of attribute selectors creates significant performan...
[ "registerLayoutAPI", "()" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/services/layout/layout.js#L75-L164
train
Register Layout API
[ 30522, 3853, 4236, 8485, 5833, 9331, 2072, 1006, 11336, 1007, 1063, 13075, 17576, 1035, 19723, 10288, 2361, 1027, 1013, 1034, 1006, 1006, 1029, 1024, 1060, 1064, 2951, 1007, 1031, 1024, 1032, 1011, 1035, 1033, 1007, 1013, 1045, 1025, 13075,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
GitbookIO/gitbook
lib/plugins/listBlocks.js
listBlocks
function listBlocks(plugins) { return plugins .reverse() .reduce(function(result, plugin) { var blocks = plugin.getBlocks(); return result.merge(blocks); }, Immutable.Map()); }
javascript
function listBlocks(plugins) { return plugins .reverse() .reduce(function(result, plugin) { var blocks = plugin.getBlocks(); return result.merge(blocks); }, Immutable.Map()); }
[ "function", "listBlocks", "(", "plugins", ")", "{", "return", "plugins", ".", "reverse", "(", ")", ".", "reduce", "(", "function", "(", "result", ",", "plugin", ")", "{", "var", "blocks", "=", "plugin", ".", "getBlocks", "(", ")", ";", "return", "resul...
List blocks from a list of plugins @param {OrderedMap<String:Plugin>} @return {Map<String:TemplateBlock>}
[ "List", "blocks", "from", "a", "list", "of", "plugins" ]
6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4
https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/plugins/listBlocks.js#L9-L16
train
List all blocks in the plugin
[ 30522, 3853, 2862, 23467, 2015, 1006, 13354, 7076, 1007, 1063, 2709, 13354, 7076, 1012, 7901, 1006, 1007, 1012, 5547, 1006, 3853, 1006, 2765, 1010, 13354, 2378, 1007, 1063, 13075, 5991, 1027, 13354, 2378, 1012, 2131, 23467, 2015, 1006, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/angular
tools/gulp-tasks/cldr/extract.js
getDayPeriodRules
function getDayPeriodRules(localeData) { const dayPeriodRules = localeData.get(`supplemental/dayPeriodRuleSet/${localeData.attributes.language}`); const rules = {}; if (dayPeriodRules) { Object.keys(dayPeriodRules).forEach(key => { if (dayPeriodRules[key]._at) { rules[key] = dayPeriodRules[key]....
javascript
function getDayPeriodRules(localeData) { const dayPeriodRules = localeData.get(`supplemental/dayPeriodRuleSet/${localeData.attributes.language}`); const rules = {}; if (dayPeriodRules) { Object.keys(dayPeriodRules).forEach(key => { if (dayPeriodRules[key]._at) { rules[key] = dayPeriodRules[key]....
[ "function", "getDayPeriodRules", "(", "localeData", ")", "{", "const", "dayPeriodRules", "=", "localeData", ".", "get", "(", "`", "${", "localeData", ".", "attributes", ".", "language", "}", "`", ")", ";", "const", "rules", "=", "{", "}", ";", "if", "(",...
Returns day period rules for a locale @returns string[]
[ "Returns", "day", "period", "rules", "for", "a", "locale" ]
c016e2c4ecf7529f08fae4ca0f5c8b0170c6b51c
https://github.com/angular/angular/blob/c016e2c4ecf7529f08fae4ca0f5c8b0170c6b51c/tools/gulp-tasks/cldr/extract.js#L374-L388
train
Get day period rules
[ 30522, 3853, 2131, 10259, 4842, 3695, 13626, 16308, 1006, 2334, 11960, 2696, 1007, 1063, 9530, 3367, 2154, 4842, 3695, 13626, 16308, 1027, 2334, 11960, 2696, 1012, 2131, 1006, 1036, 27024, 1013, 2154, 4842, 3695, 13626, 16308, 3388, 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.documentation/src/sap/ui/documentation/sdk/controller/util/IndexWorker.js
fetchIndex
function fetchIndex() { return new Promise(function(resolve, reject) { var oIndex = oIndexCache["index"], oSerializedIndex; if (oIndex) { resolve(oIndex); return; } var req = new XMLHttpRequest(), onload = function (oEvent) { oSerializedIndex = oEvent.target.response || oEvent.t...
javascript
function fetchIndex() { return new Promise(function(resolve, reject) { var oIndex = oIndexCache["index"], oSerializedIndex; if (oIndex) { resolve(oIndex); return; } var req = new XMLHttpRequest(), onload = function (oEvent) { oSerializedIndex = oEvent.target.response || oEvent.t...
[ "function", "fetchIndex", "(", ")", "{", "return", "new", "Promise", "(", "function", "(", "resolve", ",", "reject", ")", "{", "var", "oIndex", "=", "oIndexCache", "[", "\"index\"", "]", ",", "oSerializedIndex", ";", "if", "(", "oIndex", ")", "{", "resol...
Obtains the index via network request or from cache @returns {Promise<any>}
[ "Obtains", "the", "index", "via", "network", "request", "or", "from", "cache" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/util/IndexWorker.js#L106-L149
train
Fetch the index from the server
[ 30522, 3853, 18584, 22254, 10288, 1006, 1007, 1063, 2709, 2047, 4872, 1006, 3853, 1006, 10663, 1010, 15454, 1007, 1063, 13075, 1051, 22254, 10288, 1027, 1051, 22254, 10288, 3540, 5403, 1031, 1000, 5950, 1000, 1033, 1010, 9808, 11610, 28931, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/sticky/sticky.js
add
function add(element, stickyClone) { stickyClone.addClass('md-sticky-clone'); var item = { element: element, clone: stickyClone }; self.items.push(item); $mdUtil.nextTick(function() { contentEl.prepend(item.clone); }); debouncedRefreshElements(); ...
javascript
function add(element, stickyClone) { stickyClone.addClass('md-sticky-clone'); var item = { element: element, clone: stickyClone }; self.items.push(item); $mdUtil.nextTick(function() { contentEl.prepend(item.clone); }); debouncedRefreshElements(); ...
[ "function", "add", "(", "element", ",", "stickyClone", ")", "{", "stickyClone", ".", "addClass", "(", "'md-sticky-clone'", ")", ";", "var", "item", "=", "{", "element", ":", "element", ",", "clone", ":", "stickyClone", "}", ";", "self", ".", "items", "."...
************* Public ************* Add an element and its sticky clone to this content's sticky collection
[ "*************", "Public", "*************", "Add", "an", "element", "and", "its", "sticky", "clone", "to", "this", "content", "s", "sticky", "collection" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/sticky/sticky.js#L133-L157
train
Adds a sticky clone to the content element
[ 30522, 3853, 5587, 1006, 5783, 1010, 15875, 20464, 5643, 1007, 1063, 15875, 20464, 5643, 1012, 5587, 26266, 1006, 1005, 9108, 1011, 15875, 1011, 17598, 1005, 1007, 1025, 13075, 8875, 1027, 1063, 5783, 1024, 5783, 1010, 17598, 1024, 15875, 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...
nhn/tui.editor
src/js/extensions/mark/mark.js
markExtension
function markExtension(editor) { const ml = new MarkerList(); const mm = new MarkerManager(ml); let wmh, mmh, vmh; editor.eventManager.addEventType('markerUpdated'); if (editor.isViewer()) { vmh = new ViewerMarkerHelper(editor.preview); } else { wmh = new WysiwygMarkerHelper(editor.getSquire()); ...
javascript
function markExtension(editor) { const ml = new MarkerList(); const mm = new MarkerManager(ml); let wmh, mmh, vmh; editor.eventManager.addEventType('markerUpdated'); if (editor.isViewer()) { vmh = new ViewerMarkerHelper(editor.preview); } else { wmh = new WysiwygMarkerHelper(editor.getSquire()); ...
[ "function", "markExtension", "(", "editor", ")", "{", "const", "ml", "=", "new", "MarkerList", "(", ")", ";", "const", "mm", "=", "new", "MarkerManager", "(", "ml", ")", ";", "let", "wmh", ",", "mmh", ",", "vmh", ";", "editor", ".", "eventManager", "...
mark extension @param {Editor} editor - editor instance @ignore
[ "mark", "extension" ]
e75ab08c2a7ab07d1143e318f7cde135c5e3002e
https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/extensions/mark/mark.js#L23-L247
train
Mark extension for current situation
[ 30522, 3853, 2928, 10288, 29048, 1006, 3559, 1007, 1063, 9530, 3367, 19875, 1027, 2047, 12115, 9863, 1006, 1007, 1025, 9530, 3367, 3461, 1027, 2047, 12115, 24805, 4590, 1006, 19875, 1007, 1025, 2292, 1059, 2213, 2232, 1010, 3461, 2232, 1010...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
transloadit/uppy
packages/@uppy/core/src/Plugin.js
debounce
function debounce (fn) { let calling = null let latestArgs = null return (...args) => { latestArgs = args if (!calling) { calling = Promise.resolve().then(() => { calling = null // At this point `args` may be different from the most // recent state, if multiple calls happened...
javascript
function debounce (fn) { let calling = null let latestArgs = null return (...args) => { latestArgs = args if (!calling) { calling = Promise.resolve().then(() => { calling = null // At this point `args` may be different from the most // recent state, if multiple calls happened...
[ "function", "debounce", "(", "fn", ")", "{", "let", "calling", "=", "null", "let", "latestArgs", "=", "null", "return", "(", "...", "args", ")", "=>", "{", "latestArgs", "=", "args", "if", "(", "!", "calling", ")", "{", "calling", "=", "Promise", "."...
Defer a frequent call to the microtask queue.
[ "Defer", "a", "frequent", "call", "to", "the", "microtask", "queue", "." ]
7ae18bf992d544a64da998f033258ec09a3de275
https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/packages/@uppy/core/src/Plugin.js#L7-L24
train
Debounce a function to call the task with the latest arguments
[ 30522, 3853, 2139, 5092, 17457, 1006, 1042, 2078, 1007, 1063, 2292, 4214, 1027, 19701, 2292, 6745, 2906, 5620, 1027, 19701, 2709, 1006, 1012, 1012, 1012, 12098, 5620, 1007, 1027, 1028, 1063, 6745, 2906, 5620, 1027, 12098, 5620, 2065, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/callback-return.js
isCallback
function isCallback(node) { return containsOnlyIdentifiers(node.callee) && callbacks.indexOf(sourceCode.getText(node.callee)) > -1; }
javascript
function isCallback(node) { return containsOnlyIdentifiers(node.callee) && callbacks.indexOf(sourceCode.getText(node.callee)) > -1; }
[ "function", "isCallback", "(", "node", ")", "{", "return", "containsOnlyIdentifiers", "(", "node", ".", "callee", ")", "&&", "callbacks", ".", "indexOf", "(", "sourceCode", ".", "getText", "(", "node", ".", "callee", ")", ")", ">", "-", "1", ";", "}" ]
Check to see if a CallExpression is in our callback list. @param {ASTNode} node The node to check against our callback names list. @returns {boolean} Whether or not this function matches our callback name.
[ "Check", "to", "see", "if", "a", "CallExpression", "is", "in", "our", "callback", "list", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/callback-return.js#L84-L86
train
Checks whether a node is a callback.
[ 30522, 3853, 2003, 9289, 20850, 8684, 1006, 13045, 1007, 1063, 2709, 3397, 2239, 2135, 5178, 16778, 8873, 2545, 1006, 13045, 1012, 2655, 4402, 1007, 1004, 1004, 2655, 12221, 1012, 5950, 11253, 1006, 3120, 16044, 1012, 2131, 18209, 1006, 130...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
release.js
checkoutVersionBranch
function checkoutVersionBranch () { exec(`git branch -q -D release/${newVersion}`); exec(`git checkout -q -b release/${newVersion}`); abortCmds.push('git checkout master'); abortCmds.push(`git branch -D release/${newVersion}`); }
javascript
function checkoutVersionBranch () { exec(`git branch -q -D release/${newVersion}`); exec(`git checkout -q -b release/${newVersion}`); abortCmds.push('git checkout master'); abortCmds.push(`git branch -D release/${newVersion}`); }
[ "function", "checkoutVersionBranch", "(", ")", "{", "exec", "(", "`", "${", "newVersion", "}", "`", ")", ";", "exec", "(", "`", "${", "newVersion", "}", "`", ")", ";", "abortCmds", ".", "push", "(", "'git checkout master'", ")", ";", "abortCmds", ".", ...
creates the version branch and adds abort steps
[ "creates", "the", "version", "branch", "and", "adds", "abort", "steps" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/release.js#L77-L82
train
Checkout the version branch
[ 30522, 3853, 4638, 5833, 27774, 10024, 12680, 1006, 1007, 1063, 4654, 8586, 1006, 1036, 21025, 2102, 3589, 1011, 1053, 1011, 1040, 2713, 1013, 1002, 1063, 2047, 27774, 1065, 1036, 1007, 1025, 4654, 8586, 1006, 1036, 21025, 2102, 4638, 5833,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-echarts
src/util/graphic.js
applyDefaultTextStyle
function applyDefaultTextStyle(textStyle) { var opt = textStyle.insideRollbackOpt; // Only `insideRollbackOpt` created (in `setTextStyleCommon`), // applyDefaultTextStyle works. if (!opt || textStyle.textFill != null) { return; } var useInsideStyle = opt.useInsideStyle; var textPos...
javascript
function applyDefaultTextStyle(textStyle) { var opt = textStyle.insideRollbackOpt; // Only `insideRollbackOpt` created (in `setTextStyleCommon`), // applyDefaultTextStyle works. if (!opt || textStyle.textFill != null) { return; } var useInsideStyle = opt.useInsideStyle; var textPos...
[ "function", "applyDefaultTextStyle", "(", "textStyle", ")", "{", "var", "opt", "=", "textStyle", ".", "insideRollbackOpt", ";", "// Only `insideRollbackOpt` created (in `setTextStyleCommon`),", "// applyDefaultTextStyle works.", "if", "(", "!", "opt", "||", "textStyle", "."...
Give some default value to the input `textStyle` object, based on the current settings in this `textStyle` object. The Scenario: when text position is `inside` and `textFill` is not specified, we show text border by default for better view. But it should be considered that text position might be changed when hovering ...
[ "Give", "some", "default", "value", "to", "the", "input", "textStyle", "object", "based", "on", "the", "current", "settings", "in", "this", "textStyle", "object", "." ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/util/graphic.js#L922-L967
train
Apply default text style
[ 30522, 3853, 6611, 3207, 7011, 11314, 18209, 21756, 2571, 1006, 6981, 27983, 1007, 1063, 13075, 23569, 1027, 6981, 27983, 1012, 25297, 14511, 5963, 7361, 2102, 1025, 1013, 1013, 2069, 1036, 25297, 14511, 5963, 7361, 2102, 1036, 2580, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
function( event ) { event.type = event.data; jQuery.event.handle.apply( this, arguments ); }
javascript
function( event ) { event.type = event.data; jQuery.event.handle.apply( this, arguments ); }
[ "function", "(", "event", ")", "{", "event", ".", "type", "=", "event", ".", "data", ";", "jQuery", ".", "event", ".", "handle", ".", "apply", "(", "this", ",", "arguments", ")", ";", "}" ]
Checks if an event happened on an element within another element Used in jQuery.event.special.mouseenter and mouseleave handlers
[ "Checks", "if", "an", "event", "happened", "on", "an", "element", "within", "another", "element", "Used", "in", "jQuery", ".", "event", ".", "special", ".", "mouseenter", "and", "mouseleave", "handlers" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L4726-L4729
train
Handle the event from the page
[ 30522, 3853, 1006, 2724, 1007, 1063, 2724, 1012, 2828, 1027, 2724, 1012, 2951, 1025, 1046, 4226, 2854, 1012, 2724, 1012, 5047, 1012, 6611, 1006, 2023, 1010, 9918, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/StateHandler.js
_write
function _write(filePath, json) { var result = $.Deferred(), _file = FileSystem.getFileForPath(filePath); if (_file) { var content = JSON.stringify(json); FileUtils.writeText(_file, content, true) .done(function () { result.resolv...
javascript
function _write(filePath, json) { var result = $.Deferred(), _file = FileSystem.getFileForPath(filePath); if (_file) { var content = JSON.stringify(json); FileUtils.writeText(_file, content, true) .done(function () { result.resolv...
[ "function", "_write", "(", "filePath", ",", "json", ")", "{", "var", "result", "=", "$", ".", "Deferred", "(", ")", ",", "_file", "=", "FileSystem", ".", "getFileForPath", "(", "filePath", ")", ";", "if", "(", "_file", ")", "{", "var", "content", "="...
Performs the write of JSON object to a file. @param {string} filepath - path to JSON file @param {object} json - JSON object to write @returns {$.Deferred} - a jquery deferred promise, that is resolved with the write success or failure
[ "Performs", "the", "write", "of", "JSON", "object", "to", "a", "file", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/AutoUpdate/StateHandler.js#L169-L189
train
write json to file
[ 30522, 3853, 1035, 4339, 1006, 5371, 15069, 1010, 1046, 3385, 1007, 1063, 13075, 2765, 1027, 1002, 1012, 13366, 28849, 2094, 1006, 1007, 1010, 1035, 5371, 1027, 6764, 27268, 6633, 1012, 2131, 8873, 2571, 29278, 15069, 1006, 5371, 15069, 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...
mdn/browser-compat-data
scripts/render.js
writeTableHead
function writeTableHead(browserPlatformType) { let browserNameKeys = Object.keys(browsers[browserPlatformType]); let output = ''; if (browserPlatformType === 'webextensions') { output = '<table class="webext-summary-compat-table"><thead><tr><th style="width: 40%"></th>' let browserColumnWidth = 60/browser...
javascript
function writeTableHead(browserPlatformType) { let browserNameKeys = Object.keys(browsers[browserPlatformType]); let output = ''; if (browserPlatformType === 'webextensions') { output = '<table class="webext-summary-compat-table"><thead><tr><th style="width: 40%"></th>' let browserColumnWidth = 60/browser...
[ "function", "writeTableHead", "(", "browserPlatformType", ")", "{", "let", "browserNameKeys", "=", "Object", ".", "keys", "(", "browsers", "[", "browserPlatformType", "]", ")", ";", "let", "output", "=", "''", ";", "if", "(", "browserPlatformType", "===", "'we...
/* Write the table header. `browserPlatformType` is either "mobile", "desktop" or "webextensions"
[ "/", "*", "Write", "the", "table", "header", "." ]
6ca59b232e8fe080f441c7cb625d2bfd1a6fbe2b
https://github.com/mdn/browser-compat-data/blob/6ca59b232e8fe080f441c7cb625d2bfd1a6fbe2b/scripts/render.js#L55-L74
train
Write table head
[ 30522, 3853, 4339, 10880, 4974, 1006, 16602, 24759, 4017, 14192, 13874, 1007, 1063, 2292, 16602, 18442, 14839, 2015, 1027, 4874, 1012, 6309, 1006, 16602, 2015, 1031, 16602, 24759, 4017, 14192, 13874, 1033, 1007, 1025, 2292, 6434, 1027, 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...
SAP/openui5
src/sap.ui.core/src/sap/ui/base/BindingParser.js
resolveEvents
function resolveEvents(oEvents) { if ( oEvents != null && typeof oEvents === 'object' ) { for ( var sName in oEvents ) { resolveRef(oEvents, sName); } } }
javascript
function resolveEvents(oEvents) { if ( oEvents != null && typeof oEvents === 'object' ) { for ( var sName in oEvents ) { resolveRef(oEvents, sName); } } }
[ "function", "resolveEvents", "(", "oEvents", ")", "{", "if", "(", "oEvents", "!=", "null", "&&", "typeof", "oEvents", "===", "'object'", ")", "{", "for", "(", "var", "sName", "in", "oEvents", ")", "{", "resolveRef", "(", "oEvents", ",", "sName", ")", "...
/* Resolves a map of event listeners, keyed by the event name. Each listener can be the name of a single function that will be resolved in the given context (oEnv).
[ "/", "*", "Resolves", "a", "map", "of", "event", "listeners", "keyed", "by", "the", "event", "name", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/base/BindingParser.js#L232-L238
train
Resolves the given events object.
[ 30522, 3853, 10663, 18697, 7666, 1006, 1051, 18697, 7666, 1007, 1063, 2065, 1006, 1051, 18697, 7666, 999, 1027, 19701, 1004, 1004, 2828, 11253, 1051, 18697, 7666, 1027, 1027, 1027, 1005, 4874, 1005, 1007, 1063, 2005, 1006, 13075, 1055, 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...
eslint/eslint
lib/code-path-analysis/code-path-analyzer.js
isForkingByTrueOrFalse
function isForkingByTrueOrFalse(node) { const parent = node.parent; switch (parent.type) { case "ConditionalExpression": case "IfStatement": case "WhileStatement": case "DoWhileStatement": case "ForStatement": return parent.test === node; case "Logic...
javascript
function isForkingByTrueOrFalse(node) { const parent = node.parent; switch (parent.type) { case "ConditionalExpression": case "IfStatement": case "WhileStatement": case "DoWhileStatement": case "ForStatement": return parent.test === node; case "Logic...
[ "function", "isForkingByTrueOrFalse", "(", "node", ")", "{", "const", "parent", "=", "node", ".", "parent", ";", "switch", "(", "parent", ".", "type", ")", "{", "case", "\"ConditionalExpression\"", ":", "case", "\"IfStatement\"", ":", "case", "\"WhileStatement\"...
Checks whether or not a given logical expression node goes different path between the `true` case and the `false` case. @param {ASTNode} node - A node to check. @returns {boolean} `true` if the node is a test of a choice statement.
[ "Checks", "whether", "or", "not", "a", "given", "logical", "expression", "node", "goes", "different", "path", "between", "the", "true", "case", "and", "the", "false", "case", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/code-path-analysis/code-path-analyzer.js#L51-L68
train
Check if a node is aorking by true or false
[ 30522, 3853, 2003, 29278, 6834, 3762, 16344, 5657, 16347, 9777, 2063, 1006, 13045, 1007, 1063, 9530, 3367, 6687, 1027, 13045, 1012, 6687, 1025, 6942, 1006, 6687, 1012, 2828, 1007, 1063, 2553, 1000, 18462, 10288, 20110, 3258, 1000, 1024, 255...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/_V2Requestor.js
visitNode
function visitNode(oNode) { if (oNode) { if (oNode.id === "VALUE" && oNode.ambiguous) { error(oNode, "ambiguous type for the literal"); } visitNode(oNode.left); visitNode(oNode.right); if (oNode.parameters) { if (oNode.value === "contains") { oNode.value = "substringof"; oNo...
javascript
function visitNode(oNode) { if (oNode) { if (oNode.id === "VALUE" && oNode.ambiguous) { error(oNode, "ambiguous type for the literal"); } visitNode(oNode.left); visitNode(oNode.right); if (oNode.parameters) { if (oNode.value === "contains") { oNode.value = "substringof"; oNo...
[ "function", "visitNode", "(", "oNode", ")", "{", "if", "(", "oNode", ")", "{", "if", "(", "oNode", ".", "id", "===", "\"VALUE\"", "&&", "oNode", ".", "ambiguous", ")", "{", "error", "(", "oNode", ",", "\"ambiguous type for the literal\"", ")", ";", "}", ...
/* Visits a node in the syntax recursively. @param {object} oNode A node
[ "/", "*", "Visits", "a", "node", "in", "the", "syntax", "recursively", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_V2Requestor.js#L254-L279
train
Visit a node
[ 30522, 3853, 3942, 3630, 3207, 1006, 21058, 3207, 1007, 1063, 2065, 1006, 21058, 3207, 1007, 1063, 2065, 1006, 21058, 3207, 1012, 8909, 1027, 1027, 1027, 1000, 3643, 1000, 1004, 1004, 21058, 3207, 1012, 20080, 1007, 1063, 7561, 1006, 21058,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/padding-line-between-statements.js
getPaddingType
function getPaddingType(prevNode, nextNode) { for (let i = configureList.length - 1; i >= 0; --i) { const configure = configureList[i]; const matched = match(prevNode, configure.prev) && match(nextNode, configure.next); ...
javascript
function getPaddingType(prevNode, nextNode) { for (let i = configureList.length - 1; i >= 0; --i) { const configure = configureList[i]; const matched = match(prevNode, configure.prev) && match(nextNode, configure.next); ...
[ "function", "getPaddingType", "(", "prevNode", ",", "nextNode", ")", "{", "for", "(", "let", "i", "=", "configureList", ".", "length", "-", "1", ";", "i", ">=", "0", ";", "--", "i", ")", "{", "const", "configure", "=", "configureList", "[", "i", "]",...
Finds the last matched configure from configureList. @param {ASTNode} prevNode The previous statement to match. @param {ASTNode} nextNode The current statement to match. @returns {Object} The tester of the last matched configure. @private
[ "Finds", "the", "last", "matched", "configure", "from", "configureList", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/padding-line-between-statements.js#L540-L552
train
Get padding type
[ 30522, 3853, 2131, 15455, 4667, 13874, 1006, 3653, 16022, 10244, 1010, 2279, 3630, 3207, 1007, 1063, 2005, 1006, 2292, 1045, 1027, 9530, 8873, 27390, 29282, 2102, 1012, 3091, 1011, 1015, 1025, 1045, 1028, 1027, 1014, 1025, 1011, 1011, 1045,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
TryGhost/Ghost
core/server/models/post.js
formatsToJSON
function formatsToJSON(attrs, options) { var defaultFormats = ['html'], formatsToKeep = options.formats || defaultFormats; // Iterate over all known formats, and if they are not in the keep list, remove them _.each(Post.allowedFormats, function (format) { if (formatsToKe...
javascript
function formatsToJSON(attrs, options) { var defaultFormats = ['html'], formatsToKeep = options.formats || defaultFormats; // Iterate over all known formats, and if they are not in the keep list, remove them _.each(Post.allowedFormats, function (format) { if (formatsToKe...
[ "function", "formatsToJSON", "(", "attrs", ",", "options", ")", "{", "var", "defaultFormats", "=", "[", "'html'", "]", ",", "formatsToKeep", "=", "options", ".", "formats", "||", "defaultFormats", ";", "// Iterate over all known formats, and if they are not in the keep ...
If the `formats` option is not used, we return `html` be default. Otherwise we return what is requested e.g. `?formats=mobiledoc,plaintext`
[ "If", "the", "formats", "option", "is", "not", "used", "we", "return", "html", "be", "default", ".", "Otherwise", "we", "return", "what", "is", "requested", "e", ".", "g", ".", "?formats", "=", "mobiledoc", "plaintext" ]
bb7bb55cf3e60af99ebbc56099928827b58461bc
https://github.com/TryGhost/Ghost/blob/bb7bb55cf3e60af99ebbc56099928827b58461bc/core/server/models/post.js#L552-L564
train
Convert the formats to JSON
[ 30522, 3853, 11630, 3406, 22578, 2239, 1006, 2012, 16344, 2015, 1010, 7047, 1007, 1063, 13075, 12398, 14192, 11149, 1027, 1031, 1005, 16129, 1005, 1033, 1010, 11630, 18715, 4402, 2361, 1027, 7047, 1012, 11630, 1064, 1064, 12398, 14192, 11149,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/view/MainViewManager.js
setActivePaneId
function setActivePaneId(newPaneId) { if (!_isSpecialPaneId(newPaneId) && newPaneId !== _activePaneId) { var oldPaneId = _activePaneId, oldPane = _getPane(ACTIVE_PANE), newPane = _getPane(newPaneId); if (!newPane) { throw new Error("invali...
javascript
function setActivePaneId(newPaneId) { if (!_isSpecialPaneId(newPaneId) && newPaneId !== _activePaneId) { var oldPaneId = _activePaneId, oldPane = _getPane(ACTIVE_PANE), newPane = _getPane(newPaneId); if (!newPane) { throw new Error("invali...
[ "function", "setActivePaneId", "(", "newPaneId", ")", "{", "if", "(", "!", "_isSpecialPaneId", "(", "newPaneId", ")", "&&", "newPaneId", "!==", "_activePaneId", ")", "{", "var", "oldPaneId", "=", "_activePaneId", ",", "oldPane", "=", "_getPane", "(", "ACTIVE_P...
Switch active pane to the specified pane id (or ACTIVE_PANE/ALL_PANES, in which case this call does nothing). @param {!string} paneId - the id of the pane to activate
[ "Switch", "active", "pane", "to", "the", "specified", "pane", "id", "(", "or", "ACTIVE_PANE", "/", "ALL_PANES", "in", "which", "case", "this", "call", "does", "nothing", ")", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/view/MainViewManager.js#L382-L403
train
setActivePaneId - Set active pane id
[ 30522, 3853, 2275, 19620, 9739, 7416, 2094, 1006, 2047, 9739, 7416, 2094, 1007, 1063, 2065, 1006, 999, 1035, 26354, 5051, 13247, 9739, 7416, 2094, 1006, 2047, 9739, 7416, 2094, 1007, 1004, 1004, 2047, 9739, 7416, 2094, 999, 1027, 1027, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.table/src/sap/ui/table/TablePointerExtension.js
function(oTable, bForward) { if (oTable._mTimeouts.horizontalReorderScrollTimerId) { window.clearTimeout(oTable._mTimeouts.horizontalReorderScrollTimerId); oTable._mTimeouts.horizontalReorderScrollTimerId = null; } if (oTable._bReorderScroll) { var iStep = bForward ? 30 : -30; if (oTable._bRtlM...
javascript
function(oTable, bForward) { if (oTable._mTimeouts.horizontalReorderScrollTimerId) { window.clearTimeout(oTable._mTimeouts.horizontalReorderScrollTimerId); oTable._mTimeouts.horizontalReorderScrollTimerId = null; } if (oTable._bReorderScroll) { var iStep = bForward ? 30 : -30; if (oTable._bRtlM...
[ "function", "(", "oTable", ",", "bForward", ")", "{", "if", "(", "oTable", ".", "_mTimeouts", ".", "horizontalReorderScrollTimerId", ")", "{", "window", ".", "clearTimeout", "(", "oTable", ".", "_mTimeouts", ".", "horizontalReorderScrollTimerId", ")", ";", "oTab...
/* Starts or continues stepwise horizontal scrolling until oTable._bReorderScroll is false.
[ "/", "*", "Starts", "or", "continues", "stepwise", "horizontal", "scrolling", "until", "oTable", ".", "_bReorderScroll", "is", "false", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TablePointerExtension.js#L645-L660
train
Sets the scrolling behavior of the table.
[ 30522, 3853, 1006, 27178, 3085, 1010, 28939, 2953, 7652, 1007, 1063, 2065, 1006, 27178, 3085, 1012, 1035, 11047, 14428, 12166, 1012, 9876, 2890, 8551, 2545, 26775, 14511, 7292, 14615, 1007, 1063, 3332, 1012, 3154, 7292, 5833, 1006, 27178, 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...
dcloudio/mui
examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js
function (elem) { var result = null; try { result = this.handler(elem); } catch (e) { if (e.sourceURL) { Strophe.fatal("error: " + this.handler + " " + e.sourceURL + ":" + e.line + " ...
javascript
function (elem) { var result = null; try { result = this.handler(elem); } catch (e) { if (e.sourceURL) { Strophe.fatal("error: " + this.handler + " " + e.sourceURL + ":" + e.line + " ...
[ "function", "(", "elem", ")", "{", "var", "result", "=", "null", ";", "try", "{", "result", "=", "this", ".", "handler", "(", "elem", ")", ";", "}", "catch", "(", "e", ")", "{", "if", "(", "e", ".", "sourceURL", ")", "{", "Strophe", ".", "fatal...
PrivateFunction: run Run the callback on a matching stanza. Parameters: (XMLElement) elem - The DOM element that triggered the Strophe.Handler. Returns: A boolean indicating if the handler should remain active.
[ "PrivateFunction", ":", "run", "Run", "the", "callback", "on", "a", "matching", "stanza", "." ]
ff74c90a1671a552f3604b1288bf38a4126312d0
https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js#L1885-L1911
train
Returns the next page of the page
[ 30522, 3853, 1006, 3449, 6633, 1007, 1063, 13075, 2765, 1027, 19701, 1025, 3046, 1063, 2765, 1027, 2023, 1012, 28213, 1006, 3449, 6633, 1007, 1025, 1065, 4608, 1006, 1041, 1007, 1063, 2065, 1006, 1041, 1012, 3120, 3126, 2140, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.fl/src/sap/ui/fl/Utils.js
function (oControl) { var oComponent = null; var sComponentId = null; // determine UI5 component out of given control if (oControl) { sComponentId = Utils._getComponentIdForControl(oControl); if (sComponentId) { oComponent = Utils._getComponent(sComponentId); } } return oComponent; ...
javascript
function (oControl) { var oComponent = null; var sComponentId = null; // determine UI5 component out of given control if (oControl) { sComponentId = Utils._getComponentIdForControl(oControl); if (sComponentId) { oComponent = Utils._getComponent(sComponentId); } } return oComponent; ...
[ "function", "(", "oControl", ")", "{", "var", "oComponent", "=", "null", ";", "var", "sComponentId", "=", "null", ";", "// determine UI5 component out of given control", "if", "(", "oControl", ")", "{", "sComponentId", "=", "Utils", ".", "_getComponentIdForControl",...
Returns the Component that belongs to given control. If the control has no component, it walks up the control tree in order to find a control having one. @param {sap.ui.base.ManagedObject} oControl - Managed object instance @returns {sap.ui.core.Component|null} found component @private
[ "Returns", "the", "Component", "that", "belongs", "to", "given", "control", ".", "If", "the", "control", "has", "no", "component", "it", "walks", "up", "the", "control", "tree", "in", "order", "to", "find", "a", "control", "having", "one", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/Utils.js#L558-L571
train
Returns the UI5 component of the given control
[ 30522, 3853, 1006, 1051, 8663, 13181, 2140, 1007, 1063, 13075, 1051, 9006, 29513, 3372, 1027, 19701, 1025, 13075, 8040, 25377, 5643, 16778, 2094, 1027, 19701, 1025, 1013, 1013, 5646, 21318, 2629, 6922, 2041, 1997, 2445, 2491, 2065, 1006, 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...
babel/babel
packages/babel-standalone/src/transformScriptTags.js
load
function load(url, successCallback, errorCallback) { const xhr = new XMLHttpRequest(); // async, however scripts will be executed in the order they are in the // DOM to mirror normal script loading. xhr.open("GET", url, true); if ("overrideMimeType" in xhr) { xhr.overrideMimeType("text/plain"); } xhr...
javascript
function load(url, successCallback, errorCallback) { const xhr = new XMLHttpRequest(); // async, however scripts will be executed in the order they are in the // DOM to mirror normal script loading. xhr.open("GET", url, true); if ("overrideMimeType" in xhr) { xhr.overrideMimeType("text/plain"); } xhr...
[ "function", "load", "(", "url", ",", "successCallback", ",", "errorCallback", ")", "{", "const", "xhr", "=", "new", "XMLHttpRequest", "(", ")", ";", "// async, however scripts will be executed in the order they are in the", "// DOM to mirror normal script loading.", "xhr", ...
Load script from the provided url and pass the content to the callback.
[ "Load", "script", "from", "the", "provided", "url", "and", "pass", "the", "content", "to", "the", "callback", "." ]
1969e6b6aa7d90be3fbb3aca98ea96849656a55a
https://github.com/babel/babel/blob/1969e6b6aa7d90be3fbb3aca98ea96849656a55a/packages/babel-standalone/src/transformScriptTags.js#L64-L84
train
Load a file
[ 30522, 3853, 7170, 1006, 24471, 2140, 1010, 3112, 9289, 20850, 8684, 1010, 7561, 9289, 20850, 8684, 1007, 1063, 9530, 3367, 1060, 8093, 1027, 2047, 20950, 11039, 25856, 2890, 15500, 1006, 1007, 1025, 1013, 1013, 2004, 6038, 2278, 1010, 2174...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
deleteCurrentLines
function deleteCurrentLines(editor) { editor = editor || EditorManager.getFocusedEditor(); if (!editor) { return; } // Walk the selections, calculating the deletion edits we need to do as we go; // document.doMultipleEdits() will take care of adjusting the edit locat...
javascript
function deleteCurrentLines(editor) { editor = editor || EditorManager.getFocusedEditor(); if (!editor) { return; } // Walk the selections, calculating the deletion edits we need to do as we go; // document.doMultipleEdits() will take care of adjusting the edit locat...
[ "function", "deleteCurrentLines", "(", "editor", ")", "{", "editor", "=", "editor", "||", "EditorManager", ".", "getFocusedEditor", "(", ")", ";", "if", "(", "!", "editor", ")", "{", "return", ";", "}", "// Walk the selections, calculating the deletion edits we need...
Deletes the current line if there is no selection or the lines for the selection (removing the end of line too)
[ "Deletes", "the", "current", "line", "if", "there", "is", "no", "selection", "or", "the", "lines", "for", "the", "selection", "(", "removing", "the", "end", "of", "line", "too", ")" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/editor/EditorCommandHandlers.js#L781-L818
train
Delete the current lines
[ 30522, 3853, 3972, 12870, 10841, 14343, 3372, 12735, 1006, 3559, 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, 1013...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/document/DocumentManager.js
getWorkingSet
function getWorkingSet() { DeprecationWarning.deprecationWarning("Use MainViewManager.getWorkingSet() instead of DocumentManager.getWorkingSet()", true); return MainViewManager.getWorkingSet(MainViewManager.ALL_PANES) .filter(function (file) { // Legacy didn't allow for files...
javascript
function getWorkingSet() { DeprecationWarning.deprecationWarning("Use MainViewManager.getWorkingSet() instead of DocumentManager.getWorkingSet()", true); return MainViewManager.getWorkingSet(MainViewManager.ALL_PANES) .filter(function (file) { // Legacy didn't allow for files...
[ "function", "getWorkingSet", "(", ")", "{", "DeprecationWarning", ".", "deprecationWarning", "(", "\"Use MainViewManager.getWorkingSet() instead of DocumentManager.getWorkingSet()\"", ",", "true", ")", ";", "return", "MainViewManager", ".", "getWorkingSet", "(", "MainViewManage...
Returns a list of items in the working set in UI list order. May be 0-length, but never null. @deprecated Use MainViewManager.getWorkingSet() instead @return {Array.<File>}
[ "Returns", "a", "list", "of", "items", "in", "the", "working", "set", "in", "UI", "list", "order", ".", "May", "be", "0", "-", "length", "but", "never", "null", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/document/DocumentManager.js#L156-L163
train
Get a list of working set files
[ 30522, 3853, 2131, 21398, 13462, 1006, 1007, 1063, 2139, 28139, 10719, 9028, 5582, 1012, 2139, 28139, 10719, 9028, 5582, 1006, 1000, 2224, 2364, 8584, 24805, 4590, 1012, 2131, 21398, 13462, 1006, 1007, 2612, 1997, 6254, 24805, 4590, 1012, 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...
cytoscape/cytoscape.js
dist/cytoscape.esm.js
style$$1
function style$$1(name, value) { var cy = this.cy(); if (!cy.styleEnabled()) { return this; } var updateTransitions = false; var style$$1 = cy.style(); if (plainObject(name)) { // then extend the bypass var props = name; style$$1.applyBypass(this, props, updateTransiti...
javascript
function style$$1(name, value) { var cy = this.cy(); if (!cy.styleEnabled()) { return this; } var updateTransitions = false; var style$$1 = cy.style(); if (plainObject(name)) { // then extend the bypass var props = name; style$$1.applyBypass(this, props, updateTransiti...
[ "function", "style$$1", "(", "name", ",", "value", ")", "{", "var", "cy", "=", "this", ".", "cy", "(", ")", ";", "if", "(", "!", "cy", ".", "styleEnabled", "(", ")", ")", "{", "return", "this", ";", "}", "var", "updateTransitions", "=", "false", ...
read the calculated css style of the element or override the style (via a bypass)
[ "read", "the", "calculated", "css", "style", "of", "the", "element", "or", "override", "the", "style", "(", "via", "a", "bypass", ")" ]
ad2051b65e2243cfd953d8b24a8bf95bfa8559e5
https://github.com/cytoscape/cytoscape.js/blob/ad2051b65e2243cfd953d8b24a8bf95bfa8559e5/dist/cytoscape.esm.js#L10963-L11006
train
style the element
[ 30522, 3853, 2806, 1002, 1002, 1015, 1006, 2171, 1010, 3643, 1007, 1063, 13075, 22330, 1027, 2023, 1012, 22330, 1006, 1007, 1025, 2065, 1006, 999, 22330, 1012, 2806, 8189, 23242, 1006, 1007, 1007, 1063, 2709, 2023, 1025, 1065, 13075, 10651,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
src/deckgl-layers/3d-building-layer/3d-building-utils.js
classifyRings
function classifyRings(rings) { const len = rings.length; if (len <= 1) return [rings]; const polygons = []; let polygon; let ccw; for (let i = 0; i < len; i++) { const area = signedArea(rings[i]); if (area === 0) { continue; } if (ccw === undefined) { ccw = area < 0; } ...
javascript
function classifyRings(rings) { const len = rings.length; if (len <= 1) return [rings]; const polygons = []; let polygon; let ccw; for (let i = 0; i < len; i++) { const area = signedArea(rings[i]); if (area === 0) { continue; } if (ccw === undefined) { ccw = area < 0; } ...
[ "function", "classifyRings", "(", "rings", ")", "{", "const", "len", "=", "rings", ".", "length", ";", "if", "(", "len", "<=", "1", ")", "return", "[", "rings", "]", ";", "const", "polygons", "=", "[", "]", ";", "let", "polygon", ";", "let", "ccw",...
classifies an array of rings into polygons with outer rings and holes
[ "classifies", "an", "array", "of", "rings", "into", "polygons", "with", "outer", "rings", "and", "holes" ]
779238435707cc54335c2d00001e4b9334b314aa
https://github.com/keplergl/kepler.gl/blob/779238435707cc54335c2d00001e4b9334b314aa/src/deckgl-layers/3d-building-layer/3d-building-utils.js#L148-L181
train
Classifies a list of rings
[ 30522, 3853, 26268, 4892, 2015, 1006, 7635, 1007, 1063, 9530, 3367, 18798, 1027, 7635, 1012, 3091, 1025, 2065, 1006, 18798, 1026, 1027, 1015, 1007, 2709, 1031, 7635, 1033, 1025, 9530, 3367, 26572, 7446, 2015, 1027, 1031, 1033, 1025, 2292, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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(style, key, value) { var isValue = value != null && (typeof(value.length) == 'undefined' || value.length > 0); if (style == null || style.length == 0) { if (isValue) { style = key + '=' + value + ';'; } } else { if (style.substring(0, key.length + 1) == key + '=') { var n...
javascript
function(style, key, value) { var isValue = value != null && (typeof(value.length) == 'undefined' || value.length > 0); if (style == null || style.length == 0) { if (isValue) { style = key + '=' + value + ';'; } } else { if (style.substring(0, key.length + 1) == key + '=') { var n...
[ "function", "(", "style", ",", "key", ",", "value", ")", "{", "var", "isValue", "=", "value", "!=", "null", "&&", "(", "typeof", "(", "value", ".", "length", ")", "==", "'undefined'", "||", "value", ".", "length", ">", "0", ")", ";", "if", "(", "...
Function: setStyle Adds or removes the given key, value pair to the style and returns the new style. If value is null or zero length then the key is removed from the style. This is for cell styles, not for CSS styles. Parameters: style - String of the form [(stylename|key=value);]. key - Key of the style to be chang...
[ "Function", ":", "setStyle" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L5511-L5566
train
Returns the style string
[ 30522, 3853, 1006, 2806, 1010, 3145, 1010, 3643, 1007, 1063, 13075, 2003, 10175, 5657, 1027, 3643, 999, 1027, 19701, 1004, 1004, 1006, 2828, 11253, 1006, 3643, 1012, 3091, 1007, 1027, 1027, 1005, 6151, 28344, 1005, 1064, 1064, 3643, 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...
jhipster/generator-jhipster
generators/aws-containers/aws-client.js
sanitizeBucketName
function sanitizeBucketName(bucketName) { return _(bucketName) .split('.') .filter(e => e) .map(_.toLower) .map(e => _.replace(e, '_', '-')) .join('.'); }
javascript
function sanitizeBucketName(bucketName) { return _(bucketName) .split('.') .filter(e => e) .map(_.toLower) .map(e => _.replace(e, '_', '-')) .join('.'); }
[ "function", "sanitizeBucketName", "(", "bucketName", ")", "{", "return", "_", "(", "bucketName", ")", ".", "split", "(", "'.'", ")", ".", "filter", "(", "e", "=>", "e", ")", ".", "map", "(", "_", ".", "toLower", ")", ".", "map", "(", "e", "=>", "...
Sanitize the bucketName following the rule found here: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-s3-bucket-naming-requirements.html @param bucketName @returns {string}
[ "Sanitize", "the", "bucketName", "following", "the", "rule", "found", "here", ":", "http", ":", "//", "docs", ".", "aws", ".", "amazon", ".", "com", "/", "awscloudtrail", "/", "latest", "/", "userguide", "/", "cloudtrail", "-", "s3", "-", "bucket", "-", ...
f76fa8de0818ce6bda6c7b1455942e2a9b0ae3ff
https://github.com/jhipster/generator-jhipster/blob/f76fa8de0818ce6bda6c7b1455942e2a9b0ae3ff/generators/aws-containers/aws-client.js#L361-L368
train
Sanitize bucket name
[ 30522, 3853, 2624, 25090, 4371, 24204, 3388, 18442, 1006, 13610, 18442, 1007, 1063, 2709, 1035, 1006, 13610, 18442, 1007, 1012, 3975, 1006, 1005, 1012, 1005, 1007, 1012, 11307, 1006, 1041, 1027, 1028, 1041, 1007, 1012, 4949, 1006, 1035, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/command/KeyBindingManager.js
formatKeyDescriptor
function formatKeyDescriptor(descriptor) { var displayStr; if (brackets.platform === "mac") { displayStr = descriptor.replace(/-(?!$)/g, ""); // remove dashes displayStr = displayStr.replace("Ctrl", "\u2303"); // Ctrl > control symbol displayStr = displayStr.rep...
javascript
function formatKeyDescriptor(descriptor) { var displayStr; if (brackets.platform === "mac") { displayStr = descriptor.replace(/-(?!$)/g, ""); // remove dashes displayStr = displayStr.replace("Ctrl", "\u2303"); // Ctrl > control symbol displayStr = displayStr.rep...
[ "function", "formatKeyDescriptor", "(", "descriptor", ")", "{", "var", "displayStr", ";", "if", "(", "brackets", ".", "platform", "===", "\"mac\"", ")", "{", "displayStr", "=", "descriptor", ".", "replace", "(", "/", "-(?!$)", "/", "g", ",", "\"\"", ")", ...
Convert normalized key representation to display appropriate for platform. @param {!string} descriptor Normalized key descriptor. @return {!string} Display/Operating system appropriate string
[ "Convert", "normalized", "key", "representation", "to", "display", "appropriate", "for", "platform", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/command/KeyBindingManager.js#L527-L553
train
Format key descriptor
[ 30522, 3853, 4289, 14839, 6155, 23235, 2953, 1006, 4078, 23235, 2953, 1007, 1063, 13075, 8834, 16344, 1025, 2065, 1006, 19719, 1012, 4132, 1027, 1027, 1027, 1000, 6097, 1000, 1007, 1063, 8834, 16344, 1027, 4078, 23235, 2953, 1012, 5672, 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...
LLK/scratch-blocks
blocks_vertical/control.js
function() { this.jsonInit({ "type": "control_if_else", "message0": Blockly.Msg.CONTROL_IF, "message1": "%1", "message2": Blockly.Msg.CONTROL_ELSE, "message3": "%1", "args0": [ { "type": "input_value", "name": "CONDITION", "check": "Boolean" ...
javascript
function() { this.jsonInit({ "type": "control_if_else", "message0": Blockly.Msg.CONTROL_IF, "message1": "%1", "message2": Blockly.Msg.CONTROL_ELSE, "message3": "%1", "args0": [ { "type": "input_value", "name": "CONDITION", "check": "Boolean" ...
[ "function", "(", ")", "{", "this", ".", "jsonInit", "(", "{", "\"type\"", ":", "\"control_if_else\"", ",", "\"message0\"", ":", "Blockly", ".", "Msg", ".", "CONTROL_IF", ",", "\"message1\"", ":", "\"%1\"", ",", "\"message2\"", ":", "Blockly", ".", "Msg", "...
Block for if-else. @this Blockly.Block
[ "Block", "for", "if", "-", "else", "." ]
455b2a854435c0a67da1da92320ddc3ec3e2b799
https://github.com/LLK/scratch-blocks/blob/455b2a854435c0a67da1da92320ddc3ec3e2b799/blocks_vertical/control.js#L140-L169
train
Block for .
[ 30522, 3853, 1006, 1007, 1063, 2023, 1012, 1046, 3385, 5498, 2102, 1006, 1063, 1000, 2828, 1000, 1024, 1000, 2491, 1035, 2065, 1035, 2842, 1000, 1010, 1000, 4471, 2692, 1000, 1024, 3796, 2135, 1012, 5796, 2290, 1012, 2491, 1035, 2065, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/comma-spacing.js
validateCommaItemSpacing
function validateCommaItemSpacing(tokens, reportItem) { if (tokens.left && astUtils.isTokenOnSameLine(tokens.left, tokens.comma) && (options.before !== sourceCode.isSpaceBetweenTokens(tokens.left, tokens.comma)) ) { report(reportItem, "before", tokens.left); ...
javascript
function validateCommaItemSpacing(tokens, reportItem) { if (tokens.left && astUtils.isTokenOnSameLine(tokens.left, tokens.comma) && (options.before !== sourceCode.isSpaceBetweenTokens(tokens.left, tokens.comma)) ) { report(reportItem, "before", tokens.left); ...
[ "function", "validateCommaItemSpacing", "(", "tokens", ",", "reportItem", ")", "{", "if", "(", "tokens", ".", "left", "&&", "astUtils", ".", "isTokenOnSameLine", "(", "tokens", ".", "left", ",", "tokens", ".", "comma", ")", "&&", "(", "options", ".", "befo...
Validates the spacing around a comma token. @param {Object} tokens - The tokens to be validated. @param {Token} tokens.comma The token representing the comma. @param {Token} [tokens.left] The last token before the comma. @param {Token} [tokens.right] The first token after the comma. @param {Token|ASTNode} reportItem Th...
[ "Validates", "the", "spacing", "around", "a", "comma", "token", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/comma-spacing.js#L116-L136
train
Validate comma item spacing
[ 30522, 3853, 9398, 3686, 9006, 2863, 4221, 5244, 19498, 2075, 1006, 19204, 2015, 1010, 3189, 4221, 2213, 1007, 1063, 2065, 1006, 19204, 2015, 1012, 2187, 1004, 1004, 2004, 8525, 3775, 4877, 1012, 21541, 11045, 8540, 21559, 18809, 2063, 1006...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
vuejs/vue-cli
packages/@vue/cli-ui/apollo-server/connectors/projects.js
autoOpenLastProject
async function autoOpenLastProject () { const context = getContext() const id = context.db.get('config.lastOpenProject').value() if (id) { try { await open(id, context) } catch (e) { log(`Project can't be auto-opened`, id) } } }
javascript
async function autoOpenLastProject () { const context = getContext() const id = context.db.get('config.lastOpenProject').value() if (id) { try { await open(id, context) } catch (e) { log(`Project can't be auto-opened`, id) } } }
[ "async", "function", "autoOpenLastProject", "(", ")", "{", "const", "context", "=", "getContext", "(", ")", "const", "id", "=", "context", ".", "db", ".", "get", "(", "'config.lastOpenProject'", ")", ".", "value", "(", ")", "if", "(", "id", ")", "{", "...
Open last project
[ "Open", "last", "project" ]
206803cbefefdfbc7d8ed12440b0b751688b77b2
https://github.com/vuejs/vue-cli/blob/206803cbefefdfbc7d8ed12440b0b751688b77b2/packages/@vue/cli-ui/apollo-server/connectors/projects.js#L457-L467
train
Auto - opens the last project in the database
[ 30522, 2004, 6038, 2278, 3853, 8285, 26915, 8523, 25856, 3217, 20614, 1006, 1007, 1063, 9530, 3367, 6123, 1027, 2131, 8663, 18209, 1006, 1007, 9530, 3367, 8909, 1027, 6123, 1012, 16962, 1012, 2131, 1006, 1005, 9530, 8873, 2290, 1012, 2197, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
moment/luxon
src/datetime.js
fixOffset
function fixOffset(localTS, o, tz) { // Our UTC time is just a guess because our offset is just a guess let utcGuess = localTS - o * 60 * 1000; // Test whether the zone matches the offset for this ts const o2 = tz.offset(utcGuess); // If so, offset didn't change and we're done if (o === o2) { return [...
javascript
function fixOffset(localTS, o, tz) { // Our UTC time is just a guess because our offset is just a guess let utcGuess = localTS - o * 60 * 1000; // Test whether the zone matches the offset for this ts const o2 = tz.offset(utcGuess); // If so, offset didn't change and we're done if (o === o2) { return [...
[ "function", "fixOffset", "(", "localTS", ",", "o", ",", "tz", ")", "{", "// Our UTC time is just a guess because our offset is just a guess", "let", "utcGuess", "=", "localTS", "-", "o", "*", "60", "*", "1000", ";", "// Test whether the zone matches the offset for this ts...
find the right offset a given local time. The o input is our guess, which determines which offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)
[ "find", "the", "right", "offset", "a", "given", "local", "time", ".", "The", "o", "input", "is", "our", "guess", "which", "determines", "which", "offset", "we", "ll", "pick", "in", "ambiguous", "cases", "(", "e", ".", "g", ".", "there", "are", "two", ...
236f2badea297ee73421aa39a83e06177c1be6d0
https://github.com/moment/luxon/blob/236f2badea297ee73421aa39a83e06177c1be6d0/src/datetime.js#L75-L98
train
Fix the offset for the local time
[ 30522, 3853, 8081, 27475, 3388, 1006, 2334, 3215, 1010, 1051, 1010, 1056, 2480, 1007, 1063, 1013, 1013, 2256, 11396, 2051, 2003, 2074, 1037, 3984, 2138, 2256, 16396, 2003, 2074, 1037, 3984, 2292, 11396, 22967, 2015, 1027, 2334, 3215, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/_AnnotationHelperBasics.js
function (oInterface, oRawValue) { var oAssociationEnd, sPath, sContextPath, iIndexOfAt, oModel = oInterface.getModel(), aParts, oResult = { associationSetEnd : undefined, navigationAfterMultiple : false, isMultiple : false, navigationProperties : [], resolvedPath : u...
javascript
function (oInterface, oRawValue) { var oAssociationEnd, sPath, sContextPath, iIndexOfAt, oModel = oInterface.getModel(), aParts, oResult = { associationSetEnd : undefined, navigationAfterMultiple : false, isMultiple : false, navigationProperties : [], resolvedPath : u...
[ "function", "(", "oInterface", ",", "oRawValue", ")", "{", "var", "oAssociationEnd", ",", "sPath", ",", "sContextPath", ",", "iIndexOfAt", ",", "oModel", "=", "oInterface", ".", "getModel", "(", ")", ",", "aParts", ",", "oResult", "=", "{", "associationSetEn...
Follows the dynamic "14.5.12 Expression edm:Path" (or variant thereof) contained within the given raw value, starting the absolute path identified by the given interface, and returns the resulting absolute path as well as some other aspects about the path. @param {sap.ui.core.util.XMLPreprocessor.IContext|sap.ui.model...
[ "Follows", "the", "dynamic", "14", ".", "5", ".", "12", "Expression", "edm", ":", "Path", "(", "or", "variant", "thereof", ")", "contained", "within", "the", "given", "raw", "value", "starting", "the", "absolute", "path", "identified", "by", "the", "given"...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_AnnotationHelperBasics.js#L159-L220
train
Returns the value of the property
[ 30522, 3853, 1006, 1051, 18447, 2121, 12172, 1010, 2030, 10376, 10175, 5657, 1007, 1063, 13075, 1051, 30524, 15069, 1010, 2462, 13629, 2595, 11253, 4017, 1010, 18168, 10244, 2140, 1027, 1051, 18447, 2121, 12172, 1012, 2131, 5302, 9247, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dcloudio/mui
examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js
function(message) { if (message.data.indexOf("<open ") === 0 || message.data.indexOf("<?xml") === 0) { // Strip the XML Declaration, if there is one var data = message.data.replace(/^(<\?.*?\?>\s*)*/, ""); if (data === '') return; var streamStart = new DOMP...
javascript
function(message) { if (message.data.indexOf("<open ") === 0 || message.data.indexOf("<?xml") === 0) { // Strip the XML Declaration, if there is one var data = message.data.replace(/^(<\?.*?\?>\s*)*/, ""); if (data === '') return; var streamStart = new DOMP...
[ "function", "(", "message", ")", "{", "if", "(", "message", ".", "data", ".", "indexOf", "(", "\"<open \"", ")", "===", "0", "||", "message", ".", "data", ".", "indexOf", "(", "\"<?xml\"", ")", "===", "0", ")", "{", "// Strip the XML Declaration, if there ...
PrivateFunction: _connect_cb_wrapper _Private_ function that handles the first connection messages. On receiving an opening stream tag this callback replaces itself with the real message handler. On receiving a stream error the connection is terminated.
[ "PrivateFunction", ":", "_connect_cb_wrapper", "_Private_", "function", "that", "handles", "the", "first", "connection", "messages", "." ]
ff74c90a1671a552f3604b1288bf38a4126312d0
https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js#L4930-L4964
train
Handle message from the device
[ 30522, 3853, 1006, 4471, 1007, 1063, 2065, 1006, 4471, 1012, 2951, 1012, 5950, 11253, 1006, 1000, 1026, 2330, 1000, 1007, 1027, 1027, 1027, 1014, 1064, 1064, 4471, 1012, 2951, 1012, 5950, 11253, 1006, 1000, 1026, 1029, 20950, 1000, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/RequestRecorder.js
function() { _private.oLog.info(sModuleName + " - Stop"); var mHarContent = null; if (_private.isRecordStarted()) { mHarContent = _private.getHarContent(true); } // do this for a full cleanup _private.init(); return mHarContent; }
javascript
function() { _private.oLog.info(sModuleName + " - Stop"); var mHarContent = null; if (_private.isRecordStarted()) { mHarContent = _private.getHarContent(true); } // do this for a full cleanup _private.init(); return mHarContent; }
[ "function", "(", ")", "{", "_private", ".", "oLog", ".", "info", "(", "sModuleName", "+", "\" - Stop\"", ")", ";", "var", "mHarContent", "=", "null", ";", "if", "(", "_private", ".", "isRecordStarted", "(", ")", ")", "{", "mHarContent", "=", "_private", ...
Stops the recording or the player. If downloading is not disabled, the har file is downloaded automatically. @returns {Object|null} In record mode the har file is returned as json, otherwise null is returned.
[ "Stops", "the", "recording", "or", "the", "player", ".", "If", "downloading", "is", "not", "disabled", "the", "har", "file", "is", "downloaded", "automatically", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/RequestRecorder.js#L736-L747
train
Stop the record
[ 30522, 3853, 1006, 1007, 1063, 1035, 2797, 1012, 19330, 8649, 1012, 18558, 1006, 15488, 7716, 9307, 18442, 1009, 1000, 1011, 2644, 1000, 1007, 1025, 13075, 1049, 8167, 8663, 6528, 2102, 1027, 19701, 1025, 2065, 1006, 1035, 2797, 1012, 2003,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-constant-condition.js
reportIfConstant
function reportIfConstant(node) { if (node.test && isConstant(node.test, true)) { context.report({ node: node.test, messageId: "unexpected" }); } }
javascript
function reportIfConstant(node) { if (node.test && isConstant(node.test, true)) { context.report({ node: node.test, messageId: "unexpected" }); } }
[ "function", "reportIfConstant", "(", "node", ")", "{", "if", "(", "node", ".", "test", "&&", "isConstant", "(", "node", ".", "test", ",", "true", ")", ")", "{", "context", ".", "report", "(", "{", "node", ":", "node", ".", "test", ",", "messageId", ...
Reports when the given node contains a constant condition. @param {ASTNode} node The AST node to check. @returns {void} @private
[ "Reports", "when", "the", "given", "node", "contains", "a", "constant", "condition", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-constant-condition.js#L179-L183
train
Reports if node is constant
[ 30522, 3853, 3189, 10128, 8663, 12693, 2102, 1006, 13045, 1007, 1063, 2065, 1006, 13045, 1012, 3231, 1004, 1004, 2003, 8663, 12693, 2102, 1006, 13045, 1012, 3231, 1010, 2995, 1007, 1007, 1063, 6123, 1012, 3189, 1006, 1063, 13045, 1024, 1304...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/jszip.js
function(name) { // Check the name ends with a / if (name.slice(-1) != "/") { name += "/"; // IE doesn't like substr(-1) } // Does this folder already exist? if (!this.files[name]) { fileAdd.call(this, name, null, { dir: true }); } return this.files[name]...
javascript
function(name) { // Check the name ends with a / if (name.slice(-1) != "/") { name += "/"; // IE doesn't like substr(-1) } // Does this folder already exist? if (!this.files[name]) { fileAdd.call(this, name, null, { dir: true }); } return this.files[name]...
[ "function", "(", "name", ")", "{", "// Check the name ends with a /", "if", "(", "name", ".", "slice", "(", "-", "1", ")", "!=", "\"/\"", ")", "{", "name", "+=", "\"/\"", ";", "// IE doesn't like substr(-1)", "}", "// Does this folder already exist?", "if", "(",...
Add a (sub) folder in the current folder. @private @param {string} name the folder's name @return {Object} the new folder.
[ "Add", "a", "(", "sub", ")", "folder", "in", "the", "current", "folder", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/jszip.js#L626-L639
train
Get the file for a specific resource
[ 30522, 3853, 1006, 2171, 1007, 1063, 1013, 1013, 4638, 1996, 2171, 4515, 2007, 1037, 1013, 30524, 1027, 1000, 1013, 1000, 1025, 1013, 1013, 29464, 2987, 1005, 1056, 2066, 4942, 3367, 2099, 1006, 1011, 1015, 1007, 1065, 1013, 1013, 2515, 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.commons/src/sap/ui/commons/Tree.js
restoreSelectedChildren
function restoreSelectedChildren(oNode, aExpandingParents, oFirstCollapsedParent) { var bIsExpanded = oNode.getExpanded(), bNodeReferredInParents = false, bIncludeInExpandingParents = bIsExpanded && !!oNode.getSelectedForNodes().length, oFirstCollapsedParentNode = (oFirstCollapsedParent || bIsExpanded) ? oFi...
javascript
function restoreSelectedChildren(oNode, aExpandingParents, oFirstCollapsedParent) { var bIsExpanded = oNode.getExpanded(), bNodeReferredInParents = false, bIncludeInExpandingParents = bIsExpanded && !!oNode.getSelectedForNodes().length, oFirstCollapsedParentNode = (oFirstCollapsedParent || bIsExpanded) ? oFi...
[ "function", "restoreSelectedChildren", "(", "oNode", ",", "aExpandingParents", ",", "oFirstCollapsedParent", ")", "{", "var", "bIsExpanded", "=", "oNode", ".", "getExpanded", "(", ")", ",", "bNodeReferredInParents", "=", "false", ",", "bIncludeInExpandingParents", "="...
Removes the references inside the expanded node of its selected children, because they are no longer needed. @param {sap.ui.commons.TreeNode} oNode The current node to look at @param {object} aExpandingParents Array of parents of the current node that have selectedForNodes references @param {sap.ui.commons.TreeNode} oF...
[ "Removes", "the", "references", "inside", "the", "expanded", "node", "of", "its", "selected", "children", "because", "they", "are", "no", "longer", "needed", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/Tree.js#L518-L557
train
Restores the selected children of the given node
[ 30522, 3853, 9239, 11246, 22471, 2098, 19339, 7389, 1006, 21058, 3207, 1010, 29347, 2595, 9739, 4667, 19362, 11187, 1010, 1997, 18894, 13535, 14511, 9331, 6924, 19362, 4765, 1007, 1063, 13075, 20377, 10288, 9739, 5732, 1027, 21058, 3207, 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...
wuchangming/spy-debugger
buildin_modules/weinre/web/interfaces/interfaces.js
getJavaType
function getJavaType(type) { var result if (-1 == NativeTypes.indexOf(type.name)) { result = "<a href='javascript:showInterface(\"" + type.name + "\"); void(0);'>" + type.name + "</a>" } else { result = IDL2Java[type.name] if (!result) { result = "?" + type.name + "...
javascript
function getJavaType(type) { var result if (-1 == NativeTypes.indexOf(type.name)) { result = "<a href='javascript:showInterface(\"" + type.name + "\"); void(0);'>" + type.name + "</a>" } else { result = IDL2Java[type.name] if (!result) { result = "?" + type.name + "...
[ "function", "getJavaType", "(", "type", ")", "{", "var", "result", "if", "(", "-", "1", "==", "NativeTypes", ".", "indexOf", "(", "type", ".", "name", ")", ")", "{", "result", "=", "\"<a href='javascript:showInterface(\\\"\"", "+", "type", ".", "name", "+"...
-----------------------------------------------------------------------------
[ "-----------------------------------------------------------------------------" ]
55c1dda0dff0c44920673711656ddfd7ff03c307
https://github.com/wuchangming/spy-debugger/blob/55c1dda0dff0c44920673711656ddfd7ff03c307/buildin_modules/weinre/web/interfaces/interfaces.js#L237-L257
train
Get Java type
[ 30522, 3853, 2131, 3900, 22879, 18863, 1006, 2828, 1007, 1063, 13075, 2765, 2065, 1006, 1011, 1015, 1027, 1027, 3128, 13874, 2015, 1012, 5950, 11253, 1006, 2828, 1012, 2171, 1007, 1007, 1063, 2765, 1027, 1000, 1026, 1037, 17850, 12879, 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...
LLK/scratch-blocks
blocks_vertical/data.js
function(options) { var fieldName = 'VARIABLE'; if (this.isCollapsed()) { return; } var currentVarName = this.getField(fieldName).text_; if (!this.isInFlyout) { var variablesList = this.workspace.getVariablesOfType(''); variablesList.sort(function(a, b) { return Blockly.scr...
javascript
function(options) { var fieldName = 'VARIABLE'; if (this.isCollapsed()) { return; } var currentVarName = this.getField(fieldName).text_; if (!this.isInFlyout) { var variablesList = this.workspace.getVariablesOfType(''); variablesList.sort(function(a, b) { return Blockly.scr...
[ "function", "(", "options", ")", "{", "var", "fieldName", "=", "'VARIABLE'", ";", "if", "(", "this", ".", "isCollapsed", "(", ")", ")", "{", "return", ";", "}", "var", "currentVarName", "=", "this", ".", "getField", "(", "fieldName", ")", ".", "text_",...
Add context menu option to change the selected variable. @param {!Array} options List of menu options to add to. @this Blockly.Block
[ "Add", "context", "menu", "option", "to", "change", "the", "selected", "variable", "." ]
455b2a854435c0a67da1da92320ddc3ec3e2b799
https://github.com/LLK/scratch-blocks/blob/455b2a854435c0a67da1da92320ddc3ec3e2b799/blocks_vertical/data.js#L516-L554
train
Add variable option to options array.
[ 30522, 3853, 1006, 7047, 1007, 1063, 13075, 2492, 18442, 1027, 1005, 8023, 1005, 1025, 2065, 1006, 2023, 1012, 2003, 26895, 9331, 6924, 1006, 1007, 1007, 1063, 2709, 1025, 1065, 13075, 2783, 10755, 18442, 1027, 2023, 1012, 2131, 3790, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/autocomplete/js/autocompleteController.js
handleQuery
function handleQuery () { var searchText = $scope.searchText || ''; var term = searchText.toLowerCase(); // If caching is enabled and the current searchText is stored in the cache if (!$scope.noCache && cache[term]) { // The results should be handled as same as a normal un-cached request does. ...
javascript
function handleQuery () { var searchText = $scope.searchText || ''; var term = searchText.toLowerCase(); // If caching is enabled and the current searchText is stored in the cache if (!$scope.noCache && cache[term]) { // The results should be handled as same as a normal un-cached request does. ...
[ "function", "handleQuery", "(", ")", "{", "var", "searchText", "=", "$scope", ".", "searchText", "||", "''", ";", "var", "term", "=", "searchText", ".", "toLowerCase", "(", ")", ";", "// If caching is enabled and the current searchText is stored in the cache", "if", ...
Starts the query to gather the results for the current searchText. Attempts to return cached results first, then forwards the process to `fetchResults` if necessary.
[ "Starts", "the", "query", "to", "gather", "the", "results", "for", "the", "current", "searchText", ".", "Attempts", "to", "return", "cached", "results", "first", "then", "forwards", "the", "process", "to", "fetchResults", "if", "necessary", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/autocomplete/js/autocompleteController.js#L1023-L1036
train
Handle a query
[ 30522, 3853, 5047, 4226, 2854, 1006, 1007, 1063, 13075, 3945, 18209, 1027, 1002, 9531, 1012, 3945, 18209, 1064, 1064, 1005, 1005, 1025, 13075, 2744, 1027, 3945, 18209, 1012, 2000, 27663, 18992, 3366, 1006, 1007, 1025, 1013, 1013, 2065, 6187...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/select2/src/js/select2/i18n/uk.js
ending
function ending (count, one, couple, more) { if (count % 100 > 10 && count % 100 < 15) { return more; } if (count % 10 === 1) { return one; } if (count % 10 > 1 && count % 10 < 5) { return couple; } return more; }
javascript
function ending (count, one, couple, more) { if (count % 100 > 10 && count % 100 < 15) { return more; } if (count % 10 === 1) { return one; } if (count % 10 > 1 && count % 10 < 5) { return couple; } return more; }
[ "function", "ending", "(", "count", ",", "one", ",", "couple", ",", "more", ")", "{", "if", "(", "count", "%", "100", ">", "10", "&&", "count", "%", "100", "<", "15", ")", "{", "return", "more", ";", "}", "if", "(", "count", "%", "10", "===", ...
Ukranian
[ "Ukranian" ]
19113c3cbc19a7afe0cfd3158d647064d2d30661
https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/bower_components/select2/src/js/select2/i18n/uk.js#L3-L14
train
returns the last element of the array
[ 30522, 3853, 4566, 1006, 4175, 1010, 2028, 1010, 3232, 1010, 2062, 1007, 1063, 2065, 1006, 4175, 1003, 2531, 1028, 2184, 1004, 1004, 4175, 1003, 2531, 1026, 2321, 1007, 1063, 2709, 2062, 1025, 1065, 2065, 1006, 4175, 1003, 2184, 1027, 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...
nhn/tui.editor
src/js/extensions/chart/chart.js
_parseCode2DataAndOptions
function _parseCode2DataAndOptions(dataCode, optionCode) { const data = parseDSV2ChartData(dataCode); const options = parseCode2ChartOption(optionCode); return { data, options }; }
javascript
function _parseCode2DataAndOptions(dataCode, optionCode) { const data = parseDSV2ChartData(dataCode); const options = parseCode2ChartOption(optionCode); return { data, options }; }
[ "function", "_parseCode2DataAndOptions", "(", "dataCode", ",", "optionCode", ")", "{", "const", "data", "=", "parseDSV2ChartData", "(", "dataCode", ")", ";", "const", "options", "=", "parseCode2ChartOption", "(", "optionCode", ")", ";", "return", "{", "data", ",...
parse codes to chart data & options Object @param {string} dataCode - code block containing chart data @param {string} optionCode - code block containing chart options @returns {Object} - tui.chart data & options @see https://nhn.github.io/tui.chart/latest/tui.chart.html @ignore
[ "parse", "codes", "to", "chart", "data", "&", "options", "Object" ]
e75ab08c2a7ab07d1143e318f7cde135c5e3002e
https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/extensions/chart/chart.js#L102-L110
train
Parse data and options from chart code
[ 30522, 3853, 1035, 11968, 3366, 16044, 2475, 2850, 2696, 28574, 16790, 2015, 1006, 2951, 16044, 1010, 5724, 16044, 1007, 1063, 9530, 3367, 2951, 1027, 11968, 6924, 2015, 2615, 2475, 7507, 5339, 2850, 2696, 1006, 2951, 16044, 1007, 1025, 953...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/menu/js/menuServiceProvider.js
onShow
function onShow(scope, element, opts) { sanitizeAndConfigure(opts); if (opts.menuContentEl[0]) { // Inherit the theme from the target element. $mdTheming.inherit(opts.menuContentEl, opts.target); } else { $log.warn( '$mdMenu: Menu elements should always contain a `md...
javascript
function onShow(scope, element, opts) { sanitizeAndConfigure(opts); if (opts.menuContentEl[0]) { // Inherit the theme from the target element. $mdTheming.inherit(opts.menuContentEl, opts.target); } else { $log.warn( '$mdMenu: Menu elements should always contain a `md...
[ "function", "onShow", "(", "scope", ",", "element", ",", "opts", ")", "{", "sanitizeAndConfigure", "(", "opts", ")", ";", "if", "(", "opts", ".", "menuContentEl", "[", "0", "]", ")", "{", "// Inherit the theme from the target element.", "$mdTheming", ".", "inh...
Inserts and configures the staged Menu element into the DOM, positioning it, and wiring up various interaction events
[ "Inserts", "and", "configures", "the", "staged", "Menu", "element", "into", "the", "DOM", "positioning", "it", "and", "wiring", "up", "various", "interaction", "events" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/menu/js/menuServiceProvider.js#L115-L382
train
Show the menu
[ 30522, 3853, 2006, 22231, 2860, 1006, 9531, 1010, 5783, 1010, 23569, 2015, 1007, 1063, 2624, 25090, 4371, 5685, 8663, 8873, 27390, 2063, 1006, 23569, 2015, 1007, 1025, 2065, 1006, 23569, 2015, 1012, 12183, 8663, 6528, 9834, 1031, 1014, 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...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/RuleEngineOpaExtension.js
function () { var ruleDeferred = jQueryDOM.Deferred(), history = RuleAnalyzer.getFormattedAnalysisHistory(), analysisHistory = RuleAnalyzer.getAnalysisHistory(), totalIssues = analysisHistory.reduce(function (total, analysis) { return total + analysis.issues.length; }, 0), resu...
javascript
function () { var ruleDeferred = jQueryDOM.Deferred(), history = RuleAnalyzer.getFormattedAnalysisHistory(), analysisHistory = RuleAnalyzer.getAnalysisHistory(), totalIssues = analysisHistory.reduce(function (total, analysis) { return total + analysis.issues.length; }, 0), resu...
[ "function", "(", ")", "{", "var", "ruleDeferred", "=", "jQueryDOM", ".", "Deferred", "(", ")", ",", "history", "=", "RuleAnalyzer", ".", "getFormattedAnalysisHistory", "(", ")", ",", "analysisHistory", "=", "RuleAnalyzer", ".", "getAnalysisHistory", "(", ")", ...
If there are issues found the assertion result will be false and a report with all the issues will be generated in the message of the test. If no issues were found the assertion result will be true and no report will be generated. If "sap-skip-rules-issues=true" is set as an URI parameter, assertion result will be alw...
[ "If", "there", "are", "issues", "found", "the", "assertion", "result", "will", "be", "false", "and", "a", "report", "with", "all", "the", "issues", "will", "be", "generated", "in", "the", "message", "of", "the", "test", ".", "If", "no", "issues", "were",...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/RuleEngineOpaExtension.js#L170-L196
train
Returns a promise that resolves to true if there are issues
[ 30522, 3853, 1006, 1007, 1063, 13075, 5451, 27235, 20529, 1027, 1046, 4226, 2854, 9527, 1012, 13366, 28849, 2094, 1006, 1007, 1010, 2381, 1027, 3627, 27953, 2100, 6290, 1012, 2131, 14192, 19321, 11960, 12032, 20960, 24158, 7062, 1006, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...