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
vuejs/vuex
dist/vuex.esm.js
applyMixin
function applyMixin (Vue) { var version = Number(Vue.version.split('.')[0]); if (version >= 2) { Vue.mixin({ beforeCreate: vuexInit }); } else { // override init and inject vuex init procedure // for 1.x backwards compatibility. var _init = Vue.prototype._init; Vue.prototype._init = function ...
javascript
function applyMixin (Vue) { var version = Number(Vue.version.split('.')[0]); if (version >= 2) { Vue.mixin({ beforeCreate: vuexInit }); } else { // override init and inject vuex init procedure // for 1.x backwards compatibility. var _init = Vue.prototype._init; Vue.prototype._init = function ...
[ "function", "applyMixin", "(", "Vue", ")", "{", "var", "version", "=", "Number", "(", "Vue", ".", "version", ".", "split", "(", "'.'", ")", "[", "0", "]", ")", ";", "if", "(", "version", ">=", "2", ")", "{", "Vue", ".", "mixin", "(", "{", "befo...
vuex v3.1.0 (c) 2019 Evan You @license MIT
[ "vuex", "v3", ".", "1", ".", "0", "(", "c", ")", "2019", "Evan", "You" ]
d7c7f9844831f98c5c9aaca213746c4ccc5d6929
https://github.com/vuejs/vuex/blob/d7c7f9844831f98c5c9aaca213746c4ccc5d6929/dist/vuex.esm.js#L6-L40
train
Vue mixin for vuex
[ 30522, 3853, 6611, 4328, 20303, 1006, 24728, 2063, 1007, 1063, 13075, 2544, 1027, 2193, 1006, 24728, 2063, 1012, 2544, 1012, 3975, 1006, 1005, 1012, 1005, 1007, 1031, 1014, 1033, 1007, 1025, 2065, 1006, 2544, 1028, 1027, 1016, 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...
eslint/eslint
lib/rules/capitalized-comments.js
isCommentValid
function isCommentValid(comment, options) { // 1. Check for default ignore pattern. if (DEFAULT_IGNORE_PATTERN.test(comment.value)) { return true; } // 2. Check for custom ignore pattern. const commentWithoutAsterisks = comment.value ...
javascript
function isCommentValid(comment, options) { // 1. Check for default ignore pattern. if (DEFAULT_IGNORE_PATTERN.test(comment.value)) { return true; } // 2. Check for custom ignore pattern. const commentWithoutAsterisks = comment.value ...
[ "function", "isCommentValid", "(", "comment", ",", "options", ")", "{", "// 1. Check for default ignore pattern.", "if", "(", "DEFAULT_IGNORE_PATTERN", ".", "test", "(", "comment", ".", "value", ")", ")", "{", "return", "true", ";", "}", "// 2. Check for custom igno...
Check a comment to determine if it is valid for this rule. @param {ASTNode} comment The comment node to process. @param {Object} options The options for checking this comment. @returns {boolean} True if the comment is valid, false otherwise.
[ "Check", "a", "comment", "to", "determine", "if", "it", "is", "valid", "for", "this", "rule", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/capitalized-comments.js#L204-L260
train
Check if a comment is valid
[ 30522, 3853, 2003, 9006, 3672, 10175, 3593, 1006, 7615, 1010, 7047, 1007, 1063, 1013, 1013, 1015, 1012, 4638, 2005, 12398, 8568, 5418, 1012, 2065, 1006, 12398, 1035, 8568, 1035, 5418, 1012, 3231, 1006, 7615, 1012, 3643, 1007, 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...
apache/incubator-echarts
src/chart/custom.js
mergeChildren
function mergeChildren(el, dataIndex, elOption, animatableModel, data) { var newChildren = elOption.children; var newLen = newChildren ? newChildren.length : 0; var mergeChildren = elOption.$mergeChildren; // `diffChildrenByName` has been deprecated. var byName = mergeChildren === 'byName' || elOpti...
javascript
function mergeChildren(el, dataIndex, elOption, animatableModel, data) { var newChildren = elOption.children; var newLen = newChildren ? newChildren.length : 0; var mergeChildren = elOption.$mergeChildren; // `diffChildrenByName` has been deprecated. var byName = mergeChildren === 'byName' || elOpti...
[ "function", "mergeChildren", "(", "el", ",", "dataIndex", ",", "elOption", ",", "animatableModel", ",", "data", ")", "{", "var", "newChildren", "=", "elOption", ".", "children", ";", "var", "newLen", "=", "newChildren", "?", "newChildren", ".", "length", ":"...
Usage: (1) By default, `elOption.$mergeChildren` is `'byIndex'`, which indicates that the existing children will not be removed, and enables the feature that update some of the props of some of the children simply by construct the returned children of `renderItem` like: `var children = group.children = []; children[3] ...
[ "Usage", ":", "(", "1", ")", "By", "default", "elOption", ".", "$mergeChildren", "is", "byIndex", "which", "indicates", "that", "the", "existing", "children", "will", "not", "be", "removed", "and", "enables", "the", "feature", "that", "update", "some", "of",...
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/chart/custom.js#L640-L686
train
Merge children of an element into another element.
[ 30522, 3853, 13590, 19339, 7389, 1006, 3449, 1010, 2951, 22254, 10288, 1010, 3449, 7361, 3508, 1010, 2019, 9581, 10880, 5302, 9247, 1010, 2951, 1007, 1063, 13075, 2047, 19339, 7389, 1027, 3449, 7361, 3508, 1012, 2336, 1025, 13075, 2047, 777...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/search/node/FindInFilesDomain.js
getAllResults
function getAllResults() { var send_object = { "results": {}, "numMatches": 0, "foundMaximum": foundMaximum, "exceedsMaximum": exceedsMaximum }; if (!savedSearchObject) { return send_object; } savedSearchObject.startFileIndex = 0; savedSearchObject.getA...
javascript
function getAllResults() { var send_object = { "results": {}, "numMatches": 0, "foundMaximum": foundMaximum, "exceedsMaximum": exceedsMaximum }; if (!savedSearchObject) { return send_object; } savedSearchObject.startFileIndex = 0; savedSearchObject.getA...
[ "function", "getAllResults", "(", ")", "{", "var", "send_object", "=", "{", "\"results\"", ":", "{", "}", ",", "\"numMatches\"", ":", "0", ",", "\"foundMaximum\"", ":", "foundMaximum", ",", "\"exceedsMaximum\"", ":", "exceedsMaximum", "}", ";", "if", "(", "!...
Gets all the results for the saved search query if present or empty search results @return {Object} The results object
[ "Gets", "all", "the", "results", "for", "the", "saved", "search", "query", "if", "present", "or", "empty", "search", "results" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/search/node/FindInFilesDomain.js#L544-L557
train
Get all the results
[ 30522, 3853, 2131, 8095, 6072, 11314, 2015, 1006, 1007, 1063, 13075, 4604, 1035, 4874, 1027, 1063, 1000, 3463, 1000, 1024, 1063, 1065, 1010, 1000, 16371, 14760, 10649, 2229, 1000, 1024, 1014, 1010, 1000, 2179, 17848, 28591, 1000, 1024, 2179...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
firebase/firebaseui-web
javascript/widgets/handler/emailnotreceived.js
function() { firebaseui.auth.widget.handler.common.sendEmailLinkForSignIn( app, component, email, onCancelClick, function(error) { // The email provided could be an invalid one or some other error // could occur. ...
javascript
function() { firebaseui.auth.widget.handler.common.sendEmailLinkForSignIn( app, component, email, onCancelClick, function(error) { // The email provided could be an invalid one or some other error // could occur. ...
[ "function", "(", ")", "{", "firebaseui", ".", "auth", ".", "widget", ".", "handler", ".", "common", ".", "sendEmailLinkForSignIn", "(", "app", ",", "component", ",", "email", ",", "onCancelClick", ",", "function", "(", "error", ")", "{", "// The email provid...
On resend link click.
[ "On", "resend", "link", "click", "." ]
c10aa51e38aeb38dc63baa22b48cd6690c2be087
https://github.com/firebase/firebaseui-web/blob/c10aa51e38aeb38dc63baa22b48cd6690c2be087/javascript/widgets/handler/emailnotreceived.js#L44-L58
train
Send an email link for sign in.
[ 30522, 3853, 1006, 1007, 1063, 2543, 15058, 10179, 1012, 8740, 2705, 1012, 15536, 24291, 1012, 28213, 1012, 2691, 1012, 4604, 14545, 8591, 19839, 29278, 5332, 29076, 2078, 1006, 10439, 1010, 6922, 1010, 10373, 1010, 2006, 9336, 29109, 20464, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
heyui/heyui
src/plugins/popper/index.js
update
function update() { // if popper is destroyed, don't perform any further update if (this.state.isDestroyed) { return; } var data = { instance: this, styles: {}, arrowStyles: {}, attributes: {}, flipped: false, offsets: {} }; // compute reference element offsets data.offsets.r...
javascript
function update() { // if popper is destroyed, don't perform any further update if (this.state.isDestroyed) { return; } var data = { instance: this, styles: {}, arrowStyles: {}, attributes: {}, flipped: false, offsets: {} }; // compute reference element offsets data.offsets.r...
[ "function", "update", "(", ")", "{", "// if popper is destroyed, don't perform any further update", "if", "(", "this", ".", "state", ".", "isDestroyed", ")", "{", "return", ";", "}", "var", "data", "=", "{", "instance", ":", "this", ",", "styles", ":", "{", ...
Updates the position of the popper, computing the new offsets and applying the new style.<br /> Prefer `scheduleUpdate` over `update` because of performance reasons. @method @memberof Popper
[ "Updates", "the", "position", "of", "the", "popper", "computing", "the", "new", "offsets", "and", "applying", "the", "new", "style", ".", "<br", "/", ">", "Prefer", "scheduleUpdate", "over", "update", "because", "of", "performance", "reasons", "." ]
d5405d27d994151b676eb91c12b389316d7f6679
https://github.com/heyui/heyui/blob/d5405d27d994151b676eb91c12b389316d7f6679/src/plugins/popper/index.js#L951-L994
train
update the layout
[ 30522, 3853, 10651, 1006, 1007, 1063, 1013, 1013, 2065, 3769, 4842, 2003, 3908, 1010, 2123, 1005, 1056, 4685, 2151, 2582, 10651, 2065, 1006, 2023, 1012, 2110, 1012, 2003, 6155, 13181, 20821, 1007, 1063, 2709, 1025, 1065, 13075, 2951, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
GitbookIO/gitbook
lib/utils/images.js
convertInlinePNG
function convertInlinePNG(source, dest) { if (!/^data\:image\/png/.test(source)) return Promise.reject(new Error('Source is not a PNG data-uri')); var base64data = source.split('data:image/png;base64,')[1]; var buf = new Buffer(base64data, 'base64'); return fs.writeFile(dest, buf) .then(function()...
javascript
function convertInlinePNG(source, dest) { if (!/^data\:image\/png/.test(source)) return Promise.reject(new Error('Source is not a PNG data-uri')); var base64data = source.split('data:image/png;base64,')[1]; var buf = new Buffer(base64data, 'base64'); return fs.writeFile(dest, buf) .then(function()...
[ "function", "convertInlinePNG", "(", "source", ",", "dest", ")", "{", "if", "(", "!", "/", "^data\\:image\\/png", "/", ".", "test", "(", "source", ")", ")", "return", "Promise", ".", "reject", "(", "new", "Error", "(", "'Source is not a PNG data-uri'", ")", ...
Converts a inline data: to png file
[ "Converts", "a", "inline", "data", ":", "to", "png", "file" ]
6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4
https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/utils/images.js#L42-L54
train
Convert an inline PNG to a PNG file
[ 30522, 3853, 10463, 2378, 4179, 2361, 3070, 1006, 3120, 1010, 4078, 2102, 1007, 1063, 2065, 1006, 999, 1013, 1034, 2951, 1032, 1024, 3746, 1032, 1013, 1052, 3070, 1013, 1012, 3231, 1006, 3120, 1007, 1007, 2709, 4872, 1012, 15454, 1006, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/command/Menus.js
registerContextMenu
function registerContextMenu(id) { if (!id) { console.error("call to registerContextMenu() is missing required parameters"); return null; } // Guard against duplicate menu ids if (contextMenuMap[id]) { console.log("Context Menu added with same name an...
javascript
function registerContextMenu(id) { if (!id) { console.error("call to registerContextMenu() is missing required parameters"); return null; } // Guard against duplicate menu ids if (contextMenuMap[id]) { console.log("Context Menu added with same name an...
[ "function", "registerContextMenu", "(", "id", ")", "{", "if", "(", "!", "id", ")", "{", "console", ".", "error", "(", "\"call to registerContextMenu() is missing required parameters\"", ")", ";", "return", "null", ";", "}", "// Guard against duplicate menu ids", "if",...
Registers new context menu with Brackets. Extensions should generally use the predefined context menus built into Brackets. Use this API to add a new context menu to UI that is specific to an extension. After registering a new context menu clients should: - use addMenuItem() to add items to the context menu - call o...
[ "Registers", "new", "context", "menu", "with", "Brackets", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/command/Menus.js#L1371-L1386
train
Register Context Menu
[ 30522, 3853, 4236, 8663, 18209, 3549, 2226, 1006, 8909, 1007, 1063, 2065, 1006, 999, 8909, 1007, 1063, 10122, 1012, 7561, 1006, 1000, 2655, 2000, 4236, 8663, 18209, 30524, 3549, 12248, 2361, 1031, 8909, 1033, 1007, 1063, 10122, 1012, 8833, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
MithrilJS/mithril.js
mithril.js
setAttrs
function setAttrs(vnode3, attrs2, ns) { for (var key in attrs2) { setAttr(vnode3, key, null, attrs2[key], ns) } }
javascript
function setAttrs(vnode3, attrs2, ns) { for (var key in attrs2) { setAttr(vnode3, key, null, attrs2[key], ns) } }
[ "function", "setAttrs", "(", "vnode3", ",", "attrs2", ",", "ns", ")", "{", "for", "(", "var", "key", "in", "attrs2", ")", "{", "setAttr", "(", "vnode3", ",", "key", ",", "null", ",", "attrs2", "[", "key", "]", ",", "ns", ")", "}", "}" ]
attrs2
[ "attrs2" ]
6d36fe09d129928c6b460720e08d9ed321fcd62b
https://github.com/MithrilJS/mithril.js/blob/6d36fe09d129928c6b460720e08d9ed321fcd62b/mithril.js#L1101-L1105
train
set attrs on vnode3
[ 30522, 3853, 2275, 19321, 2869, 1006, 1058, 3630, 3207, 2509, 1010, 2012, 16344, 2015, 2475, 1010, 24978, 1007, 1063, 2005, 1006, 13075, 3145, 1999, 2012, 16344, 2015, 2475, 1007, 1063, 2275, 19321, 2099, 1006, 1058, 3630, 3207, 2509, 1010,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
normalizeSpaces
function normalizeSpaces(text) { // IE has already done this conversion, so doing it again will remove multiple nbsp if (browserVersion.isIE) { return text; } // Replace multiple spaces with a single space // TODO - this shouldn't occur inside PRE elements text = text.replace(/\ +/g...
javascript
function normalizeSpaces(text) { // IE has already done this conversion, so doing it again will remove multiple nbsp if (browserVersion.isIE) { return text; } // Replace multiple spaces with a single space // TODO - this shouldn't occur inside PRE elements text = text.replace(/\ +/g...
[ "function", "normalizeSpaces", "(", "text", ")", "{", "// IE has already done this conversion, so doing it again will remove multiple nbsp", "if", "(", "browserVersion", ".", "isIE", ")", "{", "return", "text", ";", "}", "// Replace multiple spaces with a single space", "// TOD...
Replace multiple sequential spaces with a single space, and then convert &nbsp; to space.
[ "Replace", "multiple", "sequential", "spaces", "with", "a", "single", "space", "and", "then", "convert", "&nbsp", ";", "to", "space", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L221-L240
train
Normalize spaces in text
[ 30522, 3853, 3671, 10057, 15327, 2015, 1006, 3793, 1007, 1063, 1013, 1013, 29464, 2038, 2525, 2589, 2023, 7584, 1010, 2061, 2725, 2009, 2153, 2097, 6366, 3674, 1050, 5910, 2361, 2065, 1006, 16602, 27774, 1012, 2003, 2666, 1007, 1063, 2709, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/no-dupe-class-members.js
getState
function getState(name, isStatic) { const stateMap = stack[stack.length - 1]; const key = `$${name}`; // to avoid "__proto__". if (!stateMap[key]) { stateMap[key] = { nonStatic: { init: false, get: false, set: false }, static: ...
javascript
function getState(name, isStatic) { const stateMap = stack[stack.length - 1]; const key = `$${name}`; // to avoid "__proto__". if (!stateMap[key]) { stateMap[key] = { nonStatic: { init: false, get: false, set: false }, static: ...
[ "function", "getState", "(", "name", ",", "isStatic", ")", "{", "const", "stateMap", "=", "stack", "[", "stack", ".", "length", "-", "1", "]", ";", "const", "key", "=", "`", "${", "name", "}", "`", ";", "// to avoid \"__proto__\".", "if", "(", "!", "...
Gets state of a given member name. @param {string} name - A name of a member. @param {boolean} isStatic - A flag which specifies that is a static member. @returns {Object} A state of a given member name. - retv.init {boolean} A flag which shows the name is declared as normal member. - retv.get {boolean} A flag which sh...
[ "Gets", "state", "of", "a", "given", "member", "name", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-dupe-class-members.js#L42-L54
train
get state of a specific state
[ 30522, 3853, 4152, 12259, 1006, 2171, 1010, 26354, 29336, 2594, 1007, 1063, 9530, 3367, 2110, 2863, 2361, 1027, 9991, 1031, 9991, 1012, 3091, 1011, 1015, 1033, 1025, 9530, 3367, 3145, 1027, 1036, 1002, 1002, 1063, 2171, 1065, 1036, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.documentation/src/sap/ui/documentation/sdk/util/LiveEditorOutput.js
addOnErrorHook
function addOnErrorHook () { window.addEventListener("error", function(error) { error.preventDefault(); var oErrorOutput = document.createElement("span"); oErrorOutput.innerText = error.message; // use save API oErrorOutput.style.cssText = "position:absolute; top:1rem; left:1rem"; if (!document.body) ...
javascript
function addOnErrorHook () { window.addEventListener("error", function(error) { error.preventDefault(); var oErrorOutput = document.createElement("span"); oErrorOutput.innerText = error.message; // use save API oErrorOutput.style.cssText = "position:absolute; top:1rem; left:1rem"; if (!document.body) ...
[ "function", "addOnErrorHook", "(", ")", "{", "window", ".", "addEventListener", "(", "\"error\"", ",", "function", "(", "error", ")", "{", "error", ".", "preventDefault", "(", ")", ";", "var", "oErrorOutput", "=", "document", ".", "createElement", "(", "\"sp...
Listen for errors and display them in the DOM, so that the user does not need to open the console
[ "Listen", "for", "errors", "and", "display", "them", "in", "the", "DOM", "so", "that", "the", "user", "does", "not", "need", "to", "open", "the", "console" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/util/LiveEditorOutput.js#L51-L63
train
Add an error handler to the error output element
[ 30522, 3853, 5587, 5643, 18933, 25032, 14659, 1006, 1007, 1063, 3332, 1012, 5587, 18697, 3372, 9863, 24454, 1006, 30524, 13075, 1051, 2121, 29165, 5833, 18780, 1027, 6254, 1012, 3443, 12260, 3672, 1006, 1000, 8487, 1000, 1007, 1025, 1051, 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...
openlayers/openlayers
tasks/generate-info.js
parseOutput
function parseOutput(output) { if (!output) { throw new Error('Expected JSON output'); } let info; try { info = JSON.parse(String(output)); } catch (err) { throw new Error('Failed to parse output as JSON: ' + output); } if (!Array.isArray(info.symbols)) { throw new Error('Expected symbols...
javascript
function parseOutput(output) { if (!output) { throw new Error('Expected JSON output'); } let info; try { info = JSON.parse(String(output)); } catch (err) { throw new Error('Failed to parse output as JSON: ' + output); } if (!Array.isArray(info.symbols)) { throw new Error('Expected symbols...
[ "function", "parseOutput", "(", "output", ")", "{", "if", "(", "!", "output", ")", "{", "throw", "new", "Error", "(", "'Expected JSON output'", ")", ";", "}", "let", "info", ";", "try", "{", "info", "=", "JSON", ".", "parse", "(", "String", "(", "out...
Parse the JSDoc output. @param {string} output JSDoc output @return {Object} Symbol and define info.
[ "Parse", "the", "JSDoc", "output", "." ]
f366eaea522388fb575b11010e69d309164baca7
https://github.com/openlayers/openlayers/blob/f366eaea522388fb575b11010e69d309164baca7/tasks/generate-info.js#L84-L103
train
Parse the output as JSON
[ 30522, 3853, 11968, 3366, 5833, 18780, 1006, 6434, 1007, 1063, 2065, 1006, 999, 6434, 1007, 1063, 5466, 2047, 7561, 1006, 1005, 30524, 3046, 1063, 18558, 1027, 1046, 3385, 1012, 11968, 3366, 1006, 5164, 1006, 6434, 1007, 1007, 1025, 1065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/v2/ODataListBinding.js
normalizeFilterValues
function normalizeFilterValues(sType, oFilter) { switch (sType) { case "Edm.Decimal": case "Edm.Int64": if (typeof oFilter.oValue1 == "number") { oFilter.oValue1 = oFilter.oValue1.toString(); } if (typeof oFilter.oValue2 == "number") { oFilter.oValue2 = oFilter.oValue2.toString(); } ...
javascript
function normalizeFilterValues(sType, oFilter) { switch (sType) { case "Edm.Decimal": case "Edm.Int64": if (typeof oFilter.oValue1 == "number") { oFilter.oValue1 = oFilter.oValue1.toString(); } if (typeof oFilter.oValue2 == "number") { oFilter.oValue2 = oFilter.oValue2.toString(); } ...
[ "function", "normalizeFilterValues", "(", "sType", ",", "oFilter", ")", "{", "switch", "(", "sType", ")", "{", "case", "\"Edm.Decimal\"", ":", "case", "\"Edm.Int64\"", ":", "if", "(", "typeof", "oFilter", ".", "oValue1", "==", "\"number\"", ")", "{", "oFilte...
Does normalize the filter values according to the given Edm type. This is necessary for comparators to work as expected, even if the wrong JavaScript type is passed to the filter (string vs number) @private
[ "Does", "normalize", "the", "filter", "values", "according", "to", "the", "given", "Edm", "type", ".", "This", "is", "necessary", "for", "comparators", "to", "work", "as", "expected", "even", "if", "the", "wrong", "JavaScript", "type", "is", "passed", "to", ...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v2/ODataListBinding.js#L1289-L1324
train
Normalizes the values of the filter according to the given type.
[ 30522, 3853, 3671, 4697, 8873, 21928, 10175, 15808, 1006, 2358, 18863, 1010, 1997, 4014, 3334, 1007, 1063, 6942, 1006, 2358, 18863, 1007, 1063, 2553, 1000, 3968, 2213, 1012, 26066, 1000, 1024, 2553, 1000, 3968, 2213, 1012, 20014, 21084, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/utils/NativeApp.js
openLiveBrowser
function openLiveBrowser(url, enableRemoteDebugging) { var result = new $.Deferred(); brackets.app.openLiveBrowser(url, !!enableRemoteDebugging, function onRun(err, pid) { if (!err) { // Undefined ids never get removed from list, so don't push them on if (pid...
javascript
function openLiveBrowser(url, enableRemoteDebugging) { var result = new $.Deferred(); brackets.app.openLiveBrowser(url, !!enableRemoteDebugging, function onRun(err, pid) { if (!err) { // Undefined ids never get removed from list, so don't push them on if (pid...
[ "function", "openLiveBrowser", "(", "url", ",", "enableRemoteDebugging", ")", "{", "var", "result", "=", "new", "$", ".", "Deferred", "(", ")", ";", "brackets", ".", "app", ".", "openLiveBrowser", "(", "url", ",", "!", "!", "enableRemoteDebugging", ",", "f...
openLiveBrowser Open the given URL in the user's system browser, optionally enabling debugging. @param {string} url The URL to open. @param {boolean=} enableRemoteDebugging Whether to turn on remote debugging. Default false. @return {$.Promise}
[ "openLiveBrowser", "Open", "the", "given", "URL", "in", "the", "user", "s", "system", "browser", "optionally", "enabling", "debugging", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/utils/NativeApp.js#L51-L67
train
Open Live Browser
[ 30522, 3853, 2330, 3669, 3726, 12618, 9333, 2121, 1006, 24471, 2140, 1010, 9585, 28578, 27428, 15878, 15916, 4726, 1007, 1063, 13075, 2765, 1027, 2047, 1002, 1012, 13366, 28849, 2094, 1006, 1007, 1025, 19719, 1012, 10439, 1012, 2330, 3669, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/core/core.tooltip.js
function(elements, eventPosition) { var x = eventPosition.x; var y = eventPosition.y; var minDistance = Number.POSITIVE_INFINITY; var i, len, nearestElement; for (i = 0, len = elements.length; i < len; ++i) { var el = elements[i]; if (el && el.hasValue()) { var center = el.getCenterPoint(); var...
javascript
function(elements, eventPosition) { var x = eventPosition.x; var y = eventPosition.y; var minDistance = Number.POSITIVE_INFINITY; var i, len, nearestElement; for (i = 0, len = elements.length; i < len; ++i) { var el = elements[i]; if (el && el.hasValue()) { var center = el.getCenterPoint(); var...
[ "function", "(", "elements", ",", "eventPosition", ")", "{", "var", "x", "=", "eventPosition", ".", "x", ";", "var", "y", "=", "eventPosition", ".", "y", ";", "var", "minDistance", "=", "Number", ".", "POSITIVE_INFINITY", ";", "var", "i", ",", "len", "...
Gets the tooltip position nearest of the item nearest to the event position @function Chart.Tooltip.positioners.nearest @param elements {Chart.Element[]} the tooltip elements @param eventPosition {object} the position of the event in canvas coordinates @returns {object} the tooltip position
[ "Gets", "the", "tooltip", "position", "nearest", "of", "the", "item", "nearest", "to", "the", "event", "position" ]
f093c36574d290330ed623e60fbd070421c730d5
https://github.com/chartjs/Chart.js/blob/f093c36574d290330ed623e60fbd070421c730d5/src/core/core.tooltip.js#L145-L174
train
Returns the tooltip position of the nearest element to the given event position
[ 30522, 3853, 1006, 3787, 1010, 2724, 26994, 1007, 1063, 13075, 1060, 1027, 2724, 26994, 1012, 1060, 1025, 13075, 1061, 1027, 2724, 26994, 1012, 1061, 1025, 13075, 2568, 23137, 3401, 1027, 2193, 1012, 3893, 1035, 15579, 1025, 13075, 1045, 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...
caolan/async
lib/eachLimit.js
eachLimit
function eachLimit(coll, limit, iteratee, callback) { return eachOfLimit(limit)(coll, withoutIndex(wrapAsync(iteratee)), callback); }
javascript
function eachLimit(coll, limit, iteratee, callback) { return eachOfLimit(limit)(coll, withoutIndex(wrapAsync(iteratee)), callback); }
[ "function", "eachLimit", "(", "coll", ",", "limit", ",", "iteratee", ",", "callback", ")", "{", "return", "eachOfLimit", "(", "limit", ")", "(", "coll", ",", "withoutIndex", "(", "wrapAsync", "(", "iteratee", ")", ")", ",", "callback", ")", ";", "}" ]
The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time. @name eachLimit @static @memberOf module:Collections @method @see [async.each]{@link module:Collections.each} @alias forEachLimit @category Collection @param {Array|Iterable|AsyncIterable|Object} coll - A coll...
[ "The", "same", "as", "[", "each", "]", "{", "@link", "module", ":", "Collections", ".", "each", "}", "but", "runs", "a", "maximum", "of", "limit", "async", "operations", "at", "a", "time", "." ]
4330d536c106592139fa82062494c9dba0da1fdb
https://github.com/caolan/async/blob/4330d536c106592139fa82062494c9dba0da1fdb/lib/eachLimit.js#L27-L29
train
Iterates over a collection and returns an array of items.
[ 30522, 3853, 2169, 17960, 4183, 1006, 8902, 2140, 1010, 5787, 1010, 2009, 22139, 2063, 1010, 2655, 5963, 1007, 1063, 2709, 2169, 11253, 17960, 4183, 1006, 5787, 1007, 1006, 8902, 2140, 1010, 2302, 22254, 10288, 1006, 10236, 3022, 6038, 2278...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
fex-team/webuploader
dist/webuploader.withoutimage.js
function( block ) { var idx = $.inArray( block, this.pool ); this.pool.splice( idx, 1 ); block.file.remaning--; this.remaning--; }
javascript
function( block ) { var idx = $.inArray( block, this.pool ); this.pool.splice( idx, 1 ); block.file.remaning--; this.remaning--; }
[ "function", "(", "block", ")", "{", "var", "idx", "=", "$", ".", "inArray", "(", "block", ",", "this", ".", "pool", ")", ";", "this", ".", "pool", ".", "splice", "(", "idx", ",", "1", ")", ";", "block", ".", "file", ".", "remaning", "--", ";", ...
让出位置了,可以让其他分片开始上传
[ "让出位置了,可以让其他分片开始上传" ]
7094e4476c5af3b06993d91dde2d223200b9feb7
https://github.com/fex-team/webuploader/blob/7094e4476c5af3b06993d91dde2d223200b9feb7/dist/webuploader.withoutimage.js#L3443-L3449
train
Removes a block from the cache
[ 30522, 3853, 1006, 3796, 1007, 1063, 13075, 8909, 2595, 1027, 1002, 1012, 27118, 11335, 2100, 1006, 3796, 1010, 2023, 1012, 4770, 1007, 1025, 2023, 1012, 4770, 1012, 11867, 13231, 1006, 8909, 2595, 1010, 1015, 1007, 1025, 3796, 1012, 5371, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/service.js
makeUnauthenticatedRequest
function makeUnauthenticatedRequest(operation, params, callback) { if (typeof params === 'function') { callback = params; params = {}; } var request = this.makeRequest(operation, params).toUnauthenticated(); return callback ? request.send(callback) : request; }
javascript
function makeUnauthenticatedRequest(operation, params, callback) { if (typeof params === 'function') { callback = params; params = {}; } var request = this.makeRequest(operation, params).toUnauthenticated(); return callback ? request.send(callback) : request; }
[ "function", "makeUnauthenticatedRequest", "(", "operation", ",", "params", ",", "callback", ")", "{", "if", "(", "typeof", "params", "===", "'function'", ")", "{", "callback", "=", "params", ";", "params", "=", "{", "}", ";", "}", "var", "request", "=", ...
Calls an operation on a service with the given input parameters, without any authentication data. This method is useful for "public" API operations. @param operation [String] the name of the operation to call on the service. @param params [map] a map of input options for the operation @callback callback function(err, ...
[ "Calls", "an", "operation", "on", "a", "service", "with", "the", "given", "input", "parameters", "without", "any", "authentication", "data", ".", "This", "method", "is", "useful", "for", "public", "API", "operations", "." ]
c23e5f0edd150f8885267e5f7c8a564f8e6e8562
https://github.com/aws/aws-sdk-js/blob/c23e5f0edd150f8885267e5f7c8a564f8e6e8562/lib/service.js#L223-L231
train
Make an unauthenticated request
[ 30522, 3853, 2191, 9521, 14317, 4765, 17872, 2890, 15500, 1006, 3169, 1010, 11498, 5244, 1010, 2655, 5963, 1007, 1063, 2065, 1006, 2828, 11253, 11498, 5244, 1027, 1027, 1027, 1005, 3853, 1005, 1007, 1063, 2655, 5963, 1027, 11498, 5244, 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...
laurent22/joplin
ReactNativeClient/lib/MdToHtml/rules/katex.js
isValidDelim
function isValidDelim(state, pos) { var prevChar, nextChar, max = state.posMax, can_open = true, can_close = true; prevChar = pos > 0 ? state.src.charCodeAt(pos - 1) : -1; nextChar = pos + 1 <= max ? state.src.charCodeAt(pos + 1) : -1; // Check non-whitespace conditions for opening and closing, and // chec...
javascript
function isValidDelim(state, pos) { var prevChar, nextChar, max = state.posMax, can_open = true, can_close = true; prevChar = pos > 0 ? state.src.charCodeAt(pos - 1) : -1; nextChar = pos + 1 <= max ? state.src.charCodeAt(pos + 1) : -1; // Check non-whitespace conditions for opening and closing, and // chec...
[ "function", "isValidDelim", "(", "state", ",", "pos", ")", "{", "var", "prevChar", ",", "nextChar", ",", "max", "=", "state", ".", "posMax", ",", "can_open", "=", "true", ",", "can_close", "=", "true", ";", "prevChar", "=", "pos", ">", "0", "?", "sta...
Test if potential opening or closing delimieter Assumes that there is a "$" at state.src[pos]
[ "Test", "if", "potential", "opening", "or", "closing", "delimieter", "Assumes", "that", "there", "is", "a", "$", "at", "state", ".", "src", "[", "pos", "]" ]
beb428b246cecba4630a3ca57b472f43c0933a43
https://github.com/laurent22/joplin/blob/beb428b246cecba4630a3ca57b472f43c0933a43/ReactNativeClient/lib/MdToHtml/rules/katex.js#L28-L51
train
Check if a delimiter is valid
[ 30522, 3853, 2003, 10175, 3593, 9247, 5714, 1006, 2110, 1010, 13433, 2015, 1007, 1063, 13075, 3653, 25465, 8167, 1010, 2279, 7507, 2099, 1010, 4098, 1027, 2110, 1012, 13433, 26212, 2595, 1010, 2064, 1035, 2330, 1027, 2995, 1010, 2064, 1035,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jgraph/mxgraph
javascript/mxClient.js
function(node, linefeed) { var xml = ''; if (window.XMLSerializer != null) { var xmlSerializer = new XMLSerializer(); xml = xmlSerializer.serializeToString(node); } else if (node.xml != null) { xml = node.xml.replace(/\r\n\t[\t]*/g, ''). replace(/>\r\n/g, '>'). replace(/\r\n/g, '\n')...
javascript
function(node, linefeed) { var xml = ''; if (window.XMLSerializer != null) { var xmlSerializer = new XMLSerializer(); xml = xmlSerializer.serializeToString(node); } else if (node.xml != null) { xml = node.xml.replace(/\r\n\t[\t]*/g, ''). replace(/>\r\n/g, '>'). replace(/\r\n/g, '\n')...
[ "function", "(", "node", ",", "linefeed", ")", "{", "var", "xml", "=", "''", ";", "if", "(", "window", ".", "XMLSerializer", "!=", "null", ")", "{", "var", "xmlSerializer", "=", "new", "XMLSerializer", "(", ")", ";", "xml", "=", "xmlSerializer", ".", ...
Function: getXml Returns the XML content of the specified node. For Internet Explorer, all \r\n\t[\t]* are removed from the XML string and the remaining \r\n are replaced by \n. All \n are then replaced with linefeed, or &#xa; if no linefeed is defined. Parameters: node - DOM node to return the XML for. linefeed - O...
[ "Function", ":", "getXml" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L2974-L2995
train
Returns the XML representation of the node.
[ 30522, 3853, 1006, 13045, 1010, 2240, 7959, 2098, 1007, 1063, 13075, 20950, 1027, 1005, 1005, 1025, 2065, 1006, 3332, 1012, 20950, 8043, 4818, 17629, 999, 1027, 19701, 1007, 1063, 13075, 20950, 8043, 4818, 17629, 1027, 2047, 30524, 1025, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/document/DocumentCommandHandlers.js
_doRevert
function _doRevert(doc, suppressError) { var result = new $.Deferred(); FileUtils.readAsText(doc.file) .done(function (text, readTimestamp) { doc.refreshText(text, readTimestamp); result.resolve(); }) .fail(function (error) { ...
javascript
function _doRevert(doc, suppressError) { var result = new $.Deferred(); FileUtils.readAsText(doc.file) .done(function (text, readTimestamp) { doc.refreshText(text, readTimestamp); result.resolve(); }) .fail(function (error) { ...
[ "function", "_doRevert", "(", "doc", ",", "suppressError", ")", "{", "var", "result", "=", "new", "$", ".", "Deferred", "(", ")", ";", "FileUtils", ".", "readAsText", "(", "doc", ".", "file", ")", ".", "done", "(", "function", "(", "text", ",", "read...
Reverts the Document to the current contents of its file on disk. Discards any unsaved changes in the Document. @private @param {Document} doc @param {boolean=} suppressError If true, then a failure to read the file will be ignored and the resulting promise will be resolved rather than rejected. @return {$.Promise} a P...
[ "Reverts", "the", "Document", "to", "the", "current", "contents", "of", "its", "file", "on", "disk", ".", "Discards", "any", "unsaved", "changes", "in", "the", "Document", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/document/DocumentCommandHandlers.js#L849-L869
train
Revert the file
[ 30522, 3853, 1035, 2079, 2890, 16874, 1006, 9986, 1010, 16081, 2121, 29165, 1007, 1063, 13075, 2765, 1027, 2047, 1002, 1012, 13366, 28849, 2094, 1006, 1007, 1025, 5371, 21823, 4877, 1012, 3191, 14083, 10288, 2102, 1006, 9986, 1012, 5371, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/JSLint/main.js
_getIndentSize
function _getIndentSize(fullPath) { return Editor.getUseTabChar(fullPath) ? Editor.getTabSize(fullPath) : Editor.getSpaceUnits(fullPath); }
javascript
function _getIndentSize(fullPath) { return Editor.getUseTabChar(fullPath) ? Editor.getTabSize(fullPath) : Editor.getSpaceUnits(fullPath); }
[ "function", "_getIndentSize", "(", "fullPath", ")", "{", "return", "Editor", ".", "getUseTabChar", "(", "fullPath", ")", "?", "Editor", ".", "getTabSize", "(", "fullPath", ")", ":", "Editor", ".", "getSpaceUnits", "(", "fullPath", ")", ";", "}" ]
gets indentation size depending whether the tabs or spaces are used
[ "gets", "indentation", "size", "depending", "whether", "the", "tabs", "or", "spaces", "are", "used" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/JSLint/main.js#L210-L212
train
Get indent size of file
[ 30522, 3853, 1035, 2131, 22254, 11187, 4697, 1006, 2440, 15069, 1007, 1063, 2709, 3559, 1012, 2131, 8557, 2696, 9818, 8167, 1006, 2440, 15069, 1007, 1029, 3559, 1012, 2131, 2696, 5910, 4697, 1006, 2440, 15069, 1007, 30524, 19496, 3215, 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...
jgraph/mxgraph
javascript/mxClient.js
function(str, chars) { chars = chars || "\\s"; return (str != null) ? str.replace(new RegExp("^[" + chars + "]+", "g"), "") : null; }
javascript
function(str, chars) { chars = chars || "\\s"; return (str != null) ? str.replace(new RegExp("^[" + chars + "]+", "g"), "") : null; }
[ "function", "(", "str", ",", "chars", ")", "{", "chars", "=", "chars", "||", "\"\\\\s\"", ";", "return", "(", "str", "!=", "null", ")", "?", "str", ".", "replace", "(", "new", "RegExp", "(", "\"^[\"", "+", "chars", "+", "\"]+\"", ",", "\"g\"", ")",...
Function: ltrim Strips all whitespaces from the beginning of the string. Without the second parameter, this will trim these characters: - " " (ASCII 32 (0x20)), an ordinary space - "\t" (ASCII 9 (0x09)), a tab - "\n" (ASCII 10 (0x0A)), a new line (line feed) - "\r" (ASCII 13 (0x0D)), a carriage return - "\0" (ASCII 0...
[ "Function", ":", "ltrim" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L4912-L4917
train
Removes all occurrences of a character in a string
[ 30522, 3853, 1006, 2358, 2099, 1010, 25869, 2015, 1007, 1063, 25869, 2015, 1027, 25869, 2015, 1064, 1064, 1000, 1032, 1032, 1055, 1000, 1025, 2709, 1006, 2358, 2099, 999, 1027, 19701, 1007, 1029, 2358, 2099, 1012, 5672, 1006, 2047, 19723, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function () { var oModel = this._oDialog.getModel("view"), sSelectedLocation = oModel.getProperty("/SelectedLocation"), oControl; if (sSelectedLocation === "custom") { oControl = this._getControl("customBootstrapURL",this._SUPPORT_ASSISTANT_POPOVER_ID); var sValue = oControl.getValue(); try {...
javascript
function () { var oModel = this._oDialog.getModel("view"), sSelectedLocation = oModel.getProperty("/SelectedLocation"), oControl; if (sSelectedLocation === "custom") { oControl = this._getControl("customBootstrapURL",this._SUPPORT_ASSISTANT_POPOVER_ID); var sValue = oControl.getValue(); try {...
[ "function", "(", ")", "{", "var", "oModel", "=", "this", ".", "_oDialog", ".", "getModel", "(", "\"view\"", ")", ",", "sSelectedLocation", "=", "oModel", ".", "getProperty", "(", "\"/SelectedLocation\"", ")", ",", "oControl", ";", "if", "(", "sSelectedLocati...
Handler for onAfterOpen event from popover @private
[ "Handler", "for", "onAfterOpen", "event", "from", "popover" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L795-L820
train
Validates the value of the selected location
[ 30522, 3853, 1006, 1007, 1063, 13075, 18168, 10244, 2140, 1027, 2023, 1012, 1035, 21045, 23067, 2290, 1012, 2131, 5302, 9247, 1006, 1000, 3193, 1000, 1007, 1010, 7020, 12260, 10985, 4135, 10719, 1027, 18168, 10244, 2140, 1012, 2131, 21572, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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 () { this._initAndBindSelectedContentModel(); var oRouter = sap.ui.core.UIComponent.getRouterFor(this); oRouter.getRoute("ContentDetails").attachMatched(this._onRouteMatched, this); oRouter.getRoute("ContentDetailsFlip").attachMatched(this._onRouteMatched, this); }
javascript
function () { this._initAndBindSelectedContentModel(); var oRouter = sap.ui.core.UIComponent.getRouterFor(this); oRouter.getRoute("ContentDetails").attachMatched(this._onRouteMatched, this); oRouter.getRoute("ContentDetailsFlip").attachMatched(this._onRouteMatched, this); }
[ "function", "(", ")", "{", "this", ".", "_initAndBindSelectedContentModel", "(", ")", ";", "var", "oRouter", "=", "sap", ".", "ui", ".", "core", ".", "UIComponent", ".", "getRouterFor", "(", "this", ")", ";", "oRouter", ".", "getRoute", "(", "\"ContentDeta...
Initialize function; Handles data binding and route matching. @public
[ "Initialize", "function", ";", "Handles", "data", "binding", "and", "route", "matching", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js#L41-L46
train
Initializes the selected content model and binds the matched event to the selected content model.
[ 30522, 3853, 1006, 1007, 1063, 2023, 1012, 1035, 1999, 25451, 18939, 22254, 11246, 22471, 2098, 8663, 6528, 21246, 10244, 2140, 1006, 1007, 1025, 13075, 20298, 19901, 1027, 20066, 1012, 21318, 1012, 4563, 1012, 21318, 9006, 29513, 3372, 1012,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/angular
tools/gulp-tasks/cldr/extract.js
removeDuplicates
function removeDuplicates(data) { const dedup = [data[0]]; for(let i = 1; i < data.length; i++) { if (stringify(data[i]) !== stringify(data[i - 1])) { dedup.push(data[i]); } else { dedup.push(undefined); } } return dedup; }
javascript
function removeDuplicates(data) { const dedup = [data[0]]; for(let i = 1; i < data.length; i++) { if (stringify(data[i]) !== stringify(data[i - 1])) { dedup.push(data[i]); } else { dedup.push(undefined); } } return dedup; }
[ "function", "removeDuplicates", "(", "data", ")", "{", "const", "dedup", "=", "[", "data", "[", "0", "]", "]", ";", "for", "(", "let", "i", "=", "1", ";", "i", "<", "data", ".", "length", ";", "i", "++", ")", "{", "if", "(", "stringify", "(", ...
To create smaller locale files, we remove duplicated data. To be make this work we need to store similar data in arrays, if some value in an array is undefined, we can take the previous defined value instead, because it means that it has been deduplicated. e.g.: [x, y, undefined, z, undefined, undefined] The first unde...
[ "To", "create", "smaller", "locale", "files", "we", "remove", "duplicated", "data", ".", "To", "be", "make", "this", "work", "we", "need", "to", "store", "similar", "data", "in", "arrays", "if", "some", "value", "in", "an", "array", "is", "undefined", "w...
c016e2c4ecf7529f08fae4ca0f5c8b0170c6b51c
https://github.com/angular/angular/blob/c016e2c4ecf7529f08fae4ca0f5c8b0170c6b51c/tools/gulp-tasks/cldr/extract.js#L560-L570
train
Remove duplicates from the array
[ 30522, 3853, 3718, 6279, 19341, 4570, 1006, 2951, 1007, 1063, 9530, 3367, 2139, 8566, 2361, 1027, 1031, 2951, 1031, 1014, 1033, 1033, 1025, 2005, 1006, 2292, 1045, 1027, 1015, 1025, 1045, 1026, 2951, 1012, 3091, 1025, 1045, 1009, 1009, 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...
SheetJS/js-xlsx
xlsx.js
parse_PtgExp
function parse_PtgExp(blob, length, opts) { blob.l++; if(opts && opts.biff == 12) return [blob.read_shift(4, 'i'), 0]; var row = blob.read_shift(2); var col = blob.read_shift(opts && opts.biff == 2 ? 1 : 2); return [row, col]; }
javascript
function parse_PtgExp(blob, length, opts) { blob.l++; if(opts && opts.biff == 12) return [blob.read_shift(4, 'i'), 0]; var row = blob.read_shift(2); var col = blob.read_shift(opts && opts.biff == 2 ? 1 : 2); return [row, col]; }
[ "function", "parse_PtgExp", "(", "blob", ",", "length", ",", "opts", ")", "{", "blob", ".", "l", "++", ";", "if", "(", "opts", "&&", "opts", ".", "biff", "==", "12", ")", "return", "[", "blob", ".", "read_shift", "(", "4", ",", "'i'", ")", ",", ...
/* [MS-XLS] 2.5.198.58 ; [MS-XLSB] 2.5.97.40
[ "/", "*", "[", "MS", "-", "XLS", "]", "2", ".", "5", ".", "198", ".", "58", ";", "[", "MS", "-", "XLSB", "]", "2", ".", "5", ".", "97", ".", "40" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L10474-L10480
train
Parse a PTG expression
[ 30522, 3853, 11968, 3366, 1035, 13866, 3351, 2595, 2361, 1006, 1038, 4135, 2497, 1010, 3091, 1010, 23569, 2015, 1007, 1063, 1038, 4135, 2497, 1012, 1048, 1009, 1009, 1025, 2065, 1006, 23569, 2015, 1004, 1004, 23569, 2015, 1012, 12170, 4246,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/less.js
function () { var k; k = $re(/^[_A-Za-z-][_A-Za-z0-9-]*/); if (k) { var color = tree.Color.fromKeyword(k); if (color) { return color; } ...
javascript
function () { var k; k = $re(/^[_A-Za-z-][_A-Za-z0-9-]*/); if (k) { var color = tree.Color.fromKeyword(k); if (color) { return color; } ...
[ "function", "(", ")", "{", "var", "k", ";", "k", "=", "$re", "(", "/", "^[_A-Za-z-][_A-Za-z0-9-]*", "/", ")", ";", "if", "(", "k", ")", "{", "var", "color", "=", "tree", ".", "Color", ".", "fromKeyword", "(", "k", ")", ";", "if", "(", "color", ...
A catch-all word, such as: black border-collapse
[ "A", "catch", "-", "all", "word", "such", "as", ":", "black", "border", "-", "collapse" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/less.js#L831-L842
train
Returns the next keyword in the list
[ 30522, 3853, 1006, 1007, 1063, 13075, 1047, 1025, 1047, 1027, 1002, 2128, 1006, 1013, 1034, 1031, 1035, 1037, 1011, 23564, 1011, 1062, 1011, 1033, 1031, 1035, 1037, 1011, 23564, 1011, 1062, 2692, 1011, 1023, 1011, 1033, 1008, 1013, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
lib/jsdoc/ui5/template/publish.js
makeExample
function makeExample(example) { var result = { caption: null, example: example }, match = /^\s*<caption>([\s\S]+?)<\/caption>(?:[ \t]*[\n\r]*)([\s\S]+)$/i.exec(example); if ( match ) { result.caption = match[1]; result.example = match[2]; } return result; }
javascript
function makeExample(example) { var result = { caption: null, example: example }, match = /^\s*<caption>([\s\S]+?)<\/caption>(?:[ \t]*[\n\r]*)([\s\S]+)$/i.exec(example); if ( match ) { result.caption = match[1]; result.example = match[2]; } return result; }
[ "function", "makeExample", "(", "example", ")", "{", "var", "result", "=", "{", "caption", ":", "null", ",", "example", ":", "example", "}", ",", "match", "=", "/", "^\\s*<caption>([\\s\\S]+?)<\\/caption>(?:[ \\t]*[\\n\\r]*)([\\s\\S]+)$", "/", "i", ".", "exec", ...
Example
[ "Example" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/lib/jsdoc/ui5/template/publish.js#L4111-L4124
train
Creates an example object from a string
[ 30522, 3853, 2191, 10288, 16613, 2571, 1006, 2742, 1007, 1063, 13075, 2765, 1027, 1063, 14408, 3258, 1024, 19701, 1010, 2742, 1024, 2742, 1065, 1010, 2674, 1027, 1013, 1034, 1032, 1055, 1008, 1026, 14408, 3258, 1028, 1006, 1031, 1032, 1055,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/src/ShallowWrapper.js
getContextFromWrappingComponent
function getContextFromWrappingComponent(wrapper, adapter) { const rootFinder = deepRender(wrapper, wrapper[ROOT_FINDER], adapter); if (!rootFinder) { throw new Error('`wrappingComponent` must render its children!'); } return { legacyContext: rootFinder[OPTIONS].context, providerValues: rootFinder[P...
javascript
function getContextFromWrappingComponent(wrapper, adapter) { const rootFinder = deepRender(wrapper, wrapper[ROOT_FINDER], adapter); if (!rootFinder) { throw new Error('`wrappingComponent` must render its children!'); } return { legacyContext: rootFinder[OPTIONS].context, providerValues: rootFinder[P...
[ "function", "getContextFromWrappingComponent", "(", "wrapper", ",", "adapter", ")", "{", "const", "rootFinder", "=", "deepRender", "(", "wrapper", ",", "wrapper", "[", "ROOT_FINDER", "]", ",", "adapter", ")", ";", "if", "(", "!", "rootFinder", ")", "{", "thr...
Deep-renders the `wrappingComponent` and returns the context that should be accessible to the primary wrapper. @param {WrappingComponentWrapper} wrapper The `WrappingComponentWrapper` for a `wrappingComponent` @param {Adapter} adapter An Enzyme adapter @returns {object} An object containing an object of legacy context...
[ "Deep", "-", "renders", "the", "wrappingComponent", "and", "returns", "the", "context", "that", "should", "be", "accessible", "to", "the", "primary", "wrapper", "." ]
cd430eae95eba151f17e970ee77c18f09476de0e
https://github.com/airbnb/enzyme/blob/cd430eae95eba151f17e970ee77c18f09476de0e/packages/enzyme/src/ShallowWrapper.js#L320-L329
train
Get the context from a wrapping component
[ 30522, 3853, 2131, 8663, 18209, 19699, 5358, 13088, 29098, 2075, 9006, 29513, 3372, 1006, 10236, 4842, 1010, 15581, 2121, 1007, 1063, 9530, 3367, 7117, 23695, 1027, 2784, 7389, 4063, 1006, 10236, 4842, 1010, 10236, 4842, 1031, 7117, 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.m/src/sap/m/TabStripRenderer.js
getTabStripItemAccAttributes
function getTabStripItemAccAttributes(oItem, oTabStrip, oSelectedItem) { var aItems = oTabStrip.getItems(), iIndex = aItems.indexOf(oItem), oTabStripParent = oTabStrip.getParent(), mAccAttributes = { role: "tab"}, sDescribedBy = InvisibleText.getStaticId("sap.m", "TABSTRIP_ITEM_CLOSABLE") + " "; sDesc...
javascript
function getTabStripItemAccAttributes(oItem, oTabStrip, oSelectedItem) { var aItems = oTabStrip.getItems(), iIndex = aItems.indexOf(oItem), oTabStripParent = oTabStrip.getParent(), mAccAttributes = { role: "tab"}, sDescribedBy = InvisibleText.getStaticId("sap.m", "TABSTRIP_ITEM_CLOSABLE") + " "; sDesc...
[ "function", "getTabStripItemAccAttributes", "(", "oItem", ",", "oTabStrip", ",", "oSelectedItem", ")", "{", "var", "aItems", "=", "oTabStrip", ".", "getItems", "(", ")", ",", "iIndex", "=", "aItems", ".", "indexOf", "(", "oItem", ")", ",", "oTabStripParent", ...
Returns the accessibility attributes for a given <code>TabStripItem</code>. @param {sap.m.TabStripItem} oItem The <code>TabStripItem</code> to prepare accessibility attributes for @param {sap.ui.core.Control} oTabStripParent The <code>TabStrip</code> parent control @param {sap.m.TabStripItem} oSelectedItem The <code>T...
[ "Returns", "the", "accessibility", "attributes", "for", "a", "given", "<code", ">", "TabStripItem<", "/", "code", ">", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/TabStripRenderer.js#L264-L286
train
Returns an object with attributes to be added to the given tabStrip
[ 30522, 3853, 2131, 2696, 5910, 24901, 4221, 22911, 11266, 18886, 8569, 4570, 1006, 1051, 4221, 2213, 1010, 27178, 7875, 3367, 29443, 1010, 9808, 12260, 10985, 4221, 2213, 1007, 1063, 13075, 9932, 18532, 2015, 1027, 27178, 7875, 3367, 29443, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/jszip.js
function(reader, from, length, compression, uncompressedSize) { return function() { var compressedFileData = utils.transformTo(compression.uncompressInputType, this.getCompressedContent()); var uncompressedFileData = compression.uncompress(compressedFileData); if (uncompres...
javascript
function(reader, from, length, compression, uncompressedSize) { return function() { var compressedFileData = utils.transformTo(compression.uncompressInputType, this.getCompressedContent()); var uncompressedFileData = compression.uncompress(compressedFileData); if (uncompres...
[ "function", "(", "reader", ",", "from", ",", "length", ",", "compression", ",", "uncompressedSize", ")", "{", "return", "function", "(", ")", "{", "var", "compressedFileData", "=", "utils", ".", "transformTo", "(", "compression", ".", "uncompressInputType", ",...
Prepare the function used to generate the uncompressed content from this ZipFile. @param {DataReader} reader the reader to use. @param {number} from the offset from where we should read the data. @param {number} length the length of the data to read. @param {JSZip.compression} compression the compression used on this f...
[ "Prepare", "the", "function", "used", "to", "generate", "the", "uncompressed", "content", "from", "this", "ZipFile", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/jszip.js#L1942-L1954
train
uncompress the file
[ 30522, 3853, 1006, 8068, 1010, 2013, 1010, 3091, 1010, 13379, 1010, 4895, 9006, 19811, 5332, 4371, 1007, 1063, 2709, 3853, 1006, 1007, 1063, 13075, 16620, 8873, 3709, 6790, 1027, 21183, 12146, 1012, 10938, 3406, 1006, 13379, 1012, 4895, 900...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/prefer-arrow-callback.js
checkMetaProperty
function checkMetaProperty(node, metaName, propertyName) { return node.meta.name === metaName && node.property.name === propertyName; }
javascript
function checkMetaProperty(node, metaName, propertyName) { return node.meta.name === metaName && node.property.name === propertyName; }
[ "function", "checkMetaProperty", "(", "node", ",", "metaName", ",", "propertyName", ")", "{", "return", "node", ".", "meta", ".", "name", "===", "metaName", "&&", "node", ".", "property", ".", "name", "===", "propertyName", ";", "}" ]
Checks whether or not a given MetaProperty node equals to a given value. @param {ASTNode} node - A MetaProperty node to check. @param {string} metaName - The name of `MetaProperty.meta`. @param {string} propertyName - The name of `MetaProperty.property`. @returns {boolean} `true` if the node is the specific value.
[ "Checks", "whether", "or", "not", "a", "given", "MetaProperty", "node", "equals", "to", "a", "given", "value", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/prefer-arrow-callback.js#L28-L30
train
Check if a node is a meta property
[ 30522, 3853, 4638, 11368, 9331, 18981, 15010, 1006, 13045, 1010, 18804, 18442, 1010, 3200, 18442, 1007, 1063, 2709, 13045, 1012, 18804, 1012, 2171, 1027, 1027, 1027, 18804, 18442, 1004, 1004, 13045, 1012, 3200, 1012, 2171, 1027, 1027, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
wix/Detox
website/gatherDocs.js
checkOutTag
function checkOutTag(repo, tag) { return git.Reference.dwim(repo, 'refs/tags/' + tag) .then(function(ref) { return ref.peel(git.Object.TYPE.COMMIT); }) .then(function(ref) { return repo.getCommit(ref); }) .then(function(commit) { return git.Checkout.tree(repo, commit, { c...
javascript
function checkOutTag(repo, tag) { return git.Reference.dwim(repo, 'refs/tags/' + tag) .then(function(ref) { return ref.peel(git.Object.TYPE.COMMIT); }) .then(function(ref) { return repo.getCommit(ref); }) .then(function(commit) { return git.Checkout.tree(repo, commit, { c...
[ "function", "checkOutTag", "(", "repo", ",", "tag", ")", "{", "return", "git", ".", "Reference", ".", "dwim", "(", "repo", ",", "'refs/tags/'", "+", "tag", ")", ".", "then", "(", "function", "(", "ref", ")", "{", "return", "ref", ".", "peel", "(", ...
https://stackoverflow.com/a/46140283/1559386
[ "https", ":", "//", "stackoverflow", ".", "com", "/", "a", "/", "46140283", "/", "1559386" ]
0ed5e8c7ba279a3a409130b4d4bad3f9a9c2f1f9
https://github.com/wix/Detox/blob/0ed5e8c7ba279a3a409130b4d4bad3f9a9c2f1f9/website/gatherDocs.js#L36-L51
train
Check out a commit tag
[ 30522, 3853, 4638, 5833, 15900, 1006, 16360, 2080, 1010, 6415, 1007, 1063, 2709, 21025, 2102, 1012, 4431, 1012, 1040, 9148, 2213, 1006, 16360, 2080, 1010, 1005, 25416, 2015, 1013, 22073, 1013, 1005, 1009, 6415, 1007, 1012, 2059, 1006, 3853,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
GitbookIO/gitbook
lib/modifiers/summary/removePart.js
removePart
function removePart(summary, index) { var parts = summary.getParts().remove(index); return indexLevels(summary.set('parts', parts)); }
javascript
function removePart(summary, index) { var parts = summary.getParts().remove(index); return indexLevels(summary.set('parts', parts)); }
[ "function", "removePart", "(", "summary", ",", "index", ")", "{", "var", "parts", "=", "summary", ".", "getParts", "(", ")", ".", "remove", "(", "index", ")", ";", "return", "indexLevels", "(", "summary", ".", "set", "(", "'parts'", ",", "parts", ")", ...
Remove a part at given index @param {Summary} summary @param {Number|} index @return {Summary}
[ "Remove", "a", "part", "at", "given", "index" ]
6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4
https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/modifiers/summary/removePart.js#L10-L13
train
Remove a part from a summary
[ 30522, 3853, 6366, 19362, 2102, 1006, 12654, 1010, 5950, 1007, 1063, 13075, 3033, 1027, 12654, 1012, 2131, 26950, 1006, 1007, 1012, 6366, 1006, 5950, 1007, 1025, 2709, 5950, 20414, 9050, 1006, 12654, 1012, 2275, 1006, 1005, 3033, 1005, 1010...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
javascript/selenium-core/lib/scriptaculous/dragdrop.js
function(element, options) { return Element.findChildren( element, options.only, options.tree ? true : false, options.tag); }
javascript
function(element, options) { return Element.findChildren( element, options.only, options.tree ? true : false, options.tag); }
[ "function", "(", "element", ",", "options", ")", "{", "return", "Element", ".", "findChildren", "(", "element", ",", "options", ".", "only", ",", "options", ".", "tree", "?", "true", ":", "false", ",", "options", ".", "tag", ")", ";", "}" ]
return all suitable-for-sortable elements in a guaranteed order
[ "return", "all", "suitable", "-", "for", "-", "sortable", "elements", "in", "a", "guaranteed", "order" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/lib/scriptaculous/dragdrop.js#L665-L668
train
Find the children of an element
[ 30522, 3853, 1006, 5783, 1010, 7047, 1007, 1063, 2709, 5783, 1012, 2424, 19339, 7389, 1006, 5783, 1010, 7047, 1012, 2069, 1010, 7047, 1012, 3392, 1029, 2995, 1024, 6270, 1010, 7047, 1012, 6415, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/FileTreeViewModel.js
_isFilePathVisible
function _isFilePathVisible(treeData, path) { if (path === null) { return null; } else if (path === "") { return true; } var parts = path.split("/"), part = parts.shift(), result = [], node; while (part) { ...
javascript
function _isFilePathVisible(treeData, path) { if (path === null) { return null; } else if (path === "") { return true; } var parts = path.split("/"), part = parts.shift(), result = [], node; while (part) { ...
[ "function", "_isFilePathVisible", "(", "treeData", ",", "path", ")", "{", "if", "(", "path", "===", "null", ")", "{", "return", "null", ";", "}", "else", "if", "(", "path", "===", "\"\"", ")", "{", "return", "true", ";", "}", "var", "parts", "=", "...
@private See `FileTreeViewModel.isFilePathVisible`
[ "@private" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/project/FileTreeViewModel.js#L223-L257
train
Check if a file path is visible in the tree
[ 30522, 3853, 1035, 2003, 8873, 2571, 15069, 11365, 7028, 1006, 3392, 2850, 2696, 1010, 4130, 1007, 1063, 2065, 1006, 4130, 1027, 1027, 1027, 19701, 1007, 1063, 2709, 19701, 1025, 1065, 2842, 2065, 1006, 4130, 1027, 1027, 1027, 1000, 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...
adobe/brackets
src/LiveDevelopment/LiveDevelopment.js
_onConnect
function _onConnect(event) { // When the browser navigates away from the primary live document Inspector.Page.on("frameNavigated.livedev", _onFrameNavigated); // When the Inspector WebSocket disconnects unexpectedely Inspector.on("disconnect.livedev", _onDisconnect); _waitForIn...
javascript
function _onConnect(event) { // When the browser navigates away from the primary live document Inspector.Page.on("frameNavigated.livedev", _onFrameNavigated); // When the Inspector WebSocket disconnects unexpectedely Inspector.on("disconnect.livedev", _onDisconnect); _waitForIn...
[ "function", "_onConnect", "(", "event", ")", "{", "// When the browser navigates away from the primary live document", "Inspector", ".", "Page", ".", "on", "(", "\"frameNavigated.livedev\"", ",", "_onFrameNavigated", ")", ";", "// When the Inspector WebSocket disconnects unexpect...
Triggered by Inspector.connect
[ "Triggered", "by", "Inspector", ".", "connect" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/LiveDevelopment/LiveDevelopment.js#L1101-L1119
train
Called when the Inspector WebSocket connection is made
[ 30522, 3853, 1035, 2006, 8663, 2638, 6593, 1006, 2724, 1007, 1063, 1013, 1013, 2043, 1996, 16602, 22149, 2015, 2185, 2013, 1996, 3078, 2444, 6254, 7742, 1012, 3931, 1012, 2006, 1006, 1000, 4853, 2532, 5737, 11644, 1012, 2973, 6777, 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...
Dogfalo/materialize
extras/noUiSlider/nouislider.js
checkHandlePosition
function checkHandlePosition ( reference, handleNumber, to, lookBackward, lookForward ) { // For sliders with multiple handles, limit movement to the other handle. // Apply the margin option by adding it to the handle positions. if ( scope_Handles.length > 1 ) { if ...
javascript
function checkHandlePosition ( reference, handleNumber, to, lookBackward, lookForward ) { // For sliders with multiple handles, limit movement to the other handle. // Apply the margin option by adding it to the handle positions. if ( scope_Handles.length > 1 ) { if ...
[ "function", "checkHandlePosition", "(", "reference", ",", "handleNumber", ",", "to", ",", "lookBackward", ",", "lookForward", ")", "{", "// For sliders with multiple handles, limit movement to the other handle.", "// Apply the margin option by adding it to the handle positions.", "if...
Split out the handle positioning logic so the Move event can use it, too
[ "Split", "out", "the", "handle", "positioning", "logic", "so", "the", "Move", "event", "can", "use", "it", "too" ]
1122efadad8f1433d404696f7613e3cc13fb83a4
https://github.com/Dogfalo/materialize/blob/1122efadad8f1433d404696f7613e3cc13fb83a4/extras/noUiSlider/nouislider.js#L1719-L1772
train
Check handle position
[ 30522, 3853, 4638, 11774, 2571, 26994, 1006, 4431, 1010, 5047, 19172, 5677, 1010, 2000, 1010, 2298, 5963, 7652, 1010, 2298, 29278, 7652, 1007, 1063, 1013, 1013, 2005, 7358, 2869, 2007, 3674, 16024, 1010, 5787, 2929, 2000, 1996, 2060, 5047, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-useless-constructor.js
isValidRestSpreadPair
function isValidRestSpreadPair(ctorParam, superArg) { return ( ctorParam.type === "RestElement" && superArg.type === "SpreadElement" && isValidIdentifierPair(ctorParam.argument, superArg.argument) ); }
javascript
function isValidRestSpreadPair(ctorParam, superArg) { return ( ctorParam.type === "RestElement" && superArg.type === "SpreadElement" && isValidIdentifierPair(ctorParam.argument, superArg.argument) ); }
[ "function", "isValidRestSpreadPair", "(", "ctorParam", ",", "superArg", ")", "{", "return", "(", "ctorParam", ".", "type", "===", "\"RestElement\"", "&&", "superArg", ".", "type", "===", "\"SpreadElement\"", "&&", "isValidIdentifierPair", "(", "ctorParam", ".", "a...
Checks whether given 2 nodes are a rest/spread pair which has the same values. @param {ASTNode} ctorParam - A node to check. @param {ASTNode} superArg - A node to check. @returns {boolean} `true` if the nodes are a rest/spread pair which has the same values.
[ "Checks", "whether", "given", "2", "nodes", "are", "a", "rest", "/", "spread", "pair", "which", "has", "the", "same", "values", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-useless-constructor.js#L77-L83
train
Checks if the two parameters are valid
[ 30522, 3853, 2003, 10175, 3593, 28533, 13102, 16416, 18927, 11215, 1006, 14931, 2953, 28689, 2213, 1010, 3565, 2906, 2290, 1007, 1063, 2709, 1006, 14931, 2953, 28689, 2213, 1012, 2828, 1027, 1027, 1027, 1000, 2717, 12260, 3672, 1000, 1004, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/no-extra-semi.js
checkForPartOfClassBody
function checkForPartOfClassBody(firstToken) { for (let token = firstToken; token.type === "Punctuator" && !astUtils.isClosingBraceToken(token); token = sourceCode.getTokenAfter(token) ) { if (astUtils.isSemicolonToken(token)) { ...
javascript
function checkForPartOfClassBody(firstToken) { for (let token = firstToken; token.type === "Punctuator" && !astUtils.isClosingBraceToken(token); token = sourceCode.getTokenAfter(token) ) { if (astUtils.isSemicolonToken(token)) { ...
[ "function", "checkForPartOfClassBody", "(", "firstToken", ")", "{", "for", "(", "let", "token", "=", "firstToken", ";", "token", ".", "type", "===", "\"Punctuator\"", "&&", "!", "astUtils", ".", "isClosingBraceToken", "(", "token", ")", ";", "token", "=", "s...
Checks for a part of a class body. This checks tokens from a specified token to a next MethodDefinition or the end of class body. @param {Token} firstToken - The first token to check. @returns {void}
[ "Checks", "for", "a", "part", "of", "a", "class", "body", ".", "This", "checks", "tokens", "from", "a", "specified", "token", "to", "a", "next", "MethodDefinition", "or", "the", "end", "of", "class", "body", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-extra-semi.js#L71-L80
train
Check if the first token is part of class body
[ 30522, 3853, 4638, 29278, 19362, 3406, 11329, 27102, 23684, 1006, 2034, 18715, 2368, 1007, 1063, 2005, 1006, 2292, 19204, 1027, 2034, 18715, 2368, 1025, 19204, 1012, 2828, 1027, 1027, 1027, 1000, 26136, 6593, 6692, 4263, 1000, 1004, 1004, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/mergedTableRemoveRow.js
_updateMergeStartIndex
function _updateMergeStartIndex(tableData, startRowIndex, endRowIndex) { tableData.slice(endRowIndex + 1).forEach(row => { row.forEach(cell => { if (util.isExisty(cell.rowMergeWith) && cell.rowMergeWith >= startRowIndex) { cell.rowMergeWith = endRowIndex + 1; } }); }); }
javascript
function _updateMergeStartIndex(tableData, startRowIndex, endRowIndex) { tableData.slice(endRowIndex + 1).forEach(row => { row.forEach(cell => { if (util.isExisty(cell.rowMergeWith) && cell.rowMergeWith >= startRowIndex) { cell.rowMergeWith = endRowIndex + 1; } }); }); }
[ "function", "_updateMergeStartIndex", "(", "tableData", ",", "startRowIndex", ",", "endRowIndex", ")", "{", "tableData", ".", "slice", "(", "endRowIndex", "+", "1", ")", ".", "forEach", "(", "row", "=>", "{", "row", ".", "forEach", "(", "cell", "=>", "{", ...
Update row merge start index to merged cell. @param {Array.<Array.<object>>} tableData - table data @param {number} startRowIndex - start row index @param {number} endRowIndex - end row index @private
[ "Update", "row", "merge", "start", "index", "to", "merged", "cell", "." ]
e75ab08c2a7ab07d1143e318f7cde135c5e3002e
https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/extensions/table/mergedTableRemoveRow.js#L93-L101
train
Update merge start index
[ 30522, 3853, 1035, 10651, 5017, 8449, 7559, 7629, 3207, 2595, 1006, 2795, 2850, 2696, 1010, 2707, 10524, 22254, 10288, 1010, 2203, 10524, 22254, 10288, 1007, 1063, 2795, 2850, 2696, 1012, 14704, 1006, 2203, 10524, 22254, 10288, 1009, 1015, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/gridList/grid-list.js
getTileStyle
function getTileStyle(position, spans, colCount, rowCount, gutter, rowMode, rowHeight) { // TODO(shyndman): There are style caching opportunities here. // Percent of the available horizontal space that one column takes up. var hShare = (1 / colCount) * 100; // Fraction of the gutter size that ...
javascript
function getTileStyle(position, spans, colCount, rowCount, gutter, rowMode, rowHeight) { // TODO(shyndman): There are style caching opportunities here. // Percent of the available horizontal space that one column takes up. var hShare = (1 / colCount) * 100; // Fraction of the gutter size that ...
[ "function", "getTileStyle", "(", "position", ",", "spans", ",", "colCount", ",", "rowCount", ",", "gutter", ",", "rowMode", ",", "rowHeight", ")", "{", "// TODO(shyndman): There are style caching opportunities here.", "// Percent of the available horizontal space that one colum...
Gets the styles applied to a tile element described by the given parameters. @param {{row: number, col: number}} position The row and column indices of the tile. @param {{row: number, col: number}} spans The rowSpan and colSpan of the tile. @param {number} colCount The number of columns. @param {number} rowCount The nu...
[ "Gets", "the", "styles", "applied", "to", "a", "tile", "element", "described", "by", "the", "given", "parameters", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/gridList/grid-list.js#L259-L330
train
Returns the tile style for a given position and spans.
[ 30522, 3853, 2131, 15286, 21756, 2571, 1006, 2597, 1010, 14798, 1010, 8902, 3597, 16671, 1010, 5216, 3597, 16671, 1010, 9535, 3334, 1010, 5216, 5302, 3207, 1010, 5216, 26036, 13900, 1007, 1063, 1013, 1013, 28681, 2080, 1006, 11004, 4859, 23...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/angular
aio/tools/examples/run-example-e2e.js
reportStatus
function reportStatus(status, outputFile) { let log = ['']; log.push('Suites ignored due to legacy guides:'); IGNORED_EXAMPLES.filter(example => !fixmeIvyExamples.find(ex => ex.startsWith(example))) .forEach(function(val) { log.push(' ' + val); }); if (argv.ivy) { log.push(''); log.push('Suites...
javascript
function reportStatus(status, outputFile) { let log = ['']; log.push('Suites ignored due to legacy guides:'); IGNORED_EXAMPLES.filter(example => !fixmeIvyExamples.find(ex => ex.startsWith(example))) .forEach(function(val) { log.push(' ' + val); }); if (argv.ivy) { log.push(''); log.push('Suites...
[ "function", "reportStatus", "(", "status", ",", "outputFile", ")", "{", "let", "log", "=", "[", "''", "]", ";", "log", ".", "push", "(", "'Suites ignored due to legacy guides:'", ")", ";", "IGNORED_EXAMPLES", ".", "filter", "(", "example", "=>", "!", "fixmeI...
Report final status.
[ "Report", "final", "status", "." ]
c016e2c4ecf7529f08fae4ca0f5c8b0170c6b51c
https://github.com/angular/angular/blob/c016e2c4ecf7529f08fae4ca0f5c8b0170c6b51c/aio/tools/examples/run-example-e2e.js#L283-L310
train
Reports the status of a suite
[ 30522, 3853, 4311, 29336, 2271, 1006, 3570, 1010, 6434, 8873, 2571, 1007, 1063, 2292, 8833, 1027, 1031, 1005, 1005, 1033, 1025, 8833, 1012, 5245, 1006, 1005, 19796, 6439, 2349, 2000, 8027, 12468, 1024, 1005, 1007, 1025, 6439, 1035, 4973, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/func-name-matching.js
report
function report(node, name, funcName, isProp) { let messageId; if (nameMatches === "always" && isProp) { messageId = "matchProperty"; } else if (nameMatches === "always") { messageId = "matchVariable"; } else if (isProp) { ...
javascript
function report(node, name, funcName, isProp) { let messageId; if (nameMatches === "always" && isProp) { messageId = "matchProperty"; } else if (nameMatches === "always") { messageId = "matchVariable"; } else if (isProp) { ...
[ "function", "report", "(", "node", ",", "name", ",", "funcName", ",", "isProp", ")", "{", "let", "messageId", ";", "if", "(", "nameMatches", "===", "\"always\"", "&&", "isProp", ")", "{", "messageId", "=", "\"matchProperty\"", ";", "}", "else", "if", "("...
Reports @param {ASTNode} node The node to report @param {string} name The variable or property name @param {string} funcName The function name @param {boolean} isProp True if the reported node is a property assignment @returns {void}
[ "Reports" ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/func-name-matching.js#L143-L163
train
Report a node to the log
[ 30522, 3853, 3189, 1006, 13045, 1010, 2171, 1010, 4569, 2278, 18442, 1010, 2003, 21572, 2361, 1007, 1063, 2292, 4471, 3593, 1025, 2065, 1006, 2171, 18900, 8376, 1027, 1027, 1027, 1000, 2467, 1000, 1004, 1004, 2003, 21572, 2361, 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...
NetEase/pomelo
lib/common/service/channelService.js
function(uid, sid, groups) { if(!sid) { logger.warn('ignore uid %j for sid not specified.', uid); return false; } var group = groups[sid]; if(!group) { group = []; groups[sid] = group; } group.push(uid); return true; }
javascript
function(uid, sid, groups) { if(!sid) { logger.warn('ignore uid %j for sid not specified.', uid); return false; } var group = groups[sid]; if(!group) { group = []; groups[sid] = group; } group.push(uid); return true; }
[ "function", "(", "uid", ",", "sid", ",", "groups", ")", "{", "if", "(", "!", "sid", ")", "{", "logger", ".", "warn", "(", "'ignore uid %j for sid not specified.'", ",", "uid", ")", ";", "return", "false", ";", "}", "var", "group", "=", "groups", "[", ...
add uid and sid into group. ignore any uid that uid not specified. @param uid user id @param sid server id @param groups {Object} grouped uids, , key: sid, value: [uid]
[ "add", "uid", "and", "sid", "into", "group", ".", "ignore", "any", "uid", "that", "uid", "not", "specified", "." ]
defcf019631ed399cc4dad932d3b028a04a039a4
https://github.com/NetEase/pomelo/blob/defcf019631ed399cc4dad932d3b028a04a039a4/lib/common/service/channelService.js#L340-L354
train
add uid to group
[ 30522, 3853, 1006, 21318, 2094, 1010, 15765, 1010, 2967, 1007, 1063, 2065, 1006, 999, 15765, 1007, 1063, 8833, 4590, 1012, 11582, 1006, 1005, 8568, 21318, 2094, 1003, 1046, 2005, 15765, 2025, 9675, 1012, 1005, 1010, 21318, 2094, 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...
googleapis/google-api-nodejs-client
samples/drive/quickstart.js
listFiles
function listFiles(auth) { const service = google.drive('v3'); service.files.list( { auth: auth, pageSize: 10, fields: 'nextPageToken, files(id, name)', }, (err, res) => { if (err) { console.error('The API returned an error.'); throw err; } const files...
javascript
function listFiles(auth) { const service = google.drive('v3'); service.files.list( { auth: auth, pageSize: 10, fields: 'nextPageToken, files(id, name)', }, (err, res) => { if (err) { console.error('The API returned an error.'); throw err; } const files...
[ "function", "listFiles", "(", "auth", ")", "{", "const", "service", "=", "google", ".", "drive", "(", "'v3'", ")", ";", "service", ".", "files", ".", "list", "(", "{", "auth", ":", "auth", ",", "pageSize", ":", "10", ",", "fields", ":", "'nextPageTok...
Lists the names and IDs of up to 10 files. @param {google.auth.OAuth2} auth An authorized OAuth2 client.
[ "Lists", "the", "names", "and", "IDs", "of", "up", "to", "10", "files", "." ]
e6e632a29d0b246d058e3067de3a5c3827e2b54e
https://github.com/googleapis/google-api-nodejs-client/blob/e6e632a29d0b246d058e3067de3a5c3827e2b54e/samples/drive/quickstart.js#L66-L90
train
List all files in the specified drive
[ 30522, 3853, 2862, 8873, 4244, 1006, 8740, 2705, 1007, 1063, 9530, 3367, 2326, 1027, 8224, 1012, 3298, 1006, 1005, 1058, 2509, 1005, 1007, 1025, 2326, 1012, 6764, 1012, 2862, 1006, 1063, 8740, 2705, 1024, 8740, 2705, 1010, 5530, 4697, 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...
lovell/sharp
lib/channel.js
extractChannel
function extractChannel (channel) { if (channel === 'red') { channel = 0; } else if (channel === 'green') { channel = 1; } else if (channel === 'blue') { channel = 2; } if (is.integer(channel) && is.inRange(channel, 0, 4)) { this.options.extractChannel = channel; } else { throw new Error...
javascript
function extractChannel (channel) { if (channel === 'red') { channel = 0; } else if (channel === 'green') { channel = 1; } else if (channel === 'blue') { channel = 2; } if (is.integer(channel) && is.inRange(channel, 0, 4)) { this.options.extractChannel = channel; } else { throw new Error...
[ "function", "extractChannel", "(", "channel", ")", "{", "if", "(", "channel", "===", "'red'", ")", "{", "channel", "=", "0", ";", "}", "else", "if", "(", "channel", "===", "'green'", ")", "{", "channel", "=", "1", ";", "}", "else", "if", "(", "chan...
Extract a single channel from a multi-channel image. @example sharp(input) .extractChannel('green') .toFile('input_green.jpg', function(err, info) { // info.channels === 1 // input_green.jpg contains the green channel of the input image }); @param {Number|String} channel - zero-indexed band number to extract, or `red...
[ "Extract", "a", "single", "channel", "from", "a", "multi", "-", "channel", "image", "." ]
05d76eeadfe54713606a615185b2da047923406b
https://github.com/lovell/sharp/blob/05d76eeadfe54713606a615185b2da047923406b/lib/channel.js#L64-L78
train
Extract a channel from a node
[ 30522, 3853, 14817, 26058, 1006, 3149, 1007, 1063, 2065, 1006, 3149, 1027, 1027, 1027, 1005, 2417, 1005, 1007, 1063, 3149, 1027, 1014, 1025, 1065, 2842, 2065, 1006, 3149, 1027, 1027, 1027, 1005, 2665, 1005, 1007, 1063, 3149, 30524, 1018, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/middlewares/circuit-breaker.js
failure
function failure(item, err, ctx) { item.count++; item.failures++; checkThreshold(item, ctx); }
javascript
function failure(item, err, ctx) { item.count++; item.failures++; checkThreshold(item, ctx); }
[ "function", "failure", "(", "item", ",", "err", ",", "ctx", ")", "{", "item", ".", "count", "++", ";", "item", ".", "failures", "++", ";", "checkThreshold", "(", "item", ",", "ctx", ")", ";", "}" ]
Increment failure counter @param {Object} item @param {Error} err @param {Context} ctx
[ "Increment", "failure", "counter" ]
f95aadc2d61b0d0e3c643a43c3ed28bca6425cde
https://github.com/moleculerjs/moleculer/blob/f95aadc2d61b0d0e3c643a43c3ed28bca6425cde/src/middlewares/circuit-breaker.js#L80-L85
train
Helper function for reporting failure of a query.
[ 30522, 3853, 4945, 1006, 8875, 1010, 9413, 2099, 1010, 14931, 2595, 1007, 1063, 8875, 1012, 4175, 1009, 1009, 1025, 8875, 1012, 15428, 1009, 1009, 1025, 4638, 2705, 21898, 11614, 1006, 8875, 1010, 14931, 2595, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
cytoscape/cytoscape.js
dist/cytoscape.esm.js
checkEnums
function checkEnums() { for (var _i = 0; _i < type.enums.length; _i++) { var en = type.enums[_i]; if (en === value) { return { name: name, value: value, strValue: '' + value, bypass: propIsBypass }; } } return null; }
javascript
function checkEnums() { for (var _i = 0; _i < type.enums.length; _i++) { var en = type.enums[_i]; if (en === value) { return { name: name, value: value, strValue: '' + value, bypass: propIsBypass }; } } return null; }
[ "function", "checkEnums", "(", ")", "{", "for", "(", "var", "_i", "=", "0", ";", "_i", "<", "type", ".", "enums", ".", "length", ";", "_i", "++", ")", "{", "var", "en", "=", "type", ".", "enums", "[", "_i", "]", ";", "if", "(", "en", "===", ...
several types also allow enums
[ "several", "types", "also", "allow", "enums" ]
ad2051b65e2243cfd953d8b24a8bf95bfa8559e5
https://github.com/cytoscape/cytoscape.js/blob/ad2051b65e2243cfd953d8b24a8bf95bfa8559e5/dist/cytoscape.esm.js#L16587-L16602
train
Check if the value is in the enumeration list
[ 30522, 3853, 4638, 2368, 18163, 1006, 1007, 1063, 2005, 1006, 13075, 1035, 1045, 1027, 1014, 1025, 1035, 1045, 1026, 2828, 1012, 4372, 18163, 1012, 3091, 1025, 1035, 1045, 1009, 1009, 1007, 1063, 13075, 4372, 1027, 2828, 1012, 4372, 18163, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/main.js
_loadStyles
function _loadStyles() { var lessText = require("text!LiveDevelopment/main.less"); less.render(lessText, function onParse(err, tree) { console.assert(!err, err); ExtensionUtils.addEmbeddedStyleSheet(tree.css); }); }
javascript
function _loadStyles() { var lessText = require("text!LiveDevelopment/main.less"); less.render(lessText, function onParse(err, tree) { console.assert(!err, err); ExtensionUtils.addEmbeddedStyleSheet(tree.css); }); }
[ "function", "_loadStyles", "(", ")", "{", "var", "lessText", "=", "require", "(", "\"text!LiveDevelopment/main.less\"", ")", ";", "less", ".", "render", "(", "lessText", ",", "function", "onParse", "(", "err", ",", "tree", ")", "{", "console", ".", "assert",...
Load Live Development LESS Style
[ "Load", "Live", "Development", "LESS", "Style" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/LiveDevelopment/main.js#L137-L144
train
Load the styles from the main. less file
[ 30522, 3853, 1035, 15665, 27983, 2015, 1006, 1007, 1063, 13075, 2625, 18209, 1027, 5478, 1006, 1000, 3793, 999, 2973, 18697, 4135, 24073, 1013, 2364, 1012, 2625, 1000, 1007, 1025, 2625, 1012, 17552, 1006, 2625, 18209, 1010, 3853, 2006, 1936...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
createDisableDirectives
function createDisableDirectives(type, loc, value) { const ruleIds = Object.keys(commentParser.parseListConfig(value)); const directiveRules = ruleIds.length ? ruleIds : [null]; return directiveRules.map(ruleId => ({ type, line: loc.line, column: loc.column + 1, ruleId })); }
javascript
function createDisableDirectives(type, loc, value) { const ruleIds = Object.keys(commentParser.parseListConfig(value)); const directiveRules = ruleIds.length ? ruleIds : [null]; return directiveRules.map(ruleId => ({ type, line: loc.line, column: loc.column + 1, ruleId })); }
[ "function", "createDisableDirectives", "(", "type", ",", "loc", ",", "value", ")", "{", "const", "ruleIds", "=", "Object", ".", "keys", "(", "commentParser", ".", "parseListConfig", "(", "value", ")", ")", ";", "const", "directiveRules", "=", "ruleIds", ".",...
Creates a collection of disable directives from a comment @param {("disable"|"enable"|"disable-line"|"disable-next-line")} type The type of directive comment @param {{line: number, column: number}} loc The 0-based location of the comment token @param {string} value The value after the directive in the comment comment s...
[ "Creates", "a", "collection", "of", "disable", "directives", "from", "a", "comment" ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/linter.js#L148-L153
train
Create disable directives
[ 30522, 3853, 2580, 14268, 23242, 7442, 15277, 2015, 1006, 2828, 1010, 8840, 2278, 1010, 3643, 1007, 1063, 9530, 3367, 3627, 9821, 1027, 4874, 1012, 6309, 1006, 7615, 19362, 8043, 1012, 11968, 11246, 2923, 8663, 8873, 2290, 1006, 3643, 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...
jgraph/mxgraph
javascript/mxClient.js
mxDivResizer
function mxDivResizer(div, container) { if (div.nodeName.toLowerCase() == 'div') { if (container == null) { container = window; } this.div = div; var style = mxUtils.getCurrentStyle(div); if (style != null) { this.resizeWidth = style.width == 'auto'; this.resizeHeight = style.height == 'aut...
javascript
function mxDivResizer(div, container) { if (div.nodeName.toLowerCase() == 'div') { if (container == null) { container = window; } this.div = div; var style = mxUtils.getCurrentStyle(div); if (style != null) { this.resizeWidth = style.width == 'auto'; this.resizeHeight = style.height == 'aut...
[ "function", "mxDivResizer", "(", "div", ",", "container", ")", "{", "if", "(", "div", ".", "nodeName", ".", "toLowerCase", "(", ")", "==", "'div'", ")", "{", "if", "(", "container", "==", "null", ")", "{", "container", "=", "window", ";", "}", "this"...
Copyright (c) 2006-2015, JGraph Ltd Copyright (c) 2006-2015, Gaudenz Alder Class: mxDivResizer Maintains the size of a div element in Internet Explorer. This is a workaround for the right and bottom style being ignored in IE. If you need a div to cover the scrollwidth and -height of a document, then you can use thi...
[ "Copyright", "(", "c", ")", "2006", "-", "2015", "JGraph", "Ltd", "Copyright", "(", "c", ")", "2006", "-", "2015", "Gaudenz", "Alder", "Class", ":", "mxDivResizer" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L12882-L12914
train
Resizes the given div
[ 30522, 3853, 25630, 4305, 24790, 17629, 1006, 4487, 2615, 1010, 11661, 1007, 1063, 2065, 1006, 4487, 2615, 1012, 13045, 18442, 1012, 2000, 27663, 18992, 3366, 1006, 1007, 1027, 1027, 1005, 4487, 2615, 1005, 1007, 1063, 2065, 1006, 11661, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensibility/Package.js
githubURLFilter
function githubURLFilter(urlInfo) { if (urlInfo.parsed.hostname === "github.com" || urlInfo.parsed.hostname === "www.github.com") { // Is it a URL to the root of a repo? (/user/repo) var match = /^\/[^\/?]+\/([^\/?]+)(\/?)$/.exec(urlInfo.parsed.pathname); if (match) { ...
javascript
function githubURLFilter(urlInfo) { if (urlInfo.parsed.hostname === "github.com" || urlInfo.parsed.hostname === "www.github.com") { // Is it a URL to the root of a repo? (/user/repo) var match = /^\/[^\/?]+\/([^\/?]+)(\/?)$/.exec(urlInfo.parsed.pathname); if (match) { ...
[ "function", "githubURLFilter", "(", "urlInfo", ")", "{", "if", "(", "urlInfo", ".", "parsed", ".", "hostname", "===", "\"github.com\"", "||", "urlInfo", ".", "parsed", ".", "hostname", "===", "\"www.github.com\"", ")", "{", "// Is it a URL to the root of a repo? (/u...
Special case handling to make the common case of downloading from GitHub easier; modifies 'urlInfo' as needed. Converts a bare GitHub repo URL to the corresponding master ZIP URL; or if given a direct master ZIP URL already, sets a nicer download filename (both cases use the repo name). @param {{url:string, parsed:Arr...
[ "Special", "case", "handling", "to", "make", "the", "common", "case", "of", "downloading", "from", "GitHub", "easier", ";", "modifies", "urlInfo", "as", "needed", ".", "Converts", "a", "bare", "GitHub", "repo", "URL", "to", "the", "corresponding", "master", ...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensibility/Package.js#L209-L228
train
Filter out the github URL
[ 30522, 3853, 21025, 2705, 12083, 3126, 10270, 4014, 3334, 1006, 24471, 4115, 14876, 1007, 1063, 2065, 1006, 24471, 30524, 1012, 4012, 1000, 1007, 1063, 1013, 1013, 2003, 2009, 1037, 24471, 2140, 2000, 1996, 7117, 1997, 1037, 16360, 2080, 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...
nodejs/node-gyp
lib/install.js
cb
function cb (err) { if (cb.done) return cb.done = true if (err) { log.warn('install', 'got an error, rolling back install') // roll-back the install if anything went wrong gyp.commands.remove([ release.versionDir ], function () { callback(err) }) } else { callback(n...
javascript
function cb (err) { if (cb.done) return cb.done = true if (err) { log.warn('install', 'got an error, rolling back install') // roll-back the install if anything went wrong gyp.commands.remove([ release.versionDir ], function () { callback(err) }) } else { callback(n...
[ "function", "cb", "(", "err", ")", "{", "if", "(", "cb", ".", "done", ")", "return", "cb", ".", "done", "=", "true", "if", "(", "err", ")", "{", "log", ".", "warn", "(", "'install'", ",", "'got an error, rolling back install'", ")", "// roll-back the ins...
ensure no double-callbacks happen
[ "ensure", "no", "double", "-", "callbacks", "happen" ]
721eb691cf15556cc2700eda0558d5bad5f84232
https://github.com/nodejs/node-gyp/blob/721eb691cf15556cc2700eda0558d5bad5f84232/lib/install.js#L29-L41
train
check if we have an error
[ 30522, 3853, 17324, 1006, 9413, 2099, 1007, 1063, 2065, 1006, 17324, 1012, 2589, 1007, 2709, 17324, 1012, 2589, 1027, 2995, 2065, 1006, 9413, 2099, 1007, 1063, 8833, 1012, 11582, 1006, 1005, 16500, 1005, 1010, 1005, 2288, 2019, 7561, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ColorlibHQ/AdminLTE
plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js
isHostMethod
function isHostMethod(o, p) { var t = typeof o[p]; return t == FUNCTION || (!!(t == OBJECT && o[p])) || t == "unknown"; }
javascript
function isHostMethod(o, p) { var t = typeof o[p]; return t == FUNCTION || (!!(t == OBJECT && o[p])) || t == "unknown"; }
[ "function", "isHostMethod", "(", "o", ",", "p", ")", "{", "var", "t", "=", "typeof", "o", "[", "p", "]", ";", "return", "t", "==", "FUNCTION", "||", "(", "!", "!", "(", "t", "==", "OBJECT", "&&", "o", "[", "p", "]", ")", ")", "||", "t", "==...
Trio of functions taken from Peter Michaux's article: http://peter.michaux.ca/articles/feature-detection-state-of-the-art-browser-scripting
[ "Trio", "of", "functions", "taken", "from", "Peter", "Michaux", "s", "article", ":", "http", ":", "//", "peter", ".", "michaux", ".", "ca", "/", "articles", "/", "feature", "-", "detection", "-", "state", "-", "of", "-", "the", "-", "art", "-", "brow...
19113c3cbc19a7afe0cfd3158d647064d2d30661
https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js#L112-L115
train
Check if a method is a host method
[ 30522, 3853, 2003, 15006, 21246, 11031, 7716, 1006, 1051, 1010, 1052, 1007, 1063, 13075, 1056, 1027, 2828, 11253, 1051, 1031, 1052, 1033, 1025, 2709, 1056, 1027, 1027, 3853, 1064, 1064, 1006, 999, 999, 1006, 1056, 1027, 1027, 4874, 1004, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Dogfalo/materialize
dist/js/materialize.js
Tabs
function Tabs(el, options) { _classCallCheck(this, Tabs); var _this22 = _possibleConstructorReturn(this, (Tabs.__proto__ || Object.getPrototypeOf(Tabs)).call(this, Tabs, el, options)); _this22.el.M_Tabs = _this22; /** * Options for the Tabs * @member Tabs#options * @prop ...
javascript
function Tabs(el, options) { _classCallCheck(this, Tabs); var _this22 = _possibleConstructorReturn(this, (Tabs.__proto__ || Object.getPrototypeOf(Tabs)).call(this, Tabs, el, options)); _this22.el.M_Tabs = _this22; /** * Options for the Tabs * @member Tabs#options * @prop ...
[ "function", "Tabs", "(", "el", ",", "options", ")", "{", "_classCallCheck", "(", "this", ",", "Tabs", ")", ";", "var", "_this22", "=", "_possibleConstructorReturn", "(", "this", ",", "(", "Tabs", ".", "__proto__", "||", "Object", ".", "getPrototypeOf", "("...
Construct Tabs instance @constructor @param {Element} el @param {Object} options
[ "Construct", "Tabs", "instance" ]
1122efadad8f1433d404696f7613e3cc13fb83a4
https://github.com/Dogfalo/materialize/blob/1122efadad8f1433d404696f7613e3cc13fb83a4/dist/js/materialize.js#L3991-L4026
train
Construct Tabs instance
[ 30522, 3853, 21628, 2015, 1006, 3449, 1010, 7047, 1007, 1063, 1035, 2465, 9289, 29358, 11012, 1006, 2023, 1010, 21628, 2015, 1007, 1025, 13075, 1035, 2023, 19317, 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...
SAP/openui5
src/sap.m/src/sap/m/GrowingEnablement.js
function() { if (!this._oControl || this._bLoading) { return; } // if max item count not reached or if we do not know the count var oBinding = this._oControl.getBinding("items"); if (oBinding && !oBinding.isLengthFinal() || this._iLimit < this._oControl.getMaxItemsCount()) { // The GrowingEnable...
javascript
function() { if (!this._oControl || this._bLoading) { return; } // if max item count not reached or if we do not know the count var oBinding = this._oControl.getBinding("items"); if (oBinding && !oBinding.isLengthFinal() || this._iLimit < this._oControl.getMaxItemsCount()) { // The GrowingEnable...
[ "function", "(", ")", "{", "if", "(", "!", "this", ".", "_oControl", "||", "this", ".", "_bLoading", ")", "{", "return", ";", "}", "// if max item count not reached or if we do not know the count", "var", "oBinding", "=", "this", ".", "_oControl", ".", "getBindi...
call to request new page
[ "call", "to", "request", "new", "page" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/GrowingEnablement.js#L173-L191
train
Updates the count of items in the control
[ 30522, 3853, 1006, 1007, 1063, 2065, 1006, 999, 2023, 1012, 1035, 1051, 8663, 13181, 2140, 1064, 1064, 2023, 1012, 1035, 1038, 18570, 1007, 1063, 2709, 1025, 1065, 1013, 1013, 2065, 4098, 8875, 4175, 2025, 2584, 2030, 2065, 2057, 2079, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
javascript/node/selenium-webdriver/net/portprober.js
execute
function execute(cmd) { return new Promise((resolve, reject) => { exec(cmd, function(err, stdout) { if (err) { reject(err); } else { resolve(stdout); } }); }); }
javascript
function execute(cmd) { return new Promise((resolve, reject) => { exec(cmd, function(err, stdout) { if (err) { reject(err); } else { resolve(stdout); } }); }); }
[ "function", "execute", "(", "cmd", ")", "{", "return", "new", "Promise", "(", "(", "resolve", ",", "reject", ")", "=>", "{", "exec", "(", "cmd", ",", "function", "(", "err", ",", "stdout", ")", "{", "if", "(", "err", ")", "{", "reject", "(", "err...
Executes a command and returns its output if it succeeds. @param {string} cmd The command to execute. @return {!Promise<string>} A promise that will resolve with the command's stdout data.
[ "Executes", "a", "command", "and", "returns", "its", "output", "if", "it", "succeeds", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/net/portprober.js#L65-L75
train
Execute a command
[ 30522, 3853, 15389, 1006, 4642, 2094, 1007, 1063, 2709, 2047, 4872, 1006, 1006, 10663, 1010, 15454, 1007, 1027, 1028, 1063, 4654, 8586, 1006, 4642, 2094, 1010, 3853, 1006, 9413, 2099, 1010, 2358, 26797, 2102, 1007, 1063, 2065, 1006, 9413, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
PrismJS/prism
plugins/previewers/prism-previewers.js
function(prefix, func, values) { if (values[0].indexOf('at') < 0) { // Looks like old syntax // Default values var position = 'center'; var shape = 'ellipse'; var size = 'farthest-corner'; if (/\bcenter|top|right|bottom|left\b|^\d+/.test(values[0])) { // Found a positio...
javascript
function(prefix, func, values) { if (values[0].indexOf('at') < 0) { // Looks like old syntax // Default values var position = 'center'; var shape = 'ellipse'; var size = 'farthest-corner'; if (/\bcenter|top|right|bottom|left\b|^\d+/.test(values[0])) { // Found a positio...
[ "function", "(", "prefix", ",", "func", ",", "values", ")", "{", "if", "(", "values", "[", "0", "]", ".", "indexOf", "(", "'at'", ")", "<", "0", ")", "{", "// Looks like old syntax", "// Default values", "var", "position", "=", "'center'", ";", "var", ...
Returns a W3C-valid radial gradient @param {string} prefix Vendor prefix if any ("-moz-", "-webkit-", etc.) @param {string} func Gradient function name ("linear-gradient") @param {string[]} values Array of the gradient function parameters (["0deg", "red 0%", "blue 100%"])
[ "Returns", "a", "W3C", "-", "valid", "radial", "gradient" ]
acceb3b56f0e8362a7ef274dbd85b17611df2ec4
https://github.com/PrismJS/prism/blob/acceb3b56f0e8362a7ef274dbd85b17611df2ec4/plugins/previewers/prism-previewers.js#L74-L109
train
Returns a function that will be used to generate a new function
[ 30522, 3853, 1006, 17576, 1010, 4569, 2278, 1010, 5300, 1007, 1063, 2065, 1006, 5300, 1031, 1014, 1033, 1012, 5950, 11253, 1006, 1005, 2012, 1005, 1007, 1026, 1014, 1007, 1063, 1013, 1013, 3504, 2066, 2214, 20231, 1013, 1013, 12398, 5300, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
postmanlabs/newman
lib/run/options.js
function (value, options, callback) { if (!value.length) { return callback(); // avoids empty string or array } if (Array.isArray(value) && value.length === 1) { return callback(null, value[0]); // avoids using multipleIdOrName strategy for a single i...
javascript
function (value, options, callback) { if (!value.length) { return callback(); // avoids empty string or array } if (Array.isArray(value) && value.length === 1) { return callback(null, value[0]); // avoids using multipleIdOrName strategy for a single i...
[ "function", "(", "value", ",", "options", ",", "callback", ")", "{", "if", "(", "!", "value", ".", "length", ")", "{", "return", "callback", "(", ")", ";", "// avoids empty string or array", "}", "if", "(", "Array", ".", "isArray", "(", "value", ")", "...
Helper function to sanitize folder option. @param {String[]|String} value - The list of folders to execute @param {Object} options - The set of wrapped options. @param {Function} callback - The callback function invoked to mark the end of the folder load routine. @returns {*}
[ "Helper", "function", "to", "sanitize", "folder", "option", "." ]
c05a5a1e82aa3c2021e94ba09e627ba4718af69e
https://github.com/postmanlabs/newman/blob/c05a5a1e82aa3c2021e94ba09e627ba4718af69e/lib/run/options.js#L240-L250
train
returns the id of the record
[ 30522, 3853, 1006, 3643, 1010, 7047, 1010, 2655, 5963, 1007, 1063, 2065, 1006, 999, 3643, 1012, 3091, 1007, 1063, 2709, 2655, 5963, 1006, 1007, 1025, 1013, 1013, 26777, 4064, 5164, 2030, 9140, 1065, 2065, 1006, 9140, 1012, 18061, 11335, 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...
vuejs/vue-devtools
src/backend/index.js
processInjected
function processInjected (instance) { const injected = instance.$options.inject if (injected) { return Object.keys(injected).map(key => { return { key, type: 'injected', value: instance[key] } }) } else { return [] } }
javascript
function processInjected (instance) { const injected = instance.$options.inject if (injected) { return Object.keys(injected).map(key => { return { key, type: 'injected', value: instance[key] } }) } else { return [] } }
[ "function", "processInjected", "(", "instance", ")", "{", "const", "injected", "=", "instance", ".", "$options", ".", "inject", "if", "(", "injected", ")", "{", "return", "Object", ".", "keys", "(", "injected", ")", ".", "map", "(", "key", "=>", "{", "...
Process Vuex getters. @param {Vue} instance @return {Array}
[ "Process", "Vuex", "getters", "." ]
4de4b86388453cd07f0c1bf967d43a4dd4b011c9
https://github.com/vuejs/vue-devtools/blob/4de4b86388453cd07f0c1bf967d43a4dd4b011c9/src/backend/index.js#L761-L775
train
Process injected terms
[ 30522, 3853, 2832, 2378, 24455, 1006, 6013, 1007, 1063, 9530, 3367, 19737, 1027, 6013, 1012, 1002, 7047, 1012, 1999, 20614, 2065, 1006, 19737, 1007, 1063, 2709, 4874, 1012, 6309, 1006, 19737, 1007, 1012, 4949, 1006, 3145, 1027, 1028, 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...
SheetJS/js-xlsx
xlsx.js
push_defaults_array
function push_defaults_array(target, defaults) { for(var j = 0; j != target.length; ++j) { var w = target[j]; for(var i=0; i != defaults.length; ++i) { var z = defaults[i]; if(w[z[0]] == null) w[z[0]] = z[1]; else switch(z[2]) { case "bool": if(typeof w[z[0]] == "string") w[z[0]] = parsexmlbool(w[z[0]]); br...
javascript
function push_defaults_array(target, defaults) { for(var j = 0; j != target.length; ++j) { var w = target[j]; for(var i=0; i != defaults.length; ++i) { var z = defaults[i]; if(w[z[0]] == null) w[z[0]] = z[1]; else switch(z[2]) { case "bool": if(typeof w[z[0]] == "string") w[z[0]] = parsexmlbool(w[z[0]]); br...
[ "function", "push_defaults_array", "(", "target", ",", "defaults", ")", "{", "for", "(", "var", "j", "=", "0", ";", "j", "!=", "target", ".", "length", ";", "++", "j", ")", "{", "var", "w", "=", "target", "[", "j", "]", ";", "for", "(", "var", ...
/* 18.2.3 (CT_CustomWorkbookView) Defaults /*var CustomWBViewDef = [ ['autoUpdate', 'false'], ['changesSavedWin', 'false'], ['includeHiddenRowCol', 'true'], ['includePrintSettings', 'true'], ['maximized', 'false'], ['minimized', 'false'], ['onlySync', 'false'], ['personalView', 'false'], ['showComments', 'commIndicator...
[ "/", "*", "18", ".", "2", ".", "3", "(", "CT_CustomWorkbookView", ")", "Defaults", "/", "*", "var", "CustomWBViewDef", "=", "[", "[", "autoUpdate", "false", "]", "[", "changesSavedWin", "false", "]", "[", "includeHiddenRowCol", "true", "]", "[", "includePr...
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L14467-L14477
train
push_defaults_array - push defaults to target
[ 30522, 3853, 5245, 1035, 12398, 2015, 1035, 9140, 1006, 4539, 1010, 12398, 2015, 1007, 1063, 2005, 1006, 13075, 1046, 1027, 1014, 1025, 1046, 999, 1027, 4539, 1012, 3091, 1025, 1009, 1009, 1046, 1007, 1063, 13075, 1059, 1027, 4539, 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...
angular/material
src/components/datepicker/js/calendar.spec.js
applyDateChange
function applyDateChange() { $timeout.flush(); $material.flushOutstandingAnimations(); // Internally, the calendar sets scrollTop to scroll to the month for a change. // The handler for that scroll won't be invoked unless we manually trigger it. var activeViewController = calendarMonthController ||...
javascript
function applyDateChange() { $timeout.flush(); $material.flushOutstandingAnimations(); // Internally, the calendar sets scrollTop to scroll to the month for a change. // The handler for that scroll won't be invoked unless we manually trigger it. var activeViewController = calendarMonthController ||...
[ "function", "applyDateChange", "(", ")", "{", "$timeout", ".", "flush", "(", ")", ";", "$material", ".", "flushOutstandingAnimations", "(", ")", ";", "// Internally, the calendar sets scrollTop to scroll to the month for a change.", "// The handler for that scroll won't be invoke...
To apply a change in the date, a scope $apply() AND a manual triggering of animation callbacks is necessary.
[ "To", "apply", "a", "change", "in", "the", "date", "a", "scope", "$apply", "()", "AND", "a", "manual", "triggering", "of", "animation", "callbacks", "is", "necessary", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/datepicker/js/calendar.spec.js#L18-L31
train
This function is called when the calendar changes. It is called when the calendar changes.
[ 30522, 3853, 6611, 13701, 22305, 2063, 1006, 1007, 1063, 1002, 2051, 5833, 1012, 13862, 1006, 1007, 1025, 1002, 3430, 1012, 13862, 12166, 5794, 4667, 7088, 28649, 2015, 1006, 1007, 1025, 1013, 1013, 16058, 1010, 1996, 8094, 4520, 17186, 143...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
zloirock/core-js
packages/core-js/modules/es.string.split.js
function (regexp, limit) { var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit); if (res.done) return res.value; var rx = anObject(regexp); var S = String(this); var C = speciesConstructor(rx, RegExp); var unicodeMatching = rx.uni...
javascript
function (regexp, limit) { var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit); if (res.done) return res.value; var rx = anObject(regexp); var S = String(this); var C = speciesConstructor(rx, RegExp); var unicodeMatching = rx.uni...
[ "function", "(", "regexp", ",", "limit", ")", "{", "var", "res", "=", "maybeCallNative", "(", "internalSplit", ",", "regexp", ",", "this", ",", "limit", ",", "internalSplit", "!==", "nativeSplit", ")", ";", "if", "(", "res", ".", "done", ")", "return", ...
`RegExp.prototype[@@split]` method https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split NOTE: This cannot be properly polyfilled in engines that don't support the 'y' flag.
[ "RegExp", ".", "prototype", "[" ]
fe7c8511a6d27d03a9b8e075b3351416aae95c58
https://github.com/zloirock/core-js/blob/fe7c8511a6d27d03a9b8e075b3351416aae95c58/packages/core-js/modules/es.string.split.js#L90-L134
train
Split a string into a list of matches
[ 30522, 3853, 1006, 19723, 10288, 2361, 1010, 5787, 1007, 1063, 13075, 24501, 1027, 2672, 9289, 19666, 8082, 1006, 4722, 13102, 15909, 1010, 19723, 10288, 2361, 1010, 2023, 1010, 5787, 1010, 4722, 13102, 15909, 999, 1027, 1027, 12493, 24759, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mui-org/material-ui
packages/material-ui-codemod/src/v1.0.0/color-imports.js
transformNamespaceImports
function transformNamespaceImports(j, root, importPath, targetPath) { // find namespace imports root.find(j.ImportDeclaration, { source: { value: importPath } }).forEach(importDeclaration => { const namespaceImportSpecifier = importDeclaration.node.specifiers.find( specifier => specifier.type === 'ImportN...
javascript
function transformNamespaceImports(j, root, importPath, targetPath) { // find namespace imports root.find(j.ImportDeclaration, { source: { value: importPath } }).forEach(importDeclaration => { const namespaceImportSpecifier = importDeclaration.node.specifiers.find( specifier => specifier.type === 'ImportN...
[ "function", "transformNamespaceImports", "(", "j", ",", "root", ",", "importPath", ",", "targetPath", ")", "{", "// find namespace imports", "root", ".", "find", "(", "j", ".", "ImportDeclaration", ",", "{", "source", ":", "{", "value", ":", "importPath", "}",...
Replace all namespace imports. e.g. import * as colors from 'material-ui/styles/colors' @param {jscodeshift_api_object} j @param {jscodeshift_ast_object} root @param {string} importPath @param {string} targetPath
[ "Replace", "all", "namespace", "imports", ".", "e", ".", "g", ".", "import", "*", "as", "colors", "from", "material", "-", "ui", "/", "styles", "/", "colors" ]
1555e52367835946382fbf2a8f681de71318915d
https://github.com/mui-org/material-ui/blob/1555e52367835946382fbf2a8f681de71318915d/packages/material-ui-codemod/src/v1.0.0/color-imports.js#L132-L148
train
transform the import path to the target path
[ 30522, 3853, 10938, 18442, 23058, 5714, 25378, 1006, 1046, 1010, 7117, 1010, 12324, 15069, 1010, 4539, 15069, 1007, 1063, 1013, 1013, 2424, 3415, 15327, 17589, 7117, 1012, 2424, 1006, 1046, 1012, 12324, 3207, 20464, 25879, 3258, 1010, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.f/src/sap/f/GridContainerSettings.js
cssSizeToPx
function cssSizeToPx(sCssSize) { if (sCssSize === 0 || sCssSize === "0") { return 0; } var aMatch = sCssSize.match(/^(\d+(\.\d+)?)(px|rem)$/), iValue; if (aMatch) { if (aMatch[3] === "px") { iValue = parseFloat(aMatch[1]); } else { iValue = Rem.toPx(parseFloat(aMatch[1])); } } else { ...
javascript
function cssSizeToPx(sCssSize) { if (sCssSize === 0 || sCssSize === "0") { return 0; } var aMatch = sCssSize.match(/^(\d+(\.\d+)?)(px|rem)$/), iValue; if (aMatch) { if (aMatch[3] === "px") { iValue = parseFloat(aMatch[1]); } else { iValue = Rem.toPx(parseFloat(aMatch[1])); } } else { ...
[ "function", "cssSizeToPx", "(", "sCssSize", ")", "{", "if", "(", "sCssSize", "===", "0", "||", "sCssSize", "===", "\"0\"", ")", "{", "return", "0", ";", "}", "var", "aMatch", "=", "sCssSize", ".", "match", "(", "/", "^(\\d+(\\.\\d+)?)(px|rem)$", "/", ")"...
Converts the given css size to its corresponding 'px' value. @private @param {string} sCssSize The css size to parse. For example '5rem'. @returns {int} The size in 'px'. The result is rounded up with Math.ceil(). Returns NaN if the size can not be parsed.
[ "Converts", "the", "given", "css", "size", "to", "its", "corresponding", "px", "value", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.f/src/sap/f/GridContainerSettings.js#L22-L41
train
Converts a CSS size to px
[ 30522, 3853, 20116, 18719, 4371, 14399, 2595, 1006, 8040, 4757, 5332, 4371, 1007, 1063, 2065, 1006, 8040, 4757, 5332, 4371, 1027, 1027, 1027, 1014, 1064, 1064, 8040, 4757, 5332, 4371, 1027, 1027, 1027, 1000, 1014, 1000, 1007, 1063, 2709, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
testing-library/dom-testing-library
src/events.js
setNativeValue
function setNativeValue(element, value) { const {set: valueSetter} = Object.getOwnPropertyDescriptor(element, 'value') || {} const prototype = Object.getPrototypeOf(element) const {set: prototypeValueSetter} = Object.getOwnPropertyDescriptor(prototype, 'value') || {} if (prototypeValueSetter && valueSet...
javascript
function setNativeValue(element, value) { const {set: valueSetter} = Object.getOwnPropertyDescriptor(element, 'value') || {} const prototype = Object.getPrototypeOf(element) const {set: prototypeValueSetter} = Object.getOwnPropertyDescriptor(prototype, 'value') || {} if (prototypeValueSetter && valueSet...
[ "function", "setNativeValue", "(", "element", ",", "value", ")", "{", "const", "{", "set", ":", "valueSetter", "}", "=", "Object", ".", "getOwnPropertyDescriptor", "(", "element", ",", "'value'", ")", "||", "{", "}", "const", "prototype", "=", "Object", "....
function written after some investigation here: https://github.com/facebook/react/issues/10135#issuecomment-401496776
[ "function", "written", "after", "some", "investigation", "here", ":", "https", ":", "//", "github", ".", "com", "/", "facebook", "/", "react", "/", "issues", "/", "10135#issuecomment", "-", "401496776" ]
fcb2cbcffb7aff6ecff3be8731168c86eee82ce1
https://github.com/testing-library/dom-testing-library/blob/fcb2cbcffb7aff6ecff3be8731168c86eee82ce1/src/events.js#L360-L373
train
Set the native value of an element
[ 30522, 3853, 2275, 19833, 3512, 10175, 5657, 1006, 5783, 1010, 3643, 1007, 1063, 9530, 3367, 1063, 2275, 1024, 5300, 7585, 2099, 1065, 1027, 4874, 1012, 2131, 12384, 21572, 4842, 3723, 6155, 23235, 2953, 1006, 5783, 1010, 1005, 3643, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
semantic-release/semantic-release
lib/git.js
isRefInHistory
async function isRefInHistory(ref, execaOpts) { try { await execa('git', ['merge-base', '--is-ancestor', ref, 'HEAD'], execaOpts); return true; } catch (error) { if (error.code === 1) { return false; } debug(error); throw error; } }
javascript
async function isRefInHistory(ref, execaOpts) { try { await execa('git', ['merge-base', '--is-ancestor', ref, 'HEAD'], execaOpts); return true; } catch (error) { if (error.code === 1) { return false; } debug(error); throw error; } }
[ "async", "function", "isRefInHistory", "(", "ref", ",", "execaOpts", ")", "{", "try", "{", "await", "execa", "(", "'git'", ",", "[", "'merge-base'", ",", "'--is-ancestor'", ",", "ref", ",", "'HEAD'", "]", ",", "execaOpts", ")", ";", "return", "true", ";"...
Verify if the `ref` is in the direct history of the current branch. @param {String} ref The reference to look for. @param {Object} [execaOpts] Options to pass to `execa`. @return {Boolean} `true` if the reference is in the history of the current branch, falsy otherwise.
[ "Verify", "if", "the", "ref", "is", "in", "the", "direct", "history", "of", "the", "current", "branch", "." ]
edf382f88838ed543c0b76cb6c914cca1fc1ddd1
https://github.com/semantic-release/semantic-release/blob/edf382f88838ed543c0b76cb6c914cca1fc1ddd1/lib/git.js#L43-L55
train
Check if a reference is in the history of the branch
[ 30522, 2004, 6038, 2278, 3853, 2003, 2890, 16294, 24158, 7062, 1006, 25416, 1010, 4654, 19281, 7361, 3215, 1007, 1063, 3046, 1063, 26751, 4654, 19281, 1006, 1005, 21025, 2102, 1005, 1010, 1031, 1005, 13590, 1011, 2918, 1005, 1010, 1005, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
openlayers/openlayers
src/ol/format/GPX.js
applyLayoutOptions
function applyLayoutOptions(layoutOptions, flatCoordinates, ends) { let layout = GeometryLayout.XY; let stride = 2; if (layoutOptions.hasZ && layoutOptions.hasM) { layout = GeometryLayout.XYZM; stride = 4; } else if (layoutOptions.hasZ) { layout = GeometryLayout.XYZ; stride = 3; } else if (lay...
javascript
function applyLayoutOptions(layoutOptions, flatCoordinates, ends) { let layout = GeometryLayout.XY; let stride = 2; if (layoutOptions.hasZ && layoutOptions.hasM) { layout = GeometryLayout.XYZM; stride = 4; } else if (layoutOptions.hasZ) { layout = GeometryLayout.XYZ; stride = 3; } else if (lay...
[ "function", "applyLayoutOptions", "(", "layoutOptions", ",", "flatCoordinates", ",", "ends", ")", "{", "let", "layout", "=", "GeometryLayout", ".", "XY", ";", "let", "stride", "=", "2", ";", "if", "(", "layoutOptions", ".", "hasZ", "&&", "layoutOptions", "."...
Choose GeometryLayout based on flags in layoutOptions and adjust flatCoordinates and ends arrays by shrinking them accordingly (removing unused zero entries). @param {LayoutOptions} layoutOptions Layout options. @param {Array<number>} flatCoordinates Flat coordinates. @param {Array<number>=} ends Ends. @return {Geomet...
[ "Choose", "GeometryLayout", "based", "on", "flags", "in", "layoutOptions", "and", "adjust", "flatCoordinates", "and", "ends", "arrays", "by", "shrinking", "them", "accordingly", "(", "removing", "unused", "zero", "entries", ")", "." ]
f366eaea522388fb575b11010e69d309164baca7
https://github.com/openlayers/openlayers/blob/f366eaea522388fb575b11010e69d309164baca7/src/ol/format/GPX.js#L528-L560
train
Apply layout options to the coordinates
[ 30522, 3853, 6611, 8485, 5833, 7361, 9285, 1006, 9621, 7361, 9285, 1010, 4257, 3597, 8551, 28184, 1010, 4515, 1007, 1063, 2292, 9621, 1027, 10988, 8485, 5833, 1012, 1060, 2100, 1025, 2292, 18045, 1027, 1016, 1025, 2065, 1006, 9621, 7361, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
parseGridData
function parseGridData(data, getPosition, getWeight = null) { const pointCount = count(data); const positions = new Float32Array(pointCount * 2); const positions64xyLow = new Float32Array(pointCount * 2); const weightValues = new Float32Array(pointCount * 3); let yMin = Infinity; let yMax = -Infinity; le...
javascript
function parseGridData(data, getPosition, getWeight = null) { const pointCount = count(data); const positions = new Float32Array(pointCount * 2); const positions64xyLow = new Float32Array(pointCount * 2); const weightValues = new Float32Array(pointCount * 3); let yMin = Infinity; let yMax = -Infinity; le...
[ "function", "parseGridData", "(", "data", ",", "getPosition", ",", "getWeight", "=", "null", ")", "{", "const", "pointCount", "=", "count", "(", "data", ")", ";", "const", "positions", "=", "new", "Float32Array", "(", "pointCount", "*", "2", ")", ";", "c...
Parse input data to build positions, wights and bounding box. /* eslint-disable max-statements
[ "Parse", "input", "data", "to", "build", "positions", "wights", "and", "bounding", "box", ".", "/", "*", "eslint", "-", "disable", "max", "-", "statements" ]
a2010448b7f268bbd03617b812334c68a6b9e5b2
https://github.com/uber/deck.gl/blob/a2010448b7f268bbd03617b812334c68a6b9e5b2/modules/aggregation-layers/src/utils/gpu-grid-aggregation/grid-aggregation-utils.js#L86-L145
train
Parse a grid of data
[ 30522, 3853, 11968, 3366, 16523, 3593, 2850, 2696, 1006, 2951, 1010, 2131, 26994, 1010, 2131, 11179, 1027, 19701, 1007, 1063, 9530, 3367, 2391, 3597, 16671, 1027, 4175, 1006, 2951, 1007, 1025, 9530, 3367, 4460, 1027, 2047, 14257, 16703, 290...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/no-warning-comments.js
checkComment
function checkComment(node) { if (astUtils.isDirectiveComment(node) && selfConfigRegEx.test(node.value)) { return; } const matches = commentContainsWarningTerm(node.value); matches.forEach(matchedTerm => { context.report({ ...
javascript
function checkComment(node) { if (astUtils.isDirectiveComment(node) && selfConfigRegEx.test(node.value)) { return; } const matches = commentContainsWarningTerm(node.value); matches.forEach(matchedTerm => { context.report({ ...
[ "function", "checkComment", "(", "node", ")", "{", "if", "(", "astUtils", ".", "isDirectiveComment", "(", "node", ")", "&&", "selfConfigRegEx", ".", "test", "(", "node", ".", "value", ")", ")", "{", "return", ";", "}", "const", "matches", "=", "commentCo...
Checks the specified node for matching warning comments and reports them. @param {ASTNode} node The AST node being checked. @returns {void} undefined.
[ "Checks", "the", "specified", "node", "for", "matching", "warning", "comments", "and", "reports", "them", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-warning-comments.js#L134-L150
train
Check comment for an invalid comment
[ 30522, 3853, 4638, 9006, 3672, 1006, 13045, 1007, 1063, 2065, 1006, 2004, 8525, 3775, 4877, 1012, 2003, 4305, 2890, 15277, 9006, 3672, 1006, 13045, 1007, 1004, 1004, 2969, 8663, 8873, 17603, 3351, 2595, 1012, 3231, 1006, 13045, 1012, 3643, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/JSUtils/ScopeManager.js
handleTimedOut
function handleTimedOut(response) { var detectedExclusions = PreferencesManager.get("jscodehints.detectedExclusions") || [], filePath = response.file; // Don't exclude the file currently being edited if (isFileBeingEdited(filePath)) { return; } ...
javascript
function handleTimedOut(response) { var detectedExclusions = PreferencesManager.get("jscodehints.detectedExclusions") || [], filePath = response.file; // Don't exclude the file currently being edited if (isFileBeingEdited(filePath)) { return; } ...
[ "function", "handleTimedOut", "(", "response", ")", "{", "var", "detectedExclusions", "=", "PreferencesManager", ".", "get", "(", "\"jscodehints.detectedExclusions\"", ")", "||", "[", "]", ",", "filePath", "=", "response", ".", "file", ";", "// Don't exclude the fil...
Handle timed out inference @param {{path: string, type: string}} response - the response from node domain
[ "Handle", "timed", "out", "inference" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/JSUtils/ScopeManager.js#L756-L792
train
Handle timed out
[ 30522, 3853, 5047, 7292, 26797, 2102, 1006, 3433, 1007, 1063, 13075, 11156, 10288, 20464, 22016, 1027, 18394, 24805, 4590, 1012, 2131, 1006, 1000, 1046, 9363, 25383, 18447, 2015, 1012, 11156, 10288, 20464, 22016, 1000, 1007, 1064, 1064, 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...
eslint/eslint
lib/rules/capitalized-comments.js
createRegExpForIgnorePatterns
function createRegExpForIgnorePatterns(normalizedOptions) { Object.keys(normalizedOptions).forEach(key => { const ignorePatternStr = normalizedOptions[key].ignorePattern; if (ignorePatternStr) { const regExp = RegExp(`^\\s*(?:${ignorePatternStr})`, "u"); normalizedOptions[k...
javascript
function createRegExpForIgnorePatterns(normalizedOptions) { Object.keys(normalizedOptions).forEach(key => { const ignorePatternStr = normalizedOptions[key].ignorePattern; if (ignorePatternStr) { const regExp = RegExp(`^\\s*(?:${ignorePatternStr})`, "u"); normalizedOptions[k...
[ "function", "createRegExpForIgnorePatterns", "(", "normalizedOptions", ")", "{", "Object", ".", "keys", "(", "normalizedOptions", ")", ".", "forEach", "(", "key", "=>", "{", "const", "ignorePatternStr", "=", "normalizedOptions", "[", "key", "]", ".", "ignorePatter...
Creates a regular expression for each ignorePattern defined in the rule options. This is done in order to avoid invoking the RegExp constructor repeatedly. @param {Object} normalizedOptions The normalized rule options. @returns {void}
[ "Creates", "a", "regular", "expression", "for", "each", "ignorePattern", "defined", "in", "the", "rule", "options", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/capitalized-comments.js#L89-L99
train
Create a regular expression for ignore patterns
[ 30522, 3853, 3443, 2890, 30524, 9285, 1007, 1063, 4874, 1012, 6309, 1006, 3671, 3550, 7361, 9285, 1007, 1012, 18921, 6776, 1006, 3145, 1027, 1028, 1063, 9530, 3367, 8568, 4502, 12079, 23808, 2099, 1027, 3671, 3550, 7361, 9285, 1031, 3145, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ColorlibHQ/AdminLTE
bower_components/jquery-sparkline/src/base.js
function (el, x, y) { var currentRegion = this.currentRegion, highlightEnabled = !this.options.get('disableHighlight'), newRegion; if (x > this.canvasWidth || y > this.canvasHeight || x < 0 || y < 0) { return null; } newRegi...
javascript
function (el, x, y) { var currentRegion = this.currentRegion, highlightEnabled = !this.options.get('disableHighlight'), newRegion; if (x > this.canvasWidth || y > this.canvasHeight || x < 0 || y < 0) { return null; } newRegi...
[ "function", "(", "el", ",", "x", ",", "y", ")", "{", "var", "currentRegion", "=", "this", ".", "currentRegion", ",", "highlightEnabled", "=", "!", "this", ".", "options", ".", "get", "(", "'disableHighlight'", ")", ",", "newRegion", ";", "if", "(", "x"...
Highlight an item based on the moused-over x,y co-ordinate
[ "Highlight", "an", "item", "based", "on", "the", "moused", "-", "over", "x", "y", "co", "-", "ordinate" ]
19113c3cbc19a7afe0cfd3158d647064d2d30661
https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/bower_components/jquery-sparkline/src/base.js#L224-L243
train
Returns true if region is different from current region
[ 30522, 3853, 1006, 3449, 1010, 1060, 1010, 1061, 1007, 1063, 13075, 2783, 23784, 1027, 2023, 1012, 2783, 23784, 1010, 12944, 8189, 23242, 1027, 999, 2023, 1012, 7047, 1012, 2131, 1006, 1005, 4487, 19150, 4048, 5603, 7138, 1005, 1007, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Dogfalo/materialize
extras/noUiSlider/nouislider.js
addClass
function addClass ( el, className ) { if ( el.classList ) { el.classList.add(className); } else { el.className += ' ' + className; } }
javascript
function addClass ( el, className ) { if ( el.classList ) { el.classList.add(className); } else { el.className += ' ' + className; } }
[ "function", "addClass", "(", "el", ",", "className", ")", "{", "if", "(", "el", ".", "classList", ")", "{", "el", ".", "classList", ".", "add", "(", "className", ")", ";", "}", "else", "{", "el", ".", "className", "+=", "' '", "+", "className", ";"...
http://youmightnotneedjquery.com/#add_class
[ "http", ":", "//", "youmightnotneedjquery", ".", "com", "/", "#add_class" ]
1122efadad8f1433d404696f7613e3cc13fb83a4
https://github.com/Dogfalo/materialize/blob/1122efadad8f1433d404696f7613e3cc13fb83a4/extras/noUiSlider/nouislider.js#L110-L116
train
Add class to element
[ 30522, 3853, 5587, 26266, 1006, 3449, 1010, 2465, 18442, 1007, 1063, 2065, 1006, 3449, 1012, 2465, 9863, 1007, 1063, 3449, 1012, 2465, 9863, 1012, 5587, 1006, 2465, 18442, 1007, 1025, 1065, 2842, 1063, 3449, 1012, 2465, 18442, 1009, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
javascript/node/selenium-webdriver/net/portprober.js
findWindowsPortRange
async function findWindowsPortRange() { // First, check if we're running on XP. If this initial command fails, // we just fallback on the default IANA range. let stdout = await execute('cmd.exe /c ver'); if (/Windows XP/.test(stdout)) { // TODO: Try to read these values from the registry. return {min: ...
javascript
async function findWindowsPortRange() { // First, check if we're running on XP. If this initial command fails, // we just fallback on the default IANA range. let stdout = await execute('cmd.exe /c ver'); if (/Windows XP/.test(stdout)) { // TODO: Try to read these values from the registry. return {min: ...
[ "async", "function", "findWindowsPortRange", "(", ")", "{", "// First, check if we're running on XP. If this initial command fails,", "// we just fallback on the default IANA range.", "let", "stdout", "=", "await", "execute", "(", "'cmd.exe /c ver'", ")", ";", "if", "(", "/", ...
Computes the ephemeral port range for a Windows system. @return {!Promise<{min: number, max: number}>} A promise that will resolve with the ephemeral port range on the current system.
[ "Computes", "the", "ephemeral", "port", "range", "for", "a", "Windows", "system", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/net/portprober.js#L115-L138
train
Find the range of the Windows ports.
[ 30522, 2004, 6038, 2278, 3853, 2424, 11101, 15568, 6442, 24388, 2063, 30524, 1013, 2034, 1010, 4638, 2065, 2057, 1005, 2128, 2770, 2006, 26726, 1012, 2065, 2023, 3988, 3094, 11896, 1010, 1013, 1013, 2057, 2074, 2991, 5963, 2006, 1996, 12398...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
i18n/js_to_json.js
function (str) { str = str.split('Blockly.Msg.')[1].split(' '); return { key: str[0], value: str .splice(2, str.length) .join(' ') .slice(1, -2) // strip off initial ', and ending '; .replace(/\\'/g, "'") }; }
javascript
function (str) { str = str.split('Blockly.Msg.')[1].split(' '); return { key: str[0], value: str .splice(2, str.length) .join(' ') .slice(1, -2) // strip off initial ', and ending '; .replace(/\\'/g, "'") }; }
[ "function", "(", "str", ")", "{", "str", "=", "str", ".", "split", "(", "'Blockly.Msg.'", ")", "[", "1", "]", ".", "split", "(", "' '", ")", ";", "return", "{", "key", ":", "str", "[", "0", "]", ",", "value", ":", "str", ".", "splice", "(", "...
Extract key and value from message definition
[ "Extract", "key", "and", "value", "from", "message", "definition" ]
455b2a854435c0a67da1da92320ddc3ec3e2b799
https://github.com/LLK/scratch-blocks/blob/455b2a854435c0a67da1da92320ddc3ec3e2b799/i18n/js_to_json.js#L22-L32
train
parse the key value pair
[ 30522, 3853, 1006, 2358, 2099, 1007, 1063, 2358, 2099, 1027, 2358, 2099, 1012, 3975, 1006, 1005, 3796, 2135, 1012, 5796, 2290, 1012, 1005, 1007, 1031, 1015, 1033, 1012, 3975, 1006, 1005, 1005, 1007, 1025, 2709, 1063, 3145, 1024, 2358, 209...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
openlayers/openlayers
src/ol/format/WKT.js
encode
function encode(geom) { let type = geom.getType(); const geometryEncoder = GeometryEncoder[type]; const enc = geometryEncoder(geom); type = type.toUpperCase(); if (typeof /** @type {?} */ (geom).getFlatCoordinates === 'function') { const dimInfo = encodeGeometryLayout(/** @type {import("../geom/SimpleGeom...
javascript
function encode(geom) { let type = geom.getType(); const geometryEncoder = GeometryEncoder[type]; const enc = geometryEncoder(geom); type = type.toUpperCase(); if (typeof /** @type {?} */ (geom).getFlatCoordinates === 'function') { const dimInfo = encodeGeometryLayout(/** @type {import("../geom/SimpleGeom...
[ "function", "encode", "(", "geom", ")", "{", "let", "type", "=", "geom", ".", "getType", "(", ")", ";", "const", "geometryEncoder", "=", "GeometryEncoder", "[", "type", "]", ";", "const", "enc", "=", "geometryEncoder", "(", "geom", ")", ";", "type", "=...
Encode a geometry as WKT. @param {!import("../geom/Geometry.js").default} geom The geometry to encode. @return {string} WKT string for the geometry.
[ "Encode", "a", "geometry", "as", "WKT", "." ]
f366eaea522388fb575b11010e69d309164baca7
https://github.com/openlayers/openlayers/blob/f366eaea522388fb575b11010e69d309164baca7/src/ol/format/WKT.js#L859-L874
train
Encode geometry
[ 30522, 3853, 4372, 16044, 1006, 20248, 2213, 1007, 1063, 2292, 2828, 1027, 20248, 2213, 1012, 2131, 13874, 1006, 1007, 1025, 9530, 3367, 10988, 2368, 16044, 2099, 1027, 10988, 2368, 16044, 2099, 1031, 2828, 1033, 1025, 9530, 3367, 4372, 227...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
vuejs/vuepress
packages/@vuepress/core/lib/node/build/index.js
renderAttrs
function renderAttrs (attrs = {}) { const keys = Object.keys(attrs) if (keys.length) { return ' ' + keys.map(name => `${name}="${escape(attrs[name])}"`).join(' ') } else { return '' } }
javascript
function renderAttrs (attrs = {}) { const keys = Object.keys(attrs) if (keys.length) { return ' ' + keys.map(name => `${name}="${escape(attrs[name])}"`).join(' ') } else { return '' } }
[ "function", "renderAttrs", "(", "attrs", "=", "{", "}", ")", "{", "const", "keys", "=", "Object", ".", "keys", "(", "attrs", ")", "if", "(", "keys", ".", "length", ")", "{", "return", "' '", "+", "keys", ".", "map", "(", "name", "=>", "`", "${", ...
Render html attributes @param {Object} attrs @returns {string}
[ "Render", "html", "attributes" ]
15784acc0cf2e87de3c147895b2c3977b0195d78
https://github.com/vuejs/vuepress/blob/15784acc0cf2e87de3c147895b2c3977b0195d78/packages/@vuepress/core/lib/node/build/index.js#L218-L225
train
Render the attributes of the node
[ 30522, 3853, 17552, 19321, 2869, 1006, 2012, 16344, 2015, 1027, 1063, 1065, 1007, 1063, 9530, 3367, 6309, 1027, 4874, 1012, 6309, 1006, 2012, 16344, 2015, 1007, 2065, 1006, 6309, 1012, 3091, 1007, 1063, 2709, 1005, 1005, 1009, 6309, 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.fl/src/sap/ui/fl/Utils.js
function (sBrowserLanguage) { if (!sBrowserLanguage || typeof sBrowserLanguage !== "string") { return ""; } var nIndex = sBrowserLanguage.indexOf("-"); if ((nIndex < 0) && (sBrowserLanguage.length <= 2)) { return sBrowserLanguage.toUpperCase(); } if (nIndex > 0 && nIndex <= 2) { return sB...
javascript
function (sBrowserLanguage) { if (!sBrowserLanguage || typeof sBrowserLanguage !== "string") { return ""; } var nIndex = sBrowserLanguage.indexOf("-"); if ((nIndex < 0) && (sBrowserLanguage.length <= 2)) { return sBrowserLanguage.toUpperCase(); } if (nIndex > 0 && nIndex <= 2) { return sB...
[ "function", "(", "sBrowserLanguage", ")", "{", "if", "(", "!", "sBrowserLanguage", "||", "typeof", "sBrowserLanguage", "!==", "\"string\"", ")", "{", "return", "\"\"", ";", "}", "var", "nIndex", "=", "sBrowserLanguage", ".", "indexOf", "(", "\"-\"", ")", ";"...
Converts the browser language into a 2-character ISO 639-1 language. If the browser language is in format RFC4646, the first part will be used: For example en-us will be converted to EN. If the browser language already is in ISO 639-1, it will be returned after an upper case conversion: For example de will be converted...
[ "Converts", "the", "browser", "language", "into", "a", "2", "-", "character", "ISO", "639", "-", "1", "language", ".", "If", "the", "browser", "language", "is", "in", "format", "RFC4646", "the", "first", "part", "will", "be", "used", ":", "For", "example...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/Utils.js#L766-L780
train
Converts the browser language to uppercase
[ 30522, 3853, 1006, 24829, 10524, 8043, 25023, 6692, 3351, 1007, 1063, 2065, 1006, 999, 24829, 10524, 8043, 25023, 6692, 3351, 1064, 1064, 2828, 11253, 24829, 10524, 8043, 25023, 6692, 3351, 999, 1027, 1027, 1000, 5164, 1000, 1007, 1063, 270...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/DOMHelpers.js
_findEach
function _findEach(src, match, quotes, comments, callback) { var from = 0; var to; while (from < src.length) { to = _find(src, match, from, quotes, comments); if (to < 0) { to = src.length; } callback(src.substr(from, to - from)); ...
javascript
function _findEach(src, match, quotes, comments, callback) { var from = 0; var to; while (from < src.length) { to = _find(src, match, from, quotes, comments); if (to < 0) { to = src.length; } callback(src.substr(from, to - from)); ...
[ "function", "_findEach", "(", "src", ",", "match", ",", "quotes", ",", "comments", ",", "callback", ")", "{", "var", "from", "=", "0", ";", "var", "to", ";", "while", "(", "from", "<", "src", ".", "length", ")", "{", "to", "=", "_find", "(", "src...
Callback iterator using `_find`
[ "Callback", "iterator", "using", "_find" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/LiveDevelopment/Agents/DOMHelpers.js#L99-L110
train
Find all the alternatives in a source string
[ 30522, 3853, 1035, 2424, 5243, 2818, 1006, 5034, 2278, 1010, 2674, 1010, 16614, 1010, 7928, 1010, 2655, 5963, 1007, 1063, 13075, 2013, 1027, 1014, 1025, 13075, 2000, 1025, 2096, 1006, 2013, 1026, 5034, 2278, 1012, 3091, 1007, 1063, 2000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/LayerContentMaster.controller.js
function (oRouteMatch) { var that = this; var mRouteArguments = oRouteMatch.getParameter("arguments"); this.sLayer = mRouteArguments.layer; this.sNamespace = mRouteArguments.namespace || ""; var oPage = this.getView().getContent()[0]; oPage.setBusy(true); that.sNamespace = decodeURIComponent(that.s...
javascript
function (oRouteMatch) { var that = this; var mRouteArguments = oRouteMatch.getParameter("arguments"); this.sLayer = mRouteArguments.layer; this.sNamespace = mRouteArguments.namespace || ""; var oPage = this.getView().getContent()[0]; oPage.setBusy(true); that.sNamespace = decodeURIComponent(that.s...
[ "function", "(", "oRouteMatch", ")", "{", "var", "that", "=", "this", ";", "var", "mRouteArguments", "=", "oRouteMatch", ".", "getParameter", "(", "\"arguments\"", ")", ";", "this", ".", "sLayer", "=", "mRouteArguments", ".", "layer", ";", "this", ".", "sN...
Handler if a route was matched; Checks if the matched route is current route and then requests content from Layered Repository. @param {Object} oRouteMatch - route object specified in the router which was matched via regexp @private
[ "Handler", "if", "a", "route", "was", "matched", ";", "Checks", "if", "the", "matched", "route", "is", "current", "route", "and", "then", "requests", "content", "from", "Layered", "Repository", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js#L46-L63
train
This method is called when a route matches the content of the route
[ 30522, 3853, 1006, 20298, 10421, 18900, 2818, 1007, 1063, 13075, 2008, 1027, 2023, 1025, 13075, 2720, 5833, 14644, 22850, 11187, 1027, 20298, 10421, 18900, 2818, 1012, 2131, 28689, 22828, 1006, 1000, 9918, 1000, 1007, 1025, 2023, 1012, 20005,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laurent22/joplin
ReactNativeClient/lib/reducer.js
handleItemDelete
function handleItemDelete(state, action) { let newState = Object.assign({}, state); const map = { 'FOLDER_DELETE': ['folders', 'selectedFolderId'], 'NOTE_DELETE': ['notes', 'selectedNoteIds'], 'TAG_DELETE': ['tags', 'selectedTagId'], 'SEARCH_DELETE': ['searches', 'selectedSearchId'], }; const listKey = ma...
javascript
function handleItemDelete(state, action) { let newState = Object.assign({}, state); const map = { 'FOLDER_DELETE': ['folders', 'selectedFolderId'], 'NOTE_DELETE': ['notes', 'selectedNoteIds'], 'TAG_DELETE': ['tags', 'selectedTagId'], 'SEARCH_DELETE': ['searches', 'selectedSearchId'], }; const listKey = ma...
[ "function", "handleItemDelete", "(", "state", ",", "action", ")", "{", "let", "newState", "=", "Object", ".", "assign", "(", "{", "}", ",", "state", ")", ";", "const", "map", "=", "{", "'FOLDER_DELETE'", ":", "[", "'folders'", ",", "'selectedFolderId'", ...
When deleting a note, tag or folder
[ "When", "deleting", "a", "note", "tag", "or", "folder" ]
beb428b246cecba4630a3ca57b472f43c0933a43
https://github.com/laurent22/joplin/blob/beb428b246cecba4630a3ca57b472f43c0933a43/ReactNativeClient/lib/reducer.js#L119-L159
train
Handle item deletion
[ 30522, 3853, 5047, 4221, 26876, 12260, 2618, 1006, 2110, 1010, 2895, 1007, 1063, 2292, 2739, 12259, 1027, 4874, 1012, 23911, 1006, 1063, 1065, 1010, 2110, 1007, 1025, 9530, 3367, 4949, 1027, 1063, 1005, 19622, 1035, 3972, 12870, 1005, 1024,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/core/services/interimElement/interimElement.js
cancel
function cancel(reason, options) { var interim = showingInterims.pop(); if (!interim) { return $q.when(reason); } var cancelAction = interim .remove(reason, true, options || {}) .catch(function(reason) { return reason; }) .finally(function() { ...
javascript
function cancel(reason, options) { var interim = showingInterims.pop(); if (!interim) { return $q.when(reason); } var cancelAction = interim .remove(reason, true, options || {}) .catch(function(reason) { return reason; }) .finally(function() { ...
[ "function", "cancel", "(", "reason", ",", "options", ")", "{", "var", "interim", "=", "showingInterims", ".", "pop", "(", ")", ";", "if", "(", "!", "interim", ")", "{", "return", "$q", ".", "when", "(", "reason", ")", ";", "}", "var", "cancelAction",...
/* @ngdoc method @name $$interimElement.$service#cancel @kind function @description Removes the `$interimElement` from the DOM and rejects the promise returned from `show` @param {*} reason Data to reject the promise with @returns Promise that will be resolved after the element has been removed.
[ "/", "*", "@ngdoc", "method", "@name", "$$interimElement", ".", "$service#cancel", "@kind", "function" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/services/interimElement/interimElement.js#L399-L418
train
Cancels the current interim
[ 30522, 3853, 17542, 1006, 3114, 1010, 7047, 1007, 1063, 13075, 9455, 1027, 4760, 18447, 11124, 5244, 1012, 3769, 1006, 1007, 1025, 2065, 1006, 999, 9455, 1007, 1063, 2709, 1002, 1053, 1012, 2043, 1006, 3114, 1007, 1025, 1065, 13075, 17542, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Inspector/Inspector.js
connect
function connect(socketURL) { disconnect().done(function () { _socket = new WebSocket(socketURL); _socket.onmessage = _onMessage; _socket.onopen = _onConnect; _socket.onclose = _onDisconnect; _socket.onerror = _onError; }); }
javascript
function connect(socketURL) { disconnect().done(function () { _socket = new WebSocket(socketURL); _socket.onmessage = _onMessage; _socket.onopen = _onConnect; _socket.onclose = _onDisconnect; _socket.onerror = _onError; }); }
[ "function", "connect", "(", "socketURL", ")", "{", "disconnect", "(", ")", ".", "done", "(", "function", "(", ")", "{", "_socket", "=", "new", "WebSocket", "(", "socketURL", ")", ";", "_socket", ".", "onmessage", "=", "_onMessage", ";", "_socket", ".", ...
Connect to the remote debugger WebSocket at the given URL. Clients must listen for the `connect` event. @param {string} WebSocket URL
[ "Connect", "to", "the", "remote", "debugger", "WebSocket", "at", "the", "given", "URL", ".", "Clients", "must", "listen", "for", "the", "connect", "event", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/LiveDevelopment/Inspector/Inspector.js#L308-L316
train
connect to the specified socket URL
[ 30522, 3853, 7532, 1006, 22278, 3126, 2140, 1007, 1063, 12532, 10087, 6593, 1006, 1007, 1012, 2589, 1006, 3853, 1006, 1007, 1063, 1035, 22278, 1027, 2047, 4773, 6499, 19869, 2102, 1006, 22278, 3126, 2140, 1007, 1025, 1035, 22278, 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...
aws/aws-sdk-js
doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/doctools.js
function() { if (document.location.hash && $.browser.mozilla) window.setTimeout(function() { document.location.href += ''; }, 10); }
javascript
function() { if (document.location.hash && $.browser.mozilla) window.setTimeout(function() { document.location.href += ''; }, 10); }
[ "function", "(", ")", "{", "if", "(", "document", ".", "location", ".", "hash", "&&", "$", ".", "browser", ".", "mozilla", ")", "window", ".", "setTimeout", "(", "function", "(", ")", "{", "document", ".", "location", ".", "href", "+=", "''", ";", ...
workaround a firefox stupidity
[ "workaround", "a", "firefox", "stupidity" ]
c23e5f0edd150f8885267e5f7c8a564f8e6e8562
https://github.com/aws/aws-sdk-js/blob/c23e5f0edd150f8885267e5f7c8a564f8e6e8562/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/doctools.js#L168-L173
train
This function is called when the page is loaded
[ 30522, 3853, 1006, 1007, 1063, 2065, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
addChild
function addChild(child, node) { var children = node.children; if (child.parentNode === node) { return; } children.push(child); child.parentNode = node; }
javascript
function addChild(child, node) { var children = node.children; if (child.parentNode === node) { return; } children.push(child); child.parentNode = node; }
[ "function", "addChild", "(", "child", ",", "node", ")", "{", "var", "children", "=", "node", ".", "children", ";", "if", "(", "child", ".", "parentNode", "===", "node", ")", "{", "return", ";", "}", "children", ".", "push", "(", "child", ")", ";", ...
It is needed to consider the mess of 'list', 'hostModel' when creating a TreeNote, so this function is not ready and not necessary to be public. @param {(module:echarts/data/Tree~TreeNode|Object)} child
[ "It", "is", "needed", "to", "consider", "the", "mess", "of", "list", "hostModel", "when", "creating", "a", "TreeNote", "so", "this", "function", "is", "not", "ready", "and", "not", "necessary", "to", "be", "public", "." ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/data/Tree.js#L531-L539
train
Add child node to node
[ 30522, 3853, 5587, 19339, 1006, 2775, 1010, 13045, 1007, 1063, 13075, 2336, 1027, 13045, 1012, 2336, 1025, 2065, 1006, 2775, 1012, 6687, 3630, 3207, 1027, 1027, 1027, 13045, 1007, 1063, 2709, 1025, 1065, 2336, 1012, 5245, 1006, 2775, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/curly.js
needsSemicolon
function needsSemicolon(closingBracket) { const tokenBefore = sourceCode.getTokenBefore(closingBracket); const tokenAfter = sourceCode.getTokenAfter(closingBracket); const lastBlockNode = sourceCode.getNodeByRangeIndex(tokenBefore.range[0]); if (astUtils.isSemicolonToken...
javascript
function needsSemicolon(closingBracket) { const tokenBefore = sourceCode.getTokenBefore(closingBracket); const tokenAfter = sourceCode.getTokenAfter(closingBracket); const lastBlockNode = sourceCode.getNodeByRangeIndex(tokenBefore.range[0]); if (astUtils.isSemicolonToken...
[ "function", "needsSemicolon", "(", "closingBracket", ")", "{", "const", "tokenBefore", "=", "sourceCode", ".", "getTokenBefore", "(", "closingBracket", ")", ";", "const", "tokenAfter", "=", "sourceCode", ".", "getTokenAfter", "(", "closingBracket", ")", ";", "cons...
Determines if a semicolon needs to be inserted after removing a set of curly brackets, in order to avoid a SyntaxError. @param {Token} closingBracket The } token @returns {boolean} `true` if a semicolon needs to be inserted after the last statement in the block.
[ "Determines", "if", "a", "semicolon", "needs", "to", "be", "inserted", "after", "removing", "a", "set", "of", "curly", "brackets", "in", "order", "to", "avoid", "a", "SyntaxError", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/curly.js#L161-L208
train
Check if the closing bracket is a semicolon.
[ 30522, 3853, 3791, 3366, 7712, 12898, 2078, 1006, 5494, 10024, 19869, 2102, 1007, 1063, 9530, 3367, 19204, 4783, 29278, 2063, 1027, 3120, 16044, 1012, 2131, 18715, 2368, 30524, 1007, 1025, 9530, 3367, 2197, 23467, 3630, 3207, 1027, 3120, 16...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/protractor
website/docgen/processors/tag-fixer.js
function(doc) { // Skip if the function has a name. if (doc.name) { return doc.name; } try { var node = doc.codeNode; // Is this a simple declaration? "var element = function() {". if (node.declarations && node.declarations.length) { return node.declarations[0].id.name; } // Is ...
javascript
function(doc) { // Skip if the function has a name. if (doc.name) { return doc.name; } try { var node = doc.codeNode; // Is this a simple declaration? "var element = function() {". if (node.declarations && node.declarations.length) { return node.declarations[0].id.name; } // Is ...
[ "function", "(", "doc", ")", "{", "// Skip if the function has a name.", "if", "(", "doc", ".", "name", ")", "{", "return", "doc", ".", "name", ";", "}", "try", "{", "var", "node", "=", "doc", ".", "codeNode", ";", "// Is this a simple declaration? \"var eleme...
Find the name of the function.
[ "Find", "the", "name", "of", "the", "function", "." ]
4f74a4ec753c97adfe955fe468a39286a0a55837
https://github.com/angular/protractor/blob/4f74a4ec753c97adfe955fe468a39286a0a55837/website/docgen/processors/tag-fixer.js#L16-L60
train
Returns the name of the function.
[ 30522, 3853, 1006, 9986, 1007, 1063, 1013, 1013, 13558, 2065, 1996, 3853, 2038, 1037, 2171, 1012, 2065, 1006, 9986, 1012, 2171, 1007, 1063, 2709, 9986, 1012, 2171, 1025, 1065, 3046, 1063, 13075, 13045, 1027, 9986, 1012, 3642, 3630, 3207, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
webdriverio/webdriverio
packages/wdio-sync/src/index.js
function (fn, repeatTest = 0, args = []) { /** * if a new hook gets executed we can assume that all commands should have finised * with exception of timeouts where `commandIsRunning` will never be reset but here */ // commandIsRunning = false return new Promise((resolve, reject) => { ...
javascript
function (fn, repeatTest = 0, args = []) { /** * if a new hook gets executed we can assume that all commands should have finised * with exception of timeouts where `commandIsRunning` will never be reset but here */ // commandIsRunning = false return new Promise((resolve, reject) => { ...
[ "function", "(", "fn", ",", "repeatTest", "=", "0", ",", "args", "=", "[", "]", ")", "{", "/**\n * if a new hook gets executed we can assume that all commands should have finised\n * with exception of timeouts where `commandIsRunning` will never be reset but here\n */", "//...
execute test or hook synchronously @param {Function} fn spec or hook method @param {Number} repeatTest number of retries @return {Promise} that gets resolved once test/hook is done or was retried enough
[ "execute", "test", "or", "hook", "synchronously" ]
8de7f1a3b12d97282ed4ee2e25e4c3c9a8940ac1
https://github.com/webdriverio/webdriverio/blob/8de7f1a3b12d97282ed4ee2e25e4c3c9a8940ac1/packages/wdio-sync/src/index.js#L19-L46
train
Execute a function in the current thread
[ 30522, 3853, 1006, 1042, 2078, 1010, 9377, 22199, 1027, 1014, 1010, 12098, 5620, 1027, 1031, 1033, 1007, 1063, 1013, 1008, 1008, 1008, 2065, 1037, 2047, 8103, 4152, 6472, 2057, 2064, 7868, 2008, 2035, 10954, 2323, 2031, 10346, 5084, 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...
ColorlibHQ/AdminLTE
bower_components/ion.rangeSlider/js/ion.rangeSlider.js
function (percent) { var rounded = Math.round(percent / this.coords.p_step) * this.coords.p_step; if (rounded > 100) { rounded = 100; } if (percent === 100) { rounded = 100; } return this.toFixed(rounded); ...
javascript
function (percent) { var rounded = Math.round(percent / this.coords.p_step) * this.coords.p_step; if (rounded > 100) { rounded = 100; } if (percent === 100) { rounded = 100; } return this.toFixed(rounded); ...
[ "function", "(", "percent", ")", "{", "var", "rounded", "=", "Math", ".", "round", "(", "percent", "/", "this", ".", "coords", ".", "p_step", ")", "*", "this", ".", "coords", ".", "p_step", ";", "if", "(", "rounded", ">", "100", ")", "{", "rounded"...
Round percent value with step @param percent {Number} @returns percent {Number} rounded
[ "Round", "percent", "value", "with", "step" ]
19113c3cbc19a7afe0cfd3158d647064d2d30661
https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/bower_components/ion.rangeSlider/js/ion.rangeSlider.js#L1843-L1854
train
get a page from a percent
[ 30522, 3853, 1006, 3867, 1007, 1063, 13075, 8352, 1027, 8785, 1012, 2461, 1006, 3867, 1013, 2023, 1012, 2522, 8551, 2015, 1012, 1052, 1035, 3357, 1007, 1008, 2023, 1012, 2522, 8551, 2015, 1012, 1052, 1035, 3357, 1025, 2065, 1006, 8352, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
docs/app/js/demoInclude.js
handleDemoIndexFile
function handleDemoIndexFile() { files.index.contentsPromise.then(function(contents) { demoContainer = angular.element( '<div class="demo-content ' + ngModule + '">' ); var isStandalone = !!ngModule; var demoScope; var demoCompileService; if (isStandalone...
javascript
function handleDemoIndexFile() { files.index.contentsPromise.then(function(contents) { demoContainer = angular.element( '<div class="demo-content ' + ngModule + '">' ); var isStandalone = !!ngModule; var demoScope; var demoCompileService; if (isStandalone...
[ "function", "handleDemoIndexFile", "(", ")", "{", "files", ".", "index", ".", "contentsPromise", ".", "then", "(", "function", "(", "contents", ")", "{", "demoContainer", "=", "angular", ".", "element", "(", "'<div class=\"demo-content '", "+", "ngModule", "+", ...
Fetch the index file, and if it contains its own ngModule then bootstrap a new angular app with that ngModule. Otherwise, compile the demo into the current ng-app.
[ "Fetch", "the", "index", "file", "and", "if", "it", "contains", "its", "own", "ngModule", "then", "bootstrap", "a", "new", "angular", "app", "with", "that", "ngModule", ".", "Otherwise", "compile", "the", "demo", "into", "the", "current", "ng", "-", "app",...
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/docs/app/js/demoInclude.js#L25-L60
train
Handle the demo index file
[ 30522, 3853, 8971, 6633, 28765, 3207, 2595, 8873, 2571, 1006, 1007, 1063, 6764, 1012, 5950, 1012, 8417, 21572, 28732, 1012, 2059, 1006, 3853, 1006, 8417, 1007, 1063, 9703, 8663, 18249, 2121, 1027, 16108, 1012, 5783, 1006, 1005, 1026, 4487, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-useless-constructor.js
isRedundantSuperCall
function isRedundantSuperCall(body, ctorParams) { return ( isSingleSuperCall(body) && ctorParams.every(isSimple) && ( isSpreadArguments(body[0].expression.arguments) || isPassingThrough(ctorParams, body[0].expression.arguments) ) ); }
javascript
function isRedundantSuperCall(body, ctorParams) { return ( isSingleSuperCall(body) && ctorParams.every(isSimple) && ( isSpreadArguments(body[0].expression.arguments) || isPassingThrough(ctorParams, body[0].expression.arguments) ) ); }
[ "function", "isRedundantSuperCall", "(", "body", ",", "ctorParams", ")", "{", "return", "(", "isSingleSuperCall", "(", "body", ")", "&&", "ctorParams", ".", "every", "(", "isSimple", ")", "&&", "(", "isSpreadArguments", "(", "body", "[", "0", "]", ".", "ex...
Checks whether the constructor body is a redundant super call. @param {Array} body - constructor body content. @param {Array} ctorParams - The params to check against super call. @returns {boolean} true if the construtor body is redundant
[ "Checks", "whether", "the", "constructor", "body", "is", "a", "redundant", "super", "call", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-useless-constructor.js#L128-L137
train
Check if the body is a redundant super call
[ 30522, 3853, 2003, 5596, 18426, 7666, 6279, 2121, 9289, 2140, 1006, 2303, 1010, 14931, 2953, 28689, 5244, 1007, 1063, 2709, 1006, 26354, 2075, 4244, 6279, 2121, 9289, 2140, 1006, 2303, 1007, 1004, 1004, 14931, 2953, 28689, 5244, 1012, 2296,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/routing/async/Targets.js
function (vTargets, vData, sTitleTarget) { var oSequencePromise = Promise.resolve(); return this._display(vTargets, vData, sTitleTarget, oSequencePromise); }
javascript
function (vTargets, vData, sTitleTarget) { var oSequencePromise = Promise.resolve(); return this._display(vTargets, vData, sTitleTarget, oSequencePromise); }
[ "function", "(", "vTargets", ",", "vData", ",", "sTitleTarget", ")", "{", "var", "oSequencePromise", "=", "Promise", ".", "resolve", "(", ")", ";", "return", "this", ".", "_display", "(", "vTargets", ",", "vData", ",", "sTitleTarget", ",", "oSequencePromise"...
Creates a view and puts it in an aggregation of the specified control. @param {string|string[]} vTargets the key of the target as specified in the {@link #constructor}. To display multiple targets you may also pass an array of keys. @param {object} [vData] an object that will be passed to the display event in the data...
[ "Creates", "a", "view", "and", "puts", "it", "in", "an", "aggregation", "of", "the", "specified", "control", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/routing/async/Targets.js#L23-L26
train
Display the sequence of targets and data.
[ 30522, 3853, 1006, 28879, 2906, 18150, 2015, 1010, 1058, 2850, 2696, 1010, 2358, 4183, 7485, 2906, 18150, 1007, 1063, 13075, 9808, 2063, 4226, 5897, 21572, 28732, 1027, 4872, 1012, 10663, 1006, 1007, 1025, 2709, 2023, 1012, 1035, 4653, 1006...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function() { if (!this._sLabelText) { this._sLabelText = this._oQueryResult.getEntityType().getLabelOfProperty(this.getName()); } if (!this._sLabelText && this._oQueryResult._oModel._oActivatedWorkarounds.CreateLabelsFromTechnicalNames) { this._sLabelText = odata4analytics.helper.tokenizeNametoLabelTex...
javascript
function() { if (!this._sLabelText) { this._sLabelText = this._oQueryResult.getEntityType().getLabelOfProperty(this.getName()); } if (!this._sLabelText && this._oQueryResult._oModel._oActivatedWorkarounds.CreateLabelsFromTechnicalNames) { this._sLabelText = odata4analytics.helper.tokenizeNametoLabelTex...
[ "function", "(", ")", "{", "if", "(", "!", "this", ".", "_sLabelText", ")", "{", "this", ".", "_sLabelText", "=", "this", ".", "_oQueryResult", ".", "getEntityType", "(", ")", ".", "getLabelOfProperty", "(", "this", ".", "getName", "(", ")", ")", ";", ...
Get label @returns {string} The (possibly language-dependent) label text for this dimension @public @function @name sap.ui.model.analytics.odata4analytics.Dimension#getLabelText
[ "Get", "label" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L1786-L1794
train
Returns the label text of the property
[ 30522, 3853, 1006, 1007, 1063, 2065, 1006, 999, 2023, 1012, 1035, 17584, 20042, 10288, 2102, 1007, 1063, 2023, 1012, 1035, 17584, 20042, 10288, 2102, 1027, 2023, 1012, 1035, 1051, 4226, 2854, 6072, 11314, 1012, 2131, 4765, 3012, 13874, 1006...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function() { var sOptionString = this.renderUI5FilterArray(this._aConditionUI5Filter); for (var i = -1, aUI5Filter; (aUI5Filter = this._aUI5FilterArray[++i]) !== undefined; ) { sOptionString += (sOptionString == "" ? "" : " and ") + "(" + this.renderUI5FilterArray(aUI5Filter) + ")"; } return sOptionStri...
javascript
function() { var sOptionString = this.renderUI5FilterArray(this._aConditionUI5Filter); for (var i = -1, aUI5Filter; (aUI5Filter = this._aUI5FilterArray[++i]) !== undefined; ) { sOptionString += (sOptionString == "" ? "" : " and ") + "(" + this.renderUI5FilterArray(aUI5Filter) + ")"; } return sOptionStri...
[ "function", "(", ")", "{", "var", "sOptionString", "=", "this", ".", "renderUI5FilterArray", "(", "this", ".", "_aConditionUI5Filter", ")", ";", "for", "(", "var", "i", "=", "-", "1", ",", "aUI5Filter", ";", "(", "aUI5Filter", "=", "this", ".", "_aUI5Fil...
Get the value for the OData system query option $filter corresponding to this expression. @returns {string} The $filter value for the filter expression @public @function @name sap.ui.model.analytics.odata4analytics.FilterExpression#getURIFilterOptionValue
[ "Get", "the", "value", "for", "the", "OData", "system", "query", "option", "$filter", "corresponding", "to", "this", "expression", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L3484-L3490
train
Render the condition UI5 filter
[ 30522, 3853, 1006, 1007, 1063, 13075, 2061, 16790, 3367, 4892, 1027, 2023, 1012, 17552, 10179, 2629, 8873, 21928, 2906, 9447, 1006, 2023, 1012, 1035, 9353, 15422, 22753, 10179, 2629, 8873, 21928, 1007, 1025, 2005, 1006, 13075, 1045, 1027, 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...
caolan/async
lib/reduce.js
reduce
function reduce(coll, memo, iteratee, callback) { callback = once(callback); var _iteratee = wrapAsync(iteratee); return eachOfSeries(coll, (x, i, iterCb) => { _iteratee(memo, x, (err, v) => { memo = v; iterCb(err); }); }, err => callback(err, memo)); }
javascript
function reduce(coll, memo, iteratee, callback) { callback = once(callback); var _iteratee = wrapAsync(iteratee); return eachOfSeries(coll, (x, i, iterCb) => { _iteratee(memo, x, (err, v) => { memo = v; iterCb(err); }); }, err => callback(err, memo)); }
[ "function", "reduce", "(", "coll", ",", "memo", ",", "iteratee", ",", "callback", ")", "{", "callback", "=", "once", "(", "callback", ")", ";", "var", "_iteratee", "=", "wrapAsync", "(", "iteratee", ")", ";", "return", "eachOfSeries", "(", "coll", ",", ...
Reduces `coll` into a single value using an async `iteratee` to return each successive step. `memo` is the initial state of the reduction. This function only operates in series. For performance reasons, it may make sense to split a call to this function into a parallel map, and then use the normal `Array.prototype.red...
[ "Reduces", "coll", "into", "a", "single", "value", "using", "an", "async", "iteratee", "to", "return", "each", "successive", "step", ".", "memo", "is", "the", "initial", "state", "of", "the", "reduction", ".", "This", "function", "only", "operates", "in", ...
4330d536c106592139fa82062494c9dba0da1fdb
https://github.com/caolan/async/blob/4330d536c106592139fa82062494c9dba0da1fdb/lib/reduce.js#L47-L56
train
Reduce a collection to a single value.
[ 30522, 3853, 5547, 1006, 8902, 2140, 1010, 24443, 1010, 2009, 22139, 2063, 1010, 2655, 5963, 1007, 1063, 2655, 5963, 1027, 2320, 1006, 2655, 5963, 1007, 1025, 13075, 1035, 2009, 22139, 2063, 1027, 10236, 3022, 6038, 2278, 1006, 2009, 22139,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-echarts
src/component/axisPointer/modelHelper.js
saveTooltipAxisInfo
function saveTooltipAxisInfo(fromTooltip, triggerTooltip, axis) { var axisPointerModel = axis.model.getModel('axisPointer', globalAxisPointerModel); var axisPointerShow = axisPointerModel.get('show'); if (!axisPointerShow || ( axisPointerShow === 'auto' ...
javascript
function saveTooltipAxisInfo(fromTooltip, triggerTooltip, axis) { var axisPointerModel = axis.model.getModel('axisPointer', globalAxisPointerModel); var axisPointerShow = axisPointerModel.get('show'); if (!axisPointerShow || ( axisPointerShow === 'auto' ...
[ "function", "saveTooltipAxisInfo", "(", "fromTooltip", ",", "triggerTooltip", ",", "axis", ")", "{", "var", "axisPointerModel", "=", "axis", ".", "model", ".", "getModel", "(", "'axisPointer'", ",", "globalAxisPointerModel", ")", ";", "var", "axisPointerShow", "="...
fromTooltip: true | false | 'cross' triggerTooltip: true | false | null
[ "fromTooltip", ":", "true", "|", "false", "|", "cross", "triggerTooltip", ":", "true", "|", "false", "|", "null" ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/component/axisPointer/modelHelper.js#L111-L160
train
Save tooltip axis info
[ 30522, 3853, 3828, 3406, 27914, 11514, 8528, 17417, 2078, 14876, 1006, 2013, 3406, 27914, 11514, 1010, 9495, 3406, 27914, 11514, 1010, 8123, 1007, 1063, 13075, 8123, 8400, 2121, 5302, 9247, 1027, 8123, 1012, 2944, 1012, 2131, 5302, 9247, 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...