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
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(bIncludeEntityKey, bIncludeCount, bReturnNoEntities) { if (bIncludeEntityKey != null) { this._bIncludeEntityKey = bIncludeEntityKey; } if (bIncludeCount != null) { this._bIncludeCount = bIncludeCount; } if (bReturnNoEntities != null) { this._bReturnNoEntities = bReturnNoEntities; ...
javascript
function(bIncludeEntityKey, bIncludeCount, bReturnNoEntities) { if (bIncludeEntityKey != null) { this._bIncludeEntityKey = bIncludeEntityKey; } if (bIncludeCount != null) { this._bIncludeCount = bIncludeCount; } if (bReturnNoEntities != null) { this._bReturnNoEntities = bReturnNoEntities; ...
[ "function", "(", "bIncludeEntityKey", ",", "bIncludeCount", ",", "bReturnNoEntities", ")", "{", "if", "(", "bIncludeEntityKey", "!=", "null", ")", "{", "this", ".", "_bIncludeEntityKey", "=", "bIncludeEntityKey", ";", "}", "if", "(", "bIncludeCount", "!=", "null...
Set further options to be applied for the OData request to fetch the query result @param {Boolean} bIncludeEntityKey Indicates whether or not the entity key should be returned for every entry in the query result. Default is not to include it. Pass null to keep current setting. @param {Boolean} bIncludeCount Indicates ...
[ "Set", "further", "options", "to", "be", "applied", "for", "the", "OData", "request", "to", "fetch", "the", "query", "result" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L4536-L4546
train
Sets the parameters for the filter.
[ 30522, 3853, 1006, 8026, 20464, 12672, 4765, 3012, 14839, 1010, 8026, 20464, 12672, 3597, 16671, 1010, 25626, 14287, 3630, 4765, 6447, 1007, 1063, 2065, 1006, 8026, 20464, 12672, 4765, 3012, 14839, 999, 1027, 19701, 1007, 1063, 2023, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/view/ThemeManager.js
extractScrollbars
function extractScrollbars(content) { var scrollbar = []; // Go through and extract out scrollbar customizations so that we can // enable/disable via settings. content = content .replace(scrollbarsRegex, function (match) { scrollbar.push(match); ...
javascript
function extractScrollbars(content) { var scrollbar = []; // Go through and extract out scrollbar customizations so that we can // enable/disable via settings. content = content .replace(scrollbarsRegex, function (match) { scrollbar.push(match); ...
[ "function", "extractScrollbars", "(", "content", ")", "{", "var", "scrollbar", "=", "[", "]", ";", "// Go through and extract out scrollbar customizations so that we can", "// enable/disable via settings.", "content", "=", "content", ".", "replace", "(", "scrollbarsRegex", ...
@private Extracts the scrollbar text from the css/less content so that it can be treated as a separate styling component that can be anabled/disabled independently from the theme. @param {string} content is the css/less input string to be processed @return {{content: string, scrollbar: Array.<string>}} content is the ...
[ "@private", "Extracts", "the", "scrollbar", "text", "from", "the", "css", "/", "less", "content", "so", "that", "it", "can", "be", "treated", "as", "a", "separate", "styling", "component", "that", "can", "be", "anabled", "/", "disabled", "independently", "fr...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/view/ThemeManager.js#L117-L132
train
Extract scrollbar customizations from content
[ 30522, 3853, 27059, 26775, 14511, 8237, 2015, 1006, 4180, 1007, 1063, 13075, 17186, 8237, 1027, 1031, 1033, 1025, 1013, 1013, 2175, 2083, 1998, 14817, 2041, 17186, 8237, 7661, 22318, 2061, 2008, 2057, 2064, 1013, 1013, 9585, 1013, 4487, 191...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
GitbookIO/gitbook
lib/plugins/listDependencies.js
listDependencies
function listDependencies(deps) { // Extract list of plugins to disable (starting with -) var toRemove = deps .filter(function(plugin) { return !plugin.isEnabled(); }) .map(function(plugin) { return plugin.getName(); }); // Concat with default plugins...
javascript
function listDependencies(deps) { // Extract list of plugins to disable (starting with -) var toRemove = deps .filter(function(plugin) { return !plugin.isEnabled(); }) .map(function(plugin) { return plugin.getName(); }); // Concat with default plugins...
[ "function", "listDependencies", "(", "deps", ")", "{", "// Extract list of plugins to disable (starting with -)", "var", "toRemove", "=", "deps", ".", "filter", "(", "function", "(", "plugin", ")", "{", "return", "!", "plugin", ".", "isEnabled", "(", ")", ";", "...
List all dependencies for a book, including default plugins. It returns a concat with default plugins and remove disabled ones. @param {List<PluginDependency>} deps @return {List<PluginDependency>}
[ "List", "all", "dependencies", "for", "a", "book", "including", "default", "plugins", ".", "It", "returns", "a", "concat", "with", "default", "plugins", "and", "remove", "disabled", "ones", "." ]
6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4
https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/plugins/listDependencies.js#L11-L31
train
List all the dependencies
[ 30522, 3853, 2862, 3207, 11837, 4181, 9243, 1006, 2139, 4523, 1007, 1063, 1013, 1013, 14817, 2862, 1997, 13354, 7076, 2000, 4487, 19150, 1006, 3225, 2007, 1011, 1007, 13075, 9538, 5302, 3726, 1027, 2139, 4523, 1012, 11307, 1006, 3853, 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...
apache/incubator-echarts
src/coord/calendar/Calendar.js
function (range) { range = [ this.getDateInfo(range[0]), this.getDateInfo(range[1]) ]; var reversed; if (range[0].time > range[1].time) { reversed = true; range.reverse(); } var allDay = Math.floor(range[1].time / PROXIMAT...
javascript
function (range) { range = [ this.getDateInfo(range[0]), this.getDateInfo(range[1]) ]; var reversed; if (range[0].time > range[1].time) { reversed = true; range.reverse(); } var allDay = Math.floor(range[1].time / PROXIMAT...
[ "function", "(", "range", ")", "{", "range", "=", "[", "this", ".", "getDateInfo", "(", "range", "[", "0", "]", ")", ",", "this", ".", "getDateInfo", "(", "range", "[", "1", "]", ")", "]", ";", "var", "reversed", ";", "if", "(", "range", "[", "...
range info @private @param {Array} range range ['2017-01-01', '2017-07-08'] If range[0] > range[1], they will not be reversed. @return {Object} obj
[ "range", "info" ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/coord/calendar/Calendar.js#L363-L415
train
Get a range of time - zone information
[ 30522, 3853, 1006, 2846, 1007, 1063, 2846, 1027, 1031, 2023, 1012, 2131, 13701, 2378, 14876, 1006, 30524, 1012, 7901, 1006, 1007, 1025, 1065, 13075, 2035, 10259, 1027, 8785, 1012, 2723, 1006, 2846, 1031, 1015, 1033, 1012, 2051, 1013, 4013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/space-infix-ops.js
checkConditional
function checkConditional(node) { const nonSpacedConsequesntNode = getFirstNonSpacedToken(node.test, node.consequent, "?"); const nonSpacedAlternateNode = getFirstNonSpacedToken(node.consequent, node.alternate, ":"); if (nonSpacedConsequesntNode) { report(node, nonSp...
javascript
function checkConditional(node) { const nonSpacedConsequesntNode = getFirstNonSpacedToken(node.test, node.consequent, "?"); const nonSpacedAlternateNode = getFirstNonSpacedToken(node.consequent, node.alternate, ":"); if (nonSpacedConsequesntNode) { report(node, nonSp...
[ "function", "checkConditional", "(", "node", ")", "{", "const", "nonSpacedConsequesntNode", "=", "getFirstNonSpacedToken", "(", "node", ".", "test", ",", "node", ".", "consequent", ",", "\"?\"", ")", ";", "const", "nonSpacedAlternateNode", "=", "getFirstNonSpacedTok...
Check if the node is conditional @param {ASTNode} node node to evaluate @returns {void} @private
[ "Check", "if", "the", "node", "is", "conditional" ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/space-infix-ops.js#L125-L134
train
Check if a conditional node is valid
[ 30522, 3853, 4638, 8663, 27064, 1006, 13045, 1007, 1063, 9530, 3367, 2512, 23058, 16409, 5644, 2063, 10997, 3372, 3630, 3207, 1027, 2131, 8873, 12096, 8540, 23058, 11927, 11045, 2078, 1006, 13045, 1012, 3231, 1010, 13045, 1012, 9530, 3366, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jgraph/mxgraph
javascript/mxClient.js
mxHandle
function mxHandle(state, cursor, image) { this.graph = state.view.graph; this.state = state; this.cursor = (cursor != null) ? cursor : this.cursor; this.image = (image != null) ? image : this.image; this.init(); }
javascript
function mxHandle(state, cursor, image) { this.graph = state.view.graph; this.state = state; this.cursor = (cursor != null) ? cursor : this.cursor; this.image = (image != null) ? image : this.image; this.init(); }
[ "function", "mxHandle", "(", "state", ",", "cursor", ",", "image", ")", "{", "this", ".", "graph", "=", "state", ".", "view", ".", "graph", ";", "this", ".", "state", "=", "state", ";", "this", ".", "cursor", "=", "(", "cursor", "!=", "null", ")", ...
Copyright (c) 2006-2015, JGraph Ltd Copyright (c) 2006-2015, Gaudenz Alder Class: mxHandle Implements a single custom handle for vertices. Constructor: mxHandle Constructs a new handle for the given state. Parameters: state - <mxCellState> of the cell to be handled.
[ "Copyright", "(", "c", ")", "2006", "-", "2015", "JGraph", "Ltd", "Copyright", "(", "c", ")", "2006", "-", "2015", "Gaudenz", "Alder", "Class", ":", "mxHandle" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L75211-L75218
train
This is the base implementation of the mxHandle class
[ 30522, 3853, 25630, 11774, 2571, 1006, 2110, 1010, 12731, 25301, 2099, 1010, 3746, 1007, 1063, 2023, 1012, 10629, 1027, 2110, 1012, 3193, 1012, 10629, 1025, 2023, 1012, 2110, 1027, 2110, 1025, 2023, 1012, 12731, 25301, 2099, 1027, 1006, 127...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/insertPart.js
insertPart
function insertPart(summary, part, index) { part = SummaryPart(part); var parts = summary.getParts().insert(index, part); return indexLevels(summary.set('parts', parts)); }
javascript
function insertPart(summary, part, index) { part = SummaryPart(part); var parts = summary.getParts().insert(index, part); return indexLevels(summary.set('parts', parts)); }
[ "function", "insertPart", "(", "summary", ",", "part", ",", "index", ")", "{", "part", "=", "SummaryPart", "(", "part", ")", ";", "var", "parts", "=", "summary", ".", "getParts", "(", ")", ".", "insert", "(", "index", ",", "part", ")", ";", "return",...
Returns a new Summary with a part inserted at given index @param {Summary} summary @param {Part} part @param {Number} index @return {Summary}
[ "Returns", "a", "new", "Summary", "with", "a", "part", "inserted", "at", "given", "index" ]
6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4
https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/modifiers/summary/insertPart.js#L12-L17
train
Insert a part into the summary
[ 30522, 3853, 19274, 19362, 2102, 1006, 12654, 1010, 2112, 1010, 5950, 1007, 1063, 2112, 1027, 12654, 19362, 2102, 1006, 2112, 1007, 1025, 13075, 3033, 1027, 12654, 1012, 2131, 26950, 1006, 1007, 1012, 19274, 1006, 5950, 1010, 2112, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
TryGhost/Ghost
core/server/data/importer/index.js
function (file) { var self = this, ext = path.extname(file.name).toLowerCase(); return this.isZip(ext) ? self.processZip(file) : self.processFile(file, ext); }
javascript
function (file) { var self = this, ext = path.extname(file.name).toLowerCase(); return this.isZip(ext) ? self.processZip(file) : self.processFile(file, ext); }
[ "function", "(", "file", ")", "{", "var", "self", "=", "this", ",", "ext", "=", "path", ".", "extname", "(", "file", ".", "name", ")", ".", "toLowerCase", "(", ")", ";", "return", "this", ".", "isZip", "(", "ext", ")", "?", "self", ".", "processZ...
Import Step 1: Load the given file into usable importData in the format: {data: {}, images: []}, regardless of whether the file is a single importable file like a JSON file, or a zip file containing loads of files. @param {File} file @returns {Promise}
[ "Import", "Step", "1", ":", "Load", "the", "given", "file", "into", "usable", "importData", "in", "the", "format", ":", "{", "data", ":", "{}", "images", ":", "[]", "}", "regardless", "of", "whether", "the", "file", "is", "a", "single", "importable", "...
bb7bb55cf3e60af99ebbc56099928827b58461bc
https://github.com/TryGhost/Ghost/blob/bb7bb55cf3e60af99ebbc56099928827b58461bc/core/server/data/importer/index.js#L295-L299
train
Process a file
[ 30522, 3853, 1006, 5371, 1007, 1063, 13075, 2969, 1027, 2023, 1010, 4654, 2102, 1027, 4130, 1012, 4654, 2102, 18442, 1006, 5371, 1012, 2171, 1007, 1012, 2000, 27663, 18992, 3366, 1006, 1007, 1025, 2709, 2023, 1012, 2003, 5831, 2361, 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...
wuchangming/spy-debugger
buildin_modules/weinre/web/interfaces/interfaces.js
showInterfaceJavaScript
function showInterfaceJavaScript(intf, html) { html.push("<div class='show-JavaScript'><h3>JavaScript</h3><pre>") var line = "" line += "\n//-----------------------------------------------------------------------------" line += "\n<span class='interfaceName'>class " + intf.name + "</span>" html.pu...
javascript
function showInterfaceJavaScript(intf, html) { html.push("<div class='show-JavaScript'><h3>JavaScript</h3><pre>") var line = "" line += "\n//-----------------------------------------------------------------------------" line += "\n<span class='interfaceName'>class " + intf.name + "</span>" html.pu...
[ "function", "showInterfaceJavaScript", "(", "intf", ",", "html", ")", "{", "html", ".", "push", "(", "\"<div class='show-JavaScript'><h3>JavaScript</h3><pre>\"", ")", "var", "line", "=", "\"\"", "line", "+=", "\"\\n//-----------------------------------------------------------...
-----------------------------------------------------------------------------
[ "-----------------------------------------------------------------------------" ]
55c1dda0dff0c44920673711656ddfd7ff03c307
https://github.com/wuchangming/spy-debugger/blob/55c1dda0dff0c44920673711656ddfd7ff03c307/buildin_modules/weinre/web/interfaces/interfaces.js#L271-L285
train
showInterfaceJavaScript - Shows the interface s JavaScript
[ 30522, 3853, 2265, 18447, 2121, 12172, 3900, 12044, 23235, 1006, 20014, 2546, 1010, 16129, 1007, 1063, 16129, 1012, 5245, 1006, 1000, 1026, 4487, 2615, 2465, 1027, 1005, 2265, 1011, 9262, 22483, 1005, 1028, 1026, 1044, 2509, 1028, 9262, 224...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/no-alert.js
isGlobalThisReferenceOrGlobalWindow
function isGlobalThisReferenceOrGlobalWindow(scope, node) { if (scope.type === "global" && node.type === "ThisExpression") { return true; } if (node.name === "window") { return !isShadowed(scope, node); } return false; }
javascript
function isGlobalThisReferenceOrGlobalWindow(scope, node) { if (scope.type === "global" && node.type === "ThisExpression") { return true; } if (node.name === "window") { return !isShadowed(scope, node); } return false; }
[ "function", "isGlobalThisReferenceOrGlobalWindow", "(", "scope", ",", "node", ")", "{", "if", "(", "scope", ".", "type", "===", "\"global\"", "&&", "node", ".", "type", "===", "\"ThisExpression\"", ")", "{", "return", "true", ";", "}", "if", "(", "node", "...
Checks if the given identifier node is a ThisExpression in the global scope or the global window property. @param {Object} scope The current scope. @param {string} node The identifier node to check @returns {boolean} Whether or not the node is a reference to the global object.
[ "Checks", "if", "the", "given", "identifier", "node", "is", "a", "ThisExpression", "in", "the", "global", "scope", "or", "the", "global", "window", "property", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-alert.js#L60-L69
train
Check if the node is a global ThisExpression or a global window
[ 30522, 3853, 2003, 23296, 16429, 2389, 15222, 21338, 27235, 24413, 21759, 4135, 10264, 11101, 5004, 1006, 9531, 1010, 13045, 1007, 1063, 2065, 1006, 9531, 1012, 2828, 1027, 1027, 1027, 1000, 3795, 1000, 1004, 1004, 13045, 1012, 2828, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/no-self-assign.js
isSameProperty
function isSameProperty(left, right) { if (left.property.type === "Identifier" && left.property.type === right.property.type && left.property.name === right.property.name && left.computed === right.computed ) { return true; } const lname = astUtils.getStaticPropertyName(...
javascript
function isSameProperty(left, right) { if (left.property.type === "Identifier" && left.property.type === right.property.type && left.property.name === right.property.name && left.computed === right.computed ) { return true; } const lname = astUtils.getStaticPropertyName(...
[ "function", "isSameProperty", "(", "left", ",", "right", ")", "{", "if", "(", "left", ".", "property", ".", "type", "===", "\"Identifier\"", "&&", "left", ".", "property", ".", "type", "===", "right", ".", "property", ".", "type", "&&", "left", ".", "p...
Checks whether the property of 2 given member expression nodes are the same property or not. @param {ASTNode} left - A member expression node to check. @param {ASTNode} right - Another member expression node to check. @returns {boolean} `true` if the member expressions have the same property.
[ "Checks", "whether", "the", "property", "of", "2", "given", "member", "expression", "nodes", "are", "the", "same", "property", "or", "not", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-self-assign.js#L28-L41
train
Returns true if the left and right are the same
[ 30522, 3853, 26354, 14074, 21572, 4842, 3723, 1006, 2187, 1010, 2157, 1007, 1063, 2065, 1006, 2187, 1012, 3200, 1012, 2828, 1027, 1027, 1027, 1000, 8909, 4765, 18095, 1000, 1004, 1004, 2187, 1012, 3200, 1012, 2828, 1027, 1027, 1027, 2157, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
google/material-design-lite
src/layout/layout.js
MaterialLayoutTab
function MaterialLayoutTab(tab, tabs, panels, layout) { /** * Auxiliary method to programmatically select a tab in the UI. */ function selectTab() { var href = tab.href.split('#')[1]; var panel = layout.content_.querySelector('#' + href); layout.resetTabState_(tabs); layout.re...
javascript
function MaterialLayoutTab(tab, tabs, panels, layout) { /** * Auxiliary method to programmatically select a tab in the UI. */ function selectTab() { var href = tab.href.split('#')[1]; var panel = layout.content_.querySelector('#' + href); layout.resetTabState_(tabs); layout.re...
[ "function", "MaterialLayoutTab", "(", "tab", ",", "tabs", ",", "panels", ",", "layout", ")", "{", "/**\n * Auxiliary method to programmatically select a tab in the UI.\n */", "function", "selectTab", "(", ")", "{", "var", "href", "=", "tab", ".", "href", ".", ...
Constructor for an individual tab. @constructor @param {HTMLElement} tab The HTML element for the tab. @param {!Array<HTMLElement>} tabs Array with HTML elements for all tabs. @param {!Array<HTMLElement>} panels Array with HTML elements for all panels. @param {MaterialLayout} layout The MaterialLayout object that owns...
[ "Constructor", "for", "an", "individual", "tab", "." ]
60f441a22ed98ed2c03f6179adf460d888bf459f
https://github.com/google/material-design-lite/blob/60f441a22ed98ed2c03f6179adf460d888bf459f/src/layout/layout.js#L547-L583
train
MaterialLayoutTab is a wrapper around the tab s show method
[ 30522, 3853, 3430, 8485, 5833, 2696, 2497, 1006, 21628, 1010, 21628, 2015, 1010, 9320, 1010, 9621, 1007, 1063, 1013, 1008, 1008, 1008, 9830, 4118, 2000, 2565, 12644, 3973, 7276, 1037, 21628, 1999, 1996, 21318, 1012, 1008, 1013, 3853, 7276, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mochajs/mocha
lib/errors.js
createNoFilesMatchPatternError
function createNoFilesMatchPatternError(message, pattern) { var err = new Error(message); err.code = 'ERR_MOCHA_NO_FILES_MATCH_PATTERN'; err.pattern = pattern; return err; }
javascript
function createNoFilesMatchPatternError(message, pattern) { var err = new Error(message); err.code = 'ERR_MOCHA_NO_FILES_MATCH_PATTERN'; err.pattern = pattern; return err; }
[ "function", "createNoFilesMatchPatternError", "(", "message", ",", "pattern", ")", "{", "var", "err", "=", "new", "Error", "(", "message", ")", ";", "err", ".", "code", "=", "'ERR_MOCHA_NO_FILES_MATCH_PATTERN'", ";", "err", ".", "pattern", "=", "pattern", ";",...
@module Errors Factory functions to create throwable error objects Creates an error object to be thrown when no files to be tested could be found using specified pattern. @public @param {string} message - Error message to be displayed. @param {string} pattern - User-specified argument value. @returns {Error} insta...
[ "@module", "Errors", "Factory", "functions", "to", "create", "throwable", "error", "objects", "Creates", "an", "error", "object", "to", "be", "thrown", "when", "no", "files", "to", "be", "tested", "could", "be", "found", "using", "specified", "pattern", "." ]
9b00fedb610241e33f7592c40164e42a38a793cf
https://github.com/mochajs/mocha/blob/9b00fedb610241e33f7592c40164e42a38a793cf/lib/errors.js#L17-L22
train
Creates an error object that indicates that the specified pattern does not match the specified file pattern.
[ 30522, 3853, 3443, 3630, 8873, 4244, 18900, 2818, 4502, 12079, 3678, 29165, 1006, 4471, 1010, 5418, 1007, 1063, 13075, 9413, 2099, 1027, 2047, 7561, 1006, 4471, 1007, 1025, 9413, 2099, 1012, 3642, 1027, 1005, 9413, 2099, 1035, 9587, 7507, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
template/web-server/public/js/lib/build/build.js
checkMsg
function checkMsg(msg, protos){ if(!protos){ return false; } for(var name in protos){ var proto = protos[name]; //All required element must exist switch(proto.option){ case 'required' : if(typeof(msg[name]) === 'undefined'){ return false; } ...
javascript
function checkMsg(msg, protos){ if(!protos){ return false; } for(var name in protos){ var proto = protos[name]; //All required element must exist switch(proto.option){ case 'required' : if(typeof(msg[name]) === 'undefined'){ return false; } ...
[ "function", "checkMsg", "(", "msg", ",", "protos", ")", "{", "if", "(", "!", "protos", ")", "{", "return", "false", ";", "}", "for", "(", "var", "name", "in", "protos", ")", "{", "var", "proto", "=", "protos", "[", "name", "]", ";", "//All required...
Check if the msg follow the defination in the protos
[ "Check", "if", "the", "msg", "follow", "the", "defination", "in", "the", "protos" ]
defcf019631ed399cc4dad932d3b028a04a039a4
https://github.com/NetEase/pomelo/blob/defcf019631ed399cc4dad932d3b028a04a039a4/template/web-server/public/js/lib/build/build.js#L1041-L1076
train
Check if message is valid
[ 30522, 3853, 4638, 5244, 2290, 1006, 5796, 2290, 1010, 15053, 2015, 1007, 1063, 2065, 1006, 999, 15053, 2015, 1007, 1063, 2709, 6270, 1025, 1065, 2005, 1006, 13075, 2171, 1999, 15053, 2015, 1007, 1063, 13075, 15053, 1027, 15053, 2015, 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...
adobe/brackets
src/utils/LocalizationUtils.js
getLocalizedLabel
function getLocalizedLabel(locale) { var key = "LOCALE_" + locale.toUpperCase().replace("-", "_"), i18n = Strings[key]; return i18n === undefined ? locale : i18n; }
javascript
function getLocalizedLabel(locale) { var key = "LOCALE_" + locale.toUpperCase().replace("-", "_"), i18n = Strings[key]; return i18n === undefined ? locale : i18n; }
[ "function", "getLocalizedLabel", "(", "locale", ")", "{", "var", "key", "=", "\"LOCALE_\"", "+", "locale", ".", "toUpperCase", "(", ")", ".", "replace", "(", "\"-\"", ",", "\"_\"", ")", ",", "i18n", "=", "Strings", "[", "key", "]", ";", "return", "i18n...
/* Converts a language code to its written name, if possible. If not possible, the language code is simply returned. @param {string} locale The two-char language code @return {string} The language's name or the given language code
[ "/", "*", "Converts", "a", "language", "code", "to", "its", "written", "name", "if", "possible", ".", "If", "not", "possible", "the", "language", "code", "is", "simply", "returned", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/utils/LocalizationUtils.js#L39-L44
train
Get the localized label for a given locale
[ 30522, 3853, 2131, 4135, 9289, 3550, 20470, 2884, 1006, 2334, 2063, 1007, 1063, 13075, 3145, 1027, 1000, 2334, 2063, 1035, 1000, 1009, 2334, 2063, 1012, 2000, 29547, 18992, 3366, 1006, 1007, 1012, 5672, 1006, 1000, 1011, 1000, 1010, 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/preferences/PreferencesBase.js
function (id, value) { if (!_.isEqual(this.data[id], value)) { this._dirty = true; if (value === undefined) { delete this.data[id]; } else { this.data[id] = _.cloneDeep(value); } return tr...
javascript
function (id, value) { if (!_.isEqual(this.data[id], value)) { this._dirty = true; if (value === undefined) { delete this.data[id]; } else { this.data[id] = _.cloneDeep(value); } return tr...
[ "function", "(", "id", ",", "value", ")", "{", "if", "(", "!", "_", ".", "isEqual", "(", "this", ".", "data", "[", "id", "]", ",", "value", ")", ")", "{", "this", ".", "_dirty", "=", "true", ";", "if", "(", "value", "===", "undefined", ")", "...
@private Performs the set operation on this Scope's data, deleting the given ID if the new value is undefined. The dirty flag will be set as well. @param {string} id key to set or delete @param {*} value value for this key (undefined to delete) @return {boolean} true if the value was set.
[ "@private" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/preferences/PreferencesBase.js#L393-L404
train
Set a record in the cache
[ 30522, 3853, 1006, 8909, 1010, 3643, 1007, 1063, 2065, 1006, 999, 1035, 1012, 2003, 2063, 26426, 1006, 2023, 1012, 2951, 1031, 8909, 1033, 30524, 1007, 1063, 3972, 12870, 2023, 1012, 2951, 1031, 8909, 1033, 1025, 1065, 2842, 1063, 2023, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js
function (oProperty, oEntitySet) { var aFilterRestrictions, sFilterRestrictionValue = mFilterRestrictions[oProperty["sap:filter-restriction"]]; if (!sFilterRestrictionValue) { if (Log.isLoggable(iWARNING, sLoggingModule)) { Log.warning("Unsupported sap:filter-restriction: " + oProperty["sap:f...
javascript
function (oProperty, oEntitySet) { var aFilterRestrictions, sFilterRestrictionValue = mFilterRestrictions[oProperty["sap:filter-restriction"]]; if (!sFilterRestrictionValue) { if (Log.isLoggable(iWARNING, sLoggingModule)) { Log.warning("Unsupported sap:filter-restriction: " + oProperty["sap:f...
[ "function", "(", "oProperty", ",", "oEntitySet", ")", "{", "var", "aFilterRestrictions", ",", "sFilterRestrictionValue", "=", "mFilterRestrictions", "[", "oProperty", "[", "\"sap:filter-restriction\"", "]", "]", ";", "if", "(", "!", "sFilterRestrictionValue", ")", "...
Adds corresponding V4 annotation for V2 <code>sap:filter-restriction</code> to the given entity set. @param {object} oProperty the property of the entity @param {object} oEntitySet the entity set to which the corresponding V4 annotations need to be added
[ "Adds", "corresponding", "V4", "annotation", "for", "V2", "<code", ">", "sap", ":", "filter", "-", "restriction<", "/", "code", ">", "to", "the", "given", "entity", "set", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js#L202-L227
train
Adds a filter restriction to the filter restriction list
[ 30522, 3853, 1006, 6728, 18981, 15010, 1010, 1051, 4765, 3012, 13462, 1007, 1063, 13075, 28697, 21928, 28533, 7277, 9285, 1010, 16420, 4014, 3334, 28533, 7277, 3508, 10175, 5657, 1027, 1049, 8873, 21928, 28533, 7277, 9285, 1031, 6728, 18981, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
shipshapecode/shepherd
src/js/utils/general.js
_makeCenteredTippy
function _makeCenteredTippy() { const tippyOptions = { content: this.el, placement: 'top', ...this.options.tippyOptions }; tippyOptions.arrow = false; tippyOptions.popperOptions = tippyOptions.popperOptions || {}; const finalPopperOptions = Object.assign( {}, defaultPopperOptions, ti...
javascript
function _makeCenteredTippy() { const tippyOptions = { content: this.el, placement: 'top', ...this.options.tippyOptions }; tippyOptions.arrow = false; tippyOptions.popperOptions = tippyOptions.popperOptions || {}; const finalPopperOptions = Object.assign( {}, defaultPopperOptions, ti...
[ "function", "_makeCenteredTippy", "(", ")", "{", "const", "tippyOptions", "=", "{", "content", ":", "this", ".", "el", ",", "placement", ":", "'top'", ",", "...", "this", ".", "options", ".", "tippyOptions", "}", ";", "tippyOptions", ".", "arrow", "=", "...
Generates a `Tippy` instance for a tooltip that doesn't have a target element in the DOM -- and thus is positioned in the center of the view @return {tippy} The final tippy instance @private
[ "Generates", "a", "Tippy", "instance", "for", "a", "tooltip", "that", "doesn", "t", "have", "a", "target", "element", "in", "the", "DOM", "--", "and", "thus", "is", "positioned", "in", "the", "center", "of", "the", "view" ]
0cb1c63fb07b58796358f6d33da5f6405e2b05f4
https://github.com/shipshapecode/shepherd/blob/0cb1c63fb07b58796358f6d33da5f6405e2b05f4/src/js/utils/general.js#L241-L266
train
Make the tippy element centered in the top of the page
[ 30522, 3853, 1035, 2191, 13013, 6850, 25101, 7685, 1006, 1007, 1063, 9530, 3367, 5955, 7685, 7361, 9285, 1027, 1063, 4180, 1024, 2023, 1012, 3449, 1010, 11073, 1024, 1005, 2327, 1005, 1010, 1012, 1012, 1012, 2023, 1012, 7047, 1012, 5955, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/svg-icon-imports.js
transformSVGIconImports
function transformSVGIconImports(j, root) { const pathMatchRegex = /^material-ui\/svg-icons\/.+\/(.+)$/; root .find(j.Literal) .filter(path => pathMatchRegex.test(path.node.value)) .forEach(path => { const [, iconName] = path.node.value.match(pathMatchRegex); // update to new path pat...
javascript
function transformSVGIconImports(j, root) { const pathMatchRegex = /^material-ui\/svg-icons\/.+\/(.+)$/; root .find(j.Literal) .filter(path => pathMatchRegex.test(path.node.value)) .forEach(path => { const [, iconName] = path.node.value.match(pathMatchRegex); // update to new path pat...
[ "function", "transformSVGIconImports", "(", "j", ",", "root", ")", "{", "const", "pathMatchRegex", "=", "/", "^material-ui\\/svg-icons\\/.+\\/(.+)$", "/", ";", "root", ".", "find", "(", "j", ".", "Literal", ")", ".", "filter", "(", "path", "=>", "pathMatchRege...
Update all `svg-icons` import references to use `@material-ui/icons` package. Find and replace string literal AST nodes to ensure all svg-icon paths get updated, regardless of being in an import declaration, or a require() call, etc. https://github.com/mui-org/material-ui/tree/master/packages/@material-ui/icons @param ...
[ "Update", "all", "svg", "-", "icons", "import", "references", "to", "use" ]
1555e52367835946382fbf2a8f681de71318915d
https://github.com/mui-org/material-ui/blob/1555e52367835946382fbf2a8f681de71318915d/packages/material-ui-codemod/src/v1.0.0/svg-icon-imports.js#L29-L40
train
Transform SVG icon imports into SVG icon imports
[ 30522, 3853, 21743, 2615, 12863, 10698, 8737, 11589, 2015, 1006, 1046, 1010, 7117, 1007, 1063, 9530, 3367, 4130, 18900, 2818, 2890, 3351, 2595, 1027, 1013, 1034, 3430, 1011, 21318, 1032, 1013, 17917, 2290, 1011, 18407, 1032, 1013, 1012, 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...
goldfire/howler.js
dist/howler.js
function(self) { var url = self._src; // Check if the buffer has already been cached and use it instead. if (cache[url]) { // Set the duration from the cache. self._duration = cache[url].duration; // Load the sound into this Howl. loadSound(self); return; } if (/^da...
javascript
function(self) { var url = self._src; // Check if the buffer has already been cached and use it instead. if (cache[url]) { // Set the duration from the cache. self._duration = cache[url].duration; // Load the sound into this Howl. loadSound(self); return; } if (/^da...
[ "function", "(", "self", ")", "{", "var", "url", "=", "self", ".", "_src", ";", "// Check if the buffer has already been cached and use it instead.", "if", "(", "cache", "[", "url", "]", ")", "{", "// Set the duration from the cache.", "self", ".", "_duration", "=",...
Buffer a sound from URL, Data URI or cache and decode to audio source (Web Audio API). @param {Howl} self
[ "Buffer", "a", "sound", "from", "URL", "Data", "URI", "or", "cache", "and", "decode", "to", "audio", "source", "(", "Web", "Audio", "API", ")", "." ]
030db918dd8ce640afd57e172418472497e8f113
https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/dist/howler.js#L2302-L2353
train
Load the sound from the given URL.
[ 30522, 3853, 1006, 2969, 1007, 1063, 13075, 24471, 2140, 1027, 2969, 1012, 1035, 5034, 2278, 1025, 1013, 1013, 4638, 2065, 1996, 17698, 2038, 2525, 2042, 17053, 2094, 1998, 2224, 2009, 2612, 1012, 2065, 1006, 17053, 1031, 24471, 2140, 1033,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.table/src/sap/ui/table/TableColumnUtils.js
function(oColumn) { var oTable = oColumn.getParent(); if (!oTable || !oTable.getEnableColumnReordering()) { // Column reordering is not active at all return false; } var iCurrentIndex = oTable.indexOfColumn(oColumn); if (iCurrentIndex < oTable.getComputedFixedColumnCount() || iCurrentIndex < oT...
javascript
function(oColumn) { var oTable = oColumn.getParent(); if (!oTable || !oTable.getEnableColumnReordering()) { // Column reordering is not active at all return false; } var iCurrentIndex = oTable.indexOfColumn(oColumn); if (iCurrentIndex < oTable.getComputedFixedColumnCount() || iCurrentIndex < oT...
[ "function", "(", "oColumn", ")", "{", "var", "oTable", "=", "oColumn", ".", "getParent", "(", ")", ";", "if", "(", "!", "oTable", "||", "!", "oTable", ".", "getEnableColumnReordering", "(", ")", ")", "{", "// Column reordering is not active at all", "return", ...
Returns true if the column can be moved to another position. @param {sap.ui.table.Column} oColumn Column of the table. @returns {boolean} Whether the column can be moved to another position.
[ "Returns", "true", "if", "the", "column", "can", "be", "moved", "to", "another", "position", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableColumnUtils.js#L386-L406
train
Returns true if the column can be moved to the right position
[ 30522, 3853, 1006, 1051, 25778, 2819, 2078, 1007, 1063, 13075, 27178, 3085, 1027, 1051, 25778, 2819, 2078, 1012, 2131, 19362, 4765, 1006, 1007, 1025, 2065, 1006, 999, 27178, 3085, 1064, 1064, 999, 27178, 3085, 1012, 2131, 8189, 3468, 25778,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/preferences/PreferencesBase.js
function () { if (this._saveInProgress) { if (!this._nextSaveDeferred) { this._nextSaveDeferred = new $.Deferred(); } return this._nextSaveDeferred.promise(); } var deferred = this._nextSaveDeferred || (new $.Deferr...
javascript
function () { if (this._saveInProgress) { if (!this._nextSaveDeferred) { this._nextSaveDeferred = new $.Deferred(); } return this._nextSaveDeferred.promise(); } var deferred = this._nextSaveDeferred || (new $.Deferr...
[ "function", "(", ")", "{", "if", "(", "this", ".", "_saveInProgress", ")", "{", "if", "(", "!", "this", ".", "_nextSaveDeferred", ")", "{", "this", ".", "_nextSaveDeferred", "=", "new", "$", ".", "Deferred", "(", ")", ";", "}", "return", "this", ".",...
Saves the preferences. If a save is already in progress, a Promise is returned for that save operation. @return {Promise} Resolved when the preferences are done saving.
[ "Saves", "the", "preferences", ".", "If", "a", "save", "is", "already", "in", "progress", "a", "Promise", "is", "returned", "for", "that", "save", "operation", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/preferences/PreferencesBase.js#L1774-L1805
train
Save all the scopes
[ 30522, 3853, 1006, 1007, 1063, 2065, 1006, 2023, 1012, 1035, 3828, 2378, 21572, 17603, 4757, 1007, 1063, 2065, 1006, 999, 2023, 1012, 1035, 2279, 3736, 7178, 27235, 20529, 1007, 1063, 2023, 1012, 1035, 2279, 3736, 7178, 27235, 20529, 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...
angular/material
gulp/util.js
buildJs
function buildJs() { const jsFiles = config.jsCoreFiles; config.componentPaths.forEach(component => { jsFiles.push(path.join(component, '*.js')); jsFiles.push(path.join(component, '**/*.js')); }); gutil.log("building js files..."); const jsBuildStream = gulp.src(jsFiles) .pipe(filterNonCodeFiles()...
javascript
function buildJs() { const jsFiles = config.jsCoreFiles; config.componentPaths.forEach(component => { jsFiles.push(path.join(component, '*.js')); jsFiles.push(path.join(component, '**/*.js')); }); gutil.log("building js files..."); const jsBuildStream = gulp.src(jsFiles) .pipe(filterNonCodeFiles()...
[ "function", "buildJs", "(", ")", "{", "const", "jsFiles", "=", "config", ".", "jsCoreFiles", ";", "config", ".", "componentPaths", ".", "forEach", "(", "component", "=>", "{", "jsFiles", ".", "push", "(", "path", ".", "join", "(", "component", ",", "'*.j...
Builds the entire component library javascript.
[ "Builds", "the", "entire", "component", "library", "javascript", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/gulp/util.js#L43-L76
train
Builds the angular - material. js files
[ 30522, 3853, 3857, 22578, 1006, 1007, 1063, 9530, 3367, 1046, 22747, 9463, 2015, 1027, 9530, 8873, 2290, 1012, 1046, 9363, 2890, 8873, 4244, 1025, 9530, 8873, 2290, 1012, 6922, 15069, 2015, 1012, 18921, 6776, 1006, 6922, 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...
eslint/eslint
lib/rules/indent-legacy.js
createErrorMessageData
function createErrorMessageData(expectedAmount, actualSpaces, actualTabs) { const expectedStatement = `${expectedAmount} ${indentType}${expectedAmount === 1 ? "" : "s"}`; // e.g. "2 tabs" const foundSpacesWord = `space${actualSpaces === 1 ? "" : "s"}`; // e.g. "space" const foundTabs...
javascript
function createErrorMessageData(expectedAmount, actualSpaces, actualTabs) { const expectedStatement = `${expectedAmount} ${indentType}${expectedAmount === 1 ? "" : "s"}`; // e.g. "2 tabs" const foundSpacesWord = `space${actualSpaces === 1 ? "" : "s"}`; // e.g. "space" const foundTabs...
[ "function", "createErrorMessageData", "(", "expectedAmount", ",", "actualSpaces", ",", "actualTabs", ")", "{", "const", "expectedStatement", "=", "`", "${", "expectedAmount", "}", "${", "indentType", "}", "${", "expectedAmount", "===", "1", "?", "\"\"", ":", "\"...
Creates an error message for a line, given the expected/actual indentation. @param {int} expectedAmount The expected amount of indentation characters for this line @param {int} actualSpaces The actual number of indentation spaces that were found on this line @param {int} actualTabs The actual number of indentation tabs...
[ "Creates", "an", "error", "message", "for", "a", "line", "given", "the", "expected", "/", "actual", "indentation", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/indent-legacy.js#L274-L298
train
Create an error message data object
[ 30522, 3853, 3443, 2121, 29165, 7834, 3736, 5999, 6790, 1006, 3517, 22591, 16671, 1010, 5025, 23058, 2015, 1010, 5025, 2696, 5910, 1007, 1063, 9530, 3367, 3517, 9153, 18532, 4765, 1027, 1036, 1002, 1063, 3517, 22591, 16671, 1065, 1002, 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...
jgraph/mxgraph
javascript/mxClient.js
snapY
function snapY(y, state) { y += this.graph.panDy; var override = false; if (Math.abs(y - middle) < ttY) { dy = y - bounds.getCenterY(); ttY = Math.abs(y - middle); override = true; } else if (Math.abs(y - top) < ttY) { dy = y - bounds.y; ttY = Math.abs(y - top); overr...
javascript
function snapY(y, state) { y += this.graph.panDy; var override = false; if (Math.abs(y - middle) < ttY) { dy = y - bounds.getCenterY(); ttY = Math.abs(y - middle); override = true; } else if (Math.abs(y - top) < ttY) { dy = y - bounds.y; ttY = Math.abs(y - top); overr...
[ "function", "snapY", "(", "y", ",", "state", ")", "{", "y", "+=", "this", ".", "graph", ".", "panDy", ";", "var", "override", "=", "false", ";", "if", "(", "Math", ".", "abs", "(", "y", "-", "middle", ")", "<", "ttY", ")", "{", "dy", "=", "y"...
Snaps the top, middle or bottom to the given y-coordinate
[ "Snaps", "the", "top", "middle", "or", "bottom", "to", "the", "given", "y", "-", "coordinate" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L21901-L21945
train
Snaps the y - coordinate to the top or bottom of the graph
[ 30522, 3853, 10245, 2100, 1006, 1061, 1010, 2110, 1007, 1063, 1061, 1009, 1027, 2023, 1012, 10629, 1012, 6090, 5149, 1025, 13075, 2058, 15637, 1027, 6270, 1025, 2065, 1006, 8785, 1012, 14689, 1006, 1061, 1011, 2690, 1007, 1026, 23746, 2100,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.ux3/src/sap/ui/ux3/ToolPopup.js
function (context) { var that = context; assert(!!that, "No ToolPopup instance given for _fnGetInitialFocus"); // if there is an initial focus it was already set to the Popup onBeforeRendering if (!that._bFocusSet) { _fnGetNewFocusElem...
javascript
function (context) { var that = context; assert(!!that, "No ToolPopup instance given for _fnGetInitialFocus"); // if there is an initial focus it was already set to the Popup onBeforeRendering if (!that._bFocusSet) { _fnGetNewFocusElem...
[ "function", "(", "context", ")", "{", "var", "that", "=", "context", ";", "assert", "(", "!", "!", "that", ",", "\"No ToolPopup instance given for _fnGetInitialFocus\"", ")", ";", "// if there is an initial focus it was already set to the Popup onBeforeRendering", "if", "("...
Checks if the ToolPopup already has a tabbable element. If not, it's checked whether the fake-element should be used or if there is an element that could be focused instead. @param {sap.ui.ux3.ToolPopup} context to get/set instance values @returns {string} _sInitialFocusId that has been determined here @private
[ "Checks", "if", "the", "ToolPopup", "already", "has", "a", "tabbable", "element", ".", "If", "not", "it", "s", "checked", "whether", "the", "fake", "-", "element", "should", "be", "used", "or", "if", "there", "is", "an", "element", "that", "could", "be",...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.ux3/src/sap/ui/ux3/ToolPopup.js#L307-L319
train
Get the initial focus element
[ 30522, 3853, 1006, 6123, 1007, 1063, 13075, 2008, 1027, 6123, 1025, 20865, 1006, 999, 999, 2008, 1010, 1000, 2053, 6994, 16340, 6279, 6013, 2445, 2005, 1035, 1042, 15465, 7629, 29050, 10270, 10085, 2271, 1000, 1007, 1025, 1013, 1013, 2065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
openlayers/openlayers
examples/wms-custom-proj.js
DEGtoSEC
function DEGtoSEC(angle) { // Extract DMS const deg = parseInt(angle, 10); let min = parseInt((angle - deg) * 100, 10); let sec = (((angle - deg) * 100) - min) * 100; // Avoid rounding problems with seconds=0 const parts = String(angle).split('.'); if (parts.length == 2 && parts[1].length == 2) { mi...
javascript
function DEGtoSEC(angle) { // Extract DMS const deg = parseInt(angle, 10); let min = parseInt((angle - deg) * 100, 10); let sec = (((angle - deg) * 100) - min) * 100; // Avoid rounding problems with seconds=0 const parts = String(angle).split('.'); if (parts.length == 2 && parts[1].length == 2) { mi...
[ "function", "DEGtoSEC", "(", "angle", ")", "{", "// Extract DMS", "const", "deg", "=", "parseInt", "(", "angle", ",", "10", ")", ";", "let", "min", "=", "parseInt", "(", "(", "angle", "-", "deg", ")", "*", "100", ",", "10", ")", ";", "let", "sec", ...
Convert Degrees angle to seconds
[ "Convert", "Degrees", "angle", "to", "seconds" ]
f366eaea522388fb575b11010e69d309164baca7
https://github.com/openlayers/openlayers/blob/f366eaea522388fb575b11010e69d309164baca7/examples/wms-custom-proj.js#L206-L223
train
Convert DMS angle to seconds
[ 30522, 3853, 2139, 13512, 9232, 2278, 1006, 6466, 1007, 1063, 1013, 1013, 14817, 1040, 5244, 9530, 3367, 2139, 2290, 1027, 11968, 20240, 3372, 1006, 6466, 1010, 2184, 1007, 1025, 2292, 8117, 1027, 11968, 20240, 3372, 1006, 1006, 6466, 1011,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
wangfupeng1988/wangEditor
example/server/util.js
function (obj, fn) { let key, result for (key in obj) { if (obj.hasOwnProperty(key)) { result = fn.call(obj, key, obj[key]) if (result === false) { break } } } }
javascript
function (obj, fn) { let key, result for (key in obj) { if (obj.hasOwnProperty(key)) { result = fn.call(obj, key, obj[key]) if (result === false) { break } } } }
[ "function", "(", "obj", ",", "fn", ")", "{", "let", "key", ",", "result", "for", "(", "key", "in", "obj", ")", "{", "if", "(", "obj", ".", "hasOwnProperty", "(", "key", ")", ")", "{", "result", "=", "fn", ".", "call", "(", "obj", ",", "key", ...
遍历对象
[ "遍历对象" ]
b77696f5e81c8ec13d9d341252d6b9fa8a22db18
https://github.com/wangfupeng1988/wangEditor/blob/b77696f5e81c8ec13d9d341252d6b9fa8a22db18/example/server/util.js#L3-L13
train
call a function for each key in obj
[ 30522, 3853, 1006, 27885, 3501, 1010, 1042, 2078, 1007, 1063, 2292, 3145, 1010, 2765, 2005, 1006, 3145, 1999, 27885, 3501, 1007, 1063, 2065, 1006, 27885, 3501, 1012, 2038, 12384, 21572, 4842, 3723, 1006, 3145, 1007, 1007, 1063, 2765, 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...
30-seconds/30-seconds-of-code
scripts/module.js
build
async function build() { console.time('Packager'); let requires = []; let esmExportString = ''; let cjsExportString = ''; try { if (!fs.existsSync(DIST_PATH)) fs.mkdirSync(DIST_PATH); fs.writeFileSync(ROLLUP_INPUT_FILE, ''); fs.writeFileSync(TEST_MODULE_FILE, ''); // All the snippets that a...
javascript
async function build() { console.time('Packager'); let requires = []; let esmExportString = ''; let cjsExportString = ''; try { if (!fs.existsSync(DIST_PATH)) fs.mkdirSync(DIST_PATH); fs.writeFileSync(ROLLUP_INPUT_FILE, ''); fs.writeFileSync(TEST_MODULE_FILE, ''); // All the snippets that a...
[ "async", "function", "build", "(", ")", "{", "console", ".", "time", "(", "'Packager'", ")", ";", "let", "requires", "=", "[", "]", ";", "let", "esmExportString", "=", "''", ";", "let", "cjsExportString", "=", "''", ";", "try", "{", "if", "(", "!", ...
Starts the build process.
[ "Starts", "the", "build", "process", "." ]
5ef18713903aaaa5ff5409ef3a6de31dbd878d0c
https://github.com/30-seconds/30-seconds-of-code/blob/5ef18713903aaaa5ff5409ef3a6de31dbd878d0c/scripts/module.js#L74-L165
train
Build the project
[ 30522, 2004, 6038, 2278, 3853, 3857, 1006, 1007, 1063, 10122, 1012, 2051, 1006, 1005, 7427, 2099, 1005, 1007, 1025, 2292, 5942, 1027, 1031, 1033, 1025, 2292, 9686, 4168, 2595, 25378, 18886, 3070, 1027, 1005, 1005, 1025, 2292, 1039, 22578, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Support.js
onTouchStart
function onTouchStart(oEvent) { if (oEvent.touches) { var currentTouches = oEvent.touches.length; if (Device.browser.mobile && (Device.browser.name === Device.browser.BROWSER.INTERNET_EXPLORER ||// TODO remove after 1.62 version Device.browser.name === Device.browser.BROWSER.EDGE)) { wi...
javascript
function onTouchStart(oEvent) { if (oEvent.touches) { var currentTouches = oEvent.touches.length; if (Device.browser.mobile && (Device.browser.name === Device.browser.BROWSER.INTERNET_EXPLORER ||// TODO remove after 1.62 version Device.browser.name === Device.browser.BROWSER.EDGE)) { wi...
[ "function", "onTouchStart", "(", "oEvent", ")", "{", "if", "(", "oEvent", ".", "touches", ")", "{", "var", "currentTouches", "=", "oEvent", ".", "touches", ".", "length", ";", "if", "(", "Device", ".", "browser", ".", "mobile", "&&", "(", "Device", "."...
function is triggered when a touch is detected
[ "function", "is", "triggered", "when", "a", "touch", "is", "detected" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/Support.js#L277-L308
train
touchstart event handler
[ 30522, 3853, 3031, 10875, 14117, 2102, 1006, 1051, 18697, 3372, 1007, 1063, 2065, 1006, 1051, 18697, 3372, 1012, 12817, 1007, 1063, 13075, 2783, 24826, 8376, 1027, 1051, 18697, 3372, 1012, 12817, 1012, 3091, 1025, 2065, 1006, 5080, 1012, 16...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ccxt/ccxt
build/transpile.js
createPythonClass
function createPythonClass (className, baseClass, body, methods, async = false) { const pythonStandardLibraries = { 'base64': 'base64', 'hashlib': 'hashlib', 'math': 'math', 'json.loads': 'json', } async = async ? 'async_support.' : '' const importFrom = (baseClass == ...
javascript
function createPythonClass (className, baseClass, body, methods, async = false) { const pythonStandardLibraries = { 'base64': 'base64', 'hashlib': 'hashlib', 'math': 'math', 'json.loads': 'json', } async = async ? 'async_support.' : '' const importFrom = (baseClass == ...
[ "function", "createPythonClass", "(", "className", ",", "baseClass", ",", "body", ",", "methods", ",", "async", "=", "false", ")", "{", "const", "pythonStandardLibraries", "=", "{", "'base64'", ":", "'base64'", ",", "'hashlib'", ":", "'hashlib'", ",", "'math'"...
---------------------------------------------------------------------------- one-time helpers
[ "----------------------------------------------------------------------------", "one", "-", "time", "helpers" ]
8168069b9180a465532905e225586215e115a565
https://github.com/ccxt/ccxt/blob/8168069b9180a465532905e225586215e115a565/build/transpile.js#L374-L445
train
Creates a Python class
[ 30522, 3853, 3443, 7685, 2705, 2239, 26266, 1006, 2465, 18442, 1010, 2918, 26266, 1010, 2303, 1010, 4725, 1010, 2004, 6038, 2278, 1027, 6270, 1007, 1063, 9530, 3367, 18750, 21515, 4232, 29521, 19848, 3111, 1027, 1063, 1005, 2918, 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/LiveDevelopment/Agents/RemoteFunctions.js
_screenOffset
function _screenOffset(element) { var elemBounds = element.getBoundingClientRect(), body = window.document.body, offsetTop, offsetLeft; if (window.getComputedStyle(body).position === "static") { offsetLeft = elemBounds.left + window.pageXOffset; ...
javascript
function _screenOffset(element) { var elemBounds = element.getBoundingClientRect(), body = window.document.body, offsetTop, offsetLeft; if (window.getComputedStyle(body).position === "static") { offsetLeft = elemBounds.left + window.pageXOffset; ...
[ "function", "_screenOffset", "(", "element", ")", "{", "var", "elemBounds", "=", "element", ".", "getBoundingClientRect", "(", ")", ",", "body", "=", "window", ".", "document", ".", "body", ",", "offsetTop", ",", "offsetLeft", ";", "if", "(", "window", "."...
compute the screen offset of an element
[ "compute", "the", "screen", "offset", "of", "an", "element" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/LiveDevelopment/Agents/RemoteFunctions.js#L91-L106
train
Get screen offset
[ 30522, 3853, 1035, 3898, 27475, 3388, 1006, 5783, 1007, 1063, 13075, 3449, 6633, 15494, 2015, 1027, 5783, 1012, 2131, 15494, 2075, 20464, 11638, 2890, 6593, 1006, 1007, 1010, 2303, 1027, 3332, 1012, 6254, 1012, 2303, 1010, 16396, 14399, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/view/WorkspaceManager.js
handleWindowResize
function handleWindowResize() { // These are not initialized in Jasmine Spec Runner window until a test // is run that creates a mock document. if (!$windowContent || !$editorHolder) { return; } // FIXME (issue #4564) Workaround https://github.com/codemirror/CodeMirr...
javascript
function handleWindowResize() { // These are not initialized in Jasmine Spec Runner window until a test // is run that creates a mock document. if (!$windowContent || !$editorHolder) { return; } // FIXME (issue #4564) Workaround https://github.com/codemirror/CodeMirr...
[ "function", "handleWindowResize", "(", ")", "{", "// These are not initialized in Jasmine Spec Runner window until a test", "// is run that creates a mock document.", "if", "(", "!", "$windowContent", "||", "!", "$editorHolder", ")", "{", "return", ";", "}", "// FIXME (issue #4...
Trigger editor area resize whenever the window is resized
[ "Trigger", "editor", "area", "resize", "whenever", "the", "window", "is", "resized" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/view/WorkspaceManager.js#L123-L144
train
Handle window resize
[ 30522, 3853, 5047, 11101, 5004, 6072, 4697, 1006, 1007, 1063, 1013, 1013, 2122, 2024, 2025, 3988, 3550, 1999, 14032, 28699, 5479, 3332, 2127, 1037, 3231, 1013, 1013, 30524, 2147, 24490, 16770, 1024, 1013, 1013, 21025, 2705, 12083, 1012, 401...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
feross/simple-peer
index.js
flattenValues
function flattenValues (report) { if (Object.prototype.toString.call(report.values) === '[object Array]') { report.values.forEach(function (value) { Object.assign(report, value) }) } return report }
javascript
function flattenValues (report) { if (Object.prototype.toString.call(report.values) === '[object Array]') { report.values.forEach(function (value) { Object.assign(report, value) }) } return report }
[ "function", "flattenValues", "(", "report", ")", "{", "if", "(", "Object", ".", "prototype", ".", "toString", ".", "call", "(", "report", ".", "values", ")", "===", "'[object Array]'", ")", "{", "report", ".", "values", ".", "forEach", "(", "function", "...
statreports can come with a value array instead of properties
[ "statreports", "can", "come", "with", "a", "value", "array", "instead", "of", "properties" ]
3ed91bf631c4bf9c3b4bf5a85d004bb70d621707
https://github.com/feross/simple-peer/blob/3ed91bf631c4bf9c3b4bf5a85d004bb70d621707/index.js#L742-L749
train
flatten values
[ 30522, 3853, 4257, 6528, 10175, 15808, 1006, 3189, 1007, 1063, 2065, 1006, 4874, 1012, 8773, 1012, 2000, 3367, 4892, 1012, 2655, 1006, 3189, 1012, 5300, 1007, 1027, 1027, 1027, 1005, 1031, 4874, 9140, 1033, 1005, 1007, 1063, 3189, 1012, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jgraph/mxgraph
javascript/mxClient.js
function(evt) { return (evt.type != null && evt.type.indexOf('touch') == 0 && evt.touches != null && evt.touches.length > 1); }
javascript
function(evt) { return (evt.type != null && evt.type.indexOf('touch') == 0 && evt.touches != null && evt.touches.length > 1); }
[ "function", "(", "evt", ")", "{", "return", "(", "evt", ".", "type", "!=", "null", "&&", "evt", ".", "type", ".", "indexOf", "(", "'touch'", ")", "==", "0", "&&", "evt", ".", "touches", "!=", "null", "&&", "evt", ".", "touches", ".", "length", ">...
Function: isMultiTouchEvent Returns true if the event was generated using a touch device (not a pen or mouse).
[ "Function", ":", "isMultiTouchEvent" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L9847-L9850
train
Returns true if the event is a touch event
[ 30522, 3853, 1006, 23408, 2102, 1007, 1063, 2709, 1006, 23408, 2102, 1012, 2828, 999, 1027, 19701, 1004, 1004, 23408, 2102, 1012, 2828, 1012, 5950, 11253, 1006, 1005, 3543, 1005, 1007, 1027, 1027, 1014, 1004, 1004, 23408, 2102, 1012, 12817,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
GitbookIO/gitbook
lib/output/modifiers/modifyHTML.js
modifyHTML
function modifyHTML(page, operations) { var html = page.getContent(); var $ = cheerio.load(html); return Promise.forEach(operations, function(op) { return op($); }) .then(function() { var resultHTML = $.html(); return page.set('content', resultHTML); }); }
javascript
function modifyHTML(page, operations) { var html = page.getContent(); var $ = cheerio.load(html); return Promise.forEach(operations, function(op) { return op($); }) .then(function() { var resultHTML = $.html(); return page.set('content', resultHTML); }); }
[ "function", "modifyHTML", "(", "page", ",", "operations", ")", "{", "var", "html", "=", "page", ".", "getContent", "(", ")", ";", "var", "$", "=", "cheerio", ".", "load", "(", "html", ")", ";", "return", "Promise", ".", "forEach", "(", "operations", ...
Apply a list of operations to a page and output the new page. @param {Page} @param {List|Array<Transformation>} @return {Promise<Page>}
[ "Apply", "a", "list", "of", "operations", "to", "a", "page", "and", "output", "the", "new", "page", "." ]
6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4
https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/output/modifiers/modifyHTML.js#L12-L23
train
Modify the HTML of a page
[ 30522, 3853, 19933, 11039, 19968, 1006, 3931, 1010, 3136, 1007, 1063, 13075, 16129, 1027, 3931, 1012, 2131, 8663, 6528, 2102, 1006, 1007, 1025, 13075, 1002, 1027, 15138, 3695, 1012, 7170, 1006, 16129, 1007, 1025, 2709, 4872, 1012, 18921, 67...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.commons/src/sap/ui/commons/layout/PositionContainer.js
function(oPositionContainer, oControl, sProp, sPos1, sVal1, sPos2, sVal2) { if (sVal1 && sVal2) { var oLayout = oPositionContainer.getParent(); var oProp = getPropertyInfo(oControl, sProp); if (oProp) { var val = oControl[oProp._sGetter](); if (!(!val || val == "" || val == "auto" || val == "inherit"...
javascript
function(oPositionContainer, oControl, sProp, sPos1, sVal1, sPos2, sVal2) { if (sVal1 && sVal2) { var oLayout = oPositionContainer.getParent(); var oProp = getPropertyInfo(oControl, sProp); if (oProp) { var val = oControl[oProp._sGetter](); if (!(!val || val == "" || val == "auto" || val == "inherit"...
[ "function", "(", "oPositionContainer", ",", "oControl", ",", "sProp", ",", "sPos1", ",", "sVal1", ",", "sPos2", ",", "sVal2", ")", "{", "if", "(", "sVal1", "&&", "sVal2", ")", "{", "var", "oLayout", "=", "oPositionContainer", ".", "getParent", "(", ")", ...
Checks whether the position settings fits to the set height/width attribute of a control. @private
[ "Checks", "whether", "the", "position", "settings", "fits", "to", "the", "set", "height", "/", "width", "attribute", "of", "a", "control", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/layout/PositionContainer.js#L376-L396
train
Checks if the control has fixed property
[ 30522, 3853, 1006, 6728, 19234, 8663, 18249, 2121, 1010, 1051, 8663, 13181, 2140, 1010, 11867, 18981, 1010, 11867, 2891, 2487, 1010, 17917, 2389, 2487, 1010, 11867, 2891, 2475, 1010, 17917, 2389, 2475, 1007, 1063, 2065, 1006, 17917, 2389, 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...
ColorlibHQ/AdminLTE
plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js
splitDataNode
function splitDataNode(node, index, positionsToPreserve) { var newNode = node.cloneNode(false); newNode.deleteData(0, index); node.deleteData(index, node.length - index); insertAfter(newNode, node); // Preserve positions if (positionsToPreserve) {...
javascript
function splitDataNode(node, index, positionsToPreserve) { var newNode = node.cloneNode(false); newNode.deleteData(0, index); node.deleteData(index, node.length - index); insertAfter(newNode, node); // Preserve positions if (positionsToPreserve) {...
[ "function", "splitDataNode", "(", "node", ",", "index", ",", "positionsToPreserve", ")", "{", "var", "newNode", "=", "node", ".", "cloneNode", "(", "false", ")", ";", "newNode", ".", "deleteData", "(", "0", ",", "index", ")", ";", "node", ".", "deleteDat...
Note that we cannot use splitText() because it is bugridden in IE 9.
[ "Note", "that", "we", "cannot", "use", "splitText", "()", "because", "it", "is", "bugridden", "in", "IE", "9", "." ]
19113c3cbc19a7afe0cfd3158d647064d2d30661
https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js#L658-L679
train
Split data node at the given index.
[ 30522, 3853, 3975, 2850, 5794, 10244, 1006, 13045, 1010, 5950, 1010, 4460, 14399, 6072, 2121, 3726, 1007, 1063, 13075, 2047, 3630, 3207, 1027, 13045, 1012, 17598, 3630, 3207, 1006, 6270, 1007, 1025, 2047, 3630, 3207, 1012, 17159, 6790, 1006...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/language/JSONUtils.js
stripQuotes
function stripQuotes(string) { if (string) { if (/^['"]$/.test(string.charAt(0))) { string = string.substr(1); } if (/^['"]$/.test(string.substr(-1, 1))) { string = string.substr(0, string.length - 1); } } return str...
javascript
function stripQuotes(string) { if (string) { if (/^['"]$/.test(string.charAt(0))) { string = string.substr(1); } if (/^['"]$/.test(string.substr(-1, 1))) { string = string.substr(0, string.length - 1); } } return str...
[ "function", "stripQuotes", "(", "string", ")", "{", "if", "(", "string", ")", "{", "if", "(", "/", "^['\"]$", "/", ".", "test", "(", "string", ".", "charAt", "(", "0", ")", ")", ")", "{", "string", "=", "string", ".", "substr", "(", "1", ")", "...
Removes the quotes around a string @param {!String} string @return {String}
[ "Removes", "the", "quotes", "around", "a", "string" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/language/JSONUtils.js#L75-L85
train
strip quotes from string
[ 30522, 3853, 6167, 28940, 12184, 2015, 1006, 5164, 1007, 1063, 2065, 1006, 5164, 1007, 1063, 2065, 1006, 1013, 1034, 1031, 1005, 1000, 1033, 1002, 1013, 1012, 3231, 1006, 5164, 1012, 25869, 30524, 1010, 1015, 1007, 1007, 1007, 1063, 5164, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-echarts
src/chart/boxplot/boxplotLayout.js
groupSeriesByAxis
function groupSeriesByAxis(ecModel) { var result = []; var axisList = []; ecModel.eachSeriesByType('boxplot', function (seriesModel) { var baseAxis = seriesModel.getBaseAxis(); var idx = zrUtil.indexOf(axisList, baseAxis); if (idx < 0) { idx = axisList.length; ...
javascript
function groupSeriesByAxis(ecModel) { var result = []; var axisList = []; ecModel.eachSeriesByType('boxplot', function (seriesModel) { var baseAxis = seriesModel.getBaseAxis(); var idx = zrUtil.indexOf(axisList, baseAxis); if (idx < 0) { idx = axisList.length; ...
[ "function", "groupSeriesByAxis", "(", "ecModel", ")", "{", "var", "result", "=", "[", "]", ";", "var", "axisList", "=", "[", "]", ";", "ecModel", ".", "eachSeriesByType", "(", "'boxplot'", ",", "function", "(", "seriesModel", ")", "{", "var", "baseAxis", ...
Group series by axis.
[ "Group", "series", "by", "axis", "." ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/chart/boxplot/boxplotLayout.js#L51-L69
train
group series by axis
[ 30522, 3853, 2967, 28077, 3762, 8528, 2483, 1006, 14925, 5302, 9247, 1007, 1063, 13075, 2765, 1027, 1031, 1033, 1025, 13075, 8123, 9863, 1027, 1031, 1033, 1025, 14925, 5302, 9247, 1012, 2169, 8043, 3111, 3762, 13874, 1006, 1005, 3482, 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...
aframevr/aframe
src/core/component.js
function (value, silent) { var schema = this.schema; if (this.isSingleProperty) { return parseProperty(value, schema); } return parseProperties(styleParser.parse(value), schema, true, this.name, silent); }
javascript
function (value, silent) { var schema = this.schema; if (this.isSingleProperty) { return parseProperty(value, schema); } return parseProperties(styleParser.parse(value), schema, true, this.name, silent); }
[ "function", "(", "value", ",", "silent", ")", "{", "var", "schema", "=", "this", ".", "schema", ";", "if", "(", "this", ".", "isSingleProperty", ")", "{", "return", "parseProperty", "(", "value", ",", "schema", ")", ";", "}", "return", "parseProperties",...
Parses each property based on property type. If component is single-property, then parses the single property value. @param {string} value - HTML attribute value. @param {boolean} silent - Suppress warning messages. @returns {object} Component data.
[ "Parses", "each", "property", "based", "on", "property", "type", ".", "If", "component", "is", "single", "-", "property", "then", "parses", "the", "single", "property", "value", "." ]
24acc78a7299a4cdfe3ef617f4d40ddf6275c992
https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/core/component.js#L157-L161
train
Parse the value
[ 30522, 3853, 1006, 3643, 1010, 4333, 1007, 1063, 13075, 8040, 28433, 1027, 2023, 1012, 8040, 28433, 1025, 2065, 1006, 2023, 1012, 26354, 2075, 2571, 21572, 4842, 3723, 1007, 1063, 2709, 11968, 3366, 21572, 4842, 3723, 1006, 3643, 1010, 8040...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/QuickOpen.js
beginSearch
function beginSearch(prefix, initialString) { function createDialog() { _curDialog = new QuickNavigateDialog(); _curDialog.showDialog(prefix, initialString); } if (_curDialog) { if (_curDialog.isOpen) { // Just start a search using the existin...
javascript
function beginSearch(prefix, initialString) { function createDialog() { _curDialog = new QuickNavigateDialog(); _curDialog.showDialog(prefix, initialString); } if (_curDialog) { if (_curDialog.isOpen) { // Just start a search using the existin...
[ "function", "beginSearch", "(", "prefix", ",", "initialString", ")", "{", "function", "createDialog", "(", ")", "{", "_curDialog", "=", "new", "QuickNavigateDialog", "(", ")", ";", "_curDialog", ".", "showDialog", "(", "prefix", ",", "initialString", ")", ";",...
Opens the Quick Open bar prepopulated with the given prefix (to select a mode) and optionally with the given query text too. Updates text field contents if Quick Open already open. @param {?string} prefix @param {?string} initialString
[ "Opens", "the", "Quick", "Open", "bar", "prepopulated", "with", "the", "given", "prefix", "(", "to", "select", "a", "mode", ")", "and", "optionally", "with", "the", "given", "query", "text", "too", ".", "Updates", "text", "field", "contents", "if", "Quick"...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/search/QuickOpen.js#L739-L759
train
Begin a search using the specified prefix and initialString.
[ 30522, 3853, 4269, 14644, 2818, 1006, 17576, 1010, 20381, 18886, 3070, 1007, 1063, 3853, 2580, 4818, 8649, 1006, 1007, 1063, 1035, 12731, 25070, 8649, 1027, 2047, 4248, 2532, 5737, 11644, 4818, 8649, 1006, 1007, 1025, 1035, 12731, 25070, 86...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js
templateExtensionPoint
function templateExtensionPoint(oElement, oWithControl) { var sValue = oElement.getAttribute("name"), // resolve name, no matter if CustomizingConfiguration is present! oPromise = getResolvedBinding(sValue, oElement, oWithControl, true); if (!oPromise) { return oSyncPromiseResolvedTrue; } ...
javascript
function templateExtensionPoint(oElement, oWithControl) { var sValue = oElement.getAttribute("name"), // resolve name, no matter if CustomizingConfiguration is present! oPromise = getResolvedBinding(sValue, oElement, oWithControl, true); if (!oPromise) { return oSyncPromiseResolvedTrue; } ...
[ "function", "templateExtensionPoint", "(", "oElement", ",", "oWithControl", ")", "{", "var", "sValue", "=", "oElement", ".", "getAttribute", "(", "\"name\"", ")", ",", "// resolve name, no matter if CustomizingConfiguration is present!", "oPromise", "=", "getResolvedBinding...
Replaces a <sap.ui.core:ExtensionPoint> element with the content of an XML fragment configured as a replacement (via component metadata, "customizing" and "sap.ui.viewExtensions"), or leaves it untouched in case no such replacement is currently configured. @param {Element} oElement the <sap.ui.core:ExtensionPoint> XML...
[ "Replaces", "a", "<sap", ".", "ui", ".", "core", ":", "ExtensionPoint", ">", "element", "with", "the", "content", "of", "an", "XML", "fragment", "configured", "as", "a", "replacement", "(", "via", "component", "metadata", "customizing", "and", "sap", ".", ...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L1422-L1454
train
This function is called when the binding is resolved
[ 30522, 3853, 23561, 10288, 29048, 8400, 1006, 1051, 12260, 3672, 1010, 27593, 8939, 8663, 13181, 2140, 1007, 1063, 13075, 17917, 2389, 5657, 1027, 1051, 12260, 3672, 1012, 2131, 19321, 3089, 8569, 2618, 1006, 1000, 2171, 1000, 1007, 1010, 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...
KaTeX/KaTeX
dockers/texcmp/texcmp.js
execFile
function execFile(cmd, args, opts) { const deferred = Q.defer(); childProcess.execFile(cmd, args, opts, function(err, stdout, stderr) { if (err) { console.error("Error executing " + cmd + " " + args.join(" ")); console.error(stdout + stderr); err.stdout = stdout; ...
javascript
function execFile(cmd, args, opts) { const deferred = Q.defer(); childProcess.execFile(cmd, args, opts, function(err, stdout, stderr) { if (err) { console.error("Error executing " + cmd + " " + args.join(" ")); console.error(stdout + stderr); err.stdout = stdout; ...
[ "function", "execFile", "(", "cmd", ",", "args", ",", "opts", ")", "{", "const", "deferred", "=", "Q", ".", "defer", "(", ")", ";", "childProcess", ".", "execFile", "(", "cmd", ",", "args", ",", "opts", ",", "function", "(", "err", ",", "stdout", "...
Execute a given command, and return a promise to its output. Don't denodeify here, since fail branch needs access to stderr.
[ "Execute", "a", "given", "command", "and", "return", "a", "promise", "to", "its", "output", ".", "Don", "t", "denodeify", "here", "since", "fail", "branch", "needs", "access", "to", "stderr", "." ]
17bfb247b88070267f3e5c7b21fe4a360fdf49d9
https://github.com/KaTeX/KaTeX/blob/17bfb247b88070267f3e5c7b21fe4a360fdf49d9/dockers/texcmp/texcmp.js#L206-L220
train
Exec a command
[ 30522, 3853, 4654, 8586, 8873, 2571, 1006, 4642, 2094, 1010, 12098, 5620, 1010, 23569, 2015, 1007, 1063, 9530, 3367, 13366, 28849, 2094, 1027, 1053, 1012, 13366, 2121, 1006, 1007, 1025, 2775, 21572, 9623, 2015, 1012, 4654, 8586, 8873, 2571,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SheetJS/js-xlsx
bits/28_binstructs.js
parse_XLSBCell
function parse_XLSBCell(data)/*:any*/ { var col = data.read_shift(4); var iStyleRef = data.read_shift(2); iStyleRef += data.read_shift(1) <<16; data.l++; //var fPhShow = data.read_shift(1); return { c:col, iStyleRef: iStyleRef }; }
javascript
function parse_XLSBCell(data)/*:any*/ { var col = data.read_shift(4); var iStyleRef = data.read_shift(2); iStyleRef += data.read_shift(1) <<16; data.l++; //var fPhShow = data.read_shift(1); return { c:col, iStyleRef: iStyleRef }; }
[ "function", "parse_XLSBCell", "(", "data", ")", "/*:any*/", "{", "var", "col", "=", "data", ".", "read_shift", "(", "4", ")", ";", "var", "iStyleRef", "=", "data", ".", "read_shift", "(", "2", ")", ";", "iStyleRef", "+=", "data", ".", "read_shift", "("...
/* [MS-XLSB] 2.5.9
[ "/", "*", "[", "MS", "-", "XLSB", "]", "2", ".", "5", ".", "9" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/bits/28_binstructs.js#L70-L76
train
Parse an XLSBCell
[ 30522, 3853, 11968, 3366, 1035, 28712, 19022, 29109, 2140, 1006, 2951, 1007, 1013, 1008, 1024, 2151, 1008, 1013, 1063, 13075, 8902, 1027, 2951, 1012, 3191, 1035, 5670, 1006, 1018, 1007, 1025, 13075, 21541, 20853, 12879, 1027, 2951, 1012, 31...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.support/src/sap/ui/support/supportRules/ui/external/Highlighter.js
function (elementId) { var highlighter; var targetDomElement; var targetRect; if (_highLighter === null && !document.getElementById("ui5-highlighter")) { _createHighLighter(); } else { _showHighLighter(); } highlighter = _highLighter.firstElementChild; targetDomElement = docu...
javascript
function (elementId) { var highlighter; var targetDomElement; var targetRect; if (_highLighter === null && !document.getElementById("ui5-highlighter")) { _createHighLighter(); } else { _showHighLighter(); } highlighter = _highLighter.firstElementChild; targetDomElement = docu...
[ "function", "(", "elementId", ")", "{", "var", "highlighter", ";", "var", "targetDomElement", ";", "var", "targetRect", ";", "if", "(", "_highLighter", "===", "null", "&&", "!", "document", ".", "getElementById", "(", "\"ui5-highlighter\"", ")", ")", "{", "_...
Set the position of the visual highlighter. @param {string} elementId - The id of the DOM element that need to be highlighted @returns {exports}
[ "Set", "the", "position", "of", "the", "visual", "highlighter", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/external/Highlighter.js#L62-L86
train
Creates the highlighter element for the given elementId.
[ 30522, 3853, 1006, 5783, 3593, 1007, 1063, 13075, 12944, 2121, 1025, 13075, 4539, 26173, 16930, 4765, 1025, 13075, 4539, 2890, 6593, 1025, 2065, 1006, 1035, 12944, 2121, 1027, 1027, 1027, 19701, 1004, 1004, 999, 6254, 1012, 2131, 12260, 367...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/core/src/lifecycle/prop-types.js
parsePropType
function parsePropType(name, propDef) { switch (getTypeOf(propDef)) { case 'object': return normalizePropDefinition(name, propDef); case 'array': return normalizePropDefinition(name, {type: 'array', value: propDef, compare: false}); case 'boolean': return normalizePropDefinition(name, ...
javascript
function parsePropType(name, propDef) { switch (getTypeOf(propDef)) { case 'object': return normalizePropDefinition(name, propDef); case 'array': return normalizePropDefinition(name, {type: 'array', value: propDef, compare: false}); case 'boolean': return normalizePropDefinition(name, ...
[ "function", "parsePropType", "(", "name", ",", "propDef", ")", "{", "switch", "(", "getTypeOf", "(", "propDef", ")", ")", "{", "case", "'object'", ":", "return", "normalizePropDefinition", "(", "name", ",", "propDef", ")", ";", "case", "'array'", ":", "ret...
Parses one property definition entry. Either contains: * a valid prop type object ({type, ...}) * or just a default value, in which case type and name inference is used
[ "Parses", "one", "property", "definition", "entry", ".", "Either", "contains", ":", "*", "a", "valid", "prop", "type", "object", "(", "{", "type", "...", "}", ")", "*", "or", "just", "a", "default", "value", "in", "which", "case", "type", "and", "name"...
a2010448b7f268bbd03617b812334c68a6b9e5b2
https://github.com/uber/deck.gl/blob/a2010448b7f268bbd03617b812334c68a6b9e5b2/modules/core/src/lifecycle/prop-types.js#L98-L119
train
Parse the type of a property definition
[ 30522, 3853, 11968, 3366, 21572, 13876, 18863, 1006, 2171, 1010, 17678, 3207, 2546, 1007, 1063, 6942, 1006, 2131, 13874, 11253, 1006, 17678, 3207, 2546, 1007, 1007, 1063, 2553, 1005, 4874, 1005, 1024, 2709, 3671, 4697, 21572, 17299, 12879, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/max-lines-per-function.js
isFullLineComment
function isFullLineComment(line, lineNumber, comment) { const start = comment.loc.start, end = comment.loc.end, isFirstTokenOnLine = start.line === lineNumber && !line.slice(0, start.column).trim(), isLastTokenOnLine = end.line === lineNumber && !line.slice(en...
javascript
function isFullLineComment(line, lineNumber, comment) { const start = comment.loc.start, end = comment.loc.end, isFirstTokenOnLine = start.line === lineNumber && !line.slice(0, start.column).trim(), isLastTokenOnLine = end.line === lineNumber && !line.slice(en...
[ "function", "isFullLineComment", "(", "line", ",", "lineNumber", ",", "comment", ")", "{", "const", "start", "=", "comment", ".", "loc", ".", "start", ",", "end", "=", "comment", ".", "loc", ".", "end", ",", "isFirstTokenOnLine", "=", "start", ".", "line...
-------------------------------------------------------------------------- Helpers -------------------------------------------------------------------------- Tells if a comment encompasses the entire line. @param {string} line The source line with a trailing comment @param {number} lineNumber The one-indexed line numb...
[ "--------------------------------------------------------------------------", "Helpers", "--------------------------------------------------------------------------", "Tells", "if", "a", "comment", "encompasses", "the", "entire", "line", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/max-lines-per-function.js#L121-L130
train
Check if a comment is full line
[ 30522, 3853, 2003, 3993, 21202, 8586, 5358, 3672, 1006, 2240, 1010, 17517, 29440, 1010, 7615, 1007, 1063, 9530, 3367, 2707, 1027, 7615, 1012, 8840, 2278, 1012, 2707, 1010, 2203, 1027, 7615, 1012, 8840, 2278, 1012, 2203, 1010, 2003, 8873, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jquery/jquery
build/release/ensure-sizzle.js
ensureSizzle
function ensureSizzle( Release, callback ) { console.log(); console.log( "Checking Sizzle version..." ); getLatestSizzle( function( latest ) { var match = rversion.exec( fs.readFileSync( sizzleLoc, "utf8" ) ), version = match ? match[ 1 ] : "Not Found"; if ( version !== latest ) { // colors is inherited ...
javascript
function ensureSizzle( Release, callback ) { console.log(); console.log( "Checking Sizzle version..." ); getLatestSizzle( function( latest ) { var match = rversion.exec( fs.readFileSync( sizzleLoc, "utf8" ) ), version = match ? match[ 1 ] : "Not Found"; if ( version !== latest ) { // colors is inherited ...
[ "function", "ensureSizzle", "(", "Release", ",", "callback", ")", "{", "console", ".", "log", "(", ")", ";", "console", ".", "log", "(", "\"Checking Sizzle version...\"", ")", ";", "getLatestSizzle", "(", "function", "(", "latest", ")", "{", "var", "match", ...
Ensure the /src folder has the latest tag of Sizzle @param {Object} Release @param {Function} callback
[ "Ensure", "the", "/", "src", "folder", "has", "the", "latest", "tag", "of", "Sizzle" ]
ccbd6b93424cbdbf86f07a86c2e55cbab497d7a3
https://github.com/jquery/jquery/blob/ccbd6b93424cbdbf86f07a86c2e55cbab497d7a3/build/release/ensure-sizzle.js#L30-L50
train
Ensure Sizzle is the latest version of the release
[ 30522, 3853, 21312, 10993, 29247, 1006, 2713, 1010, 2655, 5963, 1007, 1063, 10122, 1012, 8833, 1006, 1007, 1025, 10122, 1012, 8833, 1006, 1000, 9361, 9033, 17644, 2544, 1012, 1012, 1012, 30524, 8873, 4244, 6038, 2278, 1006, 9033, 17644, 413...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aframevr/aframe
src/core/a-register-element.js
wrapANodeMethods
function wrapANodeMethods (obj) { var newObj = {}; var ANodeMethods = [ 'attachedCallback', 'attributeChangedCallback', 'createdCallback', 'detachedCallback' ]; wrapMethods(newObj, ANodeMethods, obj, ANode.prototype); copyProperties(obj, newObj); return newObj; }
javascript
function wrapANodeMethods (obj) { var newObj = {}; var ANodeMethods = [ 'attachedCallback', 'attributeChangedCallback', 'createdCallback', 'detachedCallback' ]; wrapMethods(newObj, ANodeMethods, obj, ANode.prototype); copyProperties(obj, newObj); return newObj; }
[ "function", "wrapANodeMethods", "(", "obj", ")", "{", "var", "newObj", "=", "{", "}", ";", "var", "ANodeMethods", "=", "[", "'attachedCallback'", ",", "'attributeChangedCallback'", ",", "'createdCallback'", ",", "'detachedCallback'", "]", ";", "wrapMethods", "(", ...
Wrap some obj methods to call those on `ANode` base prototype. @param {object} obj - Object that contains the methods that will be wrapped. @return {object} An object with the same properties as the input parameter but with some of methods wrapped.
[ "Wrap", "some", "obj", "methods", "to", "call", "those", "on", "ANode", "base", "prototype", "." ]
24acc78a7299a4cdfe3ef617f4d40ddf6275c992
https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/core/a-register-element.js#L79-L90
train
ANode. prototype. attachCallback attachAttributeChangedCallback attachCreatedCallback detachAttachedCallback
[ 30522, 3853, 10236, 6761, 3207, 11368, 6806, 5104, 1006, 27885, 3501, 1007, 1063, 13075, 2047, 16429, 3501, 1027, 1063, 1065, 1025, 13075, 2019, 10244, 11368, 6806, 5104, 1027, 1031, 1005, 4987, 9289, 20850, 8684, 1005, 1010, 1005, 17961, 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...
electron/electron
lib/sandboxed_renderer/init.js
preloadRequire
function preloadRequire (module) { if (loadedModules.has(module)) { return loadedModules.get(module) } throw new Error(`module not found: ${module}`) }
javascript
function preloadRequire (module) { if (loadedModules.has(module)) { return loadedModules.get(module) } throw new Error(`module not found: ${module}`) }
[ "function", "preloadRequire", "(", "module", ")", "{", "if", "(", "loadedModules", ".", "has", "(", "module", ")", ")", "{", "return", "loadedModules", ".", "get", "(", "module", ")", "}", "throw", "new", "Error", "(", "`", "${", "module", "}", "`", ...
This is the `require` function that will be visible to the preload script
[ "This", "is", "the", "require", "function", "that", "will", "be", "visible", "to", "the", "preload", "script" ]
6e29611788277729647acf465f10db1ea6f15788
https://github.com/electron/electron/blob/6e29611788277729647acf465f10db1ea6f15788/lib/sandboxed_renderer/init.js#L99-L104
train
Preload a module
[ 30522, 3853, 3653, 11066, 2890, 15549, 2890, 1006, 11336, 1007, 1063, 2065, 1006, 8209, 5302, 8566, 4244, 1012, 2038, 1006, 11336, 1007, 1007, 1063, 2709, 8209, 5302, 8566, 4244, 1012, 2131, 1006, 11336, 1007, 1065, 5466, 2047, 7561, 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...
cytoscape/cytoscape.js
dist/cytoscape.esm.js
headlessStep
function headlessStep() { if (!cy._private.animationsRunning) { return; } requestAnimationFrame(function animationStep(now$$1) { stepAll(now$$1, cy); headlessStep(); }); }
javascript
function headlessStep() { if (!cy._private.animationsRunning) { return; } requestAnimationFrame(function animationStep(now$$1) { stepAll(now$$1, cy); headlessStep(); }); }
[ "function", "headlessStep", "(", ")", "{", "if", "(", "!", "cy", ".", "_private", ".", "animationsRunning", ")", "{", "return", ";", "}", "requestAnimationFrame", "(", "function", "animationStep", "(", "now$$1", ")", "{", "stepAll", "(", "now$$1", ",", "cy...
save cycles when no style used NB the animation loop will exec in headless environments if style enabled and explicit cy.destroy() is necessary to stop the loop
[ "save", "cycles", "when", "no", "style", "used", "NB", "the", "animation", "loop", "will", "exec", "in", "headless", "environments", "if", "style", "enabled", "and", "explicit", "cy", ".", "destroy", "()", "is", "necessary", "to", "stop", "the", "loop" ]
ad2051b65e2243cfd953d8b24a8bf95bfa8559e5
https://github.com/cytoscape/cytoscape.js/blob/ad2051b65e2243cfd953d8b24a8bf95bfa8559e5/dist/cytoscape.esm.js#L13353-L13362
train
headlessStep - headless animation
[ 30522, 3853, 2132, 3238, 13473, 2361, 1006, 1007, 1063, 2065, 1006, 999, 22330, 1012, 1035, 2797, 1012, 7284, 21338, 4609, 5582, 1007, 1063, 2709, 1025, 1065, 5227, 7088, 28649, 15643, 1006, 3853, 7284, 13473, 2361, 1006, 2085, 1002, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
TryGhost/Ghost
core/server/apps/amp/lib/router.js
getPostData
function getPostData(req, res, next) { req.body = req.body || {}; const urlWithoutSubdirectoryWithoutAmp = res.locals.relativeUrl.match(/(.*?\/)amp\/?$/)[1]; /** * @NOTE * * We have to figure out the target permalink, otherwise it would be possible to serve a post * which lives in two ...
javascript
function getPostData(req, res, next) { req.body = req.body || {}; const urlWithoutSubdirectoryWithoutAmp = res.locals.relativeUrl.match(/(.*?\/)amp\/?$/)[1]; /** * @NOTE * * We have to figure out the target permalink, otherwise it would be possible to serve a post * which lives in two ...
[ "function", "getPostData", "(", "req", ",", "res", ",", "next", ")", "{", "req", ".", "body", "=", "req", ".", "body", "||", "{", "}", ";", "const", "urlWithoutSubdirectoryWithoutAmp", "=", "res", ".", "locals", ".", "relativeUrl", ".", "match", "(", "...
This here is a controller. In fact, this whole file is nothing more than a controller + renderer & doesn't need to be a router
[ "This", "here", "is", "a", "controller", ".", "In", "fact", "this", "whole", "file", "is", "nothing", "more", "than", "a", "controller", "+", "renderer", "&", "doesn", "t", "need", "to", "be", "a", "router" ]
bb7bb55cf3e60af99ebbc56099928827b58461bc
https://github.com/TryGhost/Ghost/blob/bb7bb55cf3e60af99ebbc56099928827b58461bc/core/server/apps/amp/lib/router.js#L33-L77
train
Get the post data from the post service
[ 30522, 3853, 2131, 19894, 2850, 2696, 1006, 2128, 4160, 1010, 24501, 1010, 2279, 1007, 1063, 2128, 4160, 1012, 2303, 1027, 2128, 4160, 1012, 2303, 1064, 1064, 1063, 1065, 1025, 9530, 3367, 24471, 2140, 24415, 12166, 12083, 4305, 2890, 16761...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-echarts
src/coord/View.js
function () { var roamTransformable = this._roamTransformable; var rawTransformable = this._rawTransformable; rawTransformable.parent = roamTransformable; roamTransformable.updateTransform(); rawTransformable.updateTransform(); matrix.copy(this.transform || (this.transf...
javascript
function () { var roamTransformable = this._roamTransformable; var rawTransformable = this._rawTransformable; rawTransformable.parent = roamTransformable; roamTransformable.updateTransform(); rawTransformable.updateTransform(); matrix.copy(this.transform || (this.transf...
[ "function", "(", ")", "{", "var", "roamTransformable", "=", "this", ".", "_roamTransformable", ";", "var", "rawTransformable", "=", "this", ".", "_rawTransformable", ";", "rawTransformable", ".", "parent", "=", "roamTransformable", ";", "roamTransformable", ".", "...
Update transform from roam and mapLocation @private
[ "Update", "transform", "from", "roam", "and", "mapLocation" ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/coord/View.js#L214-L230
train
update roamTransformable and rawTransformable
[ 30522, 3853, 1006, 1007, 1063, 13075, 25728, 6494, 3619, 14192, 3085, 1027, 2023, 1012, 1035, 25728, 6494, 3619, 14192, 3085, 1025, 13075, 6315, 6494, 3619, 14192, 3085, 1027, 2023, 1012, 1035, 6315, 6494, 3619, 14192, 3085, 1025, 6315, 649...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jiahaog/nativefier
src/build/buildMain.js
maybeNoIconOption
function maybeNoIconOption(options) { const packageOptions = JSON.parse(JSON.stringify(options)); if (options.platform === 'win32' && !isWindows()) { if (!hasBinary.sync('wine')) { log.warn( 'Wine is required to set the icon for a Windows app when packaging on non-windows platforms', ); ...
javascript
function maybeNoIconOption(options) { const packageOptions = JSON.parse(JSON.stringify(options)); if (options.platform === 'win32' && !isWindows()) { if (!hasBinary.sync('wine')) { log.warn( 'Wine is required to set the icon for a Windows app when packaging on non-windows platforms', ); ...
[ "function", "maybeNoIconOption", "(", "options", ")", "{", "const", "packageOptions", "=", "JSON", ".", "parse", "(", "JSON", ".", "stringify", "(", "options", ")", ")", ";", "if", "(", "options", ".", "platform", "===", "'win32'", "&&", "!", "isWindows", ...
Removes the `icon` parameter from options if building for Windows while not on Windows and Wine is not installed @param options
[ "Removes", "the", "icon", "parameter", "from", "options", "if", "building", "for", "Windows", "while", "not", "on", "Windows", "and", "Wine", "is", "not", "installed" ]
b959956a38ce51a9dd95d42308f0a6c66489b624
https://github.com/jiahaog/nativefier/blob/b959956a38ce51a9dd95d42308f0a6c66489b624/src/build/buildMain.js#L45-L56
train
If the platform is not Windows then we need to set the icon to null
[ 30522, 3853, 2672, 3630, 28524, 7361, 3508, 1006, 7047, 1007, 1063, 9530, 3367, 7427, 7361, 9285, 1027, 1046, 3385, 1012, 11968, 3366, 1006, 1046, 3385, 1012, 5164, 8757, 1006, 7047, 1007, 1007, 1025, 2065, 1006, 7047, 1012, 4132, 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...
adobe/brackets
src/LiveDevelopment/Agents/EditAgent.js
_onCharacterDataModified
function _onCharacterDataModified(event, res) { // res = {nodeId, characterData} if (_editedNode.nodeId !== res.nodeId) { return; } GotoAgent.open(DOMAgent.url); var editor = EditorManager.getCurrentFullEditor(); var codeMirror = editor._codeMirror; v...
javascript
function _onCharacterDataModified(event, res) { // res = {nodeId, characterData} if (_editedNode.nodeId !== res.nodeId) { return; } GotoAgent.open(DOMAgent.url); var editor = EditorManager.getCurrentFullEditor(); var codeMirror = editor._codeMirror; v...
[ "function", "_onCharacterDataModified", "(", "event", ",", "res", ")", "{", "// res = {nodeId, characterData}", "if", "(", "_editedNode", ".", "nodeId", "!==", "res", ".", "nodeId", ")", "{", "return", ";", "}", "GotoAgent", ".", "open", "(", "DOMAgent", ".", ...
WebInspector Event: DOM.characterDataModified
[ "WebInspector", "Event", ":", "DOM", ".", "characterDataModified" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/LiveDevelopment/Agents/EditAgent.js#L76-L96
train
onCharacterDataModified - On character data modification
[ 30522, 3853, 1035, 2006, 7507, 22648, 3334, 2850, 15464, 7716, 7810, 1006, 2724, 1010, 24501, 1007, 1063, 1013, 1013, 24501, 1027, 1063, 13045, 3593, 1010, 2839, 2850, 2696, 1065, 2065, 1006, 1035, 5493, 3630, 3207, 1012, 13045, 3593, 999, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/JSUtils/ScopeManager.js
getOffset
function getOffset(session, fileInfo, offset) { var newOffset; if (offset) { newOffset = {line: offset.line, ch: offset.ch}; } else { newOffset = session.getCursor(); } if (fileInfo.type === MessageIds.TERN_FILE_INFO_TYPE_PART) { newOffset.li...
javascript
function getOffset(session, fileInfo, offset) { var newOffset; if (offset) { newOffset = {line: offset.line, ch: offset.ch}; } else { newOffset = session.getCursor(); } if (fileInfo.type === MessageIds.TERN_FILE_INFO_TYPE_PART) { newOffset.li...
[ "function", "getOffset", "(", "session", ",", "fileInfo", ",", "offset", ")", "{", "var", "newOffset", ";", "if", "(", "offset", ")", "{", "newOffset", "=", "{", "line", ":", "offset", ".", "line", ",", "ch", ":", "offset", ".", "ch", "}", ";", "}"...
Get the current offset. The offset is adjusted for "part" updates. @param {!Session} session - the current session @param {{type: string, name: string, offsetLines: number, text: string}} fileInfo - type of update, name of file, and the text of the update. For "full" updates, the whole text of the file is present. For...
[ "Get", "the", "current", "offset", ".", "The", "offset", "is", "adjusted", "for", "part", "updates", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/JSUtils/ScopeManager.js#L636-L650
train
Get offset of file
[ 30522, 3853, 2131, 27475, 3388, 1006, 5219, 1010, 5371, 2378, 14876, 1010, 16396, 1007, 1063, 13075, 2047, 27475, 3388, 1025, 2065, 1006, 16396, 1007, 1063, 2047, 27475, 3388, 1027, 1063, 2240, 1024, 16396, 1012, 2240, 1010, 10381, 1024, 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...
graphql/graphql-js
src/utilities/schemaPrinter.js
isSchemaOfCommonNames
function isSchemaOfCommonNames(schema: GraphQLSchema): boolean { const queryType = schema.getQueryType(); if (queryType && queryType.name !== 'Query') { return false; } const mutationType = schema.getMutationType(); if (mutationType && mutationType.name !== 'Mutation') { return false; } const su...
javascript
function isSchemaOfCommonNames(schema: GraphQLSchema): boolean { const queryType = schema.getQueryType(); if (queryType && queryType.name !== 'Query') { return false; } const mutationType = schema.getMutationType(); if (mutationType && mutationType.name !== 'Mutation') { return false; } const su...
[ "function", "isSchemaOfCommonNames", "(", "schema", ":", "GraphQLSchema", ")", ":", "boolean", "{", "const", "queryType", "=", "schema", ".", "getQueryType", "(", ")", ";", "if", "(", "queryType", "&&", "queryType", ".", "name", "!==", "'Query'", ")", "{", ...
GraphQL schema define root types for each type of operation. These types are the same as any other type and can be named in any manner, however there is a common naming convention: schema { query: Query mutation: Mutation } When using this naming convention, the schema description can be omitted.
[ "GraphQL", "schema", "define", "root", "types", "for", "each", "type", "of", "operation", ".", "These", "types", "are", "the", "same", "as", "any", "other", "type", "and", "can", "be", "named", "in", "any", "manner", "however", "there", "is", "a", "commo...
b65ff6db8893c1c68f0f236c4b2d663e6c55f5ef
https://github.com/graphql/graphql-js/blob/b65ff6db8893c1c68f0f236c4b2d663e6c55f5ef/src/utilities/schemaPrinter.js#L144-L161
train
Returns true if the schema is of common names
[ 30522, 3853, 26354, 5403, 2863, 11253, 9006, 8202, 18442, 2015, 1006, 8040, 28433, 1024, 10629, 4160, 4877, 5403, 2863, 1007, 1024, 22017, 20898, 1063, 9530, 3367, 23032, 13874, 1027, 8040, 28433, 1012, 2131, 4226, 2854, 13874, 1006, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
lib/jsdoc/transform-apijson-for-sdk.js
function (description, since) { var result = description || ""; if (since) { result += '<br><br><i>Since: ' + since + '.</i>'; } result = this._preProcessLinksInTextBlock(result); return result; }
javascript
function (description, since) { var result = description || ""; if (since) { result += '<br><br><i>Since: ' + since + '.</i>'; } result = this._preProcessLinksInTextBlock(result); return result; }
[ "function", "(", "description", ",", "since", ")", "{", "var", "result", "=", "description", "||", "\"\"", ";", "if", "(", "since", ")", "{", "result", "+=", "'<br><br><i>Since: '", "+", "since", "+", "'.</i>'", ";", "}", "result", "=", "this", ".", "_...
Formats the description of control properties @param description - the description of the property @param since - the since version information of the property @returns string - the formatted description
[ "Formats", "the", "description", "of", "control", "properties" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/lib/jsdoc/transform-apijson-for-sdk.js#L1084-L1093
train
Returns a string with the description of the link
[ 30522, 3853, 1006, 6412, 1010, 2144, 1007, 1063, 13075, 2765, 1027, 6412, 1064, 1064, 1000, 1000, 1025, 2065, 1006, 2144, 1007, 1063, 2765, 1009, 1027, 1005, 1026, 7987, 1028, 1026, 7987, 1028, 1026, 1045, 1028, 2144, 1024, 1005, 1009, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/require-atomic-updates.js
resolveVariable
function resolveVariable(identifier) { if (!resolvedVariableCache.has(identifier)) { const surroundingScope = getScope(identifier); if (surroundingScope) { resolvedVariableCache.set(identifier, resolveVariableInScope(identifier, surroundingScope)); ...
javascript
function resolveVariable(identifier) { if (!resolvedVariableCache.has(identifier)) { const surroundingScope = getScope(identifier); if (surroundingScope) { resolvedVariableCache.set(identifier, resolveVariableInScope(identifier, surroundingScope)); ...
[ "function", "resolveVariable", "(", "identifier", ")", "{", "if", "(", "!", "resolvedVariableCache", ".", "has", "(", "identifier", ")", ")", "{", "const", "surroundingScope", "=", "getScope", "(", "identifier", ")", ";", "if", "(", "surroundingScope", ")", ...
Resolves an identifier to a variable @param {ASTNode} identifier An identifier node @returns {Variable|null} The escope Variable that uses this identifier
[ "Resolves", "an", "identifier", "to", "a", "variable" ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/require-atomic-updates.js#L75-L87
train
Resolves a variable in the scope of the given identifier.
[ 30522, 3853, 10663, 10755, 19210, 1006, 8909, 4765, 18095, 1007, 1063, 2065, 1006, 999, 10395, 10755, 19210, 3540, 5403, 1012, 2038, 1006, 8909, 4765, 18095, 1007, 1007, 1063, 9530, 3367, 11301, 16186, 1027, 4152, 16186, 1006, 8909, 4765, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/editor/CodeHintList.js
CodeHintList
function CodeHintList(editor, insertHintOnTab, maxResults) { /** * The list of hints to display * * @type {Array.<string|jQueryObject>} */ this.hints = []; /** * The selected position in the list; otherwise -1. * * @type {number} ...
javascript
function CodeHintList(editor, insertHintOnTab, maxResults) { /** * The list of hints to display * * @type {Array.<string|jQueryObject>} */ this.hints = []; /** * The selected position in the list; otherwise -1. * * @type {number} ...
[ "function", "CodeHintList", "(", "editor", ",", "insertHintOnTab", ",", "maxResults", ")", "{", "/**\n * The list of hints to display\n *\n * @type {Array.<string|jQueryObject>}\n */", "this", ".", "hints", "=", "[", "]", ";", "/**\n * The ...
Displays a popup list of hints for a given editor context. @constructor @param {Editor} editor @param {boolean} insertHintOnTab Whether pressing tab inserts the selected hint @param {number} maxResults Maximum hints displayed at once. Defaults to 50
[ "Displays", "a", "popup", "list", "of", "hints", "for", "a", "given", "editor", "context", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/editor/CodeHintList.js#L47-L124
train
A CodeHintList is a base class for the list of hints.
[ 30522, 3853, 30524, 4226, 2854, 16429, 20614, 1028, 1065, 1008, 1013, 2023, 1012, 20385, 1027, 1031, 1033, 1025, 1013, 1008, 1008, 1008, 1996, 3479, 2597, 1999, 1996, 2862, 1025, 4728, 1011, 1015, 1012, 1008, 1008, 1030, 2828, 1063, 2193, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/_AnnotationHelperExpression.js
function (oInterface, oPathValue) { var oParameter; oPathValue.asExpression = true; oParameter = Expression.expression(oInterface, oPathValue); return { result : "expression", value : "!" + Basics.resultToString(Expression.wrapExpression(oParameter), true), type : "Edm.Boolean" }; }
javascript
function (oInterface, oPathValue) { var oParameter; oPathValue.asExpression = true; oParameter = Expression.expression(oInterface, oPathValue); return { result : "expression", value : "!" + Basics.resultToString(Expression.wrapExpression(oParameter), true), type : "Edm.Boolean" }; }
[ "function", "(", "oInterface", ",", "oPathValue", ")", "{", "var", "oParameter", ";", "oPathValue", ".", "asExpression", "=", "true", ";", "oParameter", "=", "Expression", ".", "expression", "(", "oInterface", ",", "oPathValue", ")", ";", "return", "{", "res...
Handling of "14.5.1 Comparison and Logical Operators": <code>edm:Not</code>. @param {sap.ui.core.util.XMLPreprocessor.IContext|sap.ui.model.Context} oInterface the callback interface related to the current formatter call @param {object} oPathValue path and value information pointing to the parameter (see Expression ob...
[ "Handling", "of", "14", ".", "5", ".", "1", "Comparison", "and", "Logical", "Operators", ":", "<code", ">", "edm", ":", "Not<", "/", "code", ">", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_AnnotationHelperExpression.js#L547-L557
train
Returns an object with the type of the parameter
[ 30522, 3853, 1006, 1051, 18447, 2121, 12172, 1010, 6728, 8988, 10175, 5657, 1007, 1063, 13075, 6728, 5400, 22828, 1025, 6728, 8988, 10175, 5657, 1012, 2004, 10288, 20110, 3258, 1027, 2995, 1025, 6728, 5400, 22828, 1027, 3670, 1012, 3670, 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...
nhn/tui.editor
src/js/extensions/table/tableRangeHandler.js
_expandMergedRange
function _expandMergedRange(tableData, tableRange) { let rangeStr = ''; while (rangeStr !== JSON.stringify(tableRange)) { rangeStr = JSON.stringify(tableRange); _expandRowMergedRange(tableData, tableRange, 'start'); _expandRowMergedRange(tableData, tableRange, 'end'); util.range(tableRange.start....
javascript
function _expandMergedRange(tableData, tableRange) { let rangeStr = ''; while (rangeStr !== JSON.stringify(tableRange)) { rangeStr = JSON.stringify(tableRange); _expandRowMergedRange(tableData, tableRange, 'start'); _expandRowMergedRange(tableData, tableRange, 'end'); util.range(tableRange.start....
[ "function", "_expandMergedRange", "(", "tableData", ",", "tableRange", ")", "{", "let", "rangeStr", "=", "''", ";", "while", "(", "rangeStr", "!==", "JSON", ".", "stringify", "(", "tableRange", ")", ")", "{", "rangeStr", "=", "JSON", ".", "stringify", "(",...
Expand table range by merge properties like colspan, rowspan. @param {Array.<Array.<object>>} tableData - table data @param {{ start: {rowIndex: number, colIndex: number}, end: {rowIndex: number, colIndex: number} }} tableRange - table range @returns {{ start: {rowIndex: number, colIndex: number}, end: {rowIndex: numbe...
[ "Expand", "table", "range", "by", "merge", "properties", "like", "colspan", "rowspan", "." ]
e75ab08c2a7ab07d1143e318f7cde135c5e3002e
https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/extensions/table/tableRangeHandler.js#L135-L151
train
Expand the table range into a table range that is merged with the previous table range
[ 30522, 3853, 1035, 7818, 5017, 5999, 24388, 2063, 1006, 2795, 2850, 2696, 1010, 2795, 24388, 2063, 1007, 1063, 2292, 8483, 16344, 1027, 1005, 1005, 1025, 2096, 1006, 8483, 16344, 999, 1027, 1027, 1046, 3385, 1012, 5164, 8757, 1006, 2795, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
swimlane/ngx-datatable
release/utils/column.js
columnsByPin
function columnsByPin(cols) { var ret = { left: [], center: [], right: [] }; if (cols) { for (var _i = 0, cols_1 = cols; _i < cols_1.length; _i++) { var col = cols_1[_i]; if (col.frozenLeft) { ret.left.push(col); } ...
javascript
function columnsByPin(cols) { var ret = { left: [], center: [], right: [] }; if (cols) { for (var _i = 0, cols_1 = cols; _i < cols_1.length; _i++) { var col = cols_1[_i]; if (col.frozenLeft) { ret.left.push(col); } ...
[ "function", "columnsByPin", "(", "cols", ")", "{", "var", "ret", "=", "{", "left", ":", "[", "]", ",", "center", ":", "[", "]", ",", "right", ":", "[", "]", "}", ";", "if", "(", "cols", ")", "{", "for", "(", "var", "_i", "=", "0", ",", "col...
Returns the columns by pin.
[ "Returns", "the", "columns", "by", "pin", "." ]
d7df15a070282a169524dba51d9572008b74804c
https://github.com/swimlane/ngx-datatable/blob/d7df15a070282a169524dba51d9572008b74804c/release/utils/column.js#L6-L27
train
returns a list of columns by pin
[ 30522, 3853, 7753, 3762, 8091, 1006, 8902, 2015, 1007, 1063, 13075, 2128, 2102, 1027, 1063, 2187, 1024, 1031, 1033, 1010, 2415, 1024, 1031, 1033, 1010, 2157, 1024, 1031, 1033, 1065, 1025, 2065, 1006, 8902, 2015, 1007, 1063, 2005, 1006, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jgraph/mxgraph
javascript/mxClient.js
function(node, includeAncestors, includeDocument) { includeAncestors = (includeAncestors != null) ? includeAncestors : false; includeDocument = (includeDocument != null) ? includeDocument : true; var doc = (node != null) ? node.ownerDocument : document; var b = doc.body; var d = doc.documentElement; var...
javascript
function(node, includeAncestors, includeDocument) { includeAncestors = (includeAncestors != null) ? includeAncestors : false; includeDocument = (includeDocument != null) ? includeDocument : true; var doc = (node != null) ? node.ownerDocument : document; var b = doc.body; var d = doc.documentElement; var...
[ "function", "(", "node", ",", "includeAncestors", ",", "includeDocument", ")", "{", "includeAncestors", "=", "(", "includeAncestors", "!=", "null", ")", "?", "includeAncestors", ":", "false", ";", "includeDocument", "=", "(", "includeDocument", "!=", "null", ")"...
Function: getScrollOrigin Returns the top, left corner of the viewrect as an <mxPoint>. Parameters: node - DOM node whose scroll origin should be returned. includeAncestors - Whether the scroll origin of the ancestors should be included. Default is false. includeDocument - Whether the scroll origin of the document s...
[ "Function", ":", "getScrollOrigin" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L4831-L4869
train
Returns the position of the node in the document.
[ 30522, 3853, 1006, 13045, 1010, 2421, 26755, 6591, 1010, 2443, 10085, 27417, 2102, 1007, 1063, 2421, 26755, 6591, 1027, 1006, 2421, 26755, 6591, 999, 1027, 19701, 1007, 1029, 2421, 26755, 6591, 1024, 6270, 1025, 2443, 10085, 27417, 2102, 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...
eslint/eslint
tools/internal-rules/no-invalid-meta.js
checkMetaValidity
function checkMetaValidity(context, exportsNode) { const metaProperty = getMetaPropertyFromExportsNode(exportsNode); if (!metaProperty) { context.report({ node: exportsNode, messageId: "missingMeta" }); return; } if (!hasMetaDocs(metaProperty)) { context.report({ node: metaProp...
javascript
function checkMetaValidity(context, exportsNode) { const metaProperty = getMetaPropertyFromExportsNode(exportsNode); if (!metaProperty) { context.report({ node: exportsNode, messageId: "missingMeta" }); return; } if (!hasMetaDocs(metaProperty)) { context.report({ node: metaProp...
[ "function", "checkMetaValidity", "(", "context", ",", "exportsNode", ")", "{", "const", "metaProperty", "=", "getMetaPropertyFromExportsNode", "(", "exportsNode", ")", ";", "if", "(", "!", "metaProperty", ")", "{", "context", ".", "report", "(", "{", "node", "...
Checks the validity of the meta definition of this rule and reports any errors found. @param {RuleContext} context The ESLint rule context. @param {ASTNode} exportsNode ObjectExpression node that the rule exports. @param {boolean} ruleIsFixable whether the rule is fixable or not. @returns {void}
[ "Checks", "the", "validity", "of", "the", "meta", "definition", "of", "this", "rule", "and", "reports", "any", "errors", "found", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/tools/internal-rules/no-invalid-meta.js#L110-L141
train
Checks if the meta property is valid
[ 30522, 3853, 4638, 11368, 12462, 21273, 3012, 1006, 6123, 1010, 14338, 3630, 3207, 1007, 1063, 9530, 3367, 18804, 21572, 4842, 3723, 1027, 2131, 11368, 9331, 18981, 15010, 19699, 8462, 2595, 25378, 3630, 3207, 1006, 14338, 3630, 3207, 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...
thomaspark/bootswatch
docs/3/bower_components/html5shiv/dist/html5shiv-printshiv.js
createElement
function createElement(nodeName, ownerDocument, data){ if (!ownerDocument) { ownerDocument = document; } if(supportsUnknownElements){ return ownerDocument.createElement(nodeName); } if (!data) { data = getExpandoData(ownerDocument); } var node; if (data.cache[nod...
javascript
function createElement(nodeName, ownerDocument, data){ if (!ownerDocument) { ownerDocument = document; } if(supportsUnknownElements){ return ownerDocument.createElement(nodeName); } if (!data) { data = getExpandoData(ownerDocument); } var node; if (data.cache[nod...
[ "function", "createElement", "(", "nodeName", ",", "ownerDocument", ",", "data", ")", "{", "if", "(", "!", "ownerDocument", ")", "{", "ownerDocument", "=", "document", ";", "}", "if", "(", "supportsUnknownElements", ")", "{", "return", "ownerDocument", ".", ...
returns a shived element for the given nodeName and document @memberOf html5 @param {String} nodeName name of the element @param {Document} ownerDocument The context document. @returns {Object} The shived element.
[ "returns", "a", "shived", "element", "for", "the", "given", "nodeName", "and", "document" ]
a913e4992dad8f7bf38df2e1d3f4cc6bfe5f26dd
https://github.com/thomaspark/bootswatch/blob/a913e4992dad8f7bf38df2e1d3f4cc6bfe5f26dd/docs/3/bower_components/html5shiv/dist/html5shiv-printshiv.js#L127-L155
train
Creates a new element
[ 30522, 3853, 3443, 12260, 3672, 1006, 13045, 18442, 1010, 3954, 3527, 24894, 4765, 1010, 2951, 1007, 1063, 2065, 1006, 999, 3954, 3527, 24894, 4765, 1007, 1063, 3954, 3527, 24894, 4765, 1027, 6254, 1025, 1065, 2065, 1006, 6753, 16814, 19779...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.commons/src/sap/ui/commons/RoadMapStep.js
function(oThis, sName, oValue, fDomAdaptationCallback){ if (!oThis.getDomRef()) { oThis.setProperty(sName, oValue); return; } var bSkipUpdate = fDomAdaptationCallback.apply(oThis, []); if (!bSkipUpdate) { oThis.setProperty(sName, oValue, true); } }
javascript
function(oThis, sName, oValue, fDomAdaptationCallback){ if (!oThis.getDomRef()) { oThis.setProperty(sName, oValue); return; } var bSkipUpdate = fDomAdaptationCallback.apply(oThis, []); if (!bSkipUpdate) { oThis.setProperty(sName, oValue, true); } }
[ "function", "(", "oThis", ",", "sName", ",", "oValue", ",", "fDomAdaptationCallback", ")", "{", "if", "(", "!", "oThis", ".", "getDomRef", "(", ")", ")", "{", "oThis", ".", "setProperty", "(", "sName", ",", "oValue", ")", ";", "return", ";", "}", "va...
Helper function to set a property without rerendering (see overridden setter functions)
[ "Helper", "function", "to", "set", "a", "property", "without", "rerendering", "(", "see", "overridden", "setter", "functions", ")" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/RoadMapStep.js#L245-L254
train
Sets the property of the given control.
[ 30522, 3853, 1006, 27178, 24158, 1010, 1055, 18442, 1010, 9242, 5657, 1010, 1042, 9527, 8447, 22799, 3508, 9289, 20850, 8684, 1007, 1063, 2065, 1006, 999, 27178, 24158, 1012, 2131, 9527, 2890, 2546, 1006, 1007, 1007, 1063, 27178, 24158, 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...
SeleniumHQ/selenium
javascript/selenium-core/lib/prototype.js
function(mode, element) { if (!mode) return 0; if (mode == 'vertical') return ((this.offset[1] + element.offsetHeight) - this.ycomp) / element.offsetHeight; if (mode == 'horizontal') return ((this.offset[0] + element.offsetWidth) - this.xcomp) / element.offsetWidth; }
javascript
function(mode, element) { if (!mode) return 0; if (mode == 'vertical') return ((this.offset[1] + element.offsetHeight) - this.ycomp) / element.offsetHeight; if (mode == 'horizontal') return ((this.offset[0] + element.offsetWidth) - this.xcomp) / element.offsetWidth; }
[ "function", "(", "mode", ",", "element", ")", "{", "if", "(", "!", "mode", ")", "return", "0", ";", "if", "(", "mode", "==", "'vertical'", ")", "return", "(", "(", "this", ".", "offset", "[", "1", "]", "+", "element", ".", "offsetHeight", ")", "-...
within must be called directly before
[ "within", "must", "be", "called", "directly", "before" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/lib/prototype.js#L1868-L1876
train
Returns the distance in the specified element
[ 30522, 3853, 1006, 5549, 1010, 5783, 1007, 1063, 2065, 1006, 999, 5549, 1007, 2709, 1014, 1025, 2065, 1006, 5549, 1027, 1027, 1005, 7471, 1005, 1007, 2709, 1006, 1006, 2023, 1012, 16396, 1031, 1015, 1033, 1009, 5783, 1012, 16396, 26036, 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...
GeekyAnts/vue-native-core
packages/vue-server-renderer/build.js
RenderContext
function RenderContext (options) { this.userContext = options.userContext; this.activeInstance = options.activeInstance; this.renderStates = []; this.write = options.write; this.done = options.done; this.renderNode = options.renderNode; this.isUnaryTag = options.isUnaryTag; this.modules = options.modu...
javascript
function RenderContext (options) { this.userContext = options.userContext; this.activeInstance = options.activeInstance; this.renderStates = []; this.write = options.write; this.done = options.done; this.renderNode = options.renderNode; this.isUnaryTag = options.isUnaryTag; this.modules = options.modu...
[ "function", "RenderContext", "(", "options", ")", "{", "this", ".", "userContext", "=", "options", ".", "userContext", ";", "this", ".", "activeInstance", "=", "options", ".", "activeInstance", ";", "this", ".", "renderStates", "=", "[", "]", ";", "this", ...
/*
[ "/", "*" ]
a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e
https://github.com/GeekyAnts/vue-native-core/blob/a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e/packages/vue-server-renderer/build.js#L2109-L2131
train
The RenderContext class
[ 30522, 3853, 17552, 8663, 18209, 1006, 7047, 1007, 1063, 2023, 1012, 5310, 8663, 18209, 1027, 7047, 1012, 5310, 8663, 18209, 1025, 2023, 1012, 3161, 7076, 26897, 1027, 7047, 1012, 3161, 7076, 26897, 1025, 2023, 1012, 17552, 9153, 4570, 1027...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sServiceRootURI) { var sResourcePath = null; if (!this._bUseMasterData && this._oParameterizationRequest) { sResourcePath = this._oParameterizationRequest.getURIToParameterizationEntry(sServiceRootURI) + "/" + this._oDimension.getContainingQueryResult().getParameterization().getNavigationProper...
javascript
function(sServiceRootURI) { var sResourcePath = null; if (!this._bUseMasterData && this._oParameterizationRequest) { sResourcePath = this._oParameterizationRequest.getURIToParameterizationEntry(sServiceRootURI) + "/" + this._oDimension.getContainingQueryResult().getParameterization().getNavigationProper...
[ "function", "(", "sServiceRootURI", ")", "{", "var", "sResourcePath", "=", "null", ";", "if", "(", "!", "this", ".", "_bUseMasterData", "&&", "this", ".", "_oParameterizationRequest", ")", "{", "sResourcePath", "=", "this", ".", "_oParameterizationRequest", ".",...
Get the URI to locate the entity set for the dimension memebers. @param {String} sServiceRootURI (optional) Identifies the root of the OData service @returns {String} The resource path of the URI pointing to the entity set. It is a relative URI unless a service root is given, which would then prefixed in order to retu...
[ "Get", "the", "URI", "to", "locate", "the", "entity", "set", "for", "the", "dimension", "memebers", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L5536-L5545
train
Returns the resource path for the entity set
[ 30522, 3853, 1006, 7020, 2121, 7903, 10624, 4140, 9496, 1007, 1063, 13075, 5034, 2229, 8162, 3401, 15069, 1027, 19701, 1025, 2065, 1006, 999, 2023, 1012, 1035, 3902, 14545, 6238, 2850, 2696, 1004, 1004, 2023, 1012, 1035, 6728, 5400, 22828, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/widgets.js
clickTreeCell
function clickTreeCell(controller, tree, rowIndex, columnIndex, eventDetails) { tree = tree.getNode(); var selection = tree.view.selection; selection.select(rowIndex); tree.treeBoxObject.ensureRowIsVisible(rowIndex); // get cell coordinates var x = {}, y = {}, width = {}, height = {}; var column = tree....
javascript
function clickTreeCell(controller, tree, rowIndex, columnIndex, eventDetails) { tree = tree.getNode(); var selection = tree.view.selection; selection.select(rowIndex); tree.treeBoxObject.ensureRowIsVisible(rowIndex); // get cell coordinates var x = {}, y = {}, width = {}, height = {}; var column = tree....
[ "function", "clickTreeCell", "(", "controller", ",", "tree", ",", "rowIndex", ",", "columnIndex", ",", "eventDetails", ")", "{", "tree", "=", "tree", ".", "getNode", "(", ")", ";", "var", "selection", "=", "tree", ".", "view", ".", "selection", ";", "sel...
Click the specified tree cell @param {MozMillController} controller MozMillController of the browser window to operate on @param {tree} tree Tree to operate on @param {number } rowIndex Index of the row @param {number} columnIndex Index of the column @param {object} eventDetails Details about the mouse event
[ "Click", "the", "specified", "tree", "cell" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/widgets.js#L61-L79
train
clicks a cell in a tree
[ 30522, 3853, 11562, 13334, 29109, 2140, 1006, 11486, 1010, 3392, 1010, 5216, 22254, 10288, 1010, 5930, 22254, 10288, 1010, 2724, 3207, 22081, 1007, 1063, 3392, 1027, 3392, 1012, 2131, 3630, 3207, 1006, 1007, 1025, 13075, 4989, 1027, 3392, 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...
TryGhost/Ghost
core/server/models/post.js
add
function add(data, unfilteredOptions) { let options = this.filterOptions(unfilteredOptions, 'add', {extraAllowedProperties: ['id']}); const addPost = (() => { return ghostBookshelf.Model.add.call(this, data, options) .then((post) => { return this.findOne(...
javascript
function add(data, unfilteredOptions) { let options = this.filterOptions(unfilteredOptions, 'add', {extraAllowedProperties: ['id']}); const addPost = (() => { return ghostBookshelf.Model.add.call(this, data, options) .then((post) => { return this.findOne(...
[ "function", "add", "(", "data", ",", "unfilteredOptions", ")", "{", "let", "options", "=", "this", ".", "filterOptions", "(", "unfilteredOptions", ",", "'add'", ",", "{", "extraAllowedProperties", ":", "[", "'id'", "]", "}", ")", ";", "const", "addPost", "...
### Add @extends ghostBookshelf.Model.add to handle returning the full object **See:** [ghostBookshelf.Model.add](base.js.html#add)
[ "###", "Add" ]
bb7bb55cf3e60af99ebbc56099928827b58461bc
https://github.com/TryGhost/Ghost/blob/bb7bb55cf3e60af99ebbc56099928827b58461bc/core/server/models/post.js#L820-L842
train
Add a new post
[ 30522, 3853, 5587, 1006, 2951, 1010, 4895, 8873, 21928, 26010, 16790, 2015, 1007, 1063, 2292, 7047, 1027, 2023, 1012, 11307, 7361, 9285, 1006, 4895, 8873, 21928, 26010, 16790, 2015, 1010, 1005, 5587, 1005, 1010, 1063, 4469, 8095, 15096, 215...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
showdownjs/showdown
dist/showdown.js
substitutePreCodeTags
function substitutePreCodeTags (doc) { var pres = doc.querySelectorAll('pre'), presPH = []; for (var i = 0; i < pres.length; ++i) { if (pres[i].childElementCount === 1 && pres[i].firstChild.tagName.toLowerCase() === 'code') { var content = pres[i].firstChild.innerHTML.trim(), ...
javascript
function substitutePreCodeTags (doc) { var pres = doc.querySelectorAll('pre'), presPH = []; for (var i = 0; i < pres.length; ++i) { if (pres[i].childElementCount === 1 && pres[i].firstChild.tagName.toLowerCase() === 'code') { var content = pres[i].firstChild.innerHTML.trim(), ...
[ "function", "substitutePreCodeTags", "(", "doc", ")", "{", "var", "pres", "=", "doc", ".", "querySelectorAll", "(", "'pre'", ")", ",", "presPH", "=", "[", "]", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "pres", ".", "length", ";", "++", ...
find all pre tags and replace contents with placeholder we need this so that we can remove all indentation from html to ease up parsing
[ "find", "all", "pre", "tags", "and", "replace", "contents", "with", "placeholder", "we", "need", "this", "so", "that", "we", "can", "remove", "all", "indentation", "from", "html", "to", "ease", "up", "parsing" ]
33bba54535d6fcdde5c82d2ec4d7a3bd951b5bb9
https://github.com/showdownjs/showdown/blob/33bba54535d6fcdde5c82d2ec4d7a3bd951b5bb9/dist/showdown.js#L5249-L5284
train
substitute pre code tags
[ 30522, 3853, 7681, 28139, 16044, 15900, 2015, 1006, 9986, 1007, 1063, 13075, 3653, 2015, 1027, 9986, 1012, 23032, 11246, 22471, 6525, 3363, 1006, 1005, 3653, 1005, 1007, 1010, 3653, 13102, 2232, 1027, 1031, 1033, 1025, 2005, 1006, 13075, 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...
fengyuanchen/cropper
dist/cropper.common.js
forEach
function forEach(data, callback) { if (data && isFunction(callback)) { if (Array.isArray(data) || isNumber(data.length) /* array-like */) { var length = data.length; var i = void 0; for (i = 0; i < length; i += 1) { if (callback.call(data, data[i], i, data) === false) { ...
javascript
function forEach(data, callback) { if (data && isFunction(callback)) { if (Array.isArray(data) || isNumber(data.length) /* array-like */) { var length = data.length; var i = void 0; for (i = 0; i < length; i += 1) { if (callback.call(data, data[i], i, data) === false) { ...
[ "function", "forEach", "(", "data", ",", "callback", ")", "{", "if", "(", "data", "&&", "isFunction", "(", "callback", ")", ")", "{", "if", "(", "Array", ".", "isArray", "(", "data", ")", "||", "isNumber", "(", "data", ".", "length", ")", "/* array-l...
Iterate the given data. @param {*} data - The data to iterate. @param {Function} callback - The process function for each element. @returns {*} The original data.
[ "Iterate", "the", "given", "data", "." ]
6677332a6a375b647f58808dfc24ea09f5804041
https://github.com/fengyuanchen/cropper/blob/6677332a6a375b647f58808dfc24ea09f5804041/dist/cropper.common.js#L283-L303
train
Iterate over the data object
[ 30522, 3853, 18921, 6776, 1006, 2951, 1010, 2655, 5963, 1007, 1063, 2065, 1006, 2951, 1004, 1004, 2003, 11263, 27989, 1006, 2655, 5963, 1007, 1007, 1063, 2065, 1006, 9140, 1012, 18061, 11335, 2100, 1006, 2951, 1007, 1064, 1064, 3475, 29440,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-this-before-super.js
isConstructorFunction
function isConstructorFunction(node) { return ( node.type === "FunctionExpression" && node.parent.type === "MethodDefinition" && node.parent.kind === "constructor" ); }
javascript
function isConstructorFunction(node) { return ( node.type === "FunctionExpression" && node.parent.type === "MethodDefinition" && node.parent.kind === "constructor" ); }
[ "function", "isConstructorFunction", "(", "node", ")", "{", "return", "(", "node", ".", "type", "===", "\"FunctionExpression\"", "&&", "node", ".", "parent", ".", "type", "===", "\"MethodDefinition\"", "&&", "node", ".", "parent", ".", "kind", "===", "\"constr...
------------------------------------------------------------------------------ Helpers ------------------------------------------------------------------------------ Checks whether or not a given node is a constructor. @param {ASTNode} node - A node to check. This node type is one of `Program`, `FunctionDeclaration`, ...
[ "------------------------------------------------------------------------------", "Helpers", "------------------------------------------------------------------------------", "Checks", "whether", "or", "not", "a", "given", "node", "is", "a", "constructor", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-this-before-super.js#L25-L31
train
Returns true if the node is a constructor function
[ 30522, 3853, 2003, 8663, 3367, 6820, 16761, 11263, 27989, 1006, 13045, 1007, 1063, 2709, 1006, 13045, 1012, 2828, 1027, 1027, 1027, 1000, 3853, 10288, 20110, 3258, 1000, 1004, 1004, 13045, 1012, 6687, 1012, 2828, 1027, 1027, 1027, 1000, 411...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
mxArrow
function mxArrow(points, fill, stroke, strokewidth, arrowWidth, spacing, endSize) { mxShape.call(this); this.points = points; this.fill = fill; this.stroke = stroke; this.strokewidth = (strokewidth != null) ? strokewidth : 1; this.arrowWidth = (arrowWidth != null) ? arrowWidth : mxConstants.ARROW_WIDTH; this.spa...
javascript
function mxArrow(points, fill, stroke, strokewidth, arrowWidth, spacing, endSize) { mxShape.call(this); this.points = points; this.fill = fill; this.stroke = stroke; this.strokewidth = (strokewidth != null) ? strokewidth : 1; this.arrowWidth = (arrowWidth != null) ? arrowWidth : mxConstants.ARROW_WIDTH; this.spa...
[ "function", "mxArrow", "(", "points", ",", "fill", ",", "stroke", ",", "strokewidth", ",", "arrowWidth", ",", "spacing", ",", "endSize", ")", "{", "mxShape", ".", "call", "(", "this", ")", ";", "this", ".", "points", "=", "points", ";", "this", ".", ...
Copyright (c) 2006-2015, JGraph Ltd Copyright (c) 2006-2015, Gaudenz Alder Class: mxArrow Extends <mxShape> to implement an arrow shape. (The shape is used to represent edges, not vertices.) This shape is registered under <mxConstants.SHAPE_ARROW> in <mxCellRenderer>. Constructor: mxArrow Constructs a new arrow sh...
[ "Copyright", "(", "c", ")", "2006", "-", "2015", "JGraph", "Ltd", "Copyright", "(", "c", ")", "2006", "-", "2015", "Gaudenz", "Alder", "Class", ":", "mxArrow" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L25470-L25480
train
A wrapper around mxShape to create an arrow
[ 30522, 3853, 25630, 2906, 10524, 1006, 2685, 1010, 6039, 1010, 6909, 1010, 6909, 9148, 11927, 2232, 1010, 8612, 9148, 11927, 2232, 1010, 12403, 6129, 1010, 4515, 4697, 1007, 1063, 25630, 7377, 5051, 1012, 2655, 1006, 2023, 1007, 1025, 2023,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js
visitAttributes
function visitAttributes(oElement, oWithControl) { /* * Comparator for DOM attributes by name. * * @param {Attr} oAttributeA * @param {Attr} oAttributeB * @returns {number} <0, 0, >0 */ function comparator(oAttributeA, oAttributeB) { return oAttributeA.name.localeCompare(oAttr...
javascript
function visitAttributes(oElement, oWithControl) { /* * Comparator for DOM attributes by name. * * @param {Attr} oAttributeA * @param {Attr} oAttributeB * @returns {number} <0, 0, >0 */ function comparator(oAttributeA, oAttributeB) { return oAttributeA.name.localeCompare(oAttr...
[ "function", "visitAttributes", "(", "oElement", ",", "oWithControl", ")", "{", "/*\n\t\t\t\t * Comparator for DOM attributes by name.\n\t\t\t\t *\n\t\t\t\t * @param {Attr} oAttributeA\n\t\t\t\t * @param {Attr} oAttributeB\n\t\t\t\t * @returns {number} <0, 0, >0\n\t\t\t\t */", "function", "compar...
Visits all attributes of the given element. If an attribute value represents a binding expression that can be resolved, it is replaced with the resulting value. @param {Element} oElement the XML DOM element @param {sap.ui.core.template._with} oWithControl the "with" control @returns {sap.ui.base.SyncPromise} A sync pr...
[ "Visits", "all", "attributes", "of", "the", "given", "element", ".", "If", "an", "attribute", "value", "represents", "a", "binding", "expression", "that", "can", "be", "resolved", "it", "is", "replaced", "with", "the", "resulting", "value", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L1749-L1768
train
Visit all attributes of an element
[ 30522, 3853, 3942, 19321, 3089, 8569, 4570, 1006, 1051, 12260, 3672, 1010, 27593, 8939, 8663, 13181, 2140, 1007, 1063, 1013, 1008, 1008, 4012, 28689, 4263, 2005, 14383, 12332, 2011, 2171, 1012, 1008, 1008, 1030, 11498, 2213, 1063, 2012, 163...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/JSUtils/node/TernNodeDomain.js
getScopeData
function getScopeData(fileInfo, offset) { // Create a new tern Server // Existing tern server resolves all the required modules which might take time // We only need to analyze single file for getting the scope ternOptions.plugins = {}; var ternServer = new Tern.Server(ternOptions); ternServer.a...
javascript
function getScopeData(fileInfo, offset) { // Create a new tern Server // Existing tern server resolves all the required modules which might take time // We only need to analyze single file for getting the scope ternOptions.plugins = {}; var ternServer = new Tern.Server(ternOptions); ternServer.a...
[ "function", "getScopeData", "(", "fileInfo", ",", "offset", ")", "{", "// Create a new tern Server", "// Existing tern server resolves all the required modules which might take time", "// We only need to analyze single file for getting the scope", "ternOptions", ".", "plugins", "=", "{...
Get scope at the offset in the file @param {{type: string, name: string, offsetLines: number, text: string}} fileInfo - type of update, name of file, and the text of the update. For "full" updates, the whole text of the file is present. For "part" updates, the changed portion of the text. For "empty" updates, the file ...
[ "Get", "scope", "at", "the", "offset", "in", "the", "file" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/JSUtils/node/TernNodeDomain.js#L289-L354
train
Get scope data for a file
[ 30522, 3853, 4152, 16186, 2850, 2696, 1006, 5371, 2378, 14876, 1010, 16396, 1007, 1063, 1013, 1013, 3443, 1037, 2047, 28774, 2078, 8241, 1013, 1013, 4493, 28774, 2078, 8241, 10663, 2015, 2035, 1996, 3223, 14184, 2029, 2453, 2202, 2051, 1013...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dcloudio/mui
examples/hello-mui/js/mui.imageViewer.js
function(target) { var self = this; if (target.tagName !== 'IMG') return false; return self.images.some(function(image) { return image == target; }); }
javascript
function(target) { var self = this; if (target.tagName !== 'IMG') return false; return self.images.some(function(image) { return image == target; }); }
[ "function", "(", "target", ")", "{", "var", "self", "=", "this", ";", "if", "(", "target", ".", "tagName", "!==", "'IMG'", ")", "return", "false", ";", "return", "self", ".", "images", ".", "some", "(", "function", "(", "image", ")", "{", "return", ...
检查图片是否为启动预览的图片
[ "检查图片是否为启动预览的图片" ]
ff74c90a1671a552f3604b1288bf38a4126312d0
https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/hello-mui/js/mui.imageViewer.js#L70-L76
train
Returns true if the specified target is an image
[ 30522, 3853, 1006, 4539, 1007, 1063, 13075, 2969, 1027, 2023, 1025, 2065, 1006, 4539, 1012, 6415, 18442, 999, 1027, 1027, 1005, 10047, 2290, 1005, 1007, 2709, 6270, 1025, 2709, 2969, 1012, 4871, 1012, 2070, 1006, 3853, 1006, 3746, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/dom/jquery/scrollRightRTL.js
function() { var oDomRef = this.get(0); if (oDomRef) { if (Device.browser.msie) { return oDomRef.scrollLeft; } else if (Device.browser.firefox || (Device.browser.safari && Device.browser.version >= 10)) { // Firefox and Safari 10+ behave the same although Safari is a WebKit browser return (-oDom...
javascript
function() { var oDomRef = this.get(0); if (oDomRef) { if (Device.browser.msie) { return oDomRef.scrollLeft; } else if (Device.browser.firefox || (Device.browser.safari && Device.browser.version >= 10)) { // Firefox and Safari 10+ behave the same although Safari is a WebKit browser return (-oDom...
[ "function", "(", ")", "{", "var", "oDomRef", "=", "this", ".", "get", "(", "0", ")", ";", "if", "(", "oDomRef", ")", "{", "if", "(", "Device", ".", "browser", ".", "msie", ")", "{", "return", "oDomRef", ".", "scrollLeft", ";", "}", "else", "if", ...
This module provides the {@link jQuery#scrollRightRTL} API. @namespace @name module:sap/ui/dom/jquery/scrollRightRTL @public @since 1.58 Returns the MIRRORED scrollLeft value of the first element in the given jQuery collection in right-to-left mode. Precondition: The element is rendered in RTL mode. Reason for this...
[ "This", "module", "provides", "the", "{", "@link", "jQuery#scrollRightRTL", "}", "API", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/dom/jquery/scrollRightRTL.js#L34-L54
train
Returns the current scroll left value of the element
[ 30522, 3853, 1006, 1007, 1063, 13075, 1051, 9527, 2890, 2546, 1027, 2023, 1012, 2131, 1006, 1014, 1007, 1025, 2065, 1006, 1051, 9527, 2890, 2546, 1007, 1063, 2065, 1006, 5080, 1012, 16602, 1012, 5796, 2666, 1007, 1063, 2709, 1051, 9527, 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...
adobe/brackets
src/editor/CodeHintManager.js
_updateHintList
function _updateHintList(callMoveUpEvent) { callMoveUpEvent = typeof callMoveUpEvent === "undefined" ? false : callMoveUpEvent; if (deferredHints) { deferredHints.reject(); deferredHints = null; } if (callMoveUpEvent) { return hintList.callMoveUp(ca...
javascript
function _updateHintList(callMoveUpEvent) { callMoveUpEvent = typeof callMoveUpEvent === "undefined" ? false : callMoveUpEvent; if (deferredHints) { deferredHints.reject(); deferredHints = null; } if (callMoveUpEvent) { return hintList.callMoveUp(ca...
[ "function", "_updateHintList", "(", "callMoveUpEvent", ")", "{", "callMoveUpEvent", "=", "typeof", "callMoveUpEvent", "===", "\"undefined\"", "?", "false", ":", "callMoveUpEvent", ";", "if", "(", "deferredHints", ")", "{", "deferredHints", ".", "reject", "(", ")",...
From an active hinting session, get hints from the current provider and render the hint list window. Assumes that it is called when a session is active (i.e. sessionProvider is not null).
[ "From", "an", "active", "hinting", "session", "get", "hints", "from", "the", "current", "provider", "and", "render", "the", "hint", "list", "window", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/editor/CodeHintManager.js#L417-L470
train
Update the hint list
[ 30522, 3853, 1035, 10651, 10606, 19646, 2923, 1006, 2655, 5302, 3726, 6279, 18697, 3372, 1007, 1063, 2655, 5302, 3726, 6279, 18697, 3372, 1027, 2828, 11253, 2655, 5302, 3726, 6279, 18697, 3372, 1027, 1027, 1027, 1000, 6151, 28344, 1000, 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...
LLK/scratch-blocks
blocks_vertical/sound.js
function() { this.jsonInit({ "message0": Blockly.Msg.SOUND_CHANGEEFFECTBY, "args0": [ { "type": "field_dropdown", "name": "EFFECT", "options": [ [Blockly.Msg.SOUND_EFFECTS_PITCH, 'PITCH'], [Blockly.Msg.SOUND_EFFECTS_PAN, 'PAN'] ] ...
javascript
function() { this.jsonInit({ "message0": Blockly.Msg.SOUND_CHANGEEFFECTBY, "args0": [ { "type": "field_dropdown", "name": "EFFECT", "options": [ [Blockly.Msg.SOUND_EFFECTS_PITCH, 'PITCH'], [Blockly.Msg.SOUND_EFFECTS_PAN, 'PAN'] ] ...
[ "function", "(", ")", "{", "this", ".", "jsonInit", "(", "{", "\"message0\"", ":", "Blockly", ".", "Msg", ".", "SOUND_CHANGEEFFECTBY", ",", "\"args0\"", ":", "[", "{", "\"type\"", ":", "\"field_dropdown\"", ",", "\"name\"", ":", "\"EFFECT\"", ",", "\"options...
Block to change the audio effect @this Blockly.Block
[ "Block", "to", "change", "the", "audio", "effect" ]
455b2a854435c0a67da1da92320ddc3ec3e2b799
https://github.com/LLK/scratch-blocks/blob/455b2a854435c0a67da1da92320ddc3ec3e2b799/blocks_vertical/sound.js#L155-L175
train
Block for the change effect by.
[ 30522, 3853, 1006, 1007, 1063, 2023, 1012, 1046, 3385, 5498, 2102, 1006, 1063, 1000, 4471, 2692, 1000, 1024, 3796, 2135, 1012, 5796, 2290, 1012, 2614, 1035, 2689, 12879, 25969, 3762, 1010, 1000, 12098, 5620, 2692, 1000, 1024, 1031, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/view/Pane.js
Pane
function Pane(id, $container) { this._initialize(); // Setup the container and the element we're inserting var self = this, showPaneHeaderButtonsPref = PreferencesManager.get("pane.showPaneHeaderButtons"), $el = $container.append(Mustache.render(paneTemplate, {id: id}))....
javascript
function Pane(id, $container) { this._initialize(); // Setup the container and the element we're inserting var self = this, showPaneHeaderButtonsPref = PreferencesManager.get("pane.showPaneHeaderButtons"), $el = $container.append(Mustache.render(paneTemplate, {id: id}))....
[ "function", "Pane", "(", "id", ",", "$container", ")", "{", "this", ".", "_initialize", "(", ")", ";", "// Setup the container and the element we're inserting", "var", "self", "=", "this", ",", "showPaneHeaderButtonsPref", "=", "PreferencesManager", ".", "get", "(",...
@typedef {!$el: jQuery, getFile:function():!File, updateLayout:function(forceRefresh:boolean), destroy:function(), getScrollPos:function():?, adjustScrollPos:function(state:Object=, heightDelta:number)=, getViewState:function():?*=, restoreViewState:function(viewState:!*)=, notifyContainerChange:function()=, notifyVi...
[ "@typedef", "{", "!$el", ":", "jQuery", "getFile", ":", "function", "()", ":", "!File", "updateLayout", ":", "function", "(", "forceRefresh", ":", "boolean", ")", "destroy", ":", "function", "()", "getScrollPos", ":", "function", "()", ":", "?", "adjustScrol...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/view/Pane.js#L240-L403
train
Creates a new Pane instance
[ 30522, 3853, 6090, 2063, 1006, 8909, 1010, 1002, 11661, 1007, 1063, 2023, 1012, 1035, 3988, 4697, 1006, 1007, 1025, 1013, 1013, 16437, 1996, 11661, 1998, 1996, 5783, 2057, 1005, 2128, 19274, 2075, 13075, 2969, 1027, 2023, 1010, 30524, 28786...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
function( ua ) { ua = ua.toLowerCase(); var match = /(webkit)[ \/]([\w.]+)/.exec( ua ) || /(msie) ([\w.]+)/.exec( ua ) || !/compatible/.test( ua ) && /(mozilla)(?:.*? rv:([\w.]+))?/.exec( ua ) || []; return { browser: match[1] || "", version: match[2] || "0" }; }
javascript
function( ua ) { ua = ua.toLowerCase(); var match = /(webkit)[ \/]([\w.]+)/.exec( ua ) || /(msie) ([\w.]+)/.exec( ua ) || !/compatible/.test( ua ) && /(mozilla)(?:.*? rv:([\w.]+))?/.exec( ua ) || []; return { browser: match[1] || "", version: match[2] || "0" }; }
[ "function", "(", "ua", ")", "{", "ua", "=", "ua", ".", "toLowerCase", "(", ")", ";", "var", "match", "=", "/", "(webkit)[ \\/]([\\w.]+)", "/", ".", "exec", "(", "ua", ")", "||", "/", "(msie) ([\\w.]+)", "/", ".", "exec", "(", "ua", ")", "||", "!", ...
Use of jQuery.browser is frowned upon. More details: http://docs.jquery.com/Utilities/jQuery.browser
[ "Use", "of", "jQuery", ".", "browser", "is", "frowned", "upon", ".", "More", "details", ":", "http", ":", "//", "docs", ".", "jquery", ".", "com", "/", "Utilities", "/", "jQuery", ".", "browser" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L3301-L3310
train
Get the browser and version from the user agent string
[ 30522, 3853, 1006, 25423, 1007, 1063, 25423, 1027, 25423, 1012, 2000, 27663, 18992, 3366, 1006, 1007, 1025, 13075, 2674, 1027, 1013, 1006, 4773, 23615, 1007, 1031, 1032, 1013, 1033, 1006, 1031, 1032, 1059, 1012, 1033, 1009, 1007, 1013, 1012...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/QuickOpenHTML/main.js
createIDList
function createIDList() { var doc = DocumentManager.getCurrentDocument(); if (!doc) { return; } var idList = []; var docText = doc.getText(); var lines = docText.split("\n"); var regex = new RegExp(/\s+id\s*?=\s*?["'](.*?)["']/gi); var id, ch...
javascript
function createIDList() { var doc = DocumentManager.getCurrentDocument(); if (!doc) { return; } var idList = []; var docText = doc.getText(); var lines = docText.split("\n"); var regex = new RegExp(/\s+id\s*?=\s*?["'](.*?)["']/gi); var id, ch...
[ "function", "createIDList", "(", ")", "{", "var", "doc", "=", "DocumentManager", ".", "getCurrentDocument", "(", ")", ";", "if", "(", "!", "doc", ")", "{", "return", ";", "}", "var", "idList", "=", "[", "]", ";", "var", "docText", "=", "doc", ".", ...
Returns a list of information about ID's for a single document. This array is populated by createIDList() @type {?Array.<FileLocation>}
[ "Returns", "a", "list", "of", "information", "about", "ID", "s", "for", "a", "single", "document", ".", "This", "array", "is", "populated", "by", "createIDList", "()" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/QuickOpenHTML/main.js#L58-L84
train
Create an array of FileLocations
[ 30522, 3853, 3443, 3593, 9863, 1006, 1007, 1063, 13075, 9986, 1027, 6254, 24805, 4590, 1012, 2131, 10841, 14343, 3372, 3527, 24894, 4765, 1006, 1007, 1025, 2065, 1006, 999, 9986, 1007, 1063, 2709, 1025, 1065, 13075, 8909, 9863, 1027, 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...
wangfupeng1988/wangEditor
src/js/editor/index.js
function () { // -------- 绑定 onchange 事件 -------- let onChangeTimeoutId = 0 let beforeChangeHtml = this.txt.html() const config = this.config // onchange 触发延迟时间 let onchangeTimeout = config.onchangeTimeout onchangeTimeout = parseInt(onchangeTimeout, 10) i...
javascript
function () { // -------- 绑定 onchange 事件 -------- let onChangeTimeoutId = 0 let beforeChangeHtml = this.txt.html() const config = this.config // onchange 触发延迟时间 let onchangeTimeout = config.onchangeTimeout onchangeTimeout = parseInt(onchangeTimeout, 10) i...
[ "function", "(", ")", "{", "// -------- 绑定 onchange 事件 --------", "let", "onChangeTimeoutId", "=", "0", "let", "beforeChangeHtml", "=", "this", ".", "txt", ".", "html", "(", ")", "const", "config", "=", "this", ".", "config", "// onchange 触发延迟时间", "let", "onchan...
绑定事件
[ "绑定事件" ]
b77696f5e81c8ec13d9d341252d6b9fa8a22db18
https://github.com/wangfupeng1988/wangEditor/blob/b77696f5e81c8ec13d9d341252d6b9fa8a22db18/src/js/editor/index.js#L242-L301
train
触发 change 事件
[ 30522, 3853, 1006, 1007, 1063, 1013, 1013, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 100, 1822, 2006, 22305, 2063, 1751, 100, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 2292, 2006, 22305, 20624, 26247, 21823, 2094, 1027, 1014, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
swimlane/ngx-datatable
release/utils/math.js
scaleColumns
function scaleColumns(colsByGroup, maxWidth, totalFlexGrow) { // calculate total width and flexgrow points for coulumns that can be resized for (var attr in colsByGroup) { for (var _i = 0, _a = colsByGroup[attr]; _i < _a.length; _i++) { var column = _a[_i]; if (!column.canAutoRes...
javascript
function scaleColumns(colsByGroup, maxWidth, totalFlexGrow) { // calculate total width and flexgrow points for coulumns that can be resized for (var attr in colsByGroup) { for (var _i = 0, _a = colsByGroup[attr]; _i < _a.length; _i++) { var column = _a[_i]; if (!column.canAutoRes...
[ "function", "scaleColumns", "(", "colsByGroup", ",", "maxWidth", ",", "totalFlexGrow", ")", "{", "// calculate total width and flexgrow points for coulumns that can be resized", "for", "(", "var", "attr", "in", "colsByGroup", ")", "{", "for", "(", "var", "_i", "=", "0...
Resizes columns based on the flexGrow property, while respecting manually set widths
[ "Resizes", "columns", "based", "on", "the", "flexGrow", "property", "while", "respecting", "manually", "set", "widths" ]
d7df15a070282a169524dba51d9572008b74804c
https://github.com/swimlane/ngx-datatable/blob/d7df15a070282a169524dba51d9572008b74804c/release/utils/math.js#L32-L70
train
Scales columns by flexgrow
[ 30522, 3853, 4094, 25778, 2819, 3619, 1006, 8902, 14478, 17058, 1010, 4098, 9148, 11927, 2232, 1010, 2561, 21031, 2595, 16523, 5004, 1007, 1063, 1013, 1013, 18422, 2561, 9381, 1998, 23951, 16523, 5004, 2685, 2005, 2522, 25100, 3619, 2008, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/BaseController.js
function (sControlName, oControlsData) { var oLibComponentModel = oControlsData.libComponentInfos, oLibInfo = library._getLibraryInfoSingleton(); return oLibInfo._getActualComponent(oLibComponentModel, sControlName); }
javascript
function (sControlName, oControlsData) { var oLibComponentModel = oControlsData.libComponentInfos, oLibInfo = library._getLibraryInfoSingleton(); return oLibInfo._getActualComponent(oLibComponentModel, sControlName); }
[ "function", "(", "sControlName", ",", "oControlsData", ")", "{", "var", "oLibComponentModel", "=", "oControlsData", ".", "libComponentInfos", ",", "oLibInfo", "=", "library", ".", "_getLibraryInfoSingleton", "(", ")", ";", "return", "oLibInfo", ".", "_getActualCompo...
Retrieves the actual component for the control. @param {string} sControlName @return {string} the actual component
[ "Retrieves", "the", "actual", "component", "for", "the", "control", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/BaseController.js#L159-L163
train
Returns the actual component for the given control name.
[ 30522, 3853, 1006, 30524, 3075, 1012, 1035, 2131, 29521, 19848, 25811, 14876, 7741, 19263, 1006, 1007, 1025, 2709, 19330, 12322, 2378, 14876, 1012, 1035, 2131, 18908, 8787, 9006, 29513, 3372, 1006, 19330, 12322, 9006, 29513, 3372, 5302, 9247,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
facebook/relay
packages/babel-plugin-relay/createTransformError.js
createTransformError
function createTransformError(error: any): string { if (error instanceof RelayTransformError) { return `Relay Transform Error: ${error.message}`; } const {sourceText, validationErrors} = error; if (validationErrors && sourceText) { const sourceLines = sourceText.split('\n'); return validationErrors...
javascript
function createTransformError(error: any): string { if (error instanceof RelayTransformError) { return `Relay Transform Error: ${error.message}`; } const {sourceText, validationErrors} = error; if (validationErrors && sourceText) { const sourceLines = sourceText.split('\n'); return validationErrors...
[ "function", "createTransformError", "(", "error", ":", "any", ")", ":", "string", "{", "if", "(", "error", "instanceof", "RelayTransformError", ")", "{", "return", "`", "${", "error", ".", "message", "}", "`", ";", "}", "const", "{", "sourceText", ",", "...
In case of an error during transform, determine if it should be logged to the console and/or printed in the source.
[ "In", "case", "of", "an", "error", "during", "transform", "determine", "if", "it", "should", "be", "logged", "to", "the", "console", "and", "/", "or", "printed", "in", "the", "source", "." ]
7fb9be5182b9650637d7b92ead9a42713ac30aa4
https://github.com/facebook/relay/blob/7fb9be5182b9650637d7b92ead9a42713ac30aa4/packages/babel-plugin-relay/createTransformError.js#L21-L59
train
Creates a string that can be used to create a transform error.
[ 30522, 3853, 3443, 6494, 3619, 14192, 2121, 29165, 1006, 7561, 1024, 2151, 1007, 1024, 5164, 1063, 2065, 1006, 7561, 6013, 11253, 8846, 6494, 3619, 14192, 2121, 29165, 1007, 1063, 2709, 1036, 8846, 10938, 7561, 1024, 1002, 1063, 7561, 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...
GoogleChrome/workbox
packages/workbox-webpack-plugin/src/lib/get-manifest-entries-from-compilation.js
getEntry
function getEntry(knownHashes, url, revision) { // We're assuming that if the URL contains any of the known hashes // (either the short or full chunk hash or compilation hash) then it's // already revisioned, and we don't need additional out-of-band revisioning. if (!revision || knownHashes.some((hash) => url.i...
javascript
function getEntry(knownHashes, url, revision) { // We're assuming that if the URL contains any of the known hashes // (either the short or full chunk hash or compilation hash) then it's // already revisioned, and we don't need additional out-of-band revisioning. if (!revision || knownHashes.some((hash) => url.i...
[ "function", "getEntry", "(", "knownHashes", ",", "url", ",", "revision", ")", "{", "// We're assuming that if the URL contains any of the known hashes", "// (either the short or full chunk hash or compilation hash) then it's", "// already revisioned, and we don't need additional out-of-band ...
A single manifest entry that Workbox can precache. When possible, we leave out the revision information, which tells Workbox that the URL contains enough info to uniquely version the asset. @param {Array<string>} knownHashes All of the hashes that are associated with this webpack build. @param {string} url webpack ass...
[ "A", "single", "manifest", "entry", "that", "Workbox", "can", "precache", ".", "When", "possible", "we", "leave", "out", "the", "revision", "information", "which", "tells", "Workbox", "that", "the", "URL", "contains", "enough", "info", "to", "uniquely", "versi...
8379c51b6deaf52faed5879206fe84579cae41f0
https://github.com/GoogleChrome/workbox/blob/8379c51b6deaf52faed5879206fe84579cae41f0/packages/workbox-webpack-plugin/src/lib/get-manifest-entries-from-compilation.js#L27-L35
train
Get the entry for a given URL
[ 30522, 3853, 2131, 4765, 2854, 1006, 2124, 14949, 15689, 1010, 24471, 2140, 1010, 13921, 1007, 1063, 1013, 1013, 2057, 1005, 2128, 10262, 2008, 2065, 1996, 24471, 2140, 3397, 2151, 1997, 1996, 2124, 23325, 2229, 1013, 1013, 1006, 2593, 1996...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jgraph/mxgraph
javascript/mxClient.js
mxSwimlaneLayout
function mxSwimlaneLayout(graph, orientation, deterministic) { mxGraphLayout.call(this, graph); this.orientation = (orientation != null) ? orientation : mxConstants.DIRECTION_NORTH; this.deterministic = (deterministic != null) ? deterministic : true; }
javascript
function mxSwimlaneLayout(graph, orientation, deterministic) { mxGraphLayout.call(this, graph); this.orientation = (orientation != null) ? orientation : mxConstants.DIRECTION_NORTH; this.deterministic = (deterministic != null) ? deterministic : true; }
[ "function", "mxSwimlaneLayout", "(", "graph", ",", "orientation", ",", "deterministic", ")", "{", "mxGraphLayout", ".", "call", "(", "this", ",", "graph", ")", ";", "this", ".", "orientation", "=", "(", "orientation", "!=", "null", ")", "?", "orientation", ...
Copyright (c) 2006-2015, JGraph Ltd Copyright (c) 2006-2015, Gaudenz Alder Class: mxSwimlaneLayout A hierarchical layout algorithm. Constructor: mxSwimlaneLayout Constructs a new hierarchical layout algorithm. Arguments: graph - Reference to the enclosing <mxGraph>. orientation - Optional constant that defines t...
[ "Copyright", "(", "c", ")", "2006", "-", "2015", "JGraph", "Ltd", "Copyright", "(", "c", ")", "2006", "-", "2015", "Gaudenz", "Alder", "Class", ":", "mxSwimlaneLayout" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L38348-L38353
train
The layout for the swimlane.
[ 30522, 3853, 25630, 26760, 5714, 20644, 8485, 5833, 1006, 10629, 1010, 10296, 1010, 28283, 25300, 10074, 1007, 1063, 25630, 14413, 8485, 5833, 1012, 2655, 1006, 2023, 1010, 10629, 1007, 1025, 2023, 1012, 10296, 1027, 1006, 10296, 999, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/preferences/PreferencesBase.js
function (id, value, options, doNotSave) { options = options || {}; var context = this._getContext(options.context), // The case where the "default" scope was chosen specifically is special. // Usually "default" would come up only when a preference did not have a...
javascript
function (id, value, options, doNotSave) { options = options || {}; var context = this._getContext(options.context), // The case where the "default" scope was chosen specifically is special. // Usually "default" would come up only when a preference did not have a...
[ "function", "(", "id", ",", "value", ",", "options", ",", "doNotSave", ")", "{", "options", "=", "options", "||", "{", "}", ";", "var", "context", "=", "this", ".", "_getContext", "(", "options", ".", "context", ")", ",", "// The case where the \"default\"...
Sets a preference and notifies listeners that there may have been a change. By default, the preference is set in the same location in which it was defined except for the "default" scope. If the current value of the preference comes from the "default" scope, the new value will be set at the level just above default. @p...
[ "Sets", "a", "preference", "and", "notifies", "listeners", "that", "there", "may", "have", "been", "a", "change", ".", "By", "default", "the", "preference", "is", "set", "in", "the", "same", "location", "in", "which", "it", "was", "defined", "except", "for...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/preferences/PreferencesBase.js#L1721-L1766
train
Sets a preference in the specified context.
[ 30522, 3853, 1006, 8909, 1010, 3643, 1010, 7047, 1010, 2123, 12868, 10696, 1007, 1063, 7047, 1027, 7047, 1064, 1064, 1063, 1065, 1025, 13075, 6123, 1027, 2023, 1012, 1035, 2131, 8663, 18209, 1006, 7047, 1012, 6123, 1007, 1010, 1013, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
nhn/tui.editor
src/js/extensions/table/unmergeCell.js
_updateMergedCells
function _updateMergedCells(tableData, startRowIndex, startColIndex, rowspan, colspan) { const limitRowIndex = startRowIndex + rowspan; const limitColIndex = startColIndex + colspan; const colRange = util.range(startColIndex, limitColIndex); util.range(startRowIndex, limitRowIndex).forEach(rowIndex => { co...
javascript
function _updateMergedCells(tableData, startRowIndex, startColIndex, rowspan, colspan) { const limitRowIndex = startRowIndex + rowspan; const limitColIndex = startColIndex + colspan; const colRange = util.range(startColIndex, limitColIndex); util.range(startRowIndex, limitRowIndex).forEach(rowIndex => { co...
[ "function", "_updateMergedCells", "(", "tableData", ",", "startRowIndex", ",", "startColIndex", ",", "rowspan", ",", "colspan", ")", "{", "const", "limitRowIndex", "=", "startRowIndex", "+", "rowspan", ";", "const", "limitColIndex", "=", "startColIndex", "+", "col...
Update merged cell data to basic cell data. @param {Array.<Array.<object>>} tableData - table data @param {number} startRowIndex - start row index @param {number} startColIndex - start col index @param {number} rowspan - rowspan property of merger cell @param {number} colspan - colspan property of merger cell @private
[ "Update", "merged", "cell", "data", "to", "basic", "cell", "data", "." ]
e75ab08c2a7ab07d1143e318f7cde135c5e3002e
https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/extensions/table/unmergeCell.js#L79-L92
train
Update merged cells
[ 30522, 3853, 1035, 10651, 5017, 5999, 29109, 4877, 1006, 2795, 2850, 2696, 1010, 2707, 10524, 22254, 10288, 1010, 2707, 25778, 22254, 10288, 1010, 10281, 9739, 1010, 8902, 13102, 2319, 1007, 1063, 9530, 3367, 5787, 10524, 22254, 10288, 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...
exceljs/exceljs
lib/csv/line-buffer.js
function(chunk) { // find line or lines in chunk and emit them if not corked // or queue them if corked var data = this.buffer ? this.buffer + chunk : chunk; var lines = data.split(/\r?\n/g); // save the last line this.buffer = lines.pop(); lines.forEach(function(line) { if (this.cor...
javascript
function(chunk) { // find line or lines in chunk and emit them if not corked // or queue them if corked var data = this.buffer ? this.buffer + chunk : chunk; var lines = data.split(/\r?\n/g); // save the last line this.buffer = lines.pop(); lines.forEach(function(line) { if (this.cor...
[ "function", "(", "chunk", ")", "{", "// find line or lines in chunk and emit them if not corked", "// or queue them if corked", "var", "data", "=", "this", ".", "buffer", "?", "this", ".", "buffer", "+", "chunk", ":", "chunk", ";", "var", "lines", "=", "data", "."...
Events: line: here is a line done: all lines emitted
[ "Events", ":", "line", ":", "here", "is", "a", "line", "done", ":", "all", "lines", "emitted" ]
c6ee7a14d5e0e5a07bf0e475aa4dd7b9a1e907f2
https://github.com/exceljs/exceljs/blob/c6ee7a14d5e0e5a07bf0e475aa4dd7b9a1e907f2/lib/csv/line-buffer.js#L24-L42
train
process a chunk of data
[ 30522, 3853, 1006, 20000, 1007, 1063, 1013, 1013, 2424, 2240, 2030, 3210, 1999, 20000, 1998, 12495, 2102, 2068, 2065, 2025, 8513, 2098, 1013, 1013, 2030, 24240, 2068, 2065, 8513, 2098, 13075, 2951, 1027, 2023, 1012, 17698, 1029, 2023, 1012,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dequelabs/axe-core
lib/commons/text/form-control-value.js
ariaRangeValue
function ariaRangeValue(node) { node = node.actualNode || node; const role = aria.getRole(node); if (!rangeRoles.includes(role) || !node.hasAttribute('aria-valuenow')) { return ''; } // Validate the number, if not, return 0. // Chrome 70 typecasts this, Firefox 62 does not const valueNow = +node.getAttribute('...
javascript
function ariaRangeValue(node) { node = node.actualNode || node; const role = aria.getRole(node); if (!rangeRoles.includes(role) || !node.hasAttribute('aria-valuenow')) { return ''; } // Validate the number, if not, return 0. // Chrome 70 typecasts this, Firefox 62 does not const valueNow = +node.getAttribute('...
[ "function", "ariaRangeValue", "(", "node", ")", "{", "node", "=", "node", ".", "actualNode", "||", "node", ";", "const", "role", "=", "aria", ".", "getRole", "(", "node", ")", ";", "if", "(", "!", "rangeRoles", ".", "includes", "(", "role", ")", "||"...
Calculate value of an element with range-type role @param {VirtualNode|Node} element The VirtualNode instance whose value we want @return {string} The calculated value
[ "Calculate", "value", "of", "an", "element", "with", "range", "-", "type", "role" ]
727323c07980e2291575f545444d389fb942906f
https://github.com/dequelabs/axe-core/blob/727323c07980e2291575f545444d389fb942906f/lib/commons/text/form-control-value.js#L194-L204
train
Get the value of the range element
[ 30522, 3853, 9342, 24388, 13331, 7630, 2063, 1006, 13045, 1007, 1063, 13045, 1027, 13045, 1012, 5025, 3630, 3207, 1064, 1064, 13045, 1025, 9530, 3367, 2535, 1027, 9342, 1012, 2131, 13153, 2063, 1006, 13045, 1007, 1025, 2065, 1006, 999, 1150...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Async.js
doInParallel
function doInParallel(items, beginProcessItem, failFast) { var promises = []; var masterDeferred = new $.Deferred(); if (items.length === 0) { masterDeferred.resolve(); } else { var numCompleted = 0; var hasFailed = false; items.forEach(...
javascript
function doInParallel(items, beginProcessItem, failFast) { var promises = []; var masterDeferred = new $.Deferred(); if (items.length === 0) { masterDeferred.resolve(); } else { var numCompleted = 0; var hasFailed = false; items.forEach(...
[ "function", "doInParallel", "(", "items", ",", "beginProcessItem", ",", "failFast", ")", "{", "var", "promises", "=", "[", "]", ";", "var", "masterDeferred", "=", "new", "$", ".", "Deferred", "(", ")", ";", "if", "(", "items", ".", "length", "===", "0"...
Further ideas for Async utilities... - Utilities for blocking UI until a Promise completes? - A "SuperDeferred" could feature some very useful enhancements: - API for cancellation (non guaranteed, best attempt) - Easier way to add a timeout clause (withTimeout() wrapper below is more verbose) - Encapsulate the task kic...
[ "Further", "ideas", "for", "Async", "utilities", "...", "-", "Utilities", "for", "blocking", "UI", "until", "a", "Promise", "completes?", "-", "A", "SuperDeferred", "could", "feature", "some", "very", "useful", "enhancements", ":", "-", "API", "for", "cancella...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/utils/Async.js#L86-L123
train
In parallel processes the items in parallel
[ 30522, 3853, 24341, 28689, 6216, 2140, 1006, 5167, 1010, 4088, 21572, 9623, 28032, 6633, 1010, 8246, 24333, 1007, 1063, 30524, 2842, 1063, 13075, 16371, 12458, 25377, 25890, 2094, 1027, 1014, 1025, 13075, 2038, 7011, 18450, 1027, 6270, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Freeboard/freeboard
js/freeboard.plugins.js
function(settings, updateCallback) { // Always a good idea... var self = this; // Good idea to create a variable to hold on to our settings, because they might change in the future. See below. var currentSettings = settings; /* This is some function where I'll get my data from somewhere */ functi...
javascript
function(settings, updateCallback) { // Always a good idea... var self = this; // Good idea to create a variable to hold on to our settings, because they might change in the future. See below. var currentSettings = settings; /* This is some function where I'll get my data from somewhere */ functi...
[ "function", "(", "settings", ",", "updateCallback", ")", "{", "// Always a good idea...", "var", "self", "=", "this", ";", "// Good idea to create a variable to hold on to our settings, because they might change in the future. See below.", "var", "currentSettings", "=", "settings",...
### Datasource Implementation ------------------- Here we implement the actual datasource plugin. We pass in the settings and updateCallback.
[ "###", "Datasource", "Implementation", "-------------------", "Here", "we", "implement", "the", "actual", "datasource", "plugin", ".", "We", "pass", "in", "the", "settings", "and", "updateCallback", "." ]
38789f6e8bd3d04f7d3b2c3427e509d00f2610fc
https://github.com/Freeboard/freeboard/blob/38789f6e8bd3d04f7d3b2c3427e509d00f2610fc/js/freeboard.plugins.js#L589-L650
train
This plugin is a public function that will get the data from the database.
[ 30522, 3853, 1006, 10906, 1010, 10651, 9289, 20850, 8684, 1007, 1063, 1013, 1013, 2467, 1037, 2204, 2801, 1012, 1012, 1012, 13075, 2969, 1027, 2023, 1025, 1013, 1013, 2204, 2801, 2000, 3443, 1037, 8023, 2000, 2907, 2006, 2000, 2256, 10906, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/core/util/animation/animate.js
function (element, opts) { var TIMEOUT = 3000; // fallback is 3 secs return $q(function(resolve, reject){ opts = opts || { }; // If there is no transition is found, resolve immediately // // NOTE: using $mdUtil.nextTick() causes delays/issues if (noTransitionFound(o...
javascript
function (element, opts) { var TIMEOUT = 3000; // fallback is 3 secs return $q(function(resolve, reject){ opts = opts || { }; // If there is no transition is found, resolve immediately // // NOTE: using $mdUtil.nextTick() causes delays/issues if (noTransitionFound(o...
[ "function", "(", "element", ",", "opts", ")", "{", "var", "TIMEOUT", "=", "3000", ";", "// fallback is 3 secs", "return", "$q", "(", "function", "(", "resolve", ",", "reject", ")", "{", "opts", "=", "opts", "||", "{", "}", ";", "// If there is no transitio...
Listen for transitionEnd event (with optional timeout) Announce completion or failure via promise handlers
[ "Listen", "for", "transitionEnd", "event", "(", "with", "optional", "timeout", ")", "Announce", "completion", "or", "failure", "via", "promise", "handlers" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/util/animation/animate.js#L55-L101
train
Returns a promise that resolves when there is no transition found.
[ 30522, 3853, 1006, 5783, 1010, 23569, 2015, 1007, 1063, 13075, 2051, 5833, 1027, 11910, 1025, 1013, 1013, 2991, 5963, 2003, 1017, 10819, 2015, 2709, 1002, 1053, 1006, 3853, 1006, 10663, 1010, 15454, 1007, 1063, 23569, 2015, 1027, 23569, 201...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aframevr/aframe
src/systems/material.js
function (material) { var materials = this.materials; Object.keys(materials).forEach(function (uuid) { materials[uuid].needsUpdate = true; }); }
javascript
function (material) { var materials = this.materials; Object.keys(materials).forEach(function (uuid) { materials[uuid].needsUpdate = true; }); }
[ "function", "(", "material", ")", "{", "var", "materials", "=", "this", ".", "materials", ";", "Object", ".", "keys", "(", "materials", ")", ".", "forEach", "(", "function", "(", "uuid", ")", "{", "materials", "[", "uuid", "]", ".", "needsUpdate", "=",...
Trigger update to all registered materials.
[ "Trigger", "update", "to", "all", "registered", "materials", "." ]
24acc78a7299a4cdfe3ef617f4d40ddf6275c992
https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/systems/material.js#L227-L232
train
Update the material
[ 30522, 3853, 1006, 3430, 1007, 1063, 13075, 4475, 1027, 2023, 1012, 4475, 1025, 4874, 1012, 6309, 1006, 4475, 1007, 1012, 18921, 6776, 1006, 3853, 1006, 1057, 21272, 1007, 1063, 4475, 1031, 1057, 21272, 1033, 1012, 3791, 6279, 13701, 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...