repo
stringclasses
192 values
path
stringlengths
4
115
func_name
stringlengths
0
45
original_string
stringlengths
74
24k
language
stringclasses
1 value
code
stringlengths
74
24k
code_tokens
listlengths
23
4.2k
docstring
stringlengths
2
23.7k
docstring_tokens
listlengths
1
810
sha
stringclasses
192 values
url
stringlengths
90
200
partition
stringclasses
1 value
summary
stringlengths
6
313
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
adobe/brackets
src/widgets/PopUpManager.js
addPopUp
function addPopUp($popUp, removeHandler, autoRemove) { autoRemove = autoRemove || false; _popUps.push($popUp[0]); $popUp.data("PopUpManager-autoRemove", autoRemove); $popUp.data("PopUpManager-removeHandler", removeHandler); }
javascript
function addPopUp($popUp, removeHandler, autoRemove) { autoRemove = autoRemove || false; _popUps.push($popUp[0]); $popUp.data("PopUpManager-autoRemove", autoRemove); $popUp.data("PopUpManager-removeHandler", removeHandler); }
[ "function", "addPopUp", "(", "$popUp", ",", "removeHandler", ",", "autoRemove", ")", "{", "autoRemove", "=", "autoRemove", "||", "false", ";", "_popUps", ".", "push", "(", "$popUp", "[", "0", "]", ")", ";", "$popUp", ".", "data", "(", "\"PopUpManager-autoR...
Add Esc key handling for a popup DOM element. @param {!jQuery} $popUp jQuery object for the DOM element pop-up @param {function} removeHandler Pop-up specific remove (e.g. display:none or DOM removal) @param {?Boolean} autoRemove - Specify true to indicate the PopUpManager should remove the popup from the _popUps arra...
[ "Add", "Esc", "key", "handling", "for", "a", "popup", "DOM", "element", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/widgets/PopUpManager.js#L47-L53
train
Add a popup to the list of available languages
[ 30522, 3853, 5587, 16340, 6279, 1006, 1002, 3769, 6279, 1010, 6366, 11774, 3917, 1010, 8285, 28578, 21818, 1007, 1063, 8285, 28578, 21818, 1027, 8285, 28578, 21818, 1064, 1064, 6270, 1025, 1035, 3769, 22264, 1012, 5245, 1006, 1002, 3769, 62...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
examples/js/search-all-exchanges.js
function () { log (' Non-strict search: node', process.argv[1], 'symbol'.green) log (' Non-strict search: node', process.argv[1], 'currency'.green) log (' Strict search: node', process.argv[1], '--strict', 'argument'.green) log (' Search markets only: node', process.argv[1], '--markets...
javascript
function () { log (' Non-strict search: node', process.argv[1], 'symbol'.green) log (' Non-strict search: node', process.argv[1], 'currency'.green) log (' Strict search: node', process.argv[1], '--strict', 'argument'.green) log (' Search markets only: node', process.argv[1], '--markets...
[ "function", "(", ")", "{", "log", "(", "' Non-strict search: node'", ",", "process", ".", "argv", "[", "1", "]", ",", "'symbol'", ".", "green", ")", "log", "(", "' Non-strict search: node'", ",", "process", ".", "argv", "[", "1", "]", ",", "'curren...
/* ------------------------------------------------------------------------
[ "/", "*", "------------------------------------------------------------------------" ]
8168069b9180a465532905e225586215e115a565
https://github.com/ccxt/ccxt/blob/8168069b9180a465532905e225586215e115a565/examples/js/search-all-exchanges.js#L34-L41
train
This function is called when the node is not in a node
[ 30522, 3853, 1006, 1007, 1063, 8833, 1006, 1005, 2512, 1011, 9384, 3945, 1024, 13045, 1005, 1010, 2832, 1012, 12098, 2290, 2615, 1031, 1015, 1033, 1010, 1005, 6454, 1005, 1012, 2665, 1007, 8833, 1006, 1005, 2512, 1011, 9384, 3945, 1024, 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/core/support/techinfo/TechnicalInfo.js
function() { this._oDialog.close(); this._oDialog.destroy(); this._oDialog = null; if (this._oAssistantPopover) { this._oAssistantPopover.destroy(); this._oAssistantPopover = null; } if (this._oDebugPopover) { this._oDebugPopover.destroy(); this._oDebugPopover = null; } }
javascript
function() { this._oDialog.close(); this._oDialog.destroy(); this._oDialog = null; if (this._oAssistantPopover) { this._oAssistantPopover.destroy(); this._oAssistantPopover = null; } if (this._oDebugPopover) { this._oDebugPopover.destroy(); this._oDebugPopover = null; } }
[ "function", "(", ")", "{", "this", ".", "_oDialog", ".", "close", "(", ")", ";", "this", ".", "_oDialog", ".", "destroy", "(", ")", ";", "this", ".", "_oDialog", "=", "null", ";", "if", "(", "this", ".", "_oAssistantPopover", ")", "{", "this", ".",...
Closes the technical information dialog
[ "Closes", "the", "technical", "information", "dialog" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L90-L104
train
Destroys the dialog and the assistant and debug popover
[ 30522, 3853, 1006, 1007, 1063, 2023, 1012, 1035, 21045, 23067, 2290, 1012, 2485, 1006, 1007, 1025, 2023, 1012, 1035, 21045, 23067, 2290, 1012, 6033, 1006, 1007, 1025, 2023, 1012, 1035, 21045, 23067, 2290, 1027, 19701, 1025, 2065, 1006, 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...
SheetJS/js-xlsx
xlsx.js
parse_SupBook
function parse_SupBook(blob, length, opts) { var end = blob.l + length; var ctab = blob.read_shift(2); var cch = blob.read_shift(2); opts.sbcch = cch; if(cch == 0x0401 || cch == 0x3A01) return [cch, ctab]; if(cch < 0x01 || cch >0xff) throw new Error("Unexpected SupBook type: "+cch); var virtPath = parse_XLUnicod...
javascript
function parse_SupBook(blob, length, opts) { var end = blob.l + length; var ctab = blob.read_shift(2); var cch = blob.read_shift(2); opts.sbcch = cch; if(cch == 0x0401 || cch == 0x3A01) return [cch, ctab]; if(cch < 0x01 || cch >0xff) throw new Error("Unexpected SupBook type: "+cch); var virtPath = parse_XLUnicod...
[ "function", "parse_SupBook", "(", "blob", ",", "length", ",", "opts", ")", "{", "var", "end", "=", "blob", ".", "l", "+", "length", ";", "var", "ctab", "=", "blob", ".", "read_shift", "(", "2", ")", ";", "var", "cch", "=", "blob", ".", "read_shift"...
TODO: parse 2.4.136 /* [MS-XLS] 2.4.271
[ "TODO", ":", "parse", "2", ".", "4", ".", "136", "/", "*", "[", "MS", "-", "XLS", "]", "2", ".", "4", ".", "271" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L6183-L6195
train
Parse SupBook
[ 30522, 3853, 11968, 3366, 1035, 10514, 2361, 8654, 1006, 1038, 4135, 2497, 1010, 3091, 1010, 23569, 2015, 1007, 1063, 13075, 2203, 1027, 1038, 4135, 2497, 1012, 1048, 1009, 3091, 1025, 13075, 14931, 7875, 1027, 1038, 4135, 2497, 1012, 3191,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/datepicker/js/dateUtil.js
getWeekOfMonth
function getWeekOfMonth(date) { var firstDayOfMonth = getFirstDateOfMonth(date); return Math.floor((firstDayOfMonth.getDay() + date.getDate() - 1) / 7); }
javascript
function getWeekOfMonth(date) { var firstDayOfMonth = getFirstDateOfMonth(date); return Math.floor((firstDayOfMonth.getDay() + date.getDate() - 1) / 7); }
[ "function", "getWeekOfMonth", "(", "date", ")", "{", "var", "firstDayOfMonth", "=", "getFirstDateOfMonth", "(", "date", ")", ";", "return", "Math", ".", "floor", "(", "(", "firstDayOfMonth", ".", "getDay", "(", ")", "+", "date", ".", "getDate", "(", ")", ...
Gets the week of the month that a given date occurs in. @param {Date} date @returns {number} Index of the week of the month (zero-based).
[ "Gets", "the", "week", "of", "the", "month", "that", "a", "given", "date", "occurs", "in", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/datepicker/js/dateUtil.js#L128-L131
train
Get week of the month
[ 30522, 3853, 2131, 28075, 11253, 9629, 2232, 1006, 3058, 1007, 1063, 13075, 2034, 10259, 11253, 9629, 2232, 1027, 2131, 8873, 12096, 13701, 11253, 9629, 2232, 1006, 3058, 1007, 1025, 2709, 8785, 1012, 2723, 1006, 1006, 2034, 10259, 11253, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.table/src/sap/ui/table/TableUtils.js
_invoke
function _invoke(bFinal) { bFinal = bFinal !== false; if (bFinal) { cancel(); } if (mOptions.trailing) { invoke(vContext, vArguments, null, bFinal); } }
javascript
function _invoke(bFinal) { bFinal = bFinal !== false; if (bFinal) { cancel(); } if (mOptions.trailing) { invoke(vContext, vArguments, null, bFinal); } }
[ "function", "_invoke", "(", "bFinal", ")", "{", "bFinal", "=", "bFinal", "!==", "false", ";", "if", "(", "bFinal", ")", "{", "cancel", "(", ")", ";", "}", "if", "(", "mOptions", ".", "trailing", ")", "{", "invoke", "(", "vContext", ",", "vArguments",...
Executes a trailing invocation if it is enabled in the options. @param {boolean} [bFinal=true] Whether this is the final invocation.
[ "Executes", "a", "trailing", "invocation", "if", "it", "is", "enabled", "in", "the", "options", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableUtils.js#L1336-L1344
train
Invoke the function
[ 30522, 3853, 1035, 1999, 6767, 3489, 1006, 28939, 13290, 1007, 1063, 28939, 13290, 1027, 28939, 13290, 999, 1027, 1027, 6270, 1025, 2065, 1006, 28939, 13290, 1007, 1063, 17542, 1006, 1007, 1025, 1065, 2065, 1006, 9587, 16790, 2015, 1012, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SheetJS/js-xlsx
bits/75_xlml.js
parse_xlml_data
function parse_xlml_data(xml, ss, data, cell/*:any*/, base, styles, csty, row, arrayf, o) { var nf = "General", sid = cell.StyleID, S = {}; o = o || {}; var interiors = []; var i = 0; if(sid === undefined && row) sid = row.StyleID; if(sid === undefined && csty) sid = csty.StyleID; while(styles[sid] !== undefined)...
javascript
function parse_xlml_data(xml, ss, data, cell/*:any*/, base, styles, csty, row, arrayf, o) { var nf = "General", sid = cell.StyleID, S = {}; o = o || {}; var interiors = []; var i = 0; if(sid === undefined && row) sid = row.StyleID; if(sid === undefined && csty) sid = csty.StyleID; while(styles[sid] !== undefined)...
[ "function", "parse_xlml_data", "(", "xml", ",", "ss", ",", "data", ",", "cell", "/*:any*/", ",", "base", ",", "styles", ",", "csty", ",", "row", ",", "arrayf", ",", "o", ")", "{", "var", "nf", "=", "\"General\"", ",", "sid", "=", "cell", ".", "Styl...
/* TODO: there must exist some form of OSP-blessed spec
[ "/", "*", "TODO", ":", "there", "must", "exist", "some", "form", "of", "OSP", "-", "blessed", "spec" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/bits/75_xlml.js#L93-L155
train
Parse an XLML data
[ 30522, 3853, 11968, 3366, 1035, 28712, 19968, 1035, 2951, 1006, 20950, 1010, 7020, 1010, 2951, 1010, 3526, 1013, 1008, 1024, 2151, 1008, 1013, 1010, 2918, 1010, 6782, 1010, 20116, 3723, 1010, 5216, 1010, 9140, 2546, 1010, 1051, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
TryGhost/Ghost
core/server/services/settings/index.js
getAll
function getAll() { const knownSettings = this.knownSettings(), settingsToReturn = {}; _.each(knownSettings, function (setting) { settingsToReturn[setting] = SettingsLoader(setting); }); return settingsToReturn; }
javascript
function getAll() { const knownSettings = this.knownSettings(), settingsToReturn = {}; _.each(knownSettings, function (setting) { settingsToReturn[setting] = SettingsLoader(setting); }); return settingsToReturn; }
[ "function", "getAll", "(", ")", "{", "const", "knownSettings", "=", "this", ".", "knownSettings", "(", ")", ",", "settingsToReturn", "=", "{", "}", ";", "_", ".", "each", "(", "knownSettings", ",", "function", "(", "setting", ")", "{", "settingsToReturn", ...
Getter for all YAML settings. Example: `settings.getAll().then(...)` will return an Object like this (assuming we're supporting `routes` and `globals`): { routes: { routes: null, collections: { '/': [Object] }, resources: { tag: '/tag/{slug}/', author: '/author/{slug}/' } }, globals: { config: { url: 'testblog.com' } }...
[ "Getter", "for", "all", "YAML", "settings", ".", "Example", ":", "settings", ".", "getAll", "()", ".", "then", "(", "...", ")", "will", "return", "an", "Object", "like", "this", "(", "assuming", "we", "re", "supporting", "routes", "and", "globals", ")", ...
bb7bb55cf3e60af99ebbc56099928827b58461bc
https://github.com/TryGhost/Ghost/blob/bb7bb55cf3e60af99ebbc56099928827b58461bc/core/server/services/settings/index.js#L84-L93
train
Get all the settings
[ 30522, 3853, 2131, 8095, 1006, 1007, 1063, 9530, 3367, 2124, 21678, 8613, 1027, 2023, 1012, 2124, 21678, 8613, 1006, 1007, 1010, 10906, 19277, 22299, 1027, 1063, 1065, 1025, 1035, 1012, 2169, 1006, 2124, 21678, 8613, 1010, 3853, 1006, 4292,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
immerjs/immer
src/proxy.js
getOwnPropertyDescriptor
function getOwnPropertyDescriptor(state, prop) { const owner = source(state) const desc = Reflect.getOwnPropertyDescriptor(owner, prop) if (desc) { desc.writable = true desc.configurable = !Array.isArray(owner) || prop !== "length" } return desc }
javascript
function getOwnPropertyDescriptor(state, prop) { const owner = source(state) const desc = Reflect.getOwnPropertyDescriptor(owner, prop) if (desc) { desc.writable = true desc.configurable = !Array.isArray(owner) || prop !== "length" } return desc }
[ "function", "getOwnPropertyDescriptor", "(", "state", ",", "prop", ")", "{", "const", "owner", "=", "source", "(", "state", ")", "const", "desc", "=", "Reflect", ".", "getOwnPropertyDescriptor", "(", "owner", ",", "prop", ")", "if", "(", "desc", ")", "{", ...
Note: We never coerce `desc.value` into an Immer draft, because we can't make the same guarantee in ES5 mode.
[ "Note", ":", "We", "never", "coerce", "desc", ".", "value", "into", "an", "Immer", "draft", "because", "we", "can", "t", "make", "the", "same", "guarantee", "in", "ES5", "mode", "." ]
4443cace6c23d14536955ce5b2aec92c8c76cacc
https://github.com/immerjs/immer/blob/4443cace6c23d14536955ce5b2aec92c8c76cacc/src/proxy.js#L166-L174
train
Get the descriptor for a property
[ 30522, 3853, 2131, 12384, 21572, 4842, 3723, 6155, 23235, 2953, 1006, 2110, 1010, 17678, 1007, 1063, 9530, 3367, 3954, 1027, 3120, 1006, 2110, 1007, 9530, 3367, 4078, 2278, 1027, 8339, 1012, 2131, 12384, 21572, 4842, 3723, 6155, 23235, 2953...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.support/src/sap/ui/support/jQuery.sap.support.js
function (oExecutionScope, vPresetOrRules) { if (RuleSetLoader._bRulesCreated) { return Main.analyze(oExecutionScope, vPresetOrRules); } return RuleSetLoader._oMainPromise.then(function () { return Main.analyze(oExecutionScope, vPresetOrRules); }); }
javascript
function (oExecutionScope, vPresetOrRules) { if (RuleSetLoader._bRulesCreated) { return Main.analyze(oExecutionScope, vPresetOrRules); } return RuleSetLoader._oMainPromise.then(function () { return Main.analyze(oExecutionScope, vPresetOrRules); }); }
[ "function", "(", "oExecutionScope", ",", "vPresetOrRules", ")", "{", "if", "(", "RuleSetLoader", ".", "_bRulesCreated", ")", "{", "return", "Main", ".", "analyze", "(", "oExecutionScope", ",", "vPresetOrRules", ")", ";", "}", "return", "RuleSetLoader", ".", "_...
Main method to perform analysis of a given running application. Allows to choose a particular execution scope - desired part of the UI to be checked and a flexible way to specify the list of rules to be used. @memberof jQuery.sap.support @deprecated Since version 1.60.0. Please use sap/ui/support/RuleAnalyzer instead...
[ "Main", "method", "to", "perform", "analysis", "of", "a", "given", "running", "application", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/jQuery.sap.support.js#L59-L68
train
Analyze the given rules
[ 30522, 3853, 1006, 1051, 10288, 8586, 13700, 26127, 1010, 21210, 6072, 18903, 12171, 16308, 1007, 1063, 2065, 1006, 3513, 3388, 11066, 2121, 1012, 1035, 7987, 16308, 16748, 4383, 1007, 1063, 2709, 2364, 1012, 17908, 1006, 1051, 30524, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
openlayers/openlayers
src/ol/format/TopoJSON.js
readPolygonGeometry
function readPolygonGeometry(object, arcs) { const coordinates = []; for (let i = 0, ii = object['arcs'].length; i < ii; ++i) { coordinates[i] = concatenateArcs(object['arcs'][i], arcs); } return new Polygon(coordinates); }
javascript
function readPolygonGeometry(object, arcs) { const coordinates = []; for (let i = 0, ii = object['arcs'].length; i < ii; ++i) { coordinates[i] = concatenateArcs(object['arcs'][i], arcs); } return new Polygon(coordinates); }
[ "function", "readPolygonGeometry", "(", "object", ",", "arcs", ")", "{", "const", "coordinates", "=", "[", "]", ";", "for", "(", "let", "i", "=", "0", ",", "ii", "=", "object", "[", "'arcs'", "]", ".", "length", ";", "i", "<", "ii", ";", "++", "i...
Create a polygon from a TopoJSON geometry object. @param {TopoJSONPolygon} object TopoJSON object. @param {Array<Array<import("../coordinate.js").Coordinate>>} arcs Array of arcs. @return {Polygon} Geometry.
[ "Create", "a", "polygon", "from", "a", "TopoJSON", "geometry", "object", "." ]
f366eaea522388fb575b11010e69d309164baca7
https://github.com/openlayers/openlayers/blob/f366eaea522388fb575b11010e69d309164baca7/src/ol/format/TopoJSON.js#L261-L267
train
Read polygon geometry from object
[ 30522, 3853, 3191, 18155, 2100, 17036, 8780, 24327, 1006, 4874, 1010, 29137, 1007, 1063, 9530, 3367, 12093, 1027, 1031, 1033, 1025, 2005, 1006, 2292, 1045, 1027, 1014, 1010, 2462, 1027, 4874, 1031, 1005, 29137, 1005, 1033, 1012, 3091, 1025,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/autocomplete/demoCustomTemplate/script.js
loadAll
function loadAll() { var repos = [ { 'name' : 'AngularJS', 'url' : 'https://github.com/angular/angular.js', 'watchers' : '3,623', 'forks' : '16,175', }, { 'name' : 'Angular', 'url' : 'https://github.com/...
javascript
function loadAll() { var repos = [ { 'name' : 'AngularJS', 'url' : 'https://github.com/angular/angular.js', 'watchers' : '3,623', 'forks' : '16,175', }, { 'name' : 'Angular', 'url' : 'https://github.com/...
[ "function", "loadAll", "(", ")", "{", "var", "repos", "=", "[", "{", "'name'", ":", "'AngularJS'", ",", "'url'", ":", "'https://github.com/angular/angular.js'", ",", "'watchers'", ":", "'3,623'", ",", "'forks'", ":", "'16,175'", ",", "}", ",", "{", "'name'",...
Build `components` list of key/value pairs
[ "Build", "components", "list", "of", "key", "/", "value", "pairs" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/autocomplete/demoCustomTemplate/script.js#L49-L92
train
Load all the repos
[ 30522, 3853, 7170, 8095, 1006, 1007, 1063, 13075, 16360, 2891, 1027, 1031, 1063, 1005, 2171, 1005, 1024, 1005, 16108, 22578, 1005, 1010, 1005, 24471, 2140, 1005, 1024, 1005, 16770, 1024, 1013, 1013, 21025, 2705, 12083, 1012, 4012, 1013, 161...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jgraph/mxgraph
javascript/mxClient.js
function() { var b = document.body; var d = document.documentElement; try { return new mxRectangle(0, 0, b.clientWidth || d.clientWidth, Math.max(b.clientHeight || 0, d.clientHeight)); } catch (e) { return new mxRectangle(); } }
javascript
function() { var b = document.body; var d = document.documentElement; try { return new mxRectangle(0, 0, b.clientWidth || d.clientWidth, Math.max(b.clientHeight || 0, d.clientHeight)); } catch (e) { return new mxRectangle(); } }
[ "function", "(", ")", "{", "var", "b", "=", "document", ".", "body", ";", "var", "d", "=", "document", ".", "documentElement", ";", "try", "{", "return", "new", "mxRectangle", "(", "0", ",", "0", ",", "b", ".", "clientWidth", "||", "d", ".", "clien...
Function: getDocumentSize Returns the client size for the current document as an <mxRectangle>.
[ "Function", ":", "getDocumentSize" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L3478-L3491
train
Returns the bounds of the document
[ 30522, 3853, 1006, 1007, 1063, 13075, 1038, 1027, 6254, 1012, 2303, 1025, 13075, 1040, 1027, 6254, 1012, 6254, 12260, 3672, 1025, 3046, 1063, 2709, 2047, 25630, 2890, 25572, 3070, 2571, 1006, 1014, 1010, 1014, 1010, 1038, 1012, 7396, 9148, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
common/src/web/jquery-1.3.2.js
function() { // Make sure that the DOM is not already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them jQuery.each( jQuery.readyList, function(){ this.call( ...
javascript
function() { // Make sure that the DOM is not already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them jQuery.each( jQuery.readyList, function(){ this.call( ...
[ "function", "(", ")", "{", "// Make sure that the DOM is not already loaded", "if", "(", "!", "jQuery", ".", "isReady", ")", "{", "// Remember that the DOM is ready", "jQuery", ".", "isReady", "=", "true", ";", "// If there are functions bound, to execute", "if", "(", "...
Handle when the DOM is ready
[ "Handle", "when", "the", "DOM", "is", "ready" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/common/src/web/jquery-1.3.2.js#L3022-L3042
train
This function is called when the DOM is ready
[ 30522, 3853, 1006, 1007, 1063, 1013, 1013, 2191, 2469, 2008, 1996, 14383, 2003, 2025, 2525, 8209, 2065, 1006, 999, 1046, 4226, 2854, 1012, 2003, 16416, 5149, 1007, 1063, 1013, 1013, 3342, 2008, 1996, 14383, 2003, 3201, 1046, 4226, 2854, 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...
wuchangming/spy-debugger
buildin_modules/weinre/web/demo/weinre-demo.js
openTheOtherDatabase
function openTheOtherDatabase() { if (otherDB) return if (window.openDatabase) { otherDB = window.openDatabase("clicks_other_db", "1.0", "clicks_other_db", 8192) otherDB.transaction(createDatabase_other) } }
javascript
function openTheOtherDatabase() { if (otherDB) return if (window.openDatabase) { otherDB = window.openDatabase("clicks_other_db", "1.0", "clicks_other_db", 8192) otherDB.transaction(createDatabase_other) } }
[ "function", "openTheOtherDatabase", "(", ")", "{", "if", "(", "otherDB", ")", "return", "if", "(", "window", ".", "openDatabase", ")", "{", "otherDB", "=", "window", ".", "openDatabase", "(", "\"clicks_other_db\"", ",", "\"1.0\"", ",", "\"clicks_other_db\"", "...
------------------------------------------------------------------------------
[ "------------------------------------------------------------------------------" ]
55c1dda0dff0c44920673711656ddfd7ff03c307
https://github.com/wuchangming/spy-debugger/blob/55c1dda0dff0c44920673711656ddfd7ff03c307/buildin_modules/weinre/web/demo/weinre-demo.js#L170-L177
train
Open the other database
[ 30522, 3853, 2330, 10760, 14573, 2121, 2850, 2696, 15058, 1006, 1007, 1063, 2065, 1006, 2060, 18939, 1007, 2709, 2065, 1006, 3332, 1012, 2330, 2850, 2696, 15058, 1007, 1063, 2060, 18939, 1027, 3332, 1012, 2330, 2850, 2696, 15058, 1006, 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...
LLK/scratch-blocks
blocks_vertical/data.js
function() { this.jsonInit({ "message0": Blockly.Msg.DATA_SHOWVARIABLE, "args0": [ { "type": "field_variable", "name": "VARIABLE" } ], "previousStatement": null, "nextStatement": null, "category": Blockly.Categories.data, "colour": Blockl...
javascript
function() { this.jsonInit({ "message0": Blockly.Msg.DATA_SHOWVARIABLE, "args0": [ { "type": "field_variable", "name": "VARIABLE" } ], "previousStatement": null, "nextStatement": null, "category": Blockly.Categories.data, "colour": Blockl...
[ "function", "(", ")", "{", "this", ".", "jsonInit", "(", "{", "\"message0\"", ":", "Blockly", ".", "Msg", ".", "DATA_SHOWVARIABLE", ",", "\"args0\"", ":", "[", "{", "\"type\"", ":", "\"field_variable\"", ",", "\"name\"", ":", "\"VARIABLE\"", "}", "]", ",",...
Block to show a variable @this Blockly.Block
[ "Block", "to", "show", "a", "variable" ]
455b2a854435c0a67da1da92320ddc3ec3e2b799
https://github.com/LLK/scratch-blocks/blob/455b2a854435c0a67da1da92320ddc3ec3e2b799/blocks_vertical/data.js#L109-L125
train
Block for variable list.
[ 30522, 3853, 1006, 1007, 1063, 2023, 1012, 1046, 3385, 5498, 2102, 1006, 1063, 1000, 4471, 2692, 1000, 1024, 3796, 2135, 1012, 5796, 2290, 1012, 2951, 1035, 2265, 10755, 19210, 1010, 1000, 12098, 5620, 2692, 1000, 1024, 1031, 1063, 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...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/v4/ODataMetaModel.js
isParameter
function isParameter(sSegment, oOverload) { var aMatches; if (sSegment && oOverload.$Parameter) { aMatches = oOverload.$Parameter.filter(function (oParameter) { return oParameter.$Name === sSegment; }); if (aMatches.length) { // there can be at most one match // Note: annotations at ...
javascript
function isParameter(sSegment, oOverload) { var aMatches; if (sSegment && oOverload.$Parameter) { aMatches = oOverload.$Parameter.filter(function (oParameter) { return oParameter.$Name === sSegment; }); if (aMatches.length) { // there can be at most one match // Note: annotations at ...
[ "function", "isParameter", "(", "sSegment", ",", "oOverload", ")", "{", "var", "aMatches", ";", "if", "(", "sSegment", "&&", "oOverload", ".", "$Parameter", ")", "{", "aMatches", "=", "oOverload", ".", "$Parameter", ".", "filter", "(", "function", "(", "oP...
/* Tells whether the given segment matches a parameter of the given overload; changes <code>vResult</code> etc. accordingly. @param {string} sSegment A segment @param {object} oOverload A single operation overload @returns {boolean} <code>true</code> iff the given overload has a parameter with the given name.
[ "/", "*", "Tells", "whether", "the", "given", "segment", "matches", "a", "parameter", "of", "the", "given", "overload", ";", "changes", "<code", ">", "vResult<", "/", "code", ">", "etc", ".", "accordingly", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/ODataMetaModel.js#L1081-L1098
train
Checks if the given segment is a parameter of an overload
[ 30522, 3853, 2003, 28689, 22828, 1006, 7020, 13910, 3672, 1010, 1051, 7840, 11066, 1007, 1063, 13075, 25933, 10649, 2229, 1025, 2065, 1006, 7020, 13910, 3672, 1004, 1004, 1051, 7840, 11066, 1012, 1002, 16381, 1007, 1063, 25933, 10649, 2229, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
chartjs/Chart.js
src/scales/scale.time.js
determineUnitForFormatting
function determineUnitForFormatting(scale, ticks, minUnit, min, max) { var ilen = UNITS.length; var i, unit; for (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) { unit = UNITS[i]; if (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= ticks.length) { return unit; } } return UNITS[minUnit ...
javascript
function determineUnitForFormatting(scale, ticks, minUnit, min, max) { var ilen = UNITS.length; var i, unit; for (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) { unit = UNITS[i]; if (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= ticks.length) { return unit; } } return UNITS[minUnit ...
[ "function", "determineUnitForFormatting", "(", "scale", ",", "ticks", ",", "minUnit", ",", "min", ",", "max", ")", "{", "var", "ilen", "=", "UNITS", ".", "length", ";", "var", "i", ",", "unit", ";", "for", "(", "i", "=", "ilen", "-", "1", ";", "i",...
Figures out what unit to format a set of ticks with
[ "Figures", "out", "what", "unit", "to", "format", "a", "set", "of", "ticks", "with" ]
f093c36574d290330ed623e60fbd070421c730d5
https://github.com/chartjs/Chart.js/blob/f093c36574d290330ed623e60fbd070421c730d5/src/scales/scale.time.js#L297-L309
train
Determine the unit to use for formatting
[ 30522, 3853, 5646, 19496, 24475, 16347, 2953, 18900, 3436, 1006, 4094, 1010, 16356, 2015, 1010, 8117, 19496, 2102, 1010, 8117, 1010, 4098, 1007, 1063, 13075, 17869, 2078, 1027, 3197, 1012, 3091, 1025, 13075, 1045, 1010, 3131, 1025, 2005, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js
function(bSibling, oOverlay) { var mCustomAddActions = this._getCustomAddActions(bSibling, oOverlay); var mRevealActions = this._getRevealActions(bSibling, oOverlay); var mAddODataPropertyActions = this._getAddODataPropertyActions(bSibling, oOverlay); //join and condense both action data var mOverall = ...
javascript
function(bSibling, oOverlay) { var mCustomAddActions = this._getCustomAddActions(bSibling, oOverlay); var mRevealActions = this._getRevealActions(bSibling, oOverlay); var mAddODataPropertyActions = this._getAddODataPropertyActions(bSibling, oOverlay); //join and condense both action data var mOverall = ...
[ "function", "(", "bSibling", ",", "oOverlay", ")", "{", "var", "mCustomAddActions", "=", "this", ".", "_getCustomAddActions", "(", "bSibling", ",", "oOverlay", ")", ";", "var", "mRevealActions", "=", "this", ".", "_getRevealActions", "(", "bSibling", ",", "oOv...
Calculate a map with all "add/reveal" action relevant data collected: <pre> { <aggregationName> : { addODataProperty : { designTimeMetadata : <sap.ui.dt.ElementDesignTimeMetadata of parent>, action : <addODataProperty action section from designTimeMetadata> }, reveal : { elements : [{ element : <invisible element>, des...
[ "Calculate", "a", "map", "with", "all", "add", "/", "reveal", "action", "relevant", "data", "collected", ":", "<pre", ">", "{", "<aggregationName", ">", ":", "{", "addODataProperty", ":", "{", "designTimeMetadata", ":", "<sap", ".", "ui", ".", "dt", ".", ...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js#L470-L486
train
Returns an object with all the actions defined for the given element
[ 30522, 3853, 1006, 18667, 12322, 2989, 1010, 1051, 7840, 8485, 1007, 1063, 13075, 11338, 19966, 9626, 25062, 22014, 1027, 2023, 1012, 1035, 2131, 7874, 20389, 4215, 2850, 22014, 1006, 18667, 12322, 2989, 1010, 1051, 7840, 8485, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/no-regex-spaces.js
checkLiteral
function checkLiteral(node) { const token = sourceCode.getFirstToken(node), nodeType = token.type, nodeValue = token.value; if (nodeType === "RegularExpression") { checkRegex(node, nodeValue, token.range[0]); } }
javascript
function checkLiteral(node) { const token = sourceCode.getFirstToken(node), nodeType = token.type, nodeValue = token.value; if (nodeType === "RegularExpression") { checkRegex(node, nodeValue, token.range[0]); } }
[ "function", "checkLiteral", "(", "node", ")", "{", "const", "token", "=", "sourceCode", ".", "getFirstToken", "(", "node", ")", ",", "nodeType", "=", "token", ".", "type", ",", "nodeValue", "=", "token", ".", "value", ";", "if", "(", "nodeType", "===", ...
Validate regular expression literals @param {ASTNode} node node to validate @returns {void} @private
[ "Validate", "regular", "expression", "literals" ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-regex-spaces.js#L73-L81
train
Check if a literal is valid
[ 30522, 3853, 4638, 22779, 7941, 1006, 13045, 1007, 1063, 9530, 3367, 19204, 1027, 3120, 16044, 1012, 2131, 8873, 12096, 18715, 2368, 1006, 13045, 1007, 1010, 13045, 13874, 1027, 19204, 1012, 2828, 1010, 13045, 10175, 5657, 1027, 19204, 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...
airyland/vux
src/components/clocker/clocker.js
strftime
function strftime (offsetObject) { return function (format) { var directives = format.match(/%(-|!)?[A-Z]{1}(:[^]+)?/gi) var d2h = false if (directives.indexOf('%D') < 0 && directives.indexOf('%H') >= 0) { d2h = true } if (directives) { for (var i = 0, len = directives.length; i < len;...
javascript
function strftime (offsetObject) { return function (format) { var directives = format.match(/%(-|!)?[A-Z]{1}(:[^]+)?/gi) var d2h = false if (directives.indexOf('%D') < 0 && directives.indexOf('%H') >= 0) { d2h = true } if (directives) { for (var i = 0, len = directives.length; i < len;...
[ "function", "strftime", "(", "offsetObject", ")", "{", "return", "function", "(", "format", ")", "{", "var", "directives", "=", "format", ".", "match", "(", "/", "%(-|!)?[A-Z]{1}(:[^]+)?", "/", "gi", ")", "var", "d2h", "=", "false", "if", "(", "directives"...
Time string formatter
[ "Time", "string", "formatter" ]
484fc3c18bdca99b0c08efbb678c0ee0f5ceedd6
https://github.com/airyland/vux/blob/484fc3c18bdca99b0c08efbb678c0ee0f5ceedd6/src/components/clocker/clocker.js#L59-L114
train
Format the time in the specified format
[ 30522, 3853, 2358, 12881, 7292, 1006, 16396, 16429, 20614, 1007, 1063, 2709, 3853, 1006, 4289, 1007, 1063, 13075, 16449, 2015, 1027, 4289, 1012, 2674, 1006, 1013, 1003, 1006, 1011, 1064, 999, 1007, 1029, 1031, 1037, 1011, 1062, 1033, 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/no-useless-constructor.js
isSpreadArguments
function isSpreadArguments(superArgs) { return ( superArgs.length === 1 && superArgs[0].type === "SpreadElement" && superArgs[0].argument.type === "Identifier" && superArgs[0].argument.name === "arguments" ); }
javascript
function isSpreadArguments(superArgs) { return ( superArgs.length === 1 && superArgs[0].type === "SpreadElement" && superArgs[0].argument.type === "Identifier" && superArgs[0].argument.name === "arguments" ); }
[ "function", "isSpreadArguments", "(", "superArgs", ")", "{", "return", "(", "superArgs", ".", "length", "===", "1", "&&", "superArgs", "[", "0", "]", ".", "type", "===", "\"SpreadElement\"", "&&", "superArgs", "[", "0", "]", ".", "argument", ".", "type", ...
Checks whether a given array of expressions is `...arguments` or not. `super(...arguments)` passes all arguments through. @param {ASTNode[]} superArgs - An array of expressions to check. @returns {boolean} `true` if the superArgs is `...arguments`.
[ "Checks", "whether", "a", "given", "array", "of", "expressions", "is", "...", "arguments", "or", "not", ".", "super", "(", "...", "arguments", ")", "passes", "all", "arguments", "through", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-useless-constructor.js#L44-L51
train
Returns true if the super arguments are spread arguments
[ 30522, 3853, 26354, 28139, 8447, 10623, 27417, 3215, 1006, 3565, 2906, 5620, 1007, 1063, 2709, 1006, 3565, 2906, 5620, 1012, 3091, 1027, 1027, 1027, 1015, 1004, 1004, 3565, 2906, 5620, 1031, 1014, 1033, 1012, 2828, 1027, 1027, 1027, 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...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/util/MockServer.js
function(sEntitySetName, sKeys) { sKeys = decodeURIComponent(sKeys); var oFoundEntry; var oEntitySet = that._mEntitySets[sEntitySetName]; var aKeys = oEntitySet.keys; // split keys var aRequestedKeys = sKeys.split(','); // check number of keys to be equal to the entity keys and valid...
javascript
function(sEntitySetName, sKeys) { sKeys = decodeURIComponent(sKeys); var oFoundEntry; var oEntitySet = that._mEntitySets[sEntitySetName]; var aKeys = oEntitySet.keys; // split keys var aRequestedKeys = sKeys.split(','); // check number of keys to be equal to the entity keys and valid...
[ "function", "(", "sEntitySetName", ",", "sKeys", ")", "{", "sKeys", "=", "decodeURIComponent", "(", "sKeys", ")", ";", "var", "oFoundEntry", ";", "var", "oEntitySet", "=", "that", ".", "_mEntitySets", "[", "sEntitySetName", "]", ";", "var", "aKeys", "=", "...
helper to find the entity set entry for a given entity set name and the keys of the entry
[ "helper", "to", "find", "the", "entity", "set", "entry", "for", "a", "given", "entity", "set", "name", "and", "the", "keys", "of", "the", "entry" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/MockServer.js#L1985-L2063
train
Checks if the given keys are valid and if so checks the keys type of the entry are valid.
[ 30522, 3853, 1006, 2741, 3012, 13462, 18442, 1010, 15315, 3240, 2015, 1007, 1063, 15315, 3240, 2015, 1027, 21933, 3207, 9496, 9006, 29513, 3372, 1006, 15315, 3240, 2015, 1007, 1025, 13075, 1997, 28819, 4765, 2854, 1025, 13075, 1051, 4765, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
TryGhost/Ghost
core/server/api/v0.1/mail.js
sendMail
function sendMail(object) { if (!(mailer instanceof mail.GhostMailer)) { mailer = new mail.GhostMailer(); } return mailer.send(object.mail[0].message).catch((err) => { if (mailer.state.usingDirect) { notificationsAPI.add( { notifications: [{ ...
javascript
function sendMail(object) { if (!(mailer instanceof mail.GhostMailer)) { mailer = new mail.GhostMailer(); } return mailer.send(object.mail[0].message).catch((err) => { if (mailer.state.usingDirect) { notificationsAPI.add( { notifications: [{ ...
[ "function", "sendMail", "(", "object", ")", "{", "if", "(", "!", "(", "mailer", "instanceof", "mail", ".", "GhostMailer", ")", ")", "{", "mailer", "=", "new", "mail", ".", "GhostMailer", "(", ")", ";", "}", "return", "mailer", ".", "send", "(", "obje...
Send mail helper
[ "Send", "mail", "helper" ]
bb7bb55cf3e60af99ebbc56099928827b58461bc
https://github.com/TryGhost/Ghost/blob/bb7bb55cf3e60af99ebbc56099928827b58461bc/core/server/api/v0.1/mail.js#L18-L41
train
Send an email to the specified site
[ 30522, 3853, 4604, 21397, 1006, 4874, 1007, 1063, 2065, 1006, 999, 1006, 5653, 2121, 6013, 11253, 5653, 1012, 5745, 21397, 2121, 1007, 1007, 1063, 5653, 2121, 1027, 2047, 5653, 1012, 5745, 21397, 2121, 1006, 1007, 1025, 1065, 2709, 5653, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SheetJS/js-xlsx
xlsx.js
parse_Setup
function parse_Setup(blob, length) { var o = {}; if(length < 32) return o; blob.l += 16; o.header = parse_Xnum(blob, 8); o.footer = parse_Xnum(blob, 8); blob.l += 2; return o; }
javascript
function parse_Setup(blob, length) { var o = {}; if(length < 32) return o; blob.l += 16; o.header = parse_Xnum(blob, 8); o.footer = parse_Xnum(blob, 8); blob.l += 2; return o; }
[ "function", "parse_Setup", "(", "blob", ",", "length", ")", "{", "var", "o", "=", "{", "}", ";", "if", "(", "length", "<", "32", ")", "return", "o", ";", "blob", ".", "l", "+=", "16", ";", "o", ".", "header", "=", "parse_Xnum", "(", "blob", ","...
/* [MS-XLS] 2.4.257
[ "/", "*", "[", "MS", "-", "XLS", "]", "2", ".", "4", ".", "257" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L6520-L6528
train
Parse a setup block
[ 30522, 3853, 11968, 3366, 1035, 16437, 1006, 1038, 4135, 2497, 1010, 3091, 1007, 1063, 13075, 1051, 1027, 1063, 1065, 1025, 2065, 1006, 3091, 1026, 3590, 1007, 2709, 1051, 1025, 1038, 4135, 2497, 1012, 1048, 1009, 1027, 2385, 1025, 1051, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.table/src/sap/ui/table/TableColumnUtils.js
function(oColumn, iLevel) { var vHeaderSpans = oColumn.getHeaderSpan(); var iHeaderSpan; if (!vHeaderSpans) { return 1; } if (!Array.isArray(vHeaderSpans)) { vHeaderSpans = (vHeaderSpans + "").split(","); } function getSpan(sSpan) { var result = parseInt(sSpan); return isNaN(resu...
javascript
function(oColumn, iLevel) { var vHeaderSpans = oColumn.getHeaderSpan(); var iHeaderSpan; if (!vHeaderSpans) { return 1; } if (!Array.isArray(vHeaderSpans)) { vHeaderSpans = (vHeaderSpans + "").split(","); } function getSpan(sSpan) { var result = parseInt(sSpan); return isNaN(resu...
[ "function", "(", "oColumn", ",", "iLevel", ")", "{", "var", "vHeaderSpans", "=", "oColumn", ".", "getHeaderSpan", "(", ")", ";", "var", "iHeaderSpan", ";", "if", "(", "!", "vHeaderSpans", ")", "{", "return", "1", ";", "}", "if", "(", "!", "Array", "....
Returns the header span of a given column. If <code>iLevel</code> is provided, the header span of that header row is returned if there is any defined, otherwise the maximum header span is returned. If there is no header span for the level, 1 is returned as a default value. @param {sap.ui.table.Column} oColumn Column o...
[ "Returns", "the", "header", "span", "of", "a", "given", "column", ".", "If", "<code", ">", "iLevel<", "/", "code", ">", "is", "provided", "the", "header", "span", "of", "that", "header", "row", "is", "returned", "if", "there", "is", "any", "defined", "...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableColumnUtils.js#L243-L267
train
Returns the max value of the column s header span
[ 30522, 3853, 1006, 1051, 25778, 2819, 2078, 1010, 17869, 15985, 1007, 1063, 13075, 1058, 4974, 2545, 9739, 2015, 1027, 1051, 25778, 2819, 2078, 1012, 2131, 4974, 2545, 9739, 1006, 1007, 1025, 13075, 1045, 4974, 2545, 9739, 1025, 2065, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/v4/ODataMetaModel.js
function () { var aContexts = [], oPromise = this.fetchContexts(), that = this; if (oPromise.isFulfilled()) { aContexts = oPromise.getResult(); } else { oPromise.then(function (aContexts) { that.setContexts(aContexts); that._fireChange({reason: ChangeReason.Change}); }); aCon...
javascript
function () { var aContexts = [], oPromise = this.fetchContexts(), that = this; if (oPromise.isFulfilled()) { aContexts = oPromise.getResult(); } else { oPromise.then(function (aContexts) { that.setContexts(aContexts); that._fireChange({reason: ChangeReason.Change}); }); aCon...
[ "function", "(", ")", "{", "var", "aContexts", "=", "[", "]", ",", "oPromise", "=", "this", ".", "fetchContexts", "(", ")", ",", "that", "=", "this", ";", "if", "(", "oPromise", ".", "isFulfilled", "(", ")", ")", "{", "aContexts", "=", "oPromise", ...
Updates the list and indices array. Fires a change event if the data was retrieved asynchronously. @private
[ "Updates", "the", "list", "and", "indices", "array", ".", "Fires", "a", "change", "event", "if", "the", "data", "was", "retrieved", "asynchronously", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/ODataMetaModel.js#L499-L514
train
Fetch all contexts from the database
[ 30522, 3853, 1006, 1007, 1063, 13075, 9353, 28040, 18413, 2015, 1027, 1031, 1033, 1010, 6728, 21716, 5562, 1027, 2023, 1012, 18584, 8663, 18209, 2015, 1006, 1007, 1010, 2008, 1027, 2023, 1025, 2065, 1006, 6728, 21716, 5562, 1012, 2003, 3993...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-js
lib/services/s3.js
reqRegionForNetworkingError
function reqRegionForNetworkingError(resp, done) { if (!AWS.util.isBrowser()) { return done(); } var error = resp.error; var request = resp.request; var bucket = request.params.Bucket; if (!error || error.code !== 'NetworkingError' || !bucket || request.httpRequest.region === 'us-e...
javascript
function reqRegionForNetworkingError(resp, done) { if (!AWS.util.isBrowser()) { return done(); } var error = resp.error; var request = resp.request; var bucket = request.params.Bucket; if (!error || error.code !== 'NetworkingError' || !bucket || request.httpRequest.region === 'us-e...
[ "function", "reqRegionForNetworkingError", "(", "resp", ",", "done", ")", "{", "if", "(", "!", "AWS", ".", "util", ".", "isBrowser", "(", ")", ")", "{", "return", "done", "(", ")", ";", "}", "var", "error", "=", "resp", ".", "error", ";", "var", "r...
For browser only. If NetworkingError received, will attempt to obtain the bucket region. @api private
[ "For", "browser", "only", ".", "If", "NetworkingError", "received", "will", "attempt", "to", "obtain", "the", "bucket", "region", "." ]
c23e5f0edd150f8885267e5f7c8a564f8e6e8562
https://github.com/aws/aws-sdk-js/blob/c23e5f0edd150f8885267e5f7c8a564f8e6e8562/lib/services/s3.js#L629-L671
train
If the error is not a NetworkingError then we need to get the region information from the bucket.
[ 30522, 3853, 2128, 4160, 23784, 29278, 7159, 21398, 2121, 29165, 1006, 24501, 2361, 1010, 2589, 1007, 1063, 2065, 1006, 999, 22091, 2015, 1012, 21183, 4014, 1012, 2003, 12618, 9333, 2121, 1006, 1007, 1007, 1063, 2709, 2589, 1006, 1007, 1025...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
openlayers/openlayers
src/ol/reproj.js
enlargeClipPoint
function enlargeClipPoint(centroidX, centroidY, x, y) { const dX = x - centroidX; const dY = y - centroidY; const distance = Math.sqrt(dX * dX + dY * dY); return [Math.round(x + dX / distance), Math.round(y + dY / distance)]; }
javascript
function enlargeClipPoint(centroidX, centroidY, x, y) { const dX = x - centroidX; const dY = y - centroidY; const distance = Math.sqrt(dX * dX + dY * dY); return [Math.round(x + dX / distance), Math.round(y + dY / distance)]; }
[ "function", "enlargeClipPoint", "(", "centroidX", ",", "centroidY", ",", "x", ",", "y", ")", "{", "const", "dX", "=", "x", "-", "centroidX", ";", "const", "dY", "=", "y", "-", "centroidY", ";", "const", "distance", "=", "Math", ".", "sqrt", "(", "dX"...
Enlarge the clipping triangle point by 1 pixel to ensure the edges overlap in order to mask gaps caused by antialiasing. @param {number} centroidX Centroid of the triangle (x coordinate in pixels). @param {number} centroidY Centroid of the triangle (y coordinate in pixels). @param {number} x X coordinate of the point ...
[ "Enlarge", "the", "clipping", "triangle", "point", "by", "1", "pixel", "to", "ensure", "the", "edges", "overlap", "in", "order", "to", "mask", "gaps", "caused", "by", "antialiasing", "." ]
f366eaea522388fb575b11010e69d309164baca7
https://github.com/openlayers/openlayers/blob/f366eaea522388fb575b11010e69d309164baca7/src/ol/reproj.js#L66-L71
train
Enlarge a point in the clipping area
[ 30522, 3853, 4372, 8017, 3351, 20464, 11514, 8400, 1006, 18120, 3593, 2595, 1010, 18120, 3593, 2100, 1010, 1060, 1010, 1061, 1007, 1063, 9530, 3367, 1040, 2595, 1027, 1060, 1011, 18120, 3593, 2595, 1025, 9530, 3367, 1040, 2100, 1027, 1061, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.unified/src/sap/ui/unified/CalendarTimeInterval.js
_handleDateFocus
function _handleDateFocus(oEvent){ var oFocusedDate = new UniversalDate(this._getFocusedDate().getTime()); var oDate = CalendarUtils._createUniversalUTCDate(oEvent.getParameter("date"), undefined, true); var bNotVisible = oEvent.getParameter("otherMonth"); if (bNotVisible && oDate.getUTCMonth() == oFocuse...
javascript
function _handleDateFocus(oEvent){ var oFocusedDate = new UniversalDate(this._getFocusedDate().getTime()); var oDate = CalendarUtils._createUniversalUTCDate(oEvent.getParameter("date"), undefined, true); var bNotVisible = oEvent.getParameter("otherMonth"); if (bNotVisible && oDate.getUTCMonth() == oFocuse...
[ "function", "_handleDateFocus", "(", "oEvent", ")", "{", "var", "oFocusedDate", "=", "new", "UniversalDate", "(", "this", ".", "_getFocusedDate", "(", ")", ".", "getTime", "(", ")", ")", ";", "var", "oDate", "=", "CalendarUtils", ".", "_createUniversalUTCDate"...
Handles day focus from the embedded day Picker. This function assumes there is a "datesRow" aggregation. So callers must take care. @return {void} @private
[ "Handles", "day", "focus", "from", "the", "embedded", "day", "Picker", ".", "This", "function", "assumes", "there", "is", "a", "datesRow", "aggregation", ".", "So", "callers", "must", "take", "care", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.unified/src/sap/ui/unified/CalendarTimeInterval.js#L1904-L1918
train
Handles date focus event
[ 30522, 3853, 1035, 8971, 30524, 1006, 2023, 1012, 1035, 2131, 14876, 7874, 22367, 3686, 1006, 1007, 1012, 2131, 7292, 1006, 1007, 1007, 1025, 13075, 1051, 13701, 1027, 8094, 21823, 4877, 1012, 1035, 3443, 19496, 14028, 2389, 4904, 19797, 36...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mui-org/material-ui
docs/src/pages/components/grid-list/SingleLineGridList.js
SingleLineGridList
function SingleLineGridList() { const classes = useStyles(); return ( <div className={classes.root}> <GridList className={classes.gridList} cols={2.5}> {tileData.map(tile => ( <GridListTile key={tile.img}> <img src={tile.img} alt={tile.title} /> <GridListTileBar ...
javascript
function SingleLineGridList() { const classes = useStyles(); return ( <div className={classes.root}> <GridList className={classes.gridList} cols={2.5}> {tileData.map(tile => ( <GridListTile key={tile.img}> <img src={tile.img} alt={tile.title} /> <GridListTileBar ...
[ "function", "SingleLineGridList", "(", ")", "{", "const", "classes", "=", "useStyles", "(", ")", ";", "return", "(", "<", "div", "className", "=", "{", "classes", ".", "root", "}", ">", "\n ", "<", "GridList", "className", "=", "{", "classes", ".", ...
The example data is structured as follows: import image from 'path/to/image.jpg'; [etc...] const tileData = [ { img: image, title: 'Image', author: 'author', }, { [etc...] }, ];
[ "The", "example", "data", "is", "structured", "as", "follows", ":" ]
1555e52367835946382fbf2a8f681de71318915d
https://github.com/mui-org/material-ui/blob/1555e52367835946382fbf2a8f681de71318915d/docs/src/pages/components/grid-list/SingleLineGridList.js#L49-L75
train
SingleLineGridList - GridList
[ 30522, 3853, 2309, 4179, 16523, 3593, 9863, 1006, 1007, 1063, 9530, 3367, 4280, 1027, 3594, 27983, 2015, 1006, 1007, 1025, 2709, 1006, 1026, 4487, 2615, 2465, 18442, 1027, 1063, 4280, 1012, 7117, 1065, 1028, 1026, 8370, 9863, 2465, 18442, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/angular
tools/gulp-tasks/format.js
gulpStatus
function gulpStatus() { const Vinyl = require('vinyl'); const path = require('path'); const gulpGit = require('gulp-git'); const through = require('through2'); const srcStream = through.obj(); const opt = {cwd: process.cwd()}; // https://git-scm.com/docs/git-status#_short_format const RE_STATUS = /((\...
javascript
function gulpStatus() { const Vinyl = require('vinyl'); const path = require('path'); const gulpGit = require('gulp-git'); const through = require('through2'); const srcStream = through.obj(); const opt = {cwd: process.cwd()}; // https://git-scm.com/docs/git-status#_short_format const RE_STATUS = /((\...
[ "function", "gulpStatus", "(", ")", "{", "const", "Vinyl", "=", "require", "(", "'vinyl'", ")", ";", "const", "path", "=", "require", "(", "'path'", ")", ";", "const", "gulpGit", "=", "require", "(", "'gulp-git'", ")", ";", "const", "through", "=", "re...
Gulp stream that wraps the gulp-git status, only returns untracked files, and converts the stdout into a stream of files.
[ "Gulp", "stream", "that", "wraps", "the", "gulp", "-", "git", "status", "only", "returns", "untracked", "files", "and", "converts", "the", "stdout", "into", "a", "stream", "of", "files", "." ]
c016e2c4ecf7529f08fae4ca0f5c8b0170c6b51c
https://github.com/angular/angular/blob/c016e2c4ecf7529f08fae4ca0f5c8b0170c6b51c/tools/gulp-tasks/format.js#L37-L83
train
Gulp status function
[ 30522, 3853, 26546, 9153, 5809, 1006, 1007, 1063, 9530, 3367, 8877, 1027, 5478, 1006, 1005, 8877, 30524, 5034, 6169, 25379, 1027, 2083, 1012, 27885, 3501, 1006, 1007, 1025, 9530, 3367, 23569, 1027, 1063, 19296, 2094, 1024, 2832, 1012, 19296...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
nhn/tui.editor
src/js/wysiwygCommands/tableAddCol.js
getNumberOfCols
function getNumberOfCols(wwe) { const selectionMgr = wwe.componentManager.getManager('tableSelection'); const $selectedCells = selectionMgr.getSelectedCells(); let length = 1; if ($selectedCells.length > 0) { const maxLength = $selectedCells.get(0).parentNode.querySelectorAll('td, th').length; length =...
javascript
function getNumberOfCols(wwe) { const selectionMgr = wwe.componentManager.getManager('tableSelection'); const $selectedCells = selectionMgr.getSelectedCells(); let length = 1; if ($selectedCells.length > 0) { const maxLength = $selectedCells.get(0).parentNode.querySelectorAll('td, th').length; length =...
[ "function", "getNumberOfCols", "(", "wwe", ")", "{", "const", "selectionMgr", "=", "wwe", ".", "componentManager", ".", "getManager", "(", "'tableSelection'", ")", ";", "const", "$selectedCells", "=", "selectionMgr", ".", "getSelectedCells", "(", ")", ";", "let"...
get number of selected cols @param {WysiwygEditor} wwe - wysiwyg editor instance @returns {number} - number of selected cols @ignore
[ "get", "number", "of", "selected", "cols" ]
e75ab08c2a7ab07d1143e318f7cde135c5e3002e
https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/wysiwygCommands/tableAddCol.js#L49-L60
train
Get number of cols
[ 30522, 3853, 2131, 19172, 5677, 11253, 25778, 2015, 1006, 11700, 1007, 1063, 9530, 3367, 4989, 24798, 2099, 1027, 11700, 1012, 6922, 24805, 4590, 1012, 2131, 24805, 4590, 1006, 1005, 7251, 12260, 7542, 1005, 1007, 1025, 9530, 3367, 1002, 34...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/prefer-template.js
getTextBetween
function getTextBetween(node1, node2) { const allTokens = [node1].concat(sourceCode.getTokensBetween(node1, node2)).concat(node2); const sourceText = sourceCode.getText(); return allTokens.slice(0, -1).reduce((accumulator, token, index) => accumulator + sourceText.slice(token.range[...
javascript
function getTextBetween(node1, node2) { const allTokens = [node1].concat(sourceCode.getTokensBetween(node1, node2)).concat(node2); const sourceText = sourceCode.getText(); return allTokens.slice(0, -1).reduce((accumulator, token, index) => accumulator + sourceText.slice(token.range[...
[ "function", "getTextBetween", "(", "node1", ",", "node2", ")", "{", "const", "allTokens", "=", "[", "node1", "]", ".", "concat", "(", "sourceCode", ".", "getTokensBetween", "(", "node1", ",", "node2", ")", ")", ".", "concat", "(", "node2", ")", ";", "c...
Gets the non-token text between two nodes, ignoring any other tokens that appear between the two tokens. @param {ASTNode} node1 The first node @param {ASTNode} node2 The second node @returns {string} The text between the nodes, excluding other tokens
[ "Gets", "the", "non", "-", "token", "text", "between", "two", "nodes", "ignoring", "any", "other", "tokens", "that", "appear", "between", "the", "two", "tokens", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/prefer-template.js#L167-L172
train
Get the text between node1 and node2
[ 30522, 3853, 2131, 18209, 20915, 28394, 2078, 1006, 13045, 2487, 1010, 13045, 2475, 1007, 1063, 9530, 3367, 2035, 18715, 6132, 1027, 1031, 13045, 2487, 1033, 1012, 9530, 11266, 1006, 3120, 16044, 1012, 2131, 18715, 6132, 20915, 28394, 2078, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/mesh-layers/src/simple-mesh-layer/simple-mesh-layer.js
getTexture
function getTexture(gl, src, opts) { if (typeof src === 'string') { // Url, load the image return loadImage(src) .then(data => getTextureFromData(gl, data, opts)) .catch(error => { throw new Error(`Could not load texture from ${src}: ${error}`); }); } return new Promise(resolve =...
javascript
function getTexture(gl, src, opts) { if (typeof src === 'string') { // Url, load the image return loadImage(src) .then(data => getTextureFromData(gl, data, opts)) .catch(error => { throw new Error(`Could not load texture from ${src}: ${error}`); }); } return new Promise(resolve =...
[ "function", "getTexture", "(", "gl", ",", "src", ",", "opts", ")", "{", "if", "(", "typeof", "src", "===", "'string'", ")", "{", "// Url, load the image", "return", "loadImage", "(", "src", ")", ".", "then", "(", "data", "=>", "getTextureFromData", "(", ...
/* Load image data into luma.gl Texture2D objects @param {WebGLContext} gl @param {String|Texture2D|HTMLImageElement|Uint8ClampedArray} src - source of image data can be url string, Texture2D object, HTMLImageElement or pixel array @returns {Promise} resolves to an object with name -> texture mapping
[ "/", "*", "Load", "image", "data", "into", "luma", ".", "gl", "Texture2D", "objects" ]
a2010448b7f268bbd03617b812334c68a6b9e5b2
https://github.com/uber/deck.gl/blob/a2010448b7f268bbd03617b812334c68a6b9e5b2/modules/mesh-layers/src/simple-mesh-layer/simple-mesh-layer.js#L54-L64
train
Get texture from image or url
[ 30522, 3853, 2131, 18209, 5397, 1006, 1043, 2140, 1010, 5034, 2278, 1010, 23569, 2015, 1007, 1063, 2065, 1006, 2828, 11253, 5034, 2278, 1027, 1027, 1027, 1005, 5164, 1005, 1007, 1063, 1013, 1013, 24471, 2140, 1010, 7170, 1996, 3746, 2709, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
TryGhost/Ghost
core/server/data/importer/index.js
function (importData) { var ops = []; _.each(this.importers, function (importer) { ops.push(function () { return importer.preProcess(importData); }); }); return pipeline(ops); }
javascript
function (importData) { var ops = []; _.each(this.importers, function (importer) { ops.push(function () { return importer.preProcess(importData); }); }); return pipeline(ops); }
[ "function", "(", "importData", ")", "{", "var", "ops", "=", "[", "]", ";", "_", ".", "each", "(", "this", ".", "importers", ",", "function", "(", "importer", ")", "{", "ops", ".", "push", "(", "function", "(", ")", "{", "return", "importer", ".", ...
Import Step 2: Pass the prepared importData through the preProcess function of the various importers, so that the importers can make any adjustments to the data based on relationships between it @param {ImportData} importData @returns {Promise(ImportData)}
[ "Import", "Step", "2", ":", "Pass", "the", "prepared", "importData", "through", "the", "preProcess", "function", "of", "the", "various", "importers", "so", "that", "the", "importers", "can", "make", "any", "adjustments", "to", "the", "data", "based", "on", "...
bb7bb55cf3e60af99ebbc56099928827b58461bc
https://github.com/TryGhost/Ghost/blob/bb7bb55cf3e60af99ebbc56099928827b58461bc/core/server/data/importer/index.js#L307-L316
train
Pre - process the given data
[ 30522, 3853, 1006, 12324, 2850, 2696, 1007, 1063, 13075, 23092, 1027, 1031, 1033, 1025, 1035, 1012, 2169, 1006, 2023, 1012, 12324, 2545, 1010, 3853, 1006, 12324, 2121, 1007, 1063, 23092, 1012, 5245, 1006, 3853, 1006, 1007, 1063, 2709, 12324...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dcloudio/mui
examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js
function (bin) { var str = ""; for(var i = 0; i < bin.length * 32; i += 8) { str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & 255); } return str; }
javascript
function (bin) { var str = ""; for(var i = 0; i < bin.length * 32; i += 8) { str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & 255); } return str; }
[ "function", "(", "bin", ")", "{", "var", "str", "=", "\"\"", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "bin", ".", "length", "*", "32", ";", "i", "+=", "8", ")", "{", "str", "+=", "String", ".", "fromCharCode", "(", "(", "bin", ...
/* Convert an array of little-endian words to a string
[ "/", "*", "Convert", "an", "array", "of", "little", "-", "endian", "words", "to", "a", "string" ]
ff74c90a1671a552f3604b1288bf38a4126312d0
https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js#L316-L323
train
Returns a string of the contents of a binary array of words
[ 30522, 3853, 1006, 8026, 1007, 1063, 13075, 2358, 2099, 1027, 1000, 1000, 1025, 2005, 1006, 13075, 1045, 1027, 1014, 1025, 1045, 1026, 8026, 1012, 3091, 1008, 3590, 1025, 1045, 1009, 1027, 1022, 1007, 1063, 2358, 2099, 1009, 1027, 5164, 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...
exceljs/exceljs
lib/xlsx/xform/style/styles-xform.js
function(formatCode) { // check if default format var index = NumFmtXform.getDefaultFmtId(formatCode); if (index !== undefined) return index; // check if already in index = this.index.numFmt[formatCode]; if (index !== undefined) return index; index = this.index.numFmt[formatCode] = NUMFMT...
javascript
function(formatCode) { // check if default format var index = NumFmtXform.getDefaultFmtId(formatCode); if (index !== undefined) return index; // check if already in index = this.index.numFmt[formatCode]; if (index !== undefined) return index; index = this.index.numFmt[formatCode] = NUMFMT...
[ "function", "(", "formatCode", ")", "{", "// check if default format", "var", "index", "=", "NumFmtXform", ".", "getDefaultFmtId", "(", "formatCode", ")", ";", "if", "(", "index", "!==", "undefined", ")", "return", "index", ";", "// check if already in", "index", ...
========================================================================= Number Formats
[ "=========================================================================", "Number", "Formats" ]
c6ee7a14d5e0e5a07bf0e475aa4dd7b9a1e907f2
https://github.com/exceljs/exceljs/blob/c6ee7a14d5e0e5a07bf0e475aa4dd7b9a1e907f2/lib/xlsx/xform/style/styles-xform.js#L349-L363
train
returns the index of the format code in the model
[ 30522, 3853, 1006, 4289, 16044, 1007, 1063, 1013, 1013, 4638, 2065, 12398, 4289, 13075, 5950, 1027, 16371, 2213, 16715, 2102, 2595, 14192, 1012, 2131, 3207, 7011, 11314, 16715, 3775, 2094, 1006, 4289, 16044, 1007, 1025, 2065, 1006, 5950, 99...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/filesystem/impls/appshell/AppshellFileSystem.js
readFile
function readFile(path, options, callback) { var encoding = options.encoding || "utf8"; // callback to be executed when the call to stat completes // or immediately if a stat object was passed as an argument function doReadFile(stat) { if (stat.size > (FileUtils.MAX_FILE_SI...
javascript
function readFile(path, options, callback) { var encoding = options.encoding || "utf8"; // callback to be executed when the call to stat completes // or immediately if a stat object was passed as an argument function doReadFile(stat) { if (stat.size > (FileUtils.MAX_FILE_SI...
[ "function", "readFile", "(", "path", ",", "options", ",", "callback", ")", "{", "var", "encoding", "=", "options", ".", "encoding", "||", "\"utf8\"", ";", "// callback to be executed when the call to stat completes", "// or immediately if a stat object was passed as an argum...
Read the contents of the file at the given path, calling back asynchronously with either a FileSystemError string, or with the data and the FileSystemStats object associated with the read file. The options parameter can be used to specify an encoding (default "utf8"), and also a cached stats object that the implementat...
[ "Read", "the", "contents", "of", "the", "file", "at", "the", "given", "path", "calling", "back", "asynchronously", "with", "either", "a", "FileSystemError", "string", "or", "with", "the", "data", "and", "the", "FileSystemStats", "object", "associated", "with", ...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/filesystem/impls/appshell/AppshellFileSystem.js#L363-L393
train
readFile - Reads a file
[ 30522, 3853, 3191, 8873, 2571, 1006, 4130, 1010, 7047, 1010, 2655, 5963, 1007, 1063, 13075, 17181, 1027, 7047, 1012, 17181, 1064, 1064, 1000, 21183, 2546, 2620, 1000, 1025, 1013, 1013, 2655, 5963, 2000, 2022, 6472, 2043, 1996, 2655, 2000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.fl/src/sap/ui/fl/FlexControllerFactory.js
_propagateChangesForAppComponent
function _propagateChangesForAppComponent (oAppComponent, vConfig) { // only manifest with type = "application" will fetch changes var oManifest = oAppComponent.getManifestObject(); var oFlexController; oFlexController = FlexControllerFactory.createForControl(oAppComponent, oManifest); return ChangePersistenc...
javascript
function _propagateChangesForAppComponent (oAppComponent, vConfig) { // only manifest with type = "application" will fetch changes var oManifest = oAppComponent.getManifestObject(); var oFlexController; oFlexController = FlexControllerFactory.createForControl(oAppComponent, oManifest); return ChangePersistenc...
[ "function", "_propagateChangesForAppComponent", "(", "oAppComponent", ",", "vConfig", ")", "{", "// only manifest with type = \"application\" will fetch changes", "var", "oManifest", "=", "oAppComponent", ".", "getManifestObject", "(", ")", ";", "var", "oFlexController", ";",...
Sets propagation changes and listeners on the passed app component. Also creates a variant model on this app component. @see sap.ui.fl.variant.VariantModel @param {sap.ui.core.Component} oAppComponent - App component instance @param {object} vConfig - Configuration of app component @return {Promise} Promise which reso...
[ "Sets", "propagation", "changes", "and", "listeners", "on", "the", "passed", "app", "component", ".", "Also", "creates", "a", "variant", "model", "on", "this", "app", "component", ".", "@see", "sap", ".", "ui", ".", "fl", ".", "variant", ".", "VariantModel...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/FlexControllerFactory.js#L120-L133
train
propagates changes to the variant model
[ 30522, 3853, 1035, 17678, 16098, 15007, 22043, 22747, 6525, 9397, 9006, 29513, 3372, 1006, 1051, 29098, 9006, 29513, 3372, 1010, 18315, 2239, 8873, 2290, 1007, 1063, 1013, 1013, 2069, 19676, 2007, 2828, 1027, 1000, 4646, 1000, 2097, 18584, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
NetEase/pomelo
lib/util/appUtil.js
function(app) { var filePath = path.join(app.getBase(), Constants.FILEPATH.SERVER_DIR, app.serverType, Constants.FILEPATH.LIFECYCLE); if(!fs.existsSync(filePath)) { return; } var lifecycle = require(filePath); for(var key in lifecycle) { if(typeof lifecycle[key] === 'function') { app.lifecycleCb...
javascript
function(app) { var filePath = path.join(app.getBase(), Constants.FILEPATH.SERVER_DIR, app.serverType, Constants.FILEPATH.LIFECYCLE); if(!fs.existsSync(filePath)) { return; } var lifecycle = require(filePath); for(var key in lifecycle) { if(typeof lifecycle[key] === 'function') { app.lifecycleCb...
[ "function", "(", "app", ")", "{", "var", "filePath", "=", "path", ".", "join", "(", "app", ".", "getBase", "(", ")", ",", "Constants", ".", "FILEPATH", ".", "SERVER_DIR", ",", "app", ".", "serverType", ",", "Constants", ".", "FILEPATH", ".", "LIFECYCLE...
Load lifecycle file.
[ "Load", "lifecycle", "file", "." ]
defcf019631ed399cc4dad932d3b028a04a039a4
https://github.com/NetEase/pomelo/blob/defcf019631ed399cc4dad932d3b028a04a039a4/lib/util/appUtil.js#L249-L262
train
Load lifecycle. js
[ 30522, 3853, 1006, 10439, 1007, 1063, 13075, 5371, 15069, 1027, 4130, 1012, 3693, 1006, 10439, 1012, 2131, 15058, 1006, 1007, 1010, 5377, 2015, 1012, 5371, 15069, 1012, 8241, 1035, 16101, 1010, 10439, 1012, 8241, 13874, 1010, 5377, 2015, 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...
chartjs/Chart.js
src/core/core.tooltip.js
determineAlignment
function determineAlignment(tooltip, size) { var model = tooltip._model; var chart = tooltip._chart; var chartArea = tooltip._chart.chartArea; var xAlign = 'center'; var yAlign = 'center'; if (model.y < size.height) { yAlign = 'top'; } else if (model.y > (chart.height - size.height)) { yAlign = 'bottom'; }...
javascript
function determineAlignment(tooltip, size) { var model = tooltip._model; var chart = tooltip._chart; var chartArea = tooltip._chart.chartArea; var xAlign = 'center'; var yAlign = 'center'; if (model.y < size.height) { yAlign = 'top'; } else if (model.y > (chart.height - size.height)) { yAlign = 'bottom'; }...
[ "function", "determineAlignment", "(", "tooltip", ",", "size", ")", "{", "var", "model", "=", "tooltip", ".", "_model", ";", "var", "chart", "=", "tooltip", ".", "_chart", ";", "var", "chartArea", "=", "tooltip", ".", "_chart", ".", "chartArea", ";", "va...
Helper to get the alignment of a tooltip given the size
[ "Helper", "to", "get", "the", "alignment", "of", "a", "tooltip", "given", "the", "size" ]
f093c36574d290330ed623e60fbd070421c730d5
https://github.com/chartjs/Chart.js/blob/f093c36574d290330ed623e60fbd070421c730d5/src/core/core.tooltip.js#L354-L422
train
Determines the alignment of the tooltip.
[ 30522, 3853, 5646, 11475, 16206, 3672, 1006, 6994, 25101, 1010, 2946, 1007, 1063, 13075, 2944, 1027, 6994, 25101, 1012, 1035, 2944, 1025, 13075, 3673, 1027, 6994, 25101, 1012, 1035, 3673, 1025, 13075, 3673, 12069, 2050, 1027, 6994, 25101, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/v4/ODataMetaModel.js
addMapping
function addMapping(mValueListMapping, sQualifier, sMappingUrl, oModel) { if (bFixedValues !== undefined && "SearchSupported" in mValueListMapping) { throw new Error("Must not set 'SearchSupported' in annotation " + "'com.sap.vocabularies.Common.v1.ValueList' and annotation " + "'com.sap.vocabulari...
javascript
function addMapping(mValueListMapping, sQualifier, sMappingUrl, oModel) { if (bFixedValues !== undefined && "SearchSupported" in mValueListMapping) { throw new Error("Must not set 'SearchSupported' in annotation " + "'com.sap.vocabularies.Common.v1.ValueList' and annotation " + "'com.sap.vocabulari...
[ "function", "addMapping", "(", "mValueListMapping", ",", "sQualifier", ",", "sMappingUrl", ",", "oModel", ")", "{", "if", "(", "bFixedValues", "!==", "undefined", "&&", "\"SearchSupported\"", "in", "mValueListMapping", ")", "{", "throw", "new", "Error", "(", "\"...
/* Adds the given mapping to oValueListInfo. @param {object} mValueListMapping The mapping @param {string} sQualifier The mapping qualifier @param {string} sMappingUrl The mapping URL (for error messages) @param {sap.ui.model.odata.v4.ODataModel} oModel The value list model @throws {Error} If there is already a mappin...
[ "/", "*", "Adds", "the", "given", "mapping", "to", "oValueListInfo", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/ODataMetaModel.js#L2729-L2756
train
Adds a mapping to the value list
[ 30522, 3853, 5587, 2863, 14853, 1006, 19842, 2389, 16284, 2923, 2863, 14853, 1010, 5490, 8787, 18095, 1010, 15488, 29098, 2075, 3126, 2140, 1010, 18168, 10244, 2140, 1007, 1063, 2065, 1006, 28939, 7646, 2098, 10175, 15808, 999, 1027, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dcloudio/mui
examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js
function (html) { var fragment = document.createElement('body'); // force the browser to try and fix any invalid HTML tags fragment.innerHTML = html; // copy cleaned html into an xml dom var xhtml = Strophe.createHtml(fragment); while(xhtml.childNodes.len...
javascript
function (html) { var fragment = document.createElement('body'); // force the browser to try and fix any invalid HTML tags fragment.innerHTML = html; // copy cleaned html into an xml dom var xhtml = Strophe.createHtml(fragment); while(xhtml.childNodes.len...
[ "function", "(", "html", ")", "{", "var", "fragment", "=", "document", ".", "createElement", "(", "'body'", ")", ";", "// force the browser to try and fix any invalid HTML tags\r", "fragment", ".", "innerHTML", "=", "html", ";", "// copy cleaned html into an xml dom\r", ...
Function: h Replace current element contents with the HTML passed in. This *does not* make the child the new current element Parameters: (String) html - The html to insert as contents of current element. Returns: The Strophe.Builder object.
[ "Function", ":", "h", "Replace", "current", "element", "contents", "with", "the", "HTML", "passed", "in", "." ]
ff74c90a1671a552f3604b1288bf38a4126312d0
https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js#L1758-L1772
train
Creates a new dom object from the given html string
[ 30522, 3853, 1006, 16129, 1007, 1063, 13075, 15778, 1027, 6254, 1012, 3443, 12260, 3672, 1006, 1005, 2303, 1005, 1007, 1025, 1013, 1013, 2486, 1996, 16602, 2000, 3046, 1998, 8081, 2151, 19528, 16129, 22073, 15778, 1012, 5110, 11039, 19968, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/JavaScriptRefactoring/ExtractToFunction.js
handleExtractToFunction
function handleExtractToFunction() { var editor = EditorManager.getActiveEditor(); var result = new $.Deferred(); // used only for testing purpose if (editor.getSelections().length > 1) { editor.displayErrorMessageAtCursor(Strings.ERROR_EXTRACTTO_FUNCTION_MULTICURSORS); ...
javascript
function handleExtractToFunction() { var editor = EditorManager.getActiveEditor(); var result = new $.Deferred(); // used only for testing purpose if (editor.getSelections().length > 1) { editor.displayErrorMessageAtCursor(Strings.ERROR_EXTRACTTO_FUNCTION_MULTICURSORS); ...
[ "function", "handleExtractToFunction", "(", ")", "{", "var", "editor", "=", "EditorManager", ".", "getActiveEditor", "(", ")", ";", "var", "result", "=", "new", "$", ".", "Deferred", "(", ")", ";", "// used only for testing purpose", "if", "(", "editor", ".", ...
Main function that handles extract to function
[ "Main", "function", "that", "handles", "extract", "to", "function" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/JavaScriptRefactoring/ExtractToFunction.js#L265-L328
train
handleExtractToFunction - Extracts to function
[ 30522, 3853, 5047, 10288, 6494, 6593, 3406, 11263, 27989, 1006, 1007, 1063, 13075, 3559, 1027, 3559, 24805, 4590, 1012, 2131, 19620, 2098, 15660, 1006, 1007, 1025, 13075, 2765, 1027, 2047, 1002, 1012, 13366, 28849, 2094, 1006, 1007, 1025, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
postcss/autoprefixer
lib/hacks/grid-utils.js
getGridGap
function getGridGap (decl) { let gap = {} // try to find gap let testGap = /^(grid-)?((row|column)-)?gap$/ decl.parent.walkDecls(testGap, ({ prop, value }) => { if (/^(grid-)?gap$/.test(prop)) { let [row,, column] = parser(value).nodes gap.row = row && parser.stringify(row) gap.column = ...
javascript
function getGridGap (decl) { let gap = {} // try to find gap let testGap = /^(grid-)?((row|column)-)?gap$/ decl.parent.walkDecls(testGap, ({ prop, value }) => { if (/^(grid-)?gap$/.test(prop)) { let [row,, column] = parser(value).nodes gap.row = row && parser.stringify(row) gap.column = ...
[ "function", "getGridGap", "(", "decl", ")", "{", "let", "gap", "=", "{", "}", "// try to find gap", "let", "testGap", "=", "/", "^(grid-)?((row|column)-)?gap$", "/", "decl", ".", "parent", ".", "walkDecls", "(", "testGap", ",", "(", "{", "prop", ",", "valu...
Gap utils
[ "Gap", "utils" ]
24b28b6dbdc34a5e5800986e76f48cbaf9bbbc32
https://github.com/postcss/autoprefixer/blob/24b28b6dbdc34a5e5800986e76f48cbaf9bbbc32/lib/hacks/grid-utils.js#L769-L786
train
Get grid gap
[ 30522, 3853, 2131, 16523, 3593, 3654, 2361, 1006, 11703, 2140, 1007, 1063, 2292, 6578, 1027, 1063, 1065, 1013, 1013, 3046, 2000, 2424, 6578, 2292, 3231, 3654, 2361, 1027, 1013, 1034, 1006, 8370, 1011, 1007, 1029, 1006, 1006, 5216, 1064, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js
stopHandler
function stopHandler( event ) { $this.unbind( touchMoveEvent, moveHandler ) .unbind( touchStopEvent, stopHandler ); if ( start && stop ) { $.event.special.swipe.handleSwipe( start, stop ); } start = stop = undefined; }
javascript
function stopHandler( event ) { $this.unbind( touchMoveEvent, moveHandler ) .unbind( touchStopEvent, stopHandler ); if ( start && stop ) { $.event.special.swipe.handleSwipe( start, stop ); } start = stop = undefined; }
[ "function", "stopHandler", "(", "event", ")", "{", "$this", ".", "unbind", "(", "touchMoveEvent", ",", "moveHandler", ")", ".", "unbind", "(", "touchStopEvent", ",", "stopHandler", ")", ";", "if", "(", "start", "&&", "stop", ")", "{", "$", ".", "event", ...
SAP MODIFICATION Because touchcancel is used together with touchend, jQuery.fn.bind is used to replace jQuery.fn.one due to the fact that jQuery.fn.one doesn't work for multiple events.
[ "SAP", "MODIFICATION", "Because", "touchcancel", "is", "used", "together", "with", "touchend", "jQuery", ".", "fn", ".", "bind", "is", "used", "to", "replace", "jQuery", ".", "fn", ".", "one", "due", "to", "the", "fact", "that", "jQuery", ".", "fn", ".",...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js#L2096-L2104
train
stop event handler
[ 30522, 3853, 2644, 11774, 3917, 1006, 2724, 1007, 1063, 1002, 2023, 1012, 4895, 8428, 2094, 1006, 3543, 5302, 3726, 18697, 3372, 1010, 2693, 11774, 3917, 1007, 1012, 4895, 8428, 2094, 1006, 3543, 16033, 5051, 15338, 1010, 2644, 11774, 3917,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/InlineTimingFunctionEditor/TimingFunctionUtils.js
stepsMatch
function stepsMatch(str, lax) { var match; // First look for any steps(). match = str.match(STEPS_VALID_REGEX); if (match && _validateStepsParams(match)) { // cubic-bezier() with valid params return _tagMatch(match, STEP); } match = str.match(STEPS_GENERAL_R...
javascript
function stepsMatch(str, lax) { var match; // First look for any steps(). match = str.match(STEPS_VALID_REGEX); if (match && _validateStepsParams(match)) { // cubic-bezier() with valid params return _tagMatch(match, STEP); } match = str.match(STEPS_GENERAL_R...
[ "function", "stepsMatch", "(", "str", ",", "lax", ")", "{", "var", "match", ";", "// First look for any steps().", "match", "=", "str", ".", "match", "(", "STEPS_VALID_REGEX", ")", ";", "if", "(", "match", "&&", "_validateStepsParams", "(", "match", ")", ")"...
Match a steps function value from a CSS Declaration or Value. Matches returned from this function must be handled in BezierCurveEditor._getCubicBezierCoords(). @param {string} str Input string. @param {!boolean} lax Parsing mode where: lax=false Input is a Full or partial line containing CSS Declaration. This is th...
[ "Match", "a", "steps", "function", "value", "from", "a", "CSS", "Declaration", "or", "Value", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/InlineTimingFunctionEditor/TimingFunctionUtils.js#L384-L420
train
Match a string to a step function
[ 30522, 3853, 4084, 18900, 2818, 1006, 2358, 2099, 1010, 27327, 1007, 1063, 13075, 2674, 1025, 1013, 1013, 2034, 2298, 2005, 2151, 4084, 1006, 1007, 1012, 2674, 1027, 2358, 2099, 1012, 2674, 1006, 4084, 1035, 9398, 1035, 19723, 10288, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/base/ManagedObject.js
canCreate
function canCreate(oBindingInfo) { var aParts = oBindingInfo.parts, i; if (aParts) { for (i = 0; i < aParts.length; i++) { if ( !that.getModel(aParts[i].model) ) { return false; } } return true; } else { // List or object binding return !!that.getModel(oBindingInfo.model); ...
javascript
function canCreate(oBindingInfo) { var aParts = oBindingInfo.parts, i; if (aParts) { for (i = 0; i < aParts.length; i++) { if ( !that.getModel(aParts[i].model) ) { return false; } } return true; } else { // List or object binding return !!that.getModel(oBindingInfo.model); ...
[ "function", "canCreate", "(", "oBindingInfo", ")", "{", "var", "aParts", "=", "oBindingInfo", ".", "parts", ",", "i", ";", "if", "(", "aParts", ")", "{", "for", "(", "i", "=", "0", ";", "i", "<", "aParts", ".", "length", ";", "i", "++", ")", "{",...
/* Checks whether a binding can be created for the given oBindingInfo @param oBindingInfo @returns {boolean}
[ "/", "*", "Checks", "whether", "a", "binding", "can", "be", "created", "for", "the", "given", "oBindingInfo" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/base/ManagedObject.js#L4188-L4202
train
Determines whether the binding can be created.
[ 30522, 3853, 2064, 16748, 3686, 1006, 27885, 22254, 2075, 2378, 14876, 1007, 1063, 13075, 4237, 2015, 1027, 27885, 22254, 2075, 2378, 14876, 1012, 3033, 1010, 1045, 1025, 2065, 1006, 4237, 2015, 1007, 1063, 2005, 1006, 1045, 1027, 1014, 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...
eslint/eslint
lib/rules/array-callback-return.js
isCallbackOfArrayMethod
function isCallbackOfArrayMethod(node) { let currentNode = node; while (currentNode) { const parent = currentNode.parent; switch (parent.type) { /* * Looks up the destination. e.g., * foo.every(nativeFoo || function foo() { ... }); */ ...
javascript
function isCallbackOfArrayMethod(node) { let currentNode = node; while (currentNode) { const parent = currentNode.parent; switch (parent.type) { /* * Looks up the destination. e.g., * foo.every(nativeFoo || function foo() { ... }); */ ...
[ "function", "isCallbackOfArrayMethod", "(", "node", ")", "{", "let", "currentNode", "=", "node", ";", "while", "(", "currentNode", ")", "{", "const", "parent", "=", "currentNode", ".", "parent", ";", "switch", "(", "parent", ".", "type", ")", "{", "/*\n ...
Checks whether or not a given node is a function expression which is the callback of an array method. @param {ASTNode} node - A node to check. This is one of FunctionExpression or ArrowFunctionExpression. @returns {boolean} `true` if the node is the callback of an array method.
[ "Checks", "whether", "or", "not", "a", "given", "node", "is", "a", "function", "expression", "which", "is", "the", "callback", "of", "an", "array", "method", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/array-callback-return.js#L73-L136
train
Checks if the node is a callback of an array method
[ 30522, 3853, 2003, 9289, 20850, 8684, 11253, 2906, 9447, 11368, 6806, 2094, 1006, 13045, 1007, 1063, 2292, 2783, 3630, 3207, 1027, 13045, 1025, 2096, 1006, 2783, 3630, 3207, 1007, 1063, 9530, 3367, 6687, 1027, 2783, 3630, 3207, 1012, 6687, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mui-org/material-ui
packages/material-ui-codemod/src/v1.0.0/color-imports.js
transformMemberImports
function transformMemberImports(j, root, importPath, targetPath) { // find member imports root.find(j.ImportDeclaration, { source: { value: importPath } }).forEach(importDeclaration => { const memberImportSpecifiers = importDeclaration.node.specifiers.filter( specifier => specifier.type === 'ImportSpecifi...
javascript
function transformMemberImports(j, root, importPath, targetPath) { // find member imports root.find(j.ImportDeclaration, { source: { value: importPath } }).forEach(importDeclaration => { const memberImportSpecifiers = importDeclaration.node.specifiers.filter( specifier => specifier.type === 'ImportSpecifi...
[ "function", "transformMemberImports", "(", "j", ",", "root", ",", "importPath", ",", "targetPath", ")", "{", "// find member imports", "root", ".", "find", "(", "j", ".", "ImportDeclaration", ",", "{", "source", ":", "{", "value", ":", "importPath", "}", "}"...
Replace all member imports. e.g. import { red, blue } from 'material-ui/styles/colors' @param {jscodeshift_api_object} j @param {jscodeshift_ast_object} root @param {string} importPath @param {string} targetPath
[ "Replace", "all", "member", "imports", ".", "e", ".", "g", ".", "import", "{", "red", "blue", "}", "from", "material", "-", "ui", "/", "styles", "/", "colors" ]
1555e52367835946382fbf2a8f681de71318915d
https://github.com/mui-org/material-ui/blob/1555e52367835946382fbf2a8f681de71318915d/packages/material-ui-codemod/src/v1.0.0/color-imports.js#L74-L122
train
transform member imports
[ 30522, 3853, 10938, 4168, 21784, 5714, 25378, 1006, 1046, 1010, 7117, 1010, 12324, 15069, 1010, 4539, 15069, 1007, 1063, 1013, 1013, 2424, 2266, 17589, 7117, 1012, 2424, 1006, 1046, 1012, 12324, 3207, 20464, 25879, 3258, 1010, 1063, 3120, 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...
getinsomnia/insomnia
packages/insomnia-importers/src/importers/swagger2.js
parseDocument
async function parseDocument(rawData) { try { return utils.unthrowableParseJson(rawData) || SwaggerParser.YAML.parse(rawData); } catch (err) { return null; } }
javascript
async function parseDocument(rawData) { try { return utils.unthrowableParseJson(rawData) || SwaggerParser.YAML.parse(rawData); } catch (err) { return null; } }
[ "async", "function", "parseDocument", "(", "rawData", ")", "{", "try", "{", "return", "utils", ".", "unthrowableParseJson", "(", "rawData", ")", "||", "SwaggerParser", ".", "YAML", ".", "parse", "(", "rawData", ")", ";", "}", "catch", "(", "err", ")", "{...
Parse string data into swagger 2.0 object (https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#swagger-object) @param {string} rawData @returns {Object|null} Swagger 2.0 object
[ "Parse", "string", "data", "into", "swagger", "2", ".", "0", "object", "(", "https", ":", "//", "github", ".", "com", "/", "OAI", "/", "OpenAPI", "-", "Specification", "/", "blob", "/", "master", "/", "versions", "/", "2", ".", "0", ".", "md#swagger"...
e24ce7f7b41246e700c4b9bdb6b34b6652ad589b
https://github.com/getinsomnia/insomnia/blob/e24ce7f7b41246e700c4b9bdb6b34b6652ad589b/packages/insomnia-importers/src/importers/swagger2.js#L78-L84
train
Parses a Swagger document
[ 30522, 2004, 6038, 2278, 3853, 11968, 6924, 10085, 27417, 2102, 1006, 6315, 2850, 2696, 1007, 1063, 3046, 1063, 2709, 21183, 12146, 1012, 4895, 2705, 10524, 3085, 19362, 3366, 22578, 2239, 1006, 6315, 2850, 2696, 1007, 1064, 1064, 25430, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/tmpl/HandlebarsTemplate.js
function(rm, oControl) { // execute the template with the above options var sHTML = fnTemplate(oControl.getContext() || {}, { data: { renderManager: rm, rootControl: oControl, view: oView }, helpers: HandlebarsTemplate.RENDER_HELPERS }); // write the markup rm.write(sHTML); ...
javascript
function(rm, oControl) { // execute the template with the above options var sHTML = fnTemplate(oControl.getContext() || {}, { data: { renderManager: rm, rootControl: oControl, view: oView }, helpers: HandlebarsTemplate.RENDER_HELPERS }); // write the markup rm.write(sHTML); ...
[ "function", "(", "rm", ",", "oControl", ")", "{", "// execute the template with the above options", "var", "sHTML", "=", "fnTemplate", "(", "oControl", ".", "getContext", "(", ")", "||", "{", "}", ",", "{", "data", ":", "{", "renderManager", ":", "rm", ",", ...
create the renderer for the control
[ "create", "the", "renderer", "for", "the", "control" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/tmpl/HandlebarsTemplate.js#L606-L621
train
Renders the template with the given context
[ 30522, 3853, 1006, 28549, 1010, 1051, 8663, 13181, 2140, 1007, 1063, 1013, 1013, 15389, 1996, 23561, 2007, 1996, 2682, 7047, 13075, 14021, 21246, 2140, 1027, 1042, 10111, 8737, 13806, 1006, 1051, 8663, 13181, 2140, 1012, 2131, 8663, 18209, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.fl/src/sap/ui/fl/Persistence.js
function(oControl, sStableIdPropertyName) { this._oControl = oControl; this._sStableIdPropertyName = sStableIdPropertyName || 'id'; this._sStableId = this._getStableId(); this._sComponentName = Utils.getComponentClassName(oControl); if (!this._sComponentName) { Utils.log.error("The Control does not belon...
javascript
function(oControl, sStableIdPropertyName) { this._oControl = oControl; this._sStableIdPropertyName = sStableIdPropertyName || 'id'; this._sStableId = this._getStableId(); this._sComponentName = Utils.getComponentClassName(oControl); if (!this._sComponentName) { Utils.log.error("The Control does not belon...
[ "function", "(", "oControl", ",", "sStableIdPropertyName", ")", "{", "this", ".", "_oControl", "=", "oControl", ";", "this", ".", "_sStableIdPropertyName", "=", "sStableIdPropertyName", "||", "'id'", ";", "this", ".", "_sStableId", "=", "this", ".", "_getStableI...
Helper object to access a change from the back end. Access helper object for each change (and variant) which was fetched from the back end @constructor @param {sap.ui.core.Control} oControl - the control for which the changes should be fetched @param {string} [sStableIdPropertyName='id'] the stable id @alias sap.ui.fl...
[ "Helper", "object", "to", "access", "a", "change", "from", "the", "back", "end", ".", "Access", "helper", "object", "for", "each", "change", "(", "and", "variant", ")", "which", "was", "fetched", "from", "the", "back", "end" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/Persistence.js#L25-L40
train
Initializes the control instance
[ 30522, 3853, 1006, 1051, 8663, 13181, 2140, 1010, 7020, 10880, 3593, 21572, 4842, 25680, 14074, 1007, 1063, 2023, 1012, 1035, 1051, 8663, 13181, 2140, 1027, 1051, 8663, 13181, 2140, 1025, 2023, 1012, 1035, 7020, 10880, 3593, 21572, 4842, 25...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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, iNewIndex) { if (!TableColumnUtils.isColumnMovableTo(oColumn, iNewIndex)) { return false; } var oTable = oColumn.getParent(), iCurrentIndex = oTable.indexOfColumn(oColumn); if (iNewIndex === iCurrentIndex) { return false; } iNewIndex = TableColumnUtils.normalizeColumnM...
javascript
function(oColumn, iNewIndex) { if (!TableColumnUtils.isColumnMovableTo(oColumn, iNewIndex)) { return false; } var oTable = oColumn.getParent(), iCurrentIndex = oTable.indexOfColumn(oColumn); if (iNewIndex === iCurrentIndex) { return false; } iNewIndex = TableColumnUtils.normalizeColumnM...
[ "function", "(", "oColumn", ",", "iNewIndex", ")", "{", "if", "(", "!", "TableColumnUtils", ".", "isColumnMovableTo", "(", "oColumn", ",", "iNewIndex", ")", ")", "{", "return", "false", ";", "}", "var", "oTable", "=", "oColumn", ".", "getParent", "(", ")...
Moves the column to the desired position. Note: The index must be given for the current table setup (which includes the column itself). @param {sap.ui.table.Column} oColumn Column of the table. @param {sap.ui.table.Column} iNewIndex the desired new index of the column in the current table setup. @returns {boolean} Wh...
[ "Moves", "the", "column", "to", "the", "desired", "position", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableColumnUtils.js#L490-L532
train
Moves the specified column to the specified index.
[ 30522, 3853, 1006, 1051, 25778, 2819, 2078, 1010, 1999, 7974, 22254, 10288, 1007, 1063, 2065, 1006, 999, 2795, 25778, 2819, 24072, 12146, 1012, 2003, 25778, 2819, 2078, 25661, 3406, 1006, 1051, 25778, 2819, 2078, 1010, 1999, 7974, 22254, 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...
pixijs/pixi.js
packages/graphics/src/utils/buildLine.js
buildNativeLine
function buildNativeLine(graphicsData, graphicsGeometry) { let i = 0; const points = graphicsData.points || graphicsData.shape.points; if (points.length === 0) return; const verts = graphicsGeometry.points; const indices = graphicsGeometry.indices; const length = points.length / 2; let i...
javascript
function buildNativeLine(graphicsData, graphicsGeometry) { let i = 0; const points = graphicsData.points || graphicsData.shape.points; if (points.length === 0) return; const verts = graphicsGeometry.points; const indices = graphicsGeometry.indices; const length = points.length / 2; let i...
[ "function", "buildNativeLine", "(", "graphicsData", ",", "graphicsGeometry", ")", "{", "let", "i", "=", "0", ";", "const", "points", "=", "graphicsData", ".", "points", "||", "graphicsData", ".", "shape", ".", "points", ";", "if", "(", "points", ".", "leng...
Builds a line to draw using the gl.drawArrays(gl.LINES) method Ignored from docs since it is not directly exposed. @ignore @private @param {PIXI.GraphicsData} graphicsData - The graphics object containing all the necessary properties @param {PIXI.GraphicsGeometry} graphicsGeometry - Geometry where to append output
[ "Builds", "a", "line", "to", "draw", "using", "the", "gl", ".", "drawArrays", "(", "gl", ".", "LINES", ")", "method" ]
99ae03b7565ae7ca5a6de633b0a277f7128fa4d0
https://github.com/pixijs/pixi.js/blob/99ae03b7565ae7ca5a6de633b0a277f7128fa4d0/packages/graphics/src/utils/buildLine.js#L249-L278
train
Build a native line
[ 30522, 3853, 3857, 19833, 3512, 4179, 1006, 8389, 2850, 2696, 1010, 8389, 3351, 8462, 11129, 1007, 1063, 2292, 1045, 1027, 1014, 1025, 9530, 3367, 2685, 1027, 8389, 2850, 2696, 1012, 2685, 1064, 1064, 8389, 2850, 2696, 1012, 4338, 1012, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/filesystem/impls/appshell/AppshellFileSystem.js
watchPath
function watchPath(path, ignored, callback) { if (_isRunningOnWindowsXP) { callback(FileSystemError.NOT_SUPPORTED); return; } appshell.fs.isNetworkDrive(path, function (err, isNetworkDrive) { if (err || isNetworkDrive) { if (isNetworkDrive) { ...
javascript
function watchPath(path, ignored, callback) { if (_isRunningOnWindowsXP) { callback(FileSystemError.NOT_SUPPORTED); return; } appshell.fs.isNetworkDrive(path, function (err, isNetworkDrive) { if (err || isNetworkDrive) { if (isNetworkDrive) { ...
[ "function", "watchPath", "(", "path", ",", "ignored", ",", "callback", ")", "{", "if", "(", "_isRunningOnWindowsXP", ")", "{", "callback", "(", "FileSystemError", ".", "NOT_SUPPORTED", ")", ";", "return", ";", "}", "appshell", ".", "fs", ".", "isNetworkDrive...
Start providing change notifications for the file or directory at the given path, calling back asynchronously with a possibly null FileSystemError string when the initialization is complete. Notifications are provided using the changeCallback function provided by the initWatchers method. Note that change notifications ...
[ "Start", "providing", "change", "notifications", "for", "the", "file", "or", "directory", "at", "the", "given", "path", "calling", "back", "asynchronously", "with", "a", "possibly", "null", "FileSystemError", "string", "when", "the", "initialization", "is", "compl...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/filesystem/impls/appshell/AppshellFileSystem.js#L527-L544
train
watchPath - watch a path
[ 30522, 3853, 3422, 15069, 1006, 4130, 1010, 6439, 1010, 2655, 5963, 1007, 1063, 2065, 1006, 1035, 2003, 15532, 5582, 2239, 11101, 15568, 2595, 2361, 1007, 1063, 2655, 5963, 1006, 6764, 27268, 21382, 18933, 2099, 1012, 2025, 1035, 3569, 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...
ColorlibHQ/AdminLTE
bower_components/moment/src/locale/lb.js
eifelerRegelAppliesToNumber
function eifelerRegelAppliesToNumber(number) { number = parseInt(number, 10); if (isNaN(number)) { return false; } if (number < 0) { // Negative Number --> always true return true; } else if (number < 10) { // Only 1 digit if (4 <= number && number <= 7) { ...
javascript
function eifelerRegelAppliesToNumber(number) { number = parseInt(number, 10); if (isNaN(number)) { return false; } if (number < 0) { // Negative Number --> always true return true; } else if (number < 10) { // Only 1 digit if (4 <= number && number <= 7) { ...
[ "function", "eifelerRegelAppliesToNumber", "(", "number", ")", "{", "number", "=", "parseInt", "(", "number", ",", "10", ")", ";", "if", "(", "isNaN", "(", "number", ")", ")", "{", "return", "false", ";", "}", "if", "(", "number", "<", "0", ")", "{",...
Returns true if the word before the given number loses the '-n' ending. e.g. 'an 10 Deeg' but 'a 5 Deeg' @param number {integer} @returns {boolean}
[ "Returns", "true", "if", "the", "word", "before", "the", "given", "number", "loses", "the", "-", "n", "ending", ".", "e", ".", "g", ".", "an", "10", "Deeg", "but", "a", "5", "Deeg" ]
19113c3cbc19a7afe0cfd3158d647064d2d30661
https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/bower_components/moment/src/locale/lb.js#L39-L71
train
Check if a number is a valid eifeler regression formula
[ 30522, 3853, 1041, 29323, 3917, 2890, 12439, 29098, 21292, 2239, 29440, 1006, 2193, 1007, 1063, 2193, 1027, 11968, 20240, 3372, 1006, 2193, 1010, 2184, 1007, 1025, 2065, 1006, 3475, 2319, 1006, 2193, 1007, 1007, 1063, 2709, 6270, 1025, 1065...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
lovell/sharp
lib/output.js
toFormat
function toFormat (format, options) { if (is.object(format) && is.string(format.id)) { format = format.id; } if (format === 'jpg') format = 'jpeg'; if (!is.inArray(format, ['jpeg', 'png', 'webp', 'tiff', 'raw'])) { throw new Error('Unsupported output format ' + format); } return this[format](options...
javascript
function toFormat (format, options) { if (is.object(format) && is.string(format.id)) { format = format.id; } if (format === 'jpg') format = 'jpeg'; if (!is.inArray(format, ['jpeg', 'png', 'webp', 'tiff', 'raw'])) { throw new Error('Unsupported output format ' + format); } return this[format](options...
[ "function", "toFormat", "(", "format", ",", "options", ")", "{", "if", "(", "is", ".", "object", "(", "format", ")", "&&", "is", ".", "string", "(", "format", ".", "id", ")", ")", "{", "format", "=", "format", ".", "id", ";", "}", "if", "(", "f...
Force output to a given format. @example // Convert any input to PNG output const data = await sharp(input) .toFormat('png') .toBuffer(); @param {(String|Object)} format - as a String or an Object with an 'id' attribute @param {Object} options - output options @returns {Sharp} @throws {Error} unsupported format or op...
[ "Force", "output", "to", "a", "given", "format", "." ]
05d76eeadfe54713606a615185b2da047923406b
https://github.com/lovell/sharp/blob/05d76eeadfe54713606a615185b2da047923406b/lib/output.js#L461-L470
train
Convert image to specified format
[ 30522, 3853, 2000, 14192, 4017, 1006, 4289, 1010, 7047, 1007, 1063, 2065, 1006, 2003, 1012, 4874, 1006, 4289, 1007, 1004, 1004, 2003, 1012, 5164, 1006, 4289, 1012, 8909, 1007, 1007, 1063, 4289, 1027, 4289, 1012, 8909, 1025, 1065, 2065, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
facebook/create-react-app
packages/react-dev-utils/FileSizeReporter.js
printFileSizesAfterBuild
function printFileSizesAfterBuild( webpackStats, previousSizeMap, buildFolder, maxBundleGzipSize, maxChunkGzipSize ) { var root = previousSizeMap.root; var sizes = previousSizeMap.sizes; var assets = (webpackStats.stats || [webpackStats]) .map(stats => stats .toJson({ all: false, asset...
javascript
function printFileSizesAfterBuild( webpackStats, previousSizeMap, buildFolder, maxBundleGzipSize, maxChunkGzipSize ) { var root = previousSizeMap.root; var sizes = previousSizeMap.sizes; var assets = (webpackStats.stats || [webpackStats]) .map(stats => stats .toJson({ all: false, asset...
[ "function", "printFileSizesAfterBuild", "(", "webpackStats", ",", "previousSizeMap", ",", "buildFolder", ",", "maxBundleGzipSize", ",", "maxChunkGzipSize", ")", "{", "var", "root", "=", "previousSizeMap", ".", "root", ";", "var", "sizes", "=", "previousSizeMap", "."...
Prints a detailed summary of build files.
[ "Prints", "a", "detailed", "summary", "of", "build", "files", "." ]
57ef103440c24e41b0d7dc82b7ad7fc1dc817eca
https://github.com/facebook/create-react-app/blob/57ef103440c24e41b0d7dc82b7ad7fc1dc817eca/packages/react-dev-utils/FileSizeReporter.js#L27-L104
train
Print file sizes after build
[ 30522, 3853, 6140, 8873, 4244, 10057, 10354, 3334, 8569, 4014, 2094, 1006, 4773, 23947, 9153, 3215, 1010, 3025, 5332, 4371, 2863, 2361, 1010, 3857, 10371, 2121, 1010, 4098, 27265, 23115, 5831, 4523, 4697, 1010, 4098, 20760, 8950, 2290, 5831...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/vector-labels.js
pointStyleFunction
function pointStyleFunction(feature, resolution) { return new Style({ image: new CircleStyle({ radius: 10, fill: new Fill({color: 'rgba(255, 0, 0, 0.1)'}), stroke: new Stroke({color: 'red', width: 1}) }), text: createTextStyle(feature, resolution, myDom.points) }); }
javascript
function pointStyleFunction(feature, resolution) { return new Style({ image: new CircleStyle({ radius: 10, fill: new Fill({color: 'rgba(255, 0, 0, 0.1)'}), stroke: new Stroke({color: 'red', width: 1}) }), text: createTextStyle(feature, resolution, myDom.points) }); }
[ "function", "pointStyleFunction", "(", "feature", ",", "resolution", ")", "{", "return", "new", "Style", "(", "{", "image", ":", "new", "CircleStyle", "(", "{", "radius", ":", "10", ",", "fill", ":", "new", "Fill", "(", "{", "color", ":", "'rgba(255, 0, ...
Points
[ "Points" ]
f366eaea522388fb575b11010e69d309164baca7
https://github.com/openlayers/openlayers/blob/f366eaea522388fb575b11010e69d309164baca7/examples/vector-labels.js#L171-L180
train
Creates a style object for a point feature
[ 30522, 3853, 2685, 27983, 11263, 27989, 1006, 3444, 1010, 5813, 1007, 1063, 2709, 2047, 2806, 1006, 1063, 3746, 1024, 2047, 7925, 27983, 1006, 1063, 12177, 1024, 2184, 1010, 6039, 1024, 2047, 6039, 1006, 1063, 3609, 1024, 1005, 1054, 18259,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/controls/InteractionTree.js
initializePopOverSapStatisticsData
function initializePopOverSapStatisticsData() { var $element = jQuery(this); var $requestLi = $element.parents('li[data-request-index]'); var $interactionLi = $element.parents('li[data-interaction-index]'); var interactionIndex = parseInt($interactionLi.attr('data-...
javascript
function initializePopOverSapStatisticsData() { var $element = jQuery(this); var $requestLi = $element.parents('li[data-request-index]'); var $interactionLi = $element.parents('li[data-interaction-index]'); var interactionIndex = parseInt($interactionLi.attr('data-...
[ "function", "initializePopOverSapStatisticsData", "(", ")", "{", "var", "$element", "=", "jQuery", "(", "this", ")", ";", "var", "$requestLi", "=", "$element", ".", "parents", "(", "'li[data-request-index]'", ")", ";", "var", "$interactionLi", "=", "$element", "...
/* eslint-enable no-loop-func
[ "/", "*", "eslint", "-", "enable", "no", "-", "loop", "-", "func" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/controls/InteractionTree.js#L554-L600
train
Initializes the statistics data for the popover
[ 30522, 3853, 3988, 4697, 16340, 24302, 9331, 9153, 16774, 6558, 2850, 2696, 1006, 1007, 1063, 13075, 1002, 5783, 1027, 1046, 4226, 2854, 1006, 2023, 1007, 1025, 13075, 1002, 5227, 3669, 1027, 1002, 5783, 1012, 3008, 1006, 1005, 5622, 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...
SheetJS/js-xlsx
xlsx.js
parse_Font
function parse_Font(blob, length, opts) { var o = { dyHeight: blob.read_shift(2), fl: blob.read_shift(2) }; switch((opts && opts.biff) || 8) { case 2: break; case 3: case 4: blob.l += 2; break; default: blob.l += 10; break; } o.name = parse_ShortXLUnicodeString(blob, 0, opts); return o; }
javascript
function parse_Font(blob, length, opts) { var o = { dyHeight: blob.read_shift(2), fl: blob.read_shift(2) }; switch((opts && opts.biff) || 8) { case 2: break; case 3: case 4: blob.l += 2; break; default: blob.l += 10; break; } o.name = parse_ShortXLUnicodeString(blob, 0, opts); return o; }
[ "function", "parse_Font", "(", "blob", ",", "length", ",", "opts", ")", "{", "var", "o", "=", "{", "dyHeight", ":", "blob", ".", "read_shift", "(", "2", ")", ",", "fl", ":", "blob", ".", "read_shift", "(", "2", ")", "}", ";", "switch", "(", "(", ...
/* [MS-XLS] 2.4.122 TODO
[ "/", "*", "[", "MS", "-", "XLS", "]", "2", ".", "4", ".", "122", "TODO" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L5938-L5950
train
Parse a font
[ 30522, 3853, 11968, 3366, 1035, 15489, 1006, 1038, 4135, 2497, 1010, 3091, 1010, 23569, 2015, 1007, 1063, 13075, 1051, 1027, 1063, 1040, 2100, 26036, 13900, 1024, 1038, 4135, 2497, 1012, 3191, 1035, 5670, 1006, 1016, 1007, 1010, 13109, 1024...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ccxt/ccxt
build/transpile.js
overwriteFile
function overwriteFile (filename, contents) { // log.cyan ('Overwriting → ' + filename.yellow) fs.closeSync (fs.openSync (filename, 'a')); fs.truncateSync (filename) fs.writeFileSync (filename, contents) }
javascript
function overwriteFile (filename, contents) { // log.cyan ('Overwriting → ' + filename.yellow) fs.closeSync (fs.openSync (filename, 'a')); fs.truncateSync (filename) fs.writeFileSync (filename, contents) }
[ "function", "overwriteFile", "(", "filename", ",", "contents", ")", "{", "// log.cyan ('Overwriting → ' + filename.yellow)", "fs", ".", "closeSync", "(", "fs", ".", "openSync", "(", "filename", ",", "'a'", ")", ")", ";", "fs", ".", "truncateSync", "(", "filename...
-----------------------------------------------------------------------------
[ "-----------------------------------------------------------------------------" ]
8168069b9180a465532905e225586215e115a565
https://github.com/ccxt/ccxt/blob/8168069b9180a465532905e225586215e115a565/build/transpile.js#L758-L763
train
overwrite file with contents
[ 30522, 3853, 2058, 26373, 8873, 2571, 1006, 5371, 18442, 1010, 8417, 1007, 1063, 1013, 1013, 8833, 1012, 22330, 2319, 1006, 1005, 2058, 18560, 1585, 1005, 1009, 5371, 18442, 1012, 3756, 30524, 1037, 1005, 1007, 1007, 1025, 1042, 2015, 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...
grpc/grpc-node
packages/grpc-native-core/src/client_interceptors.js
_startBatchIfReady
function _startBatchIfReady(call, batch, batch_state, callback) { var completed_ops = batch_state.completed_ops; var deferred_batches = batch_state.deferred_batches; var batch_ops = Object.keys(batch).map(Number); if (_areBatchRequirementsMet(batch_ops, completed_ops)) { // Dependencies are met, start the b...
javascript
function _startBatchIfReady(call, batch, batch_state, callback) { var completed_ops = batch_state.completed_ops; var deferred_batches = batch_state.deferred_batches; var batch_ops = Object.keys(batch).map(Number); if (_areBatchRequirementsMet(batch_ops, completed_ops)) { // Dependencies are met, start the b...
[ "function", "_startBatchIfReady", "(", "call", ",", "batch", ",", "batch_state", ",", "callback", ")", "{", "var", "completed_ops", "=", "batch_state", ".", "completed_ops", ";", "var", "deferred_batches", "=", "batch_state", ".", "deferred_batches", ";", "var", ...
Enforces the order of operations for synchronous requests. If a batch's operations cannot be started because required operations have not started yet, the batch is deferred until requirements are met. @private @param {grpc.Client~Call} call @param {object} batch @param {object} batch_state @param {number[]} [batch_stat...
[ "Enforces", "the", "order", "of", "operations", "for", "synchronous", "requests", ".", "If", "a", "batch", "s", "operations", "cannot", "be", "started", "because", "required", "operations", "have", "not", "started", "yet", "the", "batch", "is", "deferred", "un...
b36b285f4cdb334bbd48f74c12c13bec69961488
https://github.com/grpc/grpc-node/blob/b36b285f4cdb334bbd48f74c12c13bec69961488/packages/grpc-native-core/src/client_interceptors.js#L745-L773
train
Starts the batch if the batch requirements are met
[ 30522, 3853, 1035, 2707, 14479, 5428, 19699, 13775, 2100, 1006, 2655, 1010, 14108, 1010, 14108, 1035, 2110, 1010, 2655, 5963, 1007, 1063, 13075, 2949, 1035, 23092, 1027, 14108, 1035, 2110, 1012, 2949, 1035, 23092, 1025, 13075, 13366, 28849, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/select/select.js
showBackdrop
function showBackdrop(scope, element, options) { // If we are not within a dialog... if (options.disableParentScroll && !$mdUtil.getClosest(options.target, 'MD-DIALOG')) { // !! DO this before creating the backdrop; since disableScrollAround() // configures the scroll offset; whi...
javascript
function showBackdrop(scope, element, options) { // If we are not within a dialog... if (options.disableParentScroll && !$mdUtil.getClosest(options.target, 'MD-DIALOG')) { // !! DO this before creating the backdrop; since disableScrollAround() // configures the scroll offset; whi...
[ "function", "showBackdrop", "(", "scope", ",", "element", ",", "options", ")", "{", "// If we are not within a dialog...", "if", "(", "options", ".", "disableParentScroll", "&&", "!", "$mdUtil", ".", "getClosest", "(", "options", ".", "target", ",", "'MD-DIALOG'",...
Show modal backdrop element...
[ "Show", "modal", "backdrop", "element", "..." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/select/select.js#L1360-L1386
train
Show the modal backdrop
[ 30522, 3853, 2265, 5963, 25711, 1006, 9531, 1010, 5783, 1010, 7047, 1007, 1063, 1013, 1013, 2065, 2057, 2024, 2025, 2306, 1037, 13764, 8649, 1012, 1012, 1012, 2065, 1006, 7047, 1012, 4487, 19150, 19362, 11187, 26775, 14511, 1004, 1004, 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...
google/draco
docs/assets/js/ASCIIMathML.js
initSymbols
function initSymbols() { var i; var symlen = AMsymbols.length; for (i=0; i<symlen; i++) { if (AMsymbols[i].tex) { AMsymbols.push({input:AMsymbols[i].tex, tag:AMsymbols[i].tag, output:AMsymbols[i].output, ttype:AMsymbols[i].ttype, acc:(AMsymbols[i].acc||false)}); } } refreshSymbo...
javascript
function initSymbols() { var i; var symlen = AMsymbols.length; for (i=0; i<symlen; i++) { if (AMsymbols[i].tex) { AMsymbols.push({input:AMsymbols[i].tex, tag:AMsymbols[i].tag, output:AMsymbols[i].output, ttype:AMsymbols[i].ttype, acc:(AMsymbols[i].acc||false)}); } } refreshSymbo...
[ "function", "initSymbols", "(", ")", "{", "var", "i", ";", "var", "symlen", "=", "AMsymbols", ".", "length", ";", "for", "(", "i", "=", "0", ";", "i", "<", "symlen", ";", "i", "++", ")", "{", "if", "(", "AMsymbols", "[", "i", "]", ".", "tex", ...
list of input symbols
[ "list", "of", "input", "symbols" ]
785c9c4aa2b952236c29ad639901dbbaf216da38
https://github.com/google/draco/blob/785c9c4aa2b952236c29ad639901dbbaf216da38/docs/assets/js/ASCIIMathML.js#L475-L486
train
init AMsymbols
[ 30522, 3853, 1999, 12762, 24335, 14956, 2015, 1006, 1007, 1063, 13075, 1045, 1025, 13075, 25353, 19968, 2368, 1027, 2572, 6508, 13344, 4877, 1012, 3091, 1025, 2005, 1006, 1045, 1027, 1014, 1025, 1045, 1026, 25353, 19968, 2368, 1025, 1045, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
BlackrockDigital/startbootstrap-sb-admin-2
vendor/chart.js/Chart.js
function(tickValue, index, ticks) { // If we have lots of ticks, don't use the ones var delta = ticks.length > 3 ? ticks[2] - ticks[1] : ticks[1] - ticks[0]; // If we have a number like 2.5 as the delta, figure out how many decimal places we need if (Math.abs(delta) > 1) { if (tickValue !== Math.floor(...
javascript
function(tickValue, index, ticks) { // If we have lots of ticks, don't use the ones var delta = ticks.length > 3 ? ticks[2] - ticks[1] : ticks[1] - ticks[0]; // If we have a number like 2.5 as the delta, figure out how many decimal places we need if (Math.abs(delta) > 1) { if (tickValue !== Math.floor(...
[ "function", "(", "tickValue", ",", "index", ",", "ticks", ")", "{", "// If we have lots of ticks, don't use the ones", "var", "delta", "=", "ticks", ".", "length", ">", "3", "?", "ticks", "[", "2", "]", "-", "ticks", "[", "1", "]", ":", "ticks", "[", "1"...
Formatter for linear numeric ticks @method Chart.Ticks.formatters.linear @param tickValue {number} the value to be formatted @param index {number} the position of the tickValue parameter in the ticks array @param ticks {number[]} the list of ticks being converted @return {string} string representation of the tickValue ...
[ "Formatter", "for", "linear", "numeric", "ticks" ]
ddfaceb4a8e65a41f163e2fdc4eab49384b810a1
https://github.com/BlackrockDigital/startbootstrap-sb-admin-2/blob/ddfaceb4a8e65a41f163e2fdc4eab49384b810a1/vendor/chart.js/Chart.js#L10087-L10117
train
Calculate the string representation of a tick
[ 30522, 3853, 1006, 16356, 10175, 5657, 1010, 5950, 1010, 16356, 2015, 1007, 1063, 1013, 1013, 2065, 2057, 2031, 7167, 1997, 16356, 2015, 1010, 2123, 1005, 1056, 2224, 1996, 3924, 13075, 7160, 1027, 16356, 2015, 1012, 3091, 1028, 1017, 1029,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.layout/src/sap/ui/layout/form/FormElement.js
_updateLabelFor
function _updateLabelFor(){ var aFields = this.getFields(); var oField = aFields.length > 0 ? aFields[0] : null; var oLabel = this._oLabel; if (oLabel) { oLabel.setLabelFor(oField); // as Label is internal of FormElement, we can use original labelFor } else { oLabel = this.getLabel(); if (oLabel ins...
javascript
function _updateLabelFor(){ var aFields = this.getFields(); var oField = aFields.length > 0 ? aFields[0] : null; var oLabel = this._oLabel; if (oLabel) { oLabel.setLabelFor(oField); // as Label is internal of FormElement, we can use original labelFor } else { oLabel = this.getLabel(); if (oLabel ins...
[ "function", "_updateLabelFor", "(", ")", "{", "var", "aFields", "=", "this", ".", "getFields", "(", ")", ";", "var", "oField", "=", "aFields", ".", "length", ">", "0", "?", "aFields", "[", "0", "]", ":", "null", ";", "var", "oLabel", "=", "this", "...
/* Update the for association of the related label
[ "/", "*", "Update", "the", "for", "association", "of", "the", "related", "label" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.layout/src/sap/ui/layout/form/FormElement.js#L449-L462
train
Updates the label for the given field
[ 30522, 3853, 1035, 10651, 20470, 2884, 29278, 1006, 30524, 1012, 2131, 15155, 1006, 1007, 1025, 13075, 1997, 12891, 1027, 28697, 14273, 2015, 1012, 3091, 1028, 1014, 1029, 28697, 14273, 2015, 1031, 1014, 1033, 1024, 19701, 1025, 13075, 19330,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
examples/radio/radio.js
function() { var self = this; // Get the Howl we want to manipulate. var sound = self.stations[self.index].howl; // Toggle the display. self.toggleStationDisplay(self.index, false); // Stop the sound. if (sound) { sound.unload(); } }
javascript
function() { var self = this; // Get the Howl we want to manipulate. var sound = self.stations[self.index].howl; // Toggle the display. self.toggleStationDisplay(self.index, false); // Stop the sound. if (sound) { sound.unload(); } }
[ "function", "(", ")", "{", "var", "self", "=", "this", ";", "// Get the Howl we want to manipulate.", "var", "sound", "=", "self", ".", "stations", "[", "self", ".", "index", "]", ".", "howl", ";", "// Toggle the display.", "self", ".", "toggleStationDisplay", ...
Stop a station's live stream.
[ "Stop", "a", "station", "s", "live", "stream", "." ]
030db918dd8ce640afd57e172418472497e8f113
https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/examples/radio/radio.js#L81-L94
train
Unload the station sound
[ 30522, 3853, 1006, 1007, 1063, 13075, 2969, 1027, 2023, 1025, 1013, 1013, 2131, 1996, 22912, 2057, 2215, 2000, 17708, 1012, 13075, 2614, 1027, 2969, 1012, 3703, 1031, 2969, 1012, 5950, 1033, 1012, 22912, 1025, 1013, 1013, 2000, 24679, 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...
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/downloads.js
downloadManager_waitForDownloadState
function downloadManager_waitForDownloadState(download, state, timeout) { this._controller.waitForEval("subject.manager.getDownloadState(subject.download) == subject.state", timeout, 100, {manager: this, download: download, state: state}); }
javascript
function downloadManager_waitForDownloadState(download, state, timeout) { this._controller.waitForEval("subject.manager.getDownloadState(subject.download) == subject.state", timeout, 100, {manager: this, download: download, state: state}); }
[ "function", "downloadManager_waitForDownloadState", "(", "download", ",", "state", ",", "timeout", ")", "{", "this", ".", "_controller", ".", "waitForEval", "(", "\"subject.manager.getDownloadState(subject.download) == subject.state\"", ",", "timeout", ",", "100", ",", "{...
Wait for the given download state @param {MozMillController} controller MozMillController of the window to operate on @param {downloadState} state Expected state of the download @param {number} timeout Timeout for waiting for the download state (optional)
[ "Wait", "for", "the", "given", "download", "state" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/downloads.js#L329-L332
train
Wait until the download state is in the given state
[ 30522, 3853, 8816, 24805, 4590, 1035, 3524, 3877, 12384, 11066, 9153, 2618, 1006, 8816, 1010, 2110, 1010, 2051, 5833, 1007, 1063, 2023, 1012, 1035, 11486, 1012, 3524, 29278, 13331, 2140, 1006, 1000, 3395, 1012, 3208, 1012, 2131, 7698, 11066...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/LiveDevelopment/LiveDevelopment.js
open
function open(restart) { // If close() is still pending, wait for close to finish before opening if (_isPromisePending(_closeDeferred)) { return _closeDeferred.then(function () { return open(restart); }); } if (!restart) { // Return ex...
javascript
function open(restart) { // If close() is still pending, wait for close to finish before opening if (_isPromisePending(_closeDeferred)) { return _closeDeferred.then(function () { return open(restart); }); } if (!restart) { // Return ex...
[ "function", "open", "(", "restart", ")", "{", "// If close() is still pending, wait for close to finish before opening", "if", "(", "_isPromisePending", "(", "_closeDeferred", ")", ")", "{", "return", "_closeDeferred", ".", "then", "(", "function", "(", ")", "{", "ret...
Open the Connection and go live @param {!boolean} restart true if relaunching and _openDeferred already exists @return {jQuery.Promise} Resolves once live preview is open
[ "Open", "the", "Connection", "and", "go", "live" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/LiveDevelopment/LiveDevelopment.js#L1335-L1398
train
Open Live Preview
[ 30522, 3853, 2330, 1006, 23818, 1007, 1063, 1013, 1013, 2065, 2485, 1006, 1007, 2003, 2145, 14223, 1010, 3524, 2005, 2485, 2000, 3926, 2077, 3098, 2065, 1006, 1035, 2003, 21572, 28732, 11837, 4667, 1006, 1035, 2701, 27235, 20529, 1007, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/base/ManagedObject.js
update
function update(oControl, aContexts, fnBefore, fnAfter) { var aChildren = oControl[oAggregationInfo._sGetter]() || [], oContext, oClone; if (aChildren.length > aContexts.length) { for (var i = aContexts.length; i < aChildren.length; i++) { oClone = aChildren[i]; oControl[oAggregationInfo._sR...
javascript
function update(oControl, aContexts, fnBefore, fnAfter) { var aChildren = oControl[oAggregationInfo._sGetter]() || [], oContext, oClone; if (aChildren.length > aContexts.length) { for (var i = aContexts.length; i < aChildren.length; i++) { oClone = aChildren[i]; oControl[oAggregationInfo._sR...
[ "function", "update", "(", "oControl", ",", "aContexts", ",", "fnBefore", ",", "fnAfter", ")", "{", "var", "aChildren", "=", "oControl", "[", "oAggregationInfo", ".", "_sGetter", "]", "(", ")", "||", "[", "]", ",", "oContext", ",", "oClone", ";", "if", ...
Update a single aggregation with the array of contexts. Reuse existing children and just append or remove at the end, if some are missing or too many.
[ "Update", "a", "single", "aggregation", "with", "the", "array", "of", "contexts", ".", "Reuse", "existing", "children", "and", "just", "append", "or", "remove", "at", "the", "end", "if", "some", "are", "missing", "or", "too", "many", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/base/ManagedObject.js#L3970-L3998
train
Updates the binding context of the control
[ 30522, 3853, 10651, 1006, 1051, 8663, 13181, 2140, 1010, 9353, 28040, 18413, 2015, 1010, 1042, 27698, 12879, 5686, 1010, 1042, 2532, 6199, 2121, 1007, 1063, 13075, 9353, 19466, 16200, 2078, 1027, 1051, 8663, 13181, 2140, 1031, 1051, 8490, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/NavigationAndHistory/main.js
_makeMROFListEntry
function _makeMROFListEntry(path, pane, cursorPos) { return { file: path, paneId: pane, cursor: cursorPos }; }
javascript
function _makeMROFListEntry(path, pane, cursorPos) { return { file: path, paneId: pane, cursor: cursorPos }; }
[ "function", "_makeMROFListEntry", "(", "path", ",", "pane", ",", "cursorPos", ")", "{", "return", "{", "file", ":", "path", ",", "paneId", ":", "pane", ",", "cursor", ":", "cursorPos", "}", ";", "}" ]
Creates an entry for MROF list @private @param {String} path - full path of a doc @param {String} pane - the pane holding the editor for the doc @param {Object} cursorPos - current cursor position @return {Object} a frame containing file path, pane and last known cursor
[ "Creates", "an", "entry", "for", "MROF", "list" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/NavigationAndHistory/main.js#L139-L145
train
make MROFListEntry - make an entry for a MROF
[ 30522, 3853, 1035, 2191, 2213, 3217, 10258, 27870, 3372, 2854, 1006, 4130, 1010, 6090, 2063, 1010, 12731, 25301, 14536, 2891, 1007, 1063, 2709, 1063, 5371, 1024, 4130, 1010, 6090, 7416, 2094, 1024, 6090, 2063, 1010, 12731, 25301, 2099, 1024...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-js
lib/resource_waiter.js
loadWaiterConfig
function loadWaiterConfig(state) { if (!this.service.api.waiters[state]) { throw new AWS.util.error(new Error(), { code: 'StateNotFoundError', message: 'State ' + state + ' not found.' }); } this.config = AWS.util.copy(this.service.api.waiters[state]); }
javascript
function loadWaiterConfig(state) { if (!this.service.api.waiters[state]) { throw new AWS.util.error(new Error(), { code: 'StateNotFoundError', message: 'State ' + state + ' not found.' }); } this.config = AWS.util.copy(this.service.api.waiters[state]); }
[ "function", "loadWaiterConfig", "(", "state", ")", "{", "if", "(", "!", "this", ".", "service", ".", "api", ".", "waiters", "[", "state", "]", ")", "{", "throw", "new", "AWS", ".", "util", ".", "error", "(", "new", "Error", "(", ")", ",", "{", "c...
Loads waiter configuration from API configuration @api private
[ "Loads", "waiter", "configuration", "from", "API", "configuration" ]
c23e5f0edd150f8885267e5f7c8a564f8e6e8562
https://github.com/aws/aws-sdk-js/blob/c23e5f0edd150f8885267e5f7c8a564f8e6e8562/lib/resource_waiter.js#L194-L203
train
Load the waiter config for a given state
[ 30522, 3853, 7170, 29601, 29566, 2078, 8873, 2290, 1006, 2110, 1007, 1063, 2065, 1006, 999, 2023, 1012, 2326, 1012, 17928, 1012, 15610, 2015, 1031, 2110, 1033, 1007, 1063, 5466, 2047, 22091, 2015, 1012, 21183, 4014, 1012, 7561, 1006, 2047, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
lovell/sharp
lib/colour.js
toColourspace
function toColourspace (colourspace) { if (!is.string(colourspace)) { throw new Error('Invalid output colourspace ' + colourspace); } this.options.colourspace = colourspace; return this; }
javascript
function toColourspace (colourspace) { if (!is.string(colourspace)) { throw new Error('Invalid output colourspace ' + colourspace); } this.options.colourspace = colourspace; return this; }
[ "function", "toColourspace", "(", "colourspace", ")", "{", "if", "(", "!", "is", ".", "string", "(", "colourspace", ")", ")", "{", "throw", "new", "Error", "(", "'Invalid output colourspace '", "+", "colourspace", ")", ";", "}", "this", ".", "options", "."...
Set the output colourspace. By default output image will be web-friendly sRGB, with additional channels interpreted as alpha channels. @param {String} [colourspace] - output colourspace e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://github.com/libvips/libvips/blob/master/libvips/iofuncs/enumtypes.c#L568) @retur...
[ "Set", "the", "output", "colourspace", ".", "By", "default", "output", "image", "will", "be", "web", "-", "friendly", "sRGB", "with", "additional", "channels", "interpreted", "as", "alpha", "channels", "." ]
05d76eeadfe54713606a615185b2da047923406b
https://github.com/lovell/sharp/blob/05d76eeadfe54713606a615185b2da047923406b/lib/colour.js#L64-L70
train
Convert the colourspace to a colourspace
[ 30522, 3853, 2000, 25778, 22957, 15327, 1006, 8604, 15327, 1007, 1063, 2065, 1006, 999, 2003, 1012, 5164, 1006, 8604, 15327, 1007, 1007, 1063, 5466, 2047, 7561, 1006, 1005, 19528, 6434, 8604, 15327, 1005, 1009, 8604, 15327, 1007, 1025, 1065...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/utils/DragAndDrop.js
stopURIListPropagation
function stopURIListPropagation(files, event) { var types = event.dataTransfer.types; if ((!files || !files.length) && types) { // We only want to check if a string of text was dragged into the editor types.forEach(function (value) { //Dragging text externally (d...
javascript
function stopURIListPropagation(files, event) { var types = event.dataTransfer.types; if ((!files || !files.length) && types) { // We only want to check if a string of text was dragged into the editor types.forEach(function (value) { //Dragging text externally (d...
[ "function", "stopURIListPropagation", "(", "files", ",", "event", ")", "{", "var", "types", "=", "event", ".", "dataTransfer", ".", "types", ";", "if", "(", "(", "!", "files", "||", "!", "files", ".", "length", ")", "&&", "types", ")", "{", "// We only...
Determines if the event contains a type list that has a URI-list. If it does and contains an empty file list, then what is being dropped is a URL. If that is true then we stop the event propagation and default behavior to save Brackets editor from the browser taking over. @param {Array.<File>} files Array of File objec...
[ "Determines", "if", "the", "event", "contains", "a", "type", "list", "that", "has", "a", "URI", "-", "list", ".", "If", "it", "does", "and", "contains", "an", "empty", "file", "list", "then", "what", "is", "being", "dropped", "is", "a", "URL", ".", "...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/utils/DragAndDrop.js#L72-L88
train
Stop propagation of URI list
[ 30522, 3853, 2644, 9496, 9863, 21572, 4502, 12540, 1006, 6764, 1010, 2724, 1007, 1063, 13075, 4127, 1027, 2724, 1012, 2951, 6494, 3619, 7512, 1012, 4127, 1025, 2065, 1006, 1006, 999, 6764, 1064, 1064, 999, 6764, 1012, 3091, 1007, 1004, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/base/ManagedObjectObserver.js
remove
function remove(oTarget, oListener, oConfiguration) { oConfiguration = oConfiguration || getConfiguration(oTarget, oListener); updateConfiguration(oTarget, oListener, oConfiguration, true); }
javascript
function remove(oTarget, oListener, oConfiguration) { oConfiguration = oConfiguration || getConfiguration(oTarget, oListener); updateConfiguration(oTarget, oListener, oConfiguration, true); }
[ "function", "remove", "(", "oTarget", ",", "oListener", ",", "oConfiguration", ")", "{", "oConfiguration", "=", "oConfiguration", "||", "getConfiguration", "(", "oTarget", ",", "oListener", ")", ";", "updateConfiguration", "(", "oTarget", ",", "oListener", ",", ...
removes the given configuration for the given listener from the internal list of observed targets mTargets. removes the observer from the target managed object if the target hasn't to be observed any longer
[ "removes", "the", "given", "configuration", "for", "the", "given", "listener", "from", "the", "internal", "list", "of", "observed", "targets", "mTargets", ".", "removes", "the", "observer", "from", "the", "target", "managed", "object", "if", "the", "target", "...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/base/ManagedObjectObserver.js#L481-L484
train
Removes the specified event listener from the target.
[ 30522, 3853, 6366, 1006, 27178, 2906, 18150, 1010, 19330, 27870, 3678, 1010, 1051, 8663, 8873, 27390, 3370, 1007, 1063, 1051, 8663, 8873, 27390, 3370, 1027, 1051, 8663, 8873, 27390, 3370, 1064, 1064, 2131, 8663, 8873, 27390, 3370, 1006, 271...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-echarts
src/model/Series.js
function (dataType) { var task = getCurrentTask(this); if (task) { var data = task.context.data; return dataType == null ? data : data.getLinkedData(dataType); } else { // When series is not alive (that may happen when click toolbox // rest...
javascript
function (dataType) { var task = getCurrentTask(this); if (task) { var data = task.context.data; return dataType == null ? data : data.getLinkedData(dataType); } else { // When series is not alive (that may happen when click toolbox // rest...
[ "function", "(", "dataType", ")", "{", "var", "task", "=", "getCurrentTask", "(", "this", ")", ";", "if", "(", "task", ")", "{", "var", "data", "=", "task", ".", "context", ".", "data", ";", "return", "dataType", "==", "null", "?", "data", ":", "da...
Consider some method like `filter`, `map` need make new data, We should make sure that `seriesModel.getData()` get correct data in the stream procedure. So we fetch data from upstream each time `task.perform` called. @param {string} [dataType] @return {module:echarts/data/List}
[ "Consider", "some", "method", "like", "filter", "map", "need", "make", "new", "data", "We", "should", "make", "sure", "that", "seriesModel", ".", "getData", "()", "get", "correct", "data", "in", "the", "stream", "procedure", ".", "So", "we", "fetch", "data...
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/model/Series.js#L230-L243
train
Get the data for the current series
[ 30522, 3853, 1006, 2951, 13874, 1007, 1063, 13075, 4708, 1027, 2131, 10841, 14343, 3372, 10230, 2243, 1006, 2023, 1007, 1025, 2065, 1006, 4708, 1007, 1063, 13075, 2951, 1027, 4708, 1012, 6123, 1012, 2951, 1025, 2709, 2951, 13874, 1027, 1027...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/AnalyticalBinding.js
getAdditionalSelects
function getAdditionalSelects(oBinding) { var oAnalyticalQueryRequest = new odata4analytics.QueryResultRequest(oBinding.oAnalyticalQueryResult), aComputedSelect, sComputedSelect, oDimension, i, j, oMeasure, n, sPropertyName, aSelect = oBinding.mParameters.select.split(","), bError = ...
javascript
function getAdditionalSelects(oBinding) { var oAnalyticalQueryRequest = new odata4analytics.QueryResultRequest(oBinding.oAnalyticalQueryResult), aComputedSelect, sComputedSelect, oDimension, i, j, oMeasure, n, sPropertyName, aSelect = oBinding.mParameters.select.split(","), bError = ...
[ "function", "getAdditionalSelects", "(", "oBinding", ")", "{", "var", "oAnalyticalQueryRequest", "=", "new", "odata4analytics", ".", "QueryResultRequest", "(", "oBinding", ".", "oAnalyticalQueryResult", ")", ",", "aComputedSelect", ",", "sComputedSelect", ",", "oDimensi...
Checks whether the select binding parameter fits to the current analytical info and returns an array of properties that need to be added to leaf requests. If the select binding parameter does not fit to the current analytical info a warning is logged and the select binding parameter is ignored. Select binding parameter...
[ "Checks", "whether", "the", "select", "binding", "parameter", "fits", "to", "the", "current", "analytical", "info", "and", "returns", "an", "array", "of", "properties", "that", "need", "to", "be", "added", "to", "leaf", "requests", ".", "If", "the", "select"...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/AnalyticalBinding.js#L70-L144
train
This function is called to add additional select parameters to the query request
[ 30522, 3853, 2131, 4215, 27064, 11246, 22471, 2015, 1006, 27885, 22254, 2075, 1007, 1063, 13075, 1051, 27953, 21252, 2389, 4226, 2854, 2890, 15500, 1027, 2047, 1051, 2850, 2696, 2549, 27953, 21252, 2015, 1012, 23032, 6072, 11314, 2890, 15500,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
statsd/statsd
stats.js
loadBackend
function loadBackend(config, name) { var backendmod = require(name); if (config.debug) { l.log("Loading backend: " + name, 'DEBUG'); } var ret = backendmod.init(startup_time, config, backendEvents, l); if (!ret) { l.log("Failed to load backend: " + name, "ERROR"); process.exit(1); } }
javascript
function loadBackend(config, name) { var backendmod = require(name); if (config.debug) { l.log("Loading backend: " + name, 'DEBUG'); } var ret = backendmod.init(startup_time, config, backendEvents, l); if (!ret) { l.log("Failed to load backend: " + name, "ERROR"); process.exit(1); } }
[ "function", "loadBackend", "(", "config", ",", "name", ")", "{", "var", "backendmod", "=", "require", "(", "name", ")", ";", "if", "(", "config", ".", "debug", ")", "{", "l", ".", "log", "(", "\"Loading backend: \"", "+", "name", ",", "'DEBUG'", ")", ...
Load and init the backend from the backends/ directory.
[ "Load", "and", "init", "the", "backend", "from", "the", "backends", "/", "directory", "." ]
ef8e4d76d76c3a0cf771e3724cf79ea22f3c50d9
https://github.com/statsd/statsd/blob/ef8e4d76d76c3a0cf771e3724cf79ea22f3c50d9/stats.js#L35-L47
train
Load a backend
[ 30522, 3853, 7170, 5963, 10497, 1006, 9530, 8873, 2290, 1010, 2171, 1007, 1063, 13075, 2067, 10497, 5302, 2094, 1027, 5478, 1006, 2171, 1007, 1025, 2065, 1006, 9530, 8873, 2290, 1012, 2139, 8569, 2290, 1007, 1063, 1048, 1012, 8833, 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...
dimsemenov/PhotoSwipe
src/js/gestures.js
function(p1, p2) { _tempPoint.x = Math.abs( p1.x - p2.x ); _tempPoint.y = Math.abs( p1.y - p2.y ); return Math.sqrt(_tempPoint.x * _tempPoint.x + _tempPoint.y * _tempPoint.y); }
javascript
function(p1, p2) { _tempPoint.x = Math.abs( p1.x - p2.x ); _tempPoint.y = Math.abs( p1.y - p2.y ); return Math.sqrt(_tempPoint.x * _tempPoint.x + _tempPoint.y * _tempPoint.y); }
[ "function", "(", "p1", ",", "p2", ")", "{", "_tempPoint", ".", "x", "=", "Math", ".", "abs", "(", "p1", ".", "x", "-", "p2", ".", "x", ")", ";", "_tempPoint", ".", "y", "=", "Math", ".", "abs", "(", "p1", ".", "y", "-", "p2", ".", "y", ")...
amount of pixels to drag to determine direction of swipe
[ "amount", "of", "pixels", "to", "drag", "to", "determine", "direction", "of", "swipe" ]
80607e12542a1a54ecefa837649e862b35dffd25
https://github.com/dimsemenov/PhotoSwipe/blob/80607e12542a1a54ecefa837649e862b35dffd25/src/js/gestures.js#L59-L63
train
Returns the distance between two points
[ 30522, 3853, 1006, 1052, 2487, 1010, 1052, 2475, 1007, 1063, 1035, 8915, 8737, 8400, 1012, 1060, 1027, 8785, 1012, 14689, 1006, 1052, 2487, 1012, 1060, 1011, 1052, 2475, 1012, 1060, 1007, 1025, 1035, 8915, 8737, 8400, 1012, 1061, 1027, 87...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
grpc/grpc-node
packages/grpc-native-core/src/client_interceptors.js
_getBidiStreamingListener
function _getBidiStreamingListener(method_definition, emitter) { var deserialize = common.wrapIgnoreNull( method_definition.responseDeserialize); return { onReceiveMetadata: function (metadata) { emitter.emit('metadata', metadata); }, onReceiveMessage: function(message, next, context) { ...
javascript
function _getBidiStreamingListener(method_definition, emitter) { var deserialize = common.wrapIgnoreNull( method_definition.responseDeserialize); return { onReceiveMetadata: function (metadata) { emitter.emit('metadata', metadata); }, onReceiveMessage: function(message, next, context) { ...
[ "function", "_getBidiStreamingListener", "(", "method_definition", ",", "emitter", ")", "{", "var", "deserialize", "=", "common", ".", "wrapIgnoreNull", "(", "method_definition", ".", "responseDeserialize", ")", ";", "return", "{", "onReceiveMetadata", ":", "function"...
Produces a listener for responding to callers of bi-directional RPCs. @private @param {grpc~MethodDefinition} method_definition @param {EventEmitter} emitter @return {grpc~Listener}
[ "Produces", "a", "listener", "for", "responding", "to", "callers", "of", "bi", "-", "directional", "RPCs", "." ]
b36b285f4cdb334bbd48f74c12c13bec69961488
https://github.com/grpc/grpc-node/blob/b36b285f4cdb334bbd48f74c12c13bec69961488/packages/grpc-native-core/src/client_interceptors.js#L1284-L1309
train
Returns a listener that will be used to listen for messages from the server
[ 30522, 3853, 1035, 2131, 17062, 2923, 16416, 6562, 9863, 24454, 1006, 4118, 1035, 6210, 1010, 12495, 12079, 1007, 1063, 13075, 4078, 11610, 3669, 4371, 1027, 2691, 1012, 10236, 23773, 5686, 11231, 3363, 1006, 4118, 1035, 6210, 1012, 3433, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
javascript/selenium-core/scripts/ui-element.js
UISpecifier
function UISpecifier(uiSpecifierStringOrPagesetName, elementName, args) { /** * Initializes this object from a UI specifier string of the form: * * pagesetName::elementName(arg1=value1, arg2=value2, ...) * * into its component parts, and returns them as an object. * * @return ...
javascript
function UISpecifier(uiSpecifierStringOrPagesetName, elementName, args) { /** * Initializes this object from a UI specifier string of the form: * * pagesetName::elementName(arg1=value1, arg2=value2, ...) * * into its component parts, and returns them as an object. * * @return ...
[ "function", "UISpecifier", "(", "uiSpecifierStringOrPagesetName", ",", "elementName", ",", "args", ")", "{", "/**\n * Initializes this object from a UI specifier string of the form:\n *\n * pagesetName::elementName(arg1=value1, arg2=value2, ...)\n *\n * into its component...
The UISpecifier constructor is overloaded. If less than three arguments are provided, the first argument will be considered a UI specifier string, and will be split out accordingly. Otherwise, the first argument will be considered the path. @param uiSpecifierStringOrPagesetName a UI specifier string, or the pageset n...
[ "The", "UISpecifier", "constructor", "is", "overloaded", ".", "If", "less", "than", "three", "arguments", "are", "provided", "the", "first", "argument", "will", "be", "considered", "a", "UI", "specifier", "string", "and", "will", "be", "split", "out", "accordi...
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/ui-element.js#L603-L675
train
A UI specifier object
[ 30522, 3853, 21318, 13102, 8586, 18095, 1006, 21318, 13102, 8586, 28295, 18886, 16656, 14536, 13923, 3388, 18442, 1010, 5783, 18442, 1010, 12098, 5620, 1007, 1063, 1013, 1008, 1008, 1008, 3988, 10057, 2023, 4874, 2013, 1037, 21318, 28699, 180...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ecomfe/zrender
build/babel-plugin-transform-modules-commonjs-ec.js
normalizeModuleAndLoadMetadata
function normalizeModuleAndLoadMetadata(programPath) { nameAnonymousExports(programPath); const {local, source} = getModuleMetadata(programPath); removeModuleDeclarations(programPath); // Reuse the imported namespace name if there is one. for (const [, metadata] of source) { if (metadata...
javascript
function normalizeModuleAndLoadMetadata(programPath) { nameAnonymousExports(programPath); const {local, source} = getModuleMetadata(programPath); removeModuleDeclarations(programPath); // Reuse the imported namespace name if there is one. for (const [, metadata] of source) { if (metadata...
[ "function", "normalizeModuleAndLoadMetadata", "(", "programPath", ")", "{", "nameAnonymousExports", "(", "programPath", ")", ";", "const", "{", "local", ",", "source", "}", "=", "getModuleMetadata", "(", "programPath", ")", ";", "removeModuleDeclarations", "(", "pro...
Remove all imports and exports from the file, and return all metadata needed to reconstruct the module's behavior. @return {ModuleMetadata}
[ "Remove", "all", "imports", "and", "exports", "from", "the", "file", "and", "return", "all", "metadata", "needed", "to", "reconstruct", "the", "module", "s", "behavior", "." ]
30321b57cba3149c30eacb0c1e18276f0f001b9f
https://github.com/ecomfe/zrender/blob/30321b57cba3149c30eacb0c1e18276f0f001b9f/build/babel-plugin-transform-modules-commonjs-ec.js#L70-L93
train
Normalize the module and load the metadata
[ 30522, 3853, 3671, 4697, 5302, 8566, 20898, 19422, 10441, 22117, 12928, 2850, 2696, 1006, 2565, 15069, 1007, 1063, 2171, 6761, 4890, 27711, 10288, 25378, 1006, 2565, 15069, 1007, 1025, 9530, 3367, 1063, 2334, 1010, 3120, 1065, 1027, 2131, 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...
GeekyAnts/vue-native-core
packages/vue-native-helper/build.js
handleComponents
function handleComponents(components) { for (var k in components) { if (hasOwn$1(components, k)) { components[pascalCaseTag(k)] = components[k]; var c = components[k]; if (c.name) { components[pascalCaseTag(c.name)] = components[k]; } } } return components }
javascript
function handleComponents(components) { for (var k in components) { if (hasOwn$1(components, k)) { components[pascalCaseTag(k)] = components[k]; var c = components[k]; if (c.name) { components[pascalCaseTag(c.name)] = components[k]; } } } return components }
[ "function", "handleComponents", "(", "components", ")", "{", "for", "(", "var", "k", "in", "components", ")", "{", "if", "(", "hasOwn$1", "(", "components", ",", "k", ")", ")", "{", "components", "[", "pascalCaseTag", "(", "k", ")", "]", "=", "componen...
for options {components} @param {Object} components
[ "for", "options", "{", "components", "}" ]
a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e
https://github.com/GeekyAnts/vue-native-core/blob/a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e/packages/vue-native-helper/build.js#L1716-L1727
train
Handle the components object
[ 30522, 3853, 5047, 9006, 29513, 7666, 1006, 6177, 1007, 1063, 2005, 1006, 13075, 1047, 1999, 6177, 1007, 1063, 2065, 1006, 2038, 12384, 1002, 1015, 1006, 6177, 1010, 1047, 1007, 1007, 1063, 6177, 1031, 17878, 18382, 15900, 1006, 1047, 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...
ngrx/platform
projects/ngrx.io/tools/examples/run-example-e2e.js
getE2eSpecsFor
function getE2eSpecsFor(basePath, specFile, filter) { // Only get spec file at the example root. const e2eSpecGlob = `${filter ? `*${filter}*` : '*'}/${specFile}`; return globby(e2eSpecGlob, { cwd: basePath, nodir: true }) .then(paths => paths .filter(file => !IGNORED_EXAMPLES.some(ignored => file.start...
javascript
function getE2eSpecsFor(basePath, specFile, filter) { // Only get spec file at the example root. const e2eSpecGlob = `${filter ? `*${filter}*` : '*'}/${specFile}`; return globby(e2eSpecGlob, { cwd: basePath, nodir: true }) .then(paths => paths .filter(file => !IGNORED_EXAMPLES.some(ignored => file.start...
[ "function", "getE2eSpecsFor", "(", "basePath", ",", "specFile", ",", "filter", ")", "{", "// Only get spec file at the example root.", "const", "e2eSpecGlob", "=", "`", "${", "filter", "?", "`", "${", "filter", "}", "`", ":", "'*'", "}", "${", "specFile", "}",...
Find all e2e specs in a given example folder.
[ "Find", "all", "e2e", "specs", "in", "a", "given", "example", "folder", "." ]
eec9cc615440526ddedac04ae0082bfecef13d50
https://github.com/ngrx/platform/blob/eec9cc615440526ddedac04ae0082bfecef13d50/projects/ngrx.io/tools/examples/run-example-e2e.js#L296-L304
train
Get all the spec files that are in the example root
[ 30522, 3853, 2131, 2063, 2475, 2229, 5051, 6169, 29278, 1006, 2918, 15069, 1010, 28699, 8873, 2571, 1010, 11307, 1007, 1063, 1013, 1013, 2069, 2131, 28699, 5371, 2012, 1996, 30524, 2475, 2229, 5051, 2278, 23296, 16429, 1010, 1063, 19296, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/core/util/util.js
function(element, property, lValue, rValue) { var ltr = !($document[0].dir == 'rtl' || $document[0].body.dir == 'rtl'); // If accessor if (arguments.length == 0) return ltr ? 'ltr' : 'rtl'; // If mutator var elem = angular.element(element); if (ltr && angular.isDefined(lValue)) { ...
javascript
function(element, property, lValue, rValue) { var ltr = !($document[0].dir == 'rtl' || $document[0].body.dir == 'rtl'); // If accessor if (arguments.length == 0) return ltr ? 'ltr' : 'rtl'; // If mutator var elem = angular.element(element); if (ltr && angular.isDefined(lValue)) { ...
[ "function", "(", "element", ",", "property", ",", "lValue", ",", "rValue", ")", "{", "var", "ltr", "=", "!", "(", "$document", "[", "0", "]", ".", "dir", "==", "'rtl'", "||", "$document", "[", "0", "]", ".", "body", ".", "dir", "==", "'rtl'", ")"...
Bi-directional accessor/mutator used to easily update an element's property based on the current 'dir'ectional value.
[ "Bi", "-", "directional", "accessor", "/", "mutator", "used", "to", "easily", "update", "an", "element", "s", "property", "based", "on", "the", "current", "dir", "ectional", "value", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/util/util.js#L90-L105
train
Returns the value of the specified CSS property.
[ 30522, 3853, 1006, 5783, 1010, 3200, 1010, 1048, 10175, 5657, 1010, 27634, 2389, 5657, 1007, 1063, 13075, 8318, 2099, 1027, 999, 1006, 1002, 6254, 1031, 1014, 1033, 1012, 16101, 1027, 1027, 1005, 19387, 2140, 1005, 1064, 1064, 1002, 6254, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/core/services/gesture/gesture.js
gestureStart
function gestureStart(ev) { // If we're already touched down, abort if (pointer) return; var now = +Date.now(); // iOS & old android bug: after a touch event, a click event is sent 350 ms later. // If <400ms have passed, don't allow an event of a different type than the previous event if (last...
javascript
function gestureStart(ev) { // If we're already touched down, abort if (pointer) return; var now = +Date.now(); // iOS & old android bug: after a touch event, a click event is sent 350 ms later. // If <400ms have passed, don't allow an event of a different type than the previous event if (last...
[ "function", "gestureStart", "(", "ev", ")", "{", "// If we're already touched down, abort", "if", "(", "pointer", ")", "return", ";", "var", "now", "=", "+", "Date", ".", "now", "(", ")", ";", "// iOS & old android bug: after a touch event, a click event is sent 350 ms ...
/* gestureStart vets if a start event is legitimate (and not part of a 'ghost click' from iOS/Android) If it is legitimate, we initiate the pointer state and mark the current pointer's type For example, for a touchstart event, mark the current pointer as a 'touch' pointer, so mouse events won't effect it.
[ "/", "*", "gestureStart", "vets", "if", "a", "start", "event", "is", "legitimate", "(", "and", "not", "part", "of", "a", "ghost", "click", "from", "iOS", "/", "Android", ")", "If", "it", "is", "legitimate", "we", "initiate", "the", "pointer", "state", ...
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/services/gesture/gesture.js#L652-L667
train
This function is called when a touch event is triggered.
[ 30522, 3853, 18327, 7559, 2102, 1006, 23408, 1007, 1063, 1013, 1013, 2065, 2057, 1005, 2128, 2525, 5028, 2091, 1010, 11113, 11589, 2065, 1006, 20884, 1007, 2709, 1025, 13075, 2085, 1027, 1009, 3058, 1012, 2085, 1006, 1007, 1025, 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...
LLK/scratch-blocks
i18n/create_scratch_msgs.js
function (entry) { const re = /(%\d)/g; const [key, translation] = entry; const enMatch = en[key].match(re); const tMatch = translation.match(re); const enCount = enMatch ? enMatch.length : 0; const tCount = tMatch ? tMatch.length : 0; assert.strictEqual(tCount, enCount, `${key}:${en[key]} -...
javascript
function (entry) { const re = /(%\d)/g; const [key, translation] = entry; const enMatch = en[key].match(re); const tMatch = translation.match(re); const enCount = enMatch ? enMatch.length : 0; const tCount = tMatch ? tMatch.length : 0; assert.strictEqual(tCount, enCount, `${key}:${en[key]} -...
[ "function", "(", "entry", ")", "{", "const", "re", "=", "/", "(%\\d)", "/", "g", ";", "const", "[", "key", ",", "translation", "]", "=", "entry", ";", "const", "enMatch", "=", "en", "[", "key", "]", ".", "match", "(", "re", ")", ";", "const", "...
Check that translation is valid: entry: array [key, translation] corresponding to a single string from <locale>.json - messages with placeholders have the same number of placeholders - messages must not have newlines embedded
[ "Check", "that", "translation", "is", "valid", ":", "entry", ":", "array", "[", "key", "translation", "]", "corresponding", "to", "a", "single", "string", "from", "<locale", ">", ".", "json", "-", "messages", "with", "placeholders", "have", "the", "same", ...
455b2a854435c0a67da1da92320ddc3ec3e2b799
https://github.com/LLK/scratch-blocks/blob/455b2a854435c0a67da1da92320ddc3ec3e2b799/i18n/create_scratch_msgs.js#L18-L36
train
Check if entry is a valid key - value pair
[ 30522, 3853, 1006, 4443, 1007, 1063, 9530, 3367, 2128, 1027, 1013, 1006, 1003, 1032, 1040, 1007, 1013, 1043, 1025, 9530, 3367, 1031, 3145, 1010, 5449, 1033, 1027, 4443, 1025, 9530, 3367, 4372, 18900, 2818, 1027, 4372, 1031, 3145, 1033, 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
lib/rules/no-func-assign.js
checkReference
function checkReference(references) { astUtils.getModifyingReferences(references).forEach(reference => { context.report({ node: reference.identifier, message: "'{{name}}' is a function.", data: { name: reference.identifier.name } }); }); }
javascript
function checkReference(references) { astUtils.getModifyingReferences(references).forEach(reference => { context.report({ node: reference.identifier, message: "'{{name}}' is a function.", data: { name: reference.identifier.name } }); }); }
[ "function", "checkReference", "(", "references", ")", "{", "astUtils", ".", "getModifyingReferences", "(", "references", ")", ".", "forEach", "(", "reference", "=>", "{", "context", ".", "report", "(", "{", "node", ":", "reference", ".", "identifier", ",", "...
Reports a reference if is non initializer and writable. @param {References} references - Collection of reference to check. @returns {void}
[ "Reports", "a", "reference", "if", "is", "non", "initializer", "and", "writable", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-func-assign.js#L35-L39
train
Check that the reference is a function
[ 30522, 3853, 4638, 2890, 25523, 1006, 7604, 1007, 1063, 2004, 8525, 3775, 4877, 1012, 2131, 5302, 4305, 14116, 2890, 25523, 2015, 1006, 7604, 1007, 1012, 18921, 6776, 1006, 4431, 1027, 1028, 1063, 6123, 1012, 3189, 1006, 1063, 13045, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
getInputValue
function getInputValue(inputElement) { if (inputElement.type) { if (inputElement.type.toUpperCase() == 'CHECKBOX' || inputElement.type.toUpperCase() == 'RADIO') { return (inputElement.checked ? 'on' : 'off'); } } if (inputElement.value == null) { throw...
javascript
function getInputValue(inputElement) { if (inputElement.type) { if (inputElement.type.toUpperCase() == 'CHECKBOX' || inputElement.type.toUpperCase() == 'RADIO') { return (inputElement.checked ? 'on' : 'off'); } } if (inputElement.value == null) { throw...
[ "function", "getInputValue", "(", "inputElement", ")", "{", "if", "(", "inputElement", ".", "type", ")", "{", "if", "(", "inputElement", ".", "type", ".", "toUpperCase", "(", ")", "==", "'CHECKBOX'", "||", "inputElement", ".", "type", ".", "toUpperCase", "...
Get the value of an <input> element
[ "Get", "the", "value", "of", "an", "<input", ">", "element" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L269-L281
train
Get the value of an input element
[ 30522, 3853, 2131, 2378, 18780, 10175, 5657, 1006, 7953, 12260, 3672, 1007, 1063, 2065, 1006, 7953, 12260, 3672, 1012, 2828, 1007, 1063, 2065, 1006, 7953, 12260, 3672, 1012, 2828, 1012, 2000, 29547, 18992, 3366, 1006, 1007, 1027, 1027, 1005...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensibility/node/ExtensionManagerDomain.js
_removeFailedInstallation
function _removeFailedInstallation(installDirectory) { fs.remove(installDirectory, function (err) { if (err) { console.error("Error while removing directory after failed installation", installDirectory, err); } }); }
javascript
function _removeFailedInstallation(installDirectory) { fs.remove(installDirectory, function (err) { if (err) { console.error("Error while removing directory after failed installation", installDirectory, err); } }); }
[ "function", "_removeFailedInstallation", "(", "installDirectory", ")", "{", "fs", ".", "remove", "(", "installDirectory", ",", "function", "(", "err", ")", "{", "if", "(", "err", ")", "{", "console", ".", "error", "(", "\"Error while removing directory after faile...
Private function to remove the installation directory if the installation fails. This does not call any callbacks. It's assumed that the callback has already been called and this cleanup routine will do its best to complete in the background. If there's a problem here, it is simply logged with console.error. @param {s...
[ "Private", "function", "to", "remove", "the", "installation", "directory", "if", "the", "installation", "fails", ".", "This", "does", "not", "call", "any", "callbacks", ".", "It", "s", "assumed", "that", "the", "callback", "has", "already", "been", "called", ...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensibility/node/ExtensionManagerDomain.js#L74-L80
train
Remove the directory after failed installation
[ 30522, 3853, 1035, 6366, 7011, 18450, 7076, 9080, 13490, 1006, 16500, 4305, 2890, 16761, 2100, 1007, 1063, 1042, 2015, 1012, 6366, 1006, 16500, 4305, 2890, 16761, 2100, 1010, 3853, 1006, 9413, 2099, 1007, 1063, 2065, 1006, 9413, 2099, 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...
adobe/brackets
src/extensions/default/JavaScriptCodeHints/main.js
validIdOrProp
function validIdOrProp(token) { if (!token) { return false; } if (token.string === ".") { return true; } var type = token.type; if (type === "variable-2...
javascript
function validIdOrProp(token) { if (!token) { return false; } if (token.string === ".") { return true; } var type = token.type; if (type === "variable-2...
[ "function", "validIdOrProp", "(", "token", ")", "{", "if", "(", "!", "token", ")", "{", "return", "false", ";", "}", "if", "(", "token", ".", "string", "===", "\".\"", ")", "{", "return", "true", ";", "}", "var", "type", "=", "token", ".", "type", ...
helper function to decide if the tokens on the RHS of an assignment look like an identifier, or member expr.
[ "helper", "function", "to", "decide", "if", "the", "tokens", "on", "the", "RHS", "of", "an", "assignment", "look", "like", "an", "identifier", "or", "member", "expr", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/JavaScriptCodeHints/main.js#L787-L800
train
Check if token is valid ID or Prop
[ 30522, 3853, 9398, 13820, 14536, 18981, 1006, 19204, 1007, 1063, 2065, 1006, 999, 19204, 1007, 1063, 2709, 6270, 1025, 1065, 2065, 1006, 19204, 1012, 5164, 1027, 1027, 1027, 1000, 1012, 30524, 1000, 1064, 1064, 2828, 1027, 1027, 1027, 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...
aframevr/aframe
src/core/a-entity.js
checkComponentDefined
function checkComponentDefined (el, name) { // Check if element contains the component. if (el.components[name] && el.components[name].attrValue) { return true; } return isComponentMixedIn(name, el.mixinEls); }
javascript
function checkComponentDefined (el, name) { // Check if element contains the component. if (el.components[name] && el.components[name].attrValue) { return true; } return isComponentMixedIn(name, el.mixinEls); }
[ "function", "checkComponentDefined", "(", "el", ",", "name", ")", "{", "// Check if element contains the component.", "if", "(", "el", ".", "components", "[", "name", "]", "&&", "el", ".", "components", "[", "name", "]", ".", "attrValue", ")", "{", "return", ...
Check if a component is *defined* for an entity, including defaults and mixins. Does not check whether the component has been *initialized* for an entity. @param {string} el - Entity. @param {string} name - Component name. @returns {boolean}
[ "Check", "if", "a", "component", "is", "*", "defined", "*", "for", "an", "entity", "including", "defaults", "and", "mixins", ".", "Does", "not", "check", "whether", "the", "component", "has", "been", "*", "initialized", "*", "for", "an", "entity", "." ]
24acc78a7299a4cdfe3ef617f4d40ddf6275c992
https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/core/a-entity.js#L870-L875
train
Check if component defined
[ 30522, 3853, 4638, 9006, 29513, 3372, 3207, 23460, 2094, 1006, 3449, 1010, 2171, 1007, 1063, 1013, 1013, 4638, 2065, 5783, 3397, 1996, 6922, 1012, 2065, 1006, 3449, 1012, 6177, 1031, 2171, 1033, 1004, 1004, 3449, 1012, 6177, 1031, 2171, 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...
nhn/tui.editor
src/js/extensions/table/table.js
tableExtension
function tableExtension(editor) { const {eventManager} = editor; editor.toMarkOptions = editor.toMarkOptions || {}; editor.toMarkOptions.renderer = toMarkRenderer; _bindEvents(eventManager); if (editor.isViewer()) { return; } const wwComponentManager = editor.wwEditor.componentManager; const popu...
javascript
function tableExtension(editor) { const {eventManager} = editor; editor.toMarkOptions = editor.toMarkOptions || {}; editor.toMarkOptions.renderer = toMarkRenderer; _bindEvents(eventManager); if (editor.isViewer()) { return; } const wwComponentManager = editor.wwEditor.componentManager; const popu...
[ "function", "tableExtension", "(", "editor", ")", "{", "const", "{", "eventManager", "}", "=", "editor", ";", "editor", ".", "toMarkOptions", "=", "editor", ".", "toMarkOptions", "||", "{", "}", ";", "editor", ".", "toMarkOptions", ".", "renderer", "=", "t...
table extension @param {Editor} editor - editor instance @ignore
[ "table", "extension" ]
e75ab08c2a7ab07d1143e318f7cde135c5e3002e
https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/extensions/table/table.js#L28-L48
train
Table Extension.
[ 30522, 3853, 2795, 10288, 29048, 1006, 3559, 1007, 1063, 9530, 3367, 1063, 2724, 24805, 4590, 1065, 1027, 3559, 1025, 3559, 1012, 3419, 17007, 7361, 9285, 1027, 3559, 1012, 3419, 17007, 7361, 9285, 1064, 1064, 1063, 1065, 1025, 3559, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/toolbars.js
autoCompleteResults
function autoCompleteResults(controller) { this._controller = controller; this._popup = this.getElement({type: "popup"}); this._results = this.getElement({type: "results"}); }
javascript
function autoCompleteResults(controller) { this._controller = controller; this._popup = this.getElement({type: "popup"}); this._results = this.getElement({type: "results"}); }
[ "function", "autoCompleteResults", "(", "controller", ")", "{", "this", ".", "_controller", "=", "controller", ";", "this", ".", "_popup", "=", "this", ".", "getElement", "(", "{", "type", ":", "\"popup\"", "}", ")", ";", "this", ".", "_results", "=", "t...
Constructor @param {MozmillController} controller MozMillController of the window to operate on
[ "Constructor" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/toolbars.js#L64-L68
train
Auto complete results
[ 30522, 3853, 8285, 9006, 10814, 3334, 2229, 11314, 2015, 1006, 11486, 1007, 1063, 2023, 1012, 1035, 11486, 1027, 11486, 1025, 2023, 1012, 1035, 3769, 6279, 1027, 30524, 1006, 1063, 2828, 1024, 1000, 3463, 1000, 1065, 1007, 1025, 1065, 102, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/preferences/PreferencesManager.js
_toggleProjectScope
function _toggleProjectScope() { if (_includeProjectScope() === projectScopeIsIncluded) { return; } if (projectScopeIsIncluded) { PreferencesImpl.manager.removeFromScopeOrder("project"); } else { PreferencesImpl.manager.addToScopeOrder("project", "user...
javascript
function _toggleProjectScope() { if (_includeProjectScope() === projectScopeIsIncluded) { return; } if (projectScopeIsIncluded) { PreferencesImpl.manager.removeFromScopeOrder("project"); } else { PreferencesImpl.manager.addToScopeOrder("project", "user...
[ "function", "_toggleProjectScope", "(", ")", "{", "if", "(", "_includeProjectScope", "(", ")", "===", "projectScopeIsIncluded", ")", "{", "return", ";", "}", "if", "(", "projectScopeIsIncluded", ")", "{", "PreferencesImpl", ".", "manager", ".", "removeFromScopeOrd...
@private Adds or removes the project Scope as needed based on whether the currently edited file is within the project.
[ "@private" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/preferences/PreferencesManager.js#L81-L91
train
Toggles project scope
[ 30522, 3853, 1035, 2000, 24679, 21572, 20614, 26127, 1006, 1007, 1063, 2065, 1006, 1035, 2421, 21572, 20614, 26127, 1006, 1007, 1027, 1027, 1027, 3934, 16186, 17417, 12273, 7630, 5732, 1007, 1063, 2709, 1025, 1065, 2065, 1006, 3934, 16186, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
addWrappers
function addWrappers(ownerDocument) { var node, nodes = ownerDocument.getElementsByTagName('*'), index = nodes.length, reElements = RegExp('^(?:' + getElements().join('|') + ')$', 'i'), result = []; while (index--) { node = nodes[index]; if (reElements.test(node.node...
javascript
function addWrappers(ownerDocument) { var node, nodes = ownerDocument.getElementsByTagName('*'), index = nodes.length, reElements = RegExp('^(?:' + getElements().join('|') + ')$', 'i'), result = []; while (index--) { node = nodes[index]; if (reElements.test(node.node...
[ "function", "addWrappers", "(", "ownerDocument", ")", "{", "var", "node", ",", "nodes", "=", "ownerDocument", ".", "getElementsByTagName", "(", "'*'", ")", ",", "index", "=", "nodes", ".", "length", ",", "reElements", "=", "RegExp", "(", "'^(?:'", "+", "ge...
/*-------------------------------------------------------------------------- Wraps all HTML5 elements in the given document with printable elements. (eg. the "header" element is wrapped with the "html5shiv:header" element) @private @param {Document} ownerDocument The document. @returns {Array} An array wrappers added.
[ "/", "*", "--------------------------------------------------------------------------", "Wraps", "all", "HTML5", "elements", "in", "the", "given", "document", "with", "printable", "elements", ".", "(", "eg", ".", "the", "header", "element", "is", "wrapped", "with", "t...
a913e4992dad8f7bf38df2e1d3f4cc6bfe5f26dd
https://github.com/thomaspark/bootswatch/blob/a913e4992dad8f7bf38df2e1d3f4cc6bfe5f26dd/docs/3/bower_components/html5shiv/dist/html5shiv-printshiv.js#L352-L366
train
Adds all the wrapper elements to the document
[ 30522, 3853, 5587, 13088, 29098, 2545, 1006, 3954, 3527, 24894, 4765, 1007, 1063, 13075, 13045, 1010, 14164, 1027, 3954, 3527, 24894, 4765, 1012, 2131, 12260, 8163, 3762, 15900, 18442, 1006, 1005, 1008, 1005, 1007, 1010, 5950, 1027, 14164, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mochajs/mocha
lib/reporters/html.js
fragment
function fragment(html) { var args = arguments; var div = document.createElement('div'); var i = 1; div.innerHTML = html.replace(/%([se])/g, function(_, type) { switch (type) { case 's': return String(args[i++]); case 'e': return escape(args[i++]); // no default } })...
javascript
function fragment(html) { var args = arguments; var div = document.createElement('div'); var i = 1; div.innerHTML = html.replace(/%([se])/g, function(_, type) { switch (type) { case 's': return String(args[i++]); case 'e': return escape(args[i++]); // no default } })...
[ "function", "fragment", "(", "html", ")", "{", "var", "args", "=", "arguments", ";", "var", "div", "=", "document", ".", "createElement", "(", "'div'", ")", ";", "var", "i", "=", "1", ";", "div", ".", "innerHTML", "=", "html", ".", "replace", "(", ...
Return a DOM fragment from `html`. @param {string} html
[ "Return", "a", "DOM", "fragment", "from", "html", "." ]
9b00fedb610241e33f7592c40164e42a38a793cf
https://github.com/mochajs/mocha/blob/9b00fedb610241e33f7592c40164e42a38a793cf/lib/reporters/html.js#L321-L337
train
fragment - fragment
[ 30522, 3853, 15778, 1006, 16129, 1007, 1063, 13075, 12098, 5620, 1027, 9918, 1025, 13075, 4487, 2615, 1027, 6254, 1012, 3443, 12260, 3672, 1006, 1005, 4487, 2615, 1005, 1007, 1025, 13075, 1045, 1027, 1015, 1025, 4487, 2615, 1012, 5110, 1103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...