repo stringclasses 195
values | path stringlengths 4 99 | func_name stringlengths 0 41 | original_string stringlengths 72 56.1k | language stringclasses 1
value | code stringlengths 72 56.1k | code_tokens listlengths 25 8.12k | docstring stringlengths 2 12.5k | docstring_tokens listlengths 1 449 | sha stringclasses 197
values | url stringlengths 88 186 | partition stringclasses 1
value | summary stringlengths 8 338 | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ColorlibHQ/AdminLTE | plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js | _convertUrlsToLinks | function _convertUrlsToLinks(str) {
return str.replace(URL_REG_EXP, function(match, url) {
var punctuation = (url.match(TRAILING_CHAR_REG_EXP) || [])[1] || "",
opening = BRACKETS[punctuation];
url = url.replace(TRAILING_CHAR_REG_EXP, "");
if (url.split(opening).length > url.split(pu... | javascript | function _convertUrlsToLinks(str) {
return str.replace(URL_REG_EXP, function(match, url) {
var punctuation = (url.match(TRAILING_CHAR_REG_EXP) || [])[1] || "",
opening = BRACKETS[punctuation];
url = url.replace(TRAILING_CHAR_REG_EXP, "");
if (url.split(opening).length > url.split(pu... | [
"function",
"_convertUrlsToLinks",
"(",
"str",
")",
"{",
"return",
"str",
".",
"replace",
"(",
"URL_REG_EXP",
",",
"function",
"(",
"match",
",",
"url",
")",
"{",
"var",
"punctuation",
"=",
"(",
"url",
".",
"match",
"(",
"TRAILING_CHAR_REG_EXP",
")",
"||",... | This is basically a rebuild of
the rails auto_link_urls text helper | [
"This",
"is",
"basically",
"a",
"rebuild",
"of",
"the",
"rails",
"auto_link_urls",
"text",
"helper"
] | 19113c3cbc19a7afe0cfd3158d647064d2d30661 | https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js#L4933-L4955 | train | Convert a string of urls to links | [
30522,
3853,
1035,
10463,
3126,
4877,
3406,
13767,
2015,
1006,
2358,
2099,
1007,
1063,
2709,
2358,
2099,
1012,
5672,
1006,
24471,
2140,
1035,
19723,
1035,
4654,
2361,
1010,
3853,
1006,
2674,
1010,
24471,
2140,
1007,
1063,
13075,
26136,
6593... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aframevr/aframe | src/core/component.js | function (isDefault) {
var attrValue = isDefault ? this.data : this.attrValue;
if (attrValue === null || attrValue === undefined) { return; }
window.HTMLElement.prototype.setAttribute.call(this.el, this.attrName,
this.stringify(attrValue));
} | javascript | function (isDefault) {
var attrValue = isDefault ? this.data : this.attrValue;
if (attrValue === null || attrValue === undefined) { return; }
window.HTMLElement.prototype.setAttribute.call(this.el, this.attrName,
this.stringify(attrValue));
} | [
"function",
"(",
"isDefault",
")",
"{",
"var",
"attrValue",
"=",
"isDefault",
"?",
"this",
".",
"data",
":",
"this",
".",
"attrValue",
";",
"if",
"(",
"attrValue",
"===",
"null",
"||",
"attrValue",
"===",
"undefined",
")",
"{",
"return",
";",
"}",
"win... | Write cached attribute data to the entity DOM element.
@param {boolean} isDefault - Whether component is a default component. Always flush for
default components. | [
"Write",
"cached",
"attribute",
"data",
"to",
"the",
"entity",
"DOM",
"element",
"."
] | 24acc78a7299a4cdfe3ef617f4d40ddf6275c992 | https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/core/component.js#L262-L267 | train | Set the value of the attribute | [
30522,
3853,
1006,
2003,
3207,
7011,
11314,
1007,
1063,
13075,
2012,
16344,
10175,
5657,
1027,
2003,
3207,
7011,
11314,
1029,
2023,
1012,
2951,
1024,
2023,
1012,
2012,
16344,
10175,
5657,
1025,
2065,
1006,
2012,
16344,
10175,
5657,
1027,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SAP/openui5 | src/sap.f/src/sap/f/cards/ActionEnablement.js | _setItemTypeFormatter | function _setItemTypeFormatter(oAction) {
var that = this;
var oBindingInfo = ManagedObject.bindingParser("{path:''}");
// Async formatter to set ListItem type depending if the list item context is a correct navigation target (decided by the navigation service).
oBindingInfo.formatter = function (vValue) {... | javascript | function _setItemTypeFormatter(oAction) {
var that = this;
var oBindingInfo = ManagedObject.bindingParser("{path:''}");
// Async formatter to set ListItem type depending if the list item context is a correct navigation target (decided by the navigation service).
oBindingInfo.formatter = function (vValue) {... | [
"function",
"_setItemTypeFormatter",
"(",
"oAction",
")",
"{",
"var",
"that",
"=",
"this",
";",
"var",
"oBindingInfo",
"=",
"ManagedObject",
".",
"bindingParser",
"(",
"\"{path:''}\"",
")",
";",
"// Async formatter to set ListItem type depending if the list item context is ... | List card specific | [
"List",
"card",
"specific"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.f/src/sap/f/cards/ActionEnablement.js#L35-L86 | train | Sets the formatter for the list item. | [
30522,
3853,
1035,
2275,
4221,
20492,
18863,
14192,
20097,
1006,
1051,
18908,
3258,
1007,
1063,
13075,
2008,
1027,
2023,
1025,
13075,
27885,
22254,
2075,
2378,
30524,
2326,
1007,
1012,
27885,
22254,
2075,
2378,
14876,
1012,
4289,
3334,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
angular/material | src/core/services/interimElement/interimElement.js | showElement | function showElement(element, options, controller) {
// Trigger onShowing callback before the `show()` starts
var notifyShowing = options.onShowing || angular.noop;
// Trigger onComplete callback when the `show()` finishes
var notifyComplete = options.onComplete || angular.noop;
... | javascript | function showElement(element, options, controller) {
// Trigger onShowing callback before the `show()` starts
var notifyShowing = options.onShowing || angular.noop;
// Trigger onComplete callback when the `show()` finishes
var notifyComplete = options.onComplete || angular.noop;
... | [
"function",
"showElement",
"(",
"element",
",",
"options",
",",
"controller",
")",
"{",
"// Trigger onShowing callback before the `show()` starts",
"var",
"notifyShowing",
"=",
"options",
".",
"onShowing",
"||",
"angular",
".",
"noop",
";",
"// Trigger onComplete callback... | Show the element ( with transitions), notify complete and start
optional auto-Hide | [
"Show",
"the",
"element",
"(",
"with",
"transitions",
")",
"notify",
"complete",
"and",
"start",
"optional",
"auto",
"-",
"Hide"
] | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/services/interimElement/interimElement.js#L691-L719 | train | Show an element | [
30522,
3853,
2265,
12260,
3672,
1006,
5783,
1010,
7047,
1010,
11486,
1007,
1063,
1013,
1013,
9495,
2006,
22231,
9328,
2655,
5963,
2077,
1996,
1036,
2265,
1006,
1007,
1036,
4627,
13075,
2025,
8757,
22231,
9328,
1027,
7047,
1012,
2006,
22231,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
GitbookIO/gitbook | lib/output/ebook/onFinish.js | writeSummary | function writeSummary(output) {
var options = output.getOptions();
var prefix = options.get('prefix');
var filePath = SUMMARY_FILE;
var engine = WebsiteGenerator.createTemplateEngine(output, filePath);
var context = JSONUtils.encodeOutput(output);
// Render the theme
return Templating.rend... | javascript | function writeSummary(output) {
var options = output.getOptions();
var prefix = options.get('prefix');
var filePath = SUMMARY_FILE;
var engine = WebsiteGenerator.createTemplateEngine(output, filePath);
var context = JSONUtils.encodeOutput(output);
// Render the theme
return Templating.rend... | [
"function",
"writeSummary",
"(",
"output",
")",
"{",
"var",
"options",
"=",
"output",
".",
"getOptions",
"(",
")",
";",
"var",
"prefix",
"=",
"options",
".",
"get",
"(",
"'prefix'",
")",
";",
"var",
"filePath",
"=",
"SUMMARY_FILE",
";",
"var",
"engine",
... | Write the SUMMARY.html
@param {Output}
@return {Output} | [
"Write",
"the",
"SUMMARY",
".",
"html"
] | 6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4 | https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/output/ebook/onFinish.js#L20-L35 | train | Write the summary to disk | [
30522,
3853,
7009,
2819,
7849,
2100,
1006,
6434,
1007,
1063,
13075,
7047,
1027,
6434,
1012,
2131,
7361,
9285,
1006,
1007,
1025,
13075,
17576,
1027,
7047,
1012,
2131,
1006,
1005,
17576,
1005,
1007,
1025,
13075,
5371,
15069,
1027,
12654,
1035... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
firebase/firebase-js-sdk | packages/auth/src/cordovahandler.js | function() {
// Remove current resume listener.
if (onResume) {
doc.removeEventListener('resume', onResume, false);
}
// Remove visibility change listener.
if (onVisibilityChange) {
doc.removeEventListener('visibilitychange', onVisibilityChange, false);
}
// Cancel onClose promis... | javascript | function() {
// Remove current resume listener.
if (onResume) {
doc.removeEventListener('resume', onResume, false);
}
// Remove visibility change listener.
if (onVisibilityChange) {
doc.removeEventListener('visibilitychange', onVisibilityChange, false);
}
// Cancel onClose promis... | [
"function",
"(",
")",
"{",
"// Remove current resume listener.",
"if",
"(",
"onResume",
")",
"{",
"doc",
".",
"removeEventListener",
"(",
"'resume'",
",",
"onResume",
",",
"false",
")",
";",
"}",
"// Remove visibility change listener.",
"if",
"(",
"onVisibilityChang... | When the processRedirect promise completes, clean up any remaining temporary listeners and timers. | [
"When",
"the",
"processRedirect",
"promise",
"completes",
"clean",
"up",
"any",
"remaining",
"temporary",
"listeners",
"and",
"timers",
"."
] | 491598a499813dacc23724de5e237ec220cc560e | https://github.com/firebase/firebase-js-sdk/blob/491598a499813dacc23724de5e237ec220cc560e/packages/auth/src/cordovahandler.js#L359-L378 | train | Cancels the current resume listener and removes the current visibility change listener. | [
30522,
3853,
1006,
1007,
1063,
1013,
1013,
6366,
2783,
13746,
19373,
1012,
2065,
1006,
2006,
6072,
17897,
1007,
1063,
9986,
1012,
6366,
18697,
3372,
9863,
24454,
1006,
1005,
13746,
1005,
1010,
2006,
6072,
17897,
30524,
1006,
2006,
11365,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
adobe/brackets | src/xorigin.js | handleError | function handleError(message, url, line) {
// Ignore this error if it does not look like the rather vague cross origin error in Chrome
// Chrome will print it to the console anyway
if (!testCrossOriginError(message, url, line)) {
if (previousErrorHandler) {
return pre... | javascript | function handleError(message, url, line) {
// Ignore this error if it does not look like the rather vague cross origin error in Chrome
// Chrome will print it to the console anyway
if (!testCrossOriginError(message, url, line)) {
if (previousErrorHandler) {
return pre... | [
"function",
"handleError",
"(",
"message",
",",
"url",
",",
"line",
")",
"{",
"// Ignore this error if it does not look like the rather vague cross origin error in Chrome",
"// Chrome will print it to the console anyway",
"if",
"(",
"!",
"testCrossOriginError",
"(",
"message",
",... | Our error handler | [
"Our",
"error",
"handler"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/xorigin.js#L55-L70 | train | Handle an error | [
30522,
3853,
5047,
2121,
29165,
1006,
4471,
1010,
24471,
2140,
1010,
2240,
1007,
1063,
1013,
1013,
8568,
2023,
7561,
2065,
2009,
2515,
2025,
2298,
2066,
1996,
2738,
13727,
2892,
4761,
7561,
1999,
18546,
1013,
1013,
18546,
2097,
6140,
2009,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/language/HTMLDOMDiff.js | function (oldParent, oldNodeMap, newParent, newNodeMap) {
/*jslint continue: true */
var newIndex = 0,
oldIndex = 0,
newChildren = newParent.children,
oldChildren = oldParent ? oldParent.children : [],
newChild,
oldChild,
newEdits ... | javascript | function (oldParent, oldNodeMap, newParent, newNodeMap) {
/*jslint continue: true */
var newIndex = 0,
oldIndex = 0,
newChildren = newParent.children,
oldChildren = oldParent ? oldParent.children : [],
newChild,
oldChild,
newEdits ... | [
"function",
"(",
"oldParent",
",",
"oldNodeMap",
",",
"newParent",
",",
"newNodeMap",
")",
"{",
"/*jslint continue: true */",
"var",
"newIndex",
"=",
"0",
",",
"oldIndex",
"=",
"0",
",",
"newChildren",
"=",
"newParent",
".",
"children",
",",
"oldChildren",
"="... | @private
When the main loop (see below) determines that something has changed with
an element's immediate children, it calls this function to create edit
operations for those changes.
This adds to the edit list in place and does not return anything.
@param {?Object} oldParent SimpleDOM node for the previous state of... | [
"@private"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/language/HTMLDOMDiff.js#L92-L514 | train | This function is called by the editManager when an item is being deleted. It is called after the item is deleted. | [
30522,
3853,
1006,
2214,
19362,
4765,
1010,
2214,
3630,
3207,
2863,
2361,
1010,
2047,
19362,
4765,
1010,
2047,
3630,
3207,
30524,
1012,
2336,
1010,
2214,
19339,
7389,
1027,
2214,
19362,
4765,
1029,
2214,
19362,
4765,
1012,
2336,
1024,
1031,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
adobe/brackets | src/widgets/PopUpManager.js | removePopUp | function removePopUp($popUp) {
// check visible first to help protect against recursive calls
// via removeHandler
if ($popUp.find(":visible").length > 0) {
var removeHandler = $popUp.data("PopUpManager-removeHandler");
if (removeHandler) {
removeHandler()... | javascript | function removePopUp($popUp) {
// check visible first to help protect against recursive calls
// via removeHandler
if ($popUp.find(":visible").length > 0) {
var removeHandler = $popUp.data("PopUpManager-removeHandler");
if (removeHandler) {
removeHandler()... | [
"function",
"removePopUp",
"(",
"$popUp",
")",
"{",
"// check visible first to help protect against recursive calls",
"// via removeHandler",
"if",
"(",
"$popUp",
".",
"find",
"(",
"\":visible\"",
")",
".",
"length",
">",
"0",
")",
"{",
"var",
"removeHandler",
"=",
... | Remove Esc key handling for a pop-up. Removes the pop-up from the DOM
if the pop-up is currently visible and was not originally attached.
@param {!jQuery} $popUp | [
"Remove",
"Esc",
"key",
"handling",
"for",
"a",
"pop",
"-",
"up",
".",
"Removes",
"the",
"pop",
"-",
"up",
"from",
"the",
"DOM",
"if",
"the",
"pop",
"-",
"up",
"is",
"currently",
"visible",
"and",
"was",
"not",
"originally",
"attached",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/widgets/PopUpManager.js#L61-L81 | train | removePopUp - removes the popup from the list | [
30522,
3853,
6366,
16340,
6279,
1006,
1002,
3769,
6279,
1007,
1063,
1013,
1013,
4638,
5710,
2034,
2000,
2393,
4047,
2114,
28667,
9236,
3512,
4455,
1013,
1013,
3081,
6366,
11774,
3917,
2065,
1006,
1002,
3769,
6279,
1012,
2424,
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... |
SeleniumHQ/selenium | third_party/js/mozmill/shared-modules/addons.js | addonsManager_waitForSearchFinished | function addonsManager_waitForSearchFinished(aSpec) {
var spec = aSpec || { };
var timeout = (spec.timeout == undefined) ? TIMEOUT_SEARCH : spec.timeout;
// TODO: restore after 1.5.1 has landed
// var self = this;
//
// mozmill.utils.waitFor(function () {
// return self.isSearching == fa... | javascript | function addonsManager_waitForSearchFinished(aSpec) {
var spec = aSpec || { };
var timeout = (spec.timeout == undefined) ? TIMEOUT_SEARCH : spec.timeout;
// TODO: restore after 1.5.1 has landed
// var self = this;
//
// mozmill.utils.waitFor(function () {
// return self.isSearching == fa... | [
"function",
"addonsManager_waitForSearchFinished",
"(",
"aSpec",
")",
"{",
"var",
"spec",
"=",
"aSpec",
"||",
"{",
"}",
";",
"var",
"timeout",
"=",
"(",
"spec",
".",
"timeout",
"==",
"undefined",
")",
"?",
"TIMEOUT_SEARCH",
":",
"spec",
".",
"timeout",
";"... | Waits until the active search has been finished
@param {object} aSpec
Object with parameters for customization
Elements: timeout - Duration to wait for the target state | [
"Waits",
"until",
"the",
"active",
"search",
"has",
"been",
"finished"
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L975-L988 | train | Wait until the search has been finished | [
30522,
3853,
5587,
5644,
24805,
4590,
1035,
3524,
29278,
17310,
11140,
16294,
13295,
1006,
2004,
5051,
2278,
1007,
1063,
13075,
28699,
1027,
2004,
5051,
2278,
1064,
1064,
1063,
1065,
1025,
13075,
2051,
5833,
1027,
1006,
28699,
1012,
2051,
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... |
adobe/brackets | src/extensions/default/HealthData/HealthDataPreview.js | previewHealthData | function previewHealthData() {
var result = new $.Deferred();
HealthDataManager.getHealthData().done(function (healthDataObject) {
var combinedHealthAnalyticsData = HealthDataManager.getAnalyticsData(),
content;
combinedHealthAnalyticsData = [healthDataObject, co... | javascript | function previewHealthData() {
var result = new $.Deferred();
HealthDataManager.getHealthData().done(function (healthDataObject) {
var combinedHealthAnalyticsData = HealthDataManager.getAnalyticsData(),
content;
combinedHealthAnalyticsData = [healthDataObject, co... | [
"function",
"previewHealthData",
"(",
")",
"{",
"var",
"result",
"=",
"new",
"$",
".",
"Deferred",
"(",
")",
";",
"HealthDataManager",
".",
"getHealthData",
"(",
")",
".",
"done",
"(",
"function",
"(",
"healthDataObject",
")",
"{",
"var",
"combinedHealthAnal... | Show the dialog for previewing the Health Data that will be sent. | [
"Show",
"the",
"dialog",
"for",
"previewing",
"the",
"Health",
"Data",
"that",
"will",
"be",
"sent",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/HealthData/HealthDataPreview.js#L44-L76 | train | Preview health data | [
30522,
3853,
19236,
20192,
24658,
2850,
2696,
1006,
1007,
1063,
13075,
2765,
1027,
2047,
1002,
1012,
13366,
28849,
2094,
1006,
1007,
1025,
2740,
2850,
28282,
27031,
2099,
1012,
2131,
20192,
24658,
2850,
2696,
1006,
1007,
1012,
2589,
1006,
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... |
chriso/validator.js | lib/isMimeType.js | isMimeType | function isMimeType(str) {
(0, _assertString.default)(str);
return mimeTypeSimple.test(str) || mimeTypeText.test(str) || mimeTypeMultipart.test(str);
} | javascript | function isMimeType(str) {
(0, _assertString.default)(str);
return mimeTypeSimple.test(str) || mimeTypeText.test(str) || mimeTypeMultipart.test(str);
} | [
"function",
"isMimeType",
"(",
"str",
")",
"{",
"(",
"0",
",",
"_assertString",
".",
"default",
")",
"(",
"str",
")",
";",
"return",
"mimeTypeSimple",
".",
"test",
"(",
"str",
")",
"||",
"mimeTypeText",
".",
"test",
"(",
"str",
")",
"||",
"mimeTypeMult... | eslint-disable-line max-len | [
"eslint",
"-",
"disable",
"-",
"line",
"max",
"-",
"len"
] | 63e4c78f07d08543af4be7b6c2c9cf24df009003 | https://github.com/chriso/validator.js/blob/63e4c78f07d08543af4be7b6c2c9cf24df009003/lib/isMimeType.js#L45-L48 | train | Check if the string is a mime type | [
30522,
3853,
2003,
4328,
11368,
18863,
1006,
2358,
2099,
1007,
1063,
1006,
1014,
1010,
1035,
19514,
18886,
3070,
1012,
12398,
1007,
1006,
2358,
2099,
1007,
1025,
2709,
2771,
11368,
18863,
5332,
23344,
1012,
3231,
1006,
2358,
2099,
1007,
106... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
GeekyAnts/vue-native-core | dist/vue.runtime.common.js | createFunctionalComponent | function createFunctionalComponent (
Ctor,
propsData,
data,
context,
children
) {
var props = {};
var propOptions = Ctor.options.props;
if (isDef(propOptions)) {
for (var key in propOptions) {
props[key] = validateProp(key, propOptions, propsData);
}
} else {
if (isDef(data.attrs)) {... | javascript | function createFunctionalComponent (
Ctor,
propsData,
data,
context,
children
) {
var props = {};
var propOptions = Ctor.options.props;
if (isDef(propOptions)) {
for (var key in propOptions) {
props[key] = validateProp(key, propOptions, propsData);
}
} else {
if (isDef(data.attrs)) {... | [
"function",
"createFunctionalComponent",
"(",
"Ctor",
",",
"propsData",
",",
"data",
",",
"context",
",",
"children",
")",
"{",
"var",
"props",
"=",
"{",
"}",
";",
"var",
"propOptions",
"=",
"Ctor",
".",
"options",
".",
"props",
";",
"if",
"(",
"isDef",
... | /* | [
"/",
"*"
] | a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e | https://github.com/GeekyAnts/vue-native-core/blob/a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e/dist/vue.runtime.common.js#L3057-L3094 | train | Creates a functional component | [
30522,
3853,
3443,
11263,
27989,
2389,
9006,
29513,
3372,
1006,
14931,
2953,
1010,
24387,
2850,
2696,
1010,
2951,
1010,
6123,
1010,
2336,
1007,
1063,
13075,
24387,
1027,
1063,
1065,
1025,
13075,
17678,
7361,
9285,
1027,
14931,
2953,
1012,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.m/src/sap/m/IconTabBarDragAndDropUtil.js | function (oDraggedControl, iKeyCode) {
var $DraggedControl = oDraggedControl.$(),
aItems = this.getItems(),
iBeginDragIndex = this.indexOfItem(oDraggedControl),
bRtl = sap.ui.getCore().getConfiguration().getRTL(),
iNewDropIndex,
$DroppedControl,
oKeyCodes = KeyCodes;
switch (iKeyC... | javascript | function (oDraggedControl, iKeyCode) {
var $DraggedControl = oDraggedControl.$(),
aItems = this.getItems(),
iBeginDragIndex = this.indexOfItem(oDraggedControl),
bRtl = sap.ui.getCore().getConfiguration().getRTL(),
iNewDropIndex,
$DroppedControl,
oKeyCodes = KeyCodes;
switch (iKeyC... | [
"function",
"(",
"oDraggedControl",
",",
"iKeyCode",
")",
"{",
"var",
"$DraggedControl",
"=",
"oDraggedControl",
".",
"$",
"(",
")",
",",
"aItems",
"=",
"this",
".",
"getItems",
"(",
")",
",",
"iBeginDragIndex",
"=",
"this",
".",
"indexOfItem",
"(",
"oDrag... | Moves focused control depending on the combinations of pressed keys.
@param {object} oDraggedControl Control that is going to be moved
@param {number} iKeyCode Key code
@returns {boolean} returns true is scrolling will be needed | [
"Moves",
"focused",
"control",
"depending",
"on",
"the",
"combinations",
"of",
"pressed",
"keys",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/IconTabBarDragAndDropUtil.js#L143-L196 | train | Handles the key event on the drop control | [
30522,
3853,
1006,
1051,
7265,
15567,
8663,
13181,
2140,
1010,
25209,
2100,
16044,
1007,
1063,
13075,
1002,
7944,
8663,
13181,
2140,
1027,
1051,
7265,
15567,
8663,
13181,
2140,
1012,
1002,
1006,
1007,
1010,
9932,
18532,
2015,
1027,
2023,
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/core/util/XMLPreprocessor.js | function (sPath) {
var oBindingInfo,
oModel,
sResolvedPath;
sPath = sPath || "";
if (sPath[0] === "{") {
throw new Error("Must be a simple path, not a binding: " + sPath);
}
oBindingInfo = BindingParser.simpleParser("{" + sPath + "}");
oModel = oWithControl.getM... | javascript | function (sPath) {
var oBindingInfo,
oModel,
sResolvedPath;
sPath = sPath || "";
if (sPath[0] === "{") {
throw new Error("Must be a simple path, not a binding: " + sPath);
}
oBindingInfo = BindingParser.simpleParser("{" + sPath + "}");
oModel = oWithControl.getM... | [
"function",
"(",
"sPath",
")",
"{",
"var",
"oBindingInfo",
",",
"oModel",
",",
"sResolvedPath",
";",
"sPath",
"=",
"sPath",
"||",
"\"\"",
";",
"if",
"(",
"sPath",
"[",
"0",
"]",
"===",
"\"{\"",
")",
"{",
"throw",
"new",
"Error",
"(",
"\"Must be a simpl... | Returns the model's context which corresponds to the given simple binding
path. Uses the map of currently known variables.
@param {string} [sPath=""]
A simple binding path which may include a model name ("a variable"), for
example "var>some/relative/path", but not a binding ("{...}")
@returns {sap.ui.model.Context}
Th... | [
"Returns",
"the",
"model",
"s",
"context",
"which",
"corresponds",
"to",
"the",
"given",
"simple",
"binding",
"path",
".",
"Uses",
"the",
"map",
"of",
"currently",
"known",
"variables",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L667-L687 | train | Returns a binding context for the given path. | [
30522,
3853,
1006,
14690,
2232,
1007,
1063,
13075,
27885,
22254,
2075,
2378,
14876,
1010,
18168,
10244,
2140,
1010,
5034,
2229,
16116,
15069,
1025,
14690,
2232,
1027,
14690,
2232,
1064,
1064,
1000,
1000,
1025,
2065,
1006,
14690,
2232,
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... | |
Shopify/draggable | src/Sortable/Sortable.js | onSortableSortedDefaultAnnouncement | function onSortableSortedDefaultAnnouncement({dragEvent}) {
const sourceText = dragEvent.source.textContent.trim() || dragEvent.source.id || 'sortable element';
if (dragEvent.over) {
const overText = dragEvent.over.textContent.trim() || dragEvent.over.id || 'sortable element';
const isFollowing = dragEvent... | javascript | function onSortableSortedDefaultAnnouncement({dragEvent}) {
const sourceText = dragEvent.source.textContent.trim() || dragEvent.source.id || 'sortable element';
if (dragEvent.over) {
const overText = dragEvent.over.textContent.trim() || dragEvent.over.id || 'sortable element';
const isFollowing = dragEvent... | [
"function",
"onSortableSortedDefaultAnnouncement",
"(",
"{",
"dragEvent",
"}",
")",
"{",
"const",
"sourceText",
"=",
"dragEvent",
".",
"source",
".",
"textContent",
".",
"trim",
"(",
")",
"||",
"dragEvent",
".",
"source",
".",
"id",
"||",
"'sortable element'",
... | Returns announcement message when a Draggable element has been sorted with another Draggable element
or moved into a new container
@param {SortableSortedEvent} sortableEvent
@return {String} | [
"Returns",
"announcement",
"message",
"when",
"a",
"Draggable",
"element",
"has",
"been",
"sorted",
"with",
"another",
"Draggable",
"element",
"or",
"moved",
"into",
"a",
"new",
"container"
] | ecc04b2cdb8b5009664862472ff8cb237c38cfeb | https://github.com/Shopify/draggable/blob/ecc04b2cdb8b5009664862472ff8cb237c38cfeb/src/Sortable/Sortable.js#L15-L31 | train | This function is called when the element is sorted in the sortable order | [
30522,
3853,
2006,
21748,
10880,
21748,
3064,
3207,
7011,
11314,
11639,
23709,
3401,
3672,
1006,
1063,
8011,
18697,
3372,
1065,
1007,
1063,
9530,
3367,
3120,
18209,
1027,
8011,
18697,
3372,
1012,
3120,
1012,
3793,
8663,
6528,
2102,
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... |
SAP/openui5 | src/sap.ui.core/src/ui5loader.js | normalize | function normalize(sResourceName, sBaseName) {
var p = sResourceName.search(rDotSegmentAnywhere),
aSegments,
sSegment,
i,j,l;
// check whether the name needs to be resolved at all - if not, just return the sModuleName as it is.
if ( p < 0 ) {
return sResourceName;
}
// if the name starts with a... | javascript | function normalize(sResourceName, sBaseName) {
var p = sResourceName.search(rDotSegmentAnywhere),
aSegments,
sSegment,
i,j,l;
// check whether the name needs to be resolved at all - if not, just return the sModuleName as it is.
if ( p < 0 ) {
return sResourceName;
}
// if the name starts with a... | [
"function",
"normalize",
"(",
"sResourceName",
",",
"sBaseName",
")",
"{",
"var",
"p",
"=",
"sResourceName",
".",
"search",
"(",
"rDotSegmentAnywhere",
")",
",",
"aSegments",
",",
"sSegment",
",",
"i",
",",
"j",
",",
"l",
";",
"// check whether the name needs ... | Normalizes a resource name by resolving any relative name segments.
A segment consisting of a single dot <code>./</code>, when used at the beginning of a name refers
to the containing package of the <code>sBaseName</code>. When used inside a name, it is ignored.
A segment consisting of two dots <code>../</code> refer... | [
"Normalizes",
"a",
"resource",
"name",
"by",
"resolving",
"any",
"relative",
"name",
"segments",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/ui5loader.js#L431-L481 | train | Normalizes the given resource name to a relative name. | [
30522,
3853,
3671,
4697,
1006,
5034,
2229,
8162,
27524,
14074,
1010,
24829,
11022,
18442,
1007,
1063,
13075,
1052,
1027,
5034,
2229,
8162,
27524,
14074,
1012,
3945,
1006,
16428,
12868,
13910,
3672,
19092,
2860,
5886,
2063,
1007,
1010,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
reasonml/reason-react | migrate/from02xTo024.js | migrate | function migrate(files) {
files.forEach((file) => {
let content;
try {
content = fs.readFileSync(file, {encoding: 'utf-8'});
} catch (e) {
console.error(`\u{1b}[31mProblem reading ${file}: ${e.message}\u{1b}[39m`);
process.exit(1);
}
const result = transform(content);
const ... | javascript | function migrate(files) {
files.forEach((file) => {
let content;
try {
content = fs.readFileSync(file, {encoding: 'utf-8'});
} catch (e) {
console.error(`\u{1b}[31mProblem reading ${file}: ${e.message}\u{1b}[39m`);
process.exit(1);
}
const result = transform(content);
const ... | [
"function",
"migrate",
"(",
"files",
")",
"{",
"files",
".",
"forEach",
"(",
"(",
"file",
")",
"=>",
"{",
"let",
"content",
";",
"try",
"{",
"content",
"=",
"fs",
".",
"readFileSync",
"(",
"file",
",",
"{",
"encoding",
":",
"'utf-8'",
"}",
")",
";"... | entry point | [
"entry",
"point"
] | 17e4568aaa5a6d03e3f3381a60c2073dc7ac50e2 | https://github.com/reasonml/reason-react/blob/17e4568aaa5a6d03e3f3381a60c2073dc7ac50e2/migrate/from02xTo024.js#L76-L129 | train | Migrate the specified files | [
30522,
3853,
22806,
1006,
6764,
1007,
1063,
30524,
1063,
2292,
4180,
1025,
3046,
1063,
4180,
1027,
1042,
2015,
1012,
3191,
8873,
4244,
6038,
2278,
1006,
5371,
1010,
1063,
17181,
1024,
1005,
21183,
2546,
1011,
1022,
1005,
1065,
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... |
angular/material | docs/app/js/codepen.js | editOnCodepen | function editOnCodepen(demo) {
var externalScripts = $demoAngularScripts.all();
externalScripts.push('https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.1/moment.js');
var data = codepenDataAdapter.translate(demo, externalScripts);
var form = buildForm(data);
$document.find('body').appe... | javascript | function editOnCodepen(demo) {
var externalScripts = $demoAngularScripts.all();
externalScripts.push('https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.1/moment.js');
var data = codepenDataAdapter.translate(demo, externalScripts);
var form = buildForm(data);
$document.find('body').appe... | [
"function",
"editOnCodepen",
"(",
"demo",
")",
"{",
"var",
"externalScripts",
"=",
"$demoAngularScripts",
".",
"all",
"(",
")",
";",
"externalScripts",
".",
"push",
"(",
"'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.1/moment.js'",
")",
";",
"var",
"data",
"=... | Creates a codepen from the given demo model by posting to Codepen's API using a hidden form. The hidden form is necessary to avoid a CORS issue. See http://blog.codepen.io/documentation/api/prefill | [
"Creates",
"a",
"codepen",
"from",
"the",
"given",
"demo",
"model",
"by",
"posting",
"to",
"Codepen",
"s",
"API",
"using",
"a",
"hidden",
"form",
".",
"The",
"hidden",
"form",
"is",
"necessary",
"to",
"avoid",
"a",
"CORS",
"issue",
".",
"See",
"http",
... | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/docs/app/js/codepen.js#L21-L29 | train | edit on codepen | [
30522,
3853,
10086,
2239,
16044,
11837,
1006,
9703,
1007,
1063,
13075,
6327,
22483,
2015,
1027,
1002,
9703,
5654,
7934,
22483,
2015,
1012,
2035,
1006,
1007,
1025,
6327,
22483,
2015,
1012,
5245,
1006,
1005,
16770,
1024,
1013,
1013,
3729,
207... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ColorlibHQ/AdminLTE | plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js | function(context) {
if (context._wysihtml5_supportsHTML5Tags) {
return;
}
for (var i=0, length=HTML5_ELEMENTS.length; i<length; i++) {
context.createElement(HTML5_ELEMENTS[i]);
}
context._wysihtml5_supportsHTML5Tags = true;
} | javascript | function(context) {
if (context._wysihtml5_supportsHTML5Tags) {
return;
}
for (var i=0, length=HTML5_ELEMENTS.length; i<length; i++) {
context.createElement(HTML5_ELEMENTS[i]);
}
context._wysihtml5_supportsHTML5Tags = true;
} | [
"function",
"(",
"context",
")",
"{",
"if",
"(",
"context",
".",
"_wysihtml5_supportsHTML5Tags",
")",
"{",
"return",
";",
"}",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"length",
"=",
"HTML5_ELEMENTS",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"... | Make sure IE supports HTML5 tags, which is accomplished by simply creating one instance of each element | [
"Make",
"sure",
"IE",
"supports",
"HTML5",
"tags",
"which",
"is",
"accomplished",
"by",
"simply",
"creating",
"one",
"instance",
"of",
"each",
"element"
] | 19113c3cbc19a7afe0cfd3158d647064d2d30661 | https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js#L5405-L5413 | train | Create an element array | [
30522,
3853,
1006,
6123,
1007,
1063,
2065,
1006,
6123,
1012,
1035,
1059,
7274,
19190,
21246,
2140,
2629,
1035,
6753,
11039,
19968,
2629,
15900,
2015,
1007,
1063,
2709,
1025,
1065,
2005,
1006,
13075,
1045,
1027,
1014,
1010,
3091,
1027,
16129... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/fabSpeedDial/fabSpeedDial.js | MdFabSpeedDialDirective | function MdFabSpeedDialDirective() {
return {
restrict: 'E',
scope: {
direction: '@?mdDirection',
isOpen: '=?mdOpen'
},
bindToController: true,
controller: 'MdFabController',
controllerAs: 'vm',
link: FabSpeedDialLink
};
function FabSpeedDialLink... | javascript | function MdFabSpeedDialDirective() {
return {
restrict: 'E',
scope: {
direction: '@?mdDirection',
isOpen: '=?mdOpen'
},
bindToController: true,
controller: 'MdFabController',
controllerAs: 'vm',
link: FabSpeedDialLink
};
function FabSpeedDialLink... | [
"function",
"MdFabSpeedDialDirective",
"(",
")",
"{",
"return",
"{",
"restrict",
":",
"'E'",
",",
"scope",
":",
"{",
"direction",
":",
"'@?mdDirection'",
",",
"isOpen",
":",
"'=?mdOpen'",
"}",
",",
"bindToController",
":",
"true",
",",
"controller",
":",
"'M... | @ngdoc directive
@name mdFabSpeedDial
@module material.components.fabSpeedDial
@restrict E
@description
The `<md-fab-speed-dial>` directive is used to present a series of popup elements (usually
`<md-button>`s) for quick access to common actions.
There are currently two animations available by applying one of the fo... | [
"@ngdoc",
"directive",
"@name",
"mdFabSpeedDial",
"@module",
"material",
".",
"components",
".",
"fabSpeedDial"
] | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/fabSpeedDial/fabSpeedDial.js#L98-L118 | train | The md - fab - speed - dial directive | [
30522,
3853,
9108,
7011,
5910,
25599,
27184,
4305,
2890,
15277,
1006,
1007,
1063,
2709,
1063,
21573,
1024,
1005,
1041,
1005,
1010,
9531,
1024,
1063,
3257,
1024,
1005,
1030,
1029,
9108,
4305,
2890,
7542,
1005,
1010,
11163,
11837,
1024,
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... |
Dogfalo/materialize | dist/js/materialize.js | Tooltip | function Tooltip(el, options) {
_classCallCheck(this, Tooltip);
var _this26 = _possibleConstructorReturn(this, (Tooltip.__proto__ || Object.getPrototypeOf(Tooltip)).call(this, Tooltip, el, options));
_this26.el.M_Tooltip = _this26;
_this26.options = $.extend({}, Tooltip.defaults, options);
... | javascript | function Tooltip(el, options) {
_classCallCheck(this, Tooltip);
var _this26 = _possibleConstructorReturn(this, (Tooltip.__proto__ || Object.getPrototypeOf(Tooltip)).call(this, Tooltip, el, options));
_this26.el.M_Tooltip = _this26;
_this26.options = $.extend({}, Tooltip.defaults, options);
... | [
"function",
"Tooltip",
"(",
"el",
",",
"options",
")",
"{",
"_classCallCheck",
"(",
"this",
",",
"Tooltip",
")",
";",
"var",
"_this26",
"=",
"_possibleConstructorReturn",
"(",
"this",
",",
"(",
"Tooltip",
".",
"__proto__",
"||",
"Object",
".",
"getPrototypeO... | Construct Tooltip instance
@constructor
@param {Element} el
@param {Object} options | [
"Construct",
"Tooltip",
"instance"
] | 1122efadad8f1433d404696f7613e3cc13fb83a4 | https://github.com/Dogfalo/materialize/blob/1122efadad8f1433d404696f7613e3cc13fb83a4/dist/js/materialize.js#L4461-L4475 | train | Construct Tooltip instance | [
30522,
3853,
6994,
25101,
1006,
3449,
1010,
7047,
1007,
1063,
1035,
2465,
9289,
29358,
11012,
1006,
2023,
1010,
6994,
25101,
1007,
1025,
13075,
1035,
2023,
23833,
1027,
1035,
2825,
8663,
3367,
6820,
16761,
13465,
14287,
1006,
2023,
1010,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
moleculerjs/moleculer | benchmark/suites/transporters.js | createBrokers | function createBrokers(transporter) {
let b1 = new ServiceBroker({
transporter,
//requestTimeout: 0,
logger: false,
//logLevel: "debug",
nodeID: "node-1"
});
let b2 = new ServiceBroker({
transporter,
//requestTimeout: 0,
logger: false,
//logLevel: "debug",
nodeID: "node-2"
});
b2.createServic... | javascript | function createBrokers(transporter) {
let b1 = new ServiceBroker({
transporter,
//requestTimeout: 0,
logger: false,
//logLevel: "debug",
nodeID: "node-1"
});
let b2 = new ServiceBroker({
transporter,
//requestTimeout: 0,
logger: false,
//logLevel: "debug",
nodeID: "node-2"
});
b2.createServic... | [
"function",
"createBrokers",
"(",
"transporter",
")",
"{",
"let",
"b1",
"=",
"new",
"ServiceBroker",
"(",
"{",
"transporter",
",",
"//requestTimeout: 0,",
"logger",
":",
"false",
",",
"//logLevel: \"debug\",",
"nodeID",
":",
"\"node-1\"",
"}",
")",
";",
"let",
... | , "150", "1k", "10k", "50k", "100k", "1M"]; | [
"150",
"1k",
"10k",
"50k",
"100k",
"1M",
"]",
";"
] | f95aadc2d61b0d0e3c643a43c3ed28bca6425cde | https://github.com/moleculerjs/moleculer/blob/f95aadc2d61b0d0e3c643a43c3ed28bca6425cde/benchmark/suites/transporters.js#L14-L44 | train | Creates a broker | [
30522,
3853,
3443,
12618,
11451,
1006,
3665,
2121,
1007,
1063,
2292,
29491,
1027,
2047,
2326,
12618,
5484,
1006,
1063,
3665,
2121,
1010,
1013,
1013,
5227,
7292,
5833,
1024,
1014,
1010,
8833,
4590,
1024,
6270,
1010,
1013,
1013,
8833,
20414,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/TableScrollExtension.js | function(mOptions, oEvent) {
var oScrollExtension = this._getScrollExtension();
var bVerticalDelta = Math.abs(oEvent.deltaY) > Math.abs(oEvent.deltaX);
var iScrollDelta = bVerticalDelta ? oEvent.deltaY : oEvent.deltaX;
var bHorizontalScrolling = bVerticalDelta && oEvent.shiftKey || !bVerticalDelta;
var b... | javascript | function(mOptions, oEvent) {
var oScrollExtension = this._getScrollExtension();
var bVerticalDelta = Math.abs(oEvent.deltaY) > Math.abs(oEvent.deltaX);
var iScrollDelta = bVerticalDelta ? oEvent.deltaY : oEvent.deltaX;
var bHorizontalScrolling = bVerticalDelta && oEvent.shiftKey || !bVerticalDelta;
var b... | [
"function",
"(",
"mOptions",
",",
"oEvent",
")",
"{",
"var",
"oScrollExtension",
"=",
"this",
".",
"_getScrollExtension",
"(",
")",
";",
"var",
"bVerticalDelta",
"=",
"Math",
".",
"abs",
"(",
"oEvent",
".",
"deltaY",
")",
">",
"Math",
".",
"abs",
"(",
... | Handles mouse wheel events.
@param {TableScrollExtension.EventListenerOptions} mOptions The options.
@param {WheelEvent} oEvent The wheel event object. | [
"Handles",
"mouse",
"wheel",
"events",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js#L852-L945 | train | Handles scrolling of the table. | [
30522,
3853,
1006,
9587,
16790,
2015,
1010,
1051,
18697,
3372,
1007,
1063,
13075,
9808,
26775,
14511,
10288,
29048,
1027,
2023,
1012,
1035,
4152,
26775,
14511,
10288,
29048,
1006,
1007,
1025,
13075,
1038,
16874,
7476,
9247,
2696,
1027,
8785,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
jhipster/generator-jhipster | generators/docker-prompts.js | askForPath | function askForPath() {
if (this.regenerate) return;
const done = this.async();
const deploymentApplicationType = this.deploymentApplicationType;
let messageAskForPath;
if (deploymentApplicationType === 'monolith') {
messageAskForPath = 'Enter the root directory where your applications are ... | javascript | function askForPath() {
if (this.regenerate) return;
const done = this.async();
const deploymentApplicationType = this.deploymentApplicationType;
let messageAskForPath;
if (deploymentApplicationType === 'monolith') {
messageAskForPath = 'Enter the root directory where your applications are ... | [
"function",
"askForPath",
"(",
")",
"{",
"if",
"(",
"this",
".",
"regenerate",
")",
"return",
";",
"const",
"done",
"=",
"this",
".",
"async",
"(",
")",
";",
"const",
"deploymentApplicationType",
"=",
"this",
".",
"deploymentApplicationType",
";",
"let",
"... | Ask For Path | [
"Ask",
"For",
"Path"
] | f76fa8de0818ce6bda6c7b1455942e2a9b0ae3ff | https://github.com/jhipster/generator-jhipster/blob/f76fa8de0818ce6bda6c7b1455942e2a9b0ae3ff/generators/docker-prompts.js#L108-L163 | train | Ask For Path | [
30522,
3853,
3198,
29278,
15069,
1006,
1007,
1063,
2065,
1006,
2023,
1012,
19723,
24454,
3686,
1007,
2709,
1025,
9530,
3367,
2589,
1027,
2023,
1012,
2004,
6038,
2278,
1006,
1007,
1025,
9530,
3367,
10813,
29098,
19341,
3508,
13874,
1027,
202... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/project/WorkingSetView.js | scroll | function scroll($container, $el, dir, callback) {
var container = $container[0],
maxScroll = container.scrollHeight - container.clientHeight;
if (maxScroll && dir && !interval) {
// Scroll view if the mouse is over the first or last pixels of the container
... | javascript | function scroll($container, $el, dir, callback) {
var container = $container[0],
maxScroll = container.scrollHeight - container.clientHeight;
if (maxScroll && dir && !interval) {
// Scroll view if the mouse is over the first or last pixels of the container
... | [
"function",
"scroll",
"(",
"$container",
",",
"$el",
",",
"dir",
",",
"callback",
")",
"{",
"var",
"container",
"=",
"$container",
"[",
"0",
"]",
",",
"maxScroll",
"=",
"container",
".",
"scrollHeight",
"-",
"container",
".",
"clientHeight",
";",
"if",
"... | We scroll the list while hovering over the first or last visible list element in the working set, so that positioning a working set item before or after one that has been scrolled out of view can be performed. This function will call the drag interface repeatedly on an interval to allow the item to be dragged while sc... | [
"We",
"scroll",
"the",
"list",
"while",
"hovering",
"over",
"the",
"first",
"or",
"last",
"visible",
"list",
"element",
"in",
"the",
"working",
"set",
"so",
"that",
"positioning",
"a",
"working",
"set",
"item",
"before",
"or",
"after",
"one",
"that",
"has"... | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/project/WorkingSetView.js#L259-L274 | train | Scrolls the container to the specified direction | [
30522,
3853,
17186,
1006,
1002,
11661,
1010,
1002,
3449,
1010,
16101,
1010,
2655,
5963,
1007,
1063,
13075,
11661,
1027,
1002,
11661,
1031,
1014,
1033,
1010,
4098,
11020,
28402,
1027,
11661,
1012,
17186,
26036,
13900,
1011,
11661,
1012,
7396,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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-app/app/sync-legacy/index.js | _getResourceGroupSymmetricKey | async function _getResourceGroupSymmetricKey(resourceGroupId) {
let key = resourceGroupSymmetricKeysCache[resourceGroupId];
if (!key) {
const resourceGroup = await fetchResourceGroup(resourceGroupId);
const accountPrivateKey = await session.getPrivateKey();
const symmetricKeyStr = crypt.decryptRSAWith... | javascript | async function _getResourceGroupSymmetricKey(resourceGroupId) {
let key = resourceGroupSymmetricKeysCache[resourceGroupId];
if (!key) {
const resourceGroup = await fetchResourceGroup(resourceGroupId);
const accountPrivateKey = await session.getPrivateKey();
const symmetricKeyStr = crypt.decryptRSAWith... | [
"async",
"function",
"_getResourceGroupSymmetricKey",
"(",
"resourceGroupId",
")",
"{",
"let",
"key",
"=",
"resourceGroupSymmetricKeysCache",
"[",
"resourceGroupId",
"]",
";",
"if",
"(",
"!",
"key",
")",
"{",
"const",
"resourceGroup",
"=",
"await",
"fetchResourceGro... | Get a ResourceGroup's symmetric encryption key
@param resourceGroupId
@private | [
"Get",
"a",
"ResourceGroup",
"s",
"symmetric",
"encryption",
"key"
] | e24ce7f7b41246e700c4b9bdb6b34b6652ad589b | https://github.com/getinsomnia/insomnia/blob/e24ce7f7b41246e700c4b9bdb6b34b6652ad589b/packages/insomnia-app/app/sync-legacy/index.js#L669-L688 | train | Get the symmetric key for a resource group | [
30522,
2004,
6038,
2278,
3853,
1035,
2131,
6072,
30524,
1007,
1063,
9530,
3367,
7692,
17058,
1027,
26751,
18584,
6072,
8162,
3401,
17058,
1006,
7692,
17058,
3593,
1007,
1025,
9530,
3367,
4070,
18098,
21466,
14839,
1027,
26751,
5219,
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... |
angular/material | src/components/list/list.js | MdListController | function MdListController($scope, $element, $mdListInkRipple) {
var ctrl = this;
ctrl.attachRipple = attachRipple;
function attachRipple (scope, element) {
var options = {};
$mdListInkRipple.attach(scope, element, options);
}
} | javascript | function MdListController($scope, $element, $mdListInkRipple) {
var ctrl = this;
ctrl.attachRipple = attachRipple;
function attachRipple (scope, element) {
var options = {};
$mdListInkRipple.attach(scope, element, options);
}
} | [
"function",
"MdListController",
"(",
"$scope",
",",
"$element",
",",
"$mdListInkRipple",
")",
"{",
"var",
"ctrl",
"=",
"this",
";",
"ctrl",
".",
"attachRipple",
"=",
"attachRipple",
";",
"function",
"attachRipple",
"(",
"scope",
",",
"element",
")",
"{",
"va... | /*
@private
@ngdoc controller
@name MdListController
@module material.components.list | [
"/",
"*",
"@private",
"@ngdoc",
"controller",
"@name",
"MdListController",
"@module",
"material",
".",
"components",
".",
"list"
] | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/list/list.js#L579-L587 | train | Controller for the scaffolding | [
30522,
3853,
9108,
9863,
8663,
13181,
30524,
10814,
1025,
3853,
22476,
29443,
10814,
1006,
9531,
1010,
5783,
1007,
1063,
13075,
7047,
1027,
1063,
1065,
1025,
1002,
9108,
9863,
19839,
29443,
10814,
1012,
22476,
1006,
9531,
1010,
5783,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.support/src/sap/ui/support/supportRules/Storage.js | function(sCookieName) {
var name = sCookieName + "=",
decodedCookie = decodeURIComponent(document.cookie),
ca = decodedCookie.split(';'),
sOutput = "";
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0... | javascript | function(sCookieName) {
var name = sCookieName + "=",
decodedCookie = decodeURIComponent(document.cookie),
ca = decodedCookie.split(';'),
sOutput = "";
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0... | [
"function",
"(",
"sCookieName",
")",
"{",
"var",
"name",
"=",
"sCookieName",
"+",
"\"=\"",
",",
"decodedCookie",
"=",
"decodeURIComponent",
"(",
"document",
".",
"cookie",
")",
",",
"ca",
"=",
"decodedCookie",
".",
"split",
"(",
"';'",
")",
",",
"sOutput",... | Retrieves the persistence options of the user in the LocalStorage layer.
@private
@method
@name sap.ui.support.Storage.readPersistenceCookie
@alias readPersistenceCookie
@param {string} sCookieName Name of the cookie.
@returns {string} sOutput The persistence options of the user. | [
"Retrieves",
"the",
"persistence",
"options",
"of",
"the",
"user",
"in",
"the",
"LocalStorage",
"layer",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/Storage.js#L290-L309 | train | Get the cookie value from the cookie | [
30522,
3853,
1006,
8040,
14659,
9013,
14074,
1007,
1063,
13075,
2171,
1027,
8040,
14659,
9013,
14074,
1009,
1000,
1027,
1000,
1010,
21933,
5732,
3597,
23212,
2063,
1027,
21933,
3207,
9496,
9006,
29513,
3372,
1006,
6254,
1012,
17387,
1007,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
eslint/eslint | lib/rules/space-before-function-paren.js | checkFunction | function checkFunction(node) {
const functionConfig = getConfigForFunction(node);
if (functionConfig === "ignore") {
return;
}
const rightToken = sourceCode.getFirstToken(node, astUtils.isOpeningParenToken);
const leftToken = sourceCode.getTo... | javascript | function checkFunction(node) {
const functionConfig = getConfigForFunction(node);
if (functionConfig === "ignore") {
return;
}
const rightToken = sourceCode.getFirstToken(node, astUtils.isOpeningParenToken);
const leftToken = sourceCode.getTo... | [
"function",
"checkFunction",
"(",
"node",
")",
"{",
"const",
"functionConfig",
"=",
"getConfigForFunction",
"(",
"node",
")",
";",
"if",
"(",
"functionConfig",
"===",
"\"ignore\"",
")",
"{",
"return",
";",
"}",
"const",
"rightToken",
"=",
"sourceCode",
".",
... | Checks the parens of a function node
@param {ASTNode} node A function node
@returns {void} | [
"Checks",
"the",
"parens",
"of",
"a",
"function",
"node"
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/space-before-function-paren.js#L111-L137 | train | Check if a function is valid | [
30522,
3853,
4638,
11263,
27989,
1006,
13045,
1007,
1063,
9530,
3367,
3853,
8663,
8873,
2290,
1027,
2131,
8663,
8873,
25708,
16347,
4609,
7542,
1006,
13045,
1007,
1025,
2065,
1006,
3853,
8663,
8873,
2290,
1027,
1027,
1027,
1000,
8568,
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... |
SeleniumHQ/selenium | javascript/node/selenium-webdriver/lib/promise.js | checkedNodeCall | function checkedNodeCall(fn, ...args) {
return new Promise(function(fulfill, reject) {
try {
fn(...args, function(error, value) {
error ? reject(error) : fulfill(value);
});
} catch (ex) {
reject(ex);
}
});
} | javascript | function checkedNodeCall(fn, ...args) {
return new Promise(function(fulfill, reject) {
try {
fn(...args, function(error, value) {
error ? reject(error) : fulfill(value);
});
} catch (ex) {
reject(ex);
}
});
} | [
"function",
"checkedNodeCall",
"(",
"fn",
",",
"...",
"args",
")",
"{",
"return",
"new",
"Promise",
"(",
"function",
"(",
"fulfill",
",",
"reject",
")",
"{",
"try",
"{",
"fn",
"(",
"...",
"args",
",",
"function",
"(",
"error",
",",
"value",
")",
"{",... | Wraps a function that expects a node-style callback as its final
argument. This callback expects two arguments: an error value (which will be
null if the call succeeded), and the success value as the second argument.
The callback will the resolve or reject the returned promise, based on its
arguments.
@param {!Function... | [
"Wraps",
"a",
"function",
"that",
"expects",
"a",
"node",
"-",
"style",
"callback",
"as",
"its",
"final",
"argument",
".",
"This",
"callback",
"expects",
"two",
"arguments",
":",
"an",
"error",
"value",
"(",
"which",
"will",
"be",
"null",
"if",
"the",
"c... | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/lib/promise.js#L72-L82 | train | Returns a promise that resolves to the result of the node call | [
30522,
3853,
7039,
3630,
3207,
9289,
2140,
1006,
1042,
2078,
1010,
1012,
1012,
1012,
12098,
5620,
1007,
1063,
2709,
2047,
4872,
1006,
3853,
1006,
13883,
1010,
15454,
1007,
1063,
3046,
1063,
1042,
2078,
1006,
1012,
1012,
1012,
12098,
30524,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
electron/electron | lib/browser/rpc-server.js | function (object) {
const proto = Object.getPrototypeOf(object)
if (proto === null || proto === Object.prototype) return null
return {
members: getObjectMembers(proto),
proto: getObjectPrototype(proto)
}
} | javascript | function (object) {
const proto = Object.getPrototypeOf(object)
if (proto === null || proto === Object.prototype) return null
return {
members: getObjectMembers(proto),
proto: getObjectPrototype(proto)
}
} | [
"function",
"(",
"object",
")",
"{",
"const",
"proto",
"=",
"Object",
".",
"getPrototypeOf",
"(",
"object",
")",
"if",
"(",
"proto",
"===",
"null",
"||",
"proto",
"===",
"Object",
".",
"prototype",
")",
"return",
"null",
"return",
"{",
"members",
":",
... | Return the description of object's prototype. | [
"Return",
"the",
"description",
"of",
"object",
"s",
"prototype",
"."
] | 6e29611788277729647acf465f10db1ea6f15788 | https://github.com/electron/electron/blob/6e29611788277729647acf465f10db1ea6f15788/lib/browser/rpc-server.js#L61-L68 | train | Returns an object with the members and prototype of the object | [
30522,
3853,
1006,
4874,
1007,
1063,
9530,
3367,
15053,
1027,
4874,
1012,
2131,
21572,
3406,
13874,
11253,
1006,
4874,
30524,
15053,
1007,
1010,
15053,
1024,
2131,
16429,
20614,
21572,
3406,
13874,
1006,
15053,
1007,
1065,
1065,
102,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
codemirror/CodeMirror | src/edit/global_events.js | onResize | function onResize(cm) {
let d = cm.display
// Might be a text scaling operation, clear size caches.
d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null
d.scrollbarsClipped = false
cm.setSize()
} | javascript | function onResize(cm) {
let d = cm.display
// Might be a text scaling operation, clear size caches.
d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null
d.scrollbarsClipped = false
cm.setSize()
} | [
"function",
"onResize",
"(",
"cm",
")",
"{",
"let",
"d",
"=",
"cm",
".",
"display",
"// Might be a text scaling operation, clear size caches.",
"d",
".",
"cachedCharWidth",
"=",
"d",
".",
"cachedTextHeight",
"=",
"d",
".",
"cachedPaddingH",
"=",
"null",
"d",
"."... | Called when the window resizes | [
"Called",
"when",
"the",
"window",
"resizes"
] | dab6f676107c10ba8d16c654a42f66cae3f27db1 | https://github.com/codemirror/CodeMirror/blob/dab6f676107c10ba8d16c654a42f66cae3f27db1/src/edit/global_events.js#L39-L45 | train | Called when the display is resized | [
30522,
3853,
2006,
6072,
4697,
1006,
4642,
1007,
1063,
2292,
1040,
1027,
4642,
1012,
4653,
1013,
1013,
2453,
2022,
1037,
3793,
25169,
3169,
30524,
17186,
8237,
11020,
15000,
5669,
1027,
6270,
4642,
1012,
4520,
4697,
1006,
1007,
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... |
SAP/openui5 | src/sap.ui.support/src/sap/ui/support/supportRules/History.js | function (oRun, sLibraryName, sRuleName) {
var aIssues = [];
if (oRun.issues[sLibraryName] && oRun.issues[sLibraryName][sRuleName]) {
oRun.issues[sLibraryName][sRuleName].forEach(function (oIssue) {
var oMinimizedIssue = {
"context": oIssue.context,
"details": oIssue.details,
"name": oIssue.n... | javascript | function (oRun, sLibraryName, sRuleName) {
var aIssues = [];
if (oRun.issues[sLibraryName] && oRun.issues[sLibraryName][sRuleName]) {
oRun.issues[sLibraryName][sRuleName].forEach(function (oIssue) {
var oMinimizedIssue = {
"context": oIssue.context,
"details": oIssue.details,
"name": oIssue.n... | [
"function",
"(",
"oRun",
",",
"sLibraryName",
",",
"sRuleName",
")",
"{",
"var",
"aIssues",
"=",
"[",
"]",
";",
"if",
"(",
"oRun",
".",
"issues",
"[",
"sLibraryName",
"]",
"&&",
"oRun",
".",
"issues",
"[",
"sLibraryName",
"]",
"[",
"sRuleName",
"]",
... | Gets all issues reported from a specific rule in shortened format - containing
only the necessary details of the issue.
@param {Object} oRun The analysis run
@param {string} sLibraryName The name of the library
@param {string} sRuleName The name of the rule
@returns {Array} All issues from a rule
@private
@method | [
"Gets",
"all",
"issues",
"reported",
"from",
"a",
"specific",
"rule",
"in",
"shortened",
"format",
"-",
"containing",
"only",
"the",
"necessary",
"details",
"of",
"the",
"issue",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/History.js#L109-L125 | train | Returns an array of issues that are not part of a specific rule. | [
30522,
3853,
1006,
2030,
4609,
1010,
22889,
12322,
19848,
18279,
4168,
1010,
5034,
9307,
18442,
1007,
1063,
13075,
9932,
4757,
15808,
1027,
1031,
1033,
1025,
2065,
1006,
2030,
4609,
1012,
3314,
1031,
22889,
12322,
19848,
18279,
4168,
1033,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js | function( prop ) {
if ( !prop ) {
return;
}
return nsNormalizeDict[ prop ] || ( nsNormalizeDict[ prop ] = $.camelCase( $.mobile.ns + prop ) );
} | javascript | function( prop ) {
if ( !prop ) {
return;
}
return nsNormalizeDict[ prop ] || ( nsNormalizeDict[ prop ] = $.camelCase( $.mobile.ns + prop ) );
} | [
"function",
"(",
"prop",
")",
"{",
"if",
"(",
"!",
"prop",
")",
"{",
"return",
";",
"}",
"return",
"nsNormalizeDict",
"[",
"prop",
"]",
"||",
"(",
"nsNormalizeDict",
"[",
"prop",
"]",
"=",
"$",
".",
"camelCase",
"(",
"$",
".",
"mobile",
".",
"ns",
... | Take a data attribute property, prepend the namespace and then camel case the attribute string. Add the result to our nsNormalizeDict so we don't have to do this again. | [
"Take",
"a",
"data",
"attribute",
"property",
"prepend",
"the",
"namespace",
"and",
"then",
"camel",
"case",
"the",
"attribute",
"string",
".",
"Add",
"the",
"result",
"to",
"our",
"nsNormalizeDict",
"so",
"we",
"don",
"t",
"have",
"to",
"do",
"this",
"aga... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js#L462-L468 | train | Get the namespace name for a property | [
30522,
3853,
1006,
17678,
1007,
1063,
2065,
1006,
999,
17678,
1007,
1063,
2709,
1025,
1065,
2709,
24978,
12131,
9067,
3550,
2594,
2102,
1031,
17678,
1033,
1064,
1064,
1006,
24978,
12131,
9067,
3550,
2594,
2102,
1031,
17678,
1033,
1027,
1002... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
eslint/eslint | lib/rules/no-var.js | isReferencedInClosure | function isReferencedInClosure(variable) {
const enclosingFunctionScope = getEnclosingFunctionScope(variable.scope);
return variable.references.some(reference =>
getEnclosingFunctionScope(reference.from) !== enclosingFunctionScope);
} | javascript | function isReferencedInClosure(variable) {
const enclosingFunctionScope = getEnclosingFunctionScope(variable.scope);
return variable.references.some(reference =>
getEnclosingFunctionScope(reference.from) !== enclosingFunctionScope);
} | [
"function",
"isReferencedInClosure",
"(",
"variable",
")",
"{",
"const",
"enclosingFunctionScope",
"=",
"getEnclosingFunctionScope",
"(",
"variable",
".",
"scope",
")",
";",
"return",
"variable",
".",
"references",
".",
"some",
"(",
"reference",
"=>",
"getEnclosingF... | Checks whether the given variable has any references from a more specific
function expression (i.e. a closure).
@param {eslint-scope.Variable} variable - A variable to check.
@returns {boolean} `true` if the variable is used from a closure. | [
"Checks",
"whether",
"the",
"given",
"variable",
"has",
"any",
"references",
"from",
"a",
"more",
"specific",
"function",
"expression",
"(",
"i",
".",
"e",
".",
"a",
"closure",
")",
"."
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-var.js#L51-L56 | train | Checks if a variable is referenced in a closure | [
30522,
3853,
2003,
2890,
25523,
8718,
20464,
2891,
5397,
1006,
8023,
1007,
1063,
9530,
3367,
4372,
20464,
18606,
11263,
27989,
26127,
1027,
2131,
2368,
20464,
18606,
11263,
27989,
26127,
1006,
8023,
1012,
9531,
1007,
1025,
2709,
8023,
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/prefs.js | preferences_setPref | function preferences_setPref(prefName, value, interfaceType) {
try {
switch (typeof value) {
case ('boolean'):
this.prefBranch.setBoolPref(prefName, value);
break;
case ('string'):
this.prefBranch.setCharPref(prefName, value);
break;
case ('numbe... | javascript | function preferences_setPref(prefName, value, interfaceType) {
try {
switch (typeof value) {
case ('boolean'):
this.prefBranch.setBoolPref(prefName, value);
break;
case ('string'):
this.prefBranch.setCharPref(prefName, value);
break;
case ('numbe... | [
"function",
"preferences_setPref",
"(",
"prefName",
",",
"value",
",",
"interfaceType",
")",
"{",
"try",
"{",
"switch",
"(",
"typeof",
"value",
")",
"{",
"case",
"(",
"'boolean'",
")",
":",
"this",
".",
"prefBranch",
".",
"setBoolPref",
"(",
"prefName",
",... | Set the value of an individual preference.
@param {string} prefName
The preference to set the value of.
@param {boolean/number/string/complex} value
The value to set the preference to.
@param {string} interfaceType
Interface to use for the complex value
(nsILocalFile, nsISupportsString, nsIPrefLocalizedString)
@retur... | [
"Set",
"the",
"value",
"of",
"an",
"individual",
"preference",
"."
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/prefs.js#L308-L328 | train | Set a preference | [
30522,
3853,
18394,
1035,
2275,
28139,
2546,
1006,
3653,
2546,
18442,
1010,
3643,
1010,
8278,
13874,
1007,
1063,
3046,
1063,
6942,
1006,
2828,
11253,
3643,
1007,
1063,
2553,
1006,
1005,
22017,
20898,
1005,
1007,
1024,
2023,
1012,
3653,
2633... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/doc.js | Doc | function Doc(runner, options) {
Base.call(this, runner, options);
var indents = 2;
function indent() {
return Array(indents).join(' ');
}
runner.on(EVENT_SUITE_BEGIN, function(suite) {
if (suite.root) {
return;
}
++indents;
console.log('%s<section class="suite">', indent());
... | javascript | function Doc(runner, options) {
Base.call(this, runner, options);
var indents = 2;
function indent() {
return Array(indents).join(' ');
}
runner.on(EVENT_SUITE_BEGIN, function(suite) {
if (suite.root) {
return;
}
++indents;
console.log('%s<section class="suite">', indent());
... | [
"function",
"Doc",
"(",
"runner",
",",
"options",
")",
"{",
"Base",
".",
"call",
"(",
"this",
",",
"runner",
",",
"options",
")",
";",
"var",
"indents",
"=",
"2",
";",
"function",
"indent",
"(",
")",
"{",
"return",
"Array",
"(",
"indents",
")",
"."... | Constructs a new `Doc` reporter instance.
@public
@class
@memberof Mocha.reporters
@extends Mocha.reporters.Base
@param {Runner} runner - Instance triggers reporter actions.
@param {Object} [options] - runner options | [
"Constructs",
"a",
"new",
"Doc",
"reporter",
"instance",
"."
] | 9b00fedb610241e33f7592c40164e42a38a793cf | https://github.com/mochajs/mocha/blob/9b00fedb610241e33f7592c40164e42a38a793cf/lib/reporters/doc.js#L33-L83 | train | Constructor for Doc | [
30522,
3853,
9986,
1006,
5479,
1010,
7047,
1007,
1063,
2918,
1012,
2655,
1006,
2023,
1010,
5479,
1010,
7047,
1007,
1025,
13075,
27427,
11187,
1027,
1016,
1025,
3853,
27427,
4765,
1006,
1007,
1063,
2709,
9140,
1006,
27427,
11187,
1007,
1012,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/extensibility/node/npm-installer.js | _performNpmInstall | function _performNpmInstall(installDirectory, npmOptions, callback) {
var npmPath = path.resolve(path.dirname(require.resolve("npm")), "..", "bin", "npm-cli.js");
var args = [npmPath, "install"].concat(npmOptions);
console.log("running npm " + args.slice(1).join(" ") + " in " + installDirectory);
var ... | javascript | function _performNpmInstall(installDirectory, npmOptions, callback) {
var npmPath = path.resolve(path.dirname(require.resolve("npm")), "..", "bin", "npm-cli.js");
var args = [npmPath, "install"].concat(npmOptions);
console.log("running npm " + args.slice(1).join(" ") + " in " + installDirectory);
var ... | [
"function",
"_performNpmInstall",
"(",
"installDirectory",
",",
"npmOptions",
",",
"callback",
")",
"{",
"var",
"npmPath",
"=",
"path",
".",
"resolve",
"(",
"path",
".",
"dirname",
"(",
"require",
".",
"resolve",
"(",
"\"npm\"",
")",
")",
",",
"\"..\"",
",... | Private function to run "npm install --production" command in the extension directory.
@param {string} installDirectory Directory to remove
@param {array} npmOptions can contain additional options like `--production` or `--proxy http://127.0.0.1:8888`
@param {function} callback NodeJS style callback to call after fini... | [
"Private",
"function",
"to",
"run",
"npm",
"install",
"--",
"production",
"command",
"in",
"the",
"extension",
"directory",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensibility/node/npm-installer.js#L43-L85 | train | Runs npm install | [
30522,
3853,
1035,
4685,
16275,
21266,
9080,
2140,
1006,
16500,
4305,
2890,
16761,
2100,
1010,
27937,
5302,
16790,
2015,
1010,
2655,
5963,
1007,
1063,
13075,
27937,
8737,
8988,
1027,
4130,
1012,
10663,
1006,
4130,
1012,
16101,
18442,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/document/DocumentCommandHandlers.js | handleDirtyChange | function handleDirtyChange(event, changedDoc) {
var currentDoc = DocumentManager.getCurrentDocument();
if (currentDoc && changedDoc.file.fullPath === currentDoc.file.fullPath) {
_updateTitle();
}
} | javascript | function handleDirtyChange(event, changedDoc) {
var currentDoc = DocumentManager.getCurrentDocument();
if (currentDoc && changedDoc.file.fullPath === currentDoc.file.fullPath) {
_updateTitle();
}
} | [
"function",
"handleDirtyChange",
"(",
"event",
",",
"changedDoc",
")",
"{",
"var",
"currentDoc",
"=",
"DocumentManager",
".",
"getCurrentDocument",
"(",
")",
";",
"if",
"(",
"currentDoc",
"&&",
"changedDoc",
".",
"file",
".",
"fullPath",
"===",
"currentDoc",
"... | Handles dirtyFlagChange event and updates the title bar if necessary | [
"Handles",
"dirtyFlagChange",
"event",
"and",
"updates",
"the",
"title",
"bar",
"if",
"necessary"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/document/DocumentCommandHandlers.js#L259-L265 | train | Handle a dirty change event | [
30522,
3853,
8971,
4313,
3723,
22305,
2063,
1006,
2724,
1010,
2904,
3527,
2278,
1007,
1063,
13075,
2783,
3527,
2278,
1027,
6254,
24805,
4590,
1012,
2131,
10841,
14343,
3372,
3527,
24894,
4765,
1006,
1007,
1025,
2065,
1006,
2783,
3527,
2278,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
MithrilJS/mithril.js | render/render.js | removeNodes | function removeNodes(vnodes, start, end) {
for (var i = start; i < end; i++) {
var vnode = vnodes[i]
if (vnode != null) removeNode(vnode)
}
} | javascript | function removeNodes(vnodes, start, end) {
for (var i = start; i < end; i++) {
var vnode = vnodes[i]
if (vnode != null) removeNode(vnode)
}
} | [
"function",
"removeNodes",
"(",
"vnodes",
",",
"start",
",",
"end",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"start",
";",
"i",
"<",
"end",
";",
"i",
"++",
")",
"{",
"var",
"vnode",
"=",
"vnodes",
"[",
"i",
"]",
"if",
"(",
"vnode",
"!=",
"null",
... | remove | [
"remove"
] | 6d36fe09d129928c6b460720e08d9ed321fcd62b | https://github.com/MithrilJS/mithril.js/blob/6d36fe09d129928c6b460720e08d9ed321fcd62b/render/render.js#L626-L631 | train | Remove a range of nodes | [
30522,
3853,
6366,
3630,
6155,
1006,
1058,
3630,
6155,
1010,
2707,
1010,
2203,
1007,
1063,
2005,
1006,
13075,
1045,
1027,
2707,
1025,
1045,
1026,
2203,
1025,
1045,
1009,
1009,
1007,
1063,
13075,
1058,
3630,
3207,
1027,
1058,
3630,
6155,
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... |
zloirock/core-js | packages/core-js/modules/web.url-search-params.js | getAll | function getAll(name) {
validateArgumentsLength(arguments.length, 1);
var entries = getInternalParamsState(this).entries;
var key = name + '';
var result = [];
var i = 0;
for (; i < entries.length; i++) if (entries[i].key === key) result.push(entries[i].value);
return result;
} | javascript | function getAll(name) {
validateArgumentsLength(arguments.length, 1);
var entries = getInternalParamsState(this).entries;
var key = name + '';
var result = [];
var i = 0;
for (; i < entries.length; i++) if (entries[i].key === key) result.push(entries[i].value);
return result;
} | [
"function",
"getAll",
"(",
"name",
")",
"{",
"validateArgumentsLength",
"(",
"arguments",
".",
"length",
",",
"1",
")",
";",
"var",
"entries",
"=",
"getInternalParamsState",
"(",
"this",
")",
".",
"entries",
";",
"var",
"key",
"=",
"name",
"+",
"''",
";"... | `URLSearchParams.prototype.getAll` method https://url.spec.whatwg.org/#dom-urlsearchparams-getall | [
"URLSearchParams",
".",
"prototype",
".",
"getAll",
"method",
"https",
":",
"//",
"url",
".",
"spec",
".",
"whatwg",
".",
"org",
"/",
"#dom",
"-",
"urlsearchparams",
"-",
"getall"
] | fe7c8511a6d27d03a9b8e075b3351416aae95c58 | https://github.com/zloirock/core-js/blob/fe7c8511a6d27d03a9b8e075b3351416aae95c58/packages/core-js/modules/web.url-search-params.js#L182-L190 | train | Returns all the parameters of the specified parameter | [
30522,
3853,
2131,
8095,
1006,
2171,
1007,
1063,
9398,
3686,
2906,
22850,
11187,
7770,
13512,
2232,
1006,
9918,
1012,
3091,
1010,
1015,
1007,
1025,
13075,
10445,
1027,
2131,
18447,
11795,
2389,
28689,
5244,
9153,
2618,
1006,
2023,
1007,
101... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
parcel-bundler/parcel | packages/core/parcel-bundler/src/scope-hoisting/shake.js | getUnusedBinding | function getUnusedBinding(path, name) {
let binding = path.scope.getBinding(name);
if (!binding) {
return null;
}
let pure = isPure(binding);
if (!binding.referenced && pure) {
return binding;
}
// Is there any references which aren't simple assignments?
let bailout = binding.referencePaths.so... | javascript | function getUnusedBinding(path, name) {
let binding = path.scope.getBinding(name);
if (!binding) {
return null;
}
let pure = isPure(binding);
if (!binding.referenced && pure) {
return binding;
}
// Is there any references which aren't simple assignments?
let bailout = binding.referencePaths.so... | [
"function",
"getUnusedBinding",
"(",
"path",
",",
"name",
")",
"{",
"let",
"binding",
"=",
"path",
".",
"scope",
".",
"getBinding",
"(",
"name",
")",
";",
"if",
"(",
"!",
"binding",
")",
"{",
"return",
"null",
";",
"}",
"let",
"pure",
"=",
"isPure",
... | Check if a binding is safe to remove and returns it if it is. | [
"Check",
"if",
"a",
"binding",
"is",
"safe",
"to",
"remove",
"and",
"returns",
"it",
"if",
"it",
"is",
"."
] | 84b308511f87d4b69da62bcd352f0ff2f7bd4f1b | https://github.com/parcel-bundler/parcel/blob/84b308511f87d4b69da62bcd352f0ff2f7bd4f1b/packages/core/parcel-bundler/src/scope-hoisting/shake.js#L39-L60 | train | Returns the binding that is not used by the given name. | [
30522,
3853,
2131,
4609,
13901,
8428,
4667,
1006,
4130,
1010,
2171,
1007,
1063,
2292,
8031,
1027,
4130,
1012,
9531,
1012,
2131,
8428,
4667,
1006,
2171,
1007,
1025,
2065,
1006,
999,
8031,
1007,
1063,
2709,
19701,
1025,
1065,
2292,
5760,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/preferences/PreferencesBase.js | function (context) {
context = context || {};
var layerCounter,
layers = this._layers,
layer,
data = this.data;
var keySets = [_.difference(_.keys(data), this._exclusions)];
for (layerCounter = 0; layerCounter < layers.len... | javascript | function (context) {
context = context || {};
var layerCounter,
layers = this._layers,
layer,
data = this.data;
var keySets = [_.difference(_.keys(data), this._exclusions)];
for (layerCounter = 0; layerCounter < layers.len... | [
"function",
"(",
"context",
")",
"{",
"context",
"=",
"context",
"||",
"{",
"}",
";",
"var",
"layerCounter",
",",
"layers",
"=",
"this",
".",
"_layers",
",",
"layer",
",",
"data",
"=",
"this",
".",
"data",
";",
"var",
"keySets",
"=",
"[",
"_",
".",... | Get the preference IDs that are set in this Scope. All layers are added
in. If context is not provided, the set of all keys in the Scope including
all keys in each layer will be returned.
@param {?Object} context Optional additional information for looking up the keys
@return {Array.<string>} Set of preferences set by... | [
"Get",
"the",
"preference",
"IDs",
"that",
"are",
"set",
"in",
"this",
"Scope",
".",
"All",
"layers",
"are",
"added",
"in",
".",
"If",
"context",
"is",
"not",
"provided",
"the",
"set",
"of",
"all",
"keys",
"in",
"the",
"Scope",
"including",
"all",
"key... | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/preferences/PreferencesBase.js#L486-L501 | train | Returns the keys of all the keysets in this data object. | [
30522,
3853,
1006,
6123,
1007,
1063,
6123,
1027,
6123,
1064,
1064,
1063,
1065,
1025,
13075,
6741,
3597,
16671,
2121,
1010,
9014,
1027,
2023,
1012,
1035,
9014,
1010,
6741,
1010,
2951,
1027,
2023,
1012,
2951,
1025,
13075,
6309,
8454,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
adobe/brackets | src/project/ProjectManager.js | getAllFiles | function getAllFiles(filter, includeWorkingSet, sort) {
var viewFiles, deferred;
// The filter and includeWorkingSet params are both optional.
// Handle the case where filter is omitted but includeWorkingSet is
// specified.
if (includeWorkingSet === undefined && typeof (filter)... | javascript | function getAllFiles(filter, includeWorkingSet, sort) {
var viewFiles, deferred;
// The filter and includeWorkingSet params are both optional.
// Handle the case where filter is omitted but includeWorkingSet is
// specified.
if (includeWorkingSet === undefined && typeof (filter)... | [
"function",
"getAllFiles",
"(",
"filter",
",",
"includeWorkingSet",
",",
"sort",
")",
"{",
"var",
"viewFiles",
",",
"deferred",
";",
"// The filter and includeWorkingSet params are both optional.",
"// Handle the case where filter is omitted but includeWorkingSet is",
"// specified... | Returns an Array of all files for this project, optionally including
files in the working set that are *not* under the project root. Files are
filtered first by ProjectModel.shouldShow(), then by the custom filter
argument (if one was provided).
@param {function (File, number):boolean=} filter Optional function to fil... | [
"Returns",
"an",
"Array",
"of",
"all",
"files",
"for",
"this",
"project",
"optionally",
"including",
"files",
"in",
"the",
"working",
"set",
"that",
"are",
"*",
"not",
"*",
"under",
"the",
"project",
"root",
".",
"Files",
"are",
"filtered",
"first",
"by",
... | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/project/ProjectManager.js#L1394-L1423 | train | Get all files in the project | [
30522,
3853,
2131,
8095,
8873,
4244,
1006,
11307,
1010,
2421,
21398,
13462,
1010,
4066,
1007,
1063,
13075,
3193,
8873,
4244,
1010,
13366,
28849,
2094,
1025,
1013,
1013,
1996,
11307,
1998,
2421,
21398,
13462,
11498,
5244,
2024,
2119,
11887,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.m/src/sap/m/routing/Target.js | checkUrl | function checkUrl() {
if (new UriParameters(window.location.href).get("sap-ui-xx-asyncRouting") === "true") {
Log.warning("Activation of async view loading in routing via url parameter is only temporarily supported and may be removed soon", "MobileTarget");
return true;
}
return false;
} | javascript | function checkUrl() {
if (new UriParameters(window.location.href).get("sap-ui-xx-asyncRouting") === "true") {
Log.warning("Activation of async view loading in routing via url parameter is only temporarily supported and may be removed soon", "MobileTarget");
return true;
}
return false;
} | [
"function",
"checkUrl",
"(",
")",
"{",
"if",
"(",
"new",
"UriParameters",
"(",
"window",
".",
"location",
".",
"href",
")",
".",
"get",
"(",
"\"sap-ui-xx-asyncRouting\"",
")",
"===",
"\"true\"",
")",
"{",
"Log",
".",
"warning",
"(",
"\"Activation of async vi... | temporarily: for checking the url param | [
"temporarily",
":",
"for",
"checking",
"the",
"url",
"param"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/routing/Target.js#L25-L31 | train | Checks if the url is valid | [
30522,
3853,
4638,
3126,
2140,
1006,
1007,
1063,
2065,
1006,
2047,
24471,
11514,
5400,
22828,
2015,
1006,
3332,
1012,
3295,
1012,
17850,
12879,
1007,
1012,
2131,
1006,
1000,
20066,
1011,
21318,
1011,
22038,
1011,
2004,
6038,
26775,
5833,
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... |
SAP/openui5 | src/sap.ui.fl/src/sap/ui/fl/Utils.js | function (oComponent) {
var oSapApp = null;
// special case for Fiori Elements to reach the real appComponent
if (oComponent && oComponent.getAppComponent) {
return oComponent.getAppComponent();
}
// special case for OVP
if (oComponent && oComponent.oComponentData && oComponent.oComponentData.app... | javascript | function (oComponent) {
var oSapApp = null;
// special case for Fiori Elements to reach the real appComponent
if (oComponent && oComponent.getAppComponent) {
return oComponent.getAppComponent();
}
// special case for OVP
if (oComponent && oComponent.oComponentData && oComponent.oComponentData.app... | [
"function",
"(",
"oComponent",
")",
"{",
"var",
"oSapApp",
"=",
"null",
";",
"// special case for Fiori Elements to reach the real appComponent",
"if",
"(",
"oComponent",
"&&",
"oComponent",
".",
"getAppComponent",
")",
"{",
"return",
"oComponent",
".",
"getAppComponent... | Returns the Component that belongs to given component whose type is "application".
@param {sap.ui.core.Component} oComponent - SAPUI5 component
@returns {sap.ui.core.Component|null} component instance if found or null
@private | [
"Returns",
"the",
"Component",
"that",
"belongs",
"to",
"given",
"component",
"whose",
"type",
"is",
"application",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/Utils.js#L580-L609 | train | Returns the component that is the owner of the component | [
30522,
3853,
1006,
1051,
9006,
29513,
3372,
1007,
1063,
13075,
9808,
22068,
9397,
1027,
19701,
1025,
1013,
1013,
2569,
2553,
2005,
10882,
10050,
3787,
2000,
3362,
1996,
2613,
10439,
9006,
29513,
3372,
2065,
1006,
1051,
9006,
29513,
3372,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
adobe/brackets | src/extensions/default/CodeFolding/foldhelpers/foldgutter.js | init | function init() {
CodeMirror.defineOption("foldGutter", false, function (cm, val, old) {
if (old && old !== CodeMirror.Init) {
cm.clearGutter(cm.state.foldGutter.options.gutter);
cm.state.foldGutter = null;
cm.off("gutterClick", old.onGutterClick);
... | javascript | function init() {
CodeMirror.defineOption("foldGutter", false, function (cm, val, old) {
if (old && old !== CodeMirror.Init) {
cm.clearGutter(cm.state.foldGutter.options.gutter);
cm.state.foldGutter = null;
cm.off("gutterClick", old.onGutterClick);
... | [
"function",
"init",
"(",
")",
"{",
"CodeMirror",
".",
"defineOption",
"(",
"\"foldGutter\"",
",",
"false",
",",
"function",
"(",
"cm",
",",
"val",
",",
"old",
")",
"{",
"if",
"(",
"old",
"&&",
"old",
"!==",
"CodeMirror",
".",
"Init",
")",
"{",
"cm",
... | Initialises the fold gutter and registers event handlers for changes to document, viewport
and user interactions. | [
"Initialises",
"the",
"fold",
"gutter",
"and",
"registers",
"event",
"handlers",
"for",
"changes",
"to",
"document",
"viewport",
"and",
"user",
"interactions",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/CodeFolding/foldhelpers/foldgutter.js#L365-L391 | train | Initialize the fold gutter | [
30522,
3853,
1999,
4183,
1006,
1007,
1063,
3642,
14503,
29165,
1012,
9375,
7361,
3508,
1006,
1000,
10671,
27920,
3334,
1000,
1010,
6270,
1010,
3853,
1006,
4642,
1010,
11748,
1010,
2214,
1007,
1063,
2065,
1006,
2214,
1004,
1004,
2214,
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... |
SAP/openui5 | src/sap.m/src/sap/m/DateTimeInput.js | buildPickerByType | function buildPickerByType(type){
var oPicker;
switch (type) {
case DateTimeInputType.DateTime:
oPicker = new DateTimePicker(this.getId() + "-Picker");
break;
case DateTimeInputType.Time:
oPicker = new TimePicker(this.getId() + "-Picker",
{localeId: sap.ui.getCore().getConfiguration().getFo... | javascript | function buildPickerByType(type){
var oPicker;
switch (type) {
case DateTimeInputType.DateTime:
oPicker = new DateTimePicker(this.getId() + "-Picker");
break;
case DateTimeInputType.Time:
oPicker = new TimePicker(this.getId() + "-Picker",
{localeId: sap.ui.getCore().getConfiguration().getFo... | [
"function",
"buildPickerByType",
"(",
"type",
")",
"{",
"var",
"oPicker",
";",
"switch",
"(",
"type",
")",
"{",
"case",
"DateTimeInputType",
".",
"DateTime",
":",
"oPicker",
"=",
"new",
"DateTimePicker",
"(",
"this",
".",
"getId",
"(",
")",
"+",
"\"-Picker... | Creates an instance of picker depending of the given property type
@param {sap.m.DateTimeInputType} type the type
@returns {sap.ui.core.Control} picker implementation, that may be one of <code>sap.m.DatePicker</code>,
<code>sap.m.TimePicker</code> or <code>sap.m.DateTimePicker</code>. | [
"Creates",
"an",
"instance",
"of",
"picker",
"depending",
"of",
"the",
"given",
"property",
"type"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/DateTimeInput.js#L276-L317 | train | Creates a new instance of the picker based on the type of the input. | [
30522,
3853,
3857,
24330,
5484,
3762,
13874,
1006,
2828,
1007,
1063,
13075,
6728,
6799,
2121,
1025,
6942,
1006,
2828,
1007,
1063,
2553,
3058,
7292,
2378,
18780,
13874,
1012,
3058,
7292,
1024,
6728,
6799,
2121,
1027,
2047,
3058,
7292,
24330,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/registry/ChangeTypeMetadata.js | function(mParam) {
if (!mParam.name) {
Utils.log.error("sap.ui.fl.registry.ChangeType: Name required");
}
if (!mParam.changeHandler) {
Utils.log.error("sap.ui.fl.registry.ChangeType: ChangeHandler required");
}
this._name = mParam.name;
this._changeHandler = mParam.changeHandler;
this._layers... | javascript | function(mParam) {
if (!mParam.name) {
Utils.log.error("sap.ui.fl.registry.ChangeType: Name required");
}
if (!mParam.changeHandler) {
Utils.log.error("sap.ui.fl.registry.ChangeType: ChangeHandler required");
}
this._name = mParam.name;
this._changeHandler = mParam.changeHandler;
this._layers... | [
"function",
"(",
"mParam",
")",
"{",
"if",
"(",
"!",
"mParam",
".",
"name",
")",
"{",
"Utils",
".",
"log",
".",
"error",
"(",
"\"sap.ui.fl.registry.ChangeType: Name required\"",
")",
";",
"}",
"if",
"(",
"!",
"mParam",
".",
"changeHandler",
")",
"{",
"Ut... | Object to define a change type with it's handlers and visual appearance options
@constructor
@param {Object} mParam Parameter description below
@param {String} mParam.name Semantic name to identify the change type
@param {String} mParam.changeHandler Full qualified name of the function which is executed when a change f... | [
"Object",
"to",
"define",
"a",
"change",
"type",
"with",
"it",
"s",
"handlers",
"and",
"visual",
"appearance",
"options",
"@constructor",
"@param",
"{",
"Object",
"}",
"mParam",
"Parameter",
"description",
"below",
"@param",
"{",
"String",
"}",
"mParam",
".",
... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/registry/ChangeTypeMetadata.js#L25-L49 | train | Sets the parameters of the ChangeType | [
30522,
3853,
1006,
6131,
5400,
2213,
1007,
1063,
2065,
1006,
999,
6131,
5400,
2213,
1012,
2171,
1007,
1063,
21183,
12146,
1012,
8833,
1012,
7561,
1006,
1000,
20066,
1012,
21318,
1012,
13109,
1012,
15584,
1012,
2689,
13874,
1024,
2171,
3223,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
GitbookIO/gitbook | lib/parse/parseStructureFile.js | parseFile | function parseFile(fs, file, type) {
var filepath = file.getPath();
var parser = file.getParser();
if (!parser) {
return Promise.reject(
error.FileNotParsableError({
filename: filepath
})
);
}
return fs.readAsString(filepath)
.then(functi... | javascript | function parseFile(fs, file, type) {
var filepath = file.getPath();
var parser = file.getParser();
if (!parser) {
return Promise.reject(
error.FileNotParsableError({
filename: filepath
})
);
}
return fs.readAsString(filepath)
.then(functi... | [
"function",
"parseFile",
"(",
"fs",
",",
"file",
",",
"type",
")",
"{",
"var",
"filepath",
"=",
"file",
".",
"getPath",
"(",
")",
";",
"var",
"parser",
"=",
"file",
".",
"getParser",
"(",
")",
";",
"if",
"(",
"!",
"parser",
")",
"{",
"return",
"P... | Parse a ParsableFile using a specific method
@param {FS} fs
@param {ParsableFile} file
@param {String} type
@return {Promise<Array<String, List|Map>>} | [
"Parse",
"a",
"ParsableFile",
"using",
"a",
"specific",
"method"
] | 6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4 | https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/parse/parseStructureFile.js#L13-L45 | train | Parse a file | [
30522,
3853,
11968,
20106,
9463,
1006,
1042,
2015,
1010,
5371,
1010,
2828,
1007,
1063,
13075,
5371,
15069,
1027,
5371,
1012,
2131,
15069,
1006,
1007,
1025,
13075,
11968,
8043,
1027,
5371,
1012,
2131,
19362,
8043,
1006,
1007,
1025,
30524,
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... |
SAP/openui5 | src/sap.ui.core/src/sap/base/util/deepEqual.js | function(a, b, maxDepth, contains, depth) {
// Optional parameter normalization
if (typeof maxDepth == "boolean") {
contains = maxDepth;
maxDepth = undefined;
}
if (!depth) {
depth = 0;
}
if (!maxDepth) {
maxDepth = 10;
}
if (depth > maxDepth) {
Log.warning("deepEqual comparison exceeded ... | javascript | function(a, b, maxDepth, contains, depth) {
// Optional parameter normalization
if (typeof maxDepth == "boolean") {
contains = maxDepth;
maxDepth = undefined;
}
if (!depth) {
depth = 0;
}
if (!maxDepth) {
maxDepth = 10;
}
if (depth > maxDepth) {
Log.warning("deepEqual comparison exceeded ... | [
"function",
"(",
"a",
",",
"b",
",",
"maxDepth",
",",
"contains",
",",
"depth",
")",
"{",
"// Optional parameter normalization",
"if",
"(",
"typeof",
"maxDepth",
"==",
"\"boolean\"",
")",
"{",
"contains",
"=",
"maxDepth",
";",
"maxDepth",
"=",
"undefined",
"... | Compares the two given values for equality, especially by comparing the content.
Note: function does not work with comparing XML objects
@function
@since 1.58
@param {any} a A value of any type
@param {any} b A value of any type
@param {int} [maxDepth=10] Maximum recursion depth
@param {boolean} [contains] Whether all... | [
"Compares",
"the",
"two",
"given",
"values",
"for",
"equality",
"especially",
"by",
"comparing",
"the",
"content",
".",
"Note",
":",
"function",
"does",
"not",
"work",
"with",
"comparing",
"XML",
"objects"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/base/util/deepEqual.js#L26-L90 | train | Returns true if a is deep equal to b | [
30522,
3853,
1006,
1037,
1010,
1038,
1010,
4098,
3207,
13876,
2232,
1010,
3397,
1010,
5995,
1007,
1063,
1013,
1013,
11887,
16381,
3671,
3989,
2065,
1006,
2828,
11253,
4098,
3207,
13876,
2232,
1027,
1027,
1000,
22017,
20898,
1000,
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... | |
jhipster/generator-jhipster | generators/docker-prompts.js | askForConsoleOptions | function askForConsoleOptions() {
if (this.regenerate) return;
if (this.monitoring !== 'elk') return;
const done = this.async();
const prompts = [
{
type: 'checkbox',
name: 'consoleOptions',
message:
'You have selected the JHipster Console w... | javascript | function askForConsoleOptions() {
if (this.regenerate) return;
if (this.monitoring !== 'elk') return;
const done = this.async();
const prompts = [
{
type: 'checkbox',
name: 'consoleOptions',
message:
'You have selected the JHipster Console w... | [
"function",
"askForConsoleOptions",
"(",
")",
"{",
"if",
"(",
"this",
".",
"regenerate",
")",
"return",
";",
"if",
"(",
"this",
".",
"monitoring",
"!==",
"'elk'",
")",
"return",
";",
"const",
"done",
"=",
"this",
".",
"async",
"(",
")",
";",
"const",
... | Ask For Console Options | [
"Ask",
"For",
"Console",
"Options"
] | f76fa8de0818ce6bda6c7b1455942e2a9b0ae3ff | https://github.com/jhipster/generator-jhipster/blob/f76fa8de0818ce6bda6c7b1455942e2a9b0ae3ff/generators/docker-prompts.js#L270-L302 | train | Ask For Console Options | [
30522,
3853,
3198,
29278,
8663,
19454,
8780,
16790,
2015,
1006,
1007,
1063,
2065,
1006,
2023,
1012,
19723,
24454,
3686,
1007,
2709,
1025,
2065,
1006,
2023,
1012,
8822,
999,
1027,
1027,
1005,
18995,
1005,
1007,
2709,
1025,
9530,
3367,
2589,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
eslint/eslint | lib/config/config-validator.js | validateRules | function validateRules(rulesConfig, ruleMapper, source = null) {
if (!rulesConfig) {
return;
}
Object.keys(rulesConfig).forEach(id => {
validateRuleOptions(ruleMapper(id), id, rulesConfig[id], source);
});
} | javascript | function validateRules(rulesConfig, ruleMapper, source = null) {
if (!rulesConfig) {
return;
}
Object.keys(rulesConfig).forEach(id => {
validateRuleOptions(ruleMapper(id), id, rulesConfig[id], source);
});
} | [
"function",
"validateRules",
"(",
"rulesConfig",
",",
"ruleMapper",
",",
"source",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"rulesConfig",
")",
"{",
"return",
";",
"}",
"Object",
".",
"keys",
"(",
"rulesConfig",
")",
".",
"forEach",
"(",
"id",
"=>",
"{",... | Validates a rules config object
@param {Object} rulesConfig The rules config object to validate.
@param {function(string): {create: Function}} ruleMapper A mapper function from strings to loaded rules
@param {string} source The name of the configuration source to report in any errors.
@returns {void} | [
"Validates",
"a",
"rules",
"config",
"object"
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/config/config-validator.js#L171-L179 | train | Validate rules config | [
30522,
3853,
9398,
24932,
16308,
1006,
3513,
8663,
8873,
2290,
1010,
3627,
2863,
18620,
1010,
3120,
1027,
19701,
1007,
1063,
2065,
1006,
999,
3513,
8663,
8873,
2290,
1007,
1063,
2709,
1025,
1065,
4874,
1012,
6309,
1006,
3513,
8663,
8873,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/RenderManager.js | reset | function reset() {
aBuffer = that.aBuffer = [];
aRenderedControls = that.aRenderedControls = [];
aStyleStack = that.aStyleStack = [{}];
} | javascript | function reset() {
aBuffer = that.aBuffer = [];
aRenderedControls = that.aRenderedControls = [];
aStyleStack = that.aStyleStack = [{}];
} | [
"function",
"reset",
"(",
")",
"{",
"aBuffer",
"=",
"that",
".",
"aBuffer",
"=",
"[",
"]",
";",
"aRenderedControls",
"=",
"that",
".",
"aRenderedControls",
"=",
"[",
"]",
";",
"aStyleStack",
"=",
"that",
".",
"aStyleStack",
"=",
"[",
"{",
"}",
"]",
"... | Reset all rendering related buffers. | [
"Reset",
"all",
"rendering",
"related",
"buffers",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/RenderManager.js#L114-L118 | train | Reset the internal state | [
30522,
3853,
25141,
1006,
1007,
1063,
8273,
12494,
1027,
2008,
1012,
8273,
12494,
1027,
1031,
1033,
1025,
4995,
4063,
2098,
8663,
13181,
4877,
1027,
2008,
1012,
4995,
4063,
2098,
8663,
13181,
4877,
1027,
1031,
1033,
1025,
2004,
27983,
9153,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
webdriverio/webdriverio | packages/wdio-sync/src/index.js | function (hookFn, origFn, before, after, repeatTest = 0) {
const hookError = (hookName) => (e) => log.error(`Error in ${hookName}: ${e.stack}`)
return origFn(function (...hookArgs) {
// Print errors encountered in beforeHook and afterHook to console, but
// don't propagate them to avoid failing... | javascript | function (hookFn, origFn, before, after, repeatTest = 0) {
const hookError = (hookName) => (e) => log.error(`Error in ${hookName}: ${e.stack}`)
return origFn(function (...hookArgs) {
// Print errors encountered in beforeHook and afterHook to console, but
// don't propagate them to avoid failing... | [
"function",
"(",
"hookFn",
",",
"origFn",
",",
"before",
",",
"after",
",",
"repeatTest",
"=",
"0",
")",
"{",
"const",
"hookError",
"=",
"(",
"hookName",
")",
"=>",
"(",
"e",
")",
"=>",
"log",
".",
"error",
"(",
"`",
"${",
"hookName",
"}",
"${",
... | runs a hook within fibers context (if function name is not async)
it also executes before/after hook hook
@param {Function} hookFn function that was passed to the framework hook
@param {Function} origFn original framework hook function
@param {Function} before before hook hook
@param {Function} afte... | [
"runs",
"a",
"hook",
"within",
"fibers",
"context",
"(",
"if",
"function",
"name",
"is",
"not",
"async",
")",
"it",
"also",
"executes",
"before",
"/",
"after",
"hook",
"hook"
] | 8de7f1a3b12d97282ed4ee2e25e4c3c9a8940ac1 | https://github.com/webdriverio/webdriverio/blob/8de7f1a3b12d97282ed4ee2e25e4c3c9a8940ac1/packages/wdio-sync/src/index.js#L111-L131 | train | Executes a function in sequence | [
30522,
3853,
1006,
8103,
2546,
2078,
1010,
2030,
8004,
2546,
2078,
1010,
2077,
1010,
2044,
1010,
9377,
22199,
1027,
1014,
1007,
1063,
9530,
3367,
17074,
29165,
1027,
1006,
8103,
18442,
1007,
1027,
1028,
1006,
1041,
1007,
1027,
1028,
8833,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
angular/material | src/components/menu/js/menuServiceProvider.js | activateInteraction | function activateInteraction() {
if (!opts.menuContentEl[0]) return angular.noop;
// Wire up keyboard listeners.
// - Close on escape,
// - focus next item on down arrow,
// - focus prev item on up
opts.menuContentEl.on('keydown', onMenuKeyDown);
opts.menuContent... | javascript | function activateInteraction() {
if (!opts.menuContentEl[0]) return angular.noop;
// Wire up keyboard listeners.
// - Close on escape,
// - focus next item on down arrow,
// - focus prev item on up
opts.menuContentEl.on('keydown', onMenuKeyDown);
opts.menuContent... | [
"function",
"activateInteraction",
"(",
")",
"{",
"if",
"(",
"!",
"opts",
".",
"menuContentEl",
"[",
"0",
"]",
")",
"return",
"angular",
".",
"noop",
";",
"// Wire up keyboard listeners.",
"// - Close on escape,",
"// - focus next item on down arrow,",
"// - focus prev ... | Activate interaction on the menu. Resolves the focus target and closes the menu on
escape or option click.
@returns {!Function} Function to deactivate the interaction listeners. | [
"Activate",
"interaction",
"on",
"the",
"menu",
".",
"Resolves",
"the",
"focus",
"target",
"and",
"closes",
"the",
"menu",
"on",
"escape",
"or",
"option",
"click",
"."
] | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/menu/js/menuServiceProvider.js#L248-L381 | train | Activates the interaction. | [
30522,
3853,
20544,
18447,
6906,
7542,
1006,
1007,
1063,
2065,
1006,
999,
23569,
2015,
1012,
12183,
8663,
6528,
9834,
1031,
1014,
1033,
1007,
2709,
16108,
1012,
2053,
7361,
1025,
1013,
1013,
7318,
2039,
9019,
13810,
1012,
1013,
1013,
1011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
GitbookIO/gitbook | lib/utils/promise.js | some | function some(arr, iter) {
arr = Immutable.List(arr);
return arr.reduce(function(prev, elem, i) {
return prev.then(function(val) {
if (val) return val;
return iter(elem, i);
});
}, Q());
} | javascript | function some(arr, iter) {
arr = Immutable.List(arr);
return arr.reduce(function(prev, elem, i) {
return prev.then(function(val) {
if (val) return val;
return iter(elem, i);
});
}, Q());
} | [
"function",
"some",
"(",
"arr",
",",
"iter",
")",
"{",
"arr",
"=",
"Immutable",
".",
"List",
"(",
"arr",
")",
";",
"return",
"arr",
".",
"reduce",
"(",
"function",
"(",
"prev",
",",
"elem",
",",
"i",
")",
"{",
"return",
"prev",
".",
"then",
"(",
... | Iter over an array and return first result (not null)
@param {Array|List} arr
@param {Function(element, index)}
@return {Promise<Mixed>} | [
"Iter",
"over",
"an",
"array",
"and",
"return",
"first",
"result",
"(",
"not",
"null",
")"
] | 6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4 | https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/utils/promise.js#L64-L74 | train | returns a promise that resolves to a promise | [
30522,
3853,
2070,
1006,
12098,
2099,
1010,
2009,
2121,
1007,
1063,
12098,
2099,
1027,
10047,
28120,
3085,
1012,
2862,
1006,
12098,
2099,
1007,
1025,
2709,
12098,
2099,
1012,
5547,
1006,
3853,
1006,
3653,
2615,
1010,
3449,
6633,
1010,
1045,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
vuejs/vuex | src/helpers.js | getModuleByNamespace | function getModuleByNamespace (store, helper, namespace) {
const module = store._modulesNamespaceMap[namespace]
if (process.env.NODE_ENV !== 'production' && !module) {
console.error(`[vuex] module namespace not found in ${helper}(): ${namespace}`)
}
return module
} | javascript | function getModuleByNamespace (store, helper, namespace) {
const module = store._modulesNamespaceMap[namespace]
if (process.env.NODE_ENV !== 'production' && !module) {
console.error(`[vuex] module namespace not found in ${helper}(): ${namespace}`)
}
return module
} | [
"function",
"getModuleByNamespace",
"(",
"store",
",",
"helper",
",",
"namespace",
")",
"{",
"const",
"module",
"=",
"store",
".",
"_modulesNamespaceMap",
"[",
"namespace",
"]",
"if",
"(",
"process",
".",
"env",
".",
"NODE_ENV",
"!==",
"'production'",
"&&",
... | Search a special module from store by namespace. if module not exist, print error message.
@param {Object} store
@param {String} helper
@param {String} namespace
@return {Object} | [
"Search",
"a",
"special",
"module",
"from",
"store",
"by",
"namespace",
".",
"if",
"module",
"not",
"exist",
"print",
"error",
"message",
"."
] | d7c7f9844831f98c5c9aaca213746c4ccc5d6929 | https://github.com/vuejs/vuex/blob/d7c7f9844831f98c5c9aaca213746c4ccc5d6929/src/helpers.js#L161-L167 | train | Get module by namespace | [
30522,
3853,
2131,
5302,
8566,
2571,
3762,
18442,
23058,
1006,
3573,
1010,
2393,
2121,
1010,
3415,
15327,
1007,
1063,
9530,
3367,
11336,
1027,
3573,
1012,
1035,
14184,
18442,
23058,
2863,
2361,
1031,
3415,
15327,
1033,
2065,
1006,
2832,
101... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
GeekyAnts/vue-native-core | packages/vue-server-renderer/build.js | renderDOMProps | function renderDOMProps (node) {
var props = node.data.domProps;
var res = '';
var parent = node.parent;
while (isDef(parent)) {
if (parent.data && parent.data.domProps) {
props = Object.assign({}, props, parent.data.domProps);
}
parent = parent.parent;
}
if (isUndef(props)) {
return... | javascript | function renderDOMProps (node) {
var props = node.data.domProps;
var res = '';
var parent = node.parent;
while (isDef(parent)) {
if (parent.data && parent.data.domProps) {
props = Object.assign({}, props, parent.data.domProps);
}
parent = parent.parent;
}
if (isUndef(props)) {
return... | [
"function",
"renderDOMProps",
"(",
"node",
")",
"{",
"var",
"props",
"=",
"node",
".",
"data",
".",
"domProps",
";",
"var",
"res",
"=",
"''",
";",
"var",
"parent",
"=",
"node",
".",
"parent",
";",
"while",
"(",
"isDef",
"(",
"parent",
")",
")",
"{"... | /* | [
"/",
"*"
] | a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e | https://github.com/GeekyAnts/vue-native-core/blob/a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e/packages/vue-server-renderer/build.js#L369-L401 | train | render DOM props | [
30522,
3853,
17552,
9527,
21572,
4523,
1006,
13045,
1007,
1063,
13075,
24387,
1027,
13045,
1012,
2951,
1012,
14383,
21572,
4523,
1025,
13075,
24501,
1027,
1005,
1005,
1025,
13075,
6687,
1027,
13045,
1012,
6687,
1025,
2096,
1006,
2003,
3207,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/file/FileUtils.js | getBaseName | function getBaseName(fullPath) {
var lastSlash = fullPath.lastIndexOf("/");
if (lastSlash === fullPath.length - 1) { // directory: exclude trailing "/" too
return fullPath.slice(fullPath.lastIndexOf("/", fullPath.length - 2) + 1, -1);
} else {
return fullPath.slice(lastS... | javascript | function getBaseName(fullPath) {
var lastSlash = fullPath.lastIndexOf("/");
if (lastSlash === fullPath.length - 1) { // directory: exclude trailing "/" too
return fullPath.slice(fullPath.lastIndexOf("/", fullPath.length - 2) + 1, -1);
} else {
return fullPath.slice(lastS... | [
"function",
"getBaseName",
"(",
"fullPath",
")",
"{",
"var",
"lastSlash",
"=",
"fullPath",
".",
"lastIndexOf",
"(",
"\"/\"",
")",
";",
"if",
"(",
"lastSlash",
"===",
"fullPath",
".",
"length",
"-",
"1",
")",
"{",
"// directory: exclude trailing \"/\" too",
"re... | Get the name of a file or a directory, removing any preceding path.
@param {string} fullPath full path to a file or directory
@return {string} Returns the base name of a file or the name of a
directory | [
"Get",
"the",
"name",
"of",
"a",
"file",
"or",
"a",
"directory",
"removing",
"any",
"preceding",
"path",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/file/FileUtils.js#L287-L294 | train | Get the base name of the file | [
30522,
3853,
2131,
15058,
18442,
1006,
2440,
15069,
1007,
1063,
13075,
16180,
27067,
1027,
2440,
15069,
1012,
2197,
22254,
10288,
11253,
1006,
1000,
30524,
1027,
2440,
15069,
1012,
3091,
1011,
1015,
1007,
1063,
1013,
1013,
14176,
1024,
23329,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
firebase/firebase-js-sdk | packages/auth/demo/public/script.js | makeApplicationVerifier | function makeApplicationVerifier(submitButtonId) {
var container = recaptchaSize === 'invisible' ?
submitButtonId :
'recaptcha-container';
applicationVerifier = new firebase.auth.RecaptchaVerifier(container,
{'size': recaptchaSize});
} | javascript | function makeApplicationVerifier(submitButtonId) {
var container = recaptchaSize === 'invisible' ?
submitButtonId :
'recaptcha-container';
applicationVerifier = new firebase.auth.RecaptchaVerifier(container,
{'size': recaptchaSize});
} | [
"function",
"makeApplicationVerifier",
"(",
"submitButtonId",
")",
"{",
"var",
"container",
"=",
"recaptchaSize",
"===",
"'invisible'",
"?",
"submitButtonId",
":",
"'recaptcha-container'",
";",
"applicationVerifier",
"=",
"new",
"firebase",
".",
"auth",
".",
"Recaptch... | Initializes the ApplicationVerifier.
@param {string} submitButtonId The ID of the DOM element of the button to
which we attach the invisible reCAPTCHA. This is required even in visible
mode. | [
"Initializes",
"the",
"ApplicationVerifier",
"."
] | 491598a499813dacc23724de5e237ec220cc560e | https://github.com/firebase/firebase-js-sdk/blob/491598a499813dacc23724de5e237ec220cc560e/packages/auth/demo/public/script.js#L411-L417 | train | Creates an application verifier. | [
30522,
3853,
2191,
29098,
19341,
3508,
6299,
18095,
1006,
12040,
8569,
15474,
3593,
1007,
1063,
13075,
11661,
1027,
28667,
9331,
10649,
21369,
4371,
1027,
1027,
1027,
1005,
8841,
1005,
1029,
12040,
8569,
15474,
3593,
1024,
1005,
28667,
9331,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
goldfire/howler.js | dist/howler.js | function(o) {
var self = this;
// If we don't have an AudioContext created yet, run the setup.
if (!Howler.ctx) {
setupAudioContext();
}
// Setup user-defined default properties.
self._autoplay = o.autoplay || false;
self._format = (typeof o.format !== 'string') ? o.f... | javascript | function(o) {
var self = this;
// If we don't have an AudioContext created yet, run the setup.
if (!Howler.ctx) {
setupAudioContext();
}
// Setup user-defined default properties.
self._autoplay = o.autoplay || false;
self._format = (typeof o.format !== 'string') ? o.f... | [
"function",
"(",
"o",
")",
"{",
"var",
"self",
"=",
"this",
";",
"// If we don't have an AudioContext created yet, run the setup.",
"if",
"(",
"!",
"Howler",
".",
"ctx",
")",
"{",
"setupAudioContext",
"(",
")",
";",
"}",
"// Setup user-defined default properties.",
... | Initialize a new Howl group object.
@param {Object} o Passed in properties for this group.
@return {Howl} | [
"Initialize",
"a",
"new",
"Howl",
"group",
"object",
"."
] | 030db918dd8ce640afd57e172418472497e8f113 | https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/dist/howler.js#L545-L618 | train | Initialize the AudioContext object. | [
30522,
3853,
1006,
1051,
1007,
1063,
13075,
2969,
1027,
2023,
1025,
1013,
1013,
2065,
2057,
2123,
1005,
1056,
2031,
2019,
5746,
8663,
18209,
2580,
2664,
1010,
2448,
1996,
16437,
1012,
2065,
1006,
999,
22912,
2121,
1012,
14931,
2595,
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... | |
SheetJS/js-xlsx | xlsx.js | parse_DataSpaceVersionInfo | function parse_DataSpaceVersionInfo(blob) {
var o = {};
o.id = blob.read_shift(0, 'lpp4');
o.R = parse_CRYPTOVersion(blob, 4);
o.U = parse_CRYPTOVersion(blob, 4);
o.W = parse_CRYPTOVersion(blob, 4);
return o;
} | javascript | function parse_DataSpaceVersionInfo(blob) {
var o = {};
o.id = blob.read_shift(0, 'lpp4');
o.R = parse_CRYPTOVersion(blob, 4);
o.U = parse_CRYPTOVersion(blob, 4);
o.W = parse_CRYPTOVersion(blob, 4);
return o;
} | [
"function",
"parse_DataSpaceVersionInfo",
"(",
"blob",
")",
"{",
"var",
"o",
"=",
"{",
"}",
";",
"o",
".",
"id",
"=",
"blob",
".",
"read_shift",
"(",
"0",
",",
"'lpp4'",
")",
";",
"o",
".",
"R",
"=",
"parse_CRYPTOVersion",
"(",
"blob",
",",
"4",
")... | /* [MS-OFFCRYPTO] 2.1.5 DataSpaceVersionInfo | [
"/",
"*",
"[",
"MS",
"-",
"OFFCRYPTO",
"]",
"2",
".",
"1",
".",
"5",
"DataSpaceVersionInfo"
] | 9a6d8a1d3d80c78dad5201fb389316f935279cdc | https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L8131-L8138 | train | Parse the data space version information | [
30522,
3853,
11968,
3366,
1035,
2951,
23058,
27774,
2378,
14876,
1006,
1038,
4135,
2497,
1007,
1063,
13075,
1051,
1027,
1063,
1065,
1025,
1051,
1012,
8909,
1027,
1038,
4135,
2497,
1012,
3191,
1035,
5670,
1006,
1014,
1010,
1005,
6948,
2361,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
facebook/relay | packages/relay-runtime/network/RelayNetwork.js | create | function create(
fetchFn: FetchFunction,
subscribeFn?: SubscribeFunction,
): Network {
// Convert to functions that returns RelayObservable.
const observeFetch = convertFetch(fetchFn);
const observeSubscribe = subscribeFn
? convertSubscribe(subscribeFn)
: undefined;
function execute(
request: R... | javascript | function create(
fetchFn: FetchFunction,
subscribeFn?: SubscribeFunction,
): Network {
// Convert to functions that returns RelayObservable.
const observeFetch = convertFetch(fetchFn);
const observeSubscribe = subscribeFn
? convertSubscribe(subscribeFn)
: undefined;
function execute(
request: R... | [
"function",
"create",
"(",
"fetchFn",
":",
"FetchFunction",
",",
"subscribeFn",
"?",
":",
"SubscribeFunction",
",",
")",
":",
"Network",
"{",
"// Convert to functions that returns RelayObservable.",
"const",
"observeFetch",
"=",
"convertFetch",
"(",
"fetchFn",
")",
";... | Creates an implementation of the `Network` interface defined in
`RelayNetworkTypes` given `fetch` and `subscribe` functions. | [
"Creates",
"an",
"implementation",
"of",
"the",
"Network",
"interface",
"defined",
"in",
"RelayNetworkTypes",
"given",
"fetch",
"and",
"subscribe",
"functions",
"."
] | 7fb9be5182b9650637d7b92ead9a42713ac30aa4 | https://github.com/facebook/relay/blob/7fb9be5182b9650637d7b92ead9a42713ac30aa4/packages/relay-runtime/network/RelayNetwork.js#L33-L76 | train | Creates a network layer that can be used to execute a query. | [
30522,
3853,
3443,
1006,
18584,
2546,
2078,
1024,
18584,
11263,
27989,
1010,
4942,
29234,
2546,
2078,
1029,
1024,
4942,
29234,
11263,
27989,
1010,
1007,
1024,
2897,
1063,
1013,
1013,
10463,
2000,
4972,
2008,
5651,
8846,
16429,
8043,
12423,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/rules/CoreHelper.support.js | function () {
return Array.from(document.styleSheets).filter(function (styleSheet) {
var themeName = sap.ui.getCore().getConfiguration().getTheme(),
styleSheetEnding = "/themes/" + themeName + "/library.css",
hasHref = !styleSheet.href || !(styleSheet.href.indexOf(styleSheetEnding) !== -1),
h... | javascript | function () {
return Array.from(document.styleSheets).filter(function (styleSheet) {
var themeName = sap.ui.getCore().getConfiguration().getTheme(),
styleSheetEnding = "/themes/" + themeName + "/library.css",
hasHref = !styleSheet.href || !(styleSheet.href.indexOf(styleSheetEnding) !== -1),
h... | [
"function",
"(",
")",
"{",
"return",
"Array",
".",
"from",
"(",
"document",
".",
"styleSheets",
")",
".",
"filter",
"(",
"function",
"(",
"styleSheet",
")",
"{",
"var",
"themeName",
"=",
"sap",
".",
"ui",
".",
"getCore",
"(",
")",
".",
"getConfiguratio... | *
Search and filter all style sheets that are not loaded by the default theme and controls.
@returns {array} List of all custom CSS files paths. | [
"*",
"Search",
"and",
"filter",
"all",
"style",
"sheets",
"that",
"are",
"not",
"loaded",
"by",
"the",
"default",
"theme",
"and",
"controls",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/rules/CoreHelper.support.js#L41-L50 | train | Returns an array of all stylesheets that have a href attribute and has rules attribute | [
30522,
3853,
1006,
1007,
1063,
2709,
9140,
1012,
2013,
1006,
6254,
1012,
6782,
21030,
3215,
1007,
1012,
11307,
1006,
3853,
1006,
6782,
21030,
2102,
1007,
1063,
13075,
4323,
18442,
1027,
20066,
1012,
21318,
1012,
2131,
17345,
1006,
1007,
101... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
BlackrockDigital/startbootstrap-sb-admin-2 | vendor/chart.js/Chart.js | function(ctx, x, y, width, height, radius) {
if (radius) {
var r = Math.min(radius, height / 2, width / 2);
var left = x + r;
var top = y + r;
var right = x + width - r;
var bottom = y + height - r;
ctx.moveTo(x, top);
if (left < right && top < bottom) {
ctx.arc(left, top, r, -PI, -HALF_PI);... | javascript | function(ctx, x, y, width, height, radius) {
if (radius) {
var r = Math.min(radius, height / 2, width / 2);
var left = x + r;
var top = y + r;
var right = x + width - r;
var bottom = y + height - r;
ctx.moveTo(x, top);
if (left < right && top < bottom) {
ctx.arc(left, top, r, -PI, -HALF_PI);... | [
"function",
"(",
"ctx",
",",
"x",
",",
"y",
",",
"width",
",",
"height",
",",
"radius",
")",
"{",
"if",
"(",
"radius",
")",
"{",
"var",
"r",
"=",
"Math",
".",
"min",
"(",
"radius",
",",
"height",
"/",
"2",
",",
"width",
"/",
"2",
")",
";",
... | Creates a "path" for a rectangle with rounded corners at position (x, y) with a
given size (width, height) and the same `radius` for all corners.
@param {CanvasRenderingContext2D} ctx - The canvas 2D Context.
@param {number} x - The x axis of the coordinate for the rectangle starting point.
@param {number} y - The y ax... | [
"Creates",
"a",
"path",
"for",
"a",
"rectangle",
"with",
"rounded",
"corners",
"at",
"position",
"(",
"x",
"y",
")",
"with",
"a",
"given",
"size",
"(",
"width",
"height",
")",
"and",
"the",
"same",
"radius",
"for",
"all",
"corners",
"."
] | ddfaceb4a8e65a41f163e2fdc4eab49384b810a1 | https://github.com/BlackrockDigital/startbootstrap-sb-admin-2/blob/ddfaceb4a8e65a41f163e2fdc4eab49384b810a1/vendor/chart.js/Chart.js#L2311-L2340 | train | Draw the specified rectangle | [
30522,
3853,
1006,
14931,
2595,
1010,
1060,
1010,
1061,
1010,
9381,
1010,
4578,
1010,
12177,
1007,
1063,
2065,
1006,
12177,
1007,
1063,
13075,
1054,
1027,
8785,
1012,
8117,
1006,
12177,
1010,
4578,
1013,
1016,
1010,
9381,
1013,
1016,
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... | |
SeleniumHQ/selenium | javascript/selenium-core/xpath/util.js | predicateExprHasPositionalSelector | function predicateExprHasPositionalSelector(expr, isRecursiveCall) {
if (!expr) {
return false;
}
if (!isRecursiveCall && exprReturnsNumberValue(expr)) {
// this is a "proximity position"-based predicate
return true;
}
if (expr instanceof FunctionCallExpr) {
var value = expr.name.value;
re... | javascript | function predicateExprHasPositionalSelector(expr, isRecursiveCall) {
if (!expr) {
return false;
}
if (!isRecursiveCall && exprReturnsNumberValue(expr)) {
// this is a "proximity position"-based predicate
return true;
}
if (expr instanceof FunctionCallExpr) {
var value = expr.name.value;
re... | [
"function",
"predicateExprHasPositionalSelector",
"(",
"expr",
",",
"isRecursiveCall",
")",
"{",
"if",
"(",
"!",
"expr",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"isRecursiveCall",
"&&",
"exprReturnsNumberValue",
"(",
"expr",
")",
")",
"{",
"//... | Determines whether a predicate expression contains a "positional selector".
A positional selector filters nodes from the nodelist input based on their
position within that list. When such selectors are encountered, the
evaluation of the predicate cannot be depth-first, because the positional
selector may be based on th... | [
"Determines",
"whether",
"a",
"predicate",
"expression",
"contains",
"a",
"positional",
"selector",
".",
"A",
"positional",
"selector",
"filters",
"nodes",
"from",
"the",
"nodelist",
"input",
"based",
"on",
"their",
"position",
"within",
"that",
"list",
".",
"Wh... | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/xpath/util.js#L495-L513 | train | Returns true if the predicate expression has a positional selector | [
30522,
3853,
3653,
16467,
10288,
18098,
14949,
26994,
9777,
12260,
16761,
1006,
4654,
18098,
1010,
2003,
2890,
10841,
2869,
3512,
9289,
2140,
1007,
1063,
2065,
1006,
999,
4654,
18098,
1007,
1063,
2709,
6270,
1025,
1065,
2065,
1006,
999,
200... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.commons/src/sap/ui/commons/DropdownBox.js | remove | function remove(id) {
var oItem = sap.ui.getCore().byId(id);
if (oItem) {
oItem.destroy();
}
} | javascript | function remove(id) {
var oItem = sap.ui.getCore().byId(id);
if (oItem) {
oItem.destroy();
}
} | [
"function",
"remove",
"(",
"id",
")",
"{",
"var",
"oItem",
"=",
"sap",
".",
"ui",
".",
"getCore",
"(",
")",
".",
"byId",
"(",
"id",
")",
";",
"if",
"(",
"oItem",
")",
"{",
"oItem",
".",
"destroy",
"(",
")",
";",
"}",
"}"
] | check for and remaining history items and destroy them | [
"check",
"for",
"and",
"remaining",
"history",
"items",
"and",
"destroy",
"them"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/DropdownBox.js#L131-L136 | train | Removes an item from the collection | [
30522,
3853,
6366,
1006,
8909,
1007,
1063,
13075,
1051,
4221,
2213,
1027,
20066,
1012,
21318,
1012,
2131,
17345,
1006,
1007,
1012,
2011,
3593,
1006,
8909,
1007,
1025,
2065,
1006,
1051,
4221,
2213,
1007,
1063,
1051,
4221,
2213,
1012,
6033,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/chart.js/Chart.js | function(element,dimension)
{
if (element['offset'+dimension])
{
return element['offset'+dimension];
}
else
{
return document.defaultView.getComputedStyle(element).getPropertyValue(dimension);
}
} | javascript | function(element,dimension)
{
if (element['offset'+dimension])
{
return element['offset'+dimension];
}
else
{
return document.defaultView.getComputedStyle(element).getPropertyValue(dimension);
}
} | [
"function",
"(",
"element",
",",
"dimension",
")",
"{",
"if",
"(",
"element",
"[",
"'offset'",
"+",
"dimension",
"]",
")",
"{",
"return",
"element",
"[",
"'offset'",
"+",
"dimension",
"]",
";",
"}",
"else",
"{",
"return",
"document",
".",
"defaultView",
... | Variables global to the chart | [
"Variables",
"global",
"to",
"the",
"chart"
] | 19113c3cbc19a7afe0cfd3158d647064d2d30661 | https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/bower_components/chart.js/Chart.js#L28-L38 | train | Returns the value of the element at the specified dimension. | [
30522,
3853,
1006,
5783,
1010,
9812,
1007,
1063,
2065,
1006,
5783,
1031,
1005,
16396,
1005,
1009,
9812,
1033,
1007,
1063,
2709,
5783,
1031,
1005,
16396,
1005,
1009,
9812,
1033,
1025,
1065,
2842,
1063,
2709,
6254,
1012,
12398,
8584,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_AggregationCache.js | _AggregationCache | function _AggregationCache(oRequestor, sResourcePath, oAggregation, mQueryOptions) {
var mAlias2MeasureAndMethod = {},
oFirstLevelAggregation,
mFirstQueryOptions,
fnMeasureRangeResolve;
_Cache.call(this, oRequestor, sResourcePath, mQueryOptions, true);
this.oAggregation = oAggregation;
if (_Aggregati... | javascript | function _AggregationCache(oRequestor, sResourcePath, oAggregation, mQueryOptions) {
var mAlias2MeasureAndMethod = {},
oFirstLevelAggregation,
mFirstQueryOptions,
fnMeasureRangeResolve;
_Cache.call(this, oRequestor, sResourcePath, mQueryOptions, true);
this.oAggregation = oAggregation;
if (_Aggregati... | [
"function",
"_AggregationCache",
"(",
"oRequestor",
",",
"sResourcePath",
",",
"oAggregation",
",",
"mQueryOptions",
")",
"{",
"var",
"mAlias2MeasureAndMethod",
"=",
"{",
"}",
",",
"oFirstLevelAggregation",
",",
"mFirstQueryOptions",
",",
"fnMeasureRangeResolve",
";",
... | ********************************************************************************************* _AggregationCache *********************************************************************************************
Creates a cache for data aggregation that performs requests using the given requestor.
Note: The paths in $expand... | [
"*********************************************************************************************",
"_AggregationCache",
"*********************************************************************************************",
"Creates",
"a",
"cache",
"for",
"data",
"aggregation",
"that",
"performs",
"req... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_AggregationCache.js#L48-L99 | train | Creates a new aggregation cache. | [
30522,
3853,
1035,
28041,
3540,
5403,
1006,
10848,
15500,
2953,
1010,
5034,
2229,
8162,
3401,
15069,
1010,
1051,
8490,
17603,
12540,
1010,
1049,
4226,
2854,
7361,
9285,
1007,
1063,
13075,
16007,
3022,
2475,
4168,
3022,
5397,
5685,
11368,
68... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ColorlibHQ/AdminLTE | plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js | _execCommand | function _execCommand(doc, composer, command, nodeName, className) {
var ranges = composer.selection.getOwnRanges();
for (var i = ranges.length; i--;){
composer.selection.getSelection().removeAllRanges();
composer.selection.setSelection(ranges[i]);
if (className) {
var eventListener = ... | javascript | function _execCommand(doc, composer, command, nodeName, className) {
var ranges = composer.selection.getOwnRanges();
for (var i = ranges.length; i--;){
composer.selection.getSelection().removeAllRanges();
composer.selection.setSelection(ranges[i]);
if (className) {
var eventListener = ... | [
"function",
"_execCommand",
"(",
"doc",
",",
"composer",
",",
"command",
",",
"nodeName",
",",
"className",
")",
"{",
"var",
"ranges",
"=",
"composer",
".",
"selection",
".",
"getOwnRanges",
"(",
")",
";",
"for",
"(",
"var",
"i",
"=",
"ranges",
".",
"l... | Execute native query command
and if necessary modify the inserted node's className | [
"Execute",
"native",
"query",
"command",
"and",
"if",
"necessary",
"modify",
"the",
"inserted",
"node",
"s",
"className"
] | 19113c3cbc19a7afe0cfd3158d647064d2d30661 | https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js#L10674-L10699 | train | execCommand - Executes a command on a document | [
30522,
3853,
1035,
4654,
8586,
9006,
2386,
2094,
1006,
9986,
1010,
4543,
1010,
3094,
1010,
13045,
18442,
1010,
2465,
18442,
1007,
1063,
13075,
8483,
1027,
4543,
1012,
4989,
1012,
2131,
12384,
24388,
2229,
1006,
1007,
1025,
2005,
1006,
13075... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
firebase/firebase-js-sdk | packages/auth/src/authuser.js | function() {
// Get time until expiration minus the refresh offset.
var waitInterval =
self.stsTokenManager_.getExpirationTime() - goog.now() -
fireauth.TokenRefreshTime.OFFSET_DURATION;
// Set to zero if wait interval is negative.
return waitInterval > 0 ? waitIn... | javascript | function() {
// Get time until expiration minus the refresh offset.
var waitInterval =
self.stsTokenManager_.getExpirationTime() - goog.now() -
fireauth.TokenRefreshTime.OFFSET_DURATION;
// Set to zero if wait interval is negative.
return waitInterval > 0 ? waitIn... | [
"function",
"(",
")",
"{",
"// Get time until expiration minus the refresh offset.",
"var",
"waitInterval",
"=",
"self",
".",
"stsTokenManager_",
".",
"getExpirationTime",
"(",
")",
"-",
"goog",
".",
"now",
"(",
")",
"-",
"fireauth",
".",
"TokenRefreshTime",
".",
... | Return next time to run with offset applied. | [
"Return",
"next",
"time",
"to",
"run",
"with",
"offset",
"applied",
"."
] | 491598a499813dacc23724de5e237ec220cc560e | https://github.com/firebase/firebase-js-sdk/blob/491598a499813dacc23724de5e237ec220cc560e/packages/auth/src/authuser.js#L474-L481 | train | Returns the wait interval in milliseconds. | [
30522,
3853,
1006,
1007,
1063,
1013,
1013,
2131,
2051,
2127,
4654,
16781,
15718,
1996,
25416,
21898,
16396,
1012,
13075,
3524,
18447,
2121,
10175,
1027,
2969,
1012,
8541,
18715,
2368,
24805,
4590,
1035,
1012,
2131,
10288,
16781,
7292,
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/lib/_Batch.js | function (aRequests) {
var oBatchRequest = _serializeBatchRequest(aRequests);
return {
body : oBatchRequest.body.join(""),
headers : {
"Content-Type" : "multipart/mixed; boundary=" + oBatchRequest.batchBoundary,
"MIME-Version" : "1.0"
}
};
} | javascript | function (aRequests) {
var oBatchRequest = _serializeBatchRequest(aRequests);
return {
body : oBatchRequest.body.join(""),
headers : {
"Content-Type" : "multipart/mixed; boundary=" + oBatchRequest.batchBoundary,
"MIME-Version" : "1.0"
}
};
} | [
"function",
"(",
"aRequests",
")",
"{",
"var",
"oBatchRequest",
"=",
"_serializeBatchRequest",
"(",
"aRequests",
")",
";",
"return",
"{",
"body",
":",
"oBatchRequest",
".",
"body",
".",
"join",
"(",
"\"\"",
")",
",",
"headers",
":",
"{",
"\"Content-Type\"",
... | Serializes an array of requests to an object containing the batch request body and
mandatory headers for the batch request.
@param {object[]} aRequests
An array consisting of request objects <code>oRequest</code> or out of array(s)
of request objects <code>oRequest</code>, in case requests need to be sent in scope of
... | [
"Serializes",
"an",
"array",
"of",
"requests",
"to",
"an",
"object",
"containing",
"the",
"batch",
"request",
"body",
"and",
"mandatory",
"headers",
"for",
"the",
"batch",
"request",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_Batch.js#L395-L405 | train | Serialize a batch request | [
30522,
3853,
1006,
2024,
15500,
2015,
1007,
1063,
13075,
27885,
4017,
2818,
2890,
15500,
1027,
1035,
7642,
4697,
14479,
2818,
2890,
15500,
1006,
2024,
15500,
2015,
1007,
1025,
2709,
1063,
2303,
1024,
27885,
4017,
2818,
2890,
15500,
1012,
23... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
adobe/brackets | src/view/MainViewManager.js | isExclusiveToPane | function isExclusiveToPane(file, paneId) {
paneId = paneId === ACTIVE_PANE && _activePaneId ? _activePaneId : paneId;
var index = _.findIndex(_mruList, function (record) {
return (record.file.fullPath === file.fullPath && record.paneId !== paneId);
});
return index === -1;
... | javascript | function isExclusiveToPane(file, paneId) {
paneId = paneId === ACTIVE_PANE && _activePaneId ? _activePaneId : paneId;
var index = _.findIndex(_mruList, function (record) {
return (record.file.fullPath === file.fullPath && record.paneId !== paneId);
});
return index === -1;
... | [
"function",
"isExclusiveToPane",
"(",
"file",
",",
"paneId",
")",
"{",
"paneId",
"=",
"paneId",
"===",
"ACTIVE_PANE",
"&&",
"_activePaneId",
"?",
"_activePaneId",
":",
"paneId",
";",
"var",
"index",
"=",
"_",
".",
"findIndex",
"(",
"_mruList",
",",
"function... | Checks whether a file is listed exclusively in the provided pane
@param {!File} File - the file
@return {{file:File, paneId:string}} | [
"Checks",
"whether",
"a",
"file",
"is",
"listed",
"exclusively",
"in",
"the",
"provided",
"pane"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/view/MainViewManager.js#L271-L277 | train | Returns true if the given file is exclusive to the specified pane | [
30522,
3853,
2003,
10288,
23633,
14399,
7231,
1006,
5371,
1010,
6090,
7416,
2094,
1007,
1063,
6090,
7416,
2094,
30524,
1035,
2720,
15859,
3367,
1010,
3853,
1006,
2501,
1007,
1063,
2709,
1006,
2501,
1012,
5371,
1012,
2440,
15069,
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... |
adobe/brackets | src/extensibility/ExtensionManager.js | downloadRegistry | function downloadRegistry() {
if (pendingDownloadRegistry) {
return pendingDownloadRegistry.promise();
}
pendingDownloadRegistry = new $.Deferred();
$.ajax({
url: brackets.config.extension_registry,
dataType: "json",
cache: false
... | javascript | function downloadRegistry() {
if (pendingDownloadRegistry) {
return pendingDownloadRegistry.promise();
}
pendingDownloadRegistry = new $.Deferred();
$.ajax({
url: brackets.config.extension_registry,
dataType: "json",
cache: false
... | [
"function",
"downloadRegistry",
"(",
")",
"{",
"if",
"(",
"pendingDownloadRegistry",
")",
"{",
"return",
"pendingDownloadRegistry",
".",
"promise",
"(",
")",
";",
"}",
"pendingDownloadRegistry",
"=",
"new",
"$",
".",
"Deferred",
"(",
")",
";",
"$",
".",
"aja... | Downloads the registry of Brackets extensions and stores the information in our
extension info.
@return {$.Promise} a promise that's resolved with the registry JSON data
or rejected if the server can't be reached. | [
"Downloads",
"the",
"registry",
"of",
"Brackets",
"extensions",
"and",
"stores",
"the",
"information",
"in",
"our",
"extension",
"info",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensibility/ExtensionManager.js#L205-L238 | train | Downloads the registry from the server | [
30522,
3853,
8816,
2890,
24063,
2854,
1006,
1007,
1063,
2065,
1006,
14223,
7698,
11066,
2890,
24063,
2854,
1007,
1063,
2709,
14223,
7698,
11066,
2890,
24063,
2854,
1012,
4872,
1006,
1007,
1025,
1065,
14223,
7698,
11066,
2890,
24063,
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... |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/v4/ODataMetaModel.js | getKeyPath | function getKeyPath(aKeys) {
var vKey;
if (aKeys && aKeys.length === 1) {
vKey = aKeys[0];
} else {
throw new Error("Single key expected: " + sTypePath);
}
return typeof vKey === "string" ? vKey : vKey[Object.keys(vKey)[0]];
} | javascript | function getKeyPath(aKeys) {
var vKey;
if (aKeys && aKeys.length === 1) {
vKey = aKeys[0];
} else {
throw new Error("Single key expected: " + sTypePath);
}
return typeof vKey === "string" ? vKey : vKey[Object.keys(vKey)[0]];
} | [
"function",
"getKeyPath",
"(",
"aKeys",
")",
"{",
"var",
"vKey",
";",
"if",
"(",
"aKeys",
"&&",
"aKeys",
".",
"length",
"===",
"1",
")",
"{",
"vKey",
"=",
"aKeys",
"[",
"0",
"]",
";",
"}",
"else",
"{",
"throw",
"new",
"Error",
"(",
"\"Single key ex... | /*
@param {object[]} aKeys
The type's keys
@returns {string}
The property path to the type's single key
@throws {Error}
If the type does not have a single key | [
"/",
"*"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/ODataMetaModel.js#L2243-L2253 | train | Get the key path for the given keys | [
30522,
3853,
2131,
14839,
15069,
1006,
17712,
3240,
2015,
1007,
1063,
13075,
1058,
14839,
1025,
2065,
1006,
17712,
3240,
2015,
1004,
1004,
17712,
3240,
2015,
1012,
3091,
1027,
1027,
1027,
1015,
1007,
1063,
1058,
14839,
1027,
17712,
3240,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/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... |
angular/material | src/components/autocomplete/js/autocompleteController.js | reportMessages | function reportMessages(isPolite, types) {
var politeness = isPolite ? 'polite' : 'assertive';
var messages = [];
if (types & ReportType.Selected && ctrl.index !== -1) {
messages.push(getCurrentDisplayValue());
}
if (types & ReportType.Count) {
messages.push($q.resolve(getCountMessage(... | javascript | function reportMessages(isPolite, types) {
var politeness = isPolite ? 'polite' : 'assertive';
var messages = [];
if (types & ReportType.Selected && ctrl.index !== -1) {
messages.push(getCurrentDisplayValue());
}
if (types & ReportType.Count) {
messages.push($q.resolve(getCountMessage(... | [
"function",
"reportMessages",
"(",
"isPolite",
",",
"types",
")",
"{",
"var",
"politeness",
"=",
"isPolite",
"?",
"'polite'",
":",
"'assertive'",
";",
"var",
"messages",
"=",
"[",
"]",
";",
"if",
"(",
"types",
"&",
"ReportType",
".",
"Selected",
"&&",
"c... | Reports given message types to supported screen readers.
@param {boolean} isPolite Whether the announcement should be polite.
@param {!number} types Message flags to be reported to the screen reader. | [
"Reports",
"given",
"message",
"types",
"to",
"supported",
"screen",
"readers",
"."
] | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/autocomplete/js/autocompleteController.js#L928-L943 | train | Report messages | [
30522,
3853,
3189,
7834,
3736,
8449,
1006,
2003,
18155,
4221,
1010,
4127,
1007,
1063,
13075,
13205,
2791,
1027,
2003,
18155,
4221,
1029,
1005,
13205,
1005,
1024,
1005,
20865,
3512,
1005,
1025,
13075,
7696,
1027,
1031,
1033,
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... |
nhn/tui.editor | src/js/extensions/table/mergedTableAddRow.js | _findFocusTd | function _findFocusTd($newTable, rowIndex, colIndex) {
const tableData = dataHandler.createTableData($newTable);
const newRowIndex = dataHandler.findRowMergedLastIndex(tableData, rowIndex, colIndex) + 1;
const cellElementIndex = dataHandler.findElementIndex(tableData, newRowIndex, colIndex);
return $newTable.f... | javascript | function _findFocusTd($newTable, rowIndex, colIndex) {
const tableData = dataHandler.createTableData($newTable);
const newRowIndex = dataHandler.findRowMergedLastIndex(tableData, rowIndex, colIndex) + 1;
const cellElementIndex = dataHandler.findElementIndex(tableData, newRowIndex, colIndex);
return $newTable.f... | [
"function",
"_findFocusTd",
"(",
"$newTable",
",",
"rowIndex",
",",
"colIndex",
")",
"{",
"const",
"tableData",
"=",
"dataHandler",
".",
"createTableData",
"(",
"$newTable",
")",
";",
"const",
"newRowIndex",
"=",
"dataHandler",
".",
"findRowMergedLastIndex",
"(",
... | Find focus td element.
@param {jQuery} $newTable - changed table jQuery element
@param {number} rowIndex - row index of table data
@param {number} colIndex - column index of tabld data
@returns {HTMLElement}
@private | [
"Find",
"focus",
"td",
"element",
"."
] | e75ab08c2a7ab07d1143e318f7cde135c5e3002e | https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/extensions/table/mergedTableAddRow.js#L133-L139 | train | Find focus td element | [
30522,
3853,
1035,
2424,
14876,
7874,
2102,
2094,
1006,
1002,
25597,
3085,
1010,
5216,
22254,
10288,
1010,
6972,
3207,
2595,
1007,
1063,
9530,
3367,
2795,
2850,
2696,
1027,
2951,
11774,
3917,
1012,
3443,
10880,
2850,
2696,
1006,
1002,
25597... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/scene/a-scene.js | getCanvasSize | function getCanvasSize (canvasEl, embedded, maxSize, isVR) {
if (embedded) {
return {
height: canvasEl.parentElement.offsetHeight,
width: canvasEl.parentElement.offsetWidth
};
}
return getMaxSize(maxSize, isVR);
} | javascript | function getCanvasSize (canvasEl, embedded, maxSize, isVR) {
if (embedded) {
return {
height: canvasEl.parentElement.offsetHeight,
width: canvasEl.parentElement.offsetWidth
};
}
return getMaxSize(maxSize, isVR);
} | [
"function",
"getCanvasSize",
"(",
"canvasEl",
",",
"embedded",
",",
"maxSize",
",",
"isVR",
")",
"{",
"if",
"(",
"embedded",
")",
"{",
"return",
"{",
"height",
":",
"canvasEl",
".",
"parentElement",
".",
"offsetHeight",
",",
"width",
":",
"canvasEl",
".",
... | Return the canvas size where the scene will be rendered.
Will be always the window size except when the scene is embedded.
The parent size (less than max size) will be returned in that case.
@param {object} canvasEl - the canvas element
@param {boolean} embedded - Is the scene embedded?
@param {object} max - Max size ... | [
"Return",
"the",
"canvas",
"size",
"where",
"the",
"scene",
"will",
"be",
"rendered",
".",
"Will",
"be",
"always",
"the",
"window",
"size",
"except",
"when",
"the",
"scene",
"is",
"embedded",
".",
"The",
"parent",
"size",
"(",
"less",
"than",
"max",
"siz... | 24acc78a7299a4cdfe3ef617f4d40ddf6275c992 | https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/core/scene/a-scene.js#L751-L759 | train | Get the size of the canvas element | [
30522,
3853,
2131,
9336,
12044,
5332,
4371,
1006,
10683,
2884,
1010,
11157,
1010,
4098,
5332,
4371,
1010,
2003,
19716,
1007,
1063,
2065,
1006,
11157,
1007,
1063,
2709,
1063,
4578,
1024,
10683,
2884,
1012,
6687,
12260,
3672,
1012,
16396,
260... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
firebase/firebase-js-sdk | packages/auth/demo/public/script.js | onSendSignInLinkToEmail | function onSendSignInLinkToEmail() {
var email = $('#sign-in-with-email-link-email').val();
auth.sendSignInLinkToEmail(email, getActionCodeSettings()).then(function() {
alertSuccess('Email sent!');
}, onAuthError);
} | javascript | function onSendSignInLinkToEmail() {
var email = $('#sign-in-with-email-link-email').val();
auth.sendSignInLinkToEmail(email, getActionCodeSettings()).then(function() {
alertSuccess('Email sent!');
}, onAuthError);
} | [
"function",
"onSendSignInLinkToEmail",
"(",
")",
"{",
"var",
"email",
"=",
"$",
"(",
"'#sign-in-with-email-link-email'",
")",
".",
"val",
"(",
")",
";",
"auth",
".",
"sendSignInLinkToEmail",
"(",
"email",
",",
"getActionCodeSettings",
"(",
")",
")",
".",
"then... | Sends sign in with email link to the user. | [
"Sends",
"sign",
"in",
"with",
"email",
"link",
"to",
"the",
"user",
"."
] | 491598a499813dacc23724de5e237ec220cc560e | https://github.com/firebase/firebase-js-sdk/blob/491598a499813dacc23724de5e237ec220cc560e/packages/auth/demo/public/script.js#L641-L646 | train | Send sign in link to email | [
30522,
3853,
2006,
5054,
5104,
23773,
2378,
13767,
3406,
14545,
4014,
1006,
1007,
1063,
13075,
10373,
1027,
1002,
1006,
1005,
1001,
3696,
1011,
1999,
1011,
2007,
1011,
10373,
1011,
4957,
1011,
10373,
1005,
1007,
1012,
11748,
1006,
1007,
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... |
SeleniumHQ/selenium | third_party/js/mozmill/shared-modules/private-browsing.js | privateBrowsing_start | function privateBrowsing_start(useShortcut) {
var dialog = null;
if (this.enabled)
return;
if (this.showPrompt) {
dialog = new modalDialog.modalDialog(this._controller.window);
dialog.start(this._handler);
}
if (useShortcut) {
var cmdKey = utils.getEntity(this.getDtds(), "... | javascript | function privateBrowsing_start(useShortcut) {
var dialog = null;
if (this.enabled)
return;
if (this.showPrompt) {
dialog = new modalDialog.modalDialog(this._controller.window);
dialog.start(this._handler);
}
if (useShortcut) {
var cmdKey = utils.getEntity(this.getDtds(), "... | [
"function",
"privateBrowsing_start",
"(",
"useShortcut",
")",
"{",
"var",
"dialog",
"=",
"null",
";",
"if",
"(",
"this",
".",
"enabled",
")",
"return",
";",
"if",
"(",
"this",
".",
"showPrompt",
")",
"{",
"dialog",
"=",
"new",
"modalDialog",
".",
"modalD... | Start the Private Browsing mode
@param {boolean} useShortcut
Use the keyboard shortcut if true otherwise the menu entry is used | [
"Start",
"the",
"Private",
"Browsing",
"mode"
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/private-browsing.js#L176-L198 | train | privateBrowsing_start - Start private browsing | [
30522,
3853,
2797,
12618,
9333,
2075,
1035,
2707,
1006,
3594,
27794,
12690,
1007,
1063,
13075,
13764,
8649,
1027,
19701,
1025,
2065,
1006,
2023,
1012,
9124,
1007,
2709,
1025,
2065,
1006,
2023,
1012,
2265,
21572,
27718,
1007,
1063,
13764,
86... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
netlify/netlify-cms | packages/netlify-cms-media-library-uploadcare/src/index.js | init | async function init({ options = { config: {} }, handleInsert } = {}) {
const { publicKey, ...globalConfig } = options.config;
const baseConfig = { ...defaultConfig, ...globalConfig };
window.UPLOADCARE_PUBLIC_KEY = publicKey;
/**
* Register the effects tab by default because the effects tab is awesome. Can... | javascript | async function init({ options = { config: {} }, handleInsert } = {}) {
const { publicKey, ...globalConfig } = options.config;
const baseConfig = { ...defaultConfig, ...globalConfig };
window.UPLOADCARE_PUBLIC_KEY = publicKey;
/**
* Register the effects tab by default because the effects tab is awesome. Can... | [
"async",
"function",
"init",
"(",
"{",
"options",
"=",
"{",
"config",
":",
"{",
"}",
"}",
",",
"handleInsert",
"}",
"=",
"{",
"}",
")",
"{",
"const",
"{",
"publicKey",
",",
"...",
"globalConfig",
"}",
"=",
"options",
".",
"config",
";",
"const",
"b... | Initialization function will only run once, returns an API object for Netlify
CMS to call methods on. | [
"Initialization",
"function",
"will",
"only",
"run",
"once",
"returns",
"an",
"API",
"object",
"for",
"Netlify",
"CMS",
"to",
"call",
"methods",
"on",
"."
] | 2488556590cbfdcefa626f2f2de01e7a160cf6ee | https://github.com/netlify/netlify-cms/blob/2488556590cbfdcefa626f2f2de01e7a160cf6ee/packages/netlify-cms-media-library-uploadcare/src/index.js#L93-L135 | train | Initialize the uploadcare widget. | [
30522,
2004,
6038,
2278,
3853,
1999,
4183,
1006,
1063,
7047,
1027,
1063,
9530,
8873,
2290,
1024,
1063,
1065,
1065,
1010,
5047,
7076,
8743,
1065,
1027,
1063,
1065,
1007,
1063,
9530,
3367,
1063,
2270,
14839,
1010,
1012,
1012,
1012,
3795,
86... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
goldfire/howler.js | examples/3d/js/game.js | function(time) {
var ms = time - this.lastTime;
this.lastTime = time;
// Update the different components of the scene.
this.map.update(ms / 1000);
this.player.update(ms / 1000);
this.camera.render(this.player, this.map);
// Continue the game loop.
requestAnimationFrame(this.tick.bind(t... | javascript | function(time) {
var ms = time - this.lastTime;
this.lastTime = time;
// Update the different components of the scene.
this.map.update(ms / 1000);
this.player.update(ms / 1000);
this.camera.render(this.player, this.map);
// Continue the game loop.
requestAnimationFrame(this.tick.bind(t... | [
"function",
"(",
"time",
")",
"{",
"var",
"ms",
"=",
"time",
"-",
"this",
".",
"lastTime",
";",
"this",
".",
"lastTime",
"=",
"time",
";",
"// Update the different components of the scene.",
"this",
".",
"map",
".",
"update",
"(",
"ms",
"/",
"1000",
")",
... | Main game loop that renders the full scene on each screen refresh.
@param {Number} time | [
"Main",
"game",
"loop",
"that",
"renders",
"the",
"full",
"scene",
"on",
"each",
"screen",
"refresh",
"."
] | 030db918dd8ce640afd57e172418472497e8f113 | https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/examples/3d/js/game.js#L39-L50 | train | Update the scene. | [
30522,
3853,
1006,
2051,
1007,
1063,
13075,
5796,
1027,
2051,
1011,
2023,
1012,
2197,
7292,
1025,
2023,
1012,
2197,
7292,
1027,
2051,
1025,
1013,
1013,
10651,
1996,
2367,
6177,
1997,
1996,
3496,
1012,
2023,
1012,
4949,
1012,
10651,
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.table/src/sap/ui/table/TableMenuUtils.js | function(oTable) {
if (!oTable || !oTable._oCellContextMenu) {
return;
}
oTable._oCellContextMenu.destroy();
oTable._oCellContextMenu = null;
} | javascript | function(oTable) {
if (!oTable || !oTable._oCellContextMenu) {
return;
}
oTable._oCellContextMenu.destroy();
oTable._oCellContextMenu = null;
} | [
"function",
"(",
"oTable",
")",
"{",
"if",
"(",
"!",
"oTable",
"||",
"!",
"oTable",
".",
"_oCellContextMenu",
")",
"{",
"return",
";",
"}",
"oTable",
".",
"_oCellContextMenu",
".",
"destroy",
"(",
")",
";",
"oTable",
".",
"_oCellContextMenu",
"=",
"null"... | Destroys the cell context menu.
@param {sap.ui.table.Table} oTable Instance of the table. | [
"Destroys",
"the",
"cell",
"context",
"menu",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableMenuUtils.js#L331-L338 | train | Destroys the cell context menu for the given table. | [
30522,
3853,
1006,
27178,
3085,
1007,
1063,
2065,
1006,
999,
27178,
3085,
1064,
1064,
999,
27178,
3085,
1012,
1035,
1051,
29109,
22499,
10111,
18413,
3549,
2226,
1007,
1063,
2709,
1025,
1065,
27178,
3085,
1012,
1035,
1051,
29109,
22499,
101... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SAP/openui5 | src/sap.ui.fl/src/sap/ui/fl/Utils.js | function (oControl) {
var oManifest = null, oComponent = null, oComponentMetaData = null;
// determine UI5 component out of given control
if (oControl) {
oComponent = this.getAppComponentForControl(oControl);
// determine manifest out of found component
if (oComponent && oComponent.getMetadata) {... | javascript | function (oControl) {
var oManifest = null, oComponent = null, oComponentMetaData = null;
// determine UI5 component out of given control
if (oControl) {
oComponent = this.getAppComponentForControl(oControl);
// determine manifest out of found component
if (oComponent && oComponent.getMetadata) {... | [
"function",
"(",
"oControl",
")",
"{",
"var",
"oManifest",
"=",
"null",
",",
"oComponent",
"=",
"null",
",",
"oComponentMetaData",
"=",
"null",
";",
"// determine UI5 component out of given control",
"if",
"(",
"oControl",
")",
"{",
"oComponent",
"=",
"this",
".... | Returns the appDescriptor of the component for the given control
@param {sap.ui.core.Control} oControl - SAPUI5 control
@returns {object} that represent the appDescriptor
@public
@function
@name sap.ui.fl.Utils.getAppDescriptor | [
"Returns",
"the",
"appDescriptor",
"of",
"the",
"component",
"for",
"the",
"given",
"control"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/Utils.js#L226-L243 | train | Returns manifest of UI5 component for given control | [
30522,
3853,
1006,
1051,
8663,
13181,
2140,
1007,
1063,
13075,
16640,
29323,
3367,
1027,
19701,
1010,
1051,
9006,
29513,
3372,
1027,
19701,
1010,
1051,
9006,
29513,
3372,
11368,
8447,
2696,
1027,
19701,
1025,
1013,
1013,
5646,
21318,
2629,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
firebase/firebaseui-web | javascript/widgets/handler/common.js | function() {
// Sets pending redirect status before redirect to
// accountchooser.com.
firebaseui.auth.storage.setPendingRedirectStatus(app.getAppId());
firebaseui.auth.acClient.trySelectAccount(
function(isAvailable) {
// Removes the pending redirect status if does not get... | javascript | function() {
// Sets pending redirect status before redirect to
// accountchooser.com.
firebaseui.auth.storage.setPendingRedirectStatus(app.getAppId());
firebaseui.auth.acClient.trySelectAccount(
function(isAvailable) {
// Removes the pending redirect status if does not get... | [
"function",
"(",
")",
"{",
"// Sets pending redirect status before redirect to",
"// accountchooser.com.",
"firebaseui",
".",
"auth",
".",
"storage",
".",
"setPendingRedirectStatus",
"(",
"app",
".",
"getAppId",
"(",
")",
")",
";",
"firebaseui",
".",
"auth",
".",
"a... | If there is no pending accountchooser.com response and provider sign in is not to be rendered, try to select account from accountchooser.com. Do not redirect to accountchooser.com directly, instead package routine in continue callback function to be passed to accountchooser.com invoked handler. | [
"If",
"there",
"is",
"no",
"pending",
"accountchooser",
".",
"com",
"response",
"and",
"provider",
"sign",
"in",
"is",
"not",
"to",
"be",
"rendered",
"try",
"to",
"select",
"account",
"from",
"accountchooser",
".",
"com",
".",
"Do",
"not",
"redirect",
"to"... | c10aa51e38aeb38dc63baa22b48cd6690c2be087 | https://github.com/firebase/firebaseui-web/blob/c10aa51e38aeb38dc63baa22b48cd6690c2be087/javascript/widgets/handler/common.js#L213-L244 | train | Try to select account and post accountchooser. com result | [
30522,
3853,
1006,
1007,
1063,
1013,
1013,
4520,
14223,
2417,
7442,
6593,
3570,
2077,
2417,
7442,
6593,
2000,
1013,
1013,
4070,
9905,
9232,
2099,
1012,
4012,
1012,
2543,
15058,
10179,
1012,
8740,
2705,
1012,
5527,
1012,
2275,
11837,
4667,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/update-badges.js | updateExchangeCount | function updateExchangeCount (fileName) {
log.bright.cyan ('Updating exchange count →', fileName.yellow)
let oldContent = fs.readFileSync (fileName, 'utf8')
let newContent =
oldContent.replace (/shields\.io\/badge\/exchanges\-[0-9a-z]+\-blue/g, 'shields.io/badge/exchanges-' + ccxt.exchanges.length... | javascript | function updateExchangeCount (fileName) {
log.bright.cyan ('Updating exchange count →', fileName.yellow)
let oldContent = fs.readFileSync (fileName, 'utf8')
let newContent =
oldContent.replace (/shields\.io\/badge\/exchanges\-[0-9a-z]+\-blue/g, 'shields.io/badge/exchanges-' + ccxt.exchanges.length... | [
"function",
"updateExchangeCount",
"(",
"fileName",
")",
"{",
"log",
".",
"bright",
".",
"cyan",
"(",
"'Updating exchange count →', ",
"f",
"leName.y",
"e",
"llow)",
"",
"let",
"oldContent",
"=",
"fs",
".",
"readFileSync",
"(",
"fileName",
",",
"'utf8'",
")",
... | ----------------------------------------------------------------------------- | [
"-----------------------------------------------------------------------------"
] | 8168069b9180a465532905e225586215e115a565 | https://github.com/ccxt/ccxt/blob/8168069b9180a465532905e225586215e115a565/build/update-badges.js#L63-L75 | train | Update the exchange count of the resource | [
30522,
3853,
10651,
10288,
22305,
8586,
21723,
1006,
5371,
18442,
1007,
1063,
8833,
1012,
4408,
1012,
22330,
2319,
1006,
1005,
2039,
16616,
3863,
4175,
1585,
1005,
1010,
5371,
18442,
1012,
3756,
1007,
2292,
2214,
8663,
6528,
2102,
1027,
104... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/util/BindingsExtractor.js | collectBindingPaths | function collectBindingPaths(oElement, oModel){
var mBindingsCollection = {
bindingPaths: [],
bindingContextPaths: []
};
var sAggregationName = oElement.sParentAggregationName;
var oParent = oElement.getParent();
var aBindings = getBindings(oElement, oModel);
if (oParent) {
var oDefaultAggregation... | javascript | function collectBindingPaths(oElement, oModel){
var mBindingsCollection = {
bindingPaths: [],
bindingContextPaths: []
};
var sAggregationName = oElement.sParentAggregationName;
var oParent = oElement.getParent();
var aBindings = getBindings(oElement, oModel);
if (oParent) {
var oDefaultAggregation... | [
"function",
"collectBindingPaths",
"(",
"oElement",
",",
"oModel",
")",
"{",
"var",
"mBindingsCollection",
"=",
"{",
"bindingPaths",
":",
"[",
"]",
",",
"bindingContextPaths",
":",
"[",
"]",
"}",
";",
"var",
"sAggregationName",
"=",
"oElement",
".",
"sParentAg... | Get all relevant binding paths and binding context paths for the element (from all properties)
@param {sap.ui.core.Control} oElement - Starting point of the search
@param {sap.ui.model.Model} oModel - Model for filtering irrelevant binding paths
@returns {{bindingPaths: Array, bindingContextPaths: Array}}} - returns w... | [
"Get",
"all",
"relevant",
"binding",
"paths",
"and",
"binding",
"context",
"paths",
"for",
"the",
"element",
"(",
"from",
"all",
"properties",
")"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/util/BindingsExtractor.js#L26-L76 | train | Collect all binding paths for the given element | [
30522,
3853,
8145,
8428,
4667,
15069,
2015,
1006,
1051,
12260,
3672,
1010,
18168,
10244,
2140,
1007,
1063,
13075,
16914,
22254,
8613,
26895,
18491,
1027,
1063,
8031,
15069,
2015,
1024,
1031,
1033,
1010,
8031,
8663,
18209,
15069,
2015,
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... |
caolan/async | lib/each.js | eachLimit | function eachLimit(coll, iteratee, callback) {
return eachOf(coll, withoutIndex(wrapAsync(iteratee)), callback);
} | javascript | function eachLimit(coll, iteratee, callback) {
return eachOf(coll, withoutIndex(wrapAsync(iteratee)), callback);
} | [
"function",
"eachLimit",
"(",
"coll",
",",
"iteratee",
",",
"callback",
")",
"{",
"return",
"eachOf",
"(",
"coll",
",",
"withoutIndex",
"(",
"wrapAsync",
"(",
"iteratee",
")",
")",
",",
"callback",
")",
";",
"}"
] | Applies the function `iteratee` to each item in `coll`, in parallel.
The `iteratee` is called with an item from the list, and a callback for when
it has finished. If the `iteratee` passes an error to its `callback`, the
main `callback` (for the `each` function) is immediately called with the
error.
Note, that since th... | [
"Applies",
"the",
"function",
"iteratee",
"to",
"each",
"item",
"in",
"coll",
"in",
"parallel",
".",
"The",
"iteratee",
"is",
"called",
"with",
"an",
"item",
"from",
"the",
"list",
"and",
"a",
"callback",
"for",
"when",
"it",
"has",
"finished",
".",
"If"... | 4330d536c106592139fa82062494c9dba0da1fdb | https://github.com/caolan/async/blob/4330d536c106592139fa82062494c9dba0da1fdb/lib/each.js#L64-L66 | train | Iterates over collection and returns an array of items. | [
30522,
3853,
2169,
17960,
4183,
1006,
8902,
2140,
1010,
2009,
22139,
2063,
1010,
2655,
5963,
1007,
1063,
2709,
2169,
11253,
1006,
8902,
2140,
1010,
2302,
22254,
10288,
1006,
10236,
3022,
6038,
2278,
1006,
2009,
22139,
2063,
1007,
1007,
1010... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aframevr/aframe | src/core/a-entity.js | mergeComponentData | function mergeComponentData (attrValue, extraData) {
// Extra data not defined, just return attrValue.
if (!extraData) { return attrValue; }
// Merge multi-property data.
if (extraData.constructor === Object) {
return utils.extend(extraData, utils.styleParser.parse(attrValue || {}));
}
// Return data,... | javascript | function mergeComponentData (attrValue, extraData) {
// Extra data not defined, just return attrValue.
if (!extraData) { return attrValue; }
// Merge multi-property data.
if (extraData.constructor === Object) {
return utils.extend(extraData, utils.styleParser.parse(attrValue || {}));
}
// Return data,... | [
"function",
"mergeComponentData",
"(",
"attrValue",
",",
"extraData",
")",
"{",
"// Extra data not defined, just return attrValue.",
"if",
"(",
"!",
"extraData",
")",
"{",
"return",
"attrValue",
";",
"}",
"// Merge multi-property data.",
"if",
"(",
"extraData",
".",
"... | Given entity defined value, merge in extra data if necessary.
Handle both single and multi-property components.
@param {string} attrValue - Entity data.
@param extraData - Entity data from another source to merge in. | [
"Given",
"entity",
"defined",
"value",
"merge",
"in",
"extra",
"data",
"if",
"necessary",
".",
"Handle",
"both",
"single",
"and",
"multi",
"-",
"property",
"components",
"."
] | 24acc78a7299a4cdfe3ef617f4d40ddf6275c992 | https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/core/a-entity.js#L900-L911 | train | Merge component data with extra data | [
30522,
3853,
13590,
9006,
29513,
3372,
2850,
2696,
1006,
2012,
16344,
10175,
5657,
1010,
4469,
2850,
2696,
1007,
1063,
1013,
1013,
4469,
2951,
2025,
4225,
1010,
2074,
2709,
2012,
16344,
10175,
5657,
1012,
2065,
1006,
999,
4469,
2850,
2696,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
goldfire/howler.js | dist/howler.js | function(id) {
var self = this;
if (typeof id === 'undefined') {
var ids = [];
for (var i=0; i<self._sounds.length; i++) {
ids.push(self._sounds[i]._id);
}
return ids;
} else {
return [id];
}
} | javascript | function(id) {
var self = this;
if (typeof id === 'undefined') {
var ids = [];
for (var i=0; i<self._sounds.length; i++) {
ids.push(self._sounds[i]._id);
}
return ids;
} else {
return [id];
}
} | [
"function",
"(",
"id",
")",
"{",
"var",
"self",
"=",
"this",
";",
"if",
"(",
"typeof",
"id",
"===",
"'undefined'",
")",
"{",
"var",
"ids",
"=",
"[",
"]",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"self",
".",
"_sounds",
".",
"leng... | Get all ID's from the sounds pool.
@param {Number} id Only return one ID if one is passed.
@return {Array} Array of IDs. | [
"Get",
"all",
"ID",
"s",
"from",
"the",
"sounds",
"pool",
"."
] | 030db918dd8ce640afd57e172418472497e8f113 | https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/dist/howler.js#L2070-L2083 | train | Returns an array of unique ID s for the current sound | [
30522,
3853,
1006,
8909,
1007,
1063,
13075,
2969,
1027,
2023,
1025,
2065,
1006,
2828,
11253,
8909,
1027,
1027,
1027,
1005,
6151,
28344,
1005,
1007,
1063,
13075,
8909,
2015,
1027,
1031,
1033,
1025,
2005,
1006,
13075,
1045,
1027,
1014,
1025,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/dnd/DragAndDrop.js | function(sData) {
sData = "" + sData;
mData["text/plain"] = sData;
mData["text"] = sData;
setTransferData("text/plain", sData);
setTransferData("text", sData);
} | javascript | function(sData) {
sData = "" + sData;
mData["text/plain"] = sData;
mData["text"] = sData;
setTransferData("text/plain", sData);
setTransferData("text", sData);
} | [
"function",
"(",
"sData",
")",
"{",
"sData",
"=",
"\"\"",
"+",
"sData",
";",
"mData",
"[",
"\"text/plain\"",
"]",
"=",
"sData",
";",
"mData",
"[",
"\"text\"",
"]",
"=",
"sData",
";",
"setTransferData",
"(",
"\"text/plain\"",
",",
"sData",
")",
";",
"se... | Sets string data with plain text MIME type.
<b>Note:</b> This works in all browsers, including Internet Explorer and Microsoft Edge. It also works if you navigate between
different windows.
@param {string} sData Data
@public | [
"Sets",
"string",
"data",
"with",
"plain",
"text",
"MIME",
"type",
".",
"<b",
">",
"Note",
":",
"<",
"/",
"b",
">",
"This",
"works",
"in",
"all",
"browsers",
"including",
"Internet",
"Explorer",
"and",
"Microsoft",
"Edge",
".",
"It",
"also",
"works",
"... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/dnd/DragAndDrop.js#L152-L158 | train | Sets the data to be sent to the remote server | [
30522,
3853,
1006,
17371,
6790,
1007,
1063,
17371,
6790,
1027,
1000,
1000,
1009,
17371,
6790,
1025,
9108,
6790,
1031,
1000,
3793,
1013,
5810,
1000,
1033,
1027,
17371,
6790,
1025,
9108,
6790,
1031,
1000,
3793,
1000,
1033,
1027,
17371,
6790,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
eslint/eslint | lib/rules/no-extra-parens.js | requiresLeadingSpace | function requiresLeadingSpace(node) {
const leftParenToken = sourceCode.getTokenBefore(node);
const tokenBeforeLeftParen = sourceCode.getTokenBefore(node, 1);
const firstToken = sourceCode.getFirstToken(node);
return tokenBeforeLeftParen &&
tokenBeforeLef... | javascript | function requiresLeadingSpace(node) {
const leftParenToken = sourceCode.getTokenBefore(node);
const tokenBeforeLeftParen = sourceCode.getTokenBefore(node, 1);
const firstToken = sourceCode.getFirstToken(node);
return tokenBeforeLeftParen &&
tokenBeforeLef... | [
"function",
"requiresLeadingSpace",
"(",
"node",
")",
"{",
"const",
"leftParenToken",
"=",
"sourceCode",
".",
"getTokenBefore",
"(",
"node",
")",
";",
"const",
"tokenBeforeLeftParen",
"=",
"sourceCode",
".",
"getTokenBefore",
"(",
"node",
",",
"1",
")",
";",
"... | Determines whether a node should be preceded by an additional space when removing parens
@param {ASTNode} node node to evaluate; must be surrounded by parentheses
@returns {boolean} `true` if a space should be inserted before the node
@private | [
"Determines",
"whether",
"a",
"node",
"should",
"be",
"preceded",
"by",
"an",
"additional",
"space",
"when",
"removing",
"parens"
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-extra-parens.js#L262-L271 | train | Checks whether a node requires leading space. | [
30522,
3853,
5942,
19738,
4667,
23058,
1006,
13045,
1007,
1063,
9530,
3367,
2187,
19362,
4765,
11045,
2078,
1027,
3120,
16044,
1012,
2131,
18715,
2368,
4783,
29278,
2063,
1006,
13045,
1007,
1025,
9530,
3367,
19204,
4783,
29278,
12260,
6199,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/js/mui.locker.js | function() {
var self = this;
//self.pointLocationArr = [];
if (self.cxt) {
self.cxt.clearRect(0, 0, self.CW, self.CH);
self.draw(self.cxt, self.pointLocationArr, [], {
X: 0,
Y: 0
});
}
} | javascript | function() {
var self = this;
//self.pointLocationArr = [];
if (self.cxt) {
self.cxt.clearRect(0, 0, self.CW, self.CH);
self.draw(self.cxt, self.pointLocationArr, [], {
X: 0,
Y: 0
});
}
} | [
"function",
"(",
")",
"{",
"var",
"self",
"=",
"this",
";",
"//self.pointLocationArr = [];",
"if",
"(",
"self",
".",
"cxt",
")",
"{",
"self",
".",
"cxt",
".",
"clearRect",
"(",
"0",
",",
"0",
",",
"self",
".",
"CW",
",",
"self",
".",
"CH",
")",
"... | 清除图形 | [
"清除图形"
] | ff74c90a1671a552f3604b1288bf38a4126312d0 | https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/login/js/mui.locker.js#L249-L259 | train | Draws the region region | [
30522,
3853,
1006,
1007,
1063,
13075,
2969,
1027,
2023,
1025,
1013,
1013,
2969,
1012,
2391,
4135,
10719,
2906,
2099,
1027,
1031,
1033,
1025,
2065,
1006,
2969,
1012,
1039,
18413,
1007,
1063,
2969,
1012,
1039,
18413,
1012,
3154,
2890,
6593,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/openBrowser.js | openBrowser | function openBrowser(url) {
const { action, value } = getBrowserEnv();
switch (action) {
case Actions.NONE:
// Special case: BROWSER="none" will prevent opening completely.
return false;
case Actions.SCRIPT:
return executeNodeScript(value, url);
case Actions.BROWSER:
return start... | javascript | function openBrowser(url) {
const { action, value } = getBrowserEnv();
switch (action) {
case Actions.NONE:
// Special case: BROWSER="none" will prevent opening completely.
return false;
case Actions.SCRIPT:
return executeNodeScript(value, url);
case Actions.BROWSER:
return start... | [
"function",
"openBrowser",
"(",
"url",
")",
"{",
"const",
"{",
"action",
",",
"value",
"}",
"=",
"getBrowserEnv",
"(",
")",
";",
"switch",
"(",
"action",
")",
"{",
"case",
"Actions",
".",
"NONE",
":",
"// Special case: BROWSER=\"none\" will prevent opening compl... | Reads the BROWSER environment variable and decides what to do with it. Returns
true if it opened a browser or ran a node.js script, otherwise false. | [
"Reads",
"the",
"BROWSER",
"environment",
"variable",
"and",
"decides",
"what",
"to",
"do",
"with",
"it",
".",
"Returns",
"true",
"if",
"it",
"opened",
"a",
"browser",
"or",
"ran",
"a",
"node",
".",
"js",
"script",
"otherwise",
"false",
"."
] | 57ef103440c24e41b0d7dc82b7ad7fc1dc817eca | https://github.com/facebook/create-react-app/blob/57ef103440c24e41b0d7dc82b7ad7fc1dc817eca/packages/react-dev-utils/openBrowser.js#L111-L124 | train | Open a browser | [
30522,
3853,
2330,
12618,
9333,
2121,
1006,
24471,
2140,
1007,
1063,
9530,
3367,
1063,
2895,
1010,
3643,
1065,
1027,
2131,
12618,
9333,
7869,
2078,
2615,
1006,
1007,
1025,
6942,
1006,
2895,
1007,
1063,
2553,
4506,
1012,
3904,
1024,
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... |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableSyncExtension.js | function(iIndex, bHovered) {
var oTable = this.getTable();
var oRow = oTable.getRows()[iIndex];
if (oRow && bHovered != null) {
oRow._setHovered(bHovered);
}
} | javascript | function(iIndex, bHovered) {
var oTable = this.getTable();
var oRow = oTable.getRows()[iIndex];
if (oRow && bHovered != null) {
oRow._setHovered(bHovered);
}
} | [
"function",
"(",
"iIndex",
",",
"bHovered",
")",
"{",
"var",
"oTable",
"=",
"this",
".",
"getTable",
"(",
")",
";",
"var",
"oRow",
"=",
"oTable",
".",
"getRows",
"(",
")",
"[",
"iIndex",
"]",
";",
"if",
"(",
"oRow",
"&&",
"bHovered",
"!=",
"null",
... | Sets the hover state of a row.
@param {int} iIndex The index of the row in the aggregation.
@param {boolean} bHovered Whether the row should be hovered. | [
"Sets",
"the",
"hover",
"state",
"of",
"a",
"row",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableSyncExtension.js#L35-L42 | train | Sets the hover state of a row. | [
30522,
3853,
1006,
2462,
13629,
2595,
1010,
1038,
6806,
25896,
1007,
1063,
13075,
27178,
3085,
1027,
2023,
1012,
2131,
10880,
1006,
1007,
1025,
13075,
20298,
2860,
1027,
27178,
3085,
1012,
2131,
10524,
2015,
1006,
1007,
1031,
2462,
13629,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SAP/openui5 | lib/jsdoc/transform-apijson-for-sdk.js | function (aParameters) {
// New array to hold modified parameters
var aNodes = [],
processNode = function (oNode, sPhoneName, iDepth, aNodes) {
// Handle phone name
oNode.phoneName = sPhoneName ? [sPhoneName, oNode.name].join(".") : oNode.name;
// Depth
oNode.depth = iDepth;
// Add ... | javascript | function (aParameters) {
// New array to hold modified parameters
var aNodes = [],
processNode = function (oNode, sPhoneName, iDepth, aNodes) {
// Handle phone name
oNode.phoneName = sPhoneName ? [sPhoneName, oNode.name].join(".") : oNode.name;
// Depth
oNode.depth = iDepth;
// Add ... | [
"function",
"(",
"aParameters",
")",
"{",
"// New array to hold modified parameters",
"var",
"aNodes",
"=",
"[",
"]",
",",
"processNode",
"=",
"function",
"(",
"oNode",
",",
"sPhoneName",
",",
"iDepth",
",",
"aNodes",
")",
"{",
"// Handle phone name",
"oNode",
"... | Adjusts constructor parameters info so that it can be easily displayed in a table
@param {Array} aParameters - the events array initially coming from the server | [
"Adjusts",
"constructor",
"parameters",
"info",
"so",
"that",
"it",
"can",
"be",
"easily",
"displayed",
"in",
"a",
"table"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/lib/jsdoc/transform-apijson-for-sdk.js#L1921-L1951 | train | This function is called to process parameters in the parameters array | [
30522,
3853,
1006,
9706,
5400,
22828,
2015,
1007,
1063,
1013,
1013,
2047,
9140,
2000,
2907,
6310,
11709,
13075,
2019,
19847,
1027,
1031,
1033,
1010,
2832,
3630,
3207,
1027,
3853,
1006,
21058,
3207,
1010,
11867,
27406,
18442,
1010,
8909,
236... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SAP/openui5 | src/sap.ui.documentation/src/sap/ui/documentation/sdk/Component.js | function () {
this._oErrorHandler.destroy();
this._oConfigUtil.destroy();
this._oConfigUtil = null;
// call the base component's destroy function
UIComponent.prototype.destroy.apply(this, arguments);
} | javascript | function () {
this._oErrorHandler.destroy();
this._oConfigUtil.destroy();
this._oConfigUtil = null;
// call the base component's destroy function
UIComponent.prototype.destroy.apply(this, arguments);
} | [
"function",
"(",
")",
"{",
"this",
".",
"_oErrorHandler",
".",
"destroy",
"(",
")",
";",
"this",
".",
"_oConfigUtil",
".",
"destroy",
"(",
")",
";",
"this",
".",
"_oConfigUtil",
"=",
"null",
";",
"// call the base component's destroy function",
"UIComponent",
... | The component is destroyed by UI5 automatically.
In this method, the ListSelector and ErrorHandler are destroyed.
@public
@override | [
"The",
"component",
"is",
"destroyed",
"by",
"UI5",
"automatically",
".",
"In",
"this",
"method",
"the",
"ListSelector",
"and",
"ErrorHandler",
"are",
"destroyed",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/Component.js#L76-L82 | train | Destroys the component | [
30522,
3853,
1006,
1007,
1063,
2023,
1012,
1035,
1051,
2121,
29165,
11774,
3917,
1012,
6033,
1006,
1007,
1025,
2023,
1012,
1035,
1051,
8663,
8873,
27920,
4014,
1012,
6033,
1006,
1007,
1025,
2023,
1012,
1035,
1051,
8663,
8873,
27920,
4014,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.