repo
stringclasses
195 values
path
stringlengths
4
99
func_name
stringlengths
0
41
original_string
stringlengths
72
56.1k
language
stringclasses
1 value
code
stringlengths
72
56.1k
code_tokens
listlengths
25
8.12k
docstring
stringlengths
2
12.5k
docstring_tokens
listlengths
1
449
sha
stringclasses
197 values
url
stringlengths
88
186
partition
stringclasses
1 value
summary
stringlengths
8
338
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
jhipster/generator-jhipster
generators/docker-prompts.js
askForServiceDiscovery
function askForServiceDiscovery() { if (this.regenerate) return; const done = this.async(); const serviceDiscoveryEnabledApps = []; this.appConfigs.forEach((appConfig, index) => { if (appConfig.serviceDiscoveryType) { serviceDiscoveryEnabledApps.push({ baseName: app...
javascript
function askForServiceDiscovery() { if (this.regenerate) return; const done = this.async(); const serviceDiscoveryEnabledApps = []; this.appConfigs.forEach((appConfig, index) => { if (appConfig.serviceDiscoveryType) { serviceDiscoveryEnabledApps.push({ baseName: app...
[ "function", "askForServiceDiscovery", "(", ")", "{", "if", "(", "this", ".", "regenerate", ")", "return", ";", "const", "done", "=", "this", ".", "async", "(", ")", ";", "const", "serviceDiscoveryEnabledApps", "=", "[", "]", ";", "this", ".", "appConfigs",...
Ask For Service Discovery
[ "Ask", "For", "Service", "Discovery" ]
f76fa8de0818ce6bda6c7b1455942e2a9b0ae3ff
https://github.com/jhipster/generator-jhipster/blob/f76fa8de0818ce6bda6c7b1455942e2a9b0ae3ff/generators/docker-prompts.js#L307-L371
train
Ask For Service Discovery
[ 30522, 3853, 3198, 29278, 8043, 7903, 2098, 2483, 3597, 27900, 1006, 1007, 1063, 2065, 1006, 2023, 1012, 19723, 24454, 3686, 1007, 2709, 1025, 9530, 3367, 2589, 1027, 2023, 1012, 2004, 6038, 2278, 1006, 1007, 1025, 9530, 3367, 22858, 2483, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
fex-team/webuploader
_draft/music/webuploader.js
function() { // return this._mgr.getStats.apply( this._mgr, arguments ); var stats = this.request('get-stats'); return { successNum: stats.numOfSuccess, // who care? // queueFailNum: 0, ...
javascript
function() { // return this._mgr.getStats.apply( this._mgr, arguments ); var stats = this.request('get-stats'); return { successNum: stats.numOfSuccess, // who care? // queueFailNum: 0, ...
[ "function", "(", ")", "{", "// return this._mgr.getStats.apply( this._mgr, arguments );", "var", "stats", "=", "this", ".", "request", "(", "'get-stats'", ")", ";", "return", "{", "successNum", ":", "stats", ".", "numOfSuccess", ",", "// who care?", "// queueFailNum: ...
获取文件统计信息。返回一个包含一下信息的对象。 * `successNum` 上传成功的文件数 * `uploadFailNum` 上传失败的文件数 * `cancelNum` 被删除的文件数 * `invalidNum` 无效的文件数 * `queueNum` 还在队列中的文件数 @method getStats @grammar getStats() => Object
[ "获取文件统计信息。返回一个包含一下信息的对象。", "*", "successNum", "上传成功的文件数", "*", "uploadFailNum", "上传失败的文件数", "*", "cancelNum", "被删除的文件数", "*", "invalidNum", "无效的文件数", "*", "queueNum", "还在队列中的文件数" ]
7094e4476c5af3b06993d91dde2d223200b9feb7
https://github.com/fex-team/webuploader/blob/7094e4476c5af3b06993d91dde2d223200b9feb7/_draft/music/webuploader.js#L762-L776
train
Get stats from the cluster
[ 30522, 3853, 1006, 1007, 1063, 1013, 1013, 2709, 2023, 1012, 1035, 11460, 2099, 1012, 4152, 29336, 2015, 1012, 6611, 1006, 2023, 1012, 1035, 11460, 2099, 1010, 9918, 1007, 1025, 13075, 26319, 1027, 2023, 1012, 5227, 1006, 1005, 2131, 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...
eslint/eslint
lib/rules/comma-style.js
getReplacedText
function getReplacedText(styleType, text) { switch (styleType) { case "between": return `,${text.replace(astUtils.LINEBREAK_MATCHER, "")}`; case "first": return `${text},`; case "last": return `,${t...
javascript
function getReplacedText(styleType, text) { switch (styleType) { case "between": return `,${text.replace(astUtils.LINEBREAK_MATCHER, "")}`; case "first": return `${text},`; case "last": return `,${t...
[ "function", "getReplacedText", "(", "styleType", ",", "text", ")", "{", "switch", "(", "styleType", ")", "{", "case", "\"between\"", ":", "return", "`", "${", "text", ".", "replace", "(", "astUtils", ".", "LINEBREAK_MATCHER", ",", "\"\"", ")", "}", "`", ...
-------------------------------------------------------------------------- Helpers -------------------------------------------------------------------------- Modified text based on the style @param {string} styleType Style type @param {string} text Source code text @returns {string} modified text @private
[ "--------------------------------------------------------------------------", "Helpers", "--------------------------------------------------------------------------", "Modified", "text", "based", "on", "the", "style" ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/comma-style.js#L85-L99
train
Returns a string with the replaced text
[ 30522, 3853, 2131, 2890, 22829, 18209, 1006, 2806, 13874, 1010, 3793, 1007, 1063, 6942, 1006, 2806, 13874, 1007, 1063, 2553, 1000, 2090, 1000, 1024, 2709, 1036, 1010, 1002, 1063, 3793, 1012, 5672, 1006, 2004, 8525, 3775, 4877, 1012, 2240, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
javascript/node/selenium-webdriver/lib/webdriver.js
toWireValue
async function toWireValue(obj) { let value = await Promise.resolve(obj); if (value === void 0 || value === null) { return value; } if (typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string') { return value; } if (Array.isArray(value)) { return convert...
javascript
async function toWireValue(obj) { let value = await Promise.resolve(obj); if (value === void 0 || value === null) { return value; } if (typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string') { return value; } if (Array.isArray(value)) { return convert...
[ "async", "function", "toWireValue", "(", "obj", ")", "{", "let", "value", "=", "await", "Promise", ".", "resolve", "(", "obj", ")", ";", "if", "(", "value", "===", "void", "0", "||", "value", "===", "null", ")", "{", "return", "value", ";", "}", "i...
Converts an object to its JSON representation in the WebDriver wire protocol. When converting values of type object, the following steps will be taken: <ol> <li>if the object is a WebElement, the return value will be the element's server ID <li>if the object defines a {@link Symbols.serialize} method, this algorithm wi...
[ "Converts", "an", "object", "to", "its", "JSON", "representation", "in", "the", "WebDriver", "wire", "protocol", ".", "When", "converting", "values", "of", "type", "object", "the", "following", "steps", "will", "be", "taken", ":", "<ol", ">", "<li", ">", "...
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/lib/webdriver.js#L137-L163
train
Convert object to wire value
[ 30522, 2004, 6038, 2278, 3853, 15805, 7442, 10175, 5657, 1006, 27885, 3501, 1007, 1063, 2292, 3643, 1027, 26751, 4872, 1012, 10663, 1006, 27885, 3501, 1007, 1025, 2065, 1006, 3643, 1027, 1027, 1027, 11675, 1014, 1064, 1064, 3643, 1027, 1027...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/accessor-pairs.js
isArgumentOfMethodCall
function isArgumentOfMethodCall(node, index, object, property) { const parent = node.parent; return ( parent.type === "CallExpression" && parent.callee.type === "MemberExpression" && parent.callee.computed === false && isIdentifier(parent.callee.object, object) && isIden...
javascript
function isArgumentOfMethodCall(node, index, object, property) { const parent = node.parent; return ( parent.type === "CallExpression" && parent.callee.type === "MemberExpression" && parent.callee.computed === false && isIdentifier(parent.callee.object, object) && isIden...
[ "function", "isArgumentOfMethodCall", "(", "node", ",", "index", ",", "object", ",", "property", ")", "{", "const", "parent", "=", "node", ".", "parent", ";", "return", "(", "parent", ".", "type", "===", "\"CallExpression\"", "&&", "parent", ".", "callee", ...
Checks whether or not a given node is an argument of a specified method call. @param {ASTNode} node - A node to check. @param {number} index - An expected index of the node in arguments. @param {string} object - An expected name of the object of the method. @param {string} property - An expected name of the method. @re...
[ "Checks", "whether", "or", "not", "a", "given", "node", "is", "an", "argument", "of", "a", "specified", "method", "call", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/accessor-pairs.js#L30-L41
train
Checks whether the argument of a call expression is an argument of a method call.
[ 30522, 3853, 18061, 10623, 27417, 3406, 16715, 11031, 7716, 9289, 2140, 1006, 13045, 1010, 5950, 1010, 4874, 1010, 3200, 1007, 1063, 9530, 3367, 6687, 1027, 13045, 1012, 6687, 1025, 2709, 1006, 6687, 1012, 2828, 1027, 1027, 1027, 1000, 2655...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/gulpfile.js
createBuildTask
function createBuildTask(filename, prefix, suffix) { return () => gulp .src([ `${closureLibRoot}/closure/goog/**/*.js`, `${closureLibRoot}/third_party/closure/goog/**/*.js`, 'src/**/*.js' ], { base: '.' }) .pipe(sourcemaps.init()) .pipe( closureCompiler({ ...
javascript
function createBuildTask(filename, prefix, suffix) { return () => gulp .src([ `${closureLibRoot}/closure/goog/**/*.js`, `${closureLibRoot}/third_party/closure/goog/**/*.js`, 'src/**/*.js' ], { base: '.' }) .pipe(sourcemaps.init()) .pipe( closureCompiler({ ...
[ "function", "createBuildTask", "(", "filename", ",", "prefix", ",", "suffix", ")", "{", "return", "(", ")", "=>", "gulp", ".", "src", "(", "[", "`", "${", "closureLibRoot", "}", "`", ",", "`", "${", "closureLibRoot", "}", "`", ",", "'src/**/*.js'", "]"...
Builds the core Firebase-auth JS. @param {string} filename name of the generated file @param {string} prefix prefix to the compiled code @param {string} suffix suffix to the compiled code
[ "Builds", "the", "core", "Firebase", "-", "auth", "JS", "." ]
491598a499813dacc23724de5e237ec220cc560e
https://github.com/firebase/firebase-js-sdk/blob/491598a499813dacc23724de5e237ec220cc560e/packages/auth/gulpfile.js#L49-L87
train
Create a build task
[ 30522, 3853, 3443, 8569, 4014, 11927, 19895, 1006, 5371, 18442, 1010, 17576, 1010, 16809, 1007, 1063, 2709, 1006, 1007, 1027, 1028, 26546, 1012, 5034, 2278, 1006, 1031, 1036, 1002, 1063, 8503, 29521, 3217, 4140, 1065, 1013, 8503, 1013, 2757...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
summernote/summernote
src/js/base/core/dom.js
isLeftEdgeOf
function isLeftEdgeOf(node, ancestor) { while (node && node !== ancestor) { if (position(node) !== 0) { return false; } node = node.parentNode; } return true; }
javascript
function isLeftEdgeOf(node, ancestor) { while (node && node !== ancestor) { if (position(node) !== 0) { return false; } node = node.parentNode; } return true; }
[ "function", "isLeftEdgeOf", "(", "node", ",", "ancestor", ")", "{", "while", "(", "node", "&&", "node", "!==", "ancestor", ")", "{", "if", "(", "position", "(", "node", ")", "!==", "0", ")", "{", "return", "false", ";", "}", "node", "=", "node", "....
returns whether node is left edge of ancestor or not. @param {Node} node @param {Node} ancestor @return {Boolean}
[ "returns", "whether", "node", "is", "left", "edge", "of", "ancestor", "or", "not", "." ]
8dcafb8107453006b905ef697a529c42e76beb3f
https://github.com/summernote/summernote/blob/8dcafb8107453006b905ef697a529c42e76beb3f/src/js/base/core/dom.js#L453-L462
train
Returns true if node is the left edge of ancestor
[ 30522, 3853, 8842, 18915, 3351, 11253, 1006, 13045, 1010, 13032, 1007, 1063, 2096, 1006, 13045, 1004, 1004, 13045, 999, 1027, 1027, 13032, 1007, 1063, 2065, 1006, 2597, 1006, 13045, 1007, 999, 1027, 1027, 1014, 1007, 1063, 2709, 6270, 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...
adobe/brackets
src/project/ProjectManager.js
processItem
function processItem(path) { var deferred = new $.Deferred(), fileEntry = FileSystem.getDirectoryForPath(path); fileEntry.exists(function (err, exists) { if (!err && exists) { deferred.resolve(); } else { de...
javascript
function processItem(path) { var deferred = new $.Deferred(), fileEntry = FileSystem.getDirectoryForPath(path); fileEntry.exists(function (err, exists) { if (!err && exists) { deferred.resolve(); } else { de...
[ "function", "processItem", "(", "path", ")", "{", "var", "deferred", "=", "new", "$", ".", "Deferred", "(", ")", ",", "fileEntry", "=", "FileSystem", ".", "getDirectoryForPath", "(", "path", ")", ";", "fileEntry", ".", "exists", "(", "function", "(", "er...
Helper func for Async.firstSequentially()
[ "Helper", "func", "for", "Async", ".", "firstSequentially", "()" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/project/ProjectManager.js#L748-L761
train
processItem - process item
[ 30522, 3853, 2832, 4221, 2213, 1006, 4130, 1007, 1063, 13075, 13366, 28849, 2094, 1027, 2047, 1002, 1012, 13366, 28849, 2094, 1006, 1007, 1010, 5371, 4765, 2854, 1027, 6764, 27268, 6633, 1012, 2131, 4305, 2890, 16761, 2100, 29278, 15069, 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.commons/src/sap/ui/commons/RoadMapRenderer.js
function(rm, oRoadMap, oStep, aAdditionalClasses, fAddAdditionalBoxContent, sId){ rm.write("<li"); if (sId) { //Write the given Id if available, otherwise use writeControlData rm.writeAttribute("id", sId); } else { rm.writeElementData(oStep); } var sStepName = getStepName(oRoadMap, oStep); oStep.__ste...
javascript
function(rm, oRoadMap, oStep, aAdditionalClasses, fAddAdditionalBoxContent, sId){ rm.write("<li"); if (sId) { //Write the given Id if available, otherwise use writeControlData rm.writeAttribute("id", sId); } else { rm.writeElementData(oStep); } var sStepName = getStepName(oRoadMap, oStep); oStep.__ste...
[ "function", "(", "rm", ",", "oRoadMap", ",", "oStep", ",", "aAdditionalClasses", ",", "fAddAdditionalBoxContent", ",", "sId", ")", "{", "rm", ".", "write", "(", "\"<li\"", ")", ";", "if", "(", "sId", ")", "{", "//Write the given Id if available, otherwise use wr...
Writes the step HTML into the rendermanger
[ "Writes", "the", "step", "HTML", "into", "the", "rendermanger" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/RoadMapRenderer.js#L555-L624
train
Writes the given control to the rendermanger
[ 30522, 3853, 1006, 28549, 1010, 20298, 4215, 2863, 2361, 1010, 9808, 2618, 2361, 1010, 9779, 14141, 22753, 2389, 26266, 2229, 1010, 6904, 25062, 14141, 22753, 2389, 8758, 8663, 6528, 2102, 1010, 15765, 1007, 1063, 28549, 1012, 4339, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/comma-style.js
validateCommaItemSpacing
function validateCommaItemSpacing(previousItemToken, commaToken, currentItemToken, reportItem) { // if single line if (astUtils.isTokenOnSameLine(commaToken, currentItemToken) && astUtils.isTokenOnSameLine(previousItemToken, commaToken)) { // do nothing. ...
javascript
function validateCommaItemSpacing(previousItemToken, commaToken, currentItemToken, reportItem) { // if single line if (astUtils.isTokenOnSameLine(commaToken, currentItemToken) && astUtils.isTokenOnSameLine(previousItemToken, commaToken)) { // do nothing. ...
[ "function", "validateCommaItemSpacing", "(", "previousItemToken", ",", "commaToken", ",", "currentItemToken", ",", "reportItem", ")", "{", "// if single line", "if", "(", "astUtils", ".", "isTokenOnSameLine", "(", "commaToken", ",", "currentItemToken", ")", "&&", "ast...
Validates the spacing around single items in lists. @param {Token} previousItemToken The last token from the previous item. @param {Token} commaToken The token representing the comma. @param {Token} currentItemToken The first token of the current item. @param {Token} reportItem The item to use when reporting an error. ...
[ "Validates", "the", "spacing", "around", "single", "items", "in", "lists", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/comma-style.js#L130-L177
train
Validate spacing between comma and current item
[ 30522, 3853, 9398, 3686, 9006, 2863, 4221, 5244, 19498, 2075, 1006, 3025, 4221, 20492, 11045, 2078, 1010, 4012, 18900, 11045, 2078, 1010, 2783, 4221, 20492, 11045, 2078, 1010, 3189, 4221, 2213, 1007, 1063, 1013, 1013, 2065, 2309, 2240, 2065...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.commons/src/sap/ui/commons/layout/AbsoluteLayout.js
function(aPositions) { for (var index = 0; index < aPositions.length; index++) { var oPosition = aPositions[index]; var oChildControl = oPosition.getControl(); if (oChildControl) { AbsoluteLayout.cleanUpControl(oChildControl); } } }
javascript
function(aPositions) { for (var index = 0; index < aPositions.length; index++) { var oPosition = aPositions[index]; var oChildControl = oPosition.getControl(); if (oChildControl) { AbsoluteLayout.cleanUpControl(oChildControl); } } }
[ "function", "(", "aPositions", ")", "{", "for", "(", "var", "index", "=", "0", ";", "index", "<", "aPositions", ".", "length", ";", "index", "++", ")", "{", "var", "oPosition", "=", "aPositions", "[", "index", "]", ";", "var", "oChildControl", "=", "...
Cleanup modifications of all child controls of the given positions. @private
[ "Cleanup", "modifications", "of", "all", "child", "controls", "of", "the", "given", "positions", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/layout/AbsoluteLayout.js#L520-L528
train
clean up the control that is not part of the layout
[ 30522, 3853, 1006, 9706, 19234, 2015, 1007, 1063, 2005, 1006, 13075, 5950, 1027, 1014, 1025, 5950, 1026, 9706, 19234, 2015, 1012, 3091, 1025, 5950, 1009, 1009, 1007, 1063, 13075, 6728, 19234, 1027, 9706, 19234, 2015, 1031, 5950, 1033, 1025,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
function( time, type ) { time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; type = type || "fx"; return this.queue( type, function() { var elem = this; setTimeout(function() { jQuery.dequeue( elem, type ); }, time ); }); }
javascript
function( time, type ) { time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; type = type || "fx"; return this.queue( type, function() { var elem = this; setTimeout(function() { jQuery.dequeue( elem, type ); }, time ); }); }
[ "function", "(", "time", ",", "type", ")", "{", "time", "=", "jQuery", ".", "fx", "?", "jQuery", ".", "fx", ".", "speeds", "[", "time", "]", "||", "time", ":", "time", ";", "type", "=", "type", "||", "\"fx\"", ";", "return", "this", ".", "queue",...
Based off of the plugin by Clint Helfers, with permission. http://blindsignals.com/index.php/2009/07/jquery-delay/
[ "Based", "off", "of", "the", "plugin", "by", "Clint", "Helfers", "with", "permission", ".", "http", ":", "//", "blindsignals", ".", "com", "/", "index", ".", "php", "/", "2009", "/", "07", "/", "jquery", "-", "delay", "/" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L3778-L3788
train
set timeout
[ 30522, 3853, 1006, 2051, 1010, 2828, 1007, 1063, 2051, 1027, 1046, 4226, 2854, 1012, 23292, 1029, 1046, 4226, 2854, 1012, 23292, 1012, 10898, 1031, 2051, 1033, 1064, 1064, 2051, 1024, 2051, 1025, 2828, 1027, 2828, 1064, 1064, 1000, 23292, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/MultiBrowserImpl/protocol/remote/LiveDevProtocolRemote.js
function (msg) { var i, sheet, text = ""; for (i = 0; i < window.document.styleSheets.length; i++) { sheet = window.document.styleSheets[i]; // if it was already 'reloaded' if (sheet.ownerNode.id === msg.params.url)...
javascript
function (msg) { var i, sheet, text = ""; for (i = 0; i < window.document.styleSheets.length; i++) { sheet = window.document.styleSheets[i]; // if it was already 'reloaded' if (sheet.ownerNode.id === msg.params.url)...
[ "function", "(", "msg", ")", "{", "var", "i", ",", "sheet", ",", "text", "=", "\"\"", ";", "for", "(", "i", "=", "0", ";", "i", "<", "window", ".", "document", ".", "styleSheets", ".", "length", ";", "i", "++", ")", "{", "sheet", "=", "window",...
retrieves the content of the stylesheet TODO: it now depends on reloadCSS implementation
[ "retrieves", "the", "content", "of", "the", "stylesheet", "TODO", ":", "it", "now", "depends", "on", "reloadCSS", "implementation" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/LiveDevelopment/MultiBrowserImpl/protocol/remote/LiveDevProtocolRemote.js#L193-L228
train
Aliquivo a un url
[ 30522, 3853, 1006, 5796, 2290, 1007, 1063, 13075, 1045, 1010, 7123, 1010, 3793, 1027, 1000, 1000, 1025, 2005, 1006, 1045, 1027, 1014, 1025, 1045, 1026, 3332, 1012, 6254, 1012, 6782, 21030, 3215, 1012, 3091, 1025, 1045, 1009, 1009, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/InlineTimingFunctionEditor/BezierCurveEditor.js
_pointMouseMove
function _pointMouseMove(e) { var self = e.target, bezierEditor = self.bezierEditor, curveBoundingBox = bezierEditor._getCurveBoundingBox(), left = curveBoundingBox.left, top = curveBoundingBox.top, x = e.pageX - left, y = e.pageY - top - ...
javascript
function _pointMouseMove(e) { var self = e.target, bezierEditor = self.bezierEditor, curveBoundingBox = bezierEditor._getCurveBoundingBox(), left = curveBoundingBox.left, top = curveBoundingBox.top, x = e.pageX - left, y = e.pageY - top - ...
[ "function", "_pointMouseMove", "(", "e", ")", "{", "var", "self", "=", "e", ".", "target", ",", "bezierEditor", "=", "self", ".", "bezierEditor", ",", "curveBoundingBox", "=", "bezierEditor", ".", "_getCurveBoundingBox", "(", ")", ",", "left", "=", "curveBou...
Handle mouse move in <button> element @param {Event} e Mouse move event
[ "Handle", "mouse", "move", "in", "<button", ">", "element" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/InlineTimingFunctionEditor/BezierCurveEditor.js#L384-L400
train
handle point mouse move
[ 30522, 3853, 1035, 2391, 27711, 6633, 21818, 1006, 1041, 1007, 1063, 13075, 2969, 1027, 1041, 1012, 4539, 1010, 2022, 21548, 2098, 15660, 1027, 2969, 1012, 2022, 21548, 2098, 15660, 1010, 7774, 15494, 2075, 8758, 1027, 2022, 21548, 2098, 15...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.doughnut.js
function(arcs) { var me = this; var max = 0; var chart = me.chart; var i, ilen, meta, arc, controller, options, borderWidth, hoverWidth; if (!arcs) { // Find the outmost visible dataset for (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) { if (chart.isDatasetVisible(i)) { meta = char...
javascript
function(arcs) { var me = this; var max = 0; var chart = me.chart; var i, ilen, meta, arc, controller, options, borderWidth, hoverWidth; if (!arcs) { // Find the outmost visible dataset for (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) { if (chart.isDatasetVisible(i)) { meta = char...
[ "function", "(", "arcs", ")", "{", "var", "me", "=", "this", ";", "var", "max", "=", "0", ";", "var", "chart", "=", "me", ".", "chart", ";", "var", "i", ",", "ilen", ",", "meta", ",", "arc", ",", "controller", ",", "options", ",", "borderWidth", ...
gets the max border or hover width to properly scale pie charts
[ "gets", "the", "max", "border", "or", "hover", "width", "to", "properly", "scale", "pie", "charts" ]
f093c36574d290330ed623e60fbd070421c730d5
https://github.com/chartjs/Chart.js/blob/f093c36574d290330ed623e60fbd070421c730d5/src/controllers/controller.doughnut.js#L292-L333
train
Find the max visible dataset
[ 30522, 30524, 3675, 9148, 11927, 2232, 1010, 25215, 2099, 9148, 11927, 2232, 1025, 2065, 1006, 999, 29137, 1007, 1063, 1013, 1013, 2424, 1996, 2041, 11800, 5710, 2951, 13462, 2005, 1006, 1045, 1027, 1014, 1010, 17869, 2078, 1027, 3673, 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...
adobe/brackets
src/editor/MultiRangeInlineEditor.js
_getPrefsContext
function _getPrefsContext() { var projectRoot = ProjectManager.getProjectRoot(); // note: null during unit tests! return { location : { scope: "user", layer: "project", layerID: projectRoot && projectRoot.fullPath } }; }
javascript
function _getPrefsContext() { var projectRoot = ProjectManager.getProjectRoot(); // note: null during unit tests! return { location : { scope: "user", layer: "project", layerID: projectRoot && projectRoot.fullPath } }; }
[ "function", "_getPrefsContext", "(", ")", "{", "var", "projectRoot", "=", "ProjectManager", ".", "getProjectRoot", "(", ")", ";", "// note: null during unit tests!", "return", "{", "location", ":", "{", "scope", ":", "\"user\"", ",", "layer", ":", "\"project\"", ...
Returns a 'context' object for getting/setting project-specific preferences
[ "Returns", "a", "context", "object", "for", "getting", "/", "setting", "project", "-", "specific", "preferences" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/editor/MultiRangeInlineEditor.js#L64-L67
train
Get the context for the preferences file
[ 30522, 3853, 1035, 2131, 28139, 10343, 8663, 18209, 1006, 1007, 1063, 13075, 2622, 3217, 4140, 1027, 2622, 24805, 4590, 1012, 2131, 21572, 20614, 3217, 4140, 1006, 1007, 1025, 1013, 1013, 3602, 1024, 19701, 2076, 3131, 5852, 999, 2709, 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...
airbnb/enzyme
packages/enzyme-adapter-react-16/src/findCurrentFiberUsingSlowPath.js
findCurrentFiberUsingSlowPath
function findCurrentFiberUsingSlowPath(fiber) { const { alternate } = fiber; if (!alternate) { return fiber; } // If we have two possible branches, we'll walk backwards up to the root // to see what path the root points to. On the way we may hit one of the // special cases and we'll deal with them. le...
javascript
function findCurrentFiberUsingSlowPath(fiber) { const { alternate } = fiber; if (!alternate) { return fiber; } // If we have two possible branches, we'll walk backwards up to the root // to see what path the root points to. On the way we may hit one of the // special cases and we'll deal with them. le...
[ "function", "findCurrentFiberUsingSlowPath", "(", "fiber", ")", "{", "const", "{", "alternate", "}", "=", "fiber", ";", "if", "(", "!", "alternate", ")", "{", "return", "fiber", ";", "}", "// If we have two possible branches, we'll walk backwards up to the root", "// ...
Extracted from https://github.com/facebook/react/blob/7bdf93b17a35a5d8fcf0ceae0bf48ed5e6b16688/src/renderers/shared/fiber/ReactFiberTreeReflection.js#L104-L228
[ "Extracted", "from", "https", ":", "//", "github", ".", "com", "/", "facebook", "/", "react", "/", "blob", "/", "7bdf93b17a35a5d8fcf0ceae0bf48ed5e6b16688", "/", "src", "/", "renderers", "/", "shared", "/", "fiber", "/", "ReactFiberTreeReflection", ".", "js#L104"...
cd430eae95eba151f17e970ee77c18f09476de0e
https://github.com/airbnb/enzyme/blob/cd430eae95eba151f17e970ee77c18f09476de0e/packages/enzyme-adapter-react-16/src/findCurrentFiberUsingSlowPath.js#L2-L102
train
Finds the current fiber using a slow path.
[ 30522, 3853, 2424, 10841, 14343, 3372, 8873, 5677, 18161, 26338, 15069, 1006, 11917, 1007, 1063, 9530, 3367, 1063, 6585, 1065, 1027, 11917, 1025, 2065, 1006, 999, 6585, 1007, 1063, 2709, 11917, 1025, 1065, 1013, 1013, 2065, 2057, 2031, 2048...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
function( elem ) { if ( !elem || typeof elem === "string" ) { return jQuery.inArray( this[0], // If it receives a string, the selector is used // If it receives nothing, the siblings are used elem ? jQuery( elem ) : this.parent().children() ); } // Locate the position of the desired element retur...
javascript
function( elem ) { if ( !elem || typeof elem === "string" ) { return jQuery.inArray( this[0], // If it receives a string, the selector is used // If it receives nothing, the siblings are used elem ? jQuery( elem ) : this.parent().children() ); } // Locate the position of the desired element retur...
[ "function", "(", "elem", ")", "{", "if", "(", "!", "elem", "||", "typeof", "elem", "===", "\"string\"", ")", "{", "return", "jQuery", ".", "inArray", "(", "this", "[", "0", "]", ",", "// If it receives a string, the selector is used", "// If it receives nothing,...
Determine the position of an element within the matched set of elements
[ "Determine", "the", "position", "of", "an", "element", "within", "the", "matched", "set", "of", "elements" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L6312-L6323
train
Locate the position of the element in the DOM
[ 30522, 3853, 1006, 3449, 6633, 1007, 1063, 2065, 1006, 999, 3449, 6633, 1064, 1064, 2828, 11253, 3449, 6633, 1027, 1027, 1027, 1000, 5164, 1000, 1007, 1063, 2709, 1046, 4226, 2854, 1012, 27118, 11335, 2100, 1006, 2023, 1031, 1014, 1033, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/AutoUpdate/main.js
function () { // Restart button click handler var restartBtnClicked = function () { HealthLogger.sendAnalyticsData( autoUpdateEventNames.AUTOUPDATE_DOWNLOAD_COMPLETE_USER_CLICK_RESTART, "autoUpdate", ...
javascript
function () { // Restart button click handler var restartBtnClicked = function () { HealthLogger.sendAnalyticsData( autoUpdateEventNames.AUTOUPDATE_DOWNLOAD_COMPLETE_USER_CLICK_RESTART, "autoUpdate", ...
[ "function", "(", ")", "{", "// Restart button click handler", "var", "restartBtnClicked", "=", "function", "(", ")", "{", "HealthLogger", ".", "sendAnalyticsData", "(", "autoUpdateEventNames", ".", "AUTOUPDATE_DOWNLOAD_COMPLETE_USER_CLICK_RESTART", ",", "\"autoUpdate\"", ",...
Installer is validated successfully
[ "Installer", "is", "validated", "successfully" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/AutoUpdate/main.js#L911-L957
train
This function is called when the user clicks the restart button and the user clicks the later button
[ 30522, 3853, 1006, 1007, 1063, 1013, 1013, 23818, 6462, 11562, 28213, 13075, 23818, 19279, 12273, 25230, 2098, 1027, 3853, 1006, 1007, 1063, 2740, 21197, 4590, 1012, 4604, 27953, 21252, 16150, 6790, 1006, 8285, 6279, 13701, 18697, 3372, 18442...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
nodejs/node-gyp
lib/configure.js
findAccessibleSync
function findAccessibleSync (logprefix, dir, candidates) { for (var next = 0; next < candidates.length; next++) { var candidate = path.resolve(dir, candidates[next]) try { var fd = fs.openSync(candidate, 'r') } catch (e) { // this candidate was not found or not readable, do nothing ...
javascript
function findAccessibleSync (logprefix, dir, candidates) { for (var next = 0; next < candidates.length; next++) { var candidate = path.resolve(dir, candidates[next]) try { var fd = fs.openSync(candidate, 'r') } catch (e) { // this candidate was not found or not readable, do nothing ...
[ "function", "findAccessibleSync", "(", "logprefix", ",", "dir", ",", "candidates", ")", "{", "for", "(", "var", "next", "=", "0", ";", "next", "<", "candidates", ".", "length", ";", "next", "++", ")", "{", "var", "candidate", "=", "path", ".", "resolve...
Returns the first file or directory from an array of candidates that is readable by the current user, or undefined if none of the candidates are readable.
[ "Returns", "the", "first", "file", "or", "directory", "from", "an", "array", "of", "candidates", "that", "is", "readable", "by", "the", "current", "user", "or", "undefined", "if", "none", "of", "the", "candidates", "are", "readable", "." ]
721eb691cf15556cc2700eda0558d5bad5f84232
https://github.com/nodejs/node-gyp/blob/721eb691cf15556cc2700eda0558d5bad5f84232/lib/configure.js#L350-L366
train
Find a readable file in a directory
[ 30522, 3853, 2424, 6305, 9623, 19307, 6508, 12273, 1006, 8833, 28139, 8873, 2595, 1010, 16101, 1010, 5347, 1007, 1063, 2005, 1006, 13075, 2279, 1027, 1014, 1025, 2279, 1026, 5347, 1012, 3091, 1025, 2279, 1009, 1009, 1007, 1063, 13075, 4018,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
getItemAsNameVal
function getItemAsNameVal (item) { if (!item) { return undefined; } var locals = {}; if (ctrl.itemName) { locals[ ctrl.itemName ] = item; } return locals; }
javascript
function getItemAsNameVal (item) { if (!item) { return undefined; } var locals = {}; if (ctrl.itemName) { locals[ ctrl.itemName ] = item; } return locals; }
[ "function", "getItemAsNameVal", "(", "item", ")", "{", "if", "(", "!", "item", ")", "{", "return", "undefined", ";", "}", "var", "locals", "=", "{", "}", ";", "if", "(", "ctrl", ".", "itemName", ")", "{", "locals", "[", "ctrl", ".", "itemName", "]"...
Returns the locals object for compiling item templates. @param item @returns {Object|undefined}
[ "Returns", "the", "locals", "object", "for", "compiling", "item", "templates", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/autocomplete/js/autocompleteController.js#L667-L678
train
Returns the locals object for the given item
[ 30522, 3853, 2131, 4221, 9335, 18442, 10175, 1006, 8875, 1007, 1063, 2065, 1006, 999, 8875, 1007, 1063, 2709, 6151, 28344, 1025, 1065, 13075, 10575, 1027, 1063, 1065, 1025, 2065, 1006, 14931, 12190, 1012, 8875, 18442, 1007, 1063, 10575, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-js
lib/cloudfront/signer.js
Signer
function Signer(keyPairId, privateKey) { if (keyPairId === void 0 || privateKey === void 0) { throw new Error('A key pair ID and private key are required'); } this.keyPairId = keyPairId; this.privateKey = privateKey; }
javascript
function Signer(keyPairId, privateKey) { if (keyPairId === void 0 || privateKey === void 0) { throw new Error('A key pair ID and private key are required'); } this.keyPairId = keyPairId; this.privateKey = privateKey; }
[ "function", "Signer", "(", "keyPairId", ",", "privateKey", ")", "{", "if", "(", "keyPairId", "===", "void", "0", "||", "privateKey", "===", "void", "0", ")", "{", "throw", "new", "Error", "(", "'A key pair ID and private key are required'", ")", ";", "}", "t...
A signer object can be used to generate signed URLs and cookies for granting access to content on restricted CloudFront distributions. @see http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html @param keyPairId [String] (Required) The ID of the CloudFront key pair being used. @param...
[ "A", "signer", "object", "can", "be", "used", "to", "generate", "signed", "URLs", "and", "cookies", "for", "granting", "access", "to", "content", "on", "restricted", "CloudFront", "distributions", "." ]
c23e5f0edd150f8885267e5f7c8a564f8e6e8562
https://github.com/aws/aws-sdk-js/blob/c23e5f0edd150f8885267e5f7c8a564f8e6e8562/lib/cloudfront/signer.js#L105-L112
train
A signer is a function that can be used to sign a message
[ 30522, 3853, 3696, 2121, 1006, 3145, 4502, 15735, 2094, 1010, 2797, 14839, 1007, 1063, 2065, 1006, 3145, 4502, 15735, 2094, 1027, 1027, 1027, 11675, 1014, 1064, 1064, 2797, 14839, 1027, 1027, 1027, 11675, 1014, 1007, 1063, 5466, 2047, 7561,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
javascript/selenium-core/xpath/util.js
copyArrayIgnoringAttributesWithoutValue
function copyArrayIgnoringAttributesWithoutValue(dst, src) { if (!src) return; for (var i = src.length - 1; i >= 0; --i) { // this test will pass so long as the attribute has a non-empty string // value, even if that value is "false", "0", "undefined", etc. if (src[i].nodeValue) { dst.push(src[i])...
javascript
function copyArrayIgnoringAttributesWithoutValue(dst, src) { if (!src) return; for (var i = src.length - 1; i >= 0; --i) { // this test will pass so long as the attribute has a non-empty string // value, even if that value is "false", "0", "undefined", etc. if (src[i].nodeValue) { dst.push(src[i])...
[ "function", "copyArrayIgnoringAttributesWithoutValue", "(", "dst", ",", "src", ")", "{", "if", "(", "!", "src", ")", "return", ";", "for", "(", "var", "i", "=", "src", ".", "length", "-", "1", ";", "i", ">=", "0", ";", "--", "i", ")", "{", "// this...
This is an optimization for copying attribute lists in IE. IE includes many extraneous properties in its DOM attribute lists, which take require significant extra processing when evaluating attribute steps. With this function, we ignore any such attributes that has an empty string value.
[ "This", "is", "an", "optimization", "for", "copying", "attribute", "lists", "in", "IE", ".", "IE", "includes", "many", "extraneous", "properties", "in", "its", "DOM", "attribute", "lists", "which", "take", "require", "significant", "extra", "processing", "when",...
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/xpath/util.js#L235-L245
train
copy array without value
[ 30522, 3853, 6100, 2906, 9447, 23773, 28741, 20697, 18886, 8569, 4570, 24415, 5833, 10175, 5657, 1006, 16233, 2102, 1010, 5034, 2278, 1007, 1063, 2065, 1006, 999, 5034, 2278, 1007, 2709, 1025, 2005, 1006, 13075, 1045, 1027, 5034, 2278, 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...
eslint/eslint
lib/rules/operator-linebreak.js
getFixer
function getFixer(operatorToken, desiredStyle) { return fixer => { const tokenBefore = sourceCode.getTokenBefore(operatorToken); const tokenAfter = sourceCode.getTokenAfter(operatorToken); const textBefore = sourceCode.text.slice(tokenBefore.range[1], operator...
javascript
function getFixer(operatorToken, desiredStyle) { return fixer => { const tokenBefore = sourceCode.getTokenBefore(operatorToken); const tokenAfter = sourceCode.getTokenAfter(operatorToken); const textBefore = sourceCode.text.slice(tokenBefore.range[1], operator...
[ "function", "getFixer", "(", "operatorToken", ",", "desiredStyle", ")", "{", "return", "fixer", "=>", "{", "const", "tokenBefore", "=", "sourceCode", ".", "getTokenBefore", "(", "operatorToken", ")", ";", "const", "tokenAfter", "=", "sourceCode", ".", "getTokenA...
-------------------------------------------------------------------------- Helpers -------------------------------------------------------------------------- Gets a fixer function to fix rule issues @param {Token} operatorToken The operator token of an expression @param {string} desiredStyle The style for the rule. On...
[ "--------------------------------------------------------------------------", "Helpers", "--------------------------------------------------------------------------", "Gets", "a", "fixer", "function", "to", "fix", "rule", "issues" ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/operator-linebreak.js#L80-L130
train
Returns a fixer function that fixes an operator token if it has linebreaks.
[ 30522, 3853, 2131, 8873, 2595, 2121, 1006, 6872, 18715, 2368, 1010, 9059, 21756, 2571, 1007, 1063, 2709, 8081, 2121, 1027, 1028, 1063, 9530, 3367, 19204, 4783, 29278, 2063, 1027, 3120, 16044, 1012, 2131, 18715, 2368, 4783, 29278, 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...
eslint/eslint
lib/linter.js
getScope
function getScope(scopeManager, currentNode) { // On Program node, get the outermost scope to avoid return Node.js special function scope or ES modules scope. const inner = currentNode.type !== "Program"; for (let node = currentNode; node; node = node.parent) { const scope = scopeManager.acquire(n...
javascript
function getScope(scopeManager, currentNode) { // On Program node, get the outermost scope to avoid return Node.js special function scope or ES modules scope. const inner = currentNode.type !== "Program"; for (let node = currentNode; node; node = node.parent) { const scope = scopeManager.acquire(n...
[ "function", "getScope", "(", "scopeManager", ",", "currentNode", ")", "{", "// On Program node, get the outermost scope to avoid return Node.js special function scope or ES modules scope.", "const", "inner", "=", "currentNode", ".", "type", "!==", "\"Program\"", ";", "for", "("...
Gets the scope for the current node @param {ScopeManager} scopeManager The scope manager for this AST @param {ASTNode} currentNode The node to get the scope of @returns {eslint-scope.Scope} The scope information for this node
[ "Gets", "the", "scope", "for", "the", "current", "node" ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/linter.js#L546-L563
train
Get the scope of the current node
[ 30522, 3853, 4152, 16186, 1006, 9531, 24805, 4590, 1010, 2783, 3630, 3207, 1007, 1063, 1013, 1013, 2006, 2565, 13045, 1010, 2131, 1996, 6058, 11800, 9531, 2000, 4468, 2709, 13045, 1012, 1046, 2015, 2569, 3853, 9531, 2030, 9686, 14184, 9531,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mui-org/material-ui
docs/src/pages/getting-started/page-layout-examples/dashboard/Orders.js
createData
function createData(id, date, name, shipTo, paymentMethod, amount) { return { id, date, name, shipTo, paymentMethod, amount }; }
javascript
function createData(id, date, name, shipTo, paymentMethod, amount) { return { id, date, name, shipTo, paymentMethod, amount }; }
[ "function", "createData", "(", "id", ",", "date", ",", "name", ",", "shipTo", ",", "paymentMethod", ",", "amount", ")", "{", "return", "{", "id", ",", "date", ",", "name", ",", "shipTo", ",", "paymentMethod", ",", "amount", "}", ";", "}" ]
Generate Order Data
[ "Generate", "Order", "Data" ]
1555e52367835946382fbf2a8f681de71318915d
https://github.com/mui-org/material-ui/blob/1555e52367835946382fbf2a8f681de71318915d/docs/src/pages/getting-started/page-layout-examples/dashboard/Orders.js#L14-L16
train
Create data object
[ 30522, 3853, 2580, 6790, 1006, 8909, 1010, 3058, 1010, 2171, 1010, 2911, 3406, 1010, 7909, 11368, 6806, 2094, 1010, 3815, 1007, 1063, 2709, 1063, 8909, 1010, 3058, 1010, 2171, 1010, 2911, 3406, 1010, 7909, 11368, 6806, 2094, 1010, 3815, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dcloudio/mui
examples/hello-mui/js/mui.js
function(starts, moves) { if(starts.length >= 2 && moves.length >= 2) { var props = ['pageX', 'pageY']; return getDistance(moves[1], moves[0], props) / getDistance(starts[1], starts[0], props); } return 1; }
javascript
function(starts, moves) { if(starts.length >= 2 && moves.length >= 2) { var props = ['pageX', 'pageY']; return getDistance(moves[1], moves[0], props) / getDistance(starts[1], starts[0], props); } return 1; }
[ "function", "(", "starts", ",", "moves", ")", "{", "if", "(", "starts", ".", "length", ">=", "2", "&&", "moves", ".", "length", ">=", "2", ")", "{", "var", "props", "=", "[", "'pageX'", ",", "'pageY'", "]", ";", "return", "getDistance", "(", "moves...
scale @param {Object} starts @param {Object} moves
[ "scale" ]
ff74c90a1671a552f3604b1288bf38a4126312d0
https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/hello-mui/js/mui.js#L1194-L1200
train
Calculate the distance between two points
[ 30522, 3853, 1006, 4627, 1010, 5829, 1007, 1063, 2065, 1006, 4627, 1012, 3091, 1028, 1027, 1016, 1004, 1004, 5829, 1012, 3091, 1028, 1027, 1016, 1007, 1063, 13075, 24387, 1027, 1031, 1005, 3931, 2595, 1005, 1010, 1005, 3931, 2100, 1005, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/LiveDevelopment/Agents/RemoteFunctions.js
isInViewport
function isInViewport(element) { var rect = element.getBoundingClientRect(); var html = window.document.documentElement; return ( rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || html.clientHeight) && rect.right <= (window.i...
javascript
function isInViewport(element) { var rect = element.getBoundingClientRect(); var html = window.document.documentElement; return ( rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || html.clientHeight) && rect.right <= (window.i...
[ "function", "isInViewport", "(", "element", ")", "{", "var", "rect", "=", "element", ".", "getBoundingClientRect", "(", ")", ";", "var", "html", "=", "window", ".", "document", ".", "documentElement", ";", "return", "(", "rect", ".", "top", ">=", "0", "&...
Checks if the element is in Viewport in the client browser
[ "Checks", "if", "the", "element", "is", "in", "Viewport", "in", "the", "client", "browser" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/LiveDevelopment/Agents/RemoteFunctions.js#L122-L131
train
Check if an element is in viewport
[ 30522, 3853, 2003, 2378, 8584, 6442, 1006, 5783, 1007, 1063, 13075, 28667, 2102, 1027, 5783, 1012, 2131, 15494, 2075, 20464, 11638, 2890, 6593, 1006, 1007, 1025, 13075, 16129, 1027, 3332, 1012, 6254, 1012, 6254, 12260, 3672, 1025, 2709, 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...
SAP/openui5
src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js
_getODataPropertiesOfModel
function _getODataPropertiesOfModel(oElement, sAggregationName) { var oModel = oElement.getModel(); var mData = { property: [], navigationProperty: [], navigationEntityNames: [] }; if (oModel) { var sModelName = oModel.getMetadata().getName(); if (sModelName === "sap.ui.model.odata.ODataModel" |...
javascript
function _getODataPropertiesOfModel(oElement, sAggregationName) { var oModel = oElement.getModel(); var mData = { property: [], navigationProperty: [], navigationEntityNames: [] }; if (oModel) { var sModelName = oModel.getMetadata().getName(); if (sModelName === "sap.ui.model.odata.ODataModel" |...
[ "function", "_getODataPropertiesOfModel", "(", "oElement", ",", "sAggregationName", ")", "{", "var", "oModel", "=", "oElement", ".", "getModel", "(", ")", ";", "var", "mData", "=", "{", "property", ":", "[", "]", ",", "navigationProperty", ":", "[", "]", "...
Fetching all available properties of the Element's Model @param {sap.ui.core.Control} oElement - Control instance @param {string} sAggregationName - aggregation name of the action @return {Promise} - Returns Promise with results @private
[ "Fetching", "all", "available", "properties", "of", "the", "Element", "s", "Model" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js#L157-L217
train
Returns an object with all the properties of the given model
[ 30522, 3853, 1035, 2131, 13390, 2696, 21572, 4842, 7368, 11253, 5302, 9247, 1006, 1051, 12260, 3672, 1010, 7842, 13871, 2890, 12540, 18442, 1007, 1063, 13075, 18168, 10244, 2140, 1027, 1051, 12260, 3672, 1012, 2131, 5302, 9247, 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/material
src/components/bottomSheet/bottom-sheet.js
registerGestures
function registerGestures(element, parent) { var deregister = $mdGesture.register(parent, 'drag', { horizontal: false }); parent.on('$md.dragstart', onDragStart) .on('$md.drag', onDrag) .on('$md.dragend', onDragEnd); return function cleanupGestures() { deregister(); pa...
javascript
function registerGestures(element, parent) { var deregister = $mdGesture.register(parent, 'drag', { horizontal: false }); parent.on('$md.dragstart', onDragStart) .on('$md.drag', onDrag) .on('$md.dragend', onDragEnd); return function cleanupGestures() { deregister(); pa...
[ "function", "registerGestures", "(", "element", ",", "parent", ")", "{", "var", "deregister", "=", "$mdGesture", ".", "register", "(", "parent", ",", "'drag'", ",", "{", "horizontal", ":", "false", "}", ")", ";", "parent", ".", "on", "(", "'$md.dragstart'"...
Adds the drag gestures to the bottom sheet.
[ "Adds", "the", "drag", "gestures", "to", "the", "bottom", "sheet", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/bottomSheet/bottom-sheet.js#L307-L346
train
Register a drag gesture
[ 30522, 3853, 4236, 8449, 22662, 1006, 5783, 1010, 6687, 1007, 1063, 13075, 4315, 13910, 12911, 1027, 1002, 9108, 8449, 11244, 1012, 4236, 1006, 6687, 1010, 1005, 8011, 1005, 1010, 1063, 9876, 1024, 6270, 1065, 1007, 1025, 6687, 1012, 2006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/JavaScriptRefactoring/ExtractToFunction.js
extract
function extract(ast, text, scopes, srcScope, destScope, start, end, isExpression) { var retObj = analyzeCode(text, scopes, srcScope, destScope, start, end), passParams = retObj.passParams, retParams = retObj.retParams, thisPointerUsed ...
javascript
function extract(ast, text, scopes, srcScope, destScope, start, end, isExpression) { var retObj = analyzeCode(text, scopes, srcScope, destScope, start, end), passParams = retObj.passParams, retParams = retObj.retParams, thisPointerUsed ...
[ "function", "extract", "(", "ast", ",", "text", ",", "scopes", ",", "srcScope", ",", "destScope", ",", "start", ",", "end", ",", "isExpression", ")", "{", "var", "retObj", "=", "analyzeCode", "(", "text", ",", "scopes", ",", "srcScope", ",", "destScope",...
Does the actual extraction. i.e Replacing the text, Creating a function and multi select function names
[ "Does", "the", "actual", "extraction", ".", "i", ".", "e", "Replacing", "the", "text", "Creating", "a", "function", "and", "multi", "select", "function", "names" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/JavaScriptRefactoring/ExtractToFunction.js#L142-L260
train
Extract the code from the source code
[ 30522, 3853, 14817, 1006, 2004, 2102, 1010, 3793, 1010, 9531, 2015, 1010, 5034, 6169, 16186, 30524, 2015, 1010, 5034, 6169, 16186, 1010, 4078, 3215, 16186, 1010, 2707, 1010, 2203, 1007, 1010, 3413, 28689, 5244, 1027, 2128, 3406, 2497, 3501,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.table/src/sap/ui/table/TableGrouping.js
function(oTable) { if (TableGrouping.isGroupMode(oTable) || TableGrouping.isTreeMode(oTable)) { var oBinding = oTable.getBinding("rows"); var oRowBindingInfo = oTable.getBindingInfo("rows"); var aRows = oTable.getRows(); var iCount = aRows.length; var iRow; if (oBinding) { for (iRow = 0...
javascript
function(oTable) { if (TableGrouping.isGroupMode(oTable) || TableGrouping.isTreeMode(oTable)) { var oBinding = oTable.getBinding("rows"); var oRowBindingInfo = oTable.getBindingInfo("rows"); var aRows = oTable.getRows(); var iCount = aRows.length; var iRow; if (oBinding) { for (iRow = 0...
[ "function", "(", "oTable", ")", "{", "if", "(", "TableGrouping", ".", "isGroupMode", "(", "oTable", ")", "||", "TableGrouping", ".", "isTreeMode", "(", "oTable", ")", ")", "{", "var", "oBinding", "=", "oTable", ".", "getBinding", "(", "\"rows\"", ")", ";...
Updates the dom of the rows of the given table. @param {sap.ui.table.Table} oTable Instance of the table. @see TableGrouping.updateTableRowForGrouping @see TableGrouping.cleanupTableRowForGrouping
[ "Updates", "the", "dom", "of", "the", "rows", "of", "the", "given", "table", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableGrouping.js#L454-L474
train
Updates the table with the data from the table s rows.
[ 30522, 3853, 1006, 27178, 3085, 1007, 1063, 2065, 1006, 2795, 17058, 2075, 1012, 2003, 17058, 5302, 3207, 1006, 27178, 3085, 1007, 1064, 1064, 2795, 17058, 2075, 1012, 21541, 9910, 5302, 3207, 1006, 27178, 3085, 1007, 1007, 1063, 13075, 278...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SheetJS/js-xlsx
xlsx.js
fuzzynum
function fuzzynum(s) { var v = Number(s); if(!isNaN(v)) return v; var wt = 1; var ss = s.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g, function() { wt *= 100; return "";}); if(!isNaN(v = Number(ss))) return v / wt; ss = ss.replace(/[(](.*)[)]/,function($$, $1) { wt = -wt; return $1;}); if(!...
javascript
function fuzzynum(s) { var v = Number(s); if(!isNaN(v)) return v; var wt = 1; var ss = s.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g, function() { wt *= 100; return "";}); if(!isNaN(v = Number(ss))) return v / wt; ss = ss.replace(/[(](.*)[)]/,function($$, $1) { wt = -wt; return $1;}); if(!...
[ "function", "fuzzynum", "(", "s", ")", "{", "var", "v", "=", "Number", "(", "s", ")", ";", "if", "(", "!", "isNaN", "(", "v", ")", ")", "return", "v", ";", "var", "wt", "=", "1", ";", "var", "ss", "=", "s", ".", "replace", "(", "/", "([\\d]...
/* TODO: stress test
[ "/", "*", "TODO", ":", "stress", "test" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L2748-L2757
train
Fuzzynum function
[ 30522, 3853, 18001, 19172, 1006, 1055, 1007, 1063, 13075, 1058, 1027, 2193, 1006, 1055, 1007, 1025, 2065, 1006, 999, 3475, 2319, 1006, 1058, 1007, 1007, 2709, 1058, 1025, 13075, 1059, 2102, 1027, 1015, 1025, 13075, 7020, 1027, 1055, 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...
electron/electron
lib/browser/chrome-extension.js
function (manifest) { return { startPage: manifest.startPage, srcDirectory: manifest.srcDirectory, name: manifest.name, exposeExperimentalAPIs: true } }
javascript
function (manifest) { return { startPage: manifest.startPage, srcDirectory: manifest.srcDirectory, name: manifest.name, exposeExperimentalAPIs: true } }
[ "function", "(", "manifest", ")", "{", "return", "{", "startPage", ":", "manifest", ".", "startPage", ",", "srcDirectory", ":", "manifest", ".", "srcDirectory", ",", "name", ":", "manifest", ".", "name", ",", "exposeExperimentalAPIs", ":", "true", "}", "}" ]
Transfer the |manifest| to a format that can be recognized by the |DevToolsAPI.addExtensions|.
[ "Transfer", "the", "|manifest|", "to", "a", "format", "that", "can", "be", "recognized", "by", "the", "|DevToolsAPI", ".", "addExtensions|", "." ]
6e29611788277729647acf465f10db1ea6f15788
https://github.com/electron/electron/blob/6e29611788277729647acf465f10db1ea6f15788/lib/browser/chrome-extension.js#L357-L364
train
Returns an object with the properties of the specified node - modules containing the node - modules.
[ 30522, 3853, 1006, 19676, 1007, 1063, 2709, 1063, 2707, 13704, 1024, 19676, 1012, 2707, 13704, 1010, 5034, 19797, 7442, 16761, 2100, 1024, 19676, 1012, 5034, 19797, 7442, 16761, 2100, 1010, 2171, 1024, 19676, 1012, 2171, 1010, 14451, 10288, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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(node, text) { if (node.innerText !== undefined) { node.innerText = text; } else { node[(node.textContent === undefined) ? 'text' : 'textContent'] = text; } }
javascript
function(node, text) { if (node.innerText !== undefined) { node.innerText = text; } else { node[(node.textContent === undefined) ? 'text' : 'textContent'] = text; } }
[ "function", "(", "node", ",", "text", ")", "{", "if", "(", "node", ".", "innerText", "!==", "undefined", ")", "{", "node", ".", "innerText", "=", "text", ";", "}", "else", "{", "node", "[", "(", "node", ".", "textContent", "===", "undefined", ")", ...
Function: setTextContent Sets the text content of the specified node. Parameters: node - DOM node to set the text content for. text - String that represents the text content.
[ "Function", ":", "setTextContent" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L3110-L3120
train
set text on node
[ 30522, 3853, 1006, 13045, 1010, 3793, 1007, 1063, 2065, 1006, 13045, 1012, 5110, 18209, 999, 1027, 1027, 6151, 28344, 1007, 1063, 13045, 1012, 5110, 18209, 1027, 3793, 1025, 1065, 2842, 1063, 13045, 1031, 1006, 13045, 1012, 3793, 8663, 6528...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mochajs/mocha
lib/reporters/json.js
cleanCycles
function cleanCycles(obj) { var cache = []; return JSON.parse( JSON.stringify(obj, function(key, value) { if (typeof value === 'object' && value !== null) { if (cache.indexOf(value) !== -1) { // Instead of going in a circle, we'll print [object Object] return '' + value; ...
javascript
function cleanCycles(obj) { var cache = []; return JSON.parse( JSON.stringify(obj, function(key, value) { if (typeof value === 'object' && value !== null) { if (cache.indexOf(value) !== -1) { // Instead of going in a circle, we'll print [object Object] return '' + value; ...
[ "function", "cleanCycles", "(", "obj", ")", "{", "var", "cache", "=", "[", "]", ";", "return", "JSON", ".", "parse", "(", "JSON", ".", "stringify", "(", "obj", ",", "function", "(", "key", ",", "value", ")", "{", "if", "(", "typeof", "value", "==="...
Replaces any circular references inside `obj` with '[object Object]' @private @param {Object} obj @return {Object}
[ "Replaces", "any", "circular", "references", "inside", "obj", "with", "[", "object", "Object", "]" ]
9b00fedb610241e33f7592c40164e42a38a793cf
https://github.com/mochajs/mocha/blob/9b00fedb610241e33f7592c40164e42a38a793cf/lib/reporters/json.js#L103-L118
train
Clean the object
[ 30522, 3853, 4550, 23490, 2015, 1006, 27885, 3501, 1007, 1063, 13075, 17053, 1027, 1031, 1033, 1025, 2709, 1046, 3385, 1012, 11968, 3366, 1006, 1046, 3385, 1012, 5164, 8757, 1006, 27885, 3501, 1010, 3853, 1006, 3145, 1010, 3643, 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...
Dogfalo/materialize
dist/js/materialize.js
ScrollSpy
function ScrollSpy(el, options) { _classCallCheck(this, ScrollSpy); var _this35 = _possibleConstructorReturn(this, (ScrollSpy.__proto__ || Object.getPrototypeOf(ScrollSpy)).call(this, ScrollSpy, el, options)); _this35.el.M_ScrollSpy = _this35; /** * Options for the modal * @memb...
javascript
function ScrollSpy(el, options) { _classCallCheck(this, ScrollSpy); var _this35 = _possibleConstructorReturn(this, (ScrollSpy.__proto__ || Object.getPrototypeOf(ScrollSpy)).call(this, ScrollSpy, el, options)); _this35.el.M_ScrollSpy = _this35; /** * Options for the modal * @memb...
[ "function", "ScrollSpy", "(", "el", ",", "options", ")", "{", "_classCallCheck", "(", "this", ",", "ScrollSpy", ")", ";", "var", "_this35", "=", "_possibleConstructorReturn", "(", "this", ",", "(", "ScrollSpy", ".", "__proto__", "||", "Object", ".", "getProt...
Construct ScrollSpy instance @constructor @param {Element} el @param {Object} options
[ "Construct", "ScrollSpy", "instance" ]
1122efadad8f1433d404696f7613e3cc13fb83a4
https://github.com/Dogfalo/materialize/blob/1122efadad8f1433d404696f7613e3cc13fb83a4/dist/js/materialize.js#L6129-L6155
train
Construct a new ScrollSpy instance
[ 30522, 3853, 23074, 7685, 1006, 3449, 1010, 7047, 1007, 1063, 1035, 2465, 9289, 29358, 11012, 1006, 2023, 1010, 23074, 7685, 1007, 1025, 13075, 1035, 2023, 19481, 1027, 1035, 2825, 8663, 3367, 6820, 16761, 13465, 14287, 1006, 2023, 1010, 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...
apache/incubator-echarts
src/data/Tree.js
function (options, cb, context) { if (typeof options === 'function') { context = cb; cb = options; options = null; } options = options || {}; if (zrUtil.isString(options)) { options = {order: options}; } var order = option...
javascript
function (options, cb, context) { if (typeof options === 'function') { context = cb; cb = options; options = null; } options = options || {}; if (zrUtil.isString(options)) { options = {order: options}; } var order = option...
[ "function", "(", "options", ",", "cb", ",", "context", ")", "{", "if", "(", "typeof", "options", "===", "'function'", ")", "{", "context", "=", "cb", ";", "cb", "=", "options", ";", "options", "=", "null", ";", "}", "options", "=", "options", "||", ...
Travel this subtree (include this node). Usage: node.eachNode(function () { ... }); // preorder node.eachNode('preorder', function () { ... }); // preorder node.eachNode('postorder', function () { ... }); // postorder node.eachNode( {order: 'postorder', attr: 'viewChildren'}, function () { ... } ); // postorder @param...
[ "Travel", "this", "subtree", "(", "include", "this", "node", ")", ".", "Usage", ":", "node", ".", "eachNode", "(", "function", "()", "{", "...", "}", ")", ";", "//", "preorder", "node", ".", "eachNode", "(", "preorder", "function", "()", "{", "...", ...
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/data/Tree.js#L125-L148
train
Iterate over all nodes in the tree and call the callback with the node
[ 30522, 3853, 1006, 7047, 1010, 17324, 1010, 6123, 1007, 1063, 2065, 1006, 2828, 11253, 7047, 1027, 1027, 1027, 1005, 3853, 1005, 1007, 1063, 6123, 1027, 17324, 1025, 17324, 1027, 7047, 1025, 7047, 1027, 19701, 1025, 1065, 7047, 1027, 7047, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/GrowingEnablement.js
function(oBinding) { var aSorters = oBinding.aSorters || []; var oSorter = aSorters[0] || {}; return (oSorter.fnGroup) ? oSorter.sPath || "" : ""; }
javascript
function(oBinding) { var aSorters = oBinding.aSorters || []; var oSorter = aSorters[0] || {}; return (oSorter.fnGroup) ? oSorter.sPath || "" : ""; }
[ "function", "(", "oBinding", ")", "{", "var", "aSorters", "=", "oBinding", ".", "aSorters", "||", "[", "]", ";", "var", "oSorter", "=", "aSorters", "[", "0", "]", "||", "{", "}", ";", "return", "(", "oSorter", ".", "fnGroup", ")", "?", "oSorter", "...
returns the first sorters grouping path when available
[ "returns", "the", "first", "sorters", "grouping", "path", "when", "available" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/GrowingEnablement.js#L269-L273
train
Returns the path of the first sorter in the list of sorters
[ 30522, 3853, 1006, 27885, 22254, 2075, 1007, 1063, 13075, 2004, 11589, 2545, 1027, 30524, 14690, 2232, 1064, 1064, 1000, 1000, 1024, 1000, 1000, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
showInterfaceIdlMethod
function showInterfaceIdlMethod(method, html) { var line = "\n " var allParameters = method.parameters.concat(method.callbackParameters) line += getIdlType(method.returns) line += " <span class='methodName'>" + method.name + "</span> (" + getIdlParameterList(allParameters) + ");" html.push(line)...
javascript
function showInterfaceIdlMethod(method, html) { var line = "\n " var allParameters = method.parameters.concat(method.callbackParameters) line += getIdlType(method.returns) line += " <span class='methodName'>" + method.name + "</span> (" + getIdlParameterList(allParameters) + ");" html.push(line)...
[ "function", "showInterfaceIdlMethod", "(", "method", ",", "html", ")", "{", "var", "line", "=", "\"\\n \"", "var", "allParameters", "=", "method", ".", "parameters", ".", "concat", "(", "method", ".", "callbackParameters", ")", "line", "+=", "getIdlType", "(...
-----------------------------------------------------------------------------
[ "-----------------------------------------------------------------------------" ]
55c1dda0dff0c44920673711656ddfd7ff03c307
https://github.com/wuchangming/spy-debugger/blob/55c1dda0dff0c44920673711656ddfd7ff03c307/buildin_modules/weinre/web/interfaces/interfaces.js#L179-L187
train
showInterfaceIdlMethod - Show the method
[ 30522, 3853, 2265, 18447, 2121, 12172, 3593, 13728, 11031, 7716, 1006, 4118, 1010, 16129, 1007, 1063, 13075, 2240, 1027, 1000, 1032, 1050, 1000, 13075, 2035, 28689, 22828, 2015, 1027, 4118, 1012, 11709, 1012, 9530, 11266, 1006, 4118, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(aMeasureName) { if (!aMeasureName) { aMeasureName = this._oQueryResult.getAllMeasureNames(); } this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties this._oMeasures = {}; for (var i = -1, sMeasName; (sMeasName = aMeasureName[++i]) !== undefined;) { ...
javascript
function(aMeasureName) { if (!aMeasureName) { aMeasureName = this._oQueryResult.getAllMeasureNames(); } this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties this._oMeasures = {}; for (var i = -1, sMeasName; (sMeasName = aMeasureName[++i]) !== undefined;) { ...
[ "function", "(", "aMeasureName", ")", "{", "if", "(", "!", "aMeasureName", ")", "{", "aMeasureName", "=", "this", ".", "_oQueryResult", ".", "getAllMeasureNames", "(", ")", ";", "}", "this", ".", "_oSelectedPropertyNames", "=", "null", ";", "// reset previousl...
Set the measures to be included in the query result request. By default, the query result will include the properties holding the raw values of the given measures. This setting can be changed using includeMeasureRawFormattedValueUnit. @param aMeasureName Array of measure names to be part of the query result request. I...
[ "Set", "the", "measures", "to", "be", "included", "in", "the", "query", "result", "request", ".", "By", "default", "the", "query", "result", "will", "include", "the", "properties", "holding", "the", "raw", "values", "of", "the", "given", "measures", ".", "...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L4302-L4320
train
Sets the selected properties of the query result
[ 30522, 3853, 1006, 2572, 5243, 28632, 18442, 1007, 1063, 2065, 1006, 999, 2572, 5243, 28632, 18442, 1007, 1063, 2572, 5243, 28632, 18442, 1027, 2023, 1012, 1035, 1051, 4226, 2854, 6072, 11314, 1012, 2131, 8095, 4168, 3022, 5397, 18442, 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.dt/src/sap/ui/dt/ContextMenuControl.js
function () { var sPopId = this.getId() + "-popover"; var oPopover = new Popover(sPopId, { showHeader: false, verticalScrolling: false, placement: "Top", showArrow: true, horizontalScrolling: false, content: new HBox(sPopId + "ContentBox", { renderType: "Bare" }) }); // Ret...
javascript
function () { var sPopId = this.getId() + "-popover"; var oPopover = new Popover(sPopId, { showHeader: false, verticalScrolling: false, placement: "Top", showArrow: true, horizontalScrolling: false, content: new HBox(sPopId + "ContentBox", { renderType: "Bare" }) }); // Ret...
[ "function", "(", ")", "{", "var", "sPopId", "=", "this", ".", "getId", "(", ")", "+", "\"-popover\"", ";", "var", "oPopover", "=", "new", "Popover", "(", "sPopId", ",", "{", "showHeader", ":", "false", ",", "verticalScrolling", ":", "false", ",", "plac...
initializes the ContextMenu by creating the internal a sap.m.Popover (with a sap.m.Flexbox as a content aggregation) in internal _popovers aggregation of the ContextMenu
[ "initializes", "the", "ContextMenu", "by", "creating", "the", "internal", "a", "sap", ".", "m", ".", "Popover", "(", "with", "a", "sap", ".", "m", ".", "Flexbox", "as", "a", "content", "aggregation", ")", "in", "internal", "_popovers", "aggregation", "of",...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L92-L141
train
Creates the Popover and adds the CSS class to the ContextMenu.
[ 30522, 3853, 1006, 1007, 1063, 13075, 11867, 7361, 3593, 1027, 2023, 1012, 2131, 3593, 1006, 1007, 1009, 1000, 1011, 3769, 7840, 1000, 1025, 13075, 6728, 7361, 7840, 1027, 2047, 3769, 7840, 1006, 11867, 7361, 3593, 1010, 1063, 2265, 4974, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js
function (aColumnsIds, bVisibilityValue) { var aColumns = this.treeTable.getColumns(); aColumns.forEach(function(oColumn) { oColumn.setVisible(!bVisibilityValue); aColumnsIds.forEach(function(sRuleId) { if (oColumn.sId.includes(sRuleId)) { oColumn.setVisible(bVisibilityValue); } }); ...
javascript
function (aColumnsIds, bVisibilityValue) { var aColumns = this.treeTable.getColumns(); aColumns.forEach(function(oColumn) { oColumn.setVisible(!bVisibilityValue); aColumnsIds.forEach(function(sRuleId) { if (oColumn.sId.includes(sRuleId)) { oColumn.setVisible(bVisibilityValue); } }); ...
[ "function", "(", "aColumnsIds", ",", "bVisibilityValue", ")", "{", "var", "aColumns", "=", "this", ".", "treeTable", ".", "getColumns", "(", ")", ";", "aColumns", ".", "forEach", "(", "function", "(", "oColumn", ")", "{", "oColumn", ".", "setVisible", "(",...
Sets visibility to columns. @param {Array} aColumnsIds Ids of columns @param {boolean} bVisibilityValue
[ "Sets", "visibility", "to", "columns", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js#L996-L1007
train
Sets visibility of the columns
[ 30522, 3853, 1006, 9353, 4747, 2819, 3619, 9821, 1010, 1038, 11365, 13464, 10175, 5657, 1007, 1063, 13075, 9353, 4747, 2819, 3619, 1027, 30524, 1006, 3853, 1006, 1051, 25778, 2819, 2078, 1007, 1063, 1051, 25778, 2819, 2078, 1012, 2275, 1136...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/moduleTreeHelper.js
function (oHierarchy, oTree, iDepth, bSelected) { var iSelectionDepth, iInnerSelectionDepth; bSelected = oHierarchy === true || oHierarchy[""] || bSelected; oTree.nodes = []; oTree.selected = bSelected; if (bSelected) { iSelectionDepth = iDepth; } for (var sProperty in oHierarchy) { ...
javascript
function (oHierarchy, oTree, iDepth, bSelected) { var iSelectionDepth, iInnerSelectionDepth; bSelected = oHierarchy === true || oHierarchy[""] || bSelected; oTree.nodes = []; oTree.selected = bSelected; if (bSelected) { iSelectionDepth = iDepth; } for (var sProperty in oHierarchy) { ...
[ "function", "(", "oHierarchy", ",", "oTree", ",", "iDepth", ",", "bSelected", ")", "{", "var", "iSelectionDepth", ",", "iInnerSelectionDepth", ";", "bSelected", "=", "oHierarchy", "===", "true", "||", "oHierarchy", "[", "\"\"", "]", "||", "bSelected", ";", "...
Recursively constructs tree nodes in a format that it can be bound to a sap.m.Tree control @param {object} oHierarchy The module hierarchy node with selected state @param {object} oTree The tree node to be filled with the hierarchy information @param {int} iDepth The current depth of the recursion @param {boolean} bSel...
[ "Recursively", "constructs", "tree", "nodes", "in", "a", "format", "that", "it", "can", "be", "bound", "to", "a", "sap", ".", "m", ".", "Tree", "control" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/moduleTreeHelper.js#L147-L174
train
Sets the selected property of the tree
[ 30522, 3853, 1006, 2821, 3771, 2906, 11714, 1010, 27178, 9910, 1010, 8909, 23606, 2232, 1010, 18667, 12260, 10985, 1007, 1063, 13075, 2003, 12260, 7542, 3207, 13876, 2232, 1010, 2462, 10087, 22573, 2571, 7542, 3207, 13876, 2232, 1025, 18667, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/dom/jquery/Aria.js
addToAttributeList
function addToAttributeList(sAttribute, sValue, bPrepend) { var sAttributes = this.attr(sAttribute); if (!sAttributes) { return this.attr(sAttribute, sValue); } var aAttributes = sAttributes.split(" "); if (aAttributes.indexOf(sValue) == -1) { bPrepend ? aAttributes.unshift(sValue) : aAttributes.push(s...
javascript
function addToAttributeList(sAttribute, sValue, bPrepend) { var sAttributes = this.attr(sAttribute); if (!sAttributes) { return this.attr(sAttribute, sValue); } var aAttributes = sAttributes.split(" "); if (aAttributes.indexOf(sValue) == -1) { bPrepend ? aAttributes.unshift(sValue) : aAttributes.push(s...
[ "function", "addToAttributeList", "(", "sAttribute", ",", "sValue", ",", "bPrepend", ")", "{", "var", "sAttributes", "=", "this", ".", "attr", "(", "sAttribute", ")", ";", "if", "(", "!", "sAttributes", ")", "{", "return", "this", ".", "attr", "(", "sAtt...
This module provides the following API: <ul> <li>{@link jQuery#addAriaLabelledBy}</li> <li>{@link jQuery#removeAriaLabelledBy}</li> <li>{@link jQuery#addAriaDescribedBy}</li> <li>{@link jQuery#removeAriaDescribedBy}</li> </ul> @namespace @name module:sap/ui/dom/jquery/Aria @public @since 1.58 Adds space separated va...
[ "This", "module", "provides", "the", "following", "API", ":", "<ul", ">", "<li", ">", "{", "@link", "jQuery#addAriaLabelledBy", "}", "<", "/", "li", ">", "<li", ">", "{", "@link", "jQuery#removeAriaLabelledBy", "}", "<", "/", "li", ">", "<li", ">", "{", ...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/dom/jquery/Aria.js#L36-L49
train
Adds an attribute to the end of the list of attributes
[ 30522, 3853, 5587, 3406, 19321, 3089, 8569, 9834, 2923, 1006, 2938, 18886, 8569, 2618, 1010, 17917, 2389, 5657, 1010, 17531, 2890, 11837, 2094, 1007, 1063, 13075, 2938, 18886, 8569, 4570, 1027, 2023, 1012, 2012, 16344, 1006, 2938, 18886, 85...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function (aOldColumns, aNewColumns, fnFormatterChanged) { var oNewColumn, oOldColumn, iResult = 0, i, n; if (!aOldColumns || aOldColumns.length !== aNewColumns.length) { return 2; } if (aOldColumns !== aNewColumns) { for (i = 0, n = aOldColumns.length; i < n; i += 1) { ...
javascript
function (aOldColumns, aNewColumns, fnFormatterChanged) { var oNewColumn, oOldColumn, iResult = 0, i, n; if (!aOldColumns || aOldColumns.length !== aNewColumns.length) { return 2; } if (aOldColumns !== aNewColumns) { for (i = 0, n = aOldColumns.length; i < n; i += 1) { ...
[ "function", "(", "aOldColumns", ",", "aNewColumns", ",", "fnFormatterChanged", ")", "{", "var", "oNewColumn", ",", "oOldColumn", ",", "iResult", "=", "0", ",", "i", ",", "n", ";", "if", "(", "!", "aOldColumns", "||", "aOldColumns", ".", "length", "!==", ...
/* @param {object[]} [aOldColumns] @param {object[]} aNewColumns @param {function} [fnFormatterChanged] called for each column where only a formatter has changed @returns {number} 0: same, 1: only formatters changed, 2: important changes
[ "/", "*" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L51-L83
train
Compare two columns
[ 30522, 3853, 1006, 20118, 6392, 25778, 2819, 3619, 1010, 2019, 7974, 25778, 2819, 3619, 1010, 1042, 2078, 14192, 20097, 22305, 2098, 1007, 1063, 13075, 2028, 16526, 4747, 2819, 2078, 1010, 1051, 11614, 25778, 2819, 2078, 1010, 20868, 2229, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
moveDropdown
function moveDropdown () { if (!elements.$.root.length) return; $mdTheming(elements.$.scrollContainer); elements.$.scrollContainer.detach(); elements.$.root.append(elements.$.scrollContainer); if ($animate.pin) $animate.pin(elements.$.scrollContainer, $rootElement); }
javascript
function moveDropdown () { if (!elements.$.root.length) return; $mdTheming(elements.$.scrollContainer); elements.$.scrollContainer.detach(); elements.$.root.append(elements.$.scrollContainer); if ($animate.pin) $animate.pin(elements.$.scrollContainer, $rootElement); }
[ "function", "moveDropdown", "(", ")", "{", "if", "(", "!", "elements", ".", "$", ".", "root", ".", "length", ")", "return", ";", "$mdTheming", "(", "elements", ".", "$", ".", "scrollContainer", ")", ";", "elements", ".", "$", ".", "scrollContainer", "....
Moves the dropdown menu to the body tag in order to avoid z-index and overflow issues.
[ "Moves", "the", "dropdown", "menu", "to", "the", "body", "tag", "in", "order", "to", "avoid", "z", "-", "index", "and", "overflow", "issues", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/autocomplete/js/autocompleteController.js#L218-L224
train
Move the dropdown to the root element
[ 30522, 3853, 2333, 18981, 7698, 1006, 1007, 1063, 2065, 1006, 999, 3787, 1012, 1002, 1012, 7117, 1012, 3091, 1007, 2709, 1025, 1002, 9108, 10760, 6562, 1006, 3787, 1012, 30524, 17186, 8663, 18249, 2121, 1007, 1025, 2065, 1006, 1002, 2019, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/autocomplete.spec.js
fakeItemMatch
function fakeItemMatch() { var matches = []; for (var i = 0; i < dropdownItems; i++) { matches.push('Item ' + i); } return matches; }
javascript
function fakeItemMatch() { var matches = []; for (var i = 0; i < dropdownItems; i++) { matches.push('Item ' + i); } return matches; }
[ "function", "fakeItemMatch", "(", ")", "{", "var", "matches", "=", "[", "]", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "dropdownItems", ";", "i", "++", ")", "{", "matches", ".", "push", "(", "'Item '", "+", "i", ")", ";", "}", "retu...
Function to create fake matches with the given dropdown items. Useful when running tests against the dropdown max items calculations. @returns {Array} Fake matches.
[ "Function", "to", "create", "fake", "matches", "with", "the", "given", "dropdown", "items", ".", "Useful", "when", "running", "tests", "against", "the", "dropdown", "max", "items", "calculations", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/autocomplete/autocomplete.spec.js#L2456-L2464
train
fakeItemMatch - fake item match
[ 30522, 3853, 8275, 4221, 14760, 10649, 1006, 1007, 1063, 13075, 3503, 1027, 1031, 1033, 1025, 2005, 1006, 13075, 1045, 1027, 1014, 1025, 1045, 1026, 30524, 1012, 5245, 1006, 1005, 8875, 1005, 1009, 1045, 1007, 1025, 1065, 2709, 3503, 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...
wuchangming/spy-debugger
buildin_modules/weinre/web/client/UglifyJS/process.js
repeat_string
function repeat_string(str, i) { if (i <= 0) return ""; if (i == 1) return str; var d = repeat_string(str, i >> 1); d += d; if (i & 1) d += str; return d; }
javascript
function repeat_string(str, i) { if (i <= 0) return ""; if (i == 1) return str; var d = repeat_string(str, i >> 1); d += d; if (i & 1) d += str; return d; }
[ "function", "repeat_string", "(", "str", ",", "i", ")", "{", "if", "(", "i", "<=", "0", ")", "return", "\"\"", ";", "if", "(", "i", "==", "1", ")", "return", "str", ";", "var", "d", "=", "repeat_string", "(", "str", ",", "i", ">>", "1", ")", ...
/* -----[ Utilities ]-----
[ "/", "*", "-----", "[", "Utilities", "]", "-----" ]
55c1dda0dff0c44920673711656ddfd7ff03c307
https://github.com/wuchangming/spy-debugger/blob/55c1dda0dff0c44920673711656ddfd7ff03c307/buildin_modules/weinre/web/client/UglifyJS/process.js#L1439-L1446
train
repeat_string - Repeats a string
[ 30522, 3853, 9377, 1035, 5164, 1006, 2358, 2099, 1010, 1045, 1007, 1063, 2065, 1006, 1045, 1026, 1027, 1014, 1007, 2709, 1000, 1000, 1025, 2065, 1006, 1045, 1027, 1027, 1015, 1007, 2709, 2358, 2099, 1025, 13075, 1040, 1027, 9377, 1035, 51...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/base/index.js
onUpdating
function onUpdating(model, attr, options) { if (this.relationships) { model.changed = _.omit(model.changed, this.relationships); } if (schema.tables[this.tableName].hasOwnProperty('updated_by')) { if (!options.importing && !options.migrating) { this.set('...
javascript
function onUpdating(model, attr, options) { if (this.relationships) { model.changed = _.omit(model.changed, this.relationships); } if (schema.tables[this.tableName].hasOwnProperty('updated_by')) { if (!options.importing && !options.migrating) { this.set('...
[ "function", "onUpdating", "(", "model", ",", "attr", ",", "options", ")", "{", "if", "(", "this", ".", "relationships", ")", "{", "model", ".", "changed", "=", "_", ".", "omit", "(", "model", ".", "changed", ",", "this", ".", "relationships", ")", ";...
Changing resources implies setting these properties on the server side - set `updated_by` based on the context - ensure `created_at` never changes - ensure `created_by` never changes - the bookshelf `timestamps` plugin sets `updated_at` automatically Exceptions: - importing data - internal context - if no context @de...
[ "Changing", "resources", "implies", "setting", "these", "properties", "on", "the", "server", "side", "-", "set", "updated_by", "based", "on", "the", "context", "-", "ensure", "created_at", "never", "changes", "-", "ensure", "created_by", "never", "changes", "-",...
bb7bb55cf3e60af99ebbc56099928827b58461bc
https://github.com/TryGhost/Ghost/blob/bb7bb55cf3e60af99ebbc56099928827b58461bc/core/server/models/base/index.js#L376-L414
train
onUpdating - Updates the model
[ 30522, 3853, 2006, 6279, 16616, 1006, 2944, 1010, 2012, 16344, 1010, 7047, 1007, 1063, 2065, 1006, 2023, 1012, 6550, 1007, 1063, 2944, 1012, 2904, 1027, 1035, 1012, 18168, 4183, 1006, 2944, 1012, 2904, 1010, 2023, 1012, 6550, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
grpc/grpc-node
packages/grpc-native-core/src/server.js
handleUnary
function handleUnary(call, handler, metadata) { var emitter = new ServerUnaryCall(call, metadata); emitter.on('error', function(error) { handleError(call, error); }); emitter.waitForCancel(); var batch = {}; batch[grpc.opType.RECV_MESSAGE] = true; call.startBatch(batch, function(err, result) { if ...
javascript
function handleUnary(call, handler, metadata) { var emitter = new ServerUnaryCall(call, metadata); emitter.on('error', function(error) { handleError(call, error); }); emitter.waitForCancel(); var batch = {}; batch[grpc.opType.RECV_MESSAGE] = true; call.startBatch(batch, function(err, result) { if ...
[ "function", "handleUnary", "(", "call", ",", "handler", ",", "metadata", ")", "{", "var", "emitter", "=", "new", "ServerUnaryCall", "(", "call", ",", "metadata", ")", ";", "emitter", ".", "on", "(", "'error'", ",", "function", "(", "error", ")", "{", "...
User-provided method to handle unary requests on a server @callback grpc.Server~handleUnaryCall @param {grpc~ServerUnaryCall} call The call object @param {grpc.Server~sendUnaryData} callback The callback to call to respond to the request Fully handle a unary call @private @param {grpc.internal~Call} call The call to ...
[ "User", "-", "provided", "method", "to", "handle", "unary", "requests", "on", "a", "server" ]
b36b285f4cdb334bbd48f74c12c13bec69961488
https://github.com/grpc/grpc-node/blob/b36b285f4cdb334bbd48f74c12c13bec69961488/packages/grpc-native-core/src/server.js#L567-L601
train
Handle unary call
[ 30522, 3853, 5047, 9521, 2854, 1006, 2655, 1010, 28213, 1010, 27425, 1007, 1063, 13075, 12495, 12079, 1027, 2047, 8241, 9521, 2854, 9289, 2140, 1006, 2655, 1010, 27425, 1007, 1025, 12495, 12079, 1012, 2006, 1006, 1005, 7561, 1005, 1010, 385...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
caolan/async
lib/detectLimit.js
detectLimit
function detectLimit(coll, limit, iteratee, callback) { return createTester(bool => bool, (res, item) => item)(eachOfLimit(limit), coll, iteratee, callback) }
javascript
function detectLimit(coll, limit, iteratee, callback) { return createTester(bool => bool, (res, item) => item)(eachOfLimit(limit), coll, iteratee, callback) }
[ "function", "detectLimit", "(", "coll", ",", "limit", ",", "iteratee", ",", "callback", ")", "{", "return", "createTester", "(", "bool", "=>", "bool", ",", "(", "res", ",", "item", ")", "=>", "item", ")", "(", "eachOfLimit", "(", "limit", ")", ",", "...
The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a time. @name detectLimit @static @memberOf module:Collections @method @see [async.detect]{@link module:Collections.detect} @alias findLimit @category Collections @param {Array|Iterable|AsyncIterable|Object} coll ...
[ "The", "same", "as", "[", "detect", "]", "{", "@link", "module", ":", "Collections", ".", "detect", "}", "but", "runs", "a", "maximum", "of", "limit", "async", "operations", "at", "a", "time", "." ]
4330d536c106592139fa82062494c9dba0da1fdb
https://github.com/caolan/async/blob/4330d536c106592139fa82062494c9dba0da1fdb/lib/detectLimit.js#L28-L30
train
Detects a limit of items in a collection.
[ 30522, 3853, 11487, 17960, 4183, 1006, 8902, 2140, 1010, 5787, 1010, 2009, 22139, 2063, 1010, 2655, 5963, 1007, 1063, 2709, 3443, 22199, 2121, 1006, 22017, 2140, 1027, 1028, 22017, 2140, 1010, 1006, 24501, 1010, 8875, 1007, 1027, 1028, 8875...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
electron/electron
script/bump-version.js
nextVersion
async function nextVersion (bumpType, version) { if (utils.isNightly(version) || utils.isBeta(version)) { switch (bumpType) { case 'nightly': version = await utils.nextNightly(version) break case 'beta': version = await utils.nextBeta(version) break case 'stable':...
javascript
async function nextVersion (bumpType, version) { if (utils.isNightly(version) || utils.isBeta(version)) { switch (bumpType) { case 'nightly': version = await utils.nextNightly(version) break case 'beta': version = await utils.nextBeta(version) break case 'stable':...
[ "async", "function", "nextVersion", "(", "bumpType", ",", "version", ")", "{", "if", "(", "utils", ".", "isNightly", "(", "version", ")", "||", "utils", ".", "isBeta", "(", "version", ")", ")", "{", "switch", "(", "bumpType", ")", "{", "case", "'nightl...
get next version for release based on [nightly, beta, stable]
[ "get", "next", "version", "for", "release", "based", "on", "[", "nightly", "beta", "stable", "]" ]
6e29611788277729647acf465f10db1ea6f15788
https://github.com/electron/electron/blob/6e29611788277729647acf465f10db1ea6f15788/script/bump-version.js#L72-L104
train
Returns the next version in the sequence of terms
[ 30522, 2004, 6038, 2278, 3853, 2279, 27774, 1006, 16906, 13874, 1010, 2544, 1007, 1063, 2065, 1006, 21183, 12146, 1012, 3475, 18743, 2135, 1006, 2544, 1007, 1064, 1064, 21183, 12146, 1012, 2003, 20915, 2050, 1006, 2544, 1007, 1007, 1063, 69...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/datepicker/js/calendarMonth.js
CalendarMonthCtrl
function CalendarMonthCtrl($element, $scope, $animate, $q, $$mdDateUtil, $mdDateLocale) { /** @final {!angular.JQLite} */ this.$element = $element; /** @final {!angular.Scope} */ this.$scope = $scope; /** @final {!angular.$animate} */ this.$animate = $animate; /** @final {!angular.$q...
javascript
function CalendarMonthCtrl($element, $scope, $animate, $q, $$mdDateUtil, $mdDateLocale) { /** @final {!angular.JQLite} */ this.$element = $element; /** @final {!angular.Scope} */ this.$scope = $scope; /** @final {!angular.$animate} */ this.$animate = $animate; /** @final {!angular.$q...
[ "function", "CalendarMonthCtrl", "(", "$element", ",", "$scope", ",", "$animate", ",", "$q", ",", "$$mdDateUtil", ",", "$mdDateLocale", ")", "{", "/** @final {!angular.JQLite} */", "this", ".", "$element", "=", "$element", ";", "/** @final {!angular.Scope} */", "this"...
Controller for the calendar month component. @ngInject @constructor
[ "Controller", "for", "the", "calendar", "month", "component", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/datepicker/js/calendarMonth.js#L61-L113
train
The calendar controller for a month.
[ 30522, 3853, 8094, 9629, 16257, 16344, 2140, 1006, 1002, 5783, 1010, 1002, 9531, 1010, 1002, 2019, 21499, 1010, 1002, 1053, 1010, 1002, 1002, 9108, 13701, 21823, 2140, 1010, 1002, 9108, 13701, 4135, 9289, 2063, 1007, 1063, 1013, 1008, 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...
mochajs/mocha
lib/runnable.js
Runnable
function Runnable(title, fn) { this.title = title; this.fn = fn; this.body = (fn || '').toString(); this.async = fn && fn.length; this.sync = !this.async; this._timeout = 2000; this._slow = 75; this._enableTimeouts = true; this.timedOut = false; this._retries = -1; this._currentRetry = 0; this.p...
javascript
function Runnable(title, fn) { this.title = title; this.fn = fn; this.body = (fn || '').toString(); this.async = fn && fn.length; this.sync = !this.async; this._timeout = 2000; this._slow = 75; this._enableTimeouts = true; this.timedOut = false; this._retries = -1; this._currentRetry = 0; this.p...
[ "function", "Runnable", "(", "title", ",", "fn", ")", "{", "this", ".", "title", "=", "title", ";", "this", ".", "fn", "=", "fn", ";", "this", ".", "body", "=", "(", "fn", "||", "''", ")", ".", "toString", "(", ")", ";", "this", ".", "async", ...
Initialize a new `Runnable` with the given `title` and callback `fn`. @class @extends external:EventEmitter @public @param {String} title @param {Function} fn
[ "Initialize", "a", "new", "Runnable", "with", "the", "given", "title", "and", "callback", "fn", "." ]
9b00fedb610241e33f7592c40164e42a38a793cf
https://github.com/mochajs/mocha/blob/9b00fedb610241e33f7592c40164e42a38a793cf/lib/runnable.js#L30-L43
train
A Runnable is a class that can be used to run a single function.
[ 30522, 3853, 2448, 22966, 1006, 2516, 30524, 1006, 1007, 1025, 2023, 1012, 2004, 6038, 2278, 1027, 1042, 2078, 1004, 1004, 1042, 2078, 1012, 3091, 1025, 2023, 1012, 26351, 1027, 999, 2023, 1012, 2004, 6038, 2278, 1025, 2023, 1012, 1035, 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.fl/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js
function (sLayer, sNamespace, sFileName, sFileType, sTransportId, sSelectedLayer) { return LRepConnector.deleteFile(sLayer, sNamespace, sFileName, sFileType, sTransportId, sSelectedLayer).then(function () { var oRouter = sap.ui.core.UIComponent.getRouterFor(this); oRouter.navTo("LayerContentMaster", { "...
javascript
function (sLayer, sNamespace, sFileName, sFileType, sTransportId, sSelectedLayer) { return LRepConnector.deleteFile(sLayer, sNamespace, sFileName, sFileType, sTransportId, sSelectedLayer).then(function () { var oRouter = sap.ui.core.UIComponent.getRouterFor(this); oRouter.navTo("LayerContentMaster", { "...
[ "function", "(", "sLayer", ",", "sNamespace", ",", "sFileName", ",", "sFileType", ",", "sTransportId", ",", "sSelectedLayer", ")", "{", "return", "LRepConnector", ".", "deleteFile", "(", "sLayer", ",", "sNamespace", ",", "sFileName", ",", "sFileType", ",", "sT...
Handler if a deletion was confirmed. @returns {Promise} - <code>LRepConnector</code> "deleteFile" promise @private
[ "Handler", "if", "a", "deletion", "was", "confirmed", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js#L275-L283
train
Delete a file from the specified layer
[ 30522, 3853, 1006, 20005, 1010, 1055, 18442, 23058, 1010, 16420, 9463, 18442, 1010, 16420, 9463, 13874, 1010, 2358, 5521, 20205, 3593, 1010, 7020, 12260, 10985, 24314, 1007, 1063, 2709, 1048, 2890, 15042, 18256, 16761, 1012, 3972, 12870, 8873...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/autocomplete/js/autocompleteController.js
handleResults
function handleResults(results) { ctrl.matches = results; ctrl.hidden = shouldHide(); // If loading is in progress, then we'll end the progress. This is needed for example, // when the `clear` button was clicked, because there we always show the loading process, to prevent flashing. if (ctrl.loadi...
javascript
function handleResults(results) { ctrl.matches = results; ctrl.hidden = shouldHide(); // If loading is in progress, then we'll end the progress. This is needed for example, // when the `clear` button was clicked, because there we always show the loading process, to prevent flashing. if (ctrl.loadi...
[ "function", "handleResults", "(", "results", ")", "{", "ctrl", ".", "matches", "=", "results", ";", "ctrl", ".", "hidden", "=", "shouldHide", "(", ")", ";", "// If loading is in progress, then we'll end the progress. This is needed for example,", "// when the `clear` button...
Handles the retrieved results by showing them in the autocompletes dropdown. @param results Retrieved results
[ "Handles", "the", "retrieved", "results", "by", "showing", "them", "in", "the", "autocompletes", "dropdown", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/autocomplete/js/autocompleteController.js#L1042-L1054
train
Handles the results of the search
[ 30522, 3853, 28213, 2229, 11314, 2015, 1006, 3463, 1007, 1063, 14931, 12190, 1012, 3503, 1027, 3463, 1025, 14931, 12190, 1012, 5023, 1027, 2323, 26100, 1006, 1007, 1025, 1013, 1013, 2065, 10578, 2003, 1999, 5082, 1010, 2059, 2057, 1005, 222...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
uber/deck.gl
modules/aggregation-layers/src/utils/gpu-grid-aggregation/grid-aggregation-utils.js
calculateLonOffset
function calculateLonOffset(lat, dx) { return ((dx / R_EARTH) * (180 / Math.PI)) / Math.cos((lat * Math.PI) / 180); }
javascript
function calculateLonOffset(lat, dx) { return ((dx / R_EARTH) * (180 / Math.PI)) / Math.cos((lat * Math.PI) / 180); }
[ "function", "calculateLonOffset", "(", "lat", ",", "dx", ")", "{", "return", "(", "(", "dx", "/", "R_EARTH", ")", "*", "(", "180", "/", "Math", ".", "PI", ")", ")", "/", "Math", ".", "cos", "(", "(", "lat", "*", "Math", ".", "PI", ")", "/", "...
with a given x-km change, and current latitude calculate the increment of longitude based on stackoverflow http://stackoverflow.com/questions/7477003 @param {number} lat - latitude of current location (based on city) @param {number} dx - change in km @return {number} - increment in longitude
[ "with", "a", "given", "x", "-", "km", "change", "and", "current", "latitude", "calculate", "the", "increment", "of", "longitude", "based", "on", "stackoverflow", "http", ":", "//", "stackoverflow", ".", "com", "/", "questions", "/", "7477003" ]
a2010448b7f268bbd03617b812334c68a6b9e5b2
https://github.com/uber/deck.gl/blob/a2010448b7f268bbd03617b812334c68a6b9e5b2/modules/aggregation-layers/src/utils/gpu-grid-aggregation/grid-aggregation-utils.js#L195-L197
train
Calculate the offset of the lon - lat - dx degrees
[ 30522, 3853, 18422, 7811, 27475, 3388, 1006, 2474, 2102, 1010, 1040, 2595, 1007, 1063, 2709, 1006, 1006, 1040, 2595, 1013, 1054, 1035, 3011, 1007, 1008, 1006, 8380, 1013, 8785, 1012, 14255, 1007, 1007, 1013, 8785, 1012, 2522, 2015, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/core/services/theming/theming.js
sanitizePalette
function sanitizePalette(palette, name) { var defaultContrast = palette.contrastDefaultColor; var lightColors = palette.contrastLightColors || []; var strongLightColors = palette.contrastStrongLightColors || []; var darkColors = palette.contrastDarkColors || []; // These colors are provided as spac...
javascript
function sanitizePalette(palette, name) { var defaultContrast = palette.contrastDefaultColor; var lightColors = palette.contrastLightColors || []; var strongLightColors = palette.contrastStrongLightColors || []; var darkColors = palette.contrastDarkColors || []; // These colors are provided as spac...
[ "function", "sanitizePalette", "(", "palette", ",", "name", ")", "{", "var", "defaultContrast", "=", "palette", ".", "contrastDefaultColor", ";", "var", "lightColors", "=", "palette", ".", "contrastLightColors", "||", "[", "]", ";", "var", "strongLightColors", "...
The user specifies a 'default' contrast color as either light or dark, then explicitly lists which hues are the opposite contrast (eg. A100 has dark, A200 has light)
[ "The", "user", "specifies", "a", "default", "contrast", "color", "as", "either", "light", "or", "dark", "then", "explicitly", "lists", "which", "hues", "are", "the", "opposite", "contrast", "(", "eg", ".", "A100", "has", "dark", "A200", "has", "light", ")"...
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/services/theming/theming.js#L1098-L1150
train
Sanitize palette
[ 30522, 3853, 2624, 25090, 4371, 12952, 7585, 1006, 27396, 1010, 2171, 1007, 1063, 13075, 12398, 8663, 6494, 3367, 1027, 27396, 1012, 5688, 3207, 7011, 11314, 18717, 1025, 13075, 2422, 18717, 2015, 1027, 27396, 1012, 5688, 7138, 18717, 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...
moleculerjs/moleculer
src/serializers/index.js
resolve
function resolve(opt) { if (opt instanceof Serializers.Base) { return opt; } else if (_.isString(opt)) { let SerializerClass = getByName(opt); if (SerializerClass) return new SerializerClass(); else throw new BrokerOptionsError(`Invalid serializer type '${opt}'.`, { type: opt }); } else if (_.isObject...
javascript
function resolve(opt) { if (opt instanceof Serializers.Base) { return opt; } else if (_.isString(opt)) { let SerializerClass = getByName(opt); if (SerializerClass) return new SerializerClass(); else throw new BrokerOptionsError(`Invalid serializer type '${opt}'.`, { type: opt }); } else if (_.isObject...
[ "function", "resolve", "(", "opt", ")", "{", "if", "(", "opt", "instanceof", "Serializers", ".", "Base", ")", "{", "return", "opt", ";", "}", "else", "if", "(", "_", ".", "isString", "(", "opt", ")", ")", "{", "let", "SerializerClass", "=", "getByNam...
Resolve serializer by name @param {object|string} opt @returns {Serializer} @memberof ServiceBroker
[ "Resolve", "serializer", "by", "name" ]
f95aadc2d61b0d0e3c643a43c3ed28bca6425cde
https://github.com/moleculerjs/moleculer/blob/f95aadc2d61b0d0e3c643a43c3ed28bca6425cde/src/serializers/index.js#L39-L58
train
Resolve serializer object
[ 30522, 3853, 10663, 1006, 23569, 1007, 1063, 2065, 1006, 23569, 6013, 11253, 7642, 17629, 2015, 1012, 2918, 1007, 1063, 2709, 23569, 1025, 1065, 2842, 2065, 1006, 1035, 1012, 26354, 18886, 3070, 1006, 23569, 1007, 1007, 1063, 2292, 7642, 17...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/language/LanguageManager.js
getLanguageForPath
function getLanguageForPath(path, ignoreOverride) { var fileName, language = _filePathToLanguageMap[path], extension, parts; // if there's an override, return it if (!ignoreOverride && language) { return language; } fileName = Fil...
javascript
function getLanguageForPath(path, ignoreOverride) { var fileName, language = _filePathToLanguageMap[path], extension, parts; // if there's an override, return it if (!ignoreOverride && language) { return language; } fileName = Fil...
[ "function", "getLanguageForPath", "(", "path", ",", "ignoreOverride", ")", "{", "var", "fileName", ",", "language", "=", "_filePathToLanguageMap", "[", "path", "]", ",", "extension", ",", "parts", ";", "// if there's an override, return it", "if", "(", "!", "ignor...
Resolves a file path to a Language object. @param {!string} path Path to the file to find a language for @param {?boolean} ignoreOverride If set to true will cause the lookup to ignore any overrides and return default binding. By default override is not ignored. @return {Language} The language for the provided file ty...
[ "Resolves", "a", "file", "path", "to", "a", "Language", "object", ".", "@param", "{", "!string", "}", "path", "Path", "to", "the", "file", "to", "find", "a", "language", "for", "@param", "{", "?boolean", "}", "ignoreOverride", "If", "set", "to", "true", ...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/language/LanguageManager.js#L264-L322
train
Get language for a file path
[ 30522, 3853, 2131, 25023, 6692, 3351, 29278, 15069, 1006, 4130, 1010, 8568, 7840, 15637, 1007, 1063, 13075, 5371, 18442, 1010, 2653, 1027, 1035, 5371, 15069, 3406, 25023, 6692, 3351, 2863, 2361, 1031, 4130, 1033, 1010, 5331, 1010, 3033, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/v4/ODataListBinding.js
shrinkContexts
function shrinkContexts() { var i, iNewLength = that.iMaxLength + that.iCreatedContexts; if (iNewLength >= that.aContexts.length) { return; } for (i = iNewLength; i < that.aContexts.length; i += 1) { if (that.aContexts[i]) { that.aContexts[i].destroy(); } } while (iNewLength > 0...
javascript
function shrinkContexts() { var i, iNewLength = that.iMaxLength + that.iCreatedContexts; if (iNewLength >= that.aContexts.length) { return; } for (i = iNewLength; i < that.aContexts.length; i += 1) { if (that.aContexts[i]) { that.aContexts[i].destroy(); } } while (iNewLength > 0...
[ "function", "shrinkContexts", "(", ")", "{", "var", "i", ",", "iNewLength", "=", "that", ".", "iMaxLength", "+", "that", ".", "iCreatedContexts", ";", "if", "(", "iNewLength", ">=", "that", ".", "aContexts", ".", "length", ")", "{", "return", ";", "}", ...
/* Shrinks contexts to the new length, destroys unneeded contexts
[ "/", "*", "Shrinks", "contexts", "to", "the", "new", "length", "destroys", "unneeded", "contexts" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/ODataListBinding.js#L654-L672
train
Shrinks the contexts array
[ 30522, 3853, 22802, 8663, 18209, 2015, 1006, 1007, 1063, 13075, 1045, 1010, 1999, 7974, 7770, 13512, 2232, 1027, 2008, 1012, 10047, 8528, 7770, 13512, 2232, 1009, 2008, 1012, 24582, 29313, 16409, 28040, 18413, 2015, 1025, 2065, 1006, 1999, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/require-atomic-updates.js
findOutdatedReads
function findOutdatedReads( codePathSegment, surroundingFunction, { stateBySegmentStart = new WeakMap(), stateBySegmentEnd = new WeakMap() } = {} ) { if (!stateBySegmentStart.has(codePathSegment)) { state...
javascript
function findOutdatedReads( codePathSegment, surroundingFunction, { stateBySegmentStart = new WeakMap(), stateBySegmentEnd = new WeakMap() } = {} ) { if (!stateBySegmentStart.has(codePathSegment)) { state...
[ "function", "findOutdatedReads", "(", "codePathSegment", ",", "surroundingFunction", ",", "{", "stateBySegmentStart", "=", "new", "WeakMap", "(", ")", ",", "stateBySegmentEnd", "=", "new", "WeakMap", "(", ")", "}", "=", "{", "}", ")", "{", "if", "(", "!", ...
If the control flow graph of a function enters an assignment expression, then does the both of the following steps in order (possibly with other steps in between) before exiting the assignment expression, then the assignment might be using an outdated value. 1. Enters a read of the variable or property assigned in the ...
[ "If", "the", "control", "flow", "graph", "of", "a", "function", "enters", "an", "assignment", "expression", "then", "does", "the", "both", "of", "the", "following", "steps", "in", "order", "(", "possibly", "with", "other", "steps", "in", "between", ")", "b...
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/require-atomic-updates.js#L198-L249
train
Find outdated reads for a given code path.
[ 30522, 3853, 2424, 5833, 13701, 16200, 19303, 1006, 3642, 15069, 3366, 21693, 4765, 1010, 4193, 11263, 27989, 1010, 1063, 2110, 3762, 3366, 21693, 11187, 7559, 2102, 1027, 2047, 5410, 2863, 2361, 1006, 1007, 1010, 2110, 3762, 3366, 21693, 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...
Tonejs/Tone.js
Tone/core/IntervalTimeline.js
function(low, high, event){ //the event container this.event = event; //the low value this.low = low; //the high value this.high = high; //the high value for this and all child nodes this.max = this.high; //the nodes to the left this._left = null; //the nodes to the right this._right = null; //the parent n...
javascript
function(low, high, event){ //the event container this.event = event; //the low value this.low = low; //the high value this.high = high; //the high value for this and all child nodes this.max = this.high; //the nodes to the left this._left = null; //the nodes to the right this._right = null; //the parent n...
[ "function", "(", "low", ",", "high", ",", "event", ")", "{", "//the event container", "this", ".", "event", "=", "event", ";", "//the low value", "this", ".", "low", "=", "low", ";", "//the high value", "this", ".", "high", "=", "high", ";", "//the high va...
///////////////////////////////////////////////////////////////////////// INTERVAL NODE HELPER ///////////////////////////////////////////////////////////////////////// Represents a node in the binary search tree, with the addition of a "high" value which keeps track of the highest value of its children. References: h...
[ "/////////////////////////////////////////////////////////////////////////", "INTERVAL", "NODE", "HELPER", "/////////////////////////////////////////////////////////////////////////", "Represents", "a", "node", "in", "the", "binary", "search", "tree", "with", "the", "addition", "of",...
bb67e9c83d5553dfaa3c10babc147600aa14c147
https://github.com/Tonejs/Tone.js/blob/bb67e9c83d5553dfaa3c10babc147600aa14c147/Tone/core/IntervalTimeline.js#L390-L407
train
set the low and high values
[ 30522, 3853, 1006, 2659, 1010, 2152, 1010, 2724, 1007, 1063, 1013, 1013, 1996, 2724, 11661, 2023, 1012, 2724, 1027, 2724, 1025, 1013, 1013, 1996, 2659, 3643, 2023, 1012, 30524, 2023, 1012, 2152, 1025, 1013, 1013, 1996, 14164, 2000, 1996, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/filesystem/impls/appshell/AppshellFileSystem.js
moveToTrash
function moveToTrash(path, callback) { appshell.fs.moveToTrash(path, function (err) { callback(_mapError(err)); }); }
javascript
function moveToTrash(path, callback) { appshell.fs.moveToTrash(path, function (err) { callback(_mapError(err)); }); }
[ "function", "moveToTrash", "(", "path", ",", "callback", ")", "{", "appshell", ".", "fs", ".", "moveToTrash", "(", "path", ",", "function", "(", "err", ")", "{", "callback", "(", "_mapError", "(", "err", ")", ")", ";", "}", ")", ";", "}" ]
Move the file or directory at the given path to a system dependent trash location, calling back asynchronously with a possibly null FileSystemError string. Directories will be moved even when non-empty. @param {string} path @param {function(string)=} callback
[ "Move", "the", "file", "or", "directory", "at", "the", "given", "path", "to", "a", "system", "dependent", "trash", "location", "calling", "back", "asynchronously", "with", "a", "possibly", "null", "FileSystemError", "string", ".", "Directories", "will", "be", ...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/filesystem/impls/appshell/AppshellFileSystem.js#L484-L488
train
Move the file system to the trash
[ 30522, 3853, 2693, 3406, 6494, 4095, 1006, 4130, 1010, 2655, 5963, 1007, 1063, 18726, 18223, 1012, 1042, 2015, 1012, 2693, 3406, 6494, 4095, 1006, 4130, 1010, 3853, 1006, 9413, 2099, 1007, 1063, 2655, 5963, 1006, 1035, 4949, 2121, 29165, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.demokit/src/sap/ui/demokit/explored/view/entity.controller.js
function (sText) { return '<span class="fs0875">' + JSDocUtil.formatTextBlock(sText, { linkFormatter: function (target, text) { var p; target = target.trim().replace(/\.prototype\./g, "#"); p = target.indexOf("#"); if ( p === 0 ) { // a relative reference - we can't support that ...
javascript
function (sText) { return '<span class="fs0875">' + JSDocUtil.formatTextBlock(sText, { linkFormatter: function (target, text) { var p; target = target.trim().replace(/\.prototype\./g, "#"); p = target.indexOf("#"); if ( p === 0 ) { // a relative reference - we can't support that ...
[ "function", "(", "sText", ")", "{", "return", "'<span class=\"fs0875\">'", "+", "JSDocUtil", ".", "formatTextBlock", "(", "sText", ",", "{", "linkFormatter", ":", "function", "(", "target", ",", "text", ")", "{", "var", "p", ";", "target", "=", "target", "...
This function wraps a text in a span tag so that it can be represented in an HTML control. @param {string} sText @returns {string} @private
[ "This", "function", "wraps", "a", "text", "in", "a", "span", "tag", "so", "that", "it", "can", "be", "represented", "in", "an", "HTML", "control", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.demokit/src/sap/ui/demokit/explored/view/entity.controller.js#L409-L431
train
Returns a link to the target
[ 30522, 3853, 1006, 26261, 18413, 1007, 1063, 2709, 1005, 1026, 8487, 2465, 1027, 1000, 1042, 2015, 2692, 2620, 23352, 1000, 1028, 1005, 1009, 1046, 16150, 10085, 21823, 2140, 1012, 4289, 18209, 23467, 1006, 26261, 18413, 1010, 1063, 4957, 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...
vuejs/vue-cli
packages/@vue/babel-preset-app/polyfillsPlugin.js
getModulePath
function getModulePath (mod, useAbsolutePath) { const modPath = mod === 'regenerator-runtime' ? 'regenerator-runtime/runtime' : `core-js/modules/${mod}` return useAbsolutePath ? require.resolve(modPath) : modPath }
javascript
function getModulePath (mod, useAbsolutePath) { const modPath = mod === 'regenerator-runtime' ? 'regenerator-runtime/runtime' : `core-js/modules/${mod}` return useAbsolutePath ? require.resolve(modPath) : modPath }
[ "function", "getModulePath", "(", "mod", ",", "useAbsolutePath", ")", "{", "const", "modPath", "=", "mod", "===", "'regenerator-runtime'", "?", "'regenerator-runtime/runtime'", ":", "`", "${", "mod", "}", "`", "return", "useAbsolutePath", "?", "require", ".", "r...
slightly modifiled from @babel/preset-env/src/utils use an absolute path for core-js modules, to fix conflicts of different core-js versions
[ "slightly", "modifiled", "from" ]
206803cbefefdfbc7d8ed12440b0b751688b77b2
https://github.com/vuejs/vue-cli/blob/206803cbefefdfbc7d8ed12440b0b751688b77b2/packages/@vue/babel-preset-app/polyfillsPlugin.js#L5-L11
train
Get the absolute path of a module
[ 30522, 3853, 2131, 5302, 8566, 2571, 15069, 1006, 16913, 1010, 2224, 7875, 19454, 10421, 15069, 1007, 1063, 9530, 3367, 16913, 15069, 1027, 16913, 1027, 1027, 1027, 1005, 19723, 24454, 8844, 1011, 2448, 7292, 1005, 1029, 1005, 19723, 24454, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
lovell/sharp
lib/output.js
_setBooleanOption
function _setBooleanOption (key, val) { if (is.bool(val)) { this.options[key] = val; } else { throw new Error('Invalid ' + key + ' (boolean) ' + val); } }
javascript
function _setBooleanOption (key, val) { if (is.bool(val)) { this.options[key] = val; } else { throw new Error('Invalid ' + key + ' (boolean) ' + val); } }
[ "function", "_setBooleanOption", "(", "key", ",", "val", ")", "{", "if", "(", "is", ".", "bool", "(", "val", ")", ")", "{", "this", ".", "options", "[", "key", "]", "=", "val", ";", "}", "else", "{", "throw", "new", "Error", "(", "'Invalid '", "+...
Update a Boolean attribute of the this.options Object. @private @param {String} key @param {Boolean} val @throws {Error} Invalid key
[ "Update", "a", "Boolean", "attribute", "of", "the", "this", ".", "options", "Object", "." ]
05d76eeadfe54713606a615185b2da047923406b
https://github.com/lovell/sharp/blob/05d76eeadfe54713606a615185b2da047923406b/lib/output.js#L589-L595
train
Set boolean option
[ 30522, 3853, 1035, 2275, 5092, 9890, 6761, 16790, 1006, 3145, 1010, 11748, 1007, 1063, 2065, 1006, 2003, 1012, 22017, 2140, 1006, 11748, 1007, 1007, 1063, 2023, 1012, 7047, 1031, 3145, 1033, 1027, 11748, 1025, 1065, 2842, 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...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js
getObjectFallback
function getObjectFallback(oClassObject) { // some modules might not return a class definition, so we fallback to the global // this is against the AMD definition, but is required for backward compatibility if (!oClassObject) { Log.error("Control '" + sClassName + "' did not return a class definition f...
javascript
function getObjectFallback(oClassObject) { // some modules might not return a class definition, so we fallback to the global // this is against the AMD definition, but is required for backward compatibility if (!oClassObject) { Log.error("Control '" + sClassName + "' did not return a class definition f...
[ "function", "getObjectFallback", "(", "oClassObject", ")", "{", "// some modules might not return a class definition, so we fallback to the global", "// this is against the AMD definition, but is required for backward compatibility", "if", "(", "!", "oClassObject", ")", "{", "Log", "."...
ensure that control and library are loaded
[ "ensure", "that", "control", "and", "library", "are", "loaded" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js#L481-L492
train
This function is called by the control constructor to get the object class from the global object path
[ 30522, 3853, 2131, 16429, 20614, 13976, 5963, 1006, 1051, 26266, 16429, 20614, 1007, 1063, 1013, 1013, 2070, 14184, 2453, 2025, 2709, 1037, 2465, 6210, 1010, 2061, 2057, 2991, 5963, 2000, 1996, 3795, 1013, 1013, 2023, 2003, 2114, 1996, 2572...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
mxCompactTreeLayout
function mxCompactTreeLayout(graph, horizontal, invert) { mxGraphLayout.call(this, graph); this.horizontal = (horizontal != null) ? horizontal : true; this.invert = (invert != null) ? invert : false; }
javascript
function mxCompactTreeLayout(graph, horizontal, invert) { mxGraphLayout.call(this, graph); this.horizontal = (horizontal != null) ? horizontal : true; this.invert = (invert != null) ? invert : false; }
[ "function", "mxCompactTreeLayout", "(", "graph", ",", "horizontal", ",", "invert", ")", "{", "mxGraphLayout", ".", "call", "(", "this", ",", "graph", ")", ";", "this", ".", "horizontal", "=", "(", "horizontal", "!=", "null", ")", "?", "horizontal", ":", ...
Copyright (c) 2006-2018, JGraph Ltd Copyright (c) 2006-2018, Gaudenz Alder Class: mxCompactTreeLayout Extends <mxGraphLayout> to implement a compact tree (Moen) algorithm. This layout is suitable for graphs that have no cycles (trees). Vertices that are not connected to the tree will be ignored by this layout. Exam...
[ "Copyright", "(", "c", ")", "2006", "-", "2018", "JGraph", "Ltd", "Copyright", "(", "c", ")", "2006", "-", "2018", "Gaudenz", "Alder", "Class", ":", "mxCompactTreeLayout" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L30040-L30045
train
A compact tree layout
[ 30522, 3853, 25630, 9006, 19498, 4779, 9910, 8485, 5833, 1006, 10629, 1010, 9876, 1010, 1999, 16874, 1007, 1063, 25630, 14413, 8485, 5833, 1012, 2655, 1006, 2023, 1010, 10629, 1007, 1025, 2023, 1012, 9876, 1027, 1006, 9876, 999, 1027, 19701...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/capitalized-comments.js
isInlineComment
function isInlineComment(comment) { const previousToken = sourceCode.getTokenBefore(comment, { includeComments: true }), nextToken = sourceCode.getTokenAfter(comment, { includeComments: true }); return Boolean( previousToken && nextToken && ...
javascript
function isInlineComment(comment) { const previousToken = sourceCode.getTokenBefore(comment, { includeComments: true }), nextToken = sourceCode.getTokenAfter(comment, { includeComments: true }); return Boolean( previousToken && nextToken && ...
[ "function", "isInlineComment", "(", "comment", ")", "{", "const", "previousToken", "=", "sourceCode", ".", "getTokenBefore", "(", "comment", ",", "{", "includeComments", ":", "true", "}", ")", ",", "nextToken", "=", "sourceCode", ".", "getTokenAfter", "(", "co...
---------------------------------------------------------------------- Helpers ---------------------------------------------------------------------- Checks whether a comment is an inline comment. For the purpose of this rule, a comment is inline if: 1. The comment is preceded by a token on the same line; and 2. The ...
[ "----------------------------------------------------------------------", "Helpers", "----------------------------------------------------------------------", "Checks", "whether", "a", "comment", "is", "an", "inline", "comment", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/capitalized-comments.js#L170-L180
train
Check if comment is inline
[ 30522, 3853, 2003, 2378, 4179, 9006, 3672, 1006, 7615, 1007, 1063, 9530, 3367, 3025, 18715, 2368, 1027, 3120, 16044, 1012, 2131, 18715, 2368, 4783, 29278, 2063, 1006, 7615, 1010, 1063, 2421, 9006, 8163, 1024, 2995, 1065, 1007, 1010, 2279, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/IconTabBarDragAndDropUtil.js
function (context, sDropLayout) { var oIconTabHeader = context._iconTabHeader ? context._iconTabHeader : context; var sIconTabHeaderId = oIconTabHeader.getId(); //Adding Drag&Drop configuration to the dragDropConfig aggregation if needed context.addDragDropConfig(new DragInfo({ sourceAggregation: "...
javascript
function (context, sDropLayout) { var oIconTabHeader = context._iconTabHeader ? context._iconTabHeader : context; var sIconTabHeaderId = oIconTabHeader.getId(); //Adding Drag&Drop configuration to the dragDropConfig aggregation if needed context.addDragDropConfig(new DragInfo({ sourceAggregation: "...
[ "function", "(", "context", ",", "sDropLayout", ")", "{", "var", "oIconTabHeader", "=", "context", ".", "_iconTabHeader", "?", "context", ".", "_iconTabHeader", ":", "context", ";", "var", "sIconTabHeaderId", "=", "oIconTabHeader", ".", "getId", "(", ")", ";",...
Adding aggregations for drag and drop. @param {object} context from which context function is called (sap.m.IconTabHeader or sap.m.IconTabSelectList) @param {string} sDropLayout Depending on the control we are dragging in, it could be Vertical or Horizontal
[ "Adding", "aggregations", "for", "drag", "and", "drop", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/IconTabBarDragAndDropUtil.js#L239-L254
train
Adds the drag & drop configuration to the context
[ 30522, 3853, 1006, 6123, 1010, 17371, 18981, 8485, 5833, 1007, 1063, 13075, 1051, 28524, 2696, 23706, 13775, 2121, 1027, 6123, 1012, 1035, 12696, 2696, 23706, 13775, 2121, 1029, 6123, 1012, 1035, 12696, 2696, 23706, 13775, 2121, 1024, 6123, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
graphql/graphql-js
resources/benchmark.js
prepareAndRunBenchmarks
function prepareAndRunBenchmarks(benchmarkPatterns, revisions) { // Find all benchmark tests to be run. let benchmarks = findFiles(LOCAL_DIR('src'), '*/__tests__/*-benchmark.js'); if (benchmarkPatterns.length !== 0) { benchmarks = benchmarks.filter(benchmark => benchmarkPatterns.some(pattern => ...
javascript
function prepareAndRunBenchmarks(benchmarkPatterns, revisions) { // Find all benchmark tests to be run. let benchmarks = findFiles(LOCAL_DIR('src'), '*/__tests__/*-benchmark.js'); if (benchmarkPatterns.length !== 0) { benchmarks = benchmarks.filter(benchmark => benchmarkPatterns.some(pattern => ...
[ "function", "prepareAndRunBenchmarks", "(", "benchmarkPatterns", ",", "revisions", ")", "{", "// Find all benchmark tests to be run.", "let", "benchmarks", "=", "findFiles", "(", "LOCAL_DIR", "(", "'src'", ")", ",", "'*/__tests__/*-benchmark.js'", ")", ";", "if", "(", ...
Prepare all revisions and run benchmarks matching a pattern against them.
[ "Prepare", "all", "revisions", "and", "run", "benchmarks", "matching", "a", "pattern", "against", "them", "." ]
b65ff6db8893c1c68f0f236c4b2d663e6c55f5ef
https://github.com/graphql/graphql-js/blob/b65ff6db8893c1c68f0f236c4b2d663e6c55f5ef/resources/benchmark.js#L187-L211
train
Run benchmarks matching the given benchmark patterns
[ 30522, 3853, 7374, 5685, 15532, 10609, 2818, 27373, 1006, 6847, 10665, 4502, 12079, 3619, 1010, 24699, 1007, 1063, 1013, 1013, 2424, 2035, 6847, 10665, 5852, 2000, 2022, 2448, 1012, 2292, 6847, 27373, 1027, 2424, 8873, 4244, 1006, 2334, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/zyngascroll.js
function(id) { var cleared = running[id] != null; if (cleared) { running[id] = null; } return cleared; }
javascript
function(id) { var cleared = running[id] != null; if (cleared) { running[id] = null; } return cleared; }
[ "function", "(", "id", ")", "{", "var", "cleared", "=", "running", "[", "id", "]", "!=", "null", ";", "if", "(", "cleared", ")", "{", "running", "[", "id", "]", "=", "null", ";", "}", "return", "cleared", ";", "}" ]
Stops the given animation. @param {Integer} id Unique animation ID @return {Boolean} Whether the animation was stopped (aka, was running before)
[ "Stops", "the", "given", "animation", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/zyngascroll.js#L182-L189
train
Clears the context associated with the specified context id.
[ 30522, 3853, 1006, 8909, 1007, 1063, 13075, 5985, 1027, 2770, 1031, 8909, 1033, 999, 1027, 19701, 1025, 2065, 1006, 5985, 1007, 1063, 2770, 1031, 8909, 1033, 1027, 19701, 1025, 1065, 2709, 5985, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/jQuery.sap.support.js
function (oExecutionScope, vPresetOrRules) { if (RuleSetLoader._bRulesCreated) { return Main.analyze(oExecutionScope, vPresetOrRules); } return RuleSetLoader._oMainPromise.then(function () { return Main.analyze(oExecutionScope, vPresetOrRules); }); }
javascript
function (oExecutionScope, vPresetOrRules) { if (RuleSetLoader._bRulesCreated) { return Main.analyze(oExecutionScope, vPresetOrRules); } return RuleSetLoader._oMainPromise.then(function () { return Main.analyze(oExecutionScope, vPresetOrRules); }); }
[ "function", "(", "oExecutionScope", ",", "vPresetOrRules", ")", "{", "if", "(", "RuleSetLoader", ".", "_bRulesCreated", ")", "{", "return", "Main", ".", "analyze", "(", "oExecutionScope", ",", "vPresetOrRules", ")", ";", "}", "return", "RuleSetLoader", ".", "_...
Main method to perform analysis of a given running application. Allows to choose a particular execution scope - desired part of the UI to be checked and a flexible way to specify the list of rules to be used. @memberof jQuery.sap.support @deprecated Since version 1.60.0. Please use sap/ui/support/RuleAnalyzer instead...
[ "Main", "method", "to", "perform", "analysis", "of", "a", "given", "running", "application", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/jQuery.sap.support.js#L59-L68
train
Analyze the given rules
[ 30522, 3853, 1006, 1051, 10288, 8586, 13700, 26127, 1010, 21210, 6072, 18903, 12171, 16308, 1007, 1063, 2065, 1006, 3513, 3388, 11066, 2121, 1012, 1035, 7987, 16308, 16748, 4383, 1007, 1063, 2709, 2364, 1012, 17908, 1006, 1051, 30524, 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/fabToolbar/fabToolbar.js
MdFabToolbarDirective
function MdFabToolbarDirective() { return { restrict: 'E', transclude: true, template: '<div class="md-fab-toolbar-wrapper">' + ' <div class="md-fab-toolbar-content" ng-transclude></div>' + '</div>', scope: { direction: '@?mdDirection', isOpen: '=?mdOpen' ...
javascript
function MdFabToolbarDirective() { return { restrict: 'E', transclude: true, template: '<div class="md-fab-toolbar-wrapper">' + ' <div class="md-fab-toolbar-content" ng-transclude></div>' + '</div>', scope: { direction: '@?mdDirection', isOpen: '=?mdOpen' ...
[ "function", "MdFabToolbarDirective", "(", ")", "{", "return", "{", "restrict", ":", "'E'", ",", "transclude", ":", "true", ",", "template", ":", "'<div class=\"md-fab-toolbar-wrapper\">'", "+", "' <div class=\"md-fab-toolbar-content\" ng-transclude></div>'", "+", "'</div>'...
@ngdoc directive @name mdFabToolbar @module material.components.fabToolbar @restrict E @description The `<md-fab-toolbar>` directive is used to present a toolbar of elements (usually `<md-button>`s) for quick access to common actions when a floating action button is activated (via click or keyboard navigation). You...
[ "@ngdoc", "directive", "@name", "mdFabToolbar", "@module", "material", ".", "components", ".", "fabToolbar" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/fabToolbar/fabToolbar.js#L74-L102
train
The md - toolbar directive
[ 30522, 3853, 9108, 7011, 19279, 13669, 21458, 7442, 15277, 1006, 1007, 1063, 2709, 1063, 21573, 1024, 1005, 1041, 1005, 1010, 9099, 20464, 12672, 1024, 2995, 1010, 23561, 1024, 1005, 1026, 4487, 2615, 2465, 1027, 1000, 9108, 1011, 6904, 249...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ExactList.js
function(oList, bCollapse, oEvent, bSkipParentTraversal){ if (oEvent) { oEvent.preventDefault(); oEvent.stopPropagation(); } if (oList._isTop()) { return; } if (oList._bCollapsed != bCollapse) { //Toggles the horizontal Collapse State var bFocus = !!oEvent; var cntntAnimParam = {}; cntntA...
javascript
function(oList, bCollapse, oEvent, bSkipParentTraversal){ if (oEvent) { oEvent.preventDefault(); oEvent.stopPropagation(); } if (oList._isTop()) { return; } if (oList._bCollapsed != bCollapse) { //Toggles the horizontal Collapse State var bFocus = !!oEvent; var cntntAnimParam = {}; cntntA...
[ "function", "(", "oList", ",", "bCollapse", ",", "oEvent", ",", "bSkipParentTraversal", ")", "{", "if", "(", "oEvent", ")", "{", "oEvent", ".", "preventDefault", "(", ")", ";", "oEvent", ".", "stopPropagation", "(", ")", ";", "}", "if", "(", "oList", "...
Collapses or expands the given list horizontally
[ "Collapses", "or", "expands", "the", "given", "list", "horizontally" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.ux3/src/sap/ui/ux3/ExactList.js#L1247-L1344
train
Collapse the list
[ 30522, 3853, 1006, 19330, 2923, 1010, 4647, 14511, 9331, 3366, 1010, 1051, 18697, 3372, 1010, 18667, 3211, 13944, 22787, 6494, 14028, 2389, 1007, 1063, 2065, 1006, 1051, 18697, 3372, 1007, 1063, 1051, 18697, 3372, 1012, 4652, 3207, 7011, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/filesystem/FileSystem.js
registerProtocolAdapter
function registerProtocolAdapter(protocol, adapter) { var adapters; if (protocol) { adapters = _fileProtocolPlugins[protocol] || []; adapters.push(adapter); // We will keep a sorted adapter list on 'priority' // If priority is not provided a default of '0...
javascript
function registerProtocolAdapter(protocol, adapter) { var adapters; if (protocol) { adapters = _fileProtocolPlugins[protocol] || []; adapters.push(adapter); // We will keep a sorted adapter list on 'priority' // If priority is not provided a default of '0...
[ "function", "registerProtocolAdapter", "(", "protocol", ",", "adapter", ")", "{", "var", "adapters", ";", "if", "(", "protocol", ")", "{", "adapters", "=", "_fileProtocolPlugins", "[", "protocol", "]", "||", "[", "]", ";", "adapters", ".", "push", "(", "ad...
Typical signature of a file protocol adapter. @typedef {Object} FileProtocol~Adapter @property {Number} priority - Indicates the priority. @property {Object} fileImpl - Handle for the custom file implementation prototype. @property {function} canRead - To check if this impl can read a file for a given path. FileSyste...
[ "Typical", "signature", "of", "a", "file", "protocol", "adapter", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/filesystem/FileSystem.js#L118-L132
train
Register an adapter for a protocol
[ 30522, 3853, 4236, 21572, 3406, 26289, 2850, 13876, 2121, 1006, 8778, 1010, 15581, 2121, 1007, 1063, 13075, 15581, 2545, 1025, 2065, 1006, 8778, 1007, 1063, 15581, 2545, 1027, 1035, 5371, 21572, 3406, 25778, 24759, 15916, 7076, 1031, 8778, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
computeFitCategoryTraits
function computeFitCategoryTraits(index, ruler, options) { var thickness = options.barThickness; var count = ruler.stackCount; var curr = ruler.pixels[index]; var size, ratio; if (helpers.isNullOrUndef(thickness)) { size = ruler.min * options.categoryPercentage; ratio = options.barPercentage; } else { // W...
javascript
function computeFitCategoryTraits(index, ruler, options) { var thickness = options.barThickness; var count = ruler.stackCount; var curr = ruler.pixels[index]; var size, ratio; if (helpers.isNullOrUndef(thickness)) { size = ruler.min * options.categoryPercentage; ratio = options.barPercentage; } else { // W...
[ "function", "computeFitCategoryTraits", "(", "index", ",", "ruler", ",", "options", ")", "{", "var", "thickness", "=", "options", ".", "barThickness", ";", "var", "count", "=", "ruler", ".", "stackCount", ";", "var", "curr", "=", "ruler", ".", "pixels", "[...
Computes an "ideal" category based on the absolute bar thickness or, if undefined or null, uses the smallest interval (see computeMinSampleSize) that prevents bar overlapping. This mode currently always generates bars equally sized (until we introduce scriptable options?). @private
[ "Computes", "an", "ideal", "category", "based", "on", "the", "absolute", "bar", "thickness", "or", "if", "undefined", "or", "null", "uses", "the", "smallest", "interval", "(", "see", "computeMinSampleSize", ")", "that", "prevents", "bar", "overlapping", ".", "...
f093c36574d290330ed623e60fbd070421c730d5
https://github.com/chartjs/Chart.js/blob/f093c36574d290330ed623e60fbd070421c730d5/src/controllers/controller.bar.js#L60-L82
train
Compute the fit category traits
[ 30522, 3853, 24134, 8873, 13535, 3686, 20255, 22123, 14995, 3215, 1006, 5950, 1010, 7786, 1010, 7047, 1007, 1063, 13075, 14983, 1027, 7047, 1012, 12075, 16066, 2243, 2791, 1025, 13075, 4175, 1027, 7786, 1012, 9991, 3597, 16671, 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...
nhn/tui.editor
src/js/extensions/table/mergedTableAddCol.js
_createNewCell
function _createNewCell(rowData, rowIndex, colIndex, prevCell) { const cellData = rowData[colIndex]; let newCell; if (util.isExisty(cellData.colMergeWith)) { const {colMergeWith} = cellData; const merger = rowData[colMergeWith]; const lastMergedCellIndex = colMergeWith + merger.colspan - 1; if (...
javascript
function _createNewCell(rowData, rowIndex, colIndex, prevCell) { const cellData = rowData[colIndex]; let newCell; if (util.isExisty(cellData.colMergeWith)) { const {colMergeWith} = cellData; const merger = rowData[colMergeWith]; const lastMergedCellIndex = colMergeWith + merger.colspan - 1; if (...
[ "function", "_createNewCell", "(", "rowData", ",", "rowIndex", ",", "colIndex", ",", "prevCell", ")", "{", "const", "cellData", "=", "rowData", "[", "colIndex", "]", ";", "let", "newCell", ";", "if", "(", "util", ".", "isExisty", "(", "cellData", ".", "c...
Create new cell data. @param {Array.<object>} rowData - row data of table data @param {number} rowIndex - row index of table data @param {number} colIndex - column index of table data @param {object | null} prevCell - previous cell data @returns {object} @private
[ "Create", "new", "cell", "data", "." ]
e75ab08c2a7ab07d1143e318f7cde135c5e3002e
https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/extensions/table/mergedTableAddCol.js#L77-L102
train
Create new cell
[ 30522, 3853, 1035, 3443, 2638, 16526, 5349, 1006, 5216, 2850, 2696, 1010, 5216, 22254, 10288, 1010, 6972, 3207, 2595, 1010, 3653, 25465, 5349, 1007, 1063, 9530, 3367, 3526, 2850, 2696, 1027, 5216, 2850, 2696, 1031, 6972, 3207, 2595, 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...
eslint/eslint
lib/rules/no-use-before-define.js
isInInitializer
function isInInitializer(variable, reference) { if (variable.scope !== reference.from) { return false; } let node = variable.identifiers[0].parent; const location = reference.identifier.range[1]; while (node) { if (node.type === "VariableDeclarator") { if (isInRange(nod...
javascript
function isInInitializer(variable, reference) { if (variable.scope !== reference.from) { return false; } let node = variable.identifiers[0].parent; const location = reference.identifier.range[1]; while (node) { if (node.type === "VariableDeclarator") { if (isInRange(nod...
[ "function", "isInInitializer", "(", "variable", ",", "reference", ")", "{", "if", "(", "variable", ".", "scope", "!==", "reference", ".", "from", ")", "{", "return", "false", ";", "}", "let", "node", "=", "variable", ".", "identifiers", "[", "0", "]", ...
Checks whether or not a given reference is inside of the initializers of a given variable. This returns `true` in the following cases: var a = a var [a = a] = list var {a = a} = obj for (var a in a) {} for (var a of a) {} @param {Variable} variable - A variable to check. @param {Reference} reference - A reference to...
[ "Checks", "whether", "or", "not", "a", "given", "reference", "is", "inside", "of", "the", "initializers", "of", "a", "given", "variable", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-use-before-define.js#L100-L131
train
Check if a variable is in the initializer of a reference
[ 30522, 3853, 2003, 5498, 3490, 20925, 17629, 1006, 8023, 1010, 4431, 1007, 1063, 2065, 1006, 8023, 1012, 9531, 999, 1027, 1027, 4431, 1012, 2013, 1007, 1063, 2709, 6270, 1025, 1065, 2292, 13045, 1027, 8023, 1012, 8909, 4765, 28295, 1031, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
LLK/scratch-blocks
blocks_vertical/event.js
function() { this.jsonInit({ "message0": Blockly.Msg.EVENT_WHENGREATERTHAN, "args0": [ { "type": "field_dropdown", "name": "WHENGREATERTHANMENU", "options": [ [Blockly.Msg.EVENT_WHENGREATERTHAN_LOUDNESS, 'LOUDNESS'], [Blockly.Msg.EVENT_WHENGR...
javascript
function() { this.jsonInit({ "message0": Blockly.Msg.EVENT_WHENGREATERTHAN, "args0": [ { "type": "field_dropdown", "name": "WHENGREATERTHANMENU", "options": [ [Blockly.Msg.EVENT_WHENGREATERTHAN_LOUDNESS, 'LOUDNESS'], [Blockly.Msg.EVENT_WHENGR...
[ "function", "(", ")", "{", "this", ".", "jsonInit", "(", "{", "\"message0\"", ":", "Blockly", ".", "Msg", ".", "EVENT_WHENGREATERTHAN", ",", "\"args0\"", ":", "[", "{", "\"type\"", ":", "\"field_dropdown\"", ",", "\"name\"", ":", "\"WHENGREATERTHANMENU\"", ","...
Block for when loudness/timer/video motion is greater than the value. @this Blockly.Block
[ "Block", "for", "when", "loudness", "/", "timer", "/", "video", "motion", "is", "greater", "than", "the", "value", "." ]
455b2a854435c0a67da1da92320ddc3ec3e2b799
https://github.com/LLK/scratch-blocks/blob/455b2a854435c0a67da1da92320ddc3ec3e2b799/blocks_vertical/event.js#L177-L197
train
Block for whomerening between two terms.
[ 30522, 3853, 1006, 1007, 1063, 2023, 1012, 1046, 3385, 5498, 2102, 1006, 1063, 1000, 4471, 2692, 1000, 1024, 3796, 2135, 1012, 5796, 2290, 1012, 2724, 1035, 2043, 17603, 24932, 21604, 1010, 1000, 12098, 5620, 2692, 1000, 1024, 1031, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/search.js
searchBar_restoreDefaults
function searchBar_restoreDefaults() { // XXX: Bug 556477 - Restore default sorting this.openEngineManager(function(controller) { var manager = new engineManager(controller); // We have to do any action so the restore button gets enabled manager.moveDownEngine(manager.engines[0].name); ...
javascript
function searchBar_restoreDefaults() { // XXX: Bug 556477 - Restore default sorting this.openEngineManager(function(controller) { var manager = new engineManager(controller); // We have to do any action so the restore button gets enabled manager.moveDownEngine(manager.engines[0].name); ...
[ "function", "searchBar_restoreDefaults", "(", ")", "{", "// XXX: Bug 556477 - Restore default sorting", "this", ".", "openEngineManager", "(", "function", "(", "controller", ")", "{", "var", "manager", "=", "new", "engineManager", "(", "controller", ")", ";", "// We h...
Restore the default set of search engines (API call)
[ "Restore", "the", "default", "set", "of", "search", "engines", "(", "API", "call", ")" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/search.js#L756-L774
train
Restore the default sorting
[ 30522, 3853, 3945, 8237, 1035, 5854, 12879, 23505, 2015, 1006, 1007, 1063, 1013, 1013, 22038, 2595, 1024, 11829, 4583, 21084, 2581, 2581, 1011, 9239, 12398, 22210, 2023, 1012, 2330, 13159, 3170, 24805, 4590, 1006, 3853, 1006, 11486, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
copyBody
function copyBody(bodyHtml, doc) { if (doc.body.innerHTML == bodyHtml) { return; } jQuery.init(doc.body).empty(); appendHTML(bodyHtml, doc.body); }
javascript
function copyBody(bodyHtml, doc) { if (doc.body.innerHTML == bodyHtml) { return; } jQuery.init(doc.body).empty(); appendHTML(bodyHtml, doc.body); }
[ "function", "copyBody", "(", "bodyHtml", ",", "doc", ")", "{", "if", "(", "doc", ".", "body", ".", "innerHTML", "==", "bodyHtml", ")", "{", "return", ";", "}", "jQuery", ".", "init", "(", "doc", ".", "body", ")", ".", "empty", "(", ")", ";", "app...
Copies the given HTML as the content of the current document's <body> element. If the current document's body already contains identical markup, copying is skipped. <script> elements are omitted.
[ "Copies", "the", "given", "HTML", "as", "the", "content", "of", "the", "current", "document", "s", "<body", ">", "element", ".", "If", "the", "current", "document", "s", "body", "already", "contains", "identical", "markup", "copying", "is", "skipped", ".", ...
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L1470-L1478
train
Copy the body html to the document body
[ 30522, 3853, 6100, 23684, 30524, 1046, 4226, 2854, 1012, 1999, 4183, 1006, 9986, 1012, 2303, 1007, 1012, 4064, 1006, 1007, 1025, 10439, 10497, 11039, 19968, 1006, 2303, 11039, 19968, 1010, 9986, 1012, 2303, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/type/String.js
setConstraints
function setConstraints(oType, oConstraints) { var vIsDigitSequence, vMaxLength, vNullable; oType.oConstraints = undefined; if (oConstraints) { vMaxLength = oConstraints.maxLength; if (typeof vMaxLength === "string") { vMaxLength = parseInt(vMaxLength); } if (typeof vMaxLength === "number" && !is...
javascript
function setConstraints(oType, oConstraints) { var vIsDigitSequence, vMaxLength, vNullable; oType.oConstraints = undefined; if (oConstraints) { vMaxLength = oConstraints.maxLength; if (typeof vMaxLength === "string") { vMaxLength = parseInt(vMaxLength); } if (typeof vMaxLength === "number" && !is...
[ "function", "setConstraints", "(", "oType", ",", "oConstraints", ")", "{", "var", "vIsDigitSequence", ",", "vMaxLength", ",", "vNullable", ";", "oType", ".", "oConstraints", "=", "undefined", ";", "if", "(", "oConstraints", ")", "{", "vMaxLength", "=", "oConst...
Sets the constraints. @param {sap.ui.model.odata.type.String} oType the type instance @param {object} [oConstraints] constraints, see {@link #constructor}
[ "Sets", "the", "constraints", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/type/String.js#L39-L70
train
Sets constraints for the given type
[ 30522, 3853, 2275, 8663, 20528, 18447, 2015, 1006, 27178, 18863, 1010, 1051, 8663, 20528, 18447, 2015, 1007, 1063, 13075, 25292, 4305, 23806, 3366, 4226, 5897, 1010, 1058, 17848, 7770, 13512, 2232, 1010, 1058, 11231, 4571, 3468, 1025, 27178, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js
visitChildNodes
function visitChildNodes(oNode, oWithControl) { return stopAndGo( // cache live collection so that removing a template node does not hurt Array.prototype.slice.apply(oNode.childNodes), function (oChild) { return visitNode(oChild, oWithControl); }); }
javascript
function visitChildNodes(oNode, oWithControl) { return stopAndGo( // cache live collection so that removing a template node does not hurt Array.prototype.slice.apply(oNode.childNodes), function (oChild) { return visitNode(oChild, oWithControl); }); }
[ "function", "visitChildNodes", "(", "oNode", ",", "oWithControl", ")", "{", "return", "stopAndGo", "(", "// cache live collection so that removing a template node does not hurt", "Array", ".", "prototype", ".", "slice", ".", "apply", "(", "oNode", ".", "childNodes", ")"...
Visits all child nodes of the given node. @param {Node} oNode the XML DOM node @param {sap.ui.core.util._with} oWithControl the "with" control @returns {sap.ui.base.SyncPromise} A sync promise which resolves with <code>undefined</code> as soon as visiting is done, or is rejected with a corresponding error if visiting ...
[ "Visits", "all", "child", "nodes", "of", "the", "given", "node", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L1779-L1786
train
Visit all child nodes of a node
[ 30522, 3853, 3942, 19339, 3630, 6155, 1006, 21058, 3207, 1010, 27593, 8939, 8663, 13181, 2140, 1007, 1063, 2709, 2644, 5685, 3995, 1006, 1013, 1013, 17053, 2444, 3074, 2061, 2008, 9268, 1037, 23561, 13045, 2515, 2025, 3480, 9140, 1012, 8773...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jakesgordon/javascript-state-machine
src/util/camelize.js
camelize
function camelize(label) { if (label.length === 0) return label; var n, result, word, words = label.split(/[_-]/); // single word with first character already lowercase, return untouched if ((words.length === 1) && (words[0][0].toLowerCase() === words[0][0])) return label; result = words[0].toLowe...
javascript
function camelize(label) { if (label.length === 0) return label; var n, result, word, words = label.split(/[_-]/); // single word with first character already lowercase, return untouched if ((words.length === 1) && (words[0][0].toLowerCase() === words[0][0])) return label; result = words[0].toLowe...
[ "function", "camelize", "(", "label", ")", "{", "if", "(", "label", ".", "length", "===", "0", ")", "return", "label", ";", "var", "n", ",", "result", ",", "word", ",", "words", "=", "label", ".", "split", "(", "/", "[_-]", "/", ")", ";", "// sin...
-------------------------------------------------------------------------------------------------
[ "-------------------------------------------------------------------------------------------------" ]
0d603577423244228cebcd62e60dbbfff27c6ea3
https://github.com/jakesgordon/javascript-state-machine/blob/0d603577423244228cebcd62e60dbbfff27c6ea3/src/util/camelize.js#L5-L22
train
camelize a label
[ 30522, 3853, 19130, 4697, 1006, 3830, 1007, 1063, 2065, 1006, 3830, 1012, 3091, 1027, 1027, 1027, 1014, 1007, 2709, 3830, 1025, 13075, 1050, 1010, 2765, 1010, 2773, 1010, 2616, 1027, 3830, 1012, 3975, 1006, 1013, 1031, 1035, 1011, 1033, 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/v4/lib/_Helper.js
function (mMap, sPath, oItem) { if (oItem) { if (!mMap[sPath]) { mMap[sPath] = [oItem]; } else if (mMap[sPath].indexOf(oItem) < 0) { mMap[sPath].push(oItem); } } }
javascript
function (mMap, sPath, oItem) { if (oItem) { if (!mMap[sPath]) { mMap[sPath] = [oItem]; } else if (mMap[sPath].indexOf(oItem) < 0) { mMap[sPath].push(oItem); } } }
[ "function", "(", "mMap", ",", "sPath", ",", "oItem", ")", "{", "if", "(", "oItem", ")", "{", "if", "(", "!", "mMap", "[", "sPath", "]", ")", "{", "mMap", "[", "sPath", "]", "=", "[", "oItem", "]", ";", "}", "else", "if", "(", "mMap", "[", "...
Adds an item to the given map by path. @param {object} mMap A map from path to a list of items @param {string} sPath The path @param {object} [oItem] The item; if it is <code>undefined</code>, nothing happens
[ "Adds", "an", "item", "to", "the", "given", "map", "by", "path", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_Helper.js#L37-L45
train
Adds an item to the map of items to be deleted
[ 30522, 3853, 1006, 21021, 2361, 1010, 14690, 2232, 1010, 1051, 4221, 2213, 1007, 1063, 2065, 1006, 1051, 4221, 2213, 1007, 1063, 2065, 1006, 999, 21021, 2361, 1031, 14690, 2232, 1033, 1007, 1063, 21021, 2361, 1031, 14690, 2232, 1033, 30524,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/utils/EventDispatcher.js
triggerWithArray
function triggerWithArray(dispatcher, eventName, argsArray) { var triggerArgs = [eventName].concat(argsArray); dispatcher.trigger.apply(dispatcher, triggerArgs); }
javascript
function triggerWithArray(dispatcher, eventName, argsArray) { var triggerArgs = [eventName].concat(argsArray); dispatcher.trigger.apply(dispatcher, triggerArgs); }
[ "function", "triggerWithArray", "(", "dispatcher", ",", "eventName", ",", "argsArray", ")", "{", "var", "triggerArgs", "=", "[", "eventName", "]", ".", "concat", "(", "argsArray", ")", ";", "dispatcher", ".", "trigger", ".", "apply", "(", "dispatcher", ",", ...
Utility for calling on() with an array of arguments to pass to event handlers (rather than a varargs list). makeEventDispatcher() must have previously been called on 'dispatcher'. @param {!Object} dispatcher @param {string} eventName @param {!Array.<*>} argsArray
[ "Utility", "for", "calling", "on", "()", "with", "an", "array", "of", "arguments", "to", "pass", "to", "event", "handlers", "(", "rather", "than", "a", "varargs", "list", ")", ".", "makeEventDispatcher", "()", "must", "have", "previously", "been", "called", ...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/utils/EventDispatcher.js#L265-L268
train
trigger with an array of arguments
[ 30522, 3853, 9495, 24415, 2906, 9447, 1006, 18365, 2121, 1010, 2724, 18442, 1010, 12098, 5620, 2906, 9447, 1007, 1063, 13075, 9495, 2906, 5620, 1027, 1031, 2724, 18442, 1033, 1012, 9530, 11266, 1006, 12098, 5620, 2906, 9447, 1007, 1025, 183...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
javascript/selenium-core/scripts/ui-element.js
UISpecifier
function UISpecifier(uiSpecifierStringOrPagesetName, elementName, args) { /** * Initializes this object from a UI specifier string of the form: * * pagesetName::elementName(arg1=value1, arg2=value2, ...) * * into its component parts, and returns them as an object. * * @return ...
javascript
function UISpecifier(uiSpecifierStringOrPagesetName, elementName, args) { /** * Initializes this object from a UI specifier string of the form: * * pagesetName::elementName(arg1=value1, arg2=value2, ...) * * into its component parts, and returns them as an object. * * @return ...
[ "function", "UISpecifier", "(", "uiSpecifierStringOrPagesetName", ",", "elementName", ",", "args", ")", "{", "/**\n * Initializes this object from a UI specifier string of the form:\n *\n * pagesetName::elementName(arg1=value1, arg2=value2, ...)\n *\n * into its component...
The UISpecifier constructor is overloaded. If less than three arguments are provided, the first argument will be considered a UI specifier string, and will be split out accordingly. Otherwise, the first argument will be considered the path. @param uiSpecifierStringOrPagesetName a UI specifier string, or the pageset n...
[ "The", "UISpecifier", "constructor", "is", "overloaded", ".", "If", "less", "than", "three", "arguments", "are", "provided", "the", "first", "argument", "will", "be", "considered", "a", "UI", "specifier", "string", "and", "will", "be", "split", "out", "accordi...
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/ui-element.js#L603-L675
train
A UI specifier object
[ 30522, 3853, 21318, 13102, 8586, 18095, 1006, 21318, 13102, 8586, 28295, 18886, 16656, 14536, 13923, 3388, 18442, 1010, 5783, 18442, 1010, 12098, 5620, 1007, 1063, 1013, 1008, 1008, 1008, 3988, 10057, 2023, 4874, 2013, 1037, 21318, 28699, 180...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/DocumentCommandHandlers.js
_updateTitle
function _updateTitle() { var currentDoc = DocumentManager.getCurrentDocument(), windowTitle = brackets.config.app_title, currentlyViewedFile = MainViewManager.getCurrentlyViewedFile(MainViewManager.ACTIVE_PANE), currentlyViewedPath = currentlyViewedFile && c...
javascript
function _updateTitle() { var currentDoc = DocumentManager.getCurrentDocument(), windowTitle = brackets.config.app_title, currentlyViewedFile = MainViewManager.getCurrentlyViewedFile(MainViewManager.ACTIVE_PANE), currentlyViewedPath = currentlyViewedFile && c...
[ "function", "_updateTitle", "(", ")", "{", "var", "currentDoc", "=", "DocumentManager", ".", "getCurrentDocument", "(", ")", ",", "windowTitle", "=", "brackets", ".", "config", ".", "app_title", ",", "currentlyViewedFile", "=", "MainViewManager", ".", "getCurrentl...
Updates the title bar with new file title or dirty indicator @private
[ "Updates", "the", "title", "bar", "with", "new", "file", "title", "or", "dirty", "indicator" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/document/DocumentCommandHandlers.js#L157-L213
train
Update the title of the toolbar
[ 30522, 3853, 1035, 10651, 3775, 9286, 1006, 1007, 1063, 13075, 2783, 3527, 2278, 1027, 6254, 24805, 4590, 1012, 2131, 10841, 14343, 3372, 3527, 24894, 4765, 1006, 1007, 1010, 3332, 3775, 9286, 1027, 19719, 1012, 9530, 8873, 2290, 1012, 1043...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/EditorManager.js
_handleCurrentFileChange
function _handleCurrentFileChange(e, file) { var doc = file && DocumentManager.getOpenDocumentForPath(file.fullPath); _notifyActiveEditorChanged(doc && doc._masterEditor); }
javascript
function _handleCurrentFileChange(e, file) { var doc = file && DocumentManager.getOpenDocumentForPath(file.fullPath); _notifyActiveEditorChanged(doc && doc._masterEditor); }
[ "function", "_handleCurrentFileChange", "(", "e", ",", "file", ")", "{", "var", "doc", "=", "file", "&&", "DocumentManager", ".", "getOpenDocumentForPath", "(", "file", ".", "fullPath", ")", ";", "_notifyActiveEditorChanged", "(", "doc", "&&", "doc", ".", "_ma...
Current File Changed handler MainViewManager dispatches a "currentFileChange" event whenever the currently viewed file changes. Which could mean that the previously viewed file has been closed or a non-editor view (image) has been given focus. _notifyAcitveEditorChanged is also hooked up to editor.focus to handle foc...
[ "Current", "File", "Changed", "handler", "MainViewManager", "dispatches", "a", "currentFileChange", "event", "whenever", "the", "currently", "viewed", "file", "changes", ".", "Which", "could", "mean", "that", "the", "previously", "viewed", "file", "has", "been", "...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/editor/EditorManager.js#L167-L170
train
Handle current file change
[ 30522, 3853, 1035, 5047, 10841, 14343, 3372, 8873, 2571, 22305, 2063, 1006, 1041, 1010, 5371, 1007, 1063, 13075, 9986, 1027, 5371, 1004, 1004, 6254, 24805, 4590, 1012, 2131, 26915, 3527, 24894, 4765, 29278, 15069, 1006, 5371, 1012, 2440, 15...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
getRichItemNames
function getRichItemNames(textStyleModel) { // Use object to remove duplicated names. var richItemNameMap; while (textStyleModel && textStyleModel !== textStyleModel.ecModel) { var rich = (textStyleModel.option || EMPTY_OBJ).rich; if (rich) { richItemNameMap = richItemNameMap || ...
javascript
function getRichItemNames(textStyleModel) { // Use object to remove duplicated names. var richItemNameMap; while (textStyleModel && textStyleModel !== textStyleModel.ecModel) { var rich = (textStyleModel.option || EMPTY_OBJ).rich; if (rich) { richItemNameMap = richItemNameMap || ...
[ "function", "getRichItemNames", "(", "textStyleModel", ")", "{", "// Use object to remove duplicated names.", "var", "richItemNameMap", ";", "while", "(", "textStyleModel", "&&", "textStyleModel", "!==", "textStyleModel", ".", "ecModel", ")", "{", "var", "rich", "=", ...
Consider case: { data: [{ value: 12, label: { rich: { // no 'a' here but using parent 'a'. } } }], rich: { a: { ... } } }
[ "Consider", "case", ":", "{", "data", ":", "[", "{", "value", ":", "12", "label", ":", "{", "rich", ":", "{", "//", "no", "a", "here", "but", "using", "parent", "a", ".", "}", "}", "}", "]", "rich", ":", "{", "a", ":", "{", "...", "}", "}",...
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/util/graphic.js#L814-L830
train
Get rich item names
[ 30522, 3853, 2131, 13149, 4221, 2213, 18442, 2015, 1006, 6981, 27983, 5302, 9247, 1007, 1063, 1013, 1013, 2224, 4874, 2000, 6366, 24473, 2094, 3415, 1012, 13075, 4138, 4221, 2213, 18442, 2863, 2361, 1025, 2096, 1006, 6981, 27983, 5302, 9247...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/preferences/PreferencesManager.js
setViewState
function setViewState(id, value, context, doNotSave) { PreferencesImpl.stateManager.set(id, value, context); if (!doNotSave) { PreferencesImpl.stateManager.save(); } }
javascript
function setViewState(id, value, context, doNotSave) { PreferencesImpl.stateManager.set(id, value, context); if (!doNotSave) { PreferencesImpl.stateManager.save(); } }
[ "function", "setViewState", "(", "id", ",", "value", ",", "context", ",", "doNotSave", ")", "{", "PreferencesImpl", ".", "stateManager", ".", "set", "(", "id", ",", "value", ",", "context", ")", ";", "if", "(", "!", "doNotSave", ")", "{", "PreferencesImp...
Convenience function that sets a view state and then saves the file @param {string} id preference to set @param {*} value new value for the preference @param {?Object} context Optional additional information about the request @param {boolean=} doNotSave If it is undefined or false, then save the view state immediately...
[ "Convenience", "function", "that", "sets", "a", "view", "state", "and", "then", "saves", "the", "file" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/preferences/PreferencesManager.js#L307-L314
train
Set the state of a view
[ 30522, 3853, 2275, 8584, 9153, 2618, 1006, 8909, 1010, 3643, 1010, 6123, 1010, 2123, 12868, 10696, 1007, 1063, 18394, 5714, 24759, 1012, 2110, 24805, 4590, 1012, 2275, 1006, 8909, 1010, 3643, 1010, 6123, 1007, 1025, 2065, 1006, 999, 2123, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.dt/src/sap/ui/dt/ContextMenuControl.js
function () { if (this._bOpenAsContextMenu && this._oContextMenuPosition.x === null && this._oContextMenuPosition.y === null) { this._bOpenAsContextMenu = false; } // fires the open event after popover is opened this.getPopover().attachAfterOpen(this._handleAfterOpen, this); this.getPopover().attac...
javascript
function () { if (this._bOpenAsContextMenu && this._oContextMenuPosition.x === null && this._oContextMenuPosition.y === null) { this._bOpenAsContextMenu = false; } // fires the open event after popover is opened this.getPopover().attachAfterOpen(this._handleAfterOpen, this); this.getPopover().attac...
[ "function", "(", ")", "{", "if", "(", "this", ".", "_bOpenAsContextMenu", "&&", "this", ".", "_oContextMenuPosition", ".", "x", "===", "null", "&&", "this", ".", "_oContextMenuPosition", ".", "y", "===", "null", ")", "{", "this", ".", "_bOpenAsContextMenu", ...
Finalizes the Opening of the ContextMenu. Is called by "_popupClosed" (when the old Menu is closed) or by "show" if there was no ContextMenu opened before Is needed to prevent flickering (wait for old ContextMenu to close)
[ "Finalizes", "the", "Opening", "of", "the", "ContextMenu", ".", "Is", "called", "by", "_popupClosed", "(", "when", "the", "old", "Menu", "is", "closed", ")", "or", "by", "show", "if", "there", "was", "no", "ContextMenu", "opened", "before", "Is", "needed",...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L192-L209
train
Opens the context menu
[ 30522, 3853, 1006, 1007, 1063, 2065, 1006, 2023, 1012, 1035, 29432, 26474, 8663, 18209, 3549, 2226, 1004, 1004, 2023, 1012, 1035, 1051, 8663, 18209, 3549, 6279, 19234, 1012, 1060, 1027, 1027, 1027, 19701, 1004, 1004, 2023, 1012, 1035, 1051,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/no-else-return.js
alwaysReturns
function alwaysReturns(node) { if (node.type === "BlockStatement") { // If we have a BlockStatement, check each consequent body node. return node.body.some(checkForReturnOrIf); } /* * If not a block statement, make sure the consequent is...
javascript
function alwaysReturns(node) { if (node.type === "BlockStatement") { // If we have a BlockStatement, check each consequent body node. return node.body.some(checkForReturnOrIf); } /* * If not a block statement, make sure the consequent is...
[ "function", "alwaysReturns", "(", "node", ")", "{", "if", "(", "node", ".", "type", "===", "\"BlockStatement\"", ")", "{", "// If we have a BlockStatement, check each consequent body node.", "return", "node", ".", "body", ".", "some", "(", "checkForReturnOrIf", ")", ...
Check whether a node returns in every codepath. @param {Node} node The node to be checked @returns {boolean} `true` if it returns on every codepath.
[ "Check", "whether", "a", "node", "returns", "in", "every", "codepath", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-else-return.js#L199-L211
train
Check if a node is always returns
[ 30522, 3853, 2467, 13465, 14287, 2015, 1006, 13045, 1007, 1063, 2065, 1006, 13045, 1012, 2828, 1027, 1027, 1027, 1000, 5991, 12259, 3672, 1000, 1007, 1063, 1013, 1013, 2065, 2057, 2031, 1037, 5991, 12259, 3672, 1010, 4638, 2169, 9530, 3366,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/LiveDevelopment/Agents/ScriptAgent.js
_onPaused
function _onPaused(event, res) { // res = {callFrames, reason, data} switch (res.reason) { // Exception case "exception": Inspector.Debugger.resume(); // var callFrame = res.callFrames[0]; // var script = scriptWithId(callFrame.location.scriptId); ...
javascript
function _onPaused(event, res) { // res = {callFrames, reason, data} switch (res.reason) { // Exception case "exception": Inspector.Debugger.resume(); // var callFrame = res.callFrames[0]; // var script = scriptWithId(callFrame.location.scriptId); ...
[ "function", "_onPaused", "(", "event", ",", "res", ")", "{", "// res = {callFrames, reason, data}", "switch", "(", "res", ".", "reason", ")", "{", "// Exception", "case", "\"exception\"", ":", "Inspector", ".", "Debugger", ".", "resume", "(", ")", ";", "// var...
WebInspector Event: Debugger.paused
[ "WebInspector", "Event", ":", "Debugger", ".", "paused" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/LiveDevelopment/Agents/ScriptAgent.js#L85-L105
train
onPaused event handler
[ 30522, 3853, 1035, 2006, 4502, 13901, 1006, 2724, 1010, 24501, 1007, 1063, 1013, 1013, 24501, 1027, 1063, 2655, 15643, 2015, 1010, 3114, 1010, 2951, 1065, 6942, 1006, 24501, 1012, 3114, 1007, 1063, 1013, 1013, 6453, 2553, 1000, 6453, 1000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-js
lib/signers/v4_credentials.js
createScope
function createScope(date, region, serviceName) { return [ date.substr(0, 8), region, serviceName, v4Identifier ].join('/'); }
javascript
function createScope(date, region, serviceName) { return [ date.substr(0, 8), region, serviceName, v4Identifier ].join('/'); }
[ "function", "createScope", "(", "date", ",", "region", ",", "serviceName", ")", "{", "return", "[", "date", ".", "substr", "(", "0", ",", "8", ")", ",", "region", ",", "serviceName", ",", "v4Identifier", "]", ".", "join", "(", "'/'", ")", ";", "}" ]
@api private @param date [String] @param region [String] @param serviceName [String] @return [String]
[ "@api", "private" ]
c23e5f0edd150f8885267e5f7c8a564f8e6e8562
https://github.com/aws/aws-sdk-js/blob/c23e5f0edd150f8885267e5f7c8a564f8e6e8562/lib/signers/v4_credentials.js#L35-L42
train
Creates a scope for a given date region and serviceName
[ 30522, 3853, 9005, 16186, 1006, 3058, 1010, 2555, 1010, 2326, 18442, 1007, 1063, 2709, 1031, 3058, 1012, 4942, 3367, 2099, 1006, 1014, 1010, 1022, 1007, 1010, 2555, 1010, 2326, 18442, 1010, 1058, 2549, 5178, 16778, 8873, 2121, 1033, 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...
Dogfalo/materialize
dist/js/materialize.js
showEffect
function showEffect(e) { var element = getWavesEffectElement(e); if (element !== null) { Effect.show(e, element); if ('ontouchstart' in window) { element.addEventListener('touchend', Effect.hide, false); element.addEventListener('touchcancel', Effect.hide, false); } el...
javascript
function showEffect(e) { var element = getWavesEffectElement(e); if (element !== null) { Effect.show(e, element); if ('ontouchstart' in window) { element.addEventListener('touchend', Effect.hide, false); element.addEventListener('touchcancel', Effect.hide, false); } el...
[ "function", "showEffect", "(", "e", ")", "{", "var", "element", "=", "getWavesEffectElement", "(", "e", ")", ";", "if", "(", "element", "!==", "null", ")", "{", "Effect", ".", "show", "(", "e", ",", "element", ")", ";", "if", "(", "'ontouchstart'", "...
Bubble the click and show effect if .waves-effect elem was found
[ "Bubble", "the", "click", "and", "show", "effect", "if", ".", "waves", "-", "effect", "elem", "was", "found" ]
1122efadad8f1433d404696f7613e3cc13fb83a4
https://github.com/Dogfalo/materialize/blob/1122efadad8f1433d404696f7613e3cc13fb83a4/dist/js/materialize.js#L5046-L5061
train
show Effect
[ 30522, 3853, 2265, 12879, 25969, 1006, 1041, 1007, 1063, 13075, 5783, 1027, 2131, 16535, 20106, 25969, 12260, 3672, 1006, 1041, 1007, 1025, 2065, 1006, 5783, 999, 1027, 1027, 19701, 1007, 1063, 3466, 1012, 2265, 1006, 1041, 1010, 5783, 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...
aframevr/aframe
src/components/scene/inspector.js
function (evt) { var shortcutPressed = evt.keyCode === 73 && evt.ctrlKey && evt.altKey; if (!shortcutPressed) { return; } this.openInspector(); }
javascript
function (evt) { var shortcutPressed = evt.keyCode === 73 && evt.ctrlKey && evt.altKey; if (!shortcutPressed) { return; } this.openInspector(); }
[ "function", "(", "evt", ")", "{", "var", "shortcutPressed", "=", "evt", ".", "keyCode", "===", "73", "&&", "evt", ".", "ctrlKey", "&&", "evt", ".", "altKey", ";", "if", "(", "!", "shortcutPressed", ")", "{", "return", ";", "}", "this", ".", "openInsp...
<ctrl> + <alt> + i keyboard shortcut.
[ "<ctrl", ">", "+", "<alt", ">", "+", "i", "keyboard", "shortcut", "." ]
24acc78a7299a4cdfe3ef617f4d40ddf6275c992
https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/components/scene/inspector.js#L61-L65
train
The event handler for the keyboard keypress event.
[ 30522, 3853, 1006, 23408, 2102, 1007, 1063, 13075, 2460, 12690, 19811, 1027, 23408, 2102, 1012, 3145, 16044, 1027, 1027, 1027, 6421, 1004, 1004, 23408, 2102, 1012, 14931, 12190, 14839, 1004, 1004, 23408, 2102, 1012, 12456, 14839, 1025, 2065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...